diff mbox series

[8/9] arm: dts: imx8mm_evk: add pwm1/backlight support

Message ID 20220316090013.8150-9-tommaso.merciai@amarulasolutions.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series imx8mm: add pwm-imx backlight support | expand

Commit Message

Tommaso Merciai March 16, 2022, 9 a.m. UTC
Add pwm1/backlight support nodes for imx8mm_evk board

Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
---
 arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Michael Walle March 16, 2022, 10:30 a.m. UTC | #1
> Add pwm1/backlight support nodes for imx8mm_evk board
> 
> Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> ---
>  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
> index 60179e006d..e7a2bd8a64 100644
> --- a/arch/arm/dts/imx8mm-evk.dtsi
> +++ b/arch/arm/dts/imx8mm-evk.dtsi
> @@ -41,6 +41,15 @@
>  		enable-active-high;
>  	};
>  
> +	backlight: backlight {
> +		status = "disabled";
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm1 0 5000000>;
> +		brightness-levels = <0 255>;
> +		num-interpolated-steps = <255>;
> +		default-brightness-level = <250>;
> +	};
> +
>  	ir-receiver {
>  		compatible = "gpio-ir-receiver";
>  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> @@ -350,6 +359,12 @@
>  	status = "okay";
>  };
>  
> +&pwm1 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_backlight>;
> +	status = "disabled";
> +};
> +
>  &iomuxc {
>  	pinctrl_fec1: fec1grp {
>  		fsl,pins = <
> @@ -491,4 +506,10 @@
>  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
>  		>;
>  	};
> +
> +	pinctrl_backlight: backlightgrp {
> +		fsl,pins = <
> +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
> +		>;
> +	};

Will this also be submitted to upstream linux? Otherwise, the device
trees will diverge.

-michael
Tommaso Merciai March 16, 2022, 11:36 a.m. UTC | #2
On Wed, Mar 16, 2022 at 11:30:19AM +0100, Michael Walle wrote:
> > Add pwm1/backlight support nodes for imx8mm_evk board
> > 
> > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> > ---
> >  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> > 
> > diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
> > index 60179e006d..e7a2bd8a64 100644
> > --- a/arch/arm/dts/imx8mm-evk.dtsi
> > +++ b/arch/arm/dts/imx8mm-evk.dtsi
> > @@ -41,6 +41,15 @@
> >  		enable-active-high;
> >  	};
> >  
> > +	backlight: backlight {
> > +		status = "disabled";
> > +		compatible = "pwm-backlight";
> > +		pwms = <&pwm1 0 5000000>;
> > +		brightness-levels = <0 255>;
> > +		num-interpolated-steps = <255>;
> > +		default-brightness-level = <250>;
> > +	};
> > +
> >  	ir-receiver {
> >  		compatible = "gpio-ir-receiver";
> >  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> > @@ -350,6 +359,12 @@
> >  	status = "okay";
> >  };
> >  
> > +&pwm1 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&pinctrl_backlight>;
> > +	status = "disabled";
> > +};
> > +
> >  &iomuxc {
> >  	pinctrl_fec1: fec1grp {
> >  		fsl,pins = <
> > @@ -491,4 +506,10 @@
> >  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
> >  		>;
> >  	};
> > +
> > +	pinctrl_backlight: backlightgrp {
> > +		fsl,pins = <
> > +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
> > +		>;
> > +	};
> 
> Will this also be submitted to upstream linux? Otherwise, the device
> trees will diverge.
> 
> -michael

Hi Michael,
Thanks for review, I'll check and update in v2.

Tommaso
Tommaso Merciai March 16, 2022, 11:42 a.m. UTC | #3
On Wed, Mar 16, 2022 at 11:30:19AM +0100, Michael Walle wrote:
> > Add pwm1/backlight support nodes for imx8mm_evk board
> > 
> > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> > ---
> >  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> > 
> > diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
> > index 60179e006d..e7a2bd8a64 100644
> > --- a/arch/arm/dts/imx8mm-evk.dtsi
> > +++ b/arch/arm/dts/imx8mm-evk.dtsi
> > @@ -41,6 +41,15 @@
> >  		enable-active-high;
> >  	};
> >  
> > +	backlight: backlight {
> > +		status = "disabled";
> > +		compatible = "pwm-backlight";
> > +		pwms = <&pwm1 0 5000000>;
> > +		brightness-levels = <0 255>;
> > +		num-interpolated-steps = <255>;
> > +		default-brightness-level = <250>;
> > +	};
> > +
> >  	ir-receiver {
> >  		compatible = "gpio-ir-receiver";
> >  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> > @@ -350,6 +359,12 @@
> >  	status = "okay";
> >  };
> >  
> > +&pwm1 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&pinctrl_backlight>;
> > +	status = "disabled";
> > +};
> > +
> >  &iomuxc {
> >  	pinctrl_fec1: fec1grp {
> >  		fsl,pins = <
> > @@ -491,4 +506,10 @@
> >  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
> >  		>;
> >  	};
> > +
> > +	pinctrl_backlight: backlightgrp {
> > +		fsl,pins = <
> > +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
> > +		>;
> > +	};
> 
> Will this also be submitted to upstream linux? Otherwise, the device
> trees will diverge.
> 
> -michael

Hi,
At the moment on upstream linux, backlight on pwm1 is not handle. This
will also be submitted on upstream Linux once will merged on U-Boot.

Regards,
Tommaso
Michael Walle March 16, 2022, 11:45 a.m. UTC | #4
Am 2022-03-16 12:42, schrieb Tommaso Merciai:
> On Wed, Mar 16, 2022 at 11:30:19AM +0100, Michael Walle wrote:
>> > Add pwm1/backlight support nodes for imx8mm_evk board
>> >
>> > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
>> > ---
>> >  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
>> >  1 file changed, 21 insertions(+)
>> >
>> > diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
>> > index 60179e006d..e7a2bd8a64 100644
>> > --- a/arch/arm/dts/imx8mm-evk.dtsi
>> > +++ b/arch/arm/dts/imx8mm-evk.dtsi
>> > @@ -41,6 +41,15 @@
>> >  		enable-active-high;
>> >  	};
>> >
>> > +	backlight: backlight {
>> > +		status = "disabled";
>> > +		compatible = "pwm-backlight";
>> > +		pwms = <&pwm1 0 5000000>;
>> > +		brightness-levels = <0 255>;
>> > +		num-interpolated-steps = <255>;
>> > +		default-brightness-level = <250>;
>> > +	};
>> > +
>> >  	ir-receiver {
>> >  		compatible = "gpio-ir-receiver";
>> >  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
>> > @@ -350,6 +359,12 @@
>> >  	status = "okay";
>> >  };
>> >
>> > +&pwm1 {
>> > +	pinctrl-names = "default";
>> > +	pinctrl-0 = <&pinctrl_backlight>;
>> > +	status = "disabled";
>> > +};
>> > +
>> >  &iomuxc {
>> >  	pinctrl_fec1: fec1grp {
>> >  		fsl,pins = <
>> > @@ -491,4 +506,10 @@
>> >  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
>> >  		>;
>> >  	};
>> > +
>> > +	pinctrl_backlight: backlightgrp {
>> > +		fsl,pins = <
>> > +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
>> > +		>;
>> > +	};
>> 
>> Will this also be submitted to upstream linux? Otherwise, the device
>> trees will diverge.
>> 
>> -michael
> 
> Hi,
> At the moment on upstream linux, backlight on pwm1 is not handle. This
> will also be submitted on upstream Linux once will merged on U-Boot.

Actually, it should be the other way around, because the device trees
should be synced with linux once in a while. So while I don't oppose
to do it this way, your changes might eventually be overwritten if
this won't be merged with linux.

-michael
Tommaso Merciai March 16, 2022, 11:51 a.m. UTC | #5
On Wed, Mar 16, 2022 at 12:45:22PM +0100, Michael Walle wrote:
> Am 2022-03-16 12:42, schrieb Tommaso Merciai:
> > On Wed, Mar 16, 2022 at 11:30:19AM +0100, Michael Walle wrote:
> > > > Add pwm1/backlight support nodes for imx8mm_evk board
> > > >
> > > > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> > > > ---
> > > >  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
> > > >  1 file changed, 21 insertions(+)
> > > >
> > > > diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
> > > > index 60179e006d..e7a2bd8a64 100644
> > > > --- a/arch/arm/dts/imx8mm-evk.dtsi
> > > > +++ b/arch/arm/dts/imx8mm-evk.dtsi
> > > > @@ -41,6 +41,15 @@
> > > >  		enable-active-high;
> > > >  	};
> > > >
> > > > +	backlight: backlight {
> > > > +		status = "disabled";
> > > > +		compatible = "pwm-backlight";
> > > > +		pwms = <&pwm1 0 5000000>;
> > > > +		brightness-levels = <0 255>;
> > > > +		num-interpolated-steps = <255>;
> > > > +		default-brightness-level = <250>;
> > > > +	};
> > > > +
> > > >  	ir-receiver {
> > > >  		compatible = "gpio-ir-receiver";
> > > >  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> > > > @@ -350,6 +359,12 @@
> > > >  	status = "okay";
> > > >  };
> > > >
> > > > +&pwm1 {
> > > > +	pinctrl-names = "default";
> > > > +	pinctrl-0 = <&pinctrl_backlight>;
> > > > +	status = "disabled";
> > > > +};
> > > > +
> > > >  &iomuxc {
> > > >  	pinctrl_fec1: fec1grp {
> > > >  		fsl,pins = <
> > > > @@ -491,4 +506,10 @@
> > > >  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
> > > >  		>;
> > > >  	};
> > > > +
> > > > +	pinctrl_backlight: backlightgrp {
> > > > +		fsl,pins = <
> > > > +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
> > > > +		>;
> > > > +	};
> > > 
> > > Will this also be submitted to upstream linux? Otherwise, the device
> > > trees will diverge.
> > > 
> > > -michael
> > 
> > Hi,
> > At the moment on upstream linux, backlight on pwm1 is not handle. This
> > will also be submitted on upstream Linux once will merged on U-Boot.
> 
> Actually, it should be the other way around, because the device trees
> should be synced with linux once in a while. So while I don't oppose
> to do it this way, your changes might eventually be overwritten if
> this won't be merged with linux.
> 
> -michael

Hi Michael,
Then you suggest to submit to the Kernel also?

Thanks,
Tommaso
Michael Walle March 16, 2022, 11:54 a.m. UTC | #6
Am 2022-03-16 12:51, schrieb Tommaso Merciai:
> On Wed, Mar 16, 2022 at 12:45:22PM +0100, Michael Walle wrote:
>> Am 2022-03-16 12:42, schrieb Tommaso Merciai:
>> > On Wed, Mar 16, 2022 at 11:30:19AM +0100, Michael Walle wrote:
>> > > > Add pwm1/backlight support nodes for imx8mm_evk board
>> > > >
>> > > > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
>> > > > ---
>> > > >  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
>> > > >  1 file changed, 21 insertions(+)
>> > > >
>> > > > diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
>> > > > index 60179e006d..e7a2bd8a64 100644
>> > > > --- a/arch/arm/dts/imx8mm-evk.dtsi
>> > > > +++ b/arch/arm/dts/imx8mm-evk.dtsi
>> > > > @@ -41,6 +41,15 @@
>> > > >  		enable-active-high;
>> > > >  	};
>> > > >
>> > > > +	backlight: backlight {
>> > > > +		status = "disabled";
>> > > > +		compatible = "pwm-backlight";
>> > > > +		pwms = <&pwm1 0 5000000>;
>> > > > +		brightness-levels = <0 255>;
>> > > > +		num-interpolated-steps = <255>;
>> > > > +		default-brightness-level = <250>;
>> > > > +	};
>> > > > +
>> > > >  	ir-receiver {
>> > > >  		compatible = "gpio-ir-receiver";
>> > > >  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
>> > > > @@ -350,6 +359,12 @@
>> > > >  	status = "okay";
>> > > >  };
>> > > >
>> > > > +&pwm1 {
>> > > > +	pinctrl-names = "default";
>> > > > +	pinctrl-0 = <&pinctrl_backlight>;
>> > > > +	status = "disabled";
>> > > > +};
>> > > > +
>> > > >  &iomuxc {
>> > > >  	pinctrl_fec1: fec1grp {
>> > > >  		fsl,pins = <
>> > > > @@ -491,4 +506,10 @@
>> > > >  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
>> > > >  		>;
>> > > >  	};
>> > > > +
>> > > > +	pinctrl_backlight: backlightgrp {
>> > > > +		fsl,pins = <
>> > > > +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
>> > > > +		>;
>> > > > +	};
>> > >
>> > > Will this also be submitted to upstream linux? Otherwise, the device
>> > > trees will diverge.
>> > >
>> > > -michael
>> >
>> > Hi,
>> > At the moment on upstream linux, backlight on pwm1 is not handle. This
>> > will also be submitted on upstream Linux once will merged on U-Boot.
>> 
>> Actually, it should be the other way around, because the device trees
>> should be synced with linux once in a while. So while I don't oppose
>> to do it this way, your changes might eventually be overwritten if
>> this won't be merged with linux.
>> 
>> -michael
> 
> Hi Michael,
> Then you suggest to submit to the Kernel also?

The goal should be to have the kernel device trees in sync with
the kernel. So yes, it should also be submitted to the kernel
device tree.

-michael
Tommaso Merciai March 16, 2022, 12:10 p.m. UTC | #7
On Wed, Mar 16, 2022 at 12:54:06PM +0100, Michael Walle wrote:
> Am 2022-03-16 12:51, schrieb Tommaso Merciai:
> > On Wed, Mar 16, 2022 at 12:45:22PM +0100, Michael Walle wrote:
> > > Am 2022-03-16 12:42, schrieb Tommaso Merciai:
> > > > On Wed, Mar 16, 2022 at 11:30:19AM +0100, Michael Walle wrote:
> > > > > > Add pwm1/backlight support nodes for imx8mm_evk board
> > > > > >
> > > > > > Signed-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>
> > > > > > ---
> > > > > >  arch/arm/dts/imx8mm-evk.dtsi | 21 +++++++++++++++++++++
> > > > > >  1 file changed, 21 insertions(+)
> > > > > >
> > > > > > diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
> > > > > > index 60179e006d..e7a2bd8a64 100644
> > > > > > --- a/arch/arm/dts/imx8mm-evk.dtsi
> > > > > > +++ b/arch/arm/dts/imx8mm-evk.dtsi
> > > > > > @@ -41,6 +41,15 @@
> > > > > >  		enable-active-high;
> > > > > >  	};
> > > > > >
> > > > > > +	backlight: backlight {
> > > > > > +		status = "disabled";
> > > > > > +		compatible = "pwm-backlight";
> > > > > > +		pwms = <&pwm1 0 5000000>;
> > > > > > +		brightness-levels = <0 255>;
> > > > > > +		num-interpolated-steps = <255>;
> > > > > > +		default-brightness-level = <250>;
> > > > > > +	};
> > > > > > +
> > > > > >  	ir-receiver {
> > > > > >  		compatible = "gpio-ir-receiver";
> > > > > >  		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
> > > > > > @@ -350,6 +359,12 @@
> > > > > >  	status = "okay";
> > > > > >  };
> > > > > >
> > > > > > +&pwm1 {
> > > > > > +	pinctrl-names = "default";
> > > > > > +	pinctrl-0 = <&pinctrl_backlight>;
> > > > > > +	status = "disabled";
> > > > > > +};
> > > > > > +
> > > > > >  &iomuxc {
> > > > > >  	pinctrl_fec1: fec1grp {
> > > > > >  		fsl,pins = <
> > > > > > @@ -491,4 +506,10 @@
> > > > > >  			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
> > > > > >  		>;
> > > > > >  	};
> > > > > > +
> > > > > > +	pinctrl_backlight: backlightgrp {
> > > > > > +		fsl,pins = <
> > > > > > +			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
> > > > > > +		>;
> > > > > > +	};
> > > > >
> > > > > Will this also be submitted to upstream linux? Otherwise, the device
> > > > > trees will diverge.
> > > > >
> > > > > -michael
> > > >
> > > > Hi,
> > > > At the moment on upstream linux, backlight on pwm1 is not handle. This
> > > > will also be submitted on upstream Linux once will merged on U-Boot.
> > > 
> > > Actually, it should be the other way around, because the device trees
> > > should be synced with linux once in a while. So while I don't oppose
> > > to do it this way, your changes might eventually be overwritten if
> > > this won't be merged with linux.
> > > 
> > > -michael
> > 
> > Hi Michael,
> > Then you suggest to submit to the Kernel also?
> 
> The goal should be to have the kernel device trees in sync with
> the kernel. So yes, it should also be submitted to the kernel
> device tree.
> 
> -michael

Hi Michael,
Thanks for your suggestion, then I will also send this on the Kernel :)

Tommaso
Fabio Estevam March 16, 2022, 11:57 p.m. UTC | #8
On Wed, Mar 16, 2022 at 6:00 AM Tommaso Merciai
<tommaso.merciai@amarulasolutions.com> wrote:
>
> Add pwm1/backlight support nodes for imx8mm_evk board

Why do you enable backlight given that the board does not support splash screen?
diff mbox series

Patch

diff --git a/arch/arm/dts/imx8mm-evk.dtsi b/arch/arm/dts/imx8mm-evk.dtsi
index 60179e006d..e7a2bd8a64 100644
--- a/arch/arm/dts/imx8mm-evk.dtsi
+++ b/arch/arm/dts/imx8mm-evk.dtsi
@@ -41,6 +41,15 @@ 
 		enable-active-high;
 	};
 
+	backlight: backlight {
+		status = "disabled";
+		compatible = "pwm-backlight";
+		pwms = <&pwm1 0 5000000>;
+		brightness-levels = <0 255>;
+		num-interpolated-steps = <255>;
+		default-brightness-level = <250>;
+	};
+
 	ir-receiver {
 		compatible = "gpio-ir-receiver";
 		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
@@ -350,6 +359,12 @@ 
 	status = "okay";
 };
 
+&pwm1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_backlight>;
+	status = "disabled";
+};
+
 &iomuxc {
 	pinctrl_fec1: fec1grp {
 		fsl,pins = <
@@ -491,4 +506,10 @@ 
 			MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B	0x166
 		>;
 	};
+
+	pinctrl_backlight: backlightgrp {
+		fsl,pins = <
+			MX8MM_IOMUXC_GPIO1_IO01_PWM1_OUT	0x06
+		>;
+	};
 };