Skip to contentSkip to conversation

ARM: dts: at91: sama5d2_ptc_ek: fix sdmmc0 node description

PATCH In review Ludovic Desroches 3 participants 10 messages Apr 1, 2020 – Apr 2, 2020

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

PATCH 1/5 ARM: dts: at91: sama5d2_ptc_ek: fix sdmmc0 node description

Remove non-removable and mmc-ddr-1_8v properties from the sdmmc0 node which come probably from an unchecked copy/paste.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later
---
 arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 --
 1 file changed, 2 deletions(-)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -2
index 1c24ac8019ba7..772809c54c1f3 100644
@@ -125,8 +125,6 @@ sdmmc0: sdio-host@a0000000 {
 			bus-width = <8>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_sdmmc0_default>;
-			non-removable;
-			mmc-ddr-1_8v;
 			status = "okay";
 		};
 
Signature · 1 line
2.26.0
#1 lore raw

PATCH 2/5 ARM: dts: at91: sama5d2_ptc_ek: fix vbus pin

The gpio property for the vbus pin doesn't watch the pinctrl and is not correct.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later
---
 arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +1 -1
index 772809c54c1f3..b803fa1f20391 100644
@@ -40,7 +40,7 @@ main_xtal {
 
 	ahb {
 		usb0: gadget@300000 {
-			atmel,vbus-gpio = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>;
+			atmel,vbus-gpio = <&pioA PIN_PB11 GPIO_ACTIVE_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_usba_vbus>;
 			status = "okay";
Signature · 1 line
2.26.0
#2 lore raw

PATCH RESEND 2/5 ARM: dts: at91: sama5d2_ptc_ek: fix vbus pin

The gpio property for the vbus pin doesn't match the pinctrl and is not correct.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later

---

s/watch/match

 arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +1 -1
index 772809c54c1f3..b803fa1f20391 100644
@@ -40,7 +40,7 @@ main_xtal {
 
 	ahb {
 		usb0: gadget@300000 {
-			atmel,vbus-gpio = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>;
+			atmel,vbus-gpio = <&pioA PIN_PB11 GPIO_ACTIVE_HIGH>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&pinctrl_usba_vbus>;
 			status = "okay";
Signature · 1 line
2.26.0
#3 lore raw

PATCH 3/5 ARM: dts: at91: sama5d2_ptc_ek: add PB_USER as wakeup source

In reply to Ludovic Desroches

Add the push button PB_USER as wakeup source

---
 arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +1 -0
index b803fa1f20391..32435ce1dab22 100644
@@ -412,6 +412,7 @@ bp1 {
 			label = "PB_USER";
 			gpios = <&pioA PIN_PA10 GPIO_ACTIVE_LOW>;
 			linux,code = <0x104>;
+			wakeup-source;
 		};
 	};
 
Signature · 1 line
2.26.0
#4 lore raw

PATCH 4/5 ARM: dts: at91: sama5d27_som1_ek: enable i2c0

In reply to Ludovic Desroches

Enable i2c0 controller.

---
 arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +13 -0
index b0853bf7901ce..1a26e1a129319 100644
@@ -115,6 +115,13 @@ uart2: serial@f8024000 {
 				status = "okay";
 			};
 
+			i2c0: i2c@f8028000 {
+				dmas = <0>, <0>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2c0_default>;
+				status = "okay";
+			};
+
 			pwm0: pwm@f802c000 {
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_mikrobus1_pwm &pinctrl_mikrobus2_pwm>;
@@ -281,6 +288,12 @@ pinctrl_flx3_default: flx3_default {
 					bias-disable;
 				};
 
+				pinctrl_i2c0_default: i2c0_default {
+					pinmux = <PIN_PD21__TWD0>,
+						 <PIN_PD22__TWCK0>;
+					bias-disable;
+				};
+
 				pinctrl_i2c1_default: i2c1_default {
 					pinmux = <PIN_PD4__TWD1>,
 						 <PIN_PD5__TWCK1>;
Signature · 1 line
2.26.0
#5 lore raw

PATCH 5/5 ARM: dts: at91: sama5d27_som1_ek: add an alias for i2c0

In reply to Ludovic Desroches

Add aliases for i2c devices to not rely on probe order for i2c device numbering.

---
 arch/arm/boot/dts/at91-sama5d27_som1_ek.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/at91-sama5d27_som1_ek.dts +1 -0
index 1a26e1a129319..535627c6045b6 100644
@@ -20,6 +20,7 @@ aliases {
 		serial0 = &uart1;	/* DBGU */
 		serial1 = &uart4;	/* mikro BUS 1 */
 		serial2 = &uart2;	/* mikro BUS 2 */
+		i2c0	= &i2c0;
 		i2c1	= &i2c1;
 		i2c2	= &i2c2;
 	};
Signature · 1 line
2.26.0
#6 lore raw
In reply to Ludovic Desroches
Quoted 10 lines · Ludovic Desroches

Remove non-removable and mmc-ddr-1_8v properties from the sdmmc0 node which come probably from an unchecked copy/paste.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later
---
 arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 --
 1 file changed, 2 deletions(-)

All applied, thanks.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw
In reply to Ludovic Desroches
Quoted 15 lines · Ludovic Desroches

Remove non-removable and mmc-ddr-1_8v properties from the sdmmc0 node which come probably from an unchecked copy/paste.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later
---
  arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 --
  1 file changed, 2 deletions(-)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -0
index 1c24ac8019ba7..772809c54c1f3 100644

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts sdmmc0: sdio-host@a0000000 { · line 129

Quoted 5 lines
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -2
@@ -125,8 +125,6 @@ sdmmc0: sdio-host@a0000000 {
  			bus-width = <8>;
  			pinctrl-names = "default";
  			pinctrl-0 = <&pinctrl_sdmmc0_default>;
-			non-removable;
-			mmc-ddr-1_8v;

Hi Ludovic,

I am not sure about the removal of mmc-ddr-1_8v; this means eMMCs connected on this slot won't work in high speed mode, some people use eMMC to SD-Card adapters and stick them into SD-Card slots. Would it be a problem to keep this property here ?

Thanks,
Eugen

Quoted 4 lines
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -0
  			status = "okay";
  		};
 
#8 lore raw
Quoted 24 lines · On 4/2/2020 11:20 AM, Eugen Hristev - M18282 wrote:
Quoted 15 lines · Ludovic Desroches

Remove non-removable and mmc-ddr-1_8v properties from the sdmmc0 node which come probably from an unchecked copy/paste.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later
---
   arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 --
   1 file changed, 2 deletions(-)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -0
index 1c24ac8019ba7..772809c54c1f3 100644

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts sdmmc0: sdio-host@a0000000 { · line 129

Quoted 5 lines
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -2
@@ -125,8 +125,6 @@ sdmmc0: sdio-host@a0000000 {
   			bus-width = <8>;
   			pinctrl-names = "default";
   			pinctrl-0 = <&pinctrl_sdmmc0_default>;
-			non-removable;
-			mmc-ddr-1_8v;

Hi Ludovic,

Quoted 4 lines

I am not sure about the removal of mmc-ddr-1_8v; this means eMMCs connected on this slot won't work in high speed mode, some people use eMMC to SD-Card adapters and stick them into SD-Card slots. Would it be a problem to keep this property here ?

Hi Eugen,

It's not a problem to keep it, but I don't think it makes sense. In this case mmc-ddr-3_3v should be added too.

Will it work 'out of the box' with any eMMC to SD-Card adapters and eMMCs? I remember discussions where we said HW changes were needed to be able to select the voltage for the IOs other than using the VDDSEL signal of the controller.

Regards

Ludovic

Quoted 9 lines

Thanks,
Eugen

Quoted 4 lines
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -0
   			status = "okay";
   		};
 
#9 lore raw
Quoted 32 lines · On 02.04.2020 13:07, Ludovic Desroches - M43218 wrote:
Quoted 24 lines · On 4/2/2020 11:20 AM, Eugen Hristev - M18282 wrote:
Quoted 15 lines · Ludovic Desroches

Remove non-removable and mmc-ddr-1_8v properties from the sdmmc0 node which come probably from an unchecked copy/paste.

Fixes 42ed535595ec "ARM: dts: at91: introduce the sama5d2 ptc ek board"
Cc [email protected] # 4.19 and later
---
    arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts | 2 --
    1 file changed, 2 deletions(-)
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -0
index 1c24ac8019ba7..772809c54c1f3 100644

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts sdmmc0: sdio-host@a0000000 { · line 129

Quoted 5 lines
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -2
@@ -125,8 +125,6 @@ sdmmc0: sdio-host@a0000000 {
    			bus-width = <8>;
    			pinctrl-names = "default";
    			pinctrl-0 = <&pinctrl_sdmmc0_default>;
-			non-removable;
-			mmc-ddr-1_8v;

Hi Ludovic,

Quoted 4 lines

I am not sure about the removal of mmc-ddr-1_8v; this means eMMCs connected on this slot won't work in high speed mode, some people use eMMC to SD-Card adapters and stick them into SD-Card slots. Would it be a problem to keep this property here ?

Hi Eugen,

Quoted 7 lines

It's not a problem to keep it, but I don't think it makes sense. In this case mmc-ddr-3_3v should be added too.

Will it work 'out of the box' with any eMMC to SD-Card adapters and eMMCs? I remember discussions where we said HW changes were needed to be able to select the voltage for the IOs other than using the VDDSEL signal of the controller.

Yes indeed , ddr-3_3v would be needed for those. I can follow up later with a patch to add that if required.

Thanks !

Quoted 16 lines

Regards

Ludovic

Quoted 9 lines

Thanks,
Eugen

Quoted 4 lines
arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts +0 -0
    			status = "okay";
    		};