From patchwork Tue Feb 7 02:48:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 651475 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 CBD71C05027 for ; Tue, 7 Feb 2023 02:49:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbjBGCtW (ORCPT ); Mon, 6 Feb 2023 21:49:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbjBGCtO (ORCPT ); Mon, 6 Feb 2023 21:49:14 -0500 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F266367D1 for ; Mon, 6 Feb 2023 18:48:51 -0800 (PST) Received: by mail-pj1-x1031.google.com with SMTP id mi9so13568377pjb.4 for ; Mon, 06 Feb 2023 18:48:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sLp+h7RkE9BAbz0zHyr/CLuP3RxRPDj/C10VVagvrZo=; b=Xi4CLe1YUFGbQK9fHIDP7TOLa8HqqV10AofMQWhjvwuTAXDntSKh1G/0F0QlQVCzcc pEhIqIqhOmAdXm5aLGgYzXsLbW+CsNfBJpQt5WROcPEyPuuo7KN4Ys2FrBfQhEn2+/bE tham9kJH0m7c5ZHgU5I9beRFL9JBbZKhyMs5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sLp+h7RkE9BAbz0zHyr/CLuP3RxRPDj/C10VVagvrZo=; b=K8LLk5PGDIBnDPfcXWtCGx2fNgY1VilfK2PCj61qHWF534rXjyxU8JI8C6kET97HYb 2nUoquzCAgWIVUuStHCoB7wfQxFborKP6zBqaSI5OjwY4nAuIp48UdQpvPbLvqKw4AiO m2RmfufVnemkdh7YLiuqIFdCEUGycD2eU8waxu4HpT0Jksb3nQgtfUtttebNbjSQywnl N3LiAhwUsUiePcGw1NPJcqNkoLIWWx1Bc3D1aF2usqjbiyQyxpdMW/5zrjXyYe0HDSbC 7Q6JAxL7eufTwXZuxgYHR+IGqOOvr9ivW2DwGEJG497+FF1a2Di61YJyCRZjSafr6rPC NX7Q== X-Gm-Message-State: AO0yUKUaAiK9xDyOB06ckNuMC6ag8TRc1AGJg0wKb3uFeau9a6XIF8Yr RIWAwwvSekiwVU0jlb5Pxiq8UA== X-Google-Smtp-Source: AK7set9r0K5wQE49Me85/HS+/5oBqNAIPQwnmgekoSvS5JnHCqv7bOYV6QedD5I4PjWRoy5D7U40lA== X-Received: by 2002:a05:6a20:4421:b0:b9:2705:4e46 with SMTP id ce33-20020a056a20442100b000b927054e46mr2102261pzb.22.1675738130907; Mon, 06 Feb 2023 18:48:50 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:29fb:a635:f0df:f45a]) by smtp.gmail.com with ESMTPSA id s17-20020a63a311000000b0045dc85c4a5fsm6882430pge.44.2023.02.06.18.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 18:48:50 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Torokhov , devicetree@vger.kernel.org, Stephen Kitt , Konrad Dybcio , Douglas Anderson , Andy Gross , linux-kernel@vger.kernel.org Subject: [PATCH 3/7] arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on villager Date: Mon, 6 Feb 2023 18:48:12 -0800 Message-Id: <20230206184744.3.I740d409bc5bb69bf4a7b3c4568ea6e7a92f16ccd@changeid> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog In-Reply-To: <20230207024816.525938-1-dianders@chromium.org> References: <20230207024816.525938-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On never revs of sc7280-herobrine-villager (rev2+) the L3C rail is provided to the touchscreen as the IO voltage rail. Let's add it in the device tree. NOTE: Even though this is only really needed on rev2+ villagers (-rev0 had non-functioning touchscreen and -rev1 had some hacky hardware magic), it doesn't actually hurt to do this for old villager revs. As talked about in the patch ("arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V") the L3C regulator didn't go anywhere at all on older revs. That means that turning it on for older revs doesn't hurt other than drawing a tiny bit of extra power. Since -rev0 and -rev1 villagers will never make it to real customers and it's nice not to have too many old device trees, the better tradeoff seems to be to enable it everywhere. Signed-off-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi index 17553e0fd6fd..818d4046d2c7 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager.dtsi @@ -55,6 +55,7 @@ ap_ts: touchscreen@10 { reset-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; vcc33-supply = <&ts_avdd>; + vccio-supply = <&ts_avccio>; }; }; From patchwork Tue Feb 7 02:48:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 651474 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 F09F1C64ED6 for ; Tue, 7 Feb 2023 02:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbjBGCt1 (ORCPT ); Mon, 6 Feb 2023 21:49:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbjBGCtW (ORCPT ); Mon, 6 Feb 2023 21:49:22 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B191335241 for ; Mon, 6 Feb 2023 18:48:54 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id w5so4231767plg.8 for ; Mon, 06 Feb 2023 18:48:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oAnZqwf1tmgF/Ssjms0XjO2WrbdQH0082JXWCubZ7GA=; b=gwnCBpHCBDwOtQoT/Xv+4JH01cTWKaRzALTEjRtfr/lkLw+nV9Aokjd5EWM9AiBqh/ bZPfhy8IBVPjNhXUESF6U1wHXte5oBSZSEINYQsMNiQ9dXYhNOSITiYhh4R0QfVMbH8z htR46L+KtpRlEwzuJAaidtqQxrmPHBtQxTy5A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oAnZqwf1tmgF/Ssjms0XjO2WrbdQH0082JXWCubZ7GA=; b=U8YiWq5JWNT9eCz3ZSh93v4kzvo7cNexKtHjacXzRz3h2q+psuDRsGXVGxYkjsIXV8 0YgHJC7xpkw6Y3eXR4BP5QudyKqjLPyTyJIxeQxp2L5boYDlM4e8ZnWyHVfXERfdvYGG L1bKXwHUERWFO5HehxZZCCO17ji9MesXzmd2KChcgRwXN8nmrIrvb62lOvbFC8ln7vBd rUf3XxO67heMkvP9wy4lnixgKrqAygstjuysOioayknO01zSAL+pz1lJun7KVAFSOk4i UkhBApAB7u/hNcT5pS2E2jZLe+xPL10SjDApWm870fFG+3hY9R2aE46d7sxfHlBoEgkv NmQg== X-Gm-Message-State: AO0yUKWMWpDqsr/qt6qS/deSpauPGIng0wg3xlKKE1osPXZOm4ylAUzM lcn/LgUXHRMxcmE5TGJQ6KLxwg== X-Google-Smtp-Source: AK7set83tUsQLSdz9QWf7CPd7HfWX3LT99NQj3Oy4gTb0a7vnTFojfY2y+AJUxutEn3uONkS8qeNwA== X-Received: by 2002:a05:6a20:a5a8:b0:bc:e82a:5c73 with SMTP id bc40-20020a056a20a5a800b000bce82a5c73mr1580561pzb.9.1675738134171; Mon, 06 Feb 2023 18:48:54 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:29fb:a635:f0df:f45a]) by smtp.gmail.com with ESMTPSA id s17-20020a63a311000000b0045dc85c4a5fsm6882430pge.44.2023.02.06.18.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 18:48:53 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Torokhov , devicetree@vger.kernel.org, Stephen Kitt , Konrad Dybcio , Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH 5/7] dt-bindings: HID: i2c-hid: goodix: Add mainboard-vddio-supply Date: Mon, 6 Feb 2023 18:48:14 -0800 Message-Id: <20230206184744.5.Ia77a96c6c5564f9cc25e6220b5a9171d5c2639e8@changeid> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog In-Reply-To: <20230207024816.525938-1-dianders@chromium.org> References: <20230207024816.525938-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The goodix i2c-hid bindings currently support two models of touchscreen: GT7375P and GT7986U. The datasheets of both touchscreens show the following things: * The mainboard that the touchscreen is connected to is only expected to supply one voltage to the touchscreen: 3.3V. * The touchscreen, depending on stuffing options, can accept IO to the touchscreen as either 3.3V or 1.8V. Presumably this means that the touchscreen has its own way internally to make or deal with 1.8V signals when it's configured for 1.8V IO. NOTE: you've got to look very carefully at the datasheet for the touchscreen to see that the above bullets are true. Specifically, the datasheet shows a signal called VDDIO and one might think that this is where a mainboard would provide VDDIO to the touchscreen. Upon closer inspection, however, a footnote can be found that says "When VDDIO is left floating, the logic level is 1.8V [...]; when VDDIO is connected to AVDD, the logic level is AVDD.". Thus the VDDIO pin on the touchscreen IC is actually a selector and not a pin whre the mainboard would pass a reference voltage. The fact that the touchscreen isn't supplied 1.8V by the mainboard means that when I originally submitted bindings for these touchscreens I only listed the 3.3V rail in the bindings. It can be noted that the original bindings and driver were added for sc7180-trogdor boards and these boards all use 3.3V IO via a level shifter on the mainboard. It turns out that with sc7280-herobrine-evoker, we've got a bit of a strange monkey on our hands. Due to some very interesting but (unfortunately) set-in-stone hardware design, we are doing 1.8V IO to the touchscreen but we _also_ have some extra buffers on the mainboard that need to be powered up to make the IO lines work. After much pondering about this, it seems like the best way to handle this is to add an optional "mainboard-vddio" rail to the bindings that is used to power up the buffers. Specifically, the fact that the touchscreen datasheet documents that its IOs can be at a different voltage level than its main power rail means that there truly are two voltage rails associated with the touchscreen, even if we don't actually provide the IO rail to it. Thus it doesn't feel absurd for the DT node on the host to have a 1.8V rail to power up anything related to its 1.8V logic. Signed-off-by: Douglas Anderson --- .../devicetree/bindings/input/goodix,gt7375p.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml b/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml index 1c191bc5a178..ce18d7dadae2 100644 --- a/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml +++ b/Documentation/devicetree/bindings/input/goodix,gt7375p.yaml @@ -36,6 +36,13 @@ properties: vdd-supply: description: The 3.3V supply to the touchscreen. + mainboard-vddio-supply: + description: + The supply on the main board needed to power up IO signals going + to the touchscreen. This supply need not go to the touchscreen + itself as long as it allows the main board to make signals compatible + with what the touchscreen is expecting for its IO rails. + required: - compatible - reg From patchwork Tue Feb 7 02:48:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 651473 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 ED09EC636D3 for ; Tue, 7 Feb 2023 02:49:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbjBGCtb (ORCPT ); Mon, 6 Feb 2023 21:49:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbjBGCtY (ORCPT ); Mon, 6 Feb 2023 21:49:24 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FA4236468 for ; Mon, 6 Feb 2023 18:48:58 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id ge21-20020a17090b0e1500b002308aac5b5eso7378637pjb.4 for ; Mon, 06 Feb 2023 18:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IHoW6eYbAc4fXAYhlPFT1Ci+6Xw0RaXHqNRq/Iskxrc=; b=kT7BMzYXud6r+jZSY+nLPRfwUgsmnKvXesh1AVQcFAPTBzPv/4nhg7vAPr5s+pVHkd 1WEt3k0CjvfXwHJbSCzgtIGYtq2rEYzWkm6msNnbMvWJb2d5+bNQo+fF6h9M8lPp6zyF bgSiWjx6zCR/Boregwm3PEK4q2RR76aHTIZYc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IHoW6eYbAc4fXAYhlPFT1Ci+6Xw0RaXHqNRq/Iskxrc=; b=IAzcvxHKpVIB9Mnwqjalka+saV1zmZKnjKqe2p+5YXnQAV/1uHs94wFF7BlwPwbXH2 90BPcmTH7NSGrGCQA1swcJlnVhX+lLhhFCzbX+UZ2/4tfI9aj9BC2KeSUexyIqAjkVFC eD4o1rLzyOLPtNbb1d2AbXixK4zu6Q+3ixfywvj8aud3Gur+y8FSxOkCJjauaMyzSg5V nrARUU9qaE2lKIxBlHMN4kDkGA45elEZf+XZ8npo61BvvLS2NAWekz5Zgubtg2sTWdtw qiUSwN0vJ4uS+ye6GlTJPyq+9IteEMJrKFJSRRosHv811I3Chl2+T/buXBWOhPzZ2M5k P/4A== X-Gm-Message-State: AO0yUKXRA5yKJmP+FlwgipLvjJ0gcrLA8JdAI/4zcd7zCwUTVAIPby50 UWbshwgOMlsguW75DJdM+WURFw== X-Google-Smtp-Source: AK7set96EDRUgjwqCjtZyjt3s7Fm+BlH1Yx2YTvIa8TC/AVnqJXNG1yYh3aohcd7sgmjs4Aq+3kYrQ== X-Received: by 2002:a17:903:1cc:b0:192:5282:6833 with SMTP id e12-20020a17090301cc00b0019252826833mr1495566plh.29.1675738137588; Mon, 06 Feb 2023 18:48:57 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:29fb:a635:f0df:f45a]) by smtp.gmail.com with ESMTPSA id s17-20020a63a311000000b0045dc85c4a5fsm6882430pge.44.2023.02.06.18.48.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 18:48:57 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Torokhov , devicetree@vger.kernel.org, Stephen Kitt , Konrad Dybcio , Douglas Anderson , Andy Gross , linux-kernel@vger.kernel.org Subject: [PATCH 7/7] arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on evoker Date: Mon, 6 Feb 2023 18:48:16 -0800 Message-Id: <20230206184744.7.I2d960ed7f2445db0cf3d227fde985fbd740f3c4d@changeid> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog In-Reply-To: <20230207024816.525938-1-dianders@chromium.org> References: <20230207024816.525938-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On older revisions of evoker, the touchscreen was either non-functional or needed special hardware magic to get it talking properly. It's been decided that the proper way going forward is to use L3C to power some buffers on the QCard and then configure the touchscreens for 1.8V. Let's do that. Note that this is safe to do even on older revs even if it might not make the touchscreen work there (because they didn't have a properly stuffed QCard). As talked about in the patch ("arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V") the L3C regulator didn't go anywhere at all on older revs. This patch relies on the patch ("HID: i2c-hid: goodix: Add mainboard-vddio-supply") in order to function properly. Without that patch this one won't do any harm but it won't actually accomplish its goal. Signed-off-by: Douglas Anderson --- I haven't yet received real hardware to test this on, but it's a very simple patch and, in the very least, highly unlikely to make anything worse. No real users have these boards yet. arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi index 3d639c70a06e..0add7a2a099c 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-evoker.dtsi @@ -55,6 +55,7 @@ ap_ts: touchscreen@5d { reset-gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; vdd-supply = <&ts_avdd>; + mainboard-vddio-supply = <&ts_avccio>; }; };