Skip to contentSkip to conversation

dt-bindings: Add vendor prefix for Espressif

PATCH Applied Maxime Ripard 3 participants 4 messages May 23, 2019 – May 24, 2019 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: Add vendor prefix for Espressif

Add Espressif Systems DT vendor prefix. That prefix has been used for quite some time for WiFi chips, but has never been documented.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index c0881d51aa91..19cc3240a445 100644
@@ -277,6 +277,8 @@ patternProperties:
     description: Ecole Polytechnique Fédérale de Lausanne
   "^epson,.*":
     description: Seiko Epson Corp.
+  "^esp,.*":
+    description: Espressif Systems Co. Ltd.
   "^est,.*":
     description: ESTeem Wireless Modems
   "^ettus,.*":
Signature · 1 line
2.21.0
#1 lore raw
Quoted 3 lines · Maxime Ripard

Add Espressif Systems DT vendor prefix. That prefix has been used for quite some time for WiFi chips, but has never been documented.

Just 1 of about 100...

Here's a script to generate a schema for compatible string checks. Not yet sure what to do with it or how to integrate it in.

#!/bin/sh

vnd_file="Documentation/devicetree/bindings/vendor-prefixes.yaml"

vendor_pattern="$(sed -n -e 's/.*\^\([-a-zA-Z0-9]*\),.*/ \1\|\\/p' ${vnd_file})"

cat << EOF
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
---
\$id: http://devicetree.org/schemas/compatible-vendor-prefixes.yaml#
\$schema: http://devicetree.org/meta-schemas/base.yaml#

title: Devicetree Vendor Prefix Registry

maintainers:
- Rob Herring <[email protected]>

select: true

properties:
compatible:
maxItems: 32
items:
if:
allOf:
- pattern: ","
- not: { pattern: "^usb[0-9a-f]+," }
then:
pattern: "^(\\
${vendor_pattern}

          ),"

EOF

#2 lore raw

Hi Rob,

Quoted 6 lines · Rob Herring
Quoted 3 lines · Maxime Ripard

Add Espressif Systems DT vendor prefix. That prefix has been used for quite some time for WiFi chips, but has never been documented.

Just 1 of about 100...

Indeed, it turns out that we have much more undocumented prefixes in the board compatibles....

How do you want to handle this, should we work gradually to support all the prefixes, or should I send one patch fixing all of the warnings on my DTs at once?

Quoted 35 lines

Here's a script to generate a schema for compatible string checks. Not yet sure what to do with it or how to integrate it in.

#!/bin/sh

vnd_file="Documentation/devicetree/bindings/vendor-prefixes.yaml"

vendor_pattern="$(sed -n -e 's/.*\^\([-a-zA-Z0-9]*\),.*/ \1\|\\/p' ${vnd_file})"

cat << EOF
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
---
\$id: http://devicetree.org/schemas/compatible-vendor-prefixes.yaml#
\$schema: http://devicetree.org/meta-schemas/base.yaml#

title: Devicetree Vendor Prefix Registry

maintainers:
- Rob Herring <[email protected]>

select: true

properties:
compatible:
maxItems: 32
items:
if:
allOf:
- pattern: ","
- not: { pattern: "^usb[0-9a-f]+," }
then:
pattern: "^(\\
${vendor_pattern}

Quoted 3 lines
          ),"

EOF

It turned out pretty useful, but yeah, it's not super easy to merge anywhere in the kernel tree. Maybe you could put it in the tools directory, with a wrapper that would run make dtbs_check, plus a nice grep to only report the vendors missing it could find for the current configuration?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

maintainer Applied
#3 lore raw
In reply to Maxime Ripard
Quoted 8 lines · Maxime Ripard

Add Espressif Systems DT vendor prefix. That prefix has been used for quite some time for WiFi chips, but has never been documented.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks.

Rob