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

Merge tag 'mvebu-dt-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt

mvebu dt for 6.2 (part 1)

Fix assigned-addresses for every PCIe Root Port

Align LED node names with dtschema

Add a new kirkwood based board: Zyxel NSA310S

Fix compatible string for gpios for Armada 38x and 39x

Add interrupts for watchdog on Armada XP

Turris Omnia (Armada 385 based):
- Add switch port 6 node
- Add ethernet aliases

Switch to using gpiod API in pm-board code

* tag 'mvebu-dt-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu:
ARM: dts: armada-xp: add interrupts for watchdog
ARM: dts: armada: align LED node names with dtschema
ARM: mvebu: switch to using gpiod API in pm-board code
ARM: dts: armada-39x: Fix compatible string for gpios
ARM: dts: armada-38x: Fix compatible string for gpios
ARM: dts: turris-omnia: Add switch port 6 node
ARM: dts: turris-omnia: Add ethernet aliases
ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
ARM: dts: kirkwood: Add Zyxel NSA310S board

Link: https://lore.kernel.org/r/87cz979adf.fsf@BL-laptop
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+339 -71
+1
arch/arm/boot/dts/Makefile
··· 355 355 kirkwood-ns2mini.dtb \ 356 356 kirkwood-nsa310.dtb \ 357 357 kirkwood-nsa310a.dtb \ 358 + kirkwood-nsa310s.dtb \ 358 359 kirkwood-nsa320.dtb \ 359 360 kirkwood-nsa325.dtb \ 360 361 kirkwood-openblocks_a6.dtb \
+2 -2
arch/arm/boot/dts/armada-370-seagate-nas-4bay.dts
··· 72 72 }; 73 73 74 74 gpio-leds { 75 - red-sata2 { 75 + led-red-sata2 { 76 76 label = "dart:red:sata2"; 77 77 gpios = <&pca9554 0 GPIO_ACTIVE_LOW>; 78 78 }; 79 - red-sata3 { 79 + led-red-sata3 { 80 80 label = "dart:red:sata3"; 81 81 gpios = <&pca9554 3 GPIO_ACTIVE_LOW>; 82 82 };
+4 -4
arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
··· 132 132 gpio-leds { 133 133 compatible = "gpio-leds"; 134 134 135 - white-power { 135 + led-white-power { 136 136 label = "dart:white:power"; 137 137 gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; 138 138 linux,default-trigger = "timer"; 139 139 140 140 }; 141 - red-power { 141 + led-red-power { 142 142 label = "dart:red:power"; 143 143 gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; 144 144 }; 145 - red-sata0 { 145 + led-red-sata0 { 146 146 label = "dart:red:sata0"; 147 147 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; 148 148 }; 149 - red-sata1 { 149 + led-red-sata1 { 150 150 label = "dart:red:sata1"; 151 151 gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; 152 152 };
+1 -1
arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtsi
··· 107 107 gpio-leds { 108 108 compatible = "gpio-leds"; 109 109 110 - red-sata0 { 110 + led-red-sata0 { 111 111 label = "cumulus:red:sata0"; 112 112 gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>; 113 113 default-state = "off";
+1 -1
arch/arm/boot/dts/armada-370.dtsi
··· 84 84 85 85 pcie2: pcie@2,0 { 86 86 device_type = "pci"; 87 - assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; 87 + assigned-addresses = <0x82001000 0 0x80000 0 0x2000>; 88 88 reg = <0x1000 0 0 0 0>; 89 89 #address-cells = <3>; 90 90 #size-cells = <2>;
+1 -1
arch/arm/boot/dts/armada-375.dtsi
··· 592 592 593 593 pcie1: pcie@2,0 { 594 594 device_type = "pci"; 595 - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 595 + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; 596 596 reg = <0x1000 0 0 0 0>; 597 597 #address-cells = <3>; 598 598 #size-cells = <2>;
+2 -2
arch/arm/boot/dts/armada-380.dtsi
··· 89 89 /* x1 port */ 90 90 pcie@2,0 { 91 91 device_type = "pci"; 92 - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; 92 + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; 93 93 reg = <0x1000 0 0 0 0>; 94 94 #address-cells = <3>; 95 95 #size-cells = <2>; ··· 118 118 /* x1 port */ 119 119 pcie@3,0 { 120 120 device_type = "pci"; 121 - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 121 + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; 122 122 reg = <0x1800 0 0 0 0>; 123 123 #address-cells = <3>; 124 124 #size-cells = <2>;
+2 -2
arch/arm/boot/dts/armada-385-linksys-caiman.dts
··· 62 62 }; 63 63 64 64 &gpio_leds { 65 - power { 65 + led-power { 66 66 label = "caiman:white:power"; 67 67 }; 68 68 69 - sata { 69 + led-sata { 70 70 label = "caiman:white:sata"; 71 71 }; 72 72 };
+2 -2
arch/arm/boot/dts/armada-385-linksys-cobra.dts
··· 62 62 }; 63 63 64 64 &gpio_leds { 65 - power { 65 + led-power { 66 66 label = "cobra:white:power"; 67 67 }; 68 68 69 - sata { 69 + led-sata { 70 70 label = "cobra:white:sata"; 71 71 }; 72 72 };
+4 -4
arch/arm/boot/dts/armada-385-linksys-rango.dts
··· 54 54 }; 55 55 56 56 &gpio_leds { 57 - power { 57 + led-power { 58 58 gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; 59 59 label = "rango:white:power"; 60 60 }; 61 61 62 - sata { 62 + led-sata { 63 63 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; 64 64 label = "rango:white:sata"; 65 65 }; 66 66 67 - wlan_2g { 67 + led-wlan_2g { 68 68 gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; 69 69 label = "rango:white:wlan_2g"; 70 70 }; 71 71 72 - wlan_5g { 72 + led-wlan_5g { 73 73 gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; 74 74 label = "rango:white:wlan_5g"; 75 75 };
+2 -2
arch/arm/boot/dts/armada-385-linksys-shelby.dts
··· 62 62 }; 63 63 64 64 &gpio_leds { 65 - power { 65 + led-power { 66 66 label = "shelby:white:power"; 67 67 }; 68 68 69 - sata { 69 + led-sata { 70 70 label = "shelby:white:sata"; 71 71 }; 72 72 };
+2 -2
arch/arm/boot/dts/armada-385-linksys.dtsi
··· 71 71 pinctrl-0 = <&gpio_leds_pins>; 72 72 pinctrl-names = "default"; 73 73 74 - power { 74 + led-power { 75 75 gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; 76 76 default-state = "on"; 77 77 }; 78 78 79 - sata { 79 + led-sata { 80 80 gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; 81 81 default-state = "off"; 82 82 linux,default-trigger = "disk-activity";
+1 -1
arch/arm/boot/dts/armada-385-synology-ds116.dts
··· 149 149 * sata0, and accesses to SATA disk 0 make it blink so it 150 150 * doesn't need to be declared here. 151 151 */ 152 - orange { 152 + led-orange { 153 153 gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; 154 154 label = "ds116:orange:disk"; 155 155 default-state = "off";
+17 -1
arch/arm/boot/dts/armada-385-turris-omnia.dts
··· 23 23 stdout-path = &uart0; 24 24 }; 25 25 26 + aliases { 27 + ethernet0 = &eth0; 28 + ethernet1 = &eth1; 29 + ethernet2 = &eth2; 30 + }; 31 + 26 32 memory { 27 33 device_type = "memory"; 28 34 reg = <0x00000000 0x40000000>; /* 1024 MB */ ··· 489 483 }; 490 484 }; 491 485 492 - /* port 6 is connected to eth0 */ 486 + ports@6 { 487 + reg = <6>; 488 + label = "cpu"; 489 + ethernet = <&eth0>; 490 + phy-mode = "rgmii-id"; 491 + 492 + fixed-link { 493 + speed = <1000>; 494 + full-duplex; 495 + }; 496 + }; 493 497 }; 494 498 }; 495 499 };
+3 -3
arch/arm/boot/dts/armada-385.dtsi
··· 93 93 /* x1 port */ 94 94 pcie2: pcie@2,0 { 95 95 device_type = "pci"; 96 - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; 96 + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; 97 97 reg = <0x1000 0 0 0 0>; 98 98 #address-cells = <3>; 99 99 #size-cells = <2>; ··· 121 121 /* x1 port */ 122 122 pcie3: pcie@3,0 { 123 123 device_type = "pci"; 124 - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 124 + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; 125 125 reg = <0x1800 0 0 0 0>; 126 126 #address-cells = <3>; 127 127 #size-cells = <2>; ··· 152 152 */ 153 153 pcie4: pcie@4,0 { 154 154 device_type = "pci"; 155 - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; 155 + assigned-addresses = <0x82002000 0 0x48000 0 0x2000>; 156 156 reg = <0x2000 0 0 0 0>; 157 157 #address-cells = <3>; 158 158 #size-cells = <2>;
+2 -2
arch/arm/boot/dts/armada-38x.dtsi
··· 304 304 }; 305 305 306 306 gpio0: gpio@18100 { 307 - compatible = "marvell,armada-370-gpio", 307 + compatible = "marvell,armadaxp-gpio", 308 308 "marvell,orion-gpio"; 309 309 reg = <0x18100 0x40>, <0x181c0 0x08>; 310 310 reg-names = "gpio", "pwm"; ··· 323 323 }; 324 324 325 325 gpio1: gpio@18140 { 326 - compatible = "marvell,armada-370-gpio", 326 + compatible = "marvell,armadaxp-gpio", 327 327 "marvell,orion-gpio"; 328 328 reg = <0x18140 0x40>, <0x181c8 0x08>; 329 329 reg-names = "gpio", "pwm";
+5 -5
arch/arm/boot/dts/armada-39x.dtsi
··· 213 213 }; 214 214 215 215 gpio0: gpio@18100 { 216 - compatible = "marvell,orion-gpio"; 216 + compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; 217 217 reg = <0x18100 0x40>; 218 218 ngpios = <32>; 219 219 gpio-controller; ··· 227 227 }; 228 228 229 229 gpio1: gpio@18140 { 230 - compatible = "marvell,orion-gpio"; 230 + compatible = "marvell,armadaxp-gpio", "marvell,orion-gpio"; 231 231 reg = <0x18140 0x40>; 232 232 ngpios = <28>; 233 233 gpio-controller; ··· 463 463 /* x1 port */ 464 464 pcie@2,0 { 465 465 device_type = "pci"; 466 - assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; 466 + assigned-addresses = <0x82001000 0 0x40000 0 0x2000>; 467 467 reg = <0x1000 0 0 0 0>; 468 468 #address-cells = <3>; 469 469 #size-cells = <2>; ··· 492 492 /* x1 port */ 493 493 pcie@3,0 { 494 494 device_type = "pci"; 495 - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 495 + assigned-addresses = <0x82001800 0 0x44000 0 0x2000>; 496 496 reg = <0x1800 0 0 0 0>; 497 497 #address-cells = <3>; 498 498 #size-cells = <2>; ··· 524 524 */ 525 525 pcie@4,0 { 526 526 device_type = "pci"; 527 - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; 527 + assigned-addresses = <0x82002000 0 0x48000 0 0x2000>; 528 528 reg = <0x2000 0 0 0 0>; 529 529 #address-cells = <3>; 530 530 #size-cells = <2>;
+1
arch/arm/boot/dts/armada-xp-98dx3236.dtsi
··· 296 296 compatible = "marvell,armada-xp-wdt"; 297 297 clocks = <&coreclk 2>, <&refclk>; 298 298 clock-names = "nbclk", "fixed"; 299 + interrupts = <93>, <38>; 299 300 }; 300 301 301 302 &cpurst {
+1 -1
arch/arm/boot/dts/armada-xp-linksys-mamba.dts
··· 195 195 pinctrl-0 = <&power_led_pin>; 196 196 pinctrl-names = "default"; 197 197 198 - power { 198 + led-power { 199 199 label = "mamba:white:power"; 200 200 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; 201 201 default-state = "on";
+4 -4
arch/arm/boot/dts/armada-xp-mv78230.dtsi
··· 107 107 108 108 pcie2: pcie@2,0 { 109 109 device_type = "pci"; 110 - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 110 + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; 111 111 reg = <0x1000 0 0 0 0>; 112 112 #address-cells = <3>; 113 113 #size-cells = <2>; ··· 135 135 136 136 pcie3: pcie@3,0 { 137 137 device_type = "pci"; 138 - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; 138 + assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; 139 139 reg = <0x1800 0 0 0 0>; 140 140 #address-cells = <3>; 141 141 #size-cells = <2>; ··· 163 163 164 164 pcie4: pcie@4,0 { 165 165 device_type = "pci"; 166 - assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; 166 + assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; 167 167 reg = <0x2000 0 0 0 0>; 168 168 #address-cells = <3>; 169 169 #size-cells = <2>; ··· 191 191 192 192 pcie5: pcie@5,0 { 193 193 device_type = "pci"; 194 - assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; 194 + assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; 195 195 reg = <0x2800 0 0 0 0>; 196 196 #address-cells = <3>; 197 197 #size-cells = <2>;
+8 -8
arch/arm/boot/dts/armada-xp-mv78260.dtsi
··· 122 122 123 123 pcie2: pcie@2,0 { 124 124 device_type = "pci"; 125 - assigned-addresses = <0x82000800 0 0x44000 0 0x2000>; 125 + assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; 126 126 reg = <0x1000 0 0 0 0>; 127 127 #address-cells = <3>; 128 128 #size-cells = <2>; ··· 150 150 151 151 pcie3: pcie@3,0 { 152 152 device_type = "pci"; 153 - assigned-addresses = <0x82000800 0 0x48000 0 0x2000>; 153 + assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; 154 154 reg = <0x1800 0 0 0 0>; 155 155 #address-cells = <3>; 156 156 #size-cells = <2>; ··· 178 178 179 179 pcie4: pcie@4,0 { 180 180 device_type = "pci"; 181 - assigned-addresses = <0x82000800 0 0x4c000 0 0x2000>; 181 + assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; 182 182 reg = <0x2000 0 0 0 0>; 183 183 #address-cells = <3>; 184 184 #size-cells = <2>; ··· 206 206 207 207 pcie5: pcie@5,0 { 208 208 device_type = "pci"; 209 - assigned-addresses = <0x82000800 0 0x80000 0 0x2000>; 209 + assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; 210 210 reg = <0x2800 0 0 0 0>; 211 211 #address-cells = <3>; 212 212 #size-cells = <2>; ··· 234 234 235 235 pcie6: pcie@6,0 { 236 236 device_type = "pci"; 237 - assigned-addresses = <0x82000800 0 0x84000 0 0x2000>; 237 + assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; 238 238 reg = <0x3000 0 0 0 0>; 239 239 #address-cells = <3>; 240 240 #size-cells = <2>; ··· 262 262 263 263 pcie7: pcie@7,0 { 264 264 device_type = "pci"; 265 - assigned-addresses = <0x82000800 0 0x88000 0 0x2000>; 265 + assigned-addresses = <0x82003800 0 0x88000 0 0x2000>; 266 266 reg = <0x3800 0 0 0 0>; 267 267 #address-cells = <3>; 268 268 #size-cells = <2>; ··· 290 290 291 291 pcie8: pcie@8,0 { 292 292 device_type = "pci"; 293 - assigned-addresses = <0x82000800 0 0x8c000 0 0x2000>; 293 + assigned-addresses = <0x82004000 0 0x8c000 0 0x2000>; 294 294 reg = <0x4000 0 0 0 0>; 295 295 #address-cells = <3>; 296 296 #size-cells = <2>; ··· 318 318 319 319 pcie9: pcie@9,0 { 320 320 device_type = "pci"; 321 - assigned-addresses = <0x82000800 0 0x42000 0 0x2000>; 321 + assigned-addresses = <0x82004800 0 0x42000 0 0x2000>; 322 322 reg = <0x4800 0 0 0 0>; 323 323 #address-cells = <3>; 324 324 #size-cells = <2>;
+1
arch/arm/boot/dts/armada-xp.dtsi
··· 260 260 compatible = "marvell,armada-xp-wdt"; 261 261 clocks = <&coreclk 2>, <&refclk>; 262 262 clock-names = "nbclk", "fixed"; 263 + interrupts = <93>, <38>; 263 264 }; 264 265 265 266 &cpurst {
+1 -1
arch/arm/boot/dts/dove.dtsi
··· 139 139 pcie1: pcie@2 { 140 140 device_type = "pci"; 141 141 status = "disabled"; 142 - assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; 142 + assigned-addresses = <0x82001000 0 0x80000 0 0x2000>; 143 143 reg = <0x1000 0 0 0 0>; 144 144 clocks = <&gate_clk 5>; 145 145 marvell,pcie-port = <1>;
+259
arch/arm/boot/dts/kirkwood-nsa310s.dts
··· 1 + // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 + /* 3 + * ZyXEL NSA310S Board Description 4 + * Copyright 2020-2022 Pawel Dembicki <paweldembicki@gmail.com> 5 + * Copyright (c) 2015-2021, Tony Dinh <mibodhi@gmail.com> 6 + * Copyright (c) 2014, Adam Baker <linux@baker-net.org.uk> 7 + * Based upon the board setup file created by Peter Schildmann 8 + */ 9 + /dts-v1/; 10 + 11 + #include "kirkwood.dtsi" 12 + #include "kirkwood-6281.dtsi" 13 + #include <dt-bindings/leds/common.h> 14 + 15 + / { 16 + model = "ZyXEL NSA310S"; 17 + compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood"; 18 + 19 + memory { 20 + device_type = "memory"; 21 + reg = <0x00000000 0x10000000>; 22 + }; 23 + 24 + chosen { 25 + bootargs = "console=ttyS0,115200n8 earlyprintk"; 26 + stdout-path = &uart0; 27 + }; 28 + 29 + gpio_poweroff { 30 + compatible = "gpio-poweroff"; 31 + pinctrl-0 = <&pmx_pwr_off>; 32 + pinctrl-names = "default"; 33 + gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>; 34 + }; 35 + 36 + keys { 37 + compatible = "gpio-keys"; 38 + #address-cells = <1>; 39 + #size-cells = <0>; 40 + pinctrl-0 = <&pmx_buttons>; 41 + pinctrl-names = "default"; 42 + 43 + power { 44 + label = "Power Button"; 45 + linux,code = <KEY_POWER>; 46 + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; 47 + }; 48 + 49 + copy { 50 + label = "Copy Button"; 51 + linux,code = <KEY_COPY>; 52 + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; 53 + }; 54 + 55 + reset { 56 + label = "Reset Button"; 57 + linux,code = <KEY_RESTART>; 58 + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; 59 + }; 60 + }; 61 + 62 + leds { 63 + compatible = "gpio-leds"; 64 + pinctrl-0 = <&pmx_leds>; 65 + pinctrl-names = "default"; 66 + 67 + led-1 { 68 + function = LED_FUNCTION_DISK_ERR; 69 + color = <LED_COLOR_ID_RED>; 70 + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; 71 + }; 72 + 73 + led-2 { 74 + function = LED_FUNCTION_USB; 75 + color = <LED_COLOR_ID_GREEN>; 76 + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; 77 + linux,default-trigger = "usb-host"; 78 + }; 79 + 80 + led-3 { 81 + function = LED_FUNCTION_DISK; 82 + color = <LED_COLOR_ID_GREEN>; 83 + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; 84 + linux,default-trigger = "ata1"; 85 + }; 86 + 87 + led-4 { 88 + function = LED_FUNCTION_INDICATOR; 89 + color = <LED_COLOR_ID_GREEN>; 90 + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; 91 + }; 92 + 93 + led-5 { 94 + function = LED_FUNCTION_INDICATOR; 95 + color = <LED_COLOR_ID_RED>; 96 + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; 97 + }; 98 + 99 + led-6 { 100 + function = LED_FUNCTION_STATUS; 101 + color = <LED_COLOR_ID_GREEN>; 102 + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; 103 + linux,default-trigger = "default-on"; 104 + }; 105 + 106 + led-7 { 107 + function = LED_FUNCTION_STATUS; 108 + color = <LED_COLOR_ID_RED>; 109 + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; 110 + }; 111 + }; 112 + 113 + usb0_power: regulator@1 { 114 + compatible = "regulator-fixed"; 115 + regulator-name = "USB Power"; 116 + 117 + regulator-min-microvolt = <5000000>; 118 + regulator-max-microvolt = <5000000>; 119 + regulator-always-on; 120 + regulator-boot-on; 121 + gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>; 122 + }; 123 + 124 + sata1_power: regulator@2 { 125 + compatible = "regulator-fixed"; 126 + regulator-name = "SATA1 Power"; 127 + 128 + regulator-min-microvolt = <5000000>; 129 + regulator-max-microvolt = <5000000>; 130 + regulator-always-on; 131 + regulator-boot-on; 132 + gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>; 133 + }; 134 + 135 + thermal-zones { 136 + disk-thermal { 137 + polling-delay = <20000>; 138 + polling-delay-passive = <2000>; 139 + 140 + thermal-sensors = <&hdd_temp>; 141 + 142 + trips { 143 + disk_alert: disk-alert { 144 + temperature = <40000>; 145 + hysteresis = <5000>; 146 + type = "active"; 147 + }; 148 + disk_crit: disk-crit { 149 + temperature = <60000>; 150 + hysteresis = <2000>; 151 + type = "critical"; 152 + }; 153 + }; 154 + }; 155 + }; 156 + }; 157 + 158 + 159 + &eth0 { 160 + status = "okay"; 161 + 162 + ethernet0-port@0 { 163 + phy-handle = <&ethphy0>; 164 + }; 165 + }; 166 + 167 + &i2c0 { 168 + status = "okay"; 169 + 170 + rtc@68 { 171 + compatible = "htk,ht1382"; 172 + reg = <0x68>; 173 + }; 174 + }; 175 + 176 + &mdio { 177 + status = "okay"; 178 + 179 + ethphy0: ethernet-phy@1 { 180 + reg = <1>; 181 + phy-mode = "rgmii-id"; 182 + marvell,reg-init = <0x1 0x16 0x0 0x3>, 183 + <0x1 0x10 0x0 0x1017>, 184 + <0x1 0x11 0x0 0x4408>, 185 + <0x1 0x16 0x0 0x0>; 186 + }; 187 + }; 188 + 189 + &nand { 190 + status = "okay"; 191 + chip-delay = <35>; 192 + 193 + partition@0 { 194 + label = "uboot"; 195 + reg = <0x0000000 0x00c0000>; 196 + read-only; 197 + }; 198 + partition@c0000 { 199 + label = "uboot_env"; 200 + reg = <0x00c0000 0x0080000>; 201 + }; 202 + partition@140000 { 203 + label = "ubi"; 204 + reg = <0x0140000 0x7ec0000>; 205 + }; 206 + }; 207 + 208 + &pciec { 209 + status = "okay"; 210 + }; 211 + 212 + &pcie0 { 213 + status = "okay"; 214 + }; 215 + 216 + &pinctrl { 217 + pinctrl-names = "default"; 218 + 219 + pmx_buttons: pmx-buttons { 220 + marvell,pins = "mpp24", "mpp25", "mpp26"; 221 + marvell,function = "gpio"; 222 + }; 223 + 224 + pmx_leds: pmx-leds { 225 + marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23", 226 + "mpp28", "mpp29"; 227 + marvell,function = "gpio"; 228 + }; 229 + 230 + pmx_power: pmx-power { 231 + marvell,pins = "mpp21", "mpp33"; 232 + marvell,function = "gpio"; 233 + }; 234 + 235 + pmx_pwr_off: pmx-pwr-off { 236 + marvell,pins = "mpp27"; 237 + marvell,function = "gpio"; 238 + }; 239 + }; 240 + 241 + &rtc { 242 + status = "disabled"; 243 + }; 244 + 245 + &sata { 246 + status = "okay"; 247 + nr-ports = <1>; 248 + #address-cells = <1>; 249 + #size-cells = <0>; 250 + 251 + hdd_temp: sata-port@0 { 252 + reg = <0>; 253 + #thermal-sensor-cells = <0>; 254 + }; 255 + }; 256 + 257 + &uart0 { 258 + status = "okay"; 259 + };
+9 -19
arch/arm/mach-mvebu/pm-board.c
··· 8 8 */ 9 9 10 10 #include <linux/delay.h> 11 - #include <linux/gpio.h> 11 + #include <linux/err.h> 12 + #include <linux/gpio/consumer.h> 12 13 #include <linux/init.h> 13 14 #include <linux/io.h> 14 15 #include <linux/of.h> 15 16 #include <linux/of_address.h> 16 - #include <linux/of_gpio.h> 17 17 #include <linux/slab.h> 18 18 #include "common.h" 19 19 20 20 #define ARMADA_PIC_NR_GPIOS 3 21 21 22 22 static void __iomem *gpio_ctrl; 23 - static int pic_gpios[ARMADA_PIC_NR_GPIOS]; 23 + static struct gpio_desc *pic_gpios[ARMADA_PIC_NR_GPIOS]; 24 24 static int pic_raw_gpios[ARMADA_PIC_NR_GPIOS]; 25 25 26 26 static void mvebu_armada_pm_enter(void __iomem *sdram_reg, u32 srcmd) ··· 90 90 char *name; 91 91 struct of_phandle_args args; 92 92 93 - pic_gpios[i] = of_get_named_gpio(np, "ctrl-gpios", i); 94 - if (pic_gpios[i] < 0) { 95 - ret = -ENODEV; 96 - goto out; 97 - } 98 - 99 93 name = kasprintf(GFP_KERNEL, "pic-pin%d", i); 100 94 if (!name) { 101 95 ret = -ENOMEM; 102 96 goto out; 103 97 } 104 98 105 - ret = gpio_request(pic_gpios[i], name); 106 - if (ret < 0) { 107 - kfree(name); 108 - goto out; 109 - } 110 - 111 - ret = gpio_direction_output(pic_gpios[i], 0); 112 - if (ret < 0) { 113 - gpio_free(pic_gpios[i]); 99 + pic_gpios[i] = fwnode_gpiod_get_index(of_fwnode_handle(np), 100 + "ctrl", i, GPIOD_OUT_HIGH, 101 + name); 102 + ret = PTR_ERR_OR_ZERO(pic_gpios[i]); 103 + if (ret) { 114 104 kfree(name); 115 105 goto out; 116 106 } ··· 108 118 ret = of_parse_phandle_with_fixed_args(np, "ctrl-gpios", 2, 109 119 i, &args); 110 120 if (ret < 0) { 111 - gpio_free(pic_gpios[i]); 121 + gpiod_put(pic_gpios[i]); 112 122 kfree(name); 113 123 goto out; 114 124 }