Skip to contentSkip to conversation

ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

PATCH Superseded Andreas Henriksson 3 participants 6 messages Sep 23, 2014 – Sep 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

As discovered on a custom board similar to at91sam9263ek and basing its devicetree on that one apparently the pin muxing doesn't get set up properly. This was discovered since the custom boards u-boot does funky stuff with the pin muxing and leaved it set to SPI which made the MMC driver not work under Linux.
The fix is simply to define the given configuration as the default. This probably worked by pure luck before, but it's better to make the muxing explicitly set.

---
 arch/arm/boot/dts/at91sam9263ek.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/at91sam9263ek.dts +1 -0
index 5cf93ee..33a4f9a 100644
@@ -64,6 +64,7 @@
 			};
 
 			mmc0: mmc at fff80000 {
+				pinctrl-names = "default";
 				pinctrl-0 = <
 					&pinctrl_board_mmc0
 					&pinctrl_mmc0_clk
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

Hi Andreas,

Quoted 11 lines · On Tue, 23 Sep 2014 13:42:44 +0200 Andreas Henriksson…

As discovered on a custom board similar to at91sam9263ek and basing its devicetree on that one apparently the pin muxing doesn't get set up properly. This was discovered since the custom boards u-boot does funky stuff with the pin muxing and leaved it set to SPI which made the MMC driver not work under Linux.
The fix is simply to define the given configuration as the default. This probably worked by pure luck before, but it's better to make the muxing explicitly set.

Thanks,

Boris

Quoted 16 lines
---
 arch/arm/boot/dts/at91sam9263ek.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/at91sam9263ek.dts +1 -0
index 5cf93ee..33a4f9a 100644
@@ -64,6 +64,7 @@
 			};
 
 			mmc0: mmc at fff80000 {
+				pinctrl-names = "default";
 				pinctrl-0 = <
 					&pinctrl_board_mmc0
 					&pinctrl_mmc0_clk
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

In reply to Andreas Henriksson

On 23/09/2014 13:42, Andreas Henriksson :

Quoted 11 lines

As discovered on a custom board similar to at91sam9263ek and basing its devicetree on that one apparently the pin muxing doesn't get set up properly. This was discovered since the custom boards u-boot does funky stuff with the pin muxing and leaved it set to SPI which made the MMC driver not work under Linux.
The fix is simply to define the given configuration as the default. This probably worked by pure luck before, but it's better to make the muxing explicitly set.

Thanks a lot for having fix this Andreas.

arch/arm/boot/dts/at91sam9263ek.dts line 67

Quoted 13 lines
---
 arch/arm/boot/dts/at91sam9263ek.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/at91sam9263ek.dts +1 -0
index 5cf93ee..33a4f9a 100644
@@ -64,6 +64,7 @@
 			};
 
 			mmc0: mmc at fff80000 {
+				pinctrl-names = "default";

On AT91, we tend to have this property directly in the SoC .dtsi file:
can you please add this "default" name to the 2 mmc hosts in at91sam9263.dtsi file?

Thanks, best regards.

Quoted 4 lines
arch/arm/boot/dts/at91sam9263ek.dts +0 -0
 				pinctrl-0 = <
 					&pinctrl_board_mmc0
 					&pinctrl_mmc0_clk
Signature · 1 line
Nicolas Ferre
#3 lore raw

PATCH v2 1/1 ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

As discovered on a custom board similar to at91sam9263ek and basing its devicetree on that one apparently the pin muxing doesn't get set up properly. This was discovered since the custom boards u-boot does funky stuff with the pin muxing and leaved it set to SPI which made the MMC driver not work under Linux.
The fix is simply to define the given configuration as the default. This probably worked by pure luck before, but it's better to make the muxing explicitly set.

---
 arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
 1 file changed, 2 insertions(+)

v2: put pinctrl-names in dtsi instead as requested/suggested by Nicolas Ferre

arch/arm/boot/dts/at91sam9263.dtsi +2 -0
index bb23c2d..5e95a80 100644
@@ -834,6 +834,7 @@
 				compatible = "atmel,hsmci";
 				reg = <0xfff80000 0x600>;
 				interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
+				pinctrl-names = "default";
 				#address-cells = <1>;
 				#size-cells = <0>;
 				clocks = <&mci0_clk>;
@@ -845,6 +846,7 @@
 				compatible = "atmel,hsmci";
 				reg = <0xfff84000 0x600>;
 				interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
+				pinctrl-names = "default";
 				#address-cells = <1>;
 				#size-cells = <0>;
 				clocks = <&mci1_clk>;
Signature · 1 line
2.1.0
#4 lore raw

PATCH v2 1/1 ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

Quoted 11 lines · On Tue, 23 Sep 2014 17:12:52 +0200 Andreas Henriksson…

As discovered on a custom board similar to at91sam9263ek and basing its devicetree on that one apparently the pin muxing doesn't get set up properly. This was discovered since the custom boards u-boot does funky stuff with the pin muxing and leaved it set to SPI which made the MMC driver not work under Linux.
The fix is simply to define the given configuration as the default. This probably worked by pure luck before, but it's better to make the muxing explicitly set.

Quoted 27 lines
---
 arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
 1 file changed, 2 insertions(+)

v2: put pinctrl-names in dtsi instead as requested/suggested by Nicolas Ferre

arch/arm/boot/dts/at91sam9263.dtsi +2 -0
index bb23c2d..5e95a80 100644
@@ -834,6 +834,7 @@
 				compatible = "atmel,hsmci";
 				reg = <0xfff80000 0x600>;
 				interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
+				pinctrl-names = "default";
 				#address-cells = <1>;
 				#size-cells = <0>;
 				clocks = <&mci0_clk>;
@@ -845,6 +846,7 @@
 				compatible = "atmel,hsmci";
 				reg = <0xfff84000 0x600>;
 				interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
+				pinctrl-names = "default";
 				#address-cells = <1>;
 				#size-cells = <0>;
 				clocks = <&mci1_clk>;
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

PATCH v2 1/1 ARM: at91: fix at91sam9263ek DT mmc pinmuxing settings

In reply to Andreas Henriksson

On 23/09/2014 17:12, Andreas Henriksson :

Quoted 11 lines

As discovered on a custom board similar to at91sam9263ek and basing its devicetree on that one apparently the pin muxing doesn't get set up properly. This was discovered since the custom boards u-boot does funky stuff with the pin muxing and leaved it set to SPI which made the MMC driver not work under Linux.
The fix is simply to define the given configuration as the default. This probably worked by pure luck before, but it's better to make the muxing explicitly set.

Thanks, I stacked it on at91-3.18-fixes-non-critical branch.

For the record, we chose to set this
pinctrl-names = "default";
property in the SoC file without the associated pinctrl-0 property because there is not "default" setting: we never know if we would use the slot A or slot B with different pins in play.
So, as we must add a pinctrl-0 property in the board anyway, we decided to not add pinctrl-0 in the SoC while keeping pinctrl-names as it is always needed (as you experienced the hard way ;-)).

Best regards,

Quoted 28 lines
---
 arch/arm/boot/dts/at91sam9263.dtsi | 2 ++
 1 file changed, 2 insertions(+)

v2: put pinctrl-names in dtsi instead as requested/suggested by Nicolas Ferre

arch/arm/boot/dts/at91sam9263.dtsi +2 -0
index bb23c2d..5e95a80 100644
@@ -834,6 +834,7 @@
 				compatible = "atmel,hsmci";
 				reg = <0xfff80000 0x600>;
 				interrupts = <10 IRQ_TYPE_LEVEL_HIGH 0>;
+				pinctrl-names = "default";
 				#address-cells = <1>;
 				#size-cells = <0>;
 				clocks = <&mci0_clk>;
@@ -845,6 +846,7 @@
 				compatible = "atmel,hsmci";
 				reg = <0xfff84000 0x600>;
 				interrupts = <11 IRQ_TYPE_LEVEL_HIGH 0>;
+				pinctrl-names = "default";
 				#address-cells = <1>;
 				#size-cells = <0>;
 				clocks = <&mci1_clk>;
Signature · 1 line
Nicolas Ferre