Skip to content

Commit b04f0d8

Browse files
juhosggclement
authored andcommitted
arm64: dts: marvell: uDPU: define pinctrl state for alarm LEDs
The two alarm LEDs of on the uDPU board are stopped working since commit 78efa53 ("leds: Init leds class earlier"). The LEDs are driven by the GPIO{15,16} pins of the North Bridge GPIO controller. These pins are part of the 'spi_quad' pin group for which the 'spi' function is selected via the default pinctrl state of the 'spi' node. This is wrong however, since in order to allow controlling the LEDs, the pins should use the 'gpio' function. Before the commit mentined above, the 'spi' function is selected first by the pinctrl core before probing the spi driver, but then it gets overridden to 'gpio' implicitly via the devm_gpiod_get_index_optional() call from the 'leds-gpio' driver. After the commit, the LED subsystem gets initialized before the SPI subsystem, so the function of the pin group remains 'spi' which in turn prevents controlling of the LEDs. Despite the change of the initialization order, the root cause is that the pinctrl state definition is wrong since its initial commit 0d45062 ("arm64: dts: marvell: Add device tree for uDPU board"), To fix the problem, override the function in the 'spi_quad_pins' node to 'gpio' and move the pinctrl state definition from the 'spi' node into the 'leds' node. Cc: [email protected] # needs adjustment for < 6.1 Fixes: 0d45062 ("arm64: dts: marvell: Add device tree for uDPU board") Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: Imre Kaloz <[email protected]> Signed-off-by: Gregory CLEMENT <[email protected]>
1 parent 0af2f6b commit b04f0d8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626

2727
leds {
2828
compatible = "gpio-leds";
29+
pinctrl-names = "default";
30+
pinctrl-0 = <&spi_quad_pins>;
2931

3032
led-power1 {
3133
label = "udpu:green:power";
@@ -82,8 +84,6 @@
8284

8385
&spi0 {
8486
status = "okay";
85-
pinctrl-names = "default";
86-
pinctrl-0 = <&spi_quad_pins>;
8787

8888
flash@0 {
8989
compatible = "jedec,spi-nor";
@@ -108,6 +108,10 @@
108108
};
109109
};
110110

111+
&spi_quad_pins {
112+
function = "gpio";
113+
};
114+
111115
&pinctrl_nb {
112116
i2c2_recovery_pins: i2c2-recovery-pins {
113117
groups = "i2c2";

0 commit comments

Comments
 (0)