Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: dts: qca: ar9132: use short references for dt nodes

Here are some Sascha Hauer's arguments for using aliases in the dts
files:

- using aliases reduces the number of indentations in dts files;

- dts files become independent of the layout of the dtsi files
(it becomes possible to introduce another bus {} hierarchy between
a toplevel bus and the devices when you have to);

- less chances for typos. if &i2c2 does not exist you get an error.
If instead you duplicate the whole path in the dts file a typo
in the path will just create another node.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Alban Bedel <albeu@free.fr>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12873/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Antony Pavlov and committed by
Ralf Baechle
83fe8384 2cdfec1b

+49 -53
+4 -4
arch/mips/boot/dts/qca/ar9132.dtsi
··· 52 52 #qca,ddr-wb-channel-cells = <1>; 53 53 }; 54 54 55 - uart@18020000 { 55 + uart: uart@18020000 { 56 56 compatible = "ns8250"; 57 57 reg = <0x18020000 0x20>; 58 58 interrupts = <3>; ··· 94 94 clock-output-names = "cpu", "ddr", "ahb"; 95 95 }; 96 96 97 - wdt@18060008 { 97 + wdt: wdt@18060008 { 98 98 compatible = "qca,ar7130-wdt"; 99 99 reg = <0x18060008 0x8>; 100 100 ··· 125 125 }; 126 126 }; 127 127 128 - usb@1b000100 { 128 + usb: usb@1b000100 { 129 129 compatible = "qca,ar7100-ehci", "generic-ehci"; 130 130 reg = <0x1b000100 0x100>; 131 131 ··· 140 140 status = "disabled"; 141 141 }; 142 142 143 - spi@1f000000 { 143 + spi: spi@1f000000 { 144 144 compatible = "qca,ar9132-spi", "qca,ar7100-spi"; 145 145 reg = <0x1f000000 0x10>; 146 146
+45 -49
arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts
··· 20 20 clock-frequency = <40000000>; 21 21 }; 22 22 23 - ahb { 24 - apb { 25 - uart@18020000 { 26 - status = "okay"; 27 - }; 28 - 29 - pll-controller@18050000 { 30 - clocks = <&extosc>; 31 - }; 32 - }; 33 - 34 - usb@1b000100 { 35 - status = "okay"; 36 - }; 37 - 38 - spi@1f000000 { 39 - status = "okay"; 40 - num-cs = <1>; 41 - 42 - flash@0 { 43 - #address-cells = <1>; 44 - #size-cells = <1>; 45 - compatible = "s25sl064a"; 46 - reg = <0>; 47 - spi-max-frequency = <25000000>; 48 - 49 - partition@0 { 50 - label = "u-boot"; 51 - reg = <0x000000 0x020000>; 52 - }; 53 - 54 - partition@1 { 55 - label = "firmware"; 56 - reg = <0x020000 0x7D0000>; 57 - }; 58 - 59 - partition@2 { 60 - label = "art"; 61 - reg = <0x7F0000 0x010000>; 62 - read-only; 63 - }; 64 - }; 65 - }; 66 - }; 67 - 68 - usb-phy { 69 - status = "okay"; 70 - }; 71 - 72 23 gpio-keys { 73 24 compatible = "gpio-keys-polled"; 74 25 #address-cells = <1>; ··· 62 111 led@3 { 63 112 label = "tp-link:green:wlan"; 64 113 gpios = <&gpio 9 GPIO_ACTIVE_LOW>; 114 + }; 115 + }; 116 + }; 117 + 118 + &uart { 119 + status = "okay"; 120 + }; 121 + 122 + &pll { 123 + clocks = <&extosc>; 124 + }; 125 + 126 + &usb { 127 + status = "okay"; 128 + }; 129 + 130 + &usb_phy { 131 + status = "okay"; 132 + }; 133 + 134 + &spi { 135 + status = "okay"; 136 + num-cs = <1>; 137 + 138 + flash@0 { 139 + #address-cells = <1>; 140 + #size-cells = <1>; 141 + compatible = "s25sl064a"; 142 + reg = <0>; 143 + spi-max-frequency = <25000000>; 144 + 145 + partition@0 { 146 + label = "u-boot"; 147 + reg = <0x000000 0x020000>; 148 + }; 149 + 150 + partition@1 { 151 + label = "firmware"; 152 + reg = <0x020000 0x7D0000>; 153 + }; 154 + 155 + partition@2 { 156 + label = "art"; 157 + reg = <0x7F0000 0x010000>; 158 + read-only; 65 159 }; 66 160 }; 67 161 };