All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13  0:01 ` Vivek Unune
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13  0:01 UTC (permalink / raw)
  To: robh+dt, mark.rutland, heiko, ezequiel, jbx6244, akash
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel, Vivek Unune

 - Add Hugsun X99 IR receiver and power led
 - Remove pwm0 node as it interferes with pwer LED gpio
   Also, it's not used in factory firmware
   
Tested with Libreelec kernel v5.6

Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
---
 .../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>;
+
+		power-led {
+			label = "blue:power";
+			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+			linux,default-trigger = "none";
+		};
+	};
+
 	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] 13+ messages in thread

* [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13  0:01 ` Vivek Unune
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13  0:01 UTC (permalink / raw)
  To: robh+dt, mark.rutland, heiko, ezequiel, jbx6244, akash
  Cc: devicetree, Vivek Unune, linux-kernel, linux-arm-kernel, linux-rockchip

 - Add Hugsun X99 IR receiver and power led
 - Remove pwm0 node as it interferes with pwer LED gpio
   Also, it's not used in factory firmware
   
Tested with Libreelec kernel v5.6

Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
---
 .../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>;
+
+		power-led {
+			label = "blue:power";
+			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+			linux,default-trigger = "none";
+		};
+	};
+
 	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


_______________________________________________
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] 13+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13  8:32   ` Johan Jonker
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Jonker @ 2020-03-13  8:32 UTC (permalink / raw)
  To: Vivek Unune, robh+dt, mark.rutland, heiko, ezequiel, akash
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel

Hi Vivek,

The 'power-led' need some changes.

From leds-gpio.yaml:

patternProperties:
  # The first form is preferred, but fall back to just 'led' anywhere in the
  # node name to at least catch some child nodes.
  "(^led-[0-9a-f]$|led)":
    type: object

Test with:
make -k ARCH=arm64 dtbs_check

arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

On 3/13/20 1:01 AM, Vivek Unune wrote:
>  - Add Hugsun X99 IR receiver and power led
>  - Remove pwm0 node as it interferes with pwer LED gpio

pwer => power

>    Also, it's not used in factory firmware
>    

> Tested with Libreelec kernel v5.6

Test with linux-next.

git clone -- depth 1
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

> 
> Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
> ---
>  .../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>;
> +
> +		power-led {
> +			label = "blue:power";
> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> +			default-state = "on";
> +			linux,default-trigger = "none";
> +		};
> +	};
> +
>  	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>;
> 


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

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

Hi Vivek,

The 'power-led' need some changes.

From leds-gpio.yaml:

patternProperties:
  # The first form is preferred, but fall back to just 'led' anywhere in the
  # node name to at least catch some child nodes.
  "(^led-[0-9a-f]$|led)":
    type: object

Test with:
make -k ARCH=arm64 dtbs_check

arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

On 3/13/20 1:01 AM, Vivek Unune wrote:
>  - Add Hugsun X99 IR receiver and power led
>  - Remove pwm0 node as it interferes with pwer LED gpio

pwer => power

>    Also, it's not used in factory firmware
>    

> Tested with Libreelec kernel v5.6

Test with linux-next.

git clone -- depth 1
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

> 
> Signed-off-by: Vivek Unune <npcomplete13-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  .../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>;
> +
> +		power-led {
> +			label = "blue:power";
> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> +			default-state = "on";
> +			linux,default-trigger = "none";
> +		};
> +	};
> +
>  	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>;
> 

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

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13  8:32   ` Johan Jonker
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Jonker @ 2020-03-13  8:32 UTC (permalink / raw)
  To: Vivek Unune, robh+dt, mark.rutland, heiko, ezequiel, akash
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-rockchip

Hi Vivek,

The 'power-led' need some changes.

From leds-gpio.yaml:

patternProperties:
  # The first form is preferred, but fall back to just 'led' anywhere in the
  # node name to at least catch some child nodes.
  "(^led-[0-9a-f]$|led)":
    type: object

Test with:
make -k ARCH=arm64 dtbs_check

arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']

On 3/13/20 1:01 AM, Vivek Unune wrote:
>  - Add Hugsun X99 IR receiver and power led
>  - Remove pwm0 node as it interferes with pwer LED gpio

pwer => power

>    Also, it's not used in factory firmware
>    

> Tested with Libreelec kernel v5.6

Test with linux-next.

git clone -- depth 1
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

> 
> Signed-off-by: Vivek Unune <npcomplete13@gmail.com>
> ---
>  .../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>;
> +
> +		power-led {
> +			label = "blue:power";
> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> +			default-state = "on";
> +			linux,default-trigger = "none";
> +		};
> +	};
> +
>  	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>;
> 


_______________________________________________
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] 13+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 14:20     ` Vivek Unune
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13 14:20 UTC (permalink / raw)
  To: Johan Jonker
  Cc: robh+dt, mark.rutland, heiko, ezequiel, akash, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
> Hi Vivek,
> 
> The 'power-led' need some changes.
> 
> From leds-gpio.yaml:
> 
> patternProperties:
>   # The first form is preferred, but fall back to just 'led' anywhere in the
>   # node name to at least catch some child nodes.
>   "(^led-[0-9a-f]$|led)":
>     type: object
> 
> Test with:
> make -k ARCH=arm64 dtbs_check
> 
> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> 
> On 3/13/20 1:01 AM, Vivek Unune wrote:
> >  - Add Hugsun X99 IR receiver and power led
> >  - Remove pwm0 node as it interferes with pwer LED gpio
> 
> pwer => power
> 

Hi Johan,

I'll fix those in my next version. Here's what I intended to to:

1. Rename 'power-led' node to 'led-power'
2. Remove 'linux,default-trigger' entirely since this led is always on

Thanks,

Vivek 

> > 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>;
> >  	};
> >  
> > +	leds {
> > +		compatible = "gpio-leds";
> > +		pinctrl-names = "default";
> > +		pinctrl-0 = <&power_led_gpio>;
> > +
> > +		power-led {
> > +			label = "blue:power";
> > +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> > +			default-state = "on";
> > +			linux,default-trigger = "none";
> > +		};
> > +	};
> > +

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

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 14:20     ` Vivek Unune
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13 14:20 UTC (permalink / raw)
  To: Johan Jonker
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	heiko-4mtYJXux2i+zQB+pC5nmwQ, ezequiel-ZGY8ohtN/8qB+jHODAdFcQ,
	akash-oRp2ZoJdM/RWk0Htik3J/w, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
> Hi Vivek,
> 
> The 'power-led' need some changes.
> 
> From leds-gpio.yaml:
> 
> patternProperties:
>   # The first form is preferred, but fall back to just 'led' anywhere in the
>   # node name to at least catch some child nodes.
>   "(^led-[0-9a-f]$|led)":
>     type: object
> 
> Test with:
> make -k ARCH=arm64 dtbs_check
> 
> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> 
> On 3/13/20 1:01 AM, Vivek Unune wrote:
> >  - Add Hugsun X99 IR receiver and power led
> >  - Remove pwm0 node as it interferes with pwer LED gpio
> 
> pwer => power
> 

Hi Johan,

I'll fix those in my next version. Here's what I intended to to:

1. Rename 'power-led' node to 'led-power'
2. Remove 'linux,default-trigger' entirely since this led is always on

Thanks,

Vivek 

> > 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>;
> >  	};
> >  
> > +	leds {
> > +		compatible = "gpio-leds";
> > +		pinctrl-names = "default";
> > +		pinctrl-0 = <&power_led_gpio>;
> > +
> > +		power-led {
> > +			label = "blue:power";
> > +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> > +			default-state = "on";
> > +			linux,default-trigger = "none";
> > +		};
> > +	};
> > +

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

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 14:20     ` Vivek Unune
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13 14:20 UTC (permalink / raw)
  To: Johan Jonker
  Cc: mark.rutland, devicetree, heiko, linux-kernel, linux-rockchip,
	robh+dt, akash, ezequiel, linux-arm-kernel

On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
> Hi Vivek,
> 
> The 'power-led' need some changes.
> 
> From leds-gpio.yaml:
> 
> patternProperties:
>   # The first form is preferred, but fall back to just 'led' anywhere in the
>   # node name to at least catch some child nodes.
>   "(^led-[0-9a-f]$|led)":
>     type: object
> 
> Test with:
> make -k ARCH=arm64 dtbs_check
> 
> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> 
> On 3/13/20 1:01 AM, Vivek Unune wrote:
> >  - Add Hugsun X99 IR receiver and power led
> >  - Remove pwm0 node as it interferes with pwer LED gpio
> 
> pwer => power
> 

Hi Johan,

I'll fix those in my next version. Here's what I intended to to:

1. Rename 'power-led' node to 'led-power'
2. Remove 'linux,default-trigger' entirely since this led is always on

Thanks,

Vivek 

> > 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>;
> >  	};
> >  
> > +	leds {
> > +		compatible = "gpio-leds";
> > +		pinctrl-names = "default";
> > +		pinctrl-0 = <&power_led_gpio>;
> > +
> > +		power-led {
> > +			label = "blue:power";
> > +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> > +			default-state = "on";
> > +			linux,default-trigger = "none";
> > +		};
> > +	};
> > +

_______________________________________________
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] 13+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
  2020-03-13 14:20     ` Vivek Unune
  (?)
@ 2020-03-13 14:29       ` Johan Jonker
  -1 siblings, 0 replies; 13+ messages in thread
From: Johan Jonker @ 2020-03-13 14:29 UTC (permalink / raw)
  To: Vivek Unune
  Cc: robh+dt, mark.rutland, heiko, ezequiel, akash, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

Hi Vivek,

On 3/13/20 3:20 PM, Vivek Unune wrote:
> On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
>> Hi Vivek,
>>
>> The 'power-led' need some changes.
>>
>> From leds-gpio.yaml:
>>
>> patternProperties:
>>   # The first form is preferred, but fall back to just 'led' anywhere in the
>>   # node name to at least catch some child nodes.
>>   "(^led-[0-9a-f]$|led)":
>>     type: object
>>
>> Test with:
>> make -k ARCH=arm64 dtbs_check
>>
>> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
>> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>>
>> On 3/13/20 1:01 AM, Vivek Unune wrote:
>>>  - Add Hugsun X99 IR receiver and power led
>>>  - Remove pwm0 node as it interferes with pwer LED gpio
>>
>> pwer => power
>>
> 
> Hi Johan,
> 
> I'll fix those in my next version. Here's what I intended to to:
> 

> 1. Rename 'power-led' node to 'led-power'

The first form is preferred.
Put 'led-power' in a regex tester with ^led-[0-9a-f]$
https://regex101.com/
Your regular expression does not match the subject string.

Test 'led-0'
Full match


> 2. Remove 'linux,default-trigger' entirely since this led is always on
> 
> Thanks,
> 
> Vivek 
> 
>>> 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>;
>>>  	};
>>>  
>>> +	leds {
>>> +		compatible = "gpio-leds";
>>> +		pinctrl-names = "default";
>>> +		pinctrl-0 = <&power_led_gpio>;
>>> +
>>> +		power-led {
>>> +			label = "blue:power";
>>> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
>>> +			default-state = "on";
>>> +			linux,default-trigger = "none";
>>> +		};
>>> +	};
>>> +


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

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 14:29       ` Johan Jonker
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Jonker @ 2020-03-13 14:29 UTC (permalink / raw)
  To: Vivek Unune
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
	heiko-4mtYJXux2i+zQB+pC5nmwQ, ezequiel-ZGY8ohtN/8qB+jHODAdFcQ,
	akash-oRp2ZoJdM/RWk0Htik3J/w, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Hi Vivek,

On 3/13/20 3:20 PM, Vivek Unune wrote:
> On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
>> Hi Vivek,
>>
>> The 'power-led' need some changes.
>>
>> From leds-gpio.yaml:
>>
>> patternProperties:
>>   # The first form is preferred, but fall back to just 'led' anywhere in the
>>   # node name to at least catch some child nodes.
>>   "(^led-[0-9a-f]$|led)":
>>     type: object
>>
>> Test with:
>> make -k ARCH=arm64 dtbs_check
>>
>> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
>> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>>
>> On 3/13/20 1:01 AM, Vivek Unune wrote:
>>>  - Add Hugsun X99 IR receiver and power led
>>>  - Remove pwm0 node as it interferes with pwer LED gpio
>>
>> pwer => power
>>
> 
> Hi Johan,
> 
> I'll fix those in my next version. Here's what I intended to to:
> 

> 1. Rename 'power-led' node to 'led-power'

The first form is preferred.
Put 'led-power' in a regex tester with ^led-[0-9a-f]$
https://regex101.com/
Your regular expression does not match the subject string.

Test 'led-0'
Full match


> 2. Remove 'linux,default-trigger' entirely since this led is always on
> 
> Thanks,
> 
> Vivek 
> 
>>> 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>;
>>>  	};
>>>  
>>> +	leds {
>>> +		compatible = "gpio-leds";
>>> +		pinctrl-names = "default";
>>> +		pinctrl-0 = <&power_led_gpio>;
>>> +
>>> +		power-led {
>>> +			label = "blue:power";
>>> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
>>> +			default-state = "on";
>>> +			linux,default-trigger = "none";
>>> +		};
>>> +	};
>>> +

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

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 14:29       ` Johan Jonker
  0 siblings, 0 replies; 13+ messages in thread
From: Johan Jonker @ 2020-03-13 14:29 UTC (permalink / raw)
  To: Vivek Unune
  Cc: mark.rutland, devicetree, heiko, linux-kernel, linux-rockchip,
	robh+dt, akash, ezequiel, linux-arm-kernel

Hi Vivek,

On 3/13/20 3:20 PM, Vivek Unune wrote:
> On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
>> Hi Vivek,
>>
>> The 'power-led' need some changes.
>>
>> From leds-gpio.yaml:
>>
>> patternProperties:
>>   # The first form is preferred, but fall back to just 'led' anywhere in the
>>   # node name to at least catch some child nodes.
>>   "(^led-[0-9a-f]$|led)":
>>     type: object
>>
>> Test with:
>> make -k ARCH=arm64 dtbs_check
>>
>> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
>> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
>> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
>>
>> On 3/13/20 1:01 AM, Vivek Unune wrote:
>>>  - Add Hugsun X99 IR receiver and power led
>>>  - Remove pwm0 node as it interferes with pwer LED gpio
>>
>> pwer => power
>>
> 
> Hi Johan,
> 
> I'll fix those in my next version. Here's what I intended to to:
> 

> 1. Rename 'power-led' node to 'led-power'

The first form is preferred.
Put 'led-power' in a regex tester with ^led-[0-9a-f]$
https://regex101.com/
Your regular expression does not match the subject string.

Test 'led-0'
Full match


> 2. Remove 'linux,default-trigger' entirely since this led is always on
> 
> Thanks,
> 
> Vivek 
> 
>>> 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>;
>>>  	};
>>>  
>>> +	leds {
>>> +		compatible = "gpio-leds";
>>> +		pinctrl-names = "default";
>>> +		pinctrl-0 = <&power_led_gpio>;
>>> +
>>> +		power-led {
>>> +			label = "blue:power";
>>> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
>>> +			default-state = "on";
>>> +			linux,default-trigger = "none";
>>> +		};
>>> +	};
>>> +


_______________________________________________
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] 13+ messages in thread

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
  2020-03-13 14:29       ` Johan Jonker
@ 2020-03-13 14:37         ` Vivek Unune
  -1 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13 14:37 UTC (permalink / raw)
  To: Johan Jonker
  Cc: robh+dt, mark.rutland, heiko, ezequiel, akash, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

On Fri, Mar 13, 2020 at 03:29:59PM +0100, Johan Jonker wrote:
> Hi Vivek,
> 
> On 3/13/20 3:20 PM, Vivek Unune wrote:
> > On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
> >> Hi Vivek,
> >>
> >> The 'power-led' need some changes.
> >>
> >> From leds-gpio.yaml:
> >>
> >> patternProperties:
> >>   # The first form is preferred, but fall back to just 'led' anywhere in the
> >>   # node name to at least catch some child nodes.
> >>   "(^led-[0-9a-f]$|led)":
> >>     type: object
> >>
> >> Test with:
> >> make -k ARCH=arm64 dtbs_check
> >>
> >> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
> >> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
> >> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> >>
> >> On 3/13/20 1:01 AM, Vivek Unune wrote:
> >>>  - Add Hugsun X99 IR receiver and power led
> >>>  - Remove pwm0 node as it interferes with pwer LED gpio
> >>
> >> pwer => power
> >>
> > 
> > Hi Johan,
> > 
> > I'll fix those in my next version. Here's what I intended to to:
> > 
> 
> > 1. Rename 'power-led' node to 'led-power'
> 
> The first form is preferred.
> Put 'led-power' in a regex tester with ^led-[0-9a-f]$
> https://regex101.com/
> Your regular expression does not match the subject string.
> 
> Test 'led-0'
> Full match
> 

Hi Johan,

Thanks for quick reply. 

Indeed led-power won't work. Although I'm trying to figure out the dtbs_check
Currently, make compains that it's missing.
I'll verify this properly without having you to verify it next time.

Thanks,

Vivek


> >>>  		regulator-max-microvolt = <5000000>;
> >>>  	};
> >>>  
> >>> +	leds {
> >>> +		compatible = "gpio-leds";
> >>> +		pinctrl-names = "default";
> >>> +		pinctrl-0 = <&power_led_gpio>;
> >>> +
> >>> +		power-led {
> >>> +			label = "blue:power";
> >>> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> >>> +			default-state = "on";
> >>> +			linux,default-trigger = "none";
> >>> +		};
> >>> +	};
> >>> +
> 

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

* Re: [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led
@ 2020-03-13 14:37         ` Vivek Unune
  0 siblings, 0 replies; 13+ messages in thread
From: Vivek Unune @ 2020-03-13 14:37 UTC (permalink / raw)
  To: Johan Jonker
  Cc: mark.rutland, devicetree, heiko, linux-kernel, linux-rockchip,
	robh+dt, akash, ezequiel, linux-arm-kernel

On Fri, Mar 13, 2020 at 03:29:59PM +0100, Johan Jonker wrote:
> Hi Vivek,
> 
> On 3/13/20 3:20 PM, Vivek Unune wrote:
> > On Fri, Mar 13, 2020 at 09:32:27AM +0100, Johan Jonker wrote:
> >> Hi Vivek,
> >>
> >> The 'power-led' need some changes.
> >>
> >> From leds-gpio.yaml:
> >>
> >> patternProperties:
> >>   # The first form is preferred, but fall back to just 'led' anywhere in the
> >>   # node name to at least catch some child nodes.
> >>   "(^led-[0-9a-f]$|led)":
> >>     type: object
> >>
> >> Test with:
> >> make -k ARCH=arm64 dtbs_check
> >>
> >> arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dt.yaml: leds:
> >> power-led:linux,default-trigger:0: 'none' is not one of ['backlight',
> >> 'default-on', 'heartbeat', 'disk-activity', 'ide-disk', 'timer', 'pattern']
> >>
> >> On 3/13/20 1:01 AM, Vivek Unune wrote:
> >>>  - Add Hugsun X99 IR receiver and power led
> >>>  - Remove pwm0 node as it interferes with pwer LED gpio
> >>
> >> pwer => power
> >>
> > 
> > Hi Johan,
> > 
> > I'll fix those in my next version. Here's what I intended to to:
> > 
> 
> > 1. Rename 'power-led' node to 'led-power'
> 
> The first form is preferred.
> Put 'led-power' in a regex tester with ^led-[0-9a-f]$
> https://regex101.com/
> Your regular expression does not match the subject string.
> 
> Test 'led-0'
> Full match
> 

Hi Johan,

Thanks for quick reply. 

Indeed led-power won't work. Although I'm trying to figure out the dtbs_check
Currently, make compains that it's missing.
I'll verify this properly without having you to verify it next time.

Thanks,

Vivek


> >>>  		regulator-max-microvolt = <5000000>;
> >>>  	};
> >>>  
> >>> +	leds {
> >>> +		compatible = "gpio-leds";
> >>> +		pinctrl-names = "default";
> >>> +		pinctrl-0 = <&power_led_gpio>;
> >>> +
> >>> +		power-led {
> >>> +			label = "blue:power";
> >>> +			gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
> >>> +			default-state = "on";
> >>> +			linux,default-trigger = "none";
> >>> +		};
> >>> +	};
> >>> +
> 

_______________________________________________
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] 13+ messages in thread

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-13  0:01 [PATCH] arm64: dts: rockchip: Add Hugsun X99 IR receiver and power led Vivek Unune
2020-03-13  0:01 ` Vivek Unune
2020-03-13  8:32 ` Johan Jonker
2020-03-13  8:32   ` Johan Jonker
2020-03-13  8:32   ` Johan Jonker
2020-03-13 14:20   ` Vivek Unune
2020-03-13 14:20     ` Vivek Unune
2020-03-13 14:20     ` Vivek Unune
2020-03-13 14:29     ` Johan Jonker
2020-03-13 14:29       ` Johan Jonker
2020-03-13 14:29       ` Johan Jonker
2020-03-13 14:37       ` Vivek Unune
2020-03-13 14:37         ` Vivek Unune

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.