linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 23:05 Vivek Unune
       [not found] ` <20200313230513.123049-1-npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Vivek Unune @ 2020-03-13 23:05 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	heiko-4mtYJXux2i+zQB+pC5nmwQ,
	npcomplete13-Re5JQEeQqe8AvxtiuMwx3w,
	ezequiel-ZGY8ohtN/8qB+jHODAdFcQ, jbx6244-Re5JQEeQqe8AvxtiuMwx3w,
	akash-oRp2ZoJdM/RWk0Htik3J/w
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

 - Add Hugsun X99 IR receiver and power led
 - Remove pwm0 node as it interferes with power LED gpio
   pwm0 is not used in factory firmware as well

Tested with LibreElec linux-next-20200305

Signed-off-by: Vivek Unune <npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Changes in v2:
	- Changed led trigger from none to default-on
	- Changed led node name from power-led to led-0
---
 .../boot/dts/rockchip/rk3399-hugsun-x99.dts   | 37 +++++++++++++++++--
 1 file changed, 33 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts b/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts
index d69a613fb65a..df425e164a2e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts
@@ -29,6 +29,26 @@
 		regulator-max-microvolt = <5000000>;
 	};
 
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_rx>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&power_led_gpio>;
+
+		led-0 {
+			label = "blue:power";
+			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+			linux,default-trigger = "default-on";
+		};
+	};
+
 	vcc_sys: vcc-sys {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc_sys";
@@ -483,6 +503,18 @@
 		};
 	};
 
+	ir {
+		ir_rx: ir-rx {
+			rockchip,pins = <0 RK_PA6 1 &pcfg_pull_none>;
+		};
+	};
+
+	leds {
+		power_led_gpio: power-led-gpio {
+			rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	pmic {
 		pmic_int_l: pmic-int-l {
 			rockchip,pins =
@@ -539,10 +572,6 @@
 	};
 };
 
-&pwm0 {
-	status = "okay";
-};
-
 &pwm2 {
 	status = "okay";
 	pinctrl-0 = <&pwm2_pin_pull_down>;
-- 
2.20.1

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

* Re: [PATCH v2] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
       [not found] ` <20200313230513.123049-1-npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2020-03-17  0:54   ` Heiko Stuebner
  2020-03-17 13:32     ` Vivek Unune
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stuebner @ 2020-03-17  0:54 UTC (permalink / raw)
  To: Vivek Unune
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	ezequiel-ZGY8ohtN/8qB+jHODAdFcQ, jbx6244-Re5JQEeQqe8AvxtiuMwx3w,
	akash-oRp2ZoJdM/RWk0Htik3J/w, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Am Samstag, 14. März 2020, 00:05:13 CET schrieb Vivek Unune:
>  - Add Hugsun X99 IR receiver and power led
>  - Remove pwm0 node as it interferes with power LED gpio
>    pwm0 is not used in factory firmware as well
> 
> Tested with LibreElec linux-next-20200305
> 
> Signed-off-by: Vivek Unune <npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

I've applied this for 5.7, but did split the patch into two.
One for the addition of the IR and a second for led.

Please do similar for future patches.

Thanks
Heiko

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

* Re: [PATCH v2] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
  2020-03-17  0:54   ` Heiko Stuebner
@ 2020-03-17 13:32     ` Vivek Unune
  0 siblings, 0 replies; 3+ messages in thread
From: Vivek Unune @ 2020-03-17 13:32 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	ezequiel-ZGY8ohtN/8qB+jHODAdFcQ, jbx6244-Re5JQEeQqe8AvxtiuMwx3w,
	akash-oRp2ZoJdM/RWk0Htik3J/w, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Tue, Mar 17, 2020 at 01:54:52AM +0100, Heiko Stuebner wrote:
> Am Samstag, 14. März 2020, 00:05:13 CET schrieb Vivek Unune:
> >  - Add Hugsun X99 IR receiver and power led
> >  - Remove pwm0 node as it interferes with power LED gpio
> >    pwm0 is not used in factory firmware as well
> > 
> > Tested with LibreElec linux-next-20200305
> > 
> > Signed-off-by: Vivek Unune <npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> I've applied this for 5.7, but did split the patch into two.
> One for the addition of the IR and a second for led.
> 
> Please do similar for future patches.
> 
> Thanks
> Heiko
> 
> 

Hi Heiko,

Much appriciated. I'll make sure to do that with my future patches

Thanks,

Vivek

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

end of thread, other threads:[~2020-03-17 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13 23:05 [PATCH v2] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led Vivek Unune
     [not found] ` <20200313230513.123049-1-npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-17  0:54   ` Heiko Stuebner
2020-03-17 13:32     ` Vivek Unune

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).