From nobody Thu Nov 14 19:45:17 2024 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 7B1D7C433EF for ; Wed, 29 Jun 2022 16:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbiF2QBG (ORCPT ); Wed, 29 Jun 2022 12:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234372AbiF2QAV (ORCPT ); Wed, 29 Jun 2022 12:00:21 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB5441C91E; Wed, 29 Jun 2022 09:00:20 -0700 (PDT) Received: from notapiano.myfiosgateway.com (pool-98-113-53-228.nycmny.fios.verizon.net [98.113.53.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7CD8E6601977; Wed, 29 Jun 2022 17:00:18 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656518419; bh=4spTm+nSjWESSW3qtK2fAkjQznUiCUQIQixr1OG7tGg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OIyvFqwi7EKzy9XT184H158DbWBDB7JOhQ08VdfYt4F5mrlkQR81QZjh/owIfw382 6+KedYF88uUo+tKUxPm0XYJh6FWv2SZzvo/1L414dxp2AjBBLArzEbthknC29ZOa0e 8n1HzV21JpgAewjKYpUWSGCRldi8s1Yq5Q/HczZLcTa6Vq8X+/9u/Q5bieQrae0mQq V9SDFI/2uXYJXDTByXUhdS/Gemjmc5KMpqd4U1ynyZdyVIWYL8KvphnHKIgpQ4kE67 OcYtqyf0Lc0hdGjPVob2BC0GxGjIJcnGVdGAMnPl+lTAm08M0KEDpGG1E6OoEvn91V mN3JeqN2ZjX3A== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger Cc: AngeloGioacchino Del Regno , kernel@collabora.com, Chen-Yu Tsai , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v4 11/19] arm64: dts: mediatek: asurada: Add I2C touchscreen Date: Wed, 29 Jun 2022 11:59:48 -0400 Message-Id: <20220629155956.1138955-12-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220629155956.1138955-1-nfraprado@collabora.com> References: <20220629155956.1138955-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All machines of the Asurada platform have a touchscreen at address 0x10 in the I2C0 bus, but the devices vary: Spherion has the Elan eKTH3500 touchscreen, while Hayato has a generic HID-over-i2c touchscreen. Add common support for the touchscreens on the platform and the specifics in each board file. Signed-off-by: N=C3=ADcolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai --- (no changes since v1) .../dts/mediatek/mt8192-asurada-hayato-r1.dts | 7 ++++++ .../mediatek/mt8192-asurada-spherion-r0.dts | 4 +++ .../boot/dts/mediatek/mt8192-asurada.dtsi | 25 +++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts b/ar= ch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts index ca18fcf2ad4f..1e91491945f6 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada-hayato-r1.dts @@ -38,3 +38,10 @@ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) CROS_STD_MAIN_KEYMAP >; }; + +&touchscreen { + compatible =3D "hid-over-i2c"; + post-power-on-delay-ms =3D <10>; + hid-descr-addr =3D <0x0001>; + vdd-supply =3D <&pp3300_u>; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dts b/= arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dts index 30b03895de41..42db81e95fae 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dts +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada-spherion-r0.dts @@ -40,3 +40,7 @@ MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP) CROS_STD_MAIN_KEYMAP >; }; + +&touchscreen { + compatible =3D "elan,ekth3500"; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/= boot/dts/mediatek/mt8192-asurada.dtsi index 4de4235cb768..6eace280c14a 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -92,6 +92,13 @@ &i2c0 { clock-frequency =3D <400000>; pinctrl-names =3D "default"; pinctrl-0 =3D <&i2c0_pins>; + + touchscreen: touchscreen@10 { + reg =3D <0x10>; + interrupts-extended =3D <&pio 21 IRQ_TYPE_LEVEL_LOW>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&touchscreen_pins>; + }; }; =20 &i2c1 { @@ -454,6 +461,24 @@ pins-int-n { bias-pull-up =3D ; }; }; + + touchscreen_pins: touchscreen-default-pins { + pins-irq { + pinmux =3D ; + input-enable; + bias-pull-up; + }; + + pins-reset { + pinmux =3D ; + output-high; + }; + + pins-report-sw { + pinmux =3D ; + output-low; + }; + }; }; =20 &spi1 { --=20 2.36.1