linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: hihope-rzg2-ex-lvds: Add power-supply and enable-gpios to backlight node
@ 2021-11-21 23:58 Lad Prabhakar
  2021-11-23 14:44 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Lad Prabhakar @ 2021-11-21 23:58 UTC (permalink / raw)
  To: Geert Uytterhoeven, Magnus Damm, Rob Herring, linux-renesas-soc
  Cc: devicetree, linux-kernel, Prabhakar, Biju Das, Lad Prabhakar

This patch adds missing power-supply and enable-gpios property to
backlight node. This fixes the warning "pwm-backlight backlight:
backlight supply power not found, using dummy regulator".

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
index 40c5e8d6d841..a4fb8582a36b 100644
--- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
@@ -12,6 +12,17 @@
 
 		brightness-levels = <0 2 8 16 32 64 128 255>;
 		default-brightness-level = <6>;
+		power-supply = <&reg_12v>;
+		enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
+	};
+
+	reg_12v: regulator2 {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-12V";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		regulator-boot-on;
+		regulator-always-on;
 	};
 };
 
-- 
2.17.1


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

* Re: [PATCH] arm64: dts: hihope-rzg2-ex-lvds: Add power-supply and enable-gpios to backlight node
  2021-11-21 23:58 [PATCH] arm64: dts: hihope-rzg2-ex-lvds: Add power-supply and enable-gpios to backlight node Lad Prabhakar
@ 2021-11-23 14:44 ` Geert Uytterhoeven
  2021-11-23 20:18   ` Lad, Prabhakar
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-11-23 14:44 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Magnus Damm, Rob Herring, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, Prabhakar, Biju Das

Hi Prabhakar,

On Mon, Nov 22, 2021 at 12:58 AM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> This patch adds missing power-supply and enable-gpios property to
> backlight node. This fixes the warning "pwm-backlight backlight:
> backlight supply power not found, using dummy regulator".
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Thanks for your patch!

> --- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
> @@ -12,6 +12,17 @@
>
>                 brightness-levels = <0 2 8 16 32 64 128 255>;
>                 default-brightness-level = <6>;
> +               power-supply = <&reg_12v>;
> +               enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;

According to the schematics (up to Rev. 4.00), GP6_07 is not connected?

> +       };
> +
> +       reg_12v: regulator2 {

Using "regulatorN" as a node name is error-prone, and may lead to
accidental clashes. Please use a more appropriate name.

> +               compatible = "regulator-fixed";
> +               regulator-name = "fixed-12V";
> +               regulator-min-microvolt = <12000000>;
> +               regulator-max-microvolt = <12000000>;

Hmm, the AT1316A is a constant-current source, not a constant-voltage
source? The -02 variant has a 0.2V Low Reference Voltage. Combined
with the 1.1Ω resistor, that should give 181818 microamp.

> +               regulator-boot-on;
> +               regulator-always-on;
>         };
>  };

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] arm64: dts: hihope-rzg2-ex-lvds: Add power-supply and enable-gpios to backlight node
  2021-11-23 14:44 ` Geert Uytterhoeven
@ 2021-11-23 20:18   ` Lad, Prabhakar
  0 siblings, 0 replies; 3+ messages in thread
From: Lad, Prabhakar @ 2021-11-23 20:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Lad Prabhakar, Magnus Damm, Rob Herring, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List, Biju Das

Hi Geert,

Thank you for the review.

On Tue, Nov 23, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Mon, Nov 22, 2021 at 12:58 AM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > This patch adds missing power-supply and enable-gpios property to
> > backlight node. This fixes the warning "pwm-backlight backlight:
> > backlight supply power not found, using dummy regulator".
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Thanks for your patch!
>
> > --- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex-lvds.dtsi
> > @@ -12,6 +12,17 @@
> >
> >                 brightness-levels = <0 2 8 16 32 64 128 255>;
> >                 default-brightness-level = <6>;
> > +               power-supply = <&reg_12v>;
> > +               enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
>
> According to the schematics (up to Rev. 4.00), GP6_07 is not connected?
>
Ouch sorry about that. When I noticed a warning with the regulator, I
saw the missing gpio property too and I pulled out the older schematic
with Rev2 which has GP6_07 :(
> > +       };
> > +
> > +       reg_12v: regulator2 {
>
> Using "regulatorN" as a node name is error-prone, and may lead to
> accidental clashes. Please use a more appropriate name.
>
> > +               compatible = "regulator-fixed";
> > +               regulator-name = "fixed-12V";
> > +               regulator-min-microvolt = <12000000>;
> > +               regulator-max-microvolt = <12000000>;
>
> Hmm, the AT1316A is a constant-current source, not a constant-voltage
> source? The -02 variant has a 0.2V Low Reference Voltage. Combined
> with the 1.1Ω resistor, that should give 181818 microamp.
>
Agreed.

Cheers,
Prabhakar

> > +               regulator-boot-on;
> > +               regulator-always-on;
> >         };
> >  };
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

end of thread, other threads:[~2021-11-23 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-21 23:58 [PATCH] arm64: dts: hihope-rzg2-ex-lvds: Add power-supply and enable-gpios to backlight node Lad Prabhakar
2021-11-23 14:44 ` Geert Uytterhoeven
2021-11-23 20:18   ` Lad, Prabhakar

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).