From patchwork Thu Dec 8 19:20:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 31469 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp379356wrr; Thu, 8 Dec 2022 11:23:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4kNUxnB9KTOPwD32WJEucepap6sdQZZ7cfV4YQ+TP57+/m+LDf7jzBYRRDeEtM6Gc7pEZD X-Received: by 2002:a17:90a:5103:b0:219:b374:6a7d with SMTP id t3-20020a17090a510300b00219b3746a7dmr23589714pjh.22.1670527379981; Thu, 08 Dec 2022 11:22:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670527379; cv=none; d=google.com; s=arc-20160816; b=ZENSkA9Oxk72LU3rhKetio1TND/ephPor0nkED97ktD+4Sl9wzRpuGh4KakGLVPSw7 7MHpyuw1rVZ/1NEZFePihN5ezrwvLJzYfWCfVy6NUpnfOYNc0a72VApBK7My8HN1+3E2 51ssaVT1MTWghvh8Hbi59ZmPoXRyzMXdFwGZ/ZJP28BBq52g0o5+VT5Qsjecl6IjP4dA 3KACt25MSzLA+yEIYzsLNkqtBIbw5NJVgwJYF+MHRAQMgCu4JE1WJPQ2DIgXq8fgfok/ X2zrk30cyXT2Ukdrz5ONaLZdxaro/NYf42pif4HTjprpS5sU6Sk6C2s7WvYH1DmG9ymh xUqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mU15PmQ7y4jCLhzpRiDgBwZPVlqL2rxQ5MC828vQiLw=; b=olPdxXiTAVHO67QycS0UBOAfBPAntYjCG7hBMnfW3uZJ9MayhTFnUsYhHXGnmz6IXg pT9KZatTSg4PuMSc3FNwF1ryA5evQf0wwkUWubvnGNdbivk6pLhuq8X/+6wdScYyF9sL 1BLaxl9qXFQDn6I2swmef633Im0o/NoqspgeAU5KT7aK8I2zppyevp175cCqD4+iPt3g JOnY0jZ9wEe9jDVr6JhrDhXDY5IwWzgEpxaO9CXTN952Ztuk8Qa1S1mjwQUF0/vonVQD SO7gxaqlhwvn0ClWXSCDjs7l+H75jn7ELiecav+zgo5mVyjuq/4w1J/p49Cs3P7WA25l KFkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UtZBnVwu; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a63d90a000000b004787004c8dasi22531516pgg.123.2022.12.08.11.22.46; Thu, 08 Dec 2022 11:22:59 -0800 (PST) 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=@chromium.org header.s=google header.b=UtZBnVwu; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiLHTUj (ORCPT + 99 others); Thu, 8 Dec 2022 14:20:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbiLHTUd (ORCPT ); Thu, 8 Dec 2022 14:20:33 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C7F25F4 for ; Thu, 8 Dec 2022 11:20:32 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id u5so2482862pjy.5 for ; Thu, 08 Dec 2022 11:20:32 -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=mU15PmQ7y4jCLhzpRiDgBwZPVlqL2rxQ5MC828vQiLw=; b=UtZBnVwuE1PrB9zKCulUevgNmkD3pmq5tiL+Ard+l0p/FsDDyKgRZOr6mI5GO/cwi0 G75JjAG+E2Zf5gO0nim5H8WlklfKjtuSB7iRUKUIXLz6Soe4y5w1JK98KRj2z3F/rGRi cdz6Gvr6WqpUlCm8Clr2G2YPnYKsm5asVhARM= 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=mU15PmQ7y4jCLhzpRiDgBwZPVlqL2rxQ5MC828vQiLw=; b=yDe/g8KdgfYzJAWd2q2ZfAmcy4Fsg/bi2ygoauYtc2npJylunwstGQ1QZmtC2APjC5 PrTIQHan+d+xKUle+ZfKMYOUHlOdVh6KWmdn4UgjQRN/X1Kz9BB+Z1rDKZIoii/uQiui 0g/eRJ9wzhS1LwGz4nyeKKSVnUzQ5sbNREoq/oL2O6QAVz/HB0eVTgD4AZoA6VcfK91g XfyZQKAbDTVa2CUcNL2SSkpaAYfYuyRz3UqMmqEsLWXDAGLb0nOZ1puCqB88IJWEJM7T RLDCiifq4Jk0aiIra+5KsKIFR4YYHavUJMn40EQvn8ceJWHg3U/dhmC+2k+rI0DjGi1A NtOw== X-Gm-Message-State: ANoB5pnKq0rvoH0z44czS45ET12LhA9oOXVnf8vVXTL6gj7LJSXFq1gN uTT4lvCOkpt5Xj6/L3grgE6Ucg== X-Received: by 2002:a17:902:6b05:b0:185:441f:7087 with SMTP id o5-20020a1709026b0500b00185441f7087mr2916552plk.12.1670527231917; Thu, 08 Dec 2022 11:20:31 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:3aa1:2c62:9ac:4468]) by smtp.gmail.com with ESMTPSA id u5-20020a170902e5c500b00186a2274382sm17112019plf.76.2022.12.08.11.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 11:20:31 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Dmitry Torokhov Cc: mka@chromium.org, swboyd@chromium.org, linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, Yunlong Jia , Konrad Dybcio , Douglas Anderson , Andy Gross , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] arm64: dts: qcom: sc7180: Bump up trogdor ts_reset_l drive strength Date: Thu, 8 Dec 2022 11:20:02 -0800 Message-Id: <20221208111910.1.I39c387f1e3176fcf340039ec12d54047de9f8526@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221208192006.1070898-1-dianders@chromium.org> References: <20221208192006.1070898-1-dianders@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751674918049244954?= X-GMAIL-MSGID: =?utf-8?q?1751674918049244954?= On at least one board (pazquel360) the reset line for the touchscreen was scoped and found to take almost 2 ms to fall when we drove it low. This wasn't great because the Linux driver for the touchscreen (the elants_i2c driver) thinks it can do a 500 us reset pulse. If we bump the drive strength to 8 mA then the reset line went down in ~421 us. NOTE: we could apply this fix just for pazquel360, but: * Probably other trogdor devices have similar timings and it's just that nobody has noticed it before. * There are other trogdor boards using the same elan driver that tries to do 500 us reset pulses. * Bumping the drive strength to 8mA across the board won't hurt. This isn't a high speed signal or anything. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index f1defb94d670..ff1c7aa6a722 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -1376,7 +1376,15 @@ ts_reset_l: ts-reset-l-state { pins = "gpio8"; function = "gpio"; bias-disable; - drive-strength = <2>; + + /* + * The reset GPIO to the touchscreen takes almost 2ms to drop + * at the default drive strength. When we bump it up to 8mA it + * falls in under 500us. We want this to be fast since the Elan + * datasheet (and any drivers written based on it) talk about using + * a 500 us reset pulse. + */ + drive-strength = <8>; }; sdc1_on: sdc1-on-state { From patchwork Thu Dec 8 19:20:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 31470 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp379391wrr; Thu, 8 Dec 2022 11:23:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf4F/p+9UyFIdHcmW/estpAwCT66OQhwbgcIexr0nsBtYadMJA7+mSMgYRJvhmhZup/MCp61 X-Received: by 2002:a17:902:f641:b0:181:b25e:e7bc with SMTP id m1-20020a170902f64100b00181b25ee7bcmr78848602plg.46.1670527384081; Thu, 08 Dec 2022 11:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670527384; cv=none; d=google.com; s=arc-20160816; b=u8uhMMGdLPjSkIQqScpO4/LX08yvhR5KuTBe1E3klm1wuML4fhS1uN3qDRScSZOzpk 0OjXFLYhLy9xaUaZLr0l1a/ba0EBRqsc4hobWOmhZRWoGyfk0zmcyOHq51VsBQr64jv3 5sKdgX6tFx5cdjucZHpquIG4vndihdHhHk1gkcGiKnob+A4CNFlPpJdWdz0QMD785CPq 8KRcg1rk+5RnrDThd5CFGVwT5apVnv6KKW9FS6OCi8XhsYtLvKcT0MUo1ajtC8TWNZ1m URhVb4qwpVlnB1lvPd7LHp5XdMIPMsA5jXO3KHUIDMRUW5/IigIw/OIKd/Oe3cTXOODe 9hsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RXZFKzf8SEbO5MJF/tbRe/Hy6ddvI0OXNJGHZyfmauA=; b=BWOJbNCZbz2DUd8YrFBMl0KdADRagShK7au1a3vp1wEekAK4IR61998R6aWbOs2SpB voq3JMeIRa7r1Wkzb5fjsU7puMNmDUGTCNSnb8rScYkeL3K2Ve9i8WONjm2mKmRXKYy3 0kGEgQqSOFDGxpQDZu0Z1qKSv0ubYoQRvMg1cmUaV4vlqVk8Q4YhqwH7/AokCWejyGCw 6u4UsJFYfeMrllwQMI+BBp1Ig3b+YvKrixvRQA9pqTofCoVKQrYOFjpMeFAPyMgR7b5b CkROpqXGkMSLmBBHrMQQYkjqffkzfu9ailF+4ENPAvGQzWJXKLvyaXprDGpNRN5RlBMS 8C0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RtJ6gvU4; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a630f02000000b004782dc93af4si23367124pgl.307.2022.12.08.11.22.50; Thu, 08 Dec 2022 11:23:04 -0800 (PST) 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=@chromium.org header.s=google header.b=RtJ6gvU4; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229752AbiLHTUo (ORCPT + 99 others); Thu, 8 Dec 2022 14:20:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229719AbiLHTUf (ORCPT ); Thu, 8 Dec 2022 14:20:35 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A22F99533 for ; Thu, 8 Dec 2022 11:20:34 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id 3-20020a17090a098300b00219041dcbe9so2537613pjo.3 for ; Thu, 08 Dec 2022 11:20:34 -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=RXZFKzf8SEbO5MJF/tbRe/Hy6ddvI0OXNJGHZyfmauA=; b=RtJ6gvU4u20lqWyhOPFyXMpF2NNgS93C/PcBqKyQgBoFU/M+fleiQZVu+iLC5JcJ7M k1BnmfKE+l26w6sOkxNlZblsmHXxnqW6B51hWf7K1Fx8xpIAta67G1itL2XTPNVkTqMF rTDYvm+ygXrkJIXQrKCfRD4GXpt6a3f9bTeSc= 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=RXZFKzf8SEbO5MJF/tbRe/Hy6ddvI0OXNJGHZyfmauA=; b=JaQXfQsAj9LYONy2IyIkV+veu4HEybxQLW8/tn0xIGCyMoosNT+KsY2c94ePEdbdH0 z+1ntE5MYWwpyk6GEuwHdZUHOC5ucCy9g5SV5OdcNS7M7UgKJe1lbBjwUQoSTNVJMcgy xfT29qxbA+ataLrz9vadjkpl4quzAdTCSwPGnX0HMicDBIF5ApD4xV/OZMvAmDm1ALdr 5q9c4kSdxD9zaehYSv3c7kx7wBwYC5j4LVGBXQPu6Zdw7KuG8dS8OwRu9oWwIgNtPxwT CTgtowrp1vgWgD4pvzjTs7bBEcfKG7gbiHR8UvFvjmXZKXxZtE9gOFJRvgYpv6firUfC cUGQ== X-Gm-Message-State: ANoB5pm86hzV0MTnJTyTJdnCwo77mPnoGEc5ZpepOPEODEe2a+TMrmdZ RU7dQ3owsdtVIMXFoxK96n4MSA== X-Received: by 2002:a17:902:ab57:b0:189:4de5:6c7f with SMTP id ij23-20020a170902ab5700b001894de56c7fmr2866574plb.3.1670527233568; Thu, 08 Dec 2022 11:20:33 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:3aa1:2c62:9ac:4468]) by smtp.gmail.com with ESMTPSA id u5-20020a170902e5c500b00186a2274382sm17112019plf.76.2022.12.08.11.20.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 11:20:33 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Dmitry Torokhov Cc: mka@chromium.org, swboyd@chromium.org, linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, Yunlong Jia , Konrad Dybcio , Douglas Anderson , Andy Gross , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time Date: Thu, 8 Dec 2022 11:20:03 -0800 Message-Id: <20221208111910.2.I65ac577411b017eff50e7a4fda254e5583ccdc48@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221208192006.1070898-1-dianders@chromium.org> References: <20221208192006.1070898-1-dianders@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751674922469835322?= X-GMAIL-MSGID: =?utf-8?q?1751674922469835322?= In general, the timing diagrams for components specify a minimum time for power cycling the component. When we remove power from a device we need to let the device fully discharge and get to a quiescent state before applying power again. If we power a device on too soon then it might not have fully powered off and might be in a weird in-between / invalid state. eDP panels typically have a time that's at least 500 ms here. You can see that in Linux's panel-edp driver that nearly every device specifies a "unprepare" time of at least 500 ms. This is a common minimum and the 500 ms is even in the example in the eDP spec. In Linux, the "panel-edp" driver enforces this delay for its own control of the regulator, but the "panel-edp" driver can't do anything about other control of the regulator (for instance, by the touchpanel driver). Let's add 500 ms as a board constraint for the regulator that's used for eDP/touchpanel on trogdor boards. If a given trogdor board stuffs only panels that can use a shorter time or stuff some panels that need a larger time then they can manually adjust this timing. We'll only do this minimum delay for trogdor devices with eDP (ones that use either bridge chip), not for devices with MIPI panels. MIPI panels could have similar constraints but the 500 ms isn't necessarily as standard and there are no known cases where this delay is needed. For most trogdor boards, this doesn't actually seem to affect anything when testing against shipping Linux. However, with pazqel360 it seems that this does make a difference. It seems that the touchscreen on this board _also_ needs some time for the regulator to discharge. That time is much less than 500 ms, so we'll just put the eDP panel 500 ms in there since the board constraint should be the "max" of the components. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- .../boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi | 12 ++++++++++++ .../boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi index ebd6765e2afa..e27a769f8cd4 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi @@ -26,6 +26,18 @@ pp3300_brij_ps8640: pp3300-brij-ps8640-regulator { }; }; +/* + * ADDITIONS TO FIXED REGULATORS DEFINED IN PARENT DEVICE TREE FILES + * + * Sort order matches the order in the parent files (parents before children). + */ + +&pp3300_dx_edp { + off-on-delay-us = <500000>; +}; + +/* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */ + &dsi0_out { remote-endpoint = <&ps8640_in>; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi index 65333709e529..3188788306d0 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi @@ -7,6 +7,18 @@ #include +/* + * ADDITIONS TO FIXED REGULATORS DEFINED IN PARENT DEVICE TREE FILES + * + * Sort order matches the order in the parent files (parents before children). + */ + +&pp3300_dx_edp { + off-on-delay-us = <500000>; +}; + +/* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */ + &dsi0_out { remote-endpoint = <&sn65dsi86_in>; }; From patchwork Thu Dec 8 19:20:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 31471 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp379502wrr; Thu, 8 Dec 2022 11:23:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ejn/x7FnR4uv+Fmy0XnavTZAIf5/wT0bdsb5pPZWhnpLXyzW++0UyTxc5Ad1tGmFkqCKt X-Received: by 2002:a63:ed55:0:b0:479:729:4e27 with SMTP id m21-20020a63ed55000000b0047907294e27mr3269862pgk.417.1670527400711; Thu, 08 Dec 2022 11:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670527400; cv=none; d=google.com; s=arc-20160816; b=J1yy6wr2Z9FXDz9Cyy17LUDXX+/AbpEZB7b7WE6a7m0GfbDrHrEi4XBbZkct+4cwku jBg4Fj7ymJ4u6vDqFsoNQ69JXJxXWi4MoViuCfI39sHHz9yvAftVdqCddv+6F0FaP6Tm 4EKCR9lyU8azQz+ET7T+ZYykArdnf3fkK/sbIK40ARY6xDOhLHJPo6IHglFKWm+4MzIZ NTol2l1PwmbY/WhBhzeS7vUaMQBtUK/XXwvBYL8+MvxAll717G4izTUZCQWskS+Q7p39 FCN0PrGQLqOr7DiIVOajoimzQR26pncfg83fKK6COcC8IKgJ+rvMug7xU/VhimJ8SrUk IOsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZtJpVPTjR3+tHW4ZAsKi6ZeDCRthwe5efj4GVpBmxAs=; b=SAJnyVwaHc3ON9CFFaSIBuHO7NapF10/a3MpdKXu+AeSzpW1e4x6/gU9TsxvTxxu/o ziwFWzKGfQD68xNz3ZLnRGKVs07SoAD4lTEsBIB1ANbG6SFrxZPe+8xGnPs4Jp0+kwaG Kwx3MpI9nxRAlBmFZ/OenE2x1TODsHEPPVbZYmOjOHj4/HodMl0JHBGmKadEYrFJlVH4 lArINC6Lb9P0Nqn7WL2+XQgaAGBBQ9E4Rr5n+t0nKDsf5kLZyjzUNeC4clf7aKVVe0M9 12w1jxeLmVG3fdfSqwVKMuLeHDNz0t7ID1I48pfmjUhZ1SAGStZceG2bj807EwyjwPhK 53XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ffwgN8uE; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t64-20020a638143000000b00478bf133319si11730903pgd.189.2022.12.08.11.23.07; Thu, 08 Dec 2022 11:23:20 -0800 (PST) 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=@chromium.org header.s=google header.b=ffwgN8uE; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbiLHTUr (ORCPT + 99 others); Thu, 8 Dec 2022 14:20:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbiLHTUg (ORCPT ); Thu, 8 Dec 2022 14:20:36 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A19F199F00 for ; Thu, 8 Dec 2022 11:20:35 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id s7so2477379plk.5 for ; Thu, 08 Dec 2022 11:20:35 -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=ZtJpVPTjR3+tHW4ZAsKi6ZeDCRthwe5efj4GVpBmxAs=; b=ffwgN8uE9SL85C/Va1myHLoiUBLtcIfijgTVQy/h5ctIq5eaiuAtLJ/whuPeuP9/s+ tRZlTOzztFg5Cqxb7Kq1D+br5dM2i06yjSwfofpoUzA3fKPWfNBk5jwdtJlYANWUuqIW wl/ROE4R+66WuQhJgaaSlZtnZmZzzW3xtnjG8= 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=ZtJpVPTjR3+tHW4ZAsKi6ZeDCRthwe5efj4GVpBmxAs=; b=MEo88Cvc1FZKmYtnzEiYB8omT3BZ2SUBH4CYK5TbtVBJN6ZXP10973wm9G5RUduqsY W36gZKpvx2QWSxEM1JgRdnB2Y8xuBjBmL9ZyVsh9ogPAYCr/GFYJs7JUtU+QwvfYkOi1 8ajvqOYE4XYoIxL3XorUqxZvme36x85sxY7OUUIZN+b2t5yKwuxvaBFd1dGjAqqAkvSW EnT2HLPdcw/V9Y3MDdsM9QcTZugtmYciCBMpKutAICkG67HlEf0MDJk6g/8EcNtSnJyR MBt6IKz6YiIsvJgtYrt2Nxwm+TZ8X7PJpBlJPhZwQHvhop6rElS6oG2tWLb6d0b8Fmly HiBQ== X-Gm-Message-State: ANoB5pmk2GOE4QVp+ar/uU9ErCgNmNSGDBE/RW6qZebPWriRQ28VsQXM 0C7btN+eMvHNF4nIWZx12I/bwg== X-Received: by 2002:a17:902:c745:b0:189:9519:87b6 with SMTP id q5-20020a170902c74500b00189951987b6mr2424138plq.5.1670527235158; Thu, 08 Dec 2022 11:20:35 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:3aa1:2c62:9ac:4468]) by smtp.gmail.com with ESMTPSA id u5-20020a170902e5c500b00186a2274382sm17112019plf.76.2022.12.08.11.20.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 11:20:34 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Dmitry Torokhov Cc: mka@chromium.org, swboyd@chromium.org, linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, Yunlong Jia , Konrad Dybcio , Douglas Anderson , Andy Gross , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] arm64: dts: qcom: sc7180: Start the trogdor eDP/touchscreen regulator on Date: Thu, 8 Dec 2022 11:20:04 -0800 Message-Id: <20221208111910.3.I7050a61ba3a48e44b86053f265265b5e3c0cee31@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221208192006.1070898-1-dianders@chromium.org> References: <20221208192006.1070898-1-dianders@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751674939867974885?= X-GMAIL-MSGID: =?utf-8?q?1751674939867974885?= Now that we've added the `off-on-delay-us` for the touchpanel regulator, we can see that we're actually hitting that delay at bootup. I saw about 200 ms of delay. Let's avoid that delay by starting the regulator on. We'll only do this for eDP devices for the time being. NOTE: we _won't_ do this for homestar. Homestar's panel really likes to be power cycled. It's why the Linux driver for this panel has a pm_runtime_put_sync_suspend() when the panel is being unprepared but the normal panel-edp driver doesn't. It's also why this hardware has a separate power rail for eDP vs. touchscreen, unlike all the other trogdor boards. We won't start homestar's regulator on. While this could mean a slight delay on homestar, it is probably a _correct_ delay. The bootloader might have left the regulator on (it does so in dev and recovery modes), so if we turned the regulator off at probe time and we actually hit the delay then we were probably violating T12 in the panel spec. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- .../boot/dts/qcom/sc7180-trogdor-homestar.dtsi | 18 ++++++++++++++++++ .../dts/qcom/sc7180-trogdor-parade-ps8640.dtsi | 8 ++++++++ .../dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi | 8 ++++++++ 3 files changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi index d3cf64c16dcd..b3ba23a88a0b 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi @@ -85,6 +85,24 @@ map1 { }; }; +/* + * ADDITIONS TO FIXED REGULATORS DEFINED IN PARENT DEVICE TREE FILES + * + * Sort order matches the order in the parent files (parents before children). + */ + +&pp3300_dx_edp { + /* + * The atna33xc20 really likes to be power cycled to keep it from + * getting in a bad state. This is the reason that the touchscreen + * rail and eDP rails are separate from each other on homestar (but + * not other trogdor devices) Make sure it starts "off" at bootup. + */ + /delete-property/ regulator-boot-on; +}; + +/* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */ + ap_ts_pen_1v8: &i2c4 { status = "okay"; clock-frequency = <400000>; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi index e27a769f8cd4..5aa7949b5328 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-parade-ps8640.dtsi @@ -34,6 +34,14 @@ pp3300_brij_ps8640: pp3300-brij-ps8640-regulator { &pp3300_dx_edp { off-on-delay-us = <500000>; + + /* + * It's nicer to start with this regulator enabled. The + * bootloader may have left it on and it's nice not to cause an + * extra power cycle of the touchscreen and eDP panel at bootup. + * This should help speed bootup because we have off-on-delay-us. + */ + regulator-boot-on; }; /* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */ diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi index 3188788306d0..e52b8776755d 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-ti-sn65dsi86.dtsi @@ -15,6 +15,14 @@ &pp3300_dx_edp { off-on-delay-us = <500000>; + + /* + * It's nicer to start with this regulator enabled. The + * bootloader may have left it on and it's nice not to cause an + * extra power cycle of the touchscreen and eDP panel at bootup. + * This should help speed bootup because we have off-on-delay-us. + */ + regulator-boot-on; }; /* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */ From patchwork Thu Dec 8 19:20:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 31473 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp379892wrr; Thu, 8 Dec 2022 11:24:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf6XH/pUd4HoCaKAPpLkCxBKFW1+0dhOk4yuNVIf27tLo9E+JozW6aVpYofNRd7hTIY5aFwJ X-Received: by 2002:a63:d602:0:b0:478:d2ac:ebda with SMTP id q2-20020a63d602000000b00478d2acebdamr12919586pgg.99.1670527457416; Thu, 08 Dec 2022 11:24:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670527457; cv=none; d=google.com; s=arc-20160816; b=bnKBfkzllWZJ0p1hrOQfQYZLIWKJqUiULsCarJnSdcSFmn39DvKDGWlXvuSHiuMD4N 3JNNhlmPL2sIasC24DGvm6S/Ub5ghUGk9N/diM2+OAc6SZK3Kzx2SvzF/fRtGdGO+4ub 8KiATf8ej3PKHaGiotkfMFq+XMuigJC98kBDHWpXCxGjwQSzEl//EuZv6vcYG6/2UsrD NF9yc1Y5H3c4/t3QHeOkIuzYZIUuZMtwE4UtZxnsdjoMps+Pf7X3sXL4gBLVVaEGypom 8ooZNIloJRs7NCxmH8Hi6r91P0lH1PUI33x/FJ1tDvdfByByFDJIgcbtiY010c+gOsnA nPkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SghZa+kW7wIj2RUcdePRPR1tV1IHuHFiC2Ew9exQVO0=; b=ADmyHI2st81ALmq5t+4c5oL/Lb8+d6+pTf33m5uYYdP7ZEnwaBmW4BrBTnKJiTZSVk SSNfm3WrdJcBeuXeW9Ipw7cnI3QvJ2sRYlNuyi2MWy99NI4zVsC5uMsxyKUdUNx9Wulr QrWRW9SH9xw+sanI6ST9r/v3o7efJc47iYmbXs8BwQQ309lEWZM49xP5vVUGeKTRcplO nrnD/0WRgj4hfdU+gjbmHXt2qABhyc5w1Lb2m/LbkjtCWfE7Hn+b0hg5Ezfs+KtIoVYi riPiTQxLBlW3a7E3+zbIA5nwkIAWN1Umd1iOxF/mQpEl6EsCeCYDhWBDJuWJNfmmrfMC Asug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ak7msN6A; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a170903245200b001893689660asi25793977pls.209.2022.12.08.11.24.04; Thu, 08 Dec 2022 11:24:17 -0800 (PST) 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=@chromium.org header.s=google header.b=ak7msN6A; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229812AbiLHTVP (ORCPT + 99 others); Thu, 8 Dec 2022 14:21:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbiLHTUj (ORCPT ); Thu, 8 Dec 2022 14:20:39 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4148A99F2F for ; Thu, 8 Dec 2022 11:20:37 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id k88-20020a17090a4ce100b00219d0b857bcso2554824pjh.1 for ; Thu, 08 Dec 2022 11:20:37 -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=SghZa+kW7wIj2RUcdePRPR1tV1IHuHFiC2Ew9exQVO0=; b=ak7msN6Am+PYdy9SBwDyO8HiaGzwCdF79wcoo7pb8KdOw8kNKiwvT04KD8UeG3l4yf GHh80N84AQqX/dKIQiW+9jBDoDh48Vvk/EYWPaYl9SreZxA583cg2J/RuMvZaT2uBUXF DerpsC3NQVtxvjdcQP0Sp8sv2U5KgcCeb+5A4= 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=SghZa+kW7wIj2RUcdePRPR1tV1IHuHFiC2Ew9exQVO0=; b=LFm8ix0RLUhFSxVVEpyIstC89dArN33QLfrHM9Nn+Jiqy3AJsD/YV5oJmFTM2opmOA yYnIM5J1O9FGcGMTbsBmvHPBfLrOfiM1Hav2nmB9VLwziOLvAjAPc6YDXVyiBTCZnLUB zzvweUf4vtZKt95nFgYhLARyX1CNfdVC/aD71igIzL5NLmBeHbncJ3Awsf+vYUWJo6WG Feim42F1FbcpWwsjs48rmUCA3a4IxqrSYwOG+EJnRVK4zbKW95LNEkRpKKthT6Nu8tmM ck0vsCr94at8yySsT1GuORrrPQYIa1S5ErrFwcyiHQkg56hmsCYJJn2r01LFSIQTqrWq aZ2w== X-Gm-Message-State: ANoB5pmNR0G/i0gtv4Q5EaDXh0H9pOzviMnh5Dzd366Hw4pGDxl+uSWd zr/KGCX/pfbT5gTsbMy/dwKHZw== X-Received: by 2002:a17:902:f7ca:b0:189:b203:9e2f with SMTP id h10-20020a170902f7ca00b00189b2039e2fmr2971988plw.56.1670527236814; Thu, 08 Dec 2022 11:20:36 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:3aa1:2c62:9ac:4468]) by smtp.gmail.com with ESMTPSA id u5-20020a170902e5c500b00186a2274382sm17112019plf.76.2022.12.08.11.20.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 11:20:36 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Dmitry Torokhov Cc: mka@chromium.org, swboyd@chromium.org, linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, Yunlong Jia , Konrad Dybcio , Douglas Anderson , Andy Gross , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] arm64: dts: qcom: sc7180: Add pazquel360 touschreen Date: Thu, 8 Dec 2022 11:20:05 -0800 Message-Id: <20221208111910.4.Id132522bda31fd97684cb076a44a0907cd28097d@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221208192006.1070898-1-dianders@chromium.org> References: <20221208192006.1070898-1-dianders@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751674999292086697?= X-GMAIL-MSGID: =?utf-8?q?1751674999292086697?= The touchscreen was supposed to have been added when pazquel360 first was added upstream but was missed. Add it now. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- .../dts/qcom/sc7180-trogdor-pazquel360.dtsi | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi index 5702325d0c7b..54b89def8402 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel360.dtsi @@ -14,6 +14,27 @@ &alc5682 { realtek,dmic-clk-rate-hz = <2048000>; }; +ap_ts_pen_1v8: &i2c4 { + status = "okay"; + clock-frequency = <400000>; + + ap_ts: touchscreen@10 { + compatible = "elan,ekth3915", "elan,ekth3500"; + reg = <0x10>; + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_l>, <&ts_reset_l>; + + interrupt-parent = <&tlmm>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + + hid-descr-addr = <0x0001>; + + vcc33-supply = <&pp3300_ts>; + vccio-supply = <&pp1800_l10a>; + reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>; + }; +}; + &keyboard_controller { function-row-physmap = < MATRIX_KEY(0x00, 0x02, 0) /* T1 */ From patchwork Thu Dec 8 19:20:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 31472 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp379804wrr; Thu, 8 Dec 2022 11:24:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf44foj57+0KeaDcMu6e4HrfPwFf88thKsWyeff3z6o6AsQ98tBEUkkOUuPy8P4CAO5rQ4/+ X-Received: by 2002:a63:5d55:0:b0:46e:fd0a:fe7a with SMTP id o21-20020a635d55000000b0046efd0afe7amr70240863pgm.59.1670527441105; Thu, 08 Dec 2022 11:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670527441; cv=none; d=google.com; s=arc-20160816; b=bFlzqZv2QYqKxBBa0/MQUKf9GwAqGWhVjYAdFw6klqLD14cJYjnjbwxIo4sQhgN13X l8jwuquqGtyfN9Tt9qSzUj8KId8GWfzOuPH82fjGIPpeoE3FiagKA8Pwcc2yC4N2N19F OAGBdih4UiN6wJo8t/DKYsTGqLgsdVnIaQeUmuK0o5uG2PW+ABOORaari8aF836a4qsH rShWifBxbCFgHOMjhcsaFgiM7DpqncAR/7N8AsKN02tWdneX8k6DJOCZCEM9JPRQV9Hg 6mg4GfPbp5QXTDQyY22WAiY77sLTDXubgYz9bka+DrqBbu5gqZE6e7c/jO0WbqEBzsYM ZfKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qBUYq/f5W1QpvWQ1L0owj+9liBAfVOZ5HyYf2BUvGw4=; b=MRtCVYQqLOZVTR3LjX7MjdadG044mprkyQi8Uk3oJSRpB/ERJVAgkLI2d1cNkfo/l0 EgqoDzeVMgUTvrQ1Y3WR7dGyW+ut83OWnoE8+UFZNeipuvM5mHMwtDzGSWRXa6F9xvm8 Fd9dOmFZ7uac8/ho3a6CngT1DIehMtdvpUBlQDf4+VqF/qIgAzO9nPP6d+r9MatMQKxE mIJ4p6DxiAnaWLHxheFbImh6w8TEeWWTpPH+Uv8k7a5JOWGTvwYGC2UFPzAkUN9Vajfr MsvU7PcQp3/pd/Wjihm445k0LH8jF5y8c0TYtPr6VTvXypwoeqoQmCMXjW8z93datQT3 GpYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Yq20ujLH; 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=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb12-20020a17090b35cc00b00200b014d2adsi16111pjb.26.2022.12.08.11.23.47; Thu, 08 Dec 2022 11:24:01 -0800 (PST) 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=@chromium.org header.s=google header.b=Yq20ujLH; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbiLHTVU (ORCPT + 99 others); Thu, 8 Dec 2022 14:21:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiLHTUx (ORCPT ); Thu, 8 Dec 2022 14:20:53 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B02509B285 for ; Thu, 8 Dec 2022 11:20:38 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so5677247pjs.4 for ; Thu, 08 Dec 2022 11:20:38 -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=qBUYq/f5W1QpvWQ1L0owj+9liBAfVOZ5HyYf2BUvGw4=; b=Yq20ujLHdDmxfsm6nXV56O+R5s3byqsOzEHjK+WiS1J/KE/7s2Me27w3dKPKEBUPXj EBxaZvKRup2jGETzG6pHkC4C/xO67Cr3V2UFuWIZ7iYRcD+t8/x/7b6NpJY4r9h9ugBF i2f52c853182eqqlzGcIlS/0+SsTPdNlNu2oo= 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=qBUYq/f5W1QpvWQ1L0owj+9liBAfVOZ5HyYf2BUvGw4=; b=I78WiK6/M0LGLVRGDkR8zFF+FbSwj32YoUrhVmdmNiYbwgu5n/etfcu8dAaRnx7q9C 8GBPpizXpzjd1/NDhTof9ut+h4sWyVvlzIFxcEEcAZeTNXSQaWofs+Pw/etUTuBdlxf5 zrGwsIBHg3fuuTR5ClF3O+bDNrUUPW8lFDkD7OgAkQw2JIIXBNgDmR/g2r65jHJT4SkN f4AtIQfwVDZeQJASWOIZzlTeOfXBMT0Mz+M0fVoD6akNHVWdVuFLVVF/iNq6MciGS66W CgDJ3vJw+LMLHqZjRjsgHwqQNeT3+A6m2MZ3KUmLGSWVHX4K1VAXcczheyzT8ghgT3oX VAZw== X-Gm-Message-State: ANoB5pmQfvaBVqQ1y9GoYaWgi+ivK2bnmh+bX+hIXnufwRpG35NjC3LI cwEnectNCQjYMsO79mOjWjsIaw== X-Received: by 2002:a17:903:40cf:b0:189:ccb2:f20a with SMTP id t15-20020a17090340cf00b00189ccb2f20amr3555544pld.49.1670527238392; Thu, 08 Dec 2022 11:20:38 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:3aa1:2c62:9ac:4468]) by smtp.gmail.com with ESMTPSA id u5-20020a170902e5c500b00186a2274382sm17112019plf.76.2022.12.08.11.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 11:20:37 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson , Dmitry Torokhov Cc: mka@chromium.org, swboyd@chromium.org, linux-arm-msm@vger.kernel.org, linux-input@vger.kernel.org, Yunlong Jia , Konrad Dybcio , Douglas Anderson , Johnny Chuang , linux-kernel@vger.kernel.org Subject: [PATCH 5/5] Input: elants_i2c: Delay longer with reset asserted Date: Thu, 8 Dec 2022 11:20:06 -0800 Message-Id: <20221208111910.5.I6edfb3f459662c041563a54e5b7df727c27caaba@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221208192006.1070898-1-dianders@chromium.org> References: <20221208192006.1070898-1-dianders@chromium.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751674982030311079?= X-GMAIL-MSGID: =?utf-8?q?1751674982030311079?= The elan touchscreen datasheet says that the reset GPIO only needs to be asserted for 500us in order to reset the regulator. The problem is that some boards need a level shifter between the signals on the GPIO controller and the signals on the touchscreen. All of these extra components on the line can slow the transition of the signals. On one board, we measured the reset line and saw that it took almost 1.8ms to go low. Even after we bumped up the "drive strength" of the signal from the default 2mA to 8mA we still saw it take 421us for the signal to go low. In order to account for this we let's lengthen the amount of time that we keep the reset asserted. Let's bump it up from 500us to 5000us. That's still a relatively short amount of time and is much safer. It should be noted that this fixes real problems. Case in point: 1. The touchscreen power rail may be shared with another device (like an eDP panel). That means that at probe time power might already be on. 2. In probe we grab the reset GPIO and assert it (make it low). 3. We turn on power (a noop since it was already on). 4. We wait 500us. 5. We deassert the reset GPIO. With the above case and only a 500us delay we saw only a partial reset asserted, which is bad. Giving it 5ms is overkill but feels safer in case someone else has a different level shifter setup. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- drivers/input/touchscreen/elants_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 879a4d984c90..377adf89b25c 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -114,7 +114,7 @@ /* calibration timeout definition */ #define ELAN_CALI_TIMEOUT_MSEC 12000 -#define ELAN_POWERON_DELAY_USEC 500 +#define ELAN_POWERON_DELAY_USEC 5000 #define ELAN_RESET_DELAY_MSEC 20 /* FW boot code version */