diff mbox series

arm64: dts: rockchip: give some life to the rk3328-roc-cc leds

Message ID 20190301225813.19834-1-papadakospan@gmail.com (mailing list archive)
State New, archived
Headers show
Series arm64: dts: rockchip: give some life to the rk3328-roc-cc leds | expand

Commit Message

Leonidas P. Papadakos March 1, 2019, 10:58 p.m. UTC
Assign the LED's to heartbeat and sdcard io, as in other RK boards.

https://github.com/armbian/build/commit/f1affad5c7be62d6e93832af3556c7609edd0858

Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
---
 .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Heiko Stuebner March 2, 2019, 12:31 a.m. UTC | #1
Am Freitag, 1. März 2019, 23:58:13 CET schrieb Leonidas P. Papadakos:
> Assign the LED's to heartbeat and sdcard io, as in other RK boards.
> 
> https://github.com/armbian/build/commit/f1affad5c7be62d6e93832af3556c7609edd0858
> 
> Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
> ---
>  .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> index 33c44e857..a881d4c8d 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> @@ -81,6 +81,33 @@
>  		regulator-always-on;
>  		regulator-boot-on;
>  	};
> +
> +	leds {
> +		compatible = "gpio-leds";
> +		power {
> +			label = "firefly:blue:power";
> +			linux,default-trigger = "heartbeat";
> +			gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
> +			default-state = "on";
> +			mode = <0x23>;
> +		};
> +
> +		user {
> +			label = "firefly:yellow:user";
> +			linux,default-trigger = "mmc1";
> +			gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
> +			default-state = "off";
> +			mode = <0x05>;
> +		};
> +
> +		ir {
> +			status = "disabled";

please explain that. Is this an IR transmitting LED? And why are you
adding a disabled property?

Similar to how the kernel should not contain commented out code
having a disabled node in the actual board file is strange.


Heiko

> +			/* gpios = <&gpio2 GPIO_C2 GPIO_ACTIVE_HIGH>; */
> +			linux,default-trigger = "ir";
> +			default-state = "off";
> +			mode = <0x00>;
> +		};
> +	};
>  };
>  
>  &cpu0 {
>
Leonidas P. Papadakos March 2, 2019, 2:51 a.m. UTC | #2
On Sat, Mar 02, 2019 at 01:31:11AM +0100, Heiko Stuebner wrote:
> Am Freitag, 1. März 2019, 23:58:13 CET schrieb Leonidas P. Papadakos:
> > Assign the LED's to heartbeat and sdcard io, as in other RK boards.
> > 
> > https://github.com/armbian/build/commit/f1affad5c7be62d6e93832af3556c7609edd0858
> > 
> > Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
> > ---
> >  .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 27 +++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> > index 33c44e857..a881d4c8d 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> > @@ -81,6 +81,33 @@
> >  		regulator-always-on;
> >  		regulator-boot-on;
> >  	};
> > +
> > +	leds {
> > +		compatible = "gpio-leds";
> > +		power {
> > +			label = "firefly:blue:power";
> > +			linux,default-trigger = "heartbeat";
> > +			gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
> > +			default-state = "on";
> > +			mode = <0x23>;
> > +		};
> > +
> > +		user {
> > +			label = "firefly:yellow:user";
> > +			linux,default-trigger = "mmc1";
> > +			gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
> > +			default-state = "off";
> > +			mode = <0x05>;
> > +		};
> > +
> > +		ir {
> > +			status = "disabled";
> 
> please explain that. Is this an IR transmitting LED? And why are you
> adding a disabled property?
> 
> Similar to how the kernel should not contain commented out code
> having a disabled node in the actual board file is strange.
> 
> 
> Heiko
> 

It probably is. See the image of the board on this site:
https://shop.t-firefly.com/goods.php?id=65

Should I make a PATCH v2 without it?

> > +			/* gpios = <&gpio2 GPIO_C2 GPIO_ACTIVE_HIGH>; */
> > +			linux,default-trigger = "ir";
> > +			default-state = "off";
> > +			mode = <0x00>;
> > +		};
> > +	};
> >  };
> >  
> >  &cpu0 {
> > 
> 
> 
> 
>
Heiko Stuebner March 2, 2019, 10:54 a.m. UTC | #3
Am Samstag, 2. März 2019, 03:51:07 CET schrieb Leonidas P. Papadakos:
> On Sat, Mar 02, 2019 at 01:31:11AM +0100, Heiko Stuebner wrote:
> > Am Freitag, 1. März 2019, 23:58:13 CET schrieb Leonidas P. Papadakos:
> > > Assign the LED's to heartbeat and sdcard io, as in other RK boards.
> > > 
> > > https://github.com/armbian/build/commit/f1affad5c7be62d6e93832af3556c7609edd0858
> > > 
> > > Signed-off-by: Leonidas P. Papadakos <papadakospan@gmail.com>
> > > ---
> > >  .../arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 27 +++++++++++++++++++
> > >  1 file changed, 27 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> > > index 33c44e857..a881d4c8d 100644
> > > --- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
> > > @@ -81,6 +81,33 @@
> > >  		regulator-always-on;
> > >  		regulator-boot-on;
> > >  	};
> > > +
> > > +	leds {
> > > +		compatible = "gpio-leds";
> > > +		power {
> > > +			label = "firefly:blue:power";
> > > +			linux,default-trigger = "heartbeat";
> > > +			gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
> > > +			default-state = "on";
> > > +			mode = <0x23>;
> > > +		};
> > > +
> > > +		user {
> > > +			label = "firefly:yellow:user";
> > > +			linux,default-trigger = "mmc1";
> > > +			gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
> > > +			default-state = "off";
> > > +			mode = <0x05>;
> > > +		};
> > > +
> > > +		ir {
> > > +			status = "disabled";
> > 
> > please explain that. Is this an IR transmitting LED? And why are you
> > adding a disabled property?
> > 
> > Similar to how the kernel should not contain commented out code
> > having a disabled node in the actual board file is strange.
> > 
> > 
> > Heiko
> > 
> 
> It probably is. See the image of the board on this site:
> https://shop.t-firefly.com/goods.php?id=65
> 
> Should I make a PATCH v2 without it?

yes, that would be nice, as we don't want to add dead nodes
to actual board devicetrees.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
index 33c44e857..a881d4c8d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
@@ -81,6 +81,33 @@ 
 		regulator-always-on;
 		regulator-boot-on;
 	};
+
+	leds {
+		compatible = "gpio-leds";
+		power {
+			label = "firefly:blue:power";
+			linux,default-trigger = "heartbeat";
+			gpios = <&rk805 1 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			mode = <0x23>;
+		};
+
+		user {
+			label = "firefly:yellow:user";
+			linux,default-trigger = "mmc1";
+			gpios = <&rk805 0 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+			mode = <0x05>;
+		};
+
+		ir {
+			status = "disabled";
+			/* gpios = <&gpio2 GPIO_C2 GPIO_ACTIVE_HIGH>; */
+			linux,default-trigger = "ir";
+			default-state = "off";
+			mode = <0x00>;
+		};
+	};
 };
 
 &cpu0 {