From patchwork Thu Oct 22 01:25:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7461761 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C20D6BEEA4 for ; Thu, 22 Oct 2015 01:27:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DDF4C2078C for ; Thu, 22 Oct 2015 01:27:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10FE3204EB for ; Thu, 22 Oct 2015 01:27:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zp4er-0003s8-Gu; Thu, 22 Oct 2015 01:27:09 +0000 Received: from mail-pa0-f68.google.com ([209.85.220.68]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zp4e7-0003C7-Eh; Thu, 22 Oct 2015 01:26:25 +0000 Received: by padda3 with SMTP id da3so7473076pad.1; Wed, 21 Oct 2015 18:26:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vJPO8ftumd9rVE9itgku74eSi/J9Ihm+vnJqFL+PKOk=; b=SdcIXuxBQWj7MgkFlxk2dsszdHwYaaBKkQWAoI5ndM/Qva/u0PsaE3/WuXEaT41KMl DrcTrppUac7AcMgFUt5wF44+fLu9aQLyQLWvQPF3svlYTkAkA29NFBQna4k7gOc1up9N LMs67PZc/aTfZ4RZ2xQMzSabGtlm3lJxp5sroSygXq6OLl4LhQGmUz/L3U0KFk/SSPNT t5rDClG+JgjE0N5FwPGtai8SpcUHvS978oeNPu5EsN2aH42Op8I6O4gJRLnOblHZRfX3 ulBDElTW7/EVkS59DDpL7kuUb3I/qMlDLDyZfXboLwMgc/sL61/bnH/Wqm0QBZiKw8KD P7qQ== X-Received: by 10.68.212.197 with SMTP id nm5mr14197879pbc.108.1445477165143; Wed, 21 Oct 2015 18:26:05 -0700 (PDT) Received: from localhost.localdomain ([103.47.144.30]) by smtp.gmail.com with ESMTPSA id kw10sm11337311pbc.25.2015.10.21.18.25.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Oct 2015 18:26:04 -0700 (PDT) From: Caesar Wang To: Heiko Stuebner Subject: [PATCH v2 1/2] dt-bindings: Add the "init" pinctrl in this document Date: Thu, 22 Oct 2015 09:25:29 +0800 Message-Id: <1445477130-17065-2-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445477130-17065-1-git-send-email-wxt@rock-chips.com> References: <1445477130-17065-1-git-send-email-wxt@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_182623_701697_86B9C4B4 X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Ian Campbell , Pawel Moll , linux-pm@vger.kernel.org, Dmitry Torokhov , dianders@chromium.org, linux-kernel@vger.kernel.org, Eduardo Valentin , linux-rockchip@lists.infradead.org, Rob Herring , Kumar Gala , Zhang Rui , linux-arm-kernel@lists.infradead.org, Caesar Wang MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The "init" pinctrl is defined we'll set pinctrl to this state before probe and then "default" after probe. Add the "init" pinctrl as the OTP gpio state, since we need switch the pin to gpio state before the TSADC controller is reset. As I know, the TSADC controller is reset, the tshut polarity will be a *low* signal in a short period of time for some devices. Says: The TSADC get the temperature on rockchip thermal. If T(current temperature) < (setting temperature), the OTP output the *high* signal. If T(current temperature) > (setting temperature), the OTP output the *low* Signal. In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can accept the reset response time to avoid this issue. In other words, the system will be always reboot if we make the OTP pin is connected the others IC to control the power. Signed-off-by: Caesar Wang Reviewed-by: Douglas Anderson --- Changes in v2: - As the Rob comments, add the 'init' pinctrl more decription in document. - fix the subject to make more obvious in PATCH[1/2] Series-changes: 1 - As the Doug comments, add the 'init' property to sync document. Changes in v1: None Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt index ef802de..28e84f7 100644 --- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt @@ -27,8 +27,9 @@ tsadc: tsadc@ff280000 { clock-names = "tsadc", "apb_pclk"; resets = <&cru SRST_TSADC>; reset-names = "tsadc-apb"; - pinctrl-names = "default"; - pinctrl-0 = <&otp_out>; + pinctrl-names = "init", "default"; + pinctrl-0 = <&otp_gpio>; + pinctrl-1 = <&otp_out>; #thermal-sensor-cells = <1>; rockchip,hw-tshut-temp = <95000>; rockchip,hw-tshut-mode = <0>;