ARM: dts: ux500: Add aliases for I2C and SPI buses
authorStephan Gerhold <stephan@gerhold.net>
Mon, 25 Nov 2019 17:04:26 +0000 (18:04 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 9 Dec 2019 13:45:01 +0000 (14:45 +0100)
Now that we disable the I2C/SPI buses by default, is is even more
important to assign aliases to the I2C/SPI device nodes.
Otherwise, enabling/disabling one of them will potentially change
all device IDs, e.g. i2c2 will be named i2c-0 if it is the only
enabled I2C bus.

Add aliases for the I2C and SPI buses to avoid this.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20191125170428.76069-2-stephan@gerhold.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/boot/dts/ste-dbx5x0.dtsi

index d0770c0..061711b 100644 (file)
        #address-cells = <1>;
        #size-cells = <1>;
 
+       /* This stablilizes the device enumeration */
+       aliases {
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c4;
+               spi0 = &spi0;
+               spi1 = &spi1;
+               spi2 = &spi2;
+               spi3 = &spi3;
+       };
+
        chosen {
        };
 
                        };
                };
 
-               i2c@80004000 {
+               i2c0: i2c@80004000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80004000 0x1000>;
                        interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               i2c@80122000 {
+               i2c1: i2c@80122000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80122000 0x1000>;
                        interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               i2c@80128000 {
+               i2c2: i2c@80128000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80128000 0x1000>;
                        interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               i2c@80110000 {
+               i2c3: i2c@80110000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x80110000 0x1000>;
                        interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               i2c@8012a000 {
+               i2c4: i2c@8012a000 {
                        compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
                        reg = <0x8012a000 0x1000>;
                        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               spi@80002000 {
+               ssp0: spi@80002000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80002000 0x1000>;
                        interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               spi@80003000 {
+               ssp1: spi@80003000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80003000 0x1000>;
                        interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               spi@8011a000 {
+               spi0: spi@8011a000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x8011a000 0x1000>;
                        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               spi@80112000 {
+               spi1: spi@80112000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80112000 0x1000>;
                        interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               spi@80111000 {
+               spi2: spi@80111000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80111000 0x1000>;
                        interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                        status = "disabled";
                };
 
-               spi@80129000 {
+               spi3: spi@80129000 {
                        compatible = "arm,pl022", "arm,primecell";
                        reg = <0x80129000 0x1000>;
                        interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;