From patchwork Fri Dec 9 17:12:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 632997 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 9A1A8C4708D for ; Fri, 9 Dec 2022 17:13:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230014AbiLIRN0 (ORCPT ); Fri, 9 Dec 2022 12:13:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbiLIRNW (ORCPT ); Fri, 9 Dec 2022 12:13:22 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C45D40936 for ; Fri, 9 Dec 2022 09:13:16 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id b13-20020a17090a5a0d00b0021906102d05so5588338pjd.5 for ; Fri, 09 Dec 2022 09:13:16 -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=30dMEap98zmC9FjobmK4HAr7EsnBPy2I728S8irHPHo=; b=SqpXkBzUzzGdcOEoAZiSACFm/WChD89j4Uxx9+5wm9SE08kj3TH0SDV2/fXJRh5+qK aV4iJdKWBV8EzVE91QPEG6iCBSwF7jeXbR9Z+mCho7sHhrPP7WGsD4B30zu3aSq682pa vt5znMBOCJDHjSVvhlRMW1B44dTeLKeDF6RmA= 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=30dMEap98zmC9FjobmK4HAr7EsnBPy2I728S8irHPHo=; b=XmZrLk25NjjG8ck4F0q9gHM+VZKwfKL70ygMo2duuq1bxzUTeiDYPNexpR2lji2b52 OstSOMYEcQGwLeME2WJRrdhZWxl6q1o75zDJcQ0MNhr+QbevpXfMXnLJuSHmqNP7pajV OTRnGHVCHj3JFvwNVwgbm4CPDpft6R1YPuG0NW/XN4MgZM6CegRcBQiVTDs1O2KyCEtO g8zerCHjRTzPNBrPTUNQNK6akqzZr16SMFnG5kl3mTA7hW/nNEw7gPT4ZVY2S6bk1iKM 0FQgd6zEo8ZZbJI//q1lfgAJTgzL9nAUpLZMum1KFlzv2ZAXg9N0DauukDFhB9FFD7pp wHTQ== X-Gm-Message-State: ANoB5plOFLJWlDq8lLDdZKiNhIW/F1n6IJWwHKEkETTsSgHm0Qgy6mqC ZHCdRU+JdtF8wbTAQsWS6NVkfF0qaLqjm7mnvIA= X-Google-Smtp-Source: AA0mqf7EnY6+VbLUEEY1RBV1EuWIccn+GFpNszeaWwG5gFJuHFttoTTi32iO7IMLJwflvkCf77UVRw== X-Received: by 2002:a17:902:9881:b0:185:441e:4d0e with SMTP id s1-20020a170902988100b00185441e4d0emr6484880plp.62.1670605996123; Fri, 09 Dec 2022 09:13:16 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:9a82:7898:7bf4:b4f]) by smtp.gmail.com with ESMTPSA id j16-20020a170902da9000b00189c62eac37sm1597503plx.32.2022.12.09.09.13.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 09:13:15 -0800 (PST) From: Douglas Anderson To: Bjorn Andersson Cc: swboyd@chromium.org, Dmitry Torokhov , mka@chromium.org, Yunlong Jia , linux-arm-msm@vger.kernel.org, Konrad Dybcio , linux-input@vger.kernel.org, Douglas Anderson , Andy Gross , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/4] arm64: dts: qcom: sc7180: Add trogdor eDP/touchscreen regulator off-on-time Date: Fri, 9 Dec 2022 09:12:38 -0800 Message-Id: <20221209091234.v3.2.I65ac577411b017eff50e7a4fda254e5583ccdc48@changeid> X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog In-Reply-To: <20221209171240.1614904-1-dianders@chromium.org> References: <20221209171240.1614904-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org 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 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 --- (no changes since v2) Changes in v2: - Fix typo in commit message (Matthias) .../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>; };