Skip to content

Commit

Permalink
ARM: dts: lan966x: add led configuration
Browse files Browse the repository at this point in the history
Add led configuration for pcb8291 and pcb8309. Both pcbs have 4 leds which
are connected to the sgpio controller.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220902062447.443846-1-horatiu.vultur@microchip.com
  • Loading branch information
Horatiu Vultur authored and Claudiu Beznea committed Sep 2, 2022
1 parent e944726 commit 0b7baa1
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions arch/arm/boot/dts/lan966x-pcb8291.dts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@
gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
priority = <200>;
};

leds {
compatible = "gpio-leds";

led-s0-blue {
label = "s0:blue";
gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
default-state = "off";
};

led-s0-green {
label = "s0:green";
gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
default-state = "off";
};

led-s1-blue {
label = "s1:blue";
gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
default-state = "off";
};

led-s1-green {
label = "s1:green";
gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
};

&gpio {
Expand Down
28 changes: 28 additions & 0 deletions arch/arm/boot/dts/lan966x-pcb8309.dts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,34 @@
};
};

leds {
compatible = "gpio-leds";

led-s0-green {
label = "s0:green";
gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
default-state = "off";
};

led-s0-red {
label = "s0:red";
gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
default-state = "off";
};

led-s1-green {
label = "s1:green";
gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
default-state = "off";
};

led-s1-red {
label = "s1:red";
gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};

mux: mux-controller {
compatible = "gpio-mux";
#mux-control-cells = <0>;
Expand Down

0 comments on commit 0b7baa1

Please sign in to comment.