From patchwork Wed May 17 11:54:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Wanner X-Patchwork-Id: 13244800 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AC2F4C77B7F for ; Wed, 17 May 2023 11:54:38 +0000 (UTC) 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=oHVxijYaeX44gACq3CtRqT4dkSPI6mtPRtG0ZBmsG/s=; b=Q7lB5uY/lPfJZf 8juedxRbdMwNd5JeGNfoH9WshPsZiGnsZtGHDDWko1dpRZrYTyDdn1T5z6WFfUX9gQMPepFS1gyEn HxfQRc0GFnLdHCHIU8/p1P7mVyEaVhfTEehjfBIQm2J+DqpJllJyLXWtijhXk0lnK24+DJM2m6KPX f7bKO8cMegL9oDx3WLphoF0CFi6G8YmYiCKnLYmxYh0xYdO3q4jvR/Ygr3GsYOsNd0B/JpWr8/FJ/ rrmnY/OR1ZrhkFRd3ga3zRONtRpj+bwwpdK5DPmCGat+QUKQ8Oyu8Dkug3kN5xDPhKUT+SH4K8fDa h0h6uZNz8nnG7NXzlFaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzFjR-009guU-2s; Wed, 17 May 2023 11:54:13 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzFjO-009gt8-1T for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2023 11:54:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684324450; x=1715860450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H3FtDCLhrVU8sD+tqYMnUEm+nabD8KDFiQrtCAaSPlU=; b=tPSyFyqqH24E1OW87/M7MtkXJ96Pe9OFSEdGwH04dW9oScawjnLtDUM9 g8r20bmx6fLy2XS/94+vS2Qzm8yfY+jmLWy/iMzW7w5HPnh56nrmOF69z 4SOIIWYXqXwOIzMVB3XRxYOQYAEBeBn/KgBRoVxhkP6NIJ1gQHK3tskCD MBuVIcIyj8CB5tQZrWLhxkMkBxiQD2J/Ko3/AXwdoowNE49BaEAjvAUah +WbnUBuYbe+XIOjbRJQ/U1big0Ov54JJWBbhiAFir9+WPV5iL6lZiDEmC yEe2RLqR9lfae6H8dKuJKxL5pU9SJL/vgulNr/N/TzGmYJZqVxOpCmMVl Q==; X-IronPort-AV: E=Sophos;i="5.99,282,1677567600"; d="scan'208";a="213707567" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 May 2023 04:54:08 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 17 May 2023 04:54:08 -0700 Received: from ryan-Precision-5560.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 17 May 2023 04:54:04 -0700 From: To: , , , , , , , CC: , , , , Ryan Wanner Subject: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration Date: Wed, 17 May 2023 13:54:04 +0200 Message-ID: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230517_045410_505567_039E938D X-CRM114-Status: GOOD ( 11.58 ) 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 From: Ryan Wanner Enable push-pull configuration. Remove integer value argument from open-drain configuration as it is discarded when pinconf function is called from gpiolib. Add push-pull do debug and get functions. Signed-off-by: Ryan Wanner Acked-by: Nicolas Ferre --- drivers/pinctrl/pinctrl-at91-pio4.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c index 2fe40acb6a3e..3c39d62bbc3c 100644 --- a/drivers/pinctrl/pinctrl-at91-pio4.c +++ b/drivers/pinctrl/pinctrl-at91-pio4.c @@ -762,6 +762,11 @@ static int atmel_conf_pin_config_group_get(struct pinctrl_dev *pctldev, return -EINVAL; arg = 1; break; + case PIN_CONFIG_DRIVE_PUSH_PULL: + if (res & ATMEL_PIO_OPD_MASK) + return -EINVAL; + arg = 1; + break; case PIN_CONFIG_INPUT_SCHMITT_ENABLE: if (!(res & ATMEL_PIO_SCHMITT_MASK)) return -EINVAL; @@ -827,10 +832,10 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev, conf &= (~ATMEL_PIO_PUEN_MASK); break; case PIN_CONFIG_DRIVE_OPEN_DRAIN: - if (arg == 0) - conf &= (~ATMEL_PIO_OPD_MASK); - else - conf |= ATMEL_PIO_OPD_MASK; + conf |= ATMEL_PIO_OPD_MASK; + break; + case PIN_CONFIG_DRIVE_PUSH_PULL: + conf &= (~ATMEL_PIO_OPD_MASK); break; case PIN_CONFIG_INPUT_SCHMITT_ENABLE: if (arg == 0) @@ -948,6 +953,8 @@ static void atmel_conf_pin_config_dbg_show(struct pinctrl_dev *pctldev, seq_printf(s, "%s ", "debounce"); if (conf & ATMEL_PIO_OPD_MASK) seq_printf(s, "%s ", "open-drain"); + if (!(conf & ATMEL_PIO_OPD_MASK)) + seq_printf(s, "%s ", "push-pull"); if (conf & ATMEL_PIO_SCHMITT_MASK) seq_printf(s, "%s ", "schmitt"); if (atmel_pioctrl->slew_rate_support && (conf & ATMEL_PIO_SR_MASK)) From patchwork Wed May 17 11:54:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Wanner X-Patchwork-Id: 13244859 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C0E4BC77B75 for ; Wed, 17 May 2023 13:00:41 +0000 (UTC) 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=PIZwRSS0jQTjXH8oMo+us8rxELj5ekoQCJyCD2o5KV4=; b=S8wQ3FFVLqkdmR 5flpMQJOEkqjx9M9VGP61hGQa2iK4Eml8gs1PdaR0BuZPEgaR82zYCel73W11Pp0P71DsMvtRQ2Ah g2moNU6IfXP/Qy7BNyfWfEG1dU96vEo16fWLF342Itr0R9KmQW6nm7cglyaG9nzA/rwbaUjpcQJL6 b7hZ9RwfLBdl/3CWH7zcpY0mlg2/EHNkxKWFsev24I/U22HuBCgaKBt5ysoctWW8ztJ1X0/hSr3WN ZCSv7eZTCoEF4mnyeOqW3/FQv/bHbeqV0zjboE/Pv8fbGgZnYARM0X/wRmb1i4Cyqteq7TYH8gldo Ke3Enobgh9yBWSgGJcjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzGle-009sp2-2P; Wed, 17 May 2023 13:00:34 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzFjR-009gu4-19 for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2023 11:54:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684324453; x=1715860453; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WGOMQHnZTpw9dk6kO7DuPZBSvjfNXOGEhu//BHCo5Bk=; b=2mZRUA9QlGPTNPZFnrdJxedWgGmNgp4wPst1UEcxvkkS63Qv2SQizk82 tKhaAapNPy69f3PneaA1a6R63rSeCnfzubFkBXoXE5MqxG9Xz9v6IGP0J gADGInyY1SdLsetEyXQOrzJP+qNlk250NCEZRq5tQG6VxxoHszs1xvDCQ FdtPea9TzABThN4GlbevCQIOIX/f+8MibL2IZIR6hqYb+ZbW6OyQSNjGg GlWXGup98bo6xG4Q4aza7f/55TNVvGSNtxgUDrPZF6h6oSMOLfX8Ba0K1 3DotQ5/eBXxs74V6DI9UmiO8rUqO6rUrTMDK0dAu48o5BM+sHrUeSlriO w==; X-IronPort-AV: E=Sophos;i="5.99,282,1677567600"; d="scan'208";a="214268314" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 May 2023 04:54:13 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 17 May 2023 04:54:12 -0700 Received: from ryan-Precision-5560.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 17 May 2023 04:54:08 -0700 From: To: , , , , , , , CC: , , , , Ryan Wanner Subject: [PATCH 2/3] dt-bindings: pinctrl: at91-pio4: Add push-pull support Date: Wed, 17 May 2023 13:54:05 +0200 Message-ID: <048a41d1dcb3da0e845986a73eaac61a54c69269.1684313910.git.Ryan.Wanner@microchip.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230517_045413_399551_E0D50881 X-CRM114-Status: GOOD ( 10.35 ) 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 From: Ryan Wanner Add generic push-pull support for pio4 driver. Signed-off-by: Ryan Wanner Reviewed-by: Conor Dooley Acked-by: Conor Dooley Acked-by: Nicolas Ferre --- .../devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt index e2b861ce16d8..774c3c269c40 100644 --- a/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/atmel,at91-pio4-pinctrl.txt @@ -37,7 +37,8 @@ right representation of the pin. Optional properties: - GENERIC_PINCONFIG: generic pinconfig options to use: - bias-disable, bias-pull-down, bias-pull-up, drive-open-drain, - input-schmitt-enable, input-debounce, output-low, output-high. + drive-push-pull input-schmitt-enable, input-debounce, output-low, + output-high. - for microchip,sama7g5-pinctrl only: - slew-rate: 0 - disabled, 1 - enabled (default) - atmel,drive-strength: 0 or 1 for low drive, 2 for medium drive and 3 for From patchwork Wed May 17 11:54:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Wanner X-Patchwork-Id: 13244801 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id EAB23C77B7F for ; Wed, 17 May 2023 11:54:43 +0000 (UTC) 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=WMzQcKJXCFm4nuAiXCW6BHArp8336vKTcZ9edhKcqy8=; b=eGi7MF9XZRC1t4 fQnuCWLqLyqRsKaD4ojnYym9SUxMy735x2+wsrjueuIsQEyMuyD+UYczgHPvFL0059zeEa00W7ivv db3IC3qkkIBDl0JEaTq/xwEf6qP6WbJIuQ59M4cQhUhfRdcpoI0gienwQ6U/jAbIVBdl6EwJeMfZq oqfFMzuoRwvyN93ZnOtw5tMt3WK4u+g/mFwec7Njr5U0f5NzS2HsU0cDkGOjFKnrVLZto0q6suCwm nCJh50HZRWbK88SLBgOYUGXvsWZ3ciPYzMCy3eSLNW8KS+lhx55+rnmUq55JvVNqW1ca7rKpWEXup djv6BeH9wp+YptpOiMFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzFjb-009gzN-3A; Wed, 17 May 2023 11:54:23 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzFjV-009gww-1s for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2023 11:54:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684324457; x=1715860457; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RT0UlB3xEwYqeI/LH/lFegS8fsQcn4QNfOH63mMlj1o=; b=w9aAqCWrHam+R1UsIlvXbMxfK2g06Otj7OhmeZORuNk78HgWzFsUHySp 8/UIZqBMZJglYYVXDkbQkFUhMFJmHSN7dRShLGzZlh0W4CL/5cRgHKzY4 BpOToRZ3asP1PIs2vnKYCyiHdwSbaQltgwrLfsEGtbgqlQX7DRJGBM5RX FvgnmumJmWv8zincxyd38/+AzYcb0vAtGfGhBoDxHIlwHGQ98sqFCWLJi XuPCLLffgInXSb8pAeupwyCmLWtUVCylNlE50t+v1s6Uph8uZCjvcg5jA PJ2r/+LnjgKi29Dw9NPGb1loe7bOfoKzPBhyqVD/2Gi4gXGK63a4YNeaP A==; X-IronPort-AV: E=Sophos;i="5.99,282,1677567600"; d="scan'208";a="225738592" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 May 2023 04:54:16 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 17 May 2023 04:54:16 -0700 Received: from ryan-Precision-5560.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Wed, 17 May 2023 04:54:13 -0700 From: To: , , , , , , , CC: , , , , Ryan Wanner Subject: [PATCH 3/3] ARM: dts: at91: Return to boolean properties Date: Wed, 17 May 2023 13:54:06 +0200 Message-ID: <6f06be9e393c02563bc877498c8af75daf3b47f8.1684313910.git.Ryan.Wanner@microchip.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230517_045417_633607_A820AE59 X-CRM114-Status: GOOD ( 11.16 ) 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 From: Ryan Wanner Returning back to commit 0dc23d1a8e17 ("arm: dts: at91: Fix boolean properties with values") as pinctrl driver no longer expects an integer value and expects a simple boolean property. Signed-off-by: Ryan Wanner Acked-by: Nicolas Ferre --- arch/arm/boot/dts/at91-kizbox3-hs.dts | 2 +- arch/arm/boot/dts/at91-kizbox3_common.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/at91-kizbox3-hs.dts b/arch/arm/boot/dts/at91-kizbox3-hs.dts index 7075df6549e9..fec7269088d1 100644 --- a/arch/arm/boot/dts/at91-kizbox3-hs.dts +++ b/arch/arm/boot/dts/at91-kizbox3-hs.dts @@ -225,7 +225,7 @@ pinctrl_pio_zbe_rst: gpio_zbe_rst { pinctrl_pio_io_reset: gpio_io_reset { pinmux = ; bias-disable; - drive-open-drain = <1>; + drive-open-drain; output-low; }; pinctrl_pio_input: gpio_input { diff --git a/arch/arm/boot/dts/at91-kizbox3_common.dtsi b/arch/arm/boot/dts/at91-kizbox3_common.dtsi index abe27adfa4d6..465664628419 100644 --- a/arch/arm/boot/dts/at91-kizbox3_common.dtsi +++ b/arch/arm/boot/dts/at91-kizbox3_common.dtsi @@ -211,7 +211,7 @@ pinctrl_flx4_default: flx4_i2c6_default { pinmux = , //DATA ; //CLK bias-disable; - drive-open-drain = <1>; + drive-open-drain; }; pinctrl_pwm0 {