Re: [PATCH v2 1/5] dt-bindings: arm: Initial MStar vendor prefixes and compatible strings

From: Andreas FÃrber
Date: Wed Jun 10 2020 - 05:35:40 EST


Hi Daniel,

Am 10.06.20 um 11:03 schrieb Daniel Palmer:
Adds a prefixes for MStar, thingy.jp, 70mai and then defines compatible
strings for the first MStar based boards.

Signed-off-by: Daniel Palmer <daniel@xxxxxxxx>
---
.../devicetree/bindings/arm/mstar.yaml | 30 +++++++++++++++++++
.../devicetree/bindings/vendor-prefixes.yaml | 6 ++++
MAINTAINERS | 6 ++++
3 files changed, 42 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/mstar.yaml

diff --git a/Documentation/devicetree/bindings/arm/mstar.yaml b/Documentation/devicetree/bindings/arm/mstar.yaml
new file mode 100644
index 000000000000..09e87cf6d6f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mstar.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mstar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar platforms device tree bindings
+
+maintainers:
+ - Daniel Palmer <daniel@xxxxxxxxx>
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: thingy.jp BreadBee
+ items:
+ - const: thingyjp,breadbee
+ - const: mstar,infinity3
+
+ - description: thingy.jp BreadBee Crust
+ items:
+ - const: thingyjp,breadbee-crust
+ - const: mstar,infinity
+
+ - description: 70mai midrive d08
+ items:
+ - const: 70mai,midrived08
+ - const: mstar,mercury5

I would advise to restructure these three for forward planning:

Use const only for the SoC compatible.

For the boards use an enum with (for now) only the one entry. This affects the description, which may mislead people to duplicate these blocks for each board rather than just for each SoC family. Take a look at other existing files (e.g., my realtek.yaml and actions.yaml, but note they don't have the new-style description line yet - I assume it'll work the same in enum as in your oneOf).

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index ef6d75b9113a..1770fc794027 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -23,6 +23,8 @@ patternProperties:
"^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
# Keep list in alphabetical order.
+ "^70mai,.*":
+ description: 70mai

"70mai Co., Ltd." please - don't just repeat the prefix.

"^abilis,.*":
description: Abilis Systems
"^abracon,.*":
@@ -678,6 +680,8 @@ patternProperties:
description: Microsemi Corporation
"^msi,.*":
description: Micro-Star International Co. Ltd.
+ "^mstar,.*":
+ description: MStar Semiconductor, Inc.
"^mti,.*":
description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
"^multi-inno,.*":
@@ -1030,6 +1034,8 @@ patternProperties:
description: Three Five Corp
"^thine,.*":
description: THine Electronics, Inc.
+ "^thingyjp,.*":
+ description: thingy.jp
"^ti,.*":
description: Texas Instruments
"^tianma,.*":

If you split the vendor prefixes to a preceding patch, they have a chance of getting Reviewed-bys more quickly. You can then also CC the vendors on the prefixes you're assigning for them.

diff --git a/MAINTAINERS b/MAINTAINERS
index 77a3fa5e3edd..1ca77f97b8ee 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2110,6 +2110,12 @@ L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-pxa/mioa701.c
+ARM/MStar/Sigmastar ARMv7 SoC support
+M: Daniel Palmer <daniel@xxxxxxxxx>
+L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
+S: Maintained
+F: Documentation/devicetree/bindings/arm/mstar.yaml
+
ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
M: Michael Petchkovsky <mkpetch@xxxxxxxxxxxxxxxx>
S: Maintained

In theory it's spelled Armv7 since 2017, but MAINTAINERS, subject prefix conventions and many other places in Linux still use the old upper-case spelling, too...

Regards,
Andreas

--
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 NÃrnberg, Germany
GF: Felix ImendÃrffer
HRB 36809 (AG NÃrnberg)