Skip to contentSkip to conversation

FSL eSDHC bindings update

PATCH Applied Anton Vorontsov 2 participants 9 messages Feb 5, 2009 – Feb 6, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw
Quoted 16 lines · Kumar Gala
Quoted 6 lines · Anton Vorontsov

This patch adds a new driver: sdhci-of. The driver is similar to the sdhci-pci, it contains common probe code, and controller-specific ops and quirks.

So far there are only Freescale eSDHC ops and quirks.

Quoted 8 lines

---

drivers/mmc/host/Kconfig    |   10 ++
drivers/mmc/host/Makefile   |    1 +
drivers/mmc/host/sdhci-of.c |  274 ++++++++++++++++++++++++++++++++++ 
+++++++++
3 files changed, 285 insertions(+), 0 deletions(-)

create mode 100644 drivers/mmc/host/sdhci-of.c

Quoted 1 line

Still griping about lack of OF binding docs for this.

Here they're.

I'm assuming that MPC8536 is the first chip in 85xx family with eSDHC.

Thanks,

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2
#1 lore raw

PATCH 1/3 powerpc: Document FSL eSDHC bindings

This patch documents OF bindings for the Freescale Enhanced Secure Digital Host Controller.

---
 Documentation/powerpc/dts-bindings/fsl/esdhc.txt |   24 ++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/powerpc/dts-bindings/fsl/esdhc.txt
Documentation/powerpc/dts-bindings/fsl/esdhc.txt new file +24 -0
new file mode 100644
index 0000000..6008465
@@ -0,0 +1,24 @@
+* Freescale Enhanced Secure Digital Host Controller (eSDHC)
+
+The Enhanced Secure Digital Host Controller provides an interface
+for MMC, SD, and SDIO types of memory cards.
+
+Required properties:
+  - compatible : should be
+    "fsl,<chip>-esdhc", "fsl,mpc8379-esdhc" for MPC83xx processors.
+    "fsl,<chip>-esdhc", "fsl,mpc8536-esdhc" for MPC85xx processors.
+  - reg : should contain eSDHC registers location and length.
+  - interrupts : should contain eSDHC interrupt.
+  - interrupt-parent : interrupt source phandle.
+  - clock-frequency : specifies eSDHC base clock frequency.
+
+Example:
+
+sdhci@2e000 {
+	compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc";
+	reg = <0x2e000 0x1000>;
+	interrupts = <42 0x8>;
+	interrupt-parent = <&ipic>;
+	/* Filled in by U-Boot */
+	clock-frequency = <0>;
+};
Signature · 1 line
1.5.6.5
Applied
#2 lore raw

Re: [PATCH 1/3] powerpc: Document FSL eSDHC bindings

Quoted 9 lines · Anton Vorontsov

This patch documents OF bindings for the Freescale Enhanced Secure Digital Host Controller.

---
Documentation/powerpc/dts-bindings/fsl/esdhc.txt | 24 +++++++++++++
+++++++++

1 files changed, 24 insertions(+), 0 deletions(-)

create mode 100644 Documentation/powerpc/dts-bindings/fsl/esdhc.txt

applied to next

- k

#3 lore raw

PATCH 2/3 powerpc/83xx: Convert existing sdhc nodes to new bindings

In reply to Anton Vorontsov

- sdhc node renamed to sdhci ("sdhc" name is confusing since SDHC is used to name Secure Digital High Capacity cards, while SDHCI is an interface).

- Get rid of "fsl,esdhc" compatible entry, it's replaced by the "fsl,<chip>-esdhc" scheme;

- Get rid of `model' property.

---
 arch/powerpc/boot/dts/mpc8377_mds.dts |    7 ++++---
 arch/powerpc/boot/dts/mpc8378_mds.dts |    7 ++++---
 arch/powerpc/boot/dts/mpc8379_mds.dts |    7 ++++---
 3 files changed, 12 insertions(+), 9 deletions(-)
arch/powerpc/boot/dts/mpc8377_mds.dts +4 -3
index a519e85..3e3ec8f 100644
@@ -313,12 +313,13 @@
 			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
-		sdhc@2e000 {
-			model = "eSDHC";
-			compatible = "fsl,esdhc";
+		sdhci@2e000 {
+			compatible = "fsl,mpc8377-esdhc", "fsl,mpc8379-esdhc";
 			reg = <0x2e000 0x1000>;
 			interrupts = <42 0x8>;
 			interrupt-parent = <&ipic>;
+			/* Filled in by U-Boot */
+			clock-frequency = <0>;
 		};
 
 		sata@18000 {
arch/powerpc/boot/dts/mpc8378_mds.dts +4 -3
index 6bbee49..c3b212c 100644
@@ -313,12 +313,13 @@
 			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
-		sdhc@2e000 {
-			model = "eSDHC";
-			compatible = "fsl,esdhc";
+		sdhci@2e000 {
+			compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc";
 			reg = <0x2e000 0x1000>;
 			interrupts = <42 0x8>;
 			interrupt-parent = <&ipic>;
+			/* Filled in by U-Boot */
+			clock-frequency = <0>;
 		};
 
 		/* IPIC
arch/powerpc/boot/dts/mpc8379_mds.dts +4 -3
index acf06c4..1b61cda 100644
@@ -310,12 +310,13 @@
 			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
-		sdhc@2e000 {
-			model = "eSDHC";
-			compatible = "fsl,esdhc";
+		sdhci@2e000 {
+			compatible = "fsl,mpc8379-esdhc";
 			reg = <0x2e000 0x1000>;
 			interrupts = <42 0x8>;
 			interrupt-parent = <&ipic>;
+			/* Filled in by U-Boot */
+			clock-frequency = <0>;
 		};
 
 		sata@18000 {
Signature · 1 line
1.5.6.5
Applied
#4 lore raw

Re: [PATCH 2/3] powerpc/83xx: Convert existing sdhc nodes to new bindings

Quoted 7 lines · Anton Vorontsov

- sdhc node renamed to sdhci ("sdhc" name is confusing since SDHC is used to name Secure Digital High Capacity cards, while SDHCI is an interface).

- Get rid of "fsl,esdhc" compatible entry, it's replaced by the "fsl,<chip>-esdhc" scheme;

Quoted 8 lines

- Get rid of `model' property.

---

arch/powerpc/boot/dts/mpc8377_mds.dts |    7 ++++---
arch/powerpc/boot/dts/mpc8378_mds.dts |    7 ++++---
arch/powerpc/boot/dts/mpc8379_mds.dts |    7 ++++---
3 files changed, 12 insertions(+), 9 deletions(-)

applied to next

- k

#5 lore raw

PATCH 3/3 powerpc/83xx: Add FSL eSDHC support for MPC837x-RDB boards

In reply to Anton Vorontsov

Simply add appropriate sdhci nodes.

Note that U-Boot should configure pin multiplexing for eSDHC prior to Linux could use it. U-Boot should also fill-in the clock-frequency property (eSDHC clock depends on board-specific SCCR[ESDHCCM] bits).

---
 arch/powerpc/boot/dts/mpc8377_rdb.dts |    9 +++++++++
 arch/powerpc/boot/dts/mpc8378_rdb.dts |    9 +++++++++
 arch/powerpc/boot/dts/mpc8379_rdb.dts |    9 +++++++++
 3 files changed, 27 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8377_rdb.dts +9 -0
index b4ab3d0..6f4d614 100644
@@ -291,6 +291,15 @@
 			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
+		sdhci@2e000 {
+			compatible = "fsl,mpc8377-esdhc", "fsl,mpc8379-esdhc";
+			reg = <0x2e000 0x1000>;
+			interrupts = <42 0x8>;
+			interrupt-parent = <&ipic>;
+			/* Filled in by U-Boot */
+			clock-frequency = <0>;
+		};
+
 		sata@18000 {
 			compatible = "fsl,mpc8377-sata", "fsl,pq-sata";
 			reg = <0x18000 0x1000>;
arch/powerpc/boot/dts/mpc8378_rdb.dts +9 -0
index 1b05fb0..6457ef1 100644
@@ -289,6 +289,15 @@
 			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
+		sdhci@2e000 {
+			compatible = "fsl,mpc8378-esdhc", "fsl,mpc8379-esdhc";
+			reg = <0x2e000 0x1000>;
+			interrupts = <42 0x8>;
+			interrupt-parent = <&ipic>;
+			/* Filled in by U-Boot */
+			clock-frequency = <0>;
+		};
+
 		/* IPIC
 		 * interrupts cell = <intr #, sense>
 		 * sense values match linux IORESOURCE_IRQ_* defines:
arch/powerpc/boot/dts/mpc8379_rdb.dts +9 -0
index 72cdc3c..203fff2 100644
@@ -288,6 +288,15 @@
 			fsl,descriptor-types-mask = <0x3ab0ebf>;
 		};
 
+		sdhci@2e000 {
+			compatible = "fsl,mpc8379-esdhc";
+			reg = <0x2e000 0x1000>;
+			interrupts = <42 0x8>;
+			interrupt-parent = <&ipic>;
+			/* Filled in by U-Boot */
+			clock-frequency = <0>;
+		};
+
 		sata@18000 {
 			compatible = "fsl,mpc8379-sata", "fsl,pq-sata";
 			reg = <0x18000 0x1000>;
Signature · 1 line
1.5.6.5
Applied
#6 lore raw

Re: [PATCH 3/3] powerpc/83xx: Add FSL eSDHC support for MPC837x-RDB boards

Quoted 6 lines · Anton Vorontsov

Simply add appropriate sdhci nodes.

Note that U-Boot should configure pin multiplexing for eSDHC prior to Linux could use it. U-Boot should also fill-in the clock-frequency property (eSDHC clock depends on board-specific SCCR[ESDHCCM] bits).

Quoted 6 lines

---

arch/powerpc/boot/dts/mpc8377_rdb.dts |    9 +++++++++
arch/powerpc/boot/dts/mpc8378_rdb.dts |    9 +++++++++
arch/powerpc/boot/dts/mpc8379_rdb.dts |    9 +++++++++
3 files changed, 27 insertions(+), 0 deletions(-)

applied to next

- k

#7 lore raw
In reply to Anton Vorontsov
Quoted 18 lines · Anton Vorontsov
Quoted 17 lines · Kumar Gala
Quoted 15 lines · Anton Vorontsov

This patch adds a new driver: sdhci-of. The driver is similar to the sdhci-pci, it contains common probe code, and controller-specific ops and quirks.

So far there are only Freescale eSDHC ops and quirks.

---

drivers/mmc/host/Kconfig    |   10 ++
drivers/mmc/host/Makefile   |    1 +
drivers/mmc/host/sdhci-of.c |  274 ++++++++++++++++++++++++++++++++ 
++
+++++++++
3 files changed, 285 insertions(+), 0 deletions(-)

create mode 100644 drivers/mmc/host/sdhci-of.c

Quoted 5 lines
Quoted 1 line

Still griping about lack of OF binding docs for this.

Here they're.

I'm assuming that MPC8536 is the first chip in 85xx family with eSDHC.

thanks. MPC8536 is the first. Do we need a u-boot patch for clock-frequency on 85xx?

- k

#8 lore raw
Quoted 20 lines · Kumar Gala
Quoted 19 lines · Anton Vorontsov
Quoted 18 lines · Kumar Gala
Quoted 16 lines · Anton Vorontsov

This patch adds a new driver: sdhci-of. The driver is similar to the sdhci-pci, it contains common probe code, and controller- specific
ops and quirks.

So far there are only Freescale eSDHC ops and quirks.

---

drivers/mmc/host/Kconfig    |   10 ++
drivers/mmc/host/Makefile   |    1 +
drivers/mmc/host/sdhci-of.c |  274 ++++++++++++++++++++++++++++++++ 
++
+++++++++
3 files changed, 285 insertions(+), 0 deletions(-)

create mode 100644 drivers/mmc/host/sdhci-of.c

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Still griping about lack of OF binding docs for this.

Here they're.

I'm assuming that MPC8536 is the first chip in 85xx family with eSDHC.

thanks. MPC8536 is the first. Do we need a u-boot patch for clock- frequency on 85xx?

Yes, I'll prepare U-Boot patches soon (on top of Andy Fleming's eSDHC work):
http://www.mail-archive.com/[email protected]/msg04183.html

W/o the U-Boot patches SDHCI driver will just fail to probe (gracefully, saying that the controller doesn't specify sdclk).

Signature · 3 lines
Anton Vorontsov
email: [email protected]
irc://irc.freenode.net/bd2