Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: ti: k3-am642-sk: Add DT entry for onboard LEDs
@ 2022-06-29  7:58 Aparna M
  2022-07-06 23:39 ` Nishanth Menon
  0 siblings, 1 reply; 2+ messages in thread
From: Aparna M @ 2022-06-29  7:58 UTC (permalink / raw)
  To: nm, vigneshr, kristo, ada, pavel
  Cc: praneeth, robh+dt, devarsht, s-adivi, linux-arm-kernel,
	devicetree, linux-kernel, linux-leds

AM642 SK has 8 leds connected to tpic2810 onboard. Add support for these
gpio leds.

Signed-off-by: Aparna M <a-m1@ti.com>
---

This patch is dependent on:
https://lore.kernel.org/all/20220223174215.17838-1-a-m1@ti.com/ 

v1 -> v2: Fixed led-controller name and changed led-7 funtion to show
heartbeat functionality. Rebased on top for 5.19-rc4.

 arch/arm64/boot/dts/ti/k3-am642-sk.dts | 69 ++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am642-sk.dts b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
index 59f506cbd275..47476fd068a8 100644
--- a/arch/arm64/boot/dts/ti/k3-am642-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am642-sk.dts
@@ -150,6 +150,67 @@
 		vin-supply = <&com8_ls_en>;
 		gpio = <&main_gpio0 48 GPIO_ACTIVE_HIGH>;
 	};
+
+        led-controller {
+	        compatible = "gpio-leds";
+
+                led-0 {
+                        color = <LED_COLOR_ID_GREEN>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <1>;
+                        gpios = <&exp2 0 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-1 {
+                        color = <LED_COLOR_ID_RED>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <2>;
+                        gpios = <&exp2 1 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-2 {
+                        color = <LED_COLOR_ID_GREEN>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <3>;
+                        gpios = <&exp2 2 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-3 {
+                        color = <LED_COLOR_ID_AMBER>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <4>;
+                        gpios = <&exp2 3 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-4 {
+                        color = <LED_COLOR_ID_GREEN>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <5>;
+                        gpios = <&exp2 4 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-5 {
+                        color = <LED_COLOR_ID_RED>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <6>;
+                        gpios = <&exp2 5 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-6 {
+                        color = <LED_COLOR_ID_GREEN>;
+                        function = LED_FUNCTION_INDICATOR;
+                        function-enumerator = <7>;
+                        gpios = <&exp2 6 GPIO_ACTIVE_HIGH>;
+                        default-state = "off";
+                };
+                led-7 {
+                        color = <LED_COLOR_ID_AMBER>;
+                        function = LED_FUNCTION_HEARTBEAT;
+                        function-enumerator = <8>;
+                        linux,default-trigger = "heartbeat";
+                        gpios = <&exp2 7 GPIO_ACTIVE_HIGH>;
+                };
+        };
 };
 
 &main_pmx0 {
@@ -316,6 +377,14 @@
 				  "VPP_LDO_EN", "RPI_PS_3V3_En",
 				  "RPI_PS_5V0_En", "RPI_HAT_DETECT";
 	};
+
+        exp2: gpio@60 {
+                compatible = "ti,tpic2810";
+                reg = <0x60>;
+                gpio-controller;
+                #gpio-cells = <2>;
+                gpio-line-names = "LED1","LED2","LED3","LED4","LED5","LED6","LED7","LED8";
+        };
 };
 
 &main_i2c3 {
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] arm64: dts: ti: k3-am642-sk: Add DT entry for onboard LEDs
  2022-06-29  7:58 [PATCH v2] arm64: dts: ti: k3-am642-sk: Add DT entry for onboard LEDs Aparna M
@ 2022-07-06 23:39 ` Nishanth Menon
  0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2022-07-06 23:39 UTC (permalink / raw)
  To: khasim
  Cc: vigneshr, kristo, ada, pavel, praneeth, robh+dt, devarsht,
	s-adivi, linux-arm-kernel, devicetree, linux-kernel, linux-leds

On 13:28-20220629, Aparna M wrote:
[...]
>  &main_pmx0 {
> @@ -316,6 +377,14 @@
>  				  "VPP_LDO_EN", "RPI_PS_3V3_En",
>  				  "RPI_PS_5V0_En", "RPI_HAT_DETECT";
>  	};
> +
> +        exp2: gpio@60 {
> +                compatible = "ti,tpic2810";
> +                reg = <0x60>;
> +                gpio-controller;
> +                #gpio-cells = <2>;
> +                gpio-line-names = "LED1","LED2","LED3","LED4","LED5","LED6","LED7","LED8";
> +        };

https://lore.kernel.org/all/CACRpkdbj2B90-RE2XKQJ5qEj1hZQA-u=vUu2vpXwNqQLf_kaPg@mail.gmail.com/

I see Rob and Linus has acked it, but it does'nt belong to TI device
tree queue. and I cannot pick up dts node without the compatible in
master branch in rc1, so I have to skip.

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-06 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-29  7:58 [PATCH v2] arm64: dts: ti: k3-am642-sk: Add DT entry for onboard LEDs Aparna M
2022-07-06 23:39 ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox