All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Weiss <luca@z3ntu.xyz>
To: Maxime Ripard <maxime@cerno.tech>
Cc: linux-arm-kernel@lists.infradead.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: sun50i-pinephone: add led flash
Date: Wed, 29 Jul 2020 18:23:30 +0200	[thread overview]
Message-ID: <3310810.lkFDjMPtvk@g550jk> (raw)
In-Reply-To: <20200729123444.5t5cv47umhwu7jnd@gilmour.lan>

Hi Maxime,

On Mittwoch, 29. Juli 2020 14:34:44 CEST Maxime Ripard wrote:
> Hi!
> 
> On Sat, Jul 25, 2020 at 01:08:12PM +0200, Luca Weiss wrote:
> > All revisions of the PinePhone have an SGM3140 LED flash. The gpios were
> > swapped on v1.0 of the board but this was fixed in later revisions.
> > 
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > 
> >  .../boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts   |  5 +++++
> >  .../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts   |  5 +++++
> >  .../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts   |  5 +++++
> >  .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi      | 11 +++++++++++
> >  4 files changed, 26 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts index
> > 0c42272106afa..b579b03d4e026 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> > @@ -9,3 +9,8 @@ / {
> > 
> >  	model = "Pine64 PinePhone Developer Batch (1.0)";
> >  	compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64";
> >  
> >  };
> > 
> > +
> > +&sgm3140 {
> > +	flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> > +	enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> > +};
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts index
> > 3e99a87e9ce52..8552587aac248 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> > @@ -28,3 +28,8 @@ &backlight {
> > 
> >  	num-interpolated-steps = <50>;
> >  	default-brightness-level = <400>;
> >  
> >  };
> > 
> > +
> > +&sgm3140 {
> > +	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> > +	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> > +};
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts index
> > a9f5b670c9b82..ec77715ba4a2a 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> > @@ -38,3 +38,8 @@ &lis3mdl {
> > 
> >  	interrupt-parent = <&pio>;
> >  	interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
> >  
> >  };
> > 
> > +
> > +&sgm3140 {
> > +	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> > +	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> > +};
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index
> > 25150aba749dc..e0bc1bcc1c1f3 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > @@ -60,6 +60,17 @@ vibrator {
> > 
> >  		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
> >  		vcc-supply = <&reg_dcdc1>;
> >  	
> >  	};
> > 
> > +
> > +	sgm3140: led-controller {
> 
> The nodes should be ordered by node-name here

Will update the patch, forgot about that.

> > +		compatible = "sgmicro,sgm3140";
> > +		vin-supply = <&reg_dcdc1>;
> > +
> > +		sgm3140_flash: led {
> 
> What do you need the label for?

The label will be used for connecting the flash to the rear camera (which 
hasn't been upstreamed yet) using:

    flash-leds = <&sgm3140_flash>;

Hope that clears it up.

> 
> Thanks!
> Maxime

Regards
Luca



WARNING: multiple messages have this Message-ID (diff)
From: Luca Weiss <luca@z3ntu.xyz>
To: Maxime Ripard <maxime@cerno.tech>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh+dt@kernel.org>,
	~postmarketos/upstreaming@lists.sr.ht,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: dts: sun50i-pinephone: add led flash
Date: Wed, 29 Jul 2020 18:23:30 +0200	[thread overview]
Message-ID: <3310810.lkFDjMPtvk@g550jk> (raw)
In-Reply-To: <20200729123444.5t5cv47umhwu7jnd@gilmour.lan>

Hi Maxime,

On Mittwoch, 29. Juli 2020 14:34:44 CEST Maxime Ripard wrote:
> Hi!
> 
> On Sat, Jul 25, 2020 at 01:08:12PM +0200, Luca Weiss wrote:
> > All revisions of the PinePhone have an SGM3140 LED flash. The gpios were
> > swapped on v1.0 of the board but this was fixed in later revisions.
> > 
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > 
> >  .../boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts   |  5 +++++
> >  .../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts   |  5 +++++
> >  .../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts   |  5 +++++
> >  .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi      | 11 +++++++++++
> >  4 files changed, 26 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts index
> > 0c42272106afa..b579b03d4e026 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
> > @@ -9,3 +9,8 @@ / {
> > 
> >  	model = "Pine64 PinePhone Developer Batch (1.0)";
> >  	compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64";
> >  
> >  };
> > 
> > +
> > +&sgm3140 {
> > +	flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> > +	enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> > +};
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts index
> > 3e99a87e9ce52..8552587aac248 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
> > @@ -28,3 +28,8 @@ &backlight {
> > 
> >  	num-interpolated-steps = <50>;
> >  	default-brightness-level = <400>;
> >  
> >  };
> > 
> > +
> > +&sgm3140 {
> > +	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> > +	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> > +};
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts index
> > a9f5b670c9b82..ec77715ba4a2a 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
> > @@ -38,3 +38,8 @@ &lis3mdl {
> > 
> >  	interrupt-parent = <&pio>;
> >  	interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */
> >  
> >  };
> > 
> > +
> > +&sgm3140 {
> > +	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
> > +	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
> > +};
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index
> > 25150aba749dc..e0bc1bcc1c1f3 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> > @@ -60,6 +60,17 @@ vibrator {
> > 
> >  		enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */
> >  		vcc-supply = <&reg_dcdc1>;
> >  	
> >  	};
> > 
> > +
> > +	sgm3140: led-controller {
> 
> The nodes should be ordered by node-name here

Will update the patch, forgot about that.

> > +		compatible = "sgmicro,sgm3140";
> > +		vin-supply = <&reg_dcdc1>;
> > +
> > +		sgm3140_flash: led {
> 
> What do you need the label for?

The label will be used for connecting the flash to the rear camera (which 
hasn't been upstreamed yet) using:

    flash-leds = <&sgm3140_flash>;

Hope that clears it up.

> 
> Thanks!
> Maxime

Regards
Luca



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

  reply	other threads:[~2020-07-29 16:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25 11:08 [PATCH] arm64: dts: sun50i-pinephone: add led flash Luca Weiss
2020-07-25 11:08 ` Luca Weiss
2020-07-29 12:34 ` Maxime Ripard
2020-07-29 12:34   ` Maxime Ripard
2020-07-29 16:23   ` Luca Weiss [this message]
2020-07-29 16:23     ` Luca Weiss

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=3310810.lkFDjMPtvk@g550jk \
    --to=luca@z3ntu.xyz \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 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.