From patchwork Wed Oct 13 08:42:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Horatiu Vultur X-Patchwork-Id: 12555511 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB0A4C433F5 for ; Wed, 13 Oct 2021 10:53:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CD4E60F11 for ; Wed, 13 Oct 2021 10:53:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7CD4E60F11 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kdciy+ZE6xgxxGQRLuYF79brSLWvUDwGriG6tX+Wyv8=; b=NwvYdzgIuXDxC2 CkTG1uIIsIcP7ceXRrvA0QSGcXbKPkKL16edeK7NDtF2UYq0gvzEXIuYTwmMcF2xpUtjqhdrN4lFY GJ+CnAXfGddmt0/9xSNkblLRZ6vCMau4evtdxEtm5VlEELQK1wtBg7Dx1ylNXmnyVCPBTGek5OC3E OC2EaoL+0O1c6eIShRdzuTBwbx59Lw0NAMELC1tH5zOb+X2HJJUYAOdihnSNus4oQm+e419ezPfLW N5n6zOPW0sIQ4vpUgFz+ZNg6lzVg9u9se2YM9lmxCfdKuftY4YQQ38u+1WOIowzGuazbZ3VfiyEE+ cXss0s8Z60T/hFjbxlKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mabqg-00G6ip-Bi; Wed, 13 Oct 2021 10:51:03 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1maZpU-00FcYJ-Jg for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 08:41:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1634114500; x=1665650500; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nAIU5mKHgPCnMlpSj8ZGVDM3qQQtayRKJ1dDO6fPSac=; b=jlww2FmI980GJ4xVWySgSP2Mz8UIR7bTVkGYfIdtC4apgYABMYI+USD4 BwWpjM5sM3LwGNgsr+DPJplOb/fe6wKZwYERBrvhxU/7PYOxy5n7jOkhM fPf0J2k/WaAqWBBbkPkn9DCJNymSBcWUsGUmu6+vdCOwLgwvbH5bn0M9p 9LUgHIDQJX8inBAhoBdlDaG1wf7ShlcrqjgjmoxATRLVst+3EjoZOjZqE REy3IyfToVF49xmfUGSzjmuqPvb/N2TFa4upBWE9KqcbGvaO2gwYSv2s6 4/S0hIJNAP9PSTPtwNqakRiB36/VKp/y58zU93X8tb+YU3E3l2JvuGf56 g==; IronPort-SDR: p/Y46k/Fcpk/SgH2SI8cbozCXYIxNE3wPPNNwDzVck3LD75kocK6+6AA1/3Lf1Ms+TvM+XovO4 FaYzrKKtucskea03k5uoOGk++Ww3EBX3lBxp/5H52Nfa3BxBrsjuc+q47aHEp8acEmGf6IGyx1 1Cjnh4FsMP5dIYeBhcJ/HPE6vmkREtZiKFYdmkw5z8b7BxjiIz0jgY8majdWbPHUApplJNqu5e VMBwWM4138Hb+uwUH1vJ/kxGYlF13IjABssFZI1qMHh6RhGzYbypvMu/+9GdvaqwxxPsUeoraL AZCZVqLbHn4p9BmMX1Ku9cvc X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="140121174" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Oct 2021 01:41:39 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 13 Oct 2021 01:41:38 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 13 Oct 2021 01:41:36 -0700 From: Horatiu Vultur To: , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH v2 1/2] dt-bindings: pinctrl: pinctrl-microchip-sgpio: Add reset binding Date: Wed, 13 Oct 2021 10:42:16 +0200 Message-ID: <20211013084217.2298553-2-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211013084217.2298553-1-horatiu.vultur@microchip.com> References: <20211013084217.2298553-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_014140_705912_81217123 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This describes the new binding for calling the reset driver in the pinctrl-microchip-sgpio driver. Signed-off-by: Horatiu Vultur --- .../devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml b/Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml index 4fe35e650909..b91f9954ce01 100644 --- a/Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml +++ b/Documentation/devicetree/bindings/pinctrl/microchip,sparx5-sgpio.yaml @@ -109,6 +109,12 @@ patternProperties: minimum: 32 maximum: 128 + resets: + maxItems: 1 + + reset-names: + maxItems: 1 + required: - compatible - reg From patchwork Wed Oct 13 08:42:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Horatiu Vultur X-Patchwork-Id: 12555513 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BFD4C433F5 for ; Wed, 13 Oct 2021 10:54:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 517E160ED4 for ; Wed, 13 Oct 2021 10:54:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 517E160ED4 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8UeF75VH6XVM7XhB+kc4kC5UWS5BOHULz7ktZ6b9tr4=; b=OUZHnozUBLAtmE XOXkmPYQMsg9YcfKotXg8IHLQF+TMc8SGos8FGqW2IMoWFBLRdmkJSa9cMnxs8JWDZeIM8pitdRxm m5e2eRJj1Gp62wKkQuiSz+CeEohwbsuI5l9SBCQtRxX/ivqP9z8TpXg/fJvBE612m7DdI8Emn7+jv BSYtWHh8mUHzyfuA61OaAuQ/Dps+b2xXDSaS5Wgd9bhoissb9AZqYFzjeVgZtBJ1gJV8hLLbxcwKg 60ouP0tfe48yy1kLe0mQ/wxmHUbj2uH4igm+/fUuFSMXkX+FXT4HpkNYZJnBXCvtRRdX4Wj9Bl9GU 0BYx3lv2S3yqKD+8b1dg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mabrb-00G6vF-SO; Wed, 13 Oct 2021 10:52:02 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1maZpW-00FcYJ-3e for linux-arm-kernel@lists.infradead.org; Wed, 13 Oct 2021 08:41:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1634114502; x=1665650502; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2SfxK57vRWHEZrPMMA/I/4JeY6YI1pn+Pq8lPJzvFYk=; b=RXbXkwEUYEM8pQ6TJMWG2AUKxzn8gQU2iHESbkvxzx5haFBRjtfga/kd 9Ja/GqmaCgcWjbRJlL4T6MTcrXiBjRR4K18jD+tzEjO8QP2WMsH4WceEi nFWFclQMMKFwhOSvavEEK5cJJFe1PrCQ5yOxVAoKMlIFr0tevwTRox1YR cjYSmlGZ7xsmujWof3kFpF/x6fDiXUqFA5ZNzXxNtfOxNcHlXI70QeWi0 Y9z0gjAg0i1kndkKV6G/281OHRzYgR35lSXJ7ihNezS7w0Go82og46EGs bYOImjPdCGH3vJnfBYcINWER3t5dl35Xm4ZZ4wmwDfEDFC1DZTgtbJGBO w==; IronPort-SDR: rRB1HVAnKZzbuOFDt3wOq3966HtGLzDXjFNbESo3l/cXxfc/HdD00t6L6fF4JOAUmgZ8FYYAUo cbwqE0cYaU0E17QyCDCElV9D+KCjPvTaMnIXcot0mWGaeGolt9K41mIIE7vMUKs7+qWi5qcIu/ RkrBMK1lcRfZGNxnA5HUXa3fw1EQOqwoZSX67SbrMfNzGdcBlcZjX9kaObZqHsu2t68fDLCml2 HIPUhyAK/qY8hjHR/hoTrvJbBjJLxAJ6PcDqZf19Joxlqc5yVhL38rm8WKT7ramXTb6orn+Rmm mjx5h3xJTp2wmwIm/d2xZfGi X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="140121183" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Oct 2021 01:41:41 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Wed, 13 Oct 2021 01:41:41 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 13 Oct 2021 01:41:39 -0700 From: Horatiu Vultur To: , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH v2 2/2] pinctrl: microchip sgpio: use reset driver Date: Wed, 13 Oct 2021 10:42:17 +0200 Message-ID: <20211013084217.2298553-3-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211013084217.2298553-1-horatiu.vultur@microchip.com> References: <20211013084217.2298553-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_014142_176730_2B4E6ECD X-CRM114-Status: GOOD ( 13.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On lan966x platform when the switch gets reseted then also the sgpio gets reseted. The fix for this is to extend also the sgpio driver to call the reset driver which will be reseted only once by the first driver that is probed. Signed-off-by: Horatiu Vultur --- drivers/pinctrl/pinctrl-microchip-sgpio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c index 072bccdea2a5..e8a91d0824cb 100644 --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "core.h" #include "pinconf.h" @@ -803,6 +804,7 @@ static int microchip_sgpio_probe(struct platform_device *pdev) int div_clock = 0, ret, port, i, nbanks; struct device *dev = &pdev->dev; struct fwnode_handle *fwnode; + struct reset_control *reset; struct sgpio_priv *priv; struct clk *clk; u32 val; @@ -813,6 +815,10 @@ static int microchip_sgpio_probe(struct platform_device *pdev) priv->dev = dev; + reset = devm_reset_control_get_shared(&pdev->dev, "switch"); + if (!IS_ERR(reset)) + reset_control_reset(reset); + clk = devm_clk_get(dev, NULL); if (IS_ERR(clk)) return dev_err_probe(dev, PTR_ERR(clk), "Failed to get clock\n");