diff mbox series

[v5,5/5] arm64: dts: Add LP5812 LED node for Raspberry Pi 4 Model B

Message ID 20250414145742.35713-6-trannamatk@gmail.com
State New
Headers show
Series leds: add new LED driver for TI LP5812 | expand

Commit Message

Nam Tran April 14, 2025, 2:57 p.m. UTC
Add the LP5812 LED driver node to the Device Tree for Raspberry Pi 4 B.
This enables the LED connected to the LP5812 to be controlled via I2C.

Signed-off-by: Nam Tran <trannamatk@gmail.com>
---
 .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)

Comments

Krzysztof Kozlowski April 14, 2025, 3:10 p.m. UTC | #1
On 14/04/2025 16:57, Nam Tran wrote:
> Add the LP5812 LED driver node to the Device Tree for Raspberry Pi 4 B.
> This enables the LED connected to the LP5812 to be controlled via I2C.
> 
> Signed-off-by: Nam Tran <trannamatk@gmail.com>
> ---
>  .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> index 353bb50ce542..0dec6ce44c6c 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> @@ -152,6 +152,66 @@ &hdmi1 {
>  	status = "okay";
>  };
>  
> +&i2c1 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		led-controller@1b {
> +				compatible = "ti,lp5812";
> +				reg = <0x1b>;

Messed indentation... You already got such comment about your DTS in the
binding. :/


Best regards,
Krzysztof
Nam Tran April 15, 2025, 9:56 a.m. UTC | #2
On Mon, 14 Apr 2025, Krzysztof Kozlowski wrote:

> On 14/04/2025 16:57, Nam Tran wrote:
> > Add the LP5812 LED driver node to the Device Tree for Raspberry Pi 4 B.
> > This enables the LED connected to the LP5812 to be controlled via I2C.
> > 
> > Signed-off-by: Nam Tran <trannamatk@gmail.com>
> > ---
> >  .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 60 +++++++++++++++++++
> >  1 file changed, 60 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> > index 353bb50ce542..0dec6ce44c6c 100644
> > --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> > +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
> > @@ -152,6 +152,66 @@ &hdmi1 {
> >  	status = "okay";
> >  };
> >  
> > +&i2c1 {
> > +		#address-cells = <1>;
> > +		#size-cells = <0>;
> > +
> > +		led-controller@1b {
> > +				compatible = "ti,lp5812";
> > +				reg = <0x1b>;
> 
> Messed indentation... You already got such comment about your DTS in the
> binding. :/

Thank you for pointing it out. I fixed the indentation in the binding file but overlooked it here.
I'll make sure it's corrected in the next version.

Best regards,
Nam Tran
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
index 353bb50ce542..0dec6ce44c6c 100644
--- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
@@ -152,6 +152,66 @@  &hdmi1 {
 	status = "okay";
 };
 
+&i2c1 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led-controller@1b {
+				compatible = "ti,lp5812";
+				reg = <0x1b>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				led@0 {
+					reg = <0x0>;
+					chan-name = "a0";
+				};
+				led@1 {
+					reg = <0x1>;
+					chan-name = "a1";
+				};
+				led@2 {
+					reg = <0x2>;
+					chan-name = "a2";
+				};
+				led@3 {
+					reg = <0x3>;
+					chan-name = "b0";
+				};
+				led@4 {
+					reg = <0x4>;
+					chan-name = "b1";
+				};
+				led@5 {
+					reg = <0x5>;
+					chan-name = "b2";
+				};
+				led@6 {
+					reg = <0x6>;
+					chan-name = "c0";
+				};
+				led@7 {
+					reg = <0x7>;
+					chan-name = "c1";
+				};
+				led@8 {
+					reg = <0x8>;
+					chan-name = "c2";
+				};
+				led@9 {
+					reg = <0x9>;
+					chan-name = "d0";
+				};
+				led@a {
+					reg = <0xa>;
+					chan-name = "d1";
+				};
+				led@b {
+					reg = <0xb>;
+					chan-name = "d2";
+				};
+		};
+};
+
 &led_act {
 	gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
 };