From patchwork Thu Dec 14 14:21:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ludovic Desroches X-Patchwork-Id: 10112327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A5ADA60352 for ; Thu, 14 Dec 2017 14:29:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94BE929542 for ; Thu, 14 Dec 2017 14:29:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8929729640; Thu, 14 Dec 2017 14:29:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EAC5C29542 for ; Thu, 14 Dec 2017 14:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RktuoT0YX0E+JBvrI3QQ3LxKRP2zJryhRQ34xug9KmM=; b=Sp094c26wqG877 B4bdc0NikO3Kj9eK165+Cm5365OZT4LgR17A5cmE9379oFDVXVIz9wLY8se3MXY63MRqvtZXGOcfp rlGIs6On4c7qCHUwJMgh2y8mT5NMvIqjCdSJo81piC93inXuFhsSV5cSPN4UGgrrqmF/P48HuMJAc wgDJXzhSyfHcNUK4Jyv1Xlr+af0+c5GVJRWo1cnki3ZR6cGHIsaH4EKqXZFa078sAUMxI1/vQ76Ep Fa9pGnKjlaYGKhi2CeSoSgWOmchoukCQ1Oh0h0bqzZzMkkfUm3Bl/n/v1NOHJwABt/ybgR2HNW6Bc nc0yDOImpfhStbCRkOAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ePUWF-0005Ah-Mq; Thu, 14 Dec 2017 14:29:51 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ePUQF-0000YK-A0 for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2017 14:23:42 +0000 X-IronPort-AV: E=Sophos;i="5.45,400,1508828400"; d="scan'208";a="10138032" Received: from exsmtp02.microchip.com (HELO email.microchip.com) ([198.175.253.38]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Dec 2017 07:23:04 -0700 Received: from ibiza.corp.atmel.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Thu, 14 Dec 2017 07:23:03 -0700 From: Ludovic Desroches To: , Subject: [RFC PATCH 7/7] ARM: dts: at91-sama5d2_xplained: remove gpios from pinmux Date: Thu, 14 Dec 2017 15:21:38 +0100 Message-ID: <20171214142138.23008-8-ludovic.desroches@microchip.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20171214142138.23008-1-ludovic.desroches@microchip.com> References: <20171214142138.23008-1-ludovic.desroches@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171214_062339_733624_931908D4 X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ludovic Desroches Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As we can setup the pin configuration of a GPIO through the gpiolib, enable the pinmuxing strict mode and remove GPIOs from the pinmuxing. Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/at91-sama5d2_xplained.dts | 45 +++++------------------------ 1 file changed, 7 insertions(+), 38 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts index 56de21de2779..9e0bf162e6bd 100644 --- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts +++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts @@ -68,20 +68,16 @@ ahb { usb0: gadget@300000 { - atmel,vbus-gpio = <&pioA PIN_PA31 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usba_vbus>; + atmel,vbus-gpio = <&pioA PIN_PA31 (GPIO_ACTIVE_LOW | GPIO_BIAS_PULL_UP)>; status = "okay"; }; usb1: ohci@400000 { num-ports = <3>; atmel,vbus-gpio = <0 /* &pioA PIN_PB9 GPIO_ACTIVE_HIGH */ - &pioA PIN_PB10 GPIO_ACTIVE_HIGH + &pioA PIN_PB10 (GPIO_ACTIVE_LOW | GPIO_BIAS_PULL_UP) 0 >; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usb_default>; status = "okay"; }; @@ -325,6 +321,7 @@ }; pinctrl@fc038000 { + atmel,use-strict-mode; /* * There is no real pinmux for ADC, if the pin * is not requested by another peripheral then @@ -412,18 +409,6 @@ bias-disable; }; - pinctrl_key_gpio_default: key_gpio_default { - pinmux = ; - bias-pull-up; - }; - - pinctrl_led_gpio_default: led_gpio_default { - pinmux = , - , - ; - bias-pull-up; - }; - pinctrl_macb0_default: macb0_default { pinmux = , , @@ -509,16 +494,6 @@ bias-disable; }; - pinctrl_usb_default: usb_default { - pinmux = ; - bias-disable; - }; - - pinctrl_usba_vbus: usba_vbus { - pinmux = ; - bias-disable; - }; - pinctrl_pwm0_pwm2_default: pwm0_pwm2_default { pinmux = , ; @@ -544,13 +519,9 @@ gpio_keys { compatible = "gpio-keys"; - - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_key_gpio_default>; - bp1 { label = "PB_USER"; - gpios = <&pioA PIN_PB9 GPIO_ACTIVE_LOW>; + gpios = <&pioA PIN_PB9 (GPIO_ACTIVE_LOW | GPIO_BIAS_PULL_UP)>; linux,code = <0x104>; wakeup-source; }; @@ -558,24 +529,22 @@ leds { compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_led_gpio_default>; status = "okay"; /* conflict with pwm0 */ red { label = "red"; - gpios = <&pioA PIN_PB6 GPIO_ACTIVE_LOW>; + gpios = <&pioA PIN_PB6 (GPIO_ACTIVE_LOW | GPIO_BIAS_PULL_UP)>; }; green { label = "green"; - gpios = <&pioA PIN_PB5 GPIO_ACTIVE_LOW>; + gpios = <&pioA PIN_PB5 (GPIO_ACTIVE_LOW | GPIO_BIAS_PULL_UP)>; }; blue { label = "blue"; - gpios = <&pioA PIN_PB0 GPIO_ACTIVE_LOW>; + gpios = <&pioA PIN_PB0 (GPIO_ACTIVE_LOW | GPIO_BIAS_PULL_UP)>; linux,default-trigger = "heartbeat"; }; };