Skip to content

Commit a8ca1fb

Browse files
claudiubezneagregkh
authored andcommitted
ARM: dts: at91: add pinctrl-{names, 0} for all gpios
commit bf78186 upstream. Add pinctrl-names and pinctrl-0 properties on controllers that claims to use pins to avoid failures due to commit 2ab73c6 ("gpio: Support GPIO controllers without pin-ranges") and also to avoid using pins that may be claimed my other IPs. Fixes: b7c2b61 ("ARM: at91: add Atmel's SAMA5D3 Xplained board") Fixes: 1e5f532 ("ARM: dts: at91: sam9x60: add device tree for soc and board") Fixes: 38153a0 ("ARM: at91/dt: sama5d4: add dts for sama5d4 xplained board") Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> # v5.7+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c2c7eef commit a8ca1fb

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

arch/arm/boot/dts/at91-sam9x60ek.dts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292

9393
leds {
9494
compatible = "gpio-leds";
95+
pinctrl-names = "default";
96+
pinctrl-0 = <&pinctrl_gpio_leds>;
9597
status = "okay"; /* Conflict with pwm0. */
9698

9799
red {
@@ -537,6 +539,10 @@
537539
AT91_PIOA 19 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI) /* PA19 DAT2 periph A with pullup */
538540
AT91_PIOA 20 AT91_PERIPH_A (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DRIVE_STRENGTH_HI)>; /* PA20 DAT3 periph A with pullup */
539541
};
542+
pinctrl_sdmmc0_cd: sdmmc0_cd {
543+
atmel,pins =
544+
<AT91_PIOA 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
545+
};
540546
};
541547

542548
sdmmc1 {
@@ -569,6 +575,14 @@
569575
AT91_PIOD 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
570576
};
571577
};
578+
579+
leds {
580+
pinctrl_gpio_leds: gpio_leds {
581+
atmel,pins = <AT91_PIOB 11 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
582+
AT91_PIOB 12 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
583+
AT91_PIOB 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
584+
};
585+
};
572586
}; /* pinctrl */
573587

574588
&pwm0 {
@@ -580,7 +594,7 @@
580594
&sdmmc0 {
581595
bus-width = <4>;
582596
pinctrl-names = "default";
583-
pinctrl-0 = <&pinctrl_sdmmc0_default>;
597+
pinctrl-0 = <&pinctrl_sdmmc0_default &pinctrl_sdmmc0_cd>;
584598
status = "okay";
585599
cd-gpios = <&pioA 23 GPIO_ACTIVE_LOW>;
586600
disable-wp;

arch/arm/boot/dts/at91-sama5d3_xplained.dts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
};
5858

5959
spi0: spi@f0004000 {
60+
pinctrl-names = "default";
61+
pinctrl-0 = <&pinctrl_spi0_cs>;
6062
cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
6163
status = "okay";
6264
};
@@ -169,6 +171,8 @@
169171
};
170172

171173
spi1: spi@f8008000 {
174+
pinctrl-names = "default";
175+
pinctrl-0 = <&pinctrl_spi1_cs>;
172176
cs-gpios = <&pioC 25 0>;
173177
status = "okay";
174178
};
@@ -248,6 +252,26 @@
248252
<AT91_PIOE 3 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
249253
AT91_PIOE 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
250254
};
255+
256+
pinctrl_gpio_leds: gpio_leds_default {
257+
atmel,pins =
258+
<AT91_PIOE 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
259+
AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
260+
};
261+
262+
pinctrl_spi0_cs: spi0_cs_default {
263+
atmel,pins =
264+
<AT91_PIOD 13 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
265+
AT91_PIOD 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
266+
};
267+
268+
pinctrl_spi1_cs: spi1_cs_default {
269+
atmel,pins = <AT91_PIOC 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
270+
};
271+
272+
pinctrl_vcc_mmc0_reg_gpio: vcc_mmc0_reg_gpio_default {
273+
atmel,pins = <AT91_PIOE 2 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
274+
};
251275
};
252276
};
253277
};
@@ -339,6 +363,8 @@
339363

340364
vcc_mmc0_reg: fixedregulator_mmc0 {
341365
compatible = "regulator-fixed";
366+
pinctrl-names = "default";
367+
pinctrl-0 = <&pinctrl_vcc_mmc0_reg_gpio>;
342368
gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
343369
regulator-name = "mmc0-card-supply";
344370
regulator-min-microvolt = <3300000>;
@@ -362,6 +388,9 @@
362388

363389
leds {
364390
compatible = "gpio-leds";
391+
pinctrl-names = "default";
392+
pinctrl-0 = <&pinctrl_gpio_leds>;
393+
status = "okay";
365394

366395
d2 {
367396
label = "d2";

arch/arm/boot/dts/at91-sama5d4_xplained.dts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
};
9191

9292
spi1: spi@fc018000 {
93+
pinctrl-names = "default";
94+
pinctrl-0 = <&pinctrl_spi0_cs>;
9395
cs-gpios = <&pioB 21 0>;
9496
status = "okay";
9597
};
@@ -147,6 +149,19 @@
147149
atmel,pins =
148150
<AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
149151
};
152+
pinctrl_spi0_cs: spi0_cs_default {
153+
atmel,pins =
154+
<AT91_PIOB 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
155+
};
156+
pinctrl_gpio_leds: gpio_leds_default {
157+
atmel,pins =
158+
<AT91_PIOD 30 AT91_PERIPH_GPIO AT91_PINCTRL_NONE
159+
AT91_PIOE 15 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
160+
};
161+
pinctrl_vcc_mmc1_reg: vcc_mmc1_reg {
162+
atmel,pins =
163+
<AT91_PIOE 4 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
164+
};
150165
};
151166
};
152167
};
@@ -252,6 +267,8 @@
252267

253268
leds {
254269
compatible = "gpio-leds";
270+
pinctrl-names = "default";
271+
pinctrl-0 = <&pinctrl_gpio_leds>;
255272
status = "okay";
256273

257274
d8 {
@@ -278,6 +295,8 @@
278295

279296
vcc_mmc1_reg: fixedregulator_mmc1 {
280297
compatible = "regulator-fixed";
298+
pinctrl-names = "default";
299+
pinctrl-0 = <&pinctrl_vcc_mmc1_reg>;
281300
gpio = <&pioE 4 GPIO_ACTIVE_LOW>;
282301
regulator-name = "VDD MCI1";
283302
regulator-min-microvolt = <3300000>;

0 commit comments

Comments
 (0)