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: 683588 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 0892DC77B7F for ; Wed, 17 May 2023 11:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbjEQLyN (ORCPT ); Wed, 17 May 2023 07:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbjEQLyL (ORCPT ); Wed, 17 May 2023 07:54:11 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A2C959D6; Wed, 17 May 2023 04:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684324449; x=1715860449; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H3FtDCLhrVU8sD+tqYMnUEm+nabD8KDFiQrtCAaSPlU=; b=EnSHgpOxs0ub92xHwWDSwPbNEGYxrSpTH65SviPhtu2EVoi/OzY7c9zL noDFVzHuwB1T254l/wmnOz7/0anjyd/M6zb2Z4xARp+D0LiQzQ1iQvd/z TuayyBQoT6znfqb+1EDW9bm8hV6gmZjcxuDN2dsl5l91JcNuEvhHQVVDR bevuAoNAxiU3srMlhWd7nbg4uEKDFlvjBDKHqd8J7WMTk/v4/nprh+Wo4 wwpKt82lpXK5H6XvVG302rL75ayjRVbpdL9zWzx5zyu7/gFaWUapiLZUB waHCpcCy04L3l9mSiJK5NG5DBk15wu8gXLoiCR3q3r7IJ+6G2wjpSwZna w==; 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 --- 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: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: 683587 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 1E2D7C7EE2A for ; Wed, 17 May 2023 11:54:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231395AbjEQLy0 (ORCPT ); Wed, 17 May 2023 07:54:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231348AbjEQLyU (ORCPT ); Wed, 17 May 2023 07:54:20 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C51261A4; Wed, 17 May 2023 04:54:17 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 --- 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 {