Commit 20a72af1 authored by Rob Herring's avatar Rob Herring

dt-bindings: Fix SPI and I2C bus node names in examples

SPI and I2C bus node names are expected to be "spi" or "i2c",
respectively, with nothing else, a unit-address, or a '-N' index. A
pattern of 'spi0' or 'i2c0' or similar has crept in. Fix all these
cases. Mostly scripted with the following commands:

git grep -l '\si2c[0-9] {' Documentation/devicetree/ | xargs sed -i -e 's/i2c[0-9] {/i2c {/'
git grep -l '\sspi[0-9] {' Documentation/devicetree/ | xargs sed -i -e 's/spi[0-9] {/spi {/'

With this, a few errors in examples were exposed and fixed.
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarStephen Boyd <sboyd@kernel.org>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for the microchip,mcp251xfd.yaml
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for power-supply
Acked-by: default avatarWolfram Sang <wsa@kernel.org>
Acked-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230228215433.3944508-1-robh@kernel.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent ab82b4f1
......@@ -72,7 +72,7 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -41,7 +41,7 @@ additionalProperties: false
examples:
- |+
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -20,7 +20,7 @@ additionalProperties: false
examples:
- |
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -160,7 +160,7 @@ examples:
};
};
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -134,7 +134,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -61,7 +61,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -67,7 +67,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c4 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -71,7 +71,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -73,7 +73,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -71,7 +71,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -83,7 +83,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -51,7 +51,7 @@ additionalProperties: false
examples:
- |
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -87,7 +87,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -41,7 +41,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -226,7 +226,7 @@ unevaluatedProperties: false
examples:
- |
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -239,7 +239,7 @@ examples:
ssd1306_i2c: oled@3d {
compatible = "solomon,ssd1306";
reg = <0x3c>;
reg = <0x3d>;
pwms = <&pwm 4 3000>;
reset-gpios = <&gpio2 7>;
solomon,com-lrremap;
......
......@@ -122,7 +122,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -34,7 +34,7 @@ additionalProperties: false
examples:
- |
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
cros-ec@0 {
......
......@@ -30,7 +30,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
tusb320@61 {
......
......@@ -34,7 +34,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -151,7 +151,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -177,7 +177,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -203,7 +203,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c2 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -221,7 +221,7 @@ examples:
};
- |
i2c3 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -60,7 +60,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/aspeed-clock.h>
i2c0: i2c-bus@40 {
i2c@40 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "aspeed,ast2500-i2c-bus";
......
......@@ -39,7 +39,7 @@ unevaluatedProperties: false
examples:
- |
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -58,7 +58,7 @@ examples:
#include <dt-bindings/leds/common.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -165,7 +165,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -54,7 +54,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -39,7 +39,7 @@ examples:
- |
#include <dt-bindings/leds/common.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -87,7 +87,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -82,7 +82,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -55,7 +55,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -83,7 +83,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -84,7 +84,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -111,7 +111,7 @@ examples:
};
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -106,7 +106,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/video-interfaces.h>
i2c2 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -81,7 +81,7 @@ examples:
#include <dt-bindings/clock/sun8i-v3s-ccu.h>
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -107,7 +107,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/media/video-interfaces.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
ov772x: camera@21 {
......
......@@ -82,7 +82,7 @@ examples:
#include <dt-bindings/clock/sun8i-a83t-ccu.h>
#include <dt-bindings/gpio/gpio.h>
i2c2 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -78,7 +78,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -50,7 +50,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -97,7 +97,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -52,7 +52,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -65,7 +65,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -66,7 +66,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -77,7 +77,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -129,7 +129,7 @@ required:
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -246,7 +246,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -263,7 +263,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......@@ -296,7 +296,7 @@ examples:
# Example for FPMCU
- |
spi0 {
spi {
#address-cells = <0x1>;
#size-cells = <0x0>;
......
......@@ -95,7 +95,7 @@ required:
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -299,7 +299,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -315,7 +315,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -58,7 +58,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -62,7 +62,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -67,7 +67,7 @@ examples:
};
};
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -69,7 +69,7 @@ examples:
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c4 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -55,7 +55,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -89,7 +89,7 @@ examples:
#include <dt-bindings/interrupt-controller/irq.h>
// For wl12xx family:
spi1 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......@@ -104,8 +104,11 @@ examples:
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
// For wl18xx family:
spi2 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......@@ -118,6 +121,9 @@ examples:
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
// SDIO example:
mmc3 {
vmmc-supply = <&wlan_en_reg>;
......
......@@ -31,7 +31,7 @@ description: |
};
};
state_1_node_a {
spi0 {
spi {
function = "spi0";
groups = "spi0pins";
};
......
......@@ -293,7 +293,7 @@ examples:
pinctrl-names = "default";
};
i2c0 {
i2c {
pinctrl-0 = <&i2c0_pins_default>;
pinctrl-names = "default";
};
......
......@@ -77,7 +77,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -75,7 +75,7 @@ examples:
charge-term-current-microamp = <128000>;
};
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -84,7 +84,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -104,7 +104,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -77,7 +77,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -73,7 +73,7 @@ examples:
constant-charge-voltage-max-microvolt = <4000000>;
};
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -102,7 +102,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -95,7 +95,7 @@ examples:
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -75,15 +75,16 @@ additionalProperties: false
examples:
- |
i2c0 {
bat: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3200000>;
energy-full-design-microwatt-hours = <5290000>;
charge-full-design-microamp-hours = <1430000>;
};
i2c {
#address-cells = <1>;
#size-cells = <0>;
bat: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3200000>;
energy-full-design-microwatt-hours = <5290000>;
charge-full-design-microamp-hours = <1430000>;
};
bq27510g3: fuel-gauge@55 {
compatible = "ti,bq27510g3";
......
......@@ -54,7 +54,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
battery@64 {
......
......@@ -54,7 +54,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger: battery-charger@68 {
......
......@@ -32,7 +32,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -68,7 +68,7 @@ unevaluatedProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......@@ -82,7 +82,7 @@ examples:
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -69,7 +69,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -68,7 +68,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -61,7 +61,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -90,7 +90,7 @@ examples:
- |
#include <dt-bindings/regulator/active-semi,8865-regulator.h>
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -32,7 +32,7 @@ unevaluatedProperties: false
examples:
- |
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -109,7 +109,7 @@ additionalProperties: false
examples:
- |
i2c1 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -40,7 +40,7 @@ unevaluatedProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
es8316: codec@11 {
......
......@@ -66,7 +66,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec: codec@4c {
......
......@@ -68,7 +68,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec: codec@41 {
......
......@@ -61,7 +61,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec: codec@38 {
......
......@@ -39,7 +39,7 @@ properties:
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
tas5805m: tas5805m@2c {
......
......@@ -192,7 +192,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec: codec@4c {
......
......@@ -56,7 +56,7 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -40,7 +40,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/usb/pd.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -52,7 +52,7 @@ examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi0 {
spi {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -43,7 +43,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/usb/pd.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -51,7 +51,7 @@ examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/usb/pd.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -48,7 +48,7 @@ required:
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -56,7 +56,7 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c4 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -51,7 +51,7 @@ additionalProperties: false
examples:
- |
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
......@@ -43,7 +43,7 @@ additionalProperties: true
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c0 {
i2c {
#address-cells = <1>;
#size-cells = <0>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment