linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM
@ 2022-05-17  7:18 Ulrich Ölmann
  2022-06-11  9:31 ` Shawn Guo
  2022-06-19  1:42 ` Shawn Guo
  0 siblings, 2 replies; 4+ messages in thread
From: Ulrich Ölmann @ 2022-05-17  7:18 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Shawn Guo, Sascha Hauer
  Cc: NXP Linux Team, Fabio Estevam, Pengutronix Kernel Team,
	devicetree, linux-kernel, Oleksij Rempel, Juergen Borleis,
	Michael Grzeschik, Marco Felsch, Lucas Stach,
	Søren Andersen, Sam Ravnborg, Ulrich Ölmann

Skov's i.MX6 based boards come in different flavors which have different panels
attached. For optimal contrast experience each panel type needs an individual
common voltage (VCOM) to drive its TFT backplane. The latter is generated by an
LCD bias supply IC controlled by a pwm as input signal. Introduce a pwm-
regulator to describe this hardware property and parameterize it appropriately
for the different boards.

Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
---
 arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts |  6 ++++++
 arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi              | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts b/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
index 7f1f19b74bfa..a3f247c722b4 100644
--- a/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
+++ b/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
@@ -125,3 +125,9 @@ MX6QDL_PAD_EIM_D23__GPIO3_IO23		0x1b0b0
 		>;
 	};
 };
+
+&reg_tft_vcom {
+	regulator-min-microvolt = <3160000>;
+	regulator-max-microvolt = <3160000>;
+	voltage-table = <3160000 73>;
+};
diff --git a/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi b/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
index 77a91a97e6cf..3def1b621c8e 100644
--- a/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
@@ -149,6 +149,16 @@ reg_can2_stby: regulator-can2-stby {
 		gpio = <&gpio4 11 GPIO_ACTIVE_LOW>;
 	};
 
+	reg_tft_vcom: regulator-tft-vcom {
+		compatible = "pwm-regulator";
+		pwms = <&pwm3 0 20000 0>;
+		regulator-name = "tft_vcom";
+		regulator-min-microvolt = <3600000>;
+		regulator-max-microvolt = <3600000>;
+		regulator-always-on;
+		voltage-table = <3600000 26>;
+	};
+
 	reg_vcc_mmc: regulator-vcc-mmc {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
-- 
2.30.2


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

* Re: [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM
  2022-05-17  7:18 [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM Ulrich Ölmann
@ 2022-06-11  9:31 ` Shawn Guo
  2022-06-14 12:53   ` Ulrich Ölmann
  2022-06-19  1:42 ` Shawn Guo
  1 sibling, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2022-06-11  9:31 UTC (permalink / raw)
  To: Ulrich Ölmann
  Cc: Rob Herring, Krzysztof Kozlowski, Sascha Hauer, NXP Linux Team,
	Fabio Estevam, Pengutronix Kernel Team, devicetree, linux-kernel,
	Oleksij Rempel, Juergen Borleis, Michael Grzeschik, Marco Felsch,
	Lucas Stach, Søren Andersen, Sam Ravnborg

On Tue, May 17, 2022 at 09:18:14AM +0200, Ulrich Ölmann wrote:
> Skov's i.MX6 based boards come in different flavors which have different panels
> attached. For optimal contrast experience each panel type needs an individual
> common voltage (VCOM) to drive its TFT backplane. The latter is generated by an
> LCD bias supply IC controlled by a pwm as input signal. Introduce a pwm-
> regulator to describe this hardware property and parameterize it appropriately
> for the different boards.
> 
> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
> ---
>  arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts |  6 ++++++
>  arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi              | 10 ++++++++++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts b/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
> index 7f1f19b74bfa..a3f247c722b4 100644
> --- a/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
> +++ b/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
> @@ -125,3 +125,9 @@ MX6QDL_PAD_EIM_D23__GPIO3_IO23		0x1b0b0
>  		>;
>  	};
>  };
> +
> +&reg_tft_vcom {
> +	regulator-min-microvolt = <3160000>;
> +	regulator-max-microvolt = <3160000>;
> +	voltage-table = <3160000 73>;
> +};
> diff --git a/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi b/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
> index 77a91a97e6cf..3def1b621c8e 100644
> --- a/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
> @@ -149,6 +149,16 @@ reg_can2_stby: regulator-can2-stby {
>  		gpio = <&gpio4 11 GPIO_ACTIVE_LOW>;
>  	};
>  
> +	reg_tft_vcom: regulator-tft-vcom {
> +		compatible = "pwm-regulator";
> +		pwms = <&pwm3 0 20000 0>;
> +		regulator-name = "tft_vcom";
> +		regulator-min-microvolt = <3600000>;
> +		regulator-max-microvolt = <3600000>;
> +		regulator-always-on;

You want it to be unmanaged and always-on?

Shawn

> +		voltage-table = <3600000 26>;
> +	};
> +
>  	reg_vcc_mmc: regulator-vcc-mmc {
>  		compatible = "regulator-fixed";
>  		pinctrl-names = "default";
> -- 
> 2.30.2
> 

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

* Re: [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM
  2022-06-11  9:31 ` Shawn Guo
@ 2022-06-14 12:53   ` Ulrich Ölmann
  0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Ölmann @ 2022-06-14 12:53 UTC (permalink / raw)
  To: Shawn Guo
  Cc: devicetree, Michael Grzeschik, Krzysztof Kozlowski, Sam Ravnborg,
	Sascha Hauer, Juergen Borleis, linux-kernel, Marco Felsch,
	Oleksij Rempel, Rob Herring, NXP Linux Team, Søren Andersen,
	Fabio Estevam, Lucas Stach, kernel

On Sat, Jun 11 2022 at 17:31 +0800, Shawn Guo <shawnguo@kernel.org> wrote:
> On Tue, May 17, 2022 at 09:18:14AM +0200, Ulrich Ölmann wrote:
>> Skov's i.MX6 based boards come in different flavors which have different panels
>> attached. For optimal contrast experience each panel type needs an individual
>> common voltage (VCOM) to drive its TFT backplane. The latter is generated by an
>> LCD bias supply IC controlled by a pwm as input signal. Introduce a pwm-
>> regulator to describe this hardware property and parameterize it appropriately
>> for the different boards.
>>
>> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
>> ---
>>  arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts |  6 ++++++
>>  arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi              | 10 ++++++++++
>>  2 files changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts b/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
>> index 7f1f19b74bfa..a3f247c722b4 100644
>> --- a/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
>> +++ b/arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dts
>> @@ -125,3 +125,9 @@ MX6QDL_PAD_EIM_D23__GPIO3_IO23		0x1b0b0
>>  		>;
>>  	};
>>  };
>> +
>> +&reg_tft_vcom {
>> +	regulator-min-microvolt = <3160000>;
>> +	regulator-max-microvolt = <3160000>;
>> +	voltage-table = <3160000 73>;
>> +};
>> diff --git a/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi b/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
>> index 77a91a97e6cf..3def1b621c8e 100644
>> --- a/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
>> +++ b/arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi
>> @@ -149,6 +149,16 @@ reg_can2_stby: regulator-can2-stby {
>>  		gpio = <&gpio4 11 GPIO_ACTIVE_LOW>;
>>  	};
>>
>> +	reg_tft_vcom: regulator-tft-vcom {
>> +		compatible = "pwm-regulator";
>> +		pwms = <&pwm3 0 20000 0>;
>> +		regulator-name = "tft_vcom";
>> +		regulator-min-microvolt = <3600000>;
>> +		regulator-max-microvolt = <3600000>;
>> +		regulator-always-on;
>
> You want it to be unmanaged and always-on?

Correct, it shall be set up by the kernel statically and is never going
to be changed while the system is up and running.

Best regards
Ulrich


> Shawn
>
>> +		voltage-table = <3600000 26>;
>> +	};
>> +
>>  	reg_vcc_mmc: regulator-vcc-mmc {
>>  		compatible = "regulator-fixed";
>>  		pinctrl-names = "default";
>> --
>> 2.30.2
>>
-- 
Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM
  2022-05-17  7:18 [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM Ulrich Ölmann
  2022-06-11  9:31 ` Shawn Guo
@ 2022-06-19  1:42 ` Shawn Guo
  1 sibling, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2022-06-19  1:42 UTC (permalink / raw)
  To: Ulrich Ölmann
  Cc: Rob Herring, Krzysztof Kozlowski, Sascha Hauer, NXP Linux Team,
	Fabio Estevam, Pengutronix Kernel Team, devicetree, linux-kernel,
	Oleksij Rempel, Juergen Borleis, Michael Grzeschik, Marco Felsch,
	Lucas Stach, Søren Andersen, Sam Ravnborg

On Tue, May 17, 2022 at 09:18:14AM +0200, Ulrich Ölmann wrote:
> Skov's i.MX6 based boards come in different flavors which have different panels
> attached. For optimal contrast experience each panel type needs an individual
> common voltage (VCOM) to drive its TFT backplane. The latter is generated by an
> LCD bias supply IC controlled by a pwm as input signal. Introduce a pwm-
> regulator to describe this hardware property and parameterize it appropriately
> for the different boards.
> 
> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>

Applied, thanks!

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

end of thread, other threads:[~2022-06-19  1:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  7:18 [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM Ulrich Ölmann
2022-06-11  9:31 ` Shawn Guo
2022-06-14 12:53   ` Ulrich Ölmann
2022-06-19  1:42 ` Shawn Guo

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