From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DFD6C43334 for ; Tue, 14 Jun 2022 12:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241791AbiFNM4A convert rfc822-to-8bit (ORCPT ); Tue, 14 Jun 2022 08:56:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241187AbiFNMz6 (ORCPT ); Tue, 14 Jun 2022 08:55:58 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED71D3E0F2 for ; Tue, 14 Jun 2022 05:55:57 -0700 (PDT) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o165K-0003Ne-Mz; Tue, 14 Jun 2022 14:55:54 +0200 Received: from uol by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1o165J-009mTq-3B; Tue, 14 Jun 2022 14:55:53 +0200 References: <20220517071814.3626702-1-u.oelmann@pengutronix.de> <20220611093103.GI254723@dragon> User-agent: mu4e 1.6.9; emacs 29.0.50 From: Ulrich =?utf-8?Q?=C3=96lmann?= To: Shawn Guo Cc: devicetree@vger.kernel.org, Michael Grzeschik , Krzysztof Kozlowski , Sam Ravnborg , Sascha Hauer , Juergen Borleis , linux-kernel@vger.kernel.org, Marco Felsch , Oleksij Rempel , Rob Herring , NXP Linux Team , =?utf-8?Q?S=C3=B8ren?= Andersen , Fabio Estevam , Lucas Stach , kernel@pengutronix.de Subject: Re: [PATCH] ARM: dts: imx6: skov: add pwm-regulator to control the panel's VCOM Date: Tue, 14 Jun 2022 14:53:58 +0200 In-reply-to: <20220611093103.GI254723@dragon> Message-ID: <6r8rpzwgiu.fsf@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: u.oelmann@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 11 2022 at 17:31 +0800, Shawn Guo 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 >> --- >> 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 >> >; >> }; >> }; >> + >> +®_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 |