Skip to contentSkip to conversation

K2G: mmc: Update mmc dt node to use sdhci-omap

PATCH Superseded Kishon Vijay Abraham I 2 participants 11 messages Apr 25, 2018 – Jun 22, 2018

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

cover K2G: mmc: Update mmc dt node to use sdhci-omap

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Kishon Vijay Abraham I (3):
ARM: dts: keystone-k2g-evm: Add "vqmmc-supply" property for mmc0/mmc1
ARM: dts: keystone-k2g-evm: Use sdhci-omap programming model
ARM: configs: keystone: Enable CONFIG_MMC_SDHCI_OMAP

 arch/arm/boot/dts/keystone-k2g-evm.dts | 10 ++++++++++
 arch/arm/boot/dts/keystone-k2g.dtsi    | 12 ++++--------
 arch/arm/configs/keystone_defconfig    |  3 +++
 3 files changed, 17 insertions(+), 8 deletions(-)
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/3 ARM: dts: keystone-k2g-evm: Add "vqmmc-supply" property for mmc0/mmc1

Add "vqmmc-supply" property for mmc0/mmc1 to indicate the supply connected to the IO lines. Also add dt node for ldo1 regulator required for mmc1 vqmmc-supply.

---
 arch/arm/boot/dts/keystone-k2g-evm.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/keystone-k2g-evm.dts +10 -0
index 6a4657799b99..60b4f59899d2 100644
@@ -37,6 +37,14 @@
 		regulator-max-microvolt = <3300000>;
 		regulator-always-on;
 	};
+
+	vcc1v8_ldo1_reg: fixedregulator-vcc1v8-ldo1 {
+		compatible = "regulator-fixed";
+		regulator-name = "ldo1";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-always-on;
+	};
 };
 
 &k2g_pinctrl {
@@ -130,6 +138,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins>;
 	vmmc-supply = <&vcc3v3_dcin_reg>;
+	vqmmc-supply = <&vcc3v3_dcin_reg>;
 	cd-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
@@ -138,6 +147,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins>;
 	vmmc-supply = <&vcc3v3_dcin_reg>; /* VCC3V3_EMMC is connected to VCC3V3_DCIN */
+	vqmmc-supply = <&vcc1v8_ldo1_reg>;
 	ti,non-removable;
 	status = "okay";
 };
Signature · 1 line
2.17.0
#2 lore raw

PATCH 2/3 ARM: dts: keystone-k2g-evm: Use sdhci-omap programming model

In reply to Kishon Vijay Abraham I

Use sdhci-omap programming model based on the generic sdhci library for programming the MMC/SD controller.

---
 arch/arm/boot/dts/keystone-k2g.dtsi | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
arch/arm/boot/dts/keystone-k2g.dtsi +4 -8
index da78c0034427..af6bf1301cf5 100644
@@ -391,13 +391,10 @@
 		};
 
 		mmc0: mmc@23000000 {
-			compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc";
+			compatible = "ti,k2g-sdhci";
 			reg = <0x23000000 0x400>;
 			interrupts = <GIC_SPI 96 IRQ_TYPE_EDGE_RISING>;
-			dmas = <&edma1 24 0>, <&edma1 25 0>;
-			dma-names = "tx", "rx";
 			bus-width = <4>;
-			ti,needs-special-reset;
 			no-1-8-v;
 			max-frequency = <96000000>;
 			power-domains = <&k2g_pds 0xb>;
@@ -407,13 +404,12 @@
 		};
 
 		mmc1: mmc@23100000 {
-			compatible = "ti,k2g-hsmmc", "ti,omap4-hsmmc";
+			compatible = "ti,k2g-sdhci";
 			reg = <0x23100000 0x400>;
 			interrupts = <GIC_SPI 97 IRQ_TYPE_EDGE_RISING>;
-			dmas = <&edma1 26 0>, <&edma1 27 0>;
-			dma-names = "tx", "rx";
 			bus-width = <8>;
-			ti,needs-special-reset;
+			no-1-8-v;
+			non-removable;
 			max-frequency = <96000000>;
 			power-domains = <&k2g_pds 0xc>;
 			clocks = <&k2g_clks 0xc 1>, <&k2g_clks 0xc 2>;
Signature · 1 line
2.17.0
#3 lore raw

PATCH 3/3 ARM: configs: keystone: Enable CONFIG_MMC_SDHCI_OMAP

In reply to Kishon Vijay Abraham I

Enable CONFIG_MMC_SDHCI_OMAP so that TI's K2G SoC
can use sdhci-omap driver for MMC/SD controller.

---
 arch/arm/configs/keystone_defconfig | 3 +++
 1 file changed, 3 insertions(+)
arch/arm/configs/keystone_defconfig +3 -0
index 2536c231eea1..21a6ce4ef9bc 100644
@@ -170,7 +170,10 @@ CONFIG_USB_DWC3=y
 CONFIG_NOP_USB_XCEIV=y
 CONFIG_KEYSTONE_USB_PHY=y
 CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_SDHCI_OMAP=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_GPIO=y
Signature · 1 line
2.17.0
#4 lore raw
In reply to Kishon Vijay Abraham I
Quoted 10 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Keep me posted once the dependency gets merged.

Regards,
Santosh

#5 lore raw
Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

Quoted 8 lines
Quoted 7 lines

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Keep me posted once the dependency gets merged.

sure.

Regards
Kishon

#6 lore raw
In reply to Santosh Shilimkar

Hi Santosh,

Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

Quoted 8 lines
Quoted 7 lines

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Keep me posted once the dependency gets merged.

Ulf has merged the sdhci part and has shared an immutable branch

git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git sdhci_omap with his signed tag sdhci-omap-v4.17-rc3.

Can you use it as a base for merging this series?

Thanks
Kishon

#7 lore raw
Quoted 14 lines · Kishon Vijay Abraham I

Hi Santosh,

Quoted 11 lines · Santosh Shilimkar
Quoted 10 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Quoted 9 lines
Quoted 1 line

Keep me posted once the dependency gets merged.

Ulf has merged the sdhci part and has shared an immutable branch

git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git sdhci_omap with his signed tag sdhci-omap-v4.17-rc3.

Can you use it as a base for merging this series?

How about I apply only DTS patches and exlude config file update ? You can send the config patch after the merge window. Are the DTS changes also going to break anything without basing of this sdhci branch ?

#8 lore raw

Hi Santosh,

Quoted 22 lines · On Friday 04 May 2018 12:22 AM, [email protected] wrote:
Quoted 21 lines · Kishon Vijay Abraham I

Hi Santosh,

Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

Quoted 8 lines
Quoted 7 lines

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Keep me posted once the dependency gets merged.

Ulf has merged the sdhci part and has shared an immutable branch

git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git sdhci_omap with his signed tag sdhci-omap-v4.17-rc3.

Quoted 6 lines
Quoted 2 lines

Can you use it as a base for merging this series?

How about I apply only DTS patches and exlude config file update ? You can send the config patch after the merge window. Are the DTS changes also going to break anything without basing of this sdhci branch ?

Yes, the bindings has changed for sdhci-omap.
It should also be fine if this entire series can be merged during the 4.18 -rc cycle since the dependent patches would have been already merged then.

Thanks
Kishon

#9 lore raw
Quoted 27 lines · Kishon Vijay Abraham I

Hi Santosh,

Quoted 24 lines · On Friday 04 May 2018 12:22 AM, [email protected] wrote:
Quoted 23 lines · Kishon Vijay Abraham I

Hi Santosh,

Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

Quoted 8 lines
Quoted 7 lines

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Keep me posted once the dependency gets merged.

Ulf has merged the sdhci part and has shared an immutable branch

git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git sdhci_omap with his signed tag sdhci-omap-v4.17-rc3.

Can you use it as a base for merging this series?

Quoted 9 lines
Quoted 4 lines

How about I apply only DTS patches and exlude config file update ? You can send the config patch after the merge window. Are the DTS changes also going to break anything without basing of this sdhci branch ?

Yes, the bindings has changed for sdhci-omap.
It should also be fine if this entire series can be merged during the 4.18 -rc cycle since the dependent patches would have been already merged then.

I see. In that, lets wait for 4.18-rcx for all the dependencies to make it. This series won't qualify for fixes but at least we can get that into next early in the cycle so that it becomes usable.

Thanks for followup Kishon !!

Regards,
Santosh

#10 lore raw

Hi Santosh,

Quoted 37 lines · On Friday 04 May 2018 09:16 PM, [email protected] wrote:
Quoted 27 lines · Kishon Vijay Abraham I

Hi Santosh,

Quoted 24 lines · On Friday 04 May 2018 12:22 AM, [email protected] wrote:
Quoted 23 lines · Kishon Vijay Abraham I

Hi Santosh,

Quoted 4 lines · Santosh Shilimkar
Quoted 3 lines · Kishon Vijay Abraham I

Update mmc dt node to use sdhci-omap binding instead of omap_hsmmc binding.

Quoted 8 lines
Quoted 7 lines

I've also updated keystone_defconfig to enable CONFIG_MMC_SDHCI_OMAP. Everyone who use a custom .config should also enable CONFIG_MMC_SDHCI_OMAP for MMC to work.

This series should be merged only after [1]
[1] -> https://marc.info/?l=linux-kernel&m=152465820531802&w=2

Keep me posted once the dependency gets merged.

Ulf has merged the sdhci part and has shared an immutable branch

git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git sdhci_omap with his signed tag sdhci-omap-v4.17-rc3.

Can you use it as a base for merging this series?

Quoted 9 lines
Quoted 4 lines

How about I apply only DTS patches and exlude config file update ? You can send the config patch after the merge window. Are the DTS changes also going to break anything without basing of this sdhci branch ?

Yes, the bindings has changed for sdhci-omap.
It should also be fine if this entire series can be merged during the 4.18 -rc cycle since the dependent patches would have been already merged then.

Quoted 5 lines

I see. In that, lets wait for 4.18-rcx for all the dependencies to make it. This series won't qualify for fixes but at least we can get that into next early in the cycle so that it becomes usable.

Thanks for followup Kishon !!

All the dependent patches has got merged. This series applies on latest linus -master as is without any conflicts. I've also verified MMC works with this series.

This should be good to get merged. Let me know if you want me to repost the series.

Thanks
Kishon