From patchwork Thu Sep 29 01:15:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 610787 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 721A7C04A95 for ; Thu, 29 Sep 2022 01:16:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231949AbiI2BQE (ORCPT ); Wed, 28 Sep 2022 21:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbiI2BQC (ORCPT ); Wed, 28 Sep 2022 21:16:02 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 225BB1138E0; Wed, 28 Sep 2022 18:16:02 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id v186so85612pfv.11; Wed, 28 Sep 2022 18:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=BU+nDgTp4FzYVpuKCb0JHUgNuGWH3Om1JL3bunVELiE=; b=A0x2qxxd7VgDTwVVmF44TCkowfDAT8LZM/ThFvomS1q6mGKiPpWLuHmLPozdAIQ6bk 8DGmPjWUuHqevrxLJRSxTeQz+ghGSlSFzb9V8IjihndL5lzA/gbT/jsLrSKbpIeAlxTM iNvGazSV6E/BTLTq5+jUfMfh153cyZ24zEIaWdFp5eZOEd2HUF9It3wPdSjH4y5Bz7Ly WL8HcE+xScGlqCiG89WS/xvsaTzmdMGBwHXSPtGLqaoQ3VXWo8Ru8wEfkAIOsexx7P0u gn5Xsi7qHkrRcJOjofGsS6C8okv42dPYeXKuzuogvAmGAIkRBWK/JDVYBMJMBI4p93b3 ez1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=BU+nDgTp4FzYVpuKCb0JHUgNuGWH3Om1JL3bunVELiE=; b=dYddea3TawRiIGoq617xL/st0pZoailueXuAx14EFbEeiHKgG5gYYrBgC1gaEInNIy my/6Q+CJA8a9SJzggjwMISj8743P2M3YRN4D+YvRqOIVkHd1RJFS9Tag69fftl+42PWr N7cuUcsLWsCWNEvhyKGoQb90ptnRZs5kYmgGOCqES+cddkxyrjyqXOp77ENxyOxVDpdS puijlTpaw7SOP8Ea44vU80/FfWr1E758ytGf4r4/t0cjhVzqtUfm/O7YYv/7Cxs8ugdJ dMSpxI7L8o1QWptqF11wNjLPedVTOedlYtM7DYU5mrRv99P8oveA367dVZDiTIVlbkEu yUlw== X-Gm-Message-State: ACrzQf1WMU8gtjSkJmeg6d0+sR18sDPykCGIrUoWWuP/wyG88bfT8wyX PrlB6Vo9WvTcD1RLBlPrwmM= X-Google-Smtp-Source: AMsMyM6hjulu0JTSOCybn1i/7qzxsqC/IdkN8d1HzIAGH28CBW+sxxckdBQvuc2a8V8BGBIRzXn/ow== X-Received: by 2002:a63:3348:0:b0:439:db24:8b02 with SMTP id z69-20020a633348000000b00439db248b02mr568358pgz.425.1664414161469; Wed, 28 Sep 2022 18:16:01 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:637c:7f23:f348:a9e6]) by smtp.gmail.com with ESMTPSA id y16-20020aa78f30000000b00540a3252191sm4737655pfr.28.2022.09.28.18.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 18:16:00 -0700 (PDT) From: Dmitry Torokhov To: Krzysztof Kozlowski , Bjorn Andersson Cc: Krzysztof Opasiak , Alim Akhtar , Andy Gross , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] arm64: dts: exynos: fix polarity of "enable" line of NFC chip Date: Wed, 28 Sep 2022 18:15:55 -0700 Message-Id: <20220929011557.4165216-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org According to s3fwrn5 driver code the "enable" GPIO line is driven "high" when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low" when chip is in use. s3fwrn5_phy_power_ctrl(): ... gpio_set_value(phy->gpio_en, 1); ... if (mode != S3FWRN5_MODE_COLD) { msleep(S3FWRN5_EN_WAIT_TIME); gpio_set_value(phy->gpio_en, 0); msleep(S3FWRN5_EN_WAIT_TIME); } Therefore the line described by "en-gpios" property should be annotated as "active low". The wakeup gpio appears to have correct polarity (active high). Signed-off-by: Dmitry Torokhov --- arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi index 91c9bd1b47dd..bde6a6bb8dfc 100644 --- a/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos5433-tm2-common.dtsi @@ -795,7 +795,7 @@ s3fwrn5: nfc@27 { reg = <0x27>; interrupt-parent = <&gpa1>; interrupts = <3 IRQ_TYPE_EDGE_RISING>; - en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; + en-gpios = <&gpf1 4 GPIO_ACTIVE_LOW>; wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; }; }; From patchwork Thu Sep 29 01:15:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 612493 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 0E53DC04A95 for ; Thu, 29 Sep 2022 01:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233350AbiI2BQH (ORCPT ); Wed, 28 Sep 2022 21:16:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbiI2BQE (ORCPT ); Wed, 28 Sep 2022 21:16:04 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086631138E0; Wed, 28 Sep 2022 18:16:04 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id b23so91917pfp.9; Wed, 28 Sep 2022 18:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=F1+FkqfkwmhLCAn3NJHPER+7hJ8fiY2kv2ckZW4kL50=; b=nPFXGWzu0dPPBXFHQLhus1nG59TKq06lJtiE/k+1gx0JnzAwLbA5ZyrUNqZIRtut1O BQRHZ/v6M48oWSs5zoV43CwygfbdG3SaWP58dOlOTaNgGzU4gKQVld3GWu5RU5PMenry X7GOPLcCxUzwkY2jRHgSjZZsCAuK3sCUsffbXir+us8+HsAF40yqqKCF9qMKOjXOWGdm WtYC6da+eAo46nbc5WwQUBrj5IF3Qe8YF7ig3gR7sYYsR6viZ8rg79bxo08G5uQsW/QQ bB0Uby4mOlI11XzSUNyV247k9QFo/PdGWu9nCwKOmQ+BERvmuWdt6a/MLpgiN43ziOys qvrg== 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; bh=F1+FkqfkwmhLCAn3NJHPER+7hJ8fiY2kv2ckZW4kL50=; b=56HadpCyMGF+qniwK8xZ8mi9aH4e6xcn2CgA2SJ49R0XqJnoOr+48gjv/vpyu/EbkP GQtCPk9wLOGvemcUMaT8oGzwtZ8CdaPzTjUgcKZCaTtp3rA9Q/9aBqKY3nZI5WDNuYeR 06jPfr20LA+PW+w7Rlvei4iPKjzR2wYISNSIBqw/oVhenH5C9I+wa5r4BoLkCCMI/ZVc NPJnqOYRhgkLJRzn8vRre6IVWE2nNH+vb2raDih8EAMibQVCIgJOl+52bU0jiF8ataxk noScbY+3bQPTfzH7yictv45+PSN2X5Fg65GQuBNiEoDHLmPfPfHGcYcTmYw+rgCQA/t2 EX/g== X-Gm-Message-State: ACrzQf24cLRSLxFpoEGlIZa3Pucq1cc9GTPZoYwzxEmqLIEYiYjkQ3az I9WQ++6hZw0aKKS/hsDnvy4= X-Google-Smtp-Source: AMsMyM5JPA+5q3wy9oMlFnpsgGaUSHQrsazaUXbFoWfvqOvAQv+3m85/9snz/Wp5nsecy3cR9zM3ag== X-Received: by 2002:a05:6a02:318:b0:43c:e24a:961c with SMTP id bn24-20020a056a02031800b0043ce24a961cmr559038pgb.589.1664414163405; Wed, 28 Sep 2022 18:16:03 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:637c:7f23:f348:a9e6]) by smtp.gmail.com with ESMTPSA id y16-20020aa78f30000000b00540a3252191sm4737655pfr.28.2022.09.28.18.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 18:16:02 -0700 (PDT) From: Dmitry Torokhov To: Krzysztof Kozlowski , Bjorn Andersson Cc: Krzysztof Opasiak , Alim Akhtar , Andy Gross , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] arm64: dts: qcom: msm8916-samsung-a2015: fix polarity of "enable" line of NFC chip Date: Wed, 28 Sep 2022 18:15:56 -0700 Message-Id: <20220929011557.4165216-2-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220929011557.4165216-1-dmitry.torokhov@gmail.com> References: <20220929011557.4165216-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org According to s3fwrn5 driver code the "enable" GPIO line is driven "high" when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low" when chip is in use. s3fwrn5_phy_power_ctrl(): ... gpio_set_value(phy->gpio_en, 1); ... if (mode != S3FWRN5_MODE_COLD) { msleep(S3FWRN5_EN_WAIT_TIME); gpio_set_value(phy->gpio_en, 0); msleep(S3FWRN5_EN_WAIT_TIME); } Therefore the line described by "en-gpios" property should be annotated as "active low". The wakeup gpio appears to have correct polarity (active high). Signed-off-by: Dmitry Torokhov --- arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 3255bd3fcb55..5f7cec347a4f 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -144,7 +144,7 @@ nfc@27 { interrupt-parent = <&msmgpio>; interrupts = <21 IRQ_TYPE_EDGE_RISING>; - en-gpios = <&msmgpio 20 GPIO_ACTIVE_HIGH>; + en-gpios = <&msmgpio 20 GPIO_ACTIVE_LOW>; wake-gpios = <&msmgpio 49 GPIO_ACTIVE_HIGH>; clocks = <&rpmcc RPM_SMD_BB_CLK2_PIN>; From patchwork Thu Sep 29 01:15:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 610786 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 DF127C32771 for ; Thu, 29 Sep 2022 01:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233645AbiI2BQH (ORCPT ); Wed, 28 Sep 2022 21:16:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233045AbiI2BQG (ORCPT ); Wed, 28 Sep 2022 21:16:06 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4499B1138E5; Wed, 28 Sep 2022 18:16:05 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id n7so4417180plp.1; Wed, 28 Sep 2022 18:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=P6xn5k2w04qcw40pGqvk2hfkeCe3OpcAGkUOVnCrECg=; b=Mdix1ez2UFJ0v4X3ERTqjEVLBAX9bje7HCmdZdqxkh5iAyyTeZvi3aAqNO/fiNSp7I Z/lntDcF6QR+G68aq3MgndSDp+JFIaYFgi8V8DKBTSkBIVFvIaMpX0ABhRkpnGtjawbm JGF/8CEIRT28F7knuwnzS3c0SxMMU0YkJmMDKME7+yDrYO8rx2RAa3kEwMjNw4tP9Pnf 7Uzld5hjUSfayZEz4ZNOZowzPYJ2SqyyjJB+gxysKLzwA9b5Bypd/9wV8g20vpq9hBDW eMsBEynGINXNkOt6ExbYa0Y3WjBmAs1BnpYL23BLxmc+GZ4g3IY8nleJPMRg8TGtJjLR a8EA== 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; bh=P6xn5k2w04qcw40pGqvk2hfkeCe3OpcAGkUOVnCrECg=; b=h2huqJpZY6z6sHPgJmPWycGS3rVxSiC8Zor/+OKI0XhwIbEgZKC412ZUYRC0RCf+N5 ubWPbwlDp5OKA7RqLDM3ofYg6rfqtq1Qs7akHNUqttn55jMXHTzTzEtUzI+ayPxJwAx7 TRhzRf2D4ulopUS068S3r7uMDlkjTcEBthE8/++EtsXbfP0NK5m4tVCzhVbYPpKBpOhf ECQr8HoKj7gUEbPCutwA1sNeqgfKsYdxTXCyjIvs7pfFv35W1qRLQuCGyCYl/poGmNhl XpPHt5CRGt7fUIhqCOCjjboMT4ce+yf5cD/d6Q9c92l9HlkGI7zT92BytbT3E1zgBuaL T7Aw== X-Gm-Message-State: ACrzQf1OZsgp+ediO2WbnjXkrM3IYU/1hmU7lakhlxiBvpkJ4ws5Chon TNDrAtcwYIqAsc6Ab9aOrNYFfXy/IcM= X-Google-Smtp-Source: AMsMyM5ChV5LYfzLI0YM2SoghglQe4b1wxlFtJR8tcjNmOWHl+jSTjBmhN/5o3xp/JHVkrc6T/BaUw== X-Received: by 2002:a17:902:a511:b0:178:9702:7199 with SMTP id s17-20020a170902a51100b0017897027199mr779310plq.155.1664414164652; Wed, 28 Sep 2022 18:16:04 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:637c:7f23:f348:a9e6]) by smtp.gmail.com with ESMTPSA id y16-20020aa78f30000000b00540a3252191sm4737655pfr.28.2022.09.28.18.16.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 18:16:04 -0700 (PDT) From: Dmitry Torokhov To: Krzysztof Kozlowski , Bjorn Andersson Cc: Krzysztof Opasiak , Alim Akhtar , Andy Gross , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] dt-bindings: net: nfc: s3fwrn5: fix polarity of "enable" line of NFC chip Date: Wed, 28 Sep 2022 18:15:57 -0700 Message-Id: <20220929011557.4165216-3-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220929011557.4165216-1-dmitry.torokhov@gmail.com> References: <20220929011557.4165216-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org According to s3fwrn5 driver code the "enable" GPIO line is driven "high" when chip is not in use (mode is S3FWRN5_MODE_COLD), and is driven "low" when chip is in use. s3fwrn5_phy_power_ctrl(): ... gpio_set_value(phy->gpio_en, 1); ... if (mode != S3FWRN5_MODE_COLD) { msleep(S3FWRN5_EN_WAIT_TIME); gpio_set_value(phy->gpio_en, 0); msleep(S3FWRN5_EN_WAIT_TIME); } Therefore the line described by "en-gpios" property should be annotated as "active low". The wakeup gpio appears to have correct polarity (active high). Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml index 64995cbb0f97..78e3c13f1acb 100644 --- a/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml +++ b/Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml @@ -81,7 +81,7 @@ examples: interrupt-parent = <&gpa1>; interrupts = <3 IRQ_TYPE_EDGE_RISING>; - en-gpios = <&gpf1 4 GPIO_ACTIVE_HIGH>; + en-gpios = <&gpf1 4 GPIO_ACTIVE_LOW>; wake-gpios = <&gpj0 2 GPIO_ACTIVE_HIGH>; clocks = <&rpmcc 20>; @@ -93,7 +93,7 @@ examples: nfc { compatible = "samsung,s3fwrn82"; - en-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + en-gpios = <&gpio 20 GPIO_ACTIVE_LOW>; wake-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; };