public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: FUKAUMI Naoki <naoki@radxa.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	FUKAUMI Naoki <naoki@radxa.com>
Subject: Re: [PATCH 1/2] arm64: dts: rockchip: add LED for ROCK Pi 4A/B/C/A+/B+
Date: Wed, 07 Sep 2022 10:21:43 +0200	[thread overview]
Message-ID: <19268570.jiFIW2sfyF@diego> (raw)
In-Reply-To: <20220907045925.1284785-1-naoki@radxa.com>

Hi,

Am Mittwoch, 7. September 2022, 06:59:24 CEST schrieb FUKAUMI Naoki:
> only user_led2 (blue) is supported.
> 
> user_led1 (green) is not connected to any gpio so it cannot be
> controlled.
> 
> Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
> ---
>  .../boot/dts/rockchip/rk3399-rock-pi-4.dtsi   | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
> index 401e1ae9d944..49126560b30b 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
> @@ -6,6 +6,7 @@
>  
>  /dts-v1/;
>  #include <dt-bindings/input/linux-event-codes.h>
> +#include <dt-bindings/leds/common.h>
>  #include <dt-bindings/pwm/pwm.h>
>  #include "rk3399.dtsi"
>  #include "rk3399-opp.dtsi"
> @@ -27,6 +28,19 @@ clkin_gmac: external-gmac-clock {
>  		#clock-cells = <0>;
>  	};
>  
> +	leds {
> +		compatible = "gpio-leds";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&user_led2>;
> +
> +		user_led2 {

Node names should definitly use "-" not underscores.

Also gpio-leds define a pattern for node names in the yaml binding:
	"(^led-[0-9a-f]$|led)":

So running dtbscheck on those new nodes should have found new
errors with that addition.

See commit e916d85b922f ("arm64: dts: rockchip: rename and label gpio-led subnodes")
where existing already were already converted to be binding compliant.


Heiko


> +			function = LED_FUNCTION_STATUS;
> +			color = <LED_COLOR_ID_BLUE>;
> +			gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "heartbeat";
> +		};
> +	};
> +
>  	sdio_pwrseq: sdio-pwrseq {
>  		compatible = "mmc-pwrseq-simple";
>  		clocks = <&rk808 1>;
> @@ -553,6 +567,12 @@ hp_int: hp-int {
>  		};
>  	};
>  
> +	leds {
> +		user_led2: user-led2 {
> +			rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
> +		};
> +	};
> +
>  	pcie {
>  		pcie_pwr_en: pcie-pwr-en {
>  			rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
> 





_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

      parent reply	other threads:[~2022-09-07  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  4:59 [PATCH 1/2] arm64: dts: rockchip: add LED for ROCK Pi 4A/B/C/A+/B+ FUKAUMI Naoki
2022-09-07  4:59 ` [PATCH 2/2] arm64: dts: rockchip: add LEDs for ROCK 4C+ FUKAUMI Naoki
2022-09-07  8:21 ` Heiko Stübner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19268570.jiFIW2sfyF@diego \
    --to=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=naoki@radxa.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox