From: Ludovic Desroches <ludovic.desroches@microchip.com>
To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Subject: [RFC PATCH 7/7] ARM: dts: at91-sama5d2_xplained: remove gpios from pinmux
Date: Thu, 14 Dec 2017 15:21:38 +0100 [thread overview]
Message-ID: <20171214142138.23008-8-ludovic.desroches@microchip.com> (raw)
In-Reply-To: <20171214142138.23008-1-ludovic.desroches@microchip.com>
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 <ludovic.desroches@microchip.com>
---
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 = <PIN_PB9__GPIO>;
- bias-pull-up;
- };
-
- pinctrl_led_gpio_default: led_gpio_default {
- pinmux = <PIN_PB0__GPIO>,
- <PIN_PB5__GPIO>,
- <PIN_PB6__GPIO>;
- bias-pull-up;
- };
-
pinctrl_macb0_default: macb0_default {
pinmux = <PIN_PB14__GTXCK>,
<PIN_PB15__GTXEN>,
@@ -509,16 +494,6 @@
bias-disable;
};
- pinctrl_usb_default: usb_default {
- pinmux = <PIN_PB10__GPIO>;
- bias-disable;
- };
-
- pinctrl_usba_vbus: usba_vbus {
- pinmux = <PIN_PA31__GPIO>;
- bias-disable;
- };
-
pinctrl_pwm0_pwm2_default: pwm0_pwm2_default {
pinmux = <PIN_PB5__PWMH2>,
<PIN_PB6__PWML2>;
@@ -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";
};
};
--
2.12.2
next prev parent reply other threads:[~2017-12-14 14:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 14:21 [RFC PATCH 0/7] gpiolib: add bias support Ludovic Desroches
2017-12-14 14:21 ` [RFC PATCH 1/7] gpio: of: use the BIT macro for of_gpio_flags Ludovic Desroches
2017-12-14 14:21 ` [RFC PATCH 2/7] gpio: gpiolib: split the gpiod_configure_flags function Ludovic Desroches
2017-12-15 9:26 ` Julien Thierry
2017-12-18 7:02 ` Ludovic Desroches
2017-12-14 14:21 ` [RFC PATCH 3/7] gpio: gpiolib: save GPIO flags in of_get_named_gpiod_flags Ludovic Desroches
2017-12-14 14:21 ` [RFC PATCH 4/7] gpio: gpiolib: add bias support Ludovic Desroches
2017-12-14 14:21 ` [RFC PATCH 5/7] pinctrl: at91-pio4: allow the gpiolib to set pin configuration Ludovic Desroches
2017-12-14 14:21 ` [RFC PATCH 6/7] pinctrl: at91-pio4: use strict mode if explicitly requested Ludovic Desroches
2017-12-14 14:21 ` Ludovic Desroches [this message]
2017-12-14 16:06 ` [RFC PATCH 0/7] gpiolib: add bias support Andrew Lunn
2017-12-15 6:54 ` Ludovic Desroches
2017-12-19 9:40 ` [RFC PATCH v2] draft for gpio pinconf Ludovic Desroches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171214142138.23008-8-ludovic.desroches@microchip.com \
--to=ludovic.desroches@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).