Skip to contentSkip to conversation

ARM: dts: MMC fixes for DRA7 based boards

PATCH In review Kishon Vijay Abraham I 2 participants 10 messages Jul 30, 2015 – Aug 5, 2015

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

cover ARM: dts: MMC fixes for DRA7 based boards

Miscellaneous fixes in dts files for MMC device tree nodes.

Did basic read/write test in J6, J6 Eco and Beagle-x15

Balaji T K (1):
ARM: dts: dra7-evm: add evm_3v3_sd regulator

Kishon Vijay Abraham I (5):
ARM: dts: dra72-evm: add evm_3v3_sd regulator
ARM: dts: dra72-evm: Set max clock frequency of MMC1 and MMC2
ARM: dts: am57xx-beagle-x15: mmc1: remove redundant pbias-supply
property
ARM: dts: dra7-evm: Fix spurious card insert/removal interrupt
ARM: dts: dra72-evm: Fix spurious card insert/removal interrupt

Nishanth Menon (1):
ARM: dts: dra7-evm: Add MMCSD card removal GPIO

 arch/arm/boot/dts/am57xx-beagle-x15.dts |    1 -
 arch/arm/boot/dts/dra7-evm.dts          |   18 +++++++++++++++++-
 arch/arm/boot/dts/dra72-evm.dts         |   16 ++++++++++++++--
 3 files changed, 31 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/7 ARM: dts: dra72-evm: add evm_3v3_sd regulator

Add a node for evm_3v3_sd using pcf which feeds on to mmc vdd. Update mapping for vmmc-supply and vmmc_aux-supply. evm_3v3_sd supplies to SD card vdd, and ldo1 to sdcard i/o lines.

---
 arch/arm/boot/dts/dra72-evm.dts |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
arch/arm/boot/dts/dra72-evm.dts +11 -2
index 8037384..3998d37 100644
@@ -30,6 +30,15 @@
 		regulator-max-microvolt = <3300000>;
 	};
 
+	evm_3v3_sd: fixedregulator-sd {
+		compatible = "regulator-fixed";
+		regulator-name = "evm_3v3_sd";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		enable-active-high;
+		gpio = <&pcf_gpio_21 5 GPIO_ACTIVE_HIGH>;
+	};
+
 	extcon_usb1: extcon_usb1 {
 		compatible = "linux,extcon-usb-gpio";
 		id-gpio = <&pcf_gpio_21 1 GPIO_ACTIVE_HIGH>;
@@ -491,8 +500,8 @@
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins_default>;
-
-	vmmc-supply = <&ldo1_reg>;
+	vmmc-supply = <&evm_3v3_sd>;
+	vmmc_aux-supply = <&ldo1_reg>;
 	bus-width = <4>;
 	/*
 	 * SDCD signal is not being used here - using the fact that GPIO mode
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/7 ARM: dts: dra7-evm: add evm_3v3_sd regulator

In reply to Kishon Vijay Abraham I

From: Balaji T K <[email protected]>

Add a node for evm_3v3_sd using onboard pcf GPIO expander which feeds on to mmc vdd.

Update mapping for vmmc-supply and vmmc_aux-supply. evm_3v3_sd supplies to SD card vdd, and ldo1 to sdcard i/o lines.

---
 arch/arm/boot/dts/dra7-evm.dts |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/dra7-evm.dts +11 -1
index 096f68b..1e0c88e 100644
@@ -19,6 +19,15 @@
 		reg = <0x80000000 0x60000000>; /* 1536 MB */
 	};
 
+	evm_3v3_sd: fixedregulator-sd {
+		compatible = "regulator-fixed";
+		regulator-name = "evm_3v3_sd";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		enable-active-high;
+		gpio = <&pcf_gpio_21 5 GPIO_ACTIVE_HIGH>;
+	};
+
 	mmc2_3v3: fixedregulator-mmc2 {
 		compatible = "regulator-fixed";
 		regulator-name = "mmc2_3v3";
@@ -462,7 +471,8 @@
 
 &mmc1 {
 	status = "okay";
-	vmmc-supply = <&ldo1_reg>;
+	vmmc-supply = <&evm_3v3_sd>;
+	vmmc_aux-supply = <&ldo1_reg>;
 	bus-width = <4>;
 };
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/7 ARM: dts: dra72-evm: Set max clock frequency of MMC1 and MMC2

In reply to Kishon Vijay Abraham I

MMC1 supports SDR104 and MMC2 supports HS200 both of which requires 192MHz clock. Set the maximum operating clock frequency to 192 MHz.

---
 arch/arm/boot/dts/dra72-evm.dts |    2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/dra72-evm.dts +2 -0
index 3998d37..c5d8e7d 100644
@@ -508,6 +508,7 @@
 	 * is a viable alternative
 	 */
 	cd-gpios = <&gpio6 27 0>;
+	max-frequency = <192000000>;
 };
 
 &mmc2 {
@@ -519,6 +520,7 @@
 	vmmc-supply = <&evm_3v3>;
 	bus-width = <8>;
 	ti,non-removable;
+	max-frequency = <192000000>;
 };
 
 &dra7_pmx_core {
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 4/7 ARM: dts: dra7-evm: Add MMCSD card removal GPIO

In reply to Kishon Vijay Abraham I

From: Nishanth Menon <[email protected]>

SDMMC Card Detect can be used over default GPIO map.

---
 arch/arm/boot/dts/dra7-evm.dts |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/dra7-evm.dts +5 -0
index 1e0c88e..25f0a00 100644
@@ -474,6 +474,11 @@
 	vmmc-supply = <&evm_3v3_sd>;
 	vmmc_aux-supply = <&ldo1_reg>;
 	bus-width = <4>;
+	/*
+	 * SDCD signal is not being used here - using the fact that GPIO mode
+	 * is always hardwired.
+	 */
+	cd-gpios = <&gpio6 27 0>;
 };
 
 &mmc2 {
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 5/7 ARM: dts: am57xx-beagle-x15: mmc1: remove redundant pbias-supply property

In reply to Kishon Vijay Abraham I

pbias-supply is initialized in dra7.dtsi. Remove redundant initialization of pbias-supply from MMC1 dt node in am57xx-beagle-x15.dts

---
 arch/arm/boot/dts/am57xx-beagle-x15.dts |    1 -
 1 file changed, 1 deletion(-)
arch/arm/boot/dts/am57xx-beagle-x15.dts +0 -1
index d0db5c5..daf4f17 100644
@@ -579,7 +579,6 @@
 	pinctrl-0 = <&mmc1_pins_default>;
 
 	vmmc-supply = <&ldo1_reg>;
-	pbias-supply = <&pbias_mmc_reg>;
 	bus-width = <4>;
 	cd-gpios = <&gpio6 27 0>; /* gpio 219 */
 };
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 6/7 ARM: dts: dra7-evm: Fix spurious card insert/removal interrupt

In reply to Kishon Vijay Abraham I

ldo1_reg in addition to being connected to the io lines is also connected to the card detect line. On card removal, omap_hsmmc driver does a regulator_disable causing card detect line to be pulled down. This raises a card insertion interrupt and once the MMC core detects there is no card inserted, it does a regulator disable which again raises a card insertion interrupt. This happens in a loop causing infinite MMC interrupts.

Fix it by making ldo1_reg as always_on.

---
 arch/arm/boot/dts/dra7-evm.dts |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7-evm.dts +1 -0
index 25f0a00..a6c82e5 100644
@@ -358,6 +358,7 @@
 					regulator-name = "ldo1";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <3300000>;
+					regulator-always-on;
 					regulator-boot-on;
 				};
 
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH 7/7 ARM: dts: dra72-evm: Fix spurious card insert/removal interrupt

In reply to Kishon Vijay Abraham I

ldo1_reg in addition to being connected to the io lines is also connected to the card detect line. On card removal, omap_hsmmc driver does a regulator_disable causing card detect line to be pulled down. This raises a card insertion interrupt and once the MMC core detects there is no card inserted, it does a regulator disable which again raises a card insertion interrupt. This happens in a loop causing infinite MMC interrupts.

Fix it by making ldo1_reg as always_on.

---
 arch/arm/boot/dts/dra72-evm.dts |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra72-evm.dts +1 -0
index c5d8e7d..45f11a0 100644
@@ -295,6 +295,7 @@
 					regulator-name = "ldo1";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <3300000>;
+					regulator-always-on;
 					regulator-boot-on;
 				};
 
Signature · 1 line
1.7.9.5
#8 lore raw
In reply to Kishon Vijay Abraham I
Quoted 15 lines · Kishon Vijay Abraham I

Miscellaneous fixes in dts files for MMC device tree nodes.

Did basic read/write test in J6, J6 Eco and Beagle-x15

Balaji T K (1):
ARM: dts: dra7-evm: add evm_3v3_sd regulator

Kishon Vijay Abraham I (5):
ARM: dts: dra72-evm: add evm_3v3_sd regulator
ARM: dts: dra72-evm: Set max clock frequency of MMC1 and MMC2
ARM: dts: am57xx-beagle-x15: mmc1: remove redundant pbias-supply
property
ARM: dts: dra7-evm: Fix spurious card insert/removal interrupt
ARM: dts: dra72-evm: Fix spurious card insert/removal interrupt

Quoted 7 lines

Nishanth Menon (1):
ARM: dts: dra7-evm: Add MMCSD card removal GPIO

 arch/arm/boot/dts/am57xx-beagle-x15.dts |    1 -
 arch/arm/boot/dts/dra7-evm.dts          |   18 +++++++++++++++++-
 arch/arm/boot/dts/dra72-evm.dts         |   16 ++++++++++++++--
 3 files changed, 31 insertions(+), 4 deletions(-)

Thanks applying all these into omap-for-v4.3/dt.

Tony

#9 lore raw

Hi,

Quoted 19 lines · Tony Lindgren
Quoted 18 lines · Kishon Vijay Abraham I

Miscellaneous fixes in dts files for MMC device tree nodes.

Did basic read/write test in J6, J6 Eco and Beagle-x15

Balaji T K (1):
ARM: dts: dra7-evm: add evm_3v3_sd regulator

Kishon Vijay Abraham I (5):
ARM: dts: dra72-evm: add evm_3v3_sd regulator
ARM: dts: dra72-evm: Set max clock frequency of MMC1 and MMC2
ARM: dts: am57xx-beagle-x15: mmc1: remove redundant pbias-supply
property
ARM: dts: dra7-evm: Fix spurious card insert/removal interrupt
ARM: dts: dra72-evm: Fix spurious card insert/removal interrupt

Nishanth Menon (1):
ARM: dts: dra7-evm: Add MMCSD card removal GPIO

Quoted 6 lines
Quoted 4 lines
 arch/arm/boot/dts/am57xx-beagle-x15.dts |    1 -
 arch/arm/boot/dts/dra7-evm.dts          |   18 +++++++++++++++++-
 arch/arm/boot/dts/dra72-evm.dts         |   16 ++++++++++++++--
 3 files changed, 31 insertions(+), 4 deletions(-)

Thanks applying all these into omap-for-v4.3/dt.

Thanks. Please take [1] one too.

[1] -> https://lkml.org/lkml/2015/8/5/443

Thanks
Kishon