Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp340704imn; Fri, 1 Jul 2022 16:46:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tu/IhqybRIrL+9sNntrNCtskTXElyhFxnQh/htsIqaVvVokiXEMWQmw2tYwV3WO1W3q1s4 X-Received: by 2002:a62:aa10:0:b0:525:22bb:b028 with SMTP id e16-20020a62aa10000000b0052522bbb028mr22581700pff.21.1656719177149; Fri, 01 Jul 2022 16:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656719177; cv=none; d=google.com; s=arc-20160816; b=BqlP8e3qPfgXeNj4/P2oA6Jbtt96c9++iIbcVzZbFzBXQKHbZXhwkHTMij33jt3G5s xekU4pVflYPLOlNixBQOhyK+UKbdYVxOkNEnJ/tGBc6cwlXYAfl6a9Fm8hrQZRYNbIzd mHhQSBATI0dN7Lavh8BcC7G1mp+3ucBnL/g4rNxx0cKEJ2rNMs66mlizBFN1RWJRc9uE vs7wWvu/A/8NgwVGnlx2dsi3odLPycVyaRVkbx0IZZ8QbURzVi17mXhw7eN+Iy1MrRgK asIEYvq6DSijq96uzRwzTx+xjdJgHtZAR3Fivh37KTl0fijcrm3F7bv7udk/awlnseUP x6Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=S/72w2SrT3AAPQODH5pTveM/KL05TgRE3vG2jsRrTSs=; b=iNVBz6Ok+LUUn0tbcsscNidtakzDoCr+k30fmGGy4BcsUNYq6sMHjJIKUjctZWlFF8 oMJSi0UhvwVZ5sLsys6AqgZzousmQy4BPF5IKVOaDBlWmAlfBxcVj6Yo4q3IlRTVcVdE yLty+3ddFQNx31ONkiQDq5mO1wmTTv74vx77qUpRuQIZNShh/zAdOwhUh5Vs3nl2zssp 2TYWEPx4rzpBF4uNz/ddgGzCIO4vH9+Mt+tncKuin3Gz5+hKpdExWTjP5cv4Q9tLjo9j d1q5KWyplQlRt6lSRrsPfBsS85dzydPtEWUWN1a+U4IgGSRRsF9BoLn99ay273MZRne0 iRFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ivjmvzSu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a17090a948b00b001df8f8d3daasi1435290pjo.162.2022.07.01.16.45.54; Fri, 01 Jul 2022 16:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ivjmvzSu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231865AbiGAWtv (ORCPT + 99 others); Fri, 1 Jul 2022 18:49:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbiGAWtu (ORCPT ); Fri, 1 Jul 2022 18:49:50 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21D694550C; Fri, 1 Jul 2022 15:49:49 -0700 (PDT) Received: from notapiano (unknown [194.36.25.35]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) 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 145636601802; Fri, 1 Jul 2022 23:49:44 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1656715787; bh=VsNToxdwUkS2/Cs/CJ+X6wuHSm+1n5iJSEkB4ZkPoeg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ivjmvzSuSC4caddmtzGD6Bps0Ju7D5WAVW8QPnf7LbqFKKqpLY14nCtEL2Fii8UVK gDK6NyRbXG5w5kjBzb4ZZj/0NovvsDsCQv5Mrx0Hlll9sTJl9zLYFAdLp2X7bkmrNE Ev8Feyfk4OMom8499gb6zELOrNwew7I7k/OAGtNBi7SCrTfHyvjKKDJ7018br3GPYM cPsh9O5upuvTCP8+ULJ85Usg0MpfJAhvAvsxdiOGlMR7IG07B6L4y3+eCwSOSxIYTU IBjRaW7JhIlHzJO6j7+qgcv2kcmLfIdJ0F17Rp/T8LdFgG4BiBGlq845MIUSEoegS5 WUlUHopzwNjwg== Date: Fri, 1 Jul 2022 18:49:39 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: AngeloGioacchino Del Regno Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, hsinyi@chromium.org, allen-kh.cheng@mediatek.com, gtk3@inbox.ru, luca@z3ntu.xyz, sam.shih@mediatek.com, sean.wang@mediatek.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wenst@chromium.org Subject: Re: [PATCH 11/11] arm64: dts: mediatek: cherry: Add I2C-HID touchscreen on I2C4 Message-ID: <20220701224939.brdcdnh47jbcbiif@notapiano> References: <20220630153316.308767-1-angelogioacchino.delregno@collabora.com> <20220630153316.308767-12-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220630153316.308767-12-angelogioacchino.delregno@collabora.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2022 at 05:33:16PM +0200, AngeloGioacchino Del Regno wrote: > This platform carries a HID compatible I2C touchscreen on the i2c4 bus, > but it may either be at 0x10, or at 0x15, depending on the board model: > declare both as disabled in the common Cherry device-tree and enable > the required touchscreen node on a per-board basis. > > Signed-off-by: AngeloGioacchino Del Regno > --- > .../dts/mediatek/mt8195-cherry-tomato-r1.dts | 4 ++ > .../dts/mediatek/mt8195-cherry-tomato-r2.dts | 4 ++ > .../dts/mediatek/mt8195-cherry-tomato-r3.dts | 4 ++ > .../boot/dts/mediatek/mt8195-cherry.dtsi | 41 +++++++++++++++++++ > 4 files changed, 53 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts > index 17e9e4d6f6ab..2837fb24c84c 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts > +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts > @@ -9,3 +9,7 @@ / { > model = "MediaTek Tomato (rev1) board"; > compatible = "google,tomato-rev1", "google,tomato", "mediatek,mt8195"; > }; > + > +&ts_10 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts > index ee5fd07ad573..4e1d1a1887c7 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts > +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts > @@ -29,3 +29,7 @@ pins-low-power-pcie0-disable { > bias-pull-down; > }; > }; > + > +&ts_10 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts > index 792f6c83e88b..4a45884203ea 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts > +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts > @@ -30,3 +30,7 @@ pins-low-power-pcie0-disable { > bias-pull-down; > }; > }; > + > +&ts_10 { > + status = "okay"; > +}; But no board currently uses the one on 0x15? Thanks, N?colas > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi > index 2687c6d40ac1..7a32c7006a5a 100644 > --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi > @@ -143,6 +143,31 @@ &i2c4 { > clock-frequency = <400000>; > pinctrl-names = "default"; > pinctrl-0 = <&i2c4_pin>; > + > + /* Depending on the machine, the TS may be at 0x10 or at 0x15 */ > + ts_10: touchscreen@10 { > + compatible = "hid-over-i2c"; > + reg = <0x10>; > + hid-descr-addr = <0x0001>; > + interrupts-extended = <&pio 92 IRQ_TYPE_LEVEL_LOW>; > + pinctrl-names = "default"; > + pinctrl-0 = <&touchscreen_pins>; > + post-power-on-delay-ms = <10>; > + vdd-supply = <&pp3300_s3>; > + status = "disabled"; > + }; > + > + ts_15: touchscreen@15 { > + compatible = "hid-over-i2c"; > + reg = <0x15>; > + hid-descr-addr = <0x0001>; > + interrupts-extended = <&pio 92 IRQ_TYPE_LEVEL_LOW>; > + pinctrl-names = "default"; > + pinctrl-0 = <&touchscreen_pins>; > + post-power-on-delay-ms = <10>; > + vdd-supply = <&pp3300_s3>; > + status = "disabled"; > + }; > }; > > &i2c5 { > @@ -609,6 +634,22 @@ subpmic_pin_irq: pins-subpmic-int-n { > bias-pull-up; > }; > }; > + > + touchscreen_pins: touchscreen-default-pins { > + pins-int-n { > + pinmux = ; > + input-enable; > + bias-pull-up = ; > + }; > + pins-rst { > + pinmux = ; > + output-high; > + }; > + pins-report-sw { > + pinmux = ; > + output-low; > + }; > + }; > }; > > &pmic { > -- > 2.35.1 >