From nobody Sun Jun 28 06:42:00 2026 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 BEE33C433F5 for ; Fri, 11 Feb 2022 13:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350581AbiBKNbV (ORCPT ); Fri, 11 Feb 2022 08:31:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350574AbiBKNbO (ORCPT ); Fri, 11 Feb 2022 08:31:14 -0500 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 A953B21A for ; Fri, 11 Feb 2022 05:31:13 -0800 (PST) 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 1nIW0V-0005ww-IX; Fri, 11 Feb 2022 14:30:39 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nIW0S-009juF-Un; Fri, 11 Feb 2022 14:30:36 +0100 From: Oleksij Rempel To: Mark Rutland , Rob Herring , Sascha Hauer , Shawn Guo , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter Cc: Oleksij Rempel , Robin van der Gracht , devicetree@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , David Jander , dri-devel@lists.freedesktop.org Subject: [PATCH v3 1/5] ARM: dts: imx6dl-prtvt7: Add display and panel nodes Date: Fri, 11 Feb 2022 14:30:31 +0100 Message-Id: <20220211133035.2321330-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220211133035.2321330-1-o.rempel@pengutronix.de> References: <20220211133035.2321330-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@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 Content-Type: text/plain; charset="utf-8" Add Innolux G070Y2-T02 panel to the Protonic VT7 board. Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6dl-prtvt7.dts | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl= -prtvt7.dts index 190d26642bc8..be7c4cb339e7 100644 --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts @@ -28,6 +28,30 @@ backlight_lcd: backlight-lcd { power-supply =3D <®_bl_12v0>; }; =20 + display { + compatible =3D "fsl,imx-parallel-display"; + pinctrl-0 =3D <&pinctrl_ipu1_disp>; + pinctrl-names =3D "default"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + display_in: endpoint { + remote-endpoint =3D <&ipu1_di0_disp0>; + }; + }; + + port@1 { + reg =3D <1>; + + display_out: endpoint { + remote-endpoint =3D <&panel_in>; + }; + }; + }; + keys { compatible =3D "gpio-keys"; autorepeat; @@ -135,6 +159,18 @@ led-debug0 { }; }; =20 + panel { + compatible =3D "innolux,g070y2-t02"; + backlight =3D <&backlight_lcd>; + power-supply =3D <®_3v3>; + + port { + panel_in: endpoint { + remote-endpoint =3D <&display_out>; + }; + }; + }; + reg_bl_12v0: regulator-bl-12v0 { compatible =3D "regulator-fixed"; pinctrl-names =3D "default"; @@ -146,6 +182,13 @@ reg_bl_12v0: regulator-bl-12v0 { enable-active-high; }; =20 + reg_3v3: regulator-3v3 { + compatible =3D "regulator-fixed"; + regulator-name =3D "3v3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + }; + reg_1v8: regulator-1v8 { compatible =3D "regulator-fixed"; regulator-name =3D "1v8"; @@ -275,6 +318,10 @@ &ipu1 { status =3D "okay"; }; =20 +&ipu1_di0_disp0 { + remote-endpoint =3D <&display_in>; +}; + &pwm1 { pinctrl-names =3D "default"; pinctrl-0 =3D <&pinctrl_pwm1>; --=20 2.30.2 From nobody Sun Jun 28 06:42:00 2026 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 25AA9C433FE for ; Fri, 11 Feb 2022 13:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350580AbiBKNbD (ORCPT ); Fri, 11 Feb 2022 08:31:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350572AbiBKNbA (ORCPT ); Fri, 11 Feb 2022 08:31:00 -0500 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 8E50F2BE for ; Fri, 11 Feb 2022 05:30:59 -0800 (PST) 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 1nIW0V-0005wy-IV; Fri, 11 Feb 2022 14:30:39 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nIW0T-009juP-2v; Fri, 11 Feb 2022 14:30:37 +0100 From: Oleksij Rempel To: Mark Rutland , Rob Herring , Sascha Hauer , Shawn Guo , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter Cc: Robin van der Gracht , Oleksij Rempel , devicetree@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , David Jander , dri-devel@lists.freedesktop.org Subject: [PATCH v3 2/5] ARM: dts: imx6dl-prtvt7: Add missing tvp5150 video decoder node Date: Fri, 11 Feb 2022 14:30:32 +0100 Message-Id: <20220211133035.2321330-3-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220211133035.2321330-1-o.rempel@pengutronix.de> References: <20220211133035.2321330-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@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 Content-Type: text/plain; charset="utf-8" From: Robin van der Gracht Add missing tvp5150 video decoder node to make composite video input work. Signed-off-by: Robin van der Gracht Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6dl-prtvt7.dts | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl= -prtvt7.dts index be7c4cb339e7..baaa6ffc4df9 100644 --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts @@ -6,6 +6,7 @@ /dts-v1/; #include "imx6dl.dtsi" #include "imx6qdl-prti6q.dtsi" +#include #include #include #include @@ -171,6 +172,18 @@ panel_in: endpoint { }; }; =20 + connector { + compatible =3D "composite-video-connector"; + label =3D "Composite0"; + sdtv-standards =3D ; + + port { + comp0_out: endpoint { + remote-endpoint =3D <&tvp5150_comp0_in>; + }; + }; + }; + reg_bl_12v0: regulator-bl-12v0 { compatible =3D "regulator-fixed"; pinctrl-names =3D "default"; @@ -295,6 +308,31 @@ sgtl5000: audio-codec@a { VDDIO-supply =3D <®_3v3>; VDDD-supply =3D <®_1v8>; }; + + video@5c { + compatible =3D "ti,tvp5150"; + reg =3D <0x5c>; + + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + + tvp5150_comp0_in: endpoint { + remote-endpoint =3D <&comp0_out>; + }; + }; + + /* Output port 2 is video output pad */ + port@2 { + reg =3D <2>; + + tvp5151_to_ipu1_csi0_mux: endpoint { + remote-endpoint =3D <&ipu1_csi0_mux_from_parallel_sensor>; + }; + }; + }; }; =20 &i2c3 { @@ -322,6 +360,10 @@ &ipu1_di0_disp0 { remote-endpoint =3D <&display_in>; }; =20 +&ipu1_csi0_mux_from_parallel_sensor { + remote-endpoint =3D <&tvp5151_to_ipu1_csi0_mux>; +}; + &pwm1 { pinctrl-names =3D "default"; pinctrl-0 =3D <&pinctrl_pwm1>; --=20 2.30.2 From nobody Sun Jun 28 06:42:00 2026 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 1384FC433FE for ; Fri, 11 Feb 2022 13:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350562AbiBKNa4 (ORCPT ); Fri, 11 Feb 2022 08:30:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344706AbiBKNaz (ORCPT ); Fri, 11 Feb 2022 08:30:55 -0500 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 3BFF61DF for ; Fri, 11 Feb 2022 05:30:54 -0800 (PST) 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 1nIW0V-0005x0-IV; Fri, 11 Feb 2022 14:30:39 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nIW0T-009juX-5m; Fri, 11 Feb 2022 14:30:37 +0100 From: Oleksij Rempel To: Mark Rutland , Rob Herring , Sascha Hauer , Shawn Guo , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter Cc: Oleksij Rempel , devicetree@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , David Jander , Robin van der Gracht , dri-devel@lists.freedesktop.org Subject: [PATCH v3 3/5] ARM: dts: imx6qdl-vicut1: add CAN termination support Date: Fri, 11 Feb 2022 14:30:33 +0100 Message-Id: <20220211133035.2321330-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220211133035.2321330-1-o.rempel@pengutronix.de> References: <20220211133035.2321330-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@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 Content-Type: text/plain; charset="utf-8" The gpio1 0 pin is controlling CAN termination, not USB H1 VBUS. So, remove wrong regulator and assign this gpio to new DT CAN termnation property. Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6qdl-vicut1.dtsi | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-vicut1.dtsi b/arch/arm/boot/dts/imx6= qdl-vicut1.dtsi index b9e305774fed..1ac7e13249d2 100644 --- a/arch/arm/boot/dts/imx6qdl-vicut1.dtsi +++ b/arch/arm/boot/dts/imx6qdl-vicut1.dtsi @@ -126,15 +126,6 @@ reg_3v3: regulator-3v3 { regulator-max-microvolt =3D <3300000>; }; =20 - reg_h1_vbus: regulator-h1-vbus { - compatible =3D "regulator-fixed"; - regulator-name =3D "h1-vbus"; - regulator-min-microvolt =3D <5000000>; - regulator-max-microvolt =3D <5000000>; - gpio =3D <&gpio1 0 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; - reg_otg_vbus: regulator-otg-vbus { compatible =3D "regulator-fixed"; regulator-name =3D "otg-vbus"; @@ -212,6 +203,8 @@ IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(0) &can1 { pinctrl-names =3D "default"; pinctrl-0 =3D <&pinctrl_can1>; + termination-gpios =3D <&gpio1 0 GPIO_ACTIVE_LOW>; + termination-ohms =3D <150>; status =3D "okay"; }; =20 @@ -492,7 +485,6 @@ &uart5 { }; =20 &usbh1 { - vbus-supply =3D <®_h1_vbus>; pinctrl-names =3D "default"; phy_type =3D "utmi"; dr_mode =3D "host"; --=20 2.30.2 From nobody Sun Jun 28 06:42:00 2026 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 4C9C2C433EF for ; Fri, 11 Feb 2022 13:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348285AbiBKNbb (ORCPT ); Fri, 11 Feb 2022 08:31:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350574AbiBKNbY (ORCPT ); Fri, 11 Feb 2022 08:31:24 -0500 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 65F8021A for ; Fri, 11 Feb 2022 05:31:23 -0800 (PST) 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 1nIW0V-0005x1-Ie; Fri, 11 Feb 2022 14:30:39 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nIW0T-009jug-9l; Fri, 11 Feb 2022 14:30:37 +0100 From: Oleksij Rempel To: Mark Rutland , Rob Herring , Sascha Hauer , Shawn Guo , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter Cc: Oleksij Rempel , devicetree@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , David Jander , Robin van der Gracht , dri-devel@lists.freedesktop.org Subject: [PATCH v3 4/5] ARM: dts: imx6dl: plym2m, prtvt7, victgo: make use of new resistive-adc-touch driver Date: Fri, 11 Feb 2022 14:30:34 +0100 Message-Id: <20220211133035.2321330-5-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220211133035.2321330-1-o.rempel@pengutronix.de> References: <20220211133035.2321330-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@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 Content-Type: text/plain; charset="utf-8" The tsc2046 is an ADC used as touchscreen controller. To share as mach code as possible, we should use it as actual ADC + virtual touchscreen controller. With this patch we make use of the new kernel IIO and HID infrastructure. Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6dl-plym2m.dts | 59 +++++++++++++++++++++-------- arch/arm/boot/dts/imx6dl-prtvt7.dts | 57 +++++++++++++++++++++------- arch/arm/boot/dts/imx6dl-victgo.dts | 59 ++++++++++++++++++++++------- 3 files changed, 132 insertions(+), 43 deletions(-) diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl= -plym2m.dts index 60fe5f14666e..73c7622bfe0f 100644 --- a/arch/arm/boot/dts/imx6dl-plym2m.dts +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts @@ -101,6 +101,18 @@ reg_12v0: regulator-12v0 { regulator-min-microvolt =3D <12000000>; regulator-max-microvolt =3D <12000000>; }; + + touchscreen { + compatible =3D "resistive-adc-touch"; + io-channels =3D <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, + <&adc_ts 5>; + io-channel-names =3D "y", "z1", "z2", "x"; + touchscreen-min-pressure =3D <64687>; + touchscreen-inverted-x; + touchscreen-inverted-y; + touchscreen-x-plate-ohms =3D <300>; + touchscreen-y-plate-ohms =3D <800>; + }; }; =20 &can1 { @@ -129,26 +141,41 @@ &ecspi2 { pinctrl-0 =3D <&pinctrl_ecspi2>; status =3D "okay"; =20 - touchscreen@0 { - compatible =3D "ti,tsc2046"; + adc_ts: adc@0 { + compatible =3D "ti,tsc2046e-adc"; reg =3D <0>; pinctrl-0 =3D <&pinctrl_tsc2046>; pinctrl-names =3D"default"; - spi-max-frequency =3D <100000>; - interrupts-extended =3D <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; - pendown-gpio =3D <&gpio3 20 GPIO_ACTIVE_LOW>; + spi-max-frequency =3D <1000000>; + interrupts-extended =3D <&gpio3 20 IRQ_TYPE_LEVEL_LOW>; + #io-channel-cells =3D <1>; =20 - touchscreen-inverted-x; - touchscreen-inverted-y; - touchscreen-max-pressure =3D <4095>; - - ti,vref-delay-usecs =3D /bits/ 16 <100>; - ti,x-plate-ohms =3D /bits/ 16 <800>; - ti,y-plate-ohms =3D /bits/ 16 <300>; - ti,debounce-max =3D /bits/ 16 <3>; - ti,debounce-tol =3D /bits/ 16 <70>; - ti,debounce-rep =3D /bits/ 16 <3>; - wakeup-source; + #address-cells =3D <1>; + #size-cells =3D <0>; + + channel@1 { + reg =3D <1>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@3 { + reg =3D <3>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@4 { + reg =3D <4>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@5 { + reg =3D <5>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; }; }; =20 diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl= -prtvt7.dts index baaa6ffc4df9..59e0674420a1 100644 --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts @@ -235,6 +235,18 @@ simple-audio-card,codec { frame-master; }; }; + + touchscreen { + compatible =3D "resistive-adc-touch"; + io-channels =3D <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, + <&adc_ts 5>; + io-channel-names =3D "y", "z1", "z2", "x"; + touchscreen-min-pressure =3D <64687>; + touchscreen-inverted-x; + touchscreen-inverted-y; + touchscreen-x-plate-ohms =3D <300>; + touchscreen-y-plate-ohms =3D <800>; + }; }; =20 &audmux { @@ -277,22 +289,41 @@ &ecspi2 { pinctrl-0 =3D <&pinctrl_ecspi2>; status =3D "okay"; =20 - touchscreen@0 { - compatible =3D "ti,tsc2046"; + adc_ts: adc@0 { + compatible =3D "ti,tsc2046e-adc"; reg =3D <0>; pinctrl-0 =3D <&pinctrl_tsc>; pinctrl-names =3D"default"; - spi-max-frequency =3D <100000>; - interrupts-extended =3D <&gpio3 20 IRQ_TYPE_EDGE_FALLING>; - pendown-gpio =3D <&gpio3 20 GPIO_ACTIVE_LOW>; - touchscreen-max-pressure =3D <4095>; - ti,vref-delay-usecs =3D /bits/ 16 <100>; - ti,x-plate-ohms =3D /bits/ 16 <800>; - ti,y-plate-ohms =3D /bits/ 16 <300>; - ti,debounce-max =3D /bits/ 16 <3>; - ti,debounce-tol =3D /bits/ 16 <70>; - ti,debounce-rep =3D /bits/ 16 <3>; - wakeup-source; + spi-max-frequency =3D <1000000>; + interrupts-extended =3D <&gpio3 20 IRQ_TYPE_LEVEL_LOW>; + #io-channel-cells =3D <1>; + + #address-cells =3D <1>; + #size-cells =3D <0>; + + channel@1 { + reg =3D <1>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@3 { + reg =3D <3>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@4 { + reg =3D <4>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@5 { + reg =3D <5>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; }; }; =20 diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl= -victgo.dts index d37ba4ed847d..52de091ea452 100644 --- a/arch/arm/boot/dts/imx6dl-victgo.dts +++ b/arch/arm/boot/dts/imx6dl-victgo.dts @@ -181,6 +181,18 @@ simple-audio-card,codec { frame-master; }; }; + + touchscreen { + compatible =3D "resistive-adc-touch"; + io-channels =3D <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, + <&adc_ts 5>; + io-channel-names =3D "y", "z1", "z2", "x"; + touchscreen-min-pressure =3D <64687>; + touchscreen-inverted-x; + touchscreen-inverted-y; + touchscreen-x-plate-ohms =3D <300>; + touchscreen-y-plate-ohms =3D <800>; + }; }; =20 &audmux { @@ -244,22 +256,41 @@ &ecspi2 { pinctrl-0 =3D <&pinctrl_ecspi2>; status =3D "okay"; =20 - touchscreen@0 { - compatible =3D "ti,tsc2046"; + adc_ts: adc@0 { + compatible =3D "ti,tsc2046e-adc"; reg =3D <0>; - pinctrl-names =3D "default"; pinctrl-0 =3D <&pinctrl_touchscreen>; - spi-max-frequency =3D <200000>; - interrupts-extended =3D <&gpio5 8 IRQ_TYPE_EDGE_FALLING>; - pendown-gpio =3D <&gpio5 8 GPIO_ACTIVE_LOW>; - touchscreen-size-x =3D <800>; - touchscreen-size-y =3D <480>; - touchscreen-inverted-y; - touchscreen-max-pressure =3D <4095>; - ti,vref-delay-usecs =3D /bits/ 16 <100>; - ti,x-plate-ohms =3D /bits/ 16 <800>; - ti,y-plate-ohms =3D /bits/ 16 <300>; - wakeup-source; + pinctrl-names =3D"default"; + spi-max-frequency =3D <1000000>; + interrupts-extended =3D <&gpio5 8 IRQ_TYPE_LEVEL_LOW>; + #io-channel-cells =3D <1>; + + #address-cells =3D <1>; + #size-cells =3D <0>; + + channel@1 { + reg =3D <1>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@3 { + reg =3D <3>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@4 { + reg =3D <4>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; + + channel@5 { + reg =3D <5>; + settling-time-us =3D <700>; + oversampling-ratio =3D <5>; + }; }; }; =20 --=20 2.30.2 From nobody Sun Jun 28 06:42:00 2026 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 94F6DC433EF for ; Fri, 11 Feb 2022 13:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350604AbiBKNbN (ORCPT ); Fri, 11 Feb 2022 08:31:13 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350591AbiBKNbH (ORCPT ); Fri, 11 Feb 2022 08:31:07 -0500 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 03B11D5F for ; Fri, 11 Feb 2022 05:31:05 -0800 (PST) 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 1nIW0V-0005x6-IW; Fri, 11 Feb 2022 14:30:39 +0100 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nIW0T-009jup-E1; Fri, 11 Feb 2022 14:30:37 +0100 From: Oleksij Rempel To: Mark Rutland , Rob Herring , Sascha Hauer , Shawn Guo , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter Cc: Oleksij Rempel , devicetree@vger.kernel.org, Fabio Estevam , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , David Jander , Robin van der Gracht , dri-devel@lists.freedesktop.org Subject: [PATCH v3 5/5] ARM: dts: imx6dl: plym2m, prtvt7, victgo: add thermal zones and hwmon Date: Fri, 11 Feb 2022 14:30:35 +0100 Message-Id: <20220211133035.2321330-6-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220211133035.2321330-1-o.rempel@pengutronix.de> References: <20220211133035.2321330-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@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 Content-Type: text/plain; charset="utf-8" Add thermal zones and hwmon connected to the ADC-touchscreen controller. Signed-off-by: Oleksij Rempel --- arch/arm/boot/dts/imx6dl-plym2m.dts | 74 ++++++++++++++++++++++++++++- arch/arm/boot/dts/imx6dl-prtvt7.dts | 57 ++++++++++++++++++++++ arch/arm/boot/dts/imx6dl-victgo.dts | 62 +++++++++++++++++++++++- 3 files changed, 191 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6dl-plym2m.dts b/arch/arm/boot/dts/imx6dl= -plym2m.dts index 73c7622bfe0f..c4ce23d8ac9f 100644 --- a/arch/arm/boot/dts/imx6dl-plym2m.dts +++ b/arch/arm/boot/dts/imx6dl-plym2m.dts @@ -50,6 +50,11 @@ display_out: endpoint { }; }; =20 + iio-hwmon { + compatible =3D "iio-hwmon"; + io-channels =3D <&vdiv_vaccu>; + }; + leds { compatible =3D "gpio-leds"; pinctrl-names =3D "default"; @@ -102,6 +107,26 @@ reg_12v0: regulator-12v0 { regulator-max-microvolt =3D <12000000>; }; =20 + thermal-zones { + chassis-thermal { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&tsens0>; + }; + + touch-thermal0 { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&touch_temp0>; + }; + + touch-thermal1 { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&touch_temp1>; + }; + }; + touchscreen { compatible =3D "resistive-adc-touch"; io-channels =3D <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, @@ -113,6 +138,32 @@ touchscreen { touchscreen-x-plate-ohms =3D <300>; touchscreen-y-plate-ohms =3D <800>; }; + + touch_temp0: touch-temperature-sensor0 { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc_ts 0>; + io-channel-names =3D "sensor-channel"; + temperature-lookup-table =3D < (-40000) 736 + 85000 474>; + }; + + touch_temp1: touch-temperature-sensor1 { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc_ts 7>; + io-channel-names =3D "sensor-channel"; + temperature-lookup-table =3D < (-40000) 826 + 85000 609>; + }; + + vdiv_vaccu: voltage-divider-vaccu { + compatible =3D "voltage-divider"; + io-channels =3D <&adc_ts 2>; + output-ohms =3D <2500>; + full-ohms =3D <64000>; + #io-channel-cells =3D <0>; + }; }; =20 &can1 { @@ -153,12 +204,24 @@ adc_ts: adc@0 { #address-cells =3D <1>; #size-cells =3D <0>; =20 + channel@0 { + reg =3D <0>; + settling-time-us =3D <300>; + oversampling-ratio =3D <5>; + }; + channel@1 { reg =3D <1>; settling-time-us =3D <700>; oversampling-ratio =3D <5>; }; =20 + channel@2 { + reg =3D <2>; + settling-time-us =3D <300>; + oversampling-ratio =3D <5>; + }; + channel@3 { reg =3D <3>; settling-time-us =3D <700>; @@ -176,6 +239,14 @@ channel@5 { settling-time-us =3D <700>; oversampling-ratio =3D <5>; }; + + /* channel 6 is not connected */ + + channel@7 { + reg =3D <7>; + settling-time-us =3D <300>; + oversampling-ratio =3D <5>; + }; }; }; =20 @@ -260,9 +331,10 @@ &i2c3 { pinctrl-0 =3D <&pinctrl_i2c3>; status =3D "okay"; =20 - temperature-sensor@70 { + tsens0: temperature-sensor@70 { compatible =3D "ti,tmp103"; reg =3D <0x70>; + #thermal-sensor-cells =3D <0>; }; }; =20 diff --git a/arch/arm/boot/dts/imx6dl-prtvt7.dts b/arch/arm/boot/dts/imx6dl= -prtvt7.dts index 59e0674420a1..b86deebef7b7 100644 --- a/arch/arm/boot/dts/imx6dl-prtvt7.dts +++ b/arch/arm/boot/dts/imx6dl-prtvt7.dts @@ -53,6 +53,11 @@ display_out: endpoint { }; }; =20 + iio-hwmon { + compatible =3D "iio-hwmon"; + io-channels =3D <&vdiv_vaccu>; + }; + keys { compatible =3D "gpio-keys"; autorepeat; @@ -236,6 +241,26 @@ simple-audio-card,codec { }; }; =20 + thermal-zones { + chassis-thermal { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&tsens0>; + }; + + touch-thermal0 { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&touch_temp0>; + }; + + touch-thermal1 { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&touch_temp1>; + }; + }; + touchscreen { compatible =3D "resistive-adc-touch"; io-channels =3D <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, @@ -247,6 +272,32 @@ touchscreen { touchscreen-x-plate-ohms =3D <300>; touchscreen-y-plate-ohms =3D <800>; }; + + touch_temp0: touch-temperature-sensor0 { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc_ts 0>; + io-channel-names =3D "sensor-channel"; + temperature-lookup-table =3D < (-40000) 736 + 85000 474>; + }; + + touch_temp1: touch-temperature-sensor1 { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc_ts 7>; + io-channel-names =3D "sensor-channel"; + temperature-lookup-table =3D < (-40000) 826 + 85000 609>; + }; + + vdiv_vaccu: voltage-divider-vaccu { + compatible =3D "voltage-divider"; + io-channels =3D <&adc_ts 2>; + output-ohms =3D <2500>; + full-ohms =3D <64000>; + #io-channel-cells =3D <0>; + }; }; =20 &audmux { @@ -372,6 +423,12 @@ rtc@51 { reg =3D <0x51>; }; =20 + tsens0: temperature-sensor@70 { + compatible =3D "ti,tmp103"; + reg =3D <0x70>; + #thermal-sensor-cells =3D <0>; + }; + gpio_pca: gpio@74 { compatible =3D "nxp,pca9539"; reg =3D <0x74>; diff --git a/arch/arm/boot/dts/imx6dl-victgo.dts b/arch/arm/boot/dts/imx6dl= -victgo.dts index 52de091ea452..227c952543d4 100644 --- a/arch/arm/boot/dts/imx6dl-victgo.dts +++ b/arch/arm/boot/dts/imx6dl-victgo.dts @@ -66,6 +66,11 @@ enter { }; }; =20 + iio-hwmon { + compatible =3D "iio-hwmon"; + io-channels =3D <&vdiv_vaccu>, <&vdiv_hitch_pos>; + }; + leds { compatible =3D "gpio-leds"; pinctrl-names =3D "default"; @@ -182,6 +187,26 @@ simple-audio-card,codec { }; }; =20 + thermal-zones { + chassis-thermal { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&tsens0>; + }; + + touch-thermal0 { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&touch_temp0>; + }; + + touch-thermal1 { + polling-delay =3D <20000>; + polling-delay-passive =3D <0>; + thermal-sensors =3D <&touch_temp1>; + }; + }; + touchscreen { compatible =3D "resistive-adc-touch"; io-channels =3D <&adc_ts 1>, <&adc_ts 3>, <&adc_ts 4>, @@ -193,6 +218,40 @@ touchscreen { touchscreen-x-plate-ohms =3D <300>; touchscreen-y-plate-ohms =3D <800>; }; + + touch_temp0: touch-temperature-sensor0 { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc_ts 0>; + io-channel-names =3D "sensor-channel"; + temperature-lookup-table =3D < (-40000) 736 + 85000 474>; + }; + + touch_temp1: touch-temperature-sensor1 { + compatible =3D "generic-adc-thermal"; + #thermal-sensor-cells =3D <0>; + io-channels =3D <&adc_ts 7>; + io-channel-names =3D "sensor-channel"; + temperature-lookup-table =3D < (-40000) 826 + 85000 609>; + }; + + vdiv_vaccu: voltage-divider-vaccu { + compatible =3D "voltage-divider"; + io-channels =3D <&adc_ts 2>; + output-ohms =3D <2500>; + full-ohms =3D <64000>; + #io-channel-cells =3D <0>; + }; + + vdiv_hitch_pos: voltage-divider-hitch-pos { + compatible =3D "voltage-divider"; + io-channels =3D <&adc_ts 6>; + output-ohms =3D <3300>; + full-ohms =3D <13300>; + #io-channel-cells =3D <0>; + }; }; =20 &audmux { @@ -477,9 +536,10 @@ rtc@51 { reg =3D <0x51>; }; =20 - temperature-sensor@70 { + tsens0: temperature-sensor@70 { compatible =3D "ti,tmp103"; reg =3D <0x70>; + #thermal-sensor-cells =3D <0>; }; }; =20 --=20 2.30.2