2013-09-11 06:12:42

by Koen Kooi

[permalink] [raw]
Subject: [PATCH 0/2] ARM: dts: Beaglebone MMC fixes

Here are two patches to fix MMC on beaglebone, one fixes card detect on BBW,
the other adds the eMMC entry for BBB and its fixed regulator.

This series depends on:

http://comments.gmane.org/gmane.linux.kernel.stable/63648
https://lkml.org/lkml/2013/9/10/454
http://comments.gmane.org/gmane.linux.kernel.mmc/22381

Or as git-cherry would put it:

[koen@rrMBP patches]$ git cherry -v
+ c8436cd15251ea42c7f2decd1cc972de536a7573 ARM: OMAP2+: am335x-bone*: add DT for BeagleBone Black
+ 34596cb58346612101b168b34b7ee75b8b0e9500 ARM: EDMA: Fix clearing of unused list for DT DMA resources
+ af7f273dfbeeec7669c01a81b8c02f4af2fcf1b9 ARM: dts: add AM33XX EDMA support
+ a85f9acc8f48a7cb1a07fb93fcba7bd43aa9c853 ARM: dts: add AM33XX SPI DMA support
+ 72a42fa0b42051251c554d9f75f42b3e9bc6ec8a ARM: dts: add AM33XX MMC support and documentation
+ 93205a3735613d674b209c3c75ad3e0a7d6be136 arm: bone: dts: add CD for mmc1
+ b1bd98705a2da3d02f197d29ca040008ad8c662c am335x-boneblack: add eMMC DT entry

Also available as a git branch at https://github.com/koenkooi/linux/commits/mainline

---

Alexander Holler (1):
arm: bone: dts: add CD for mmc1

Koen Kooi (1):
am335x-boneblack: add eMMC DT entry

arch/arm/boot/dts/am335x-bone-common.dtsi | 21 +++++++++++++++++++++
arch/arm/boot/dts/am335x-bone.dts | 4 ----
arch/arm/boot/dts/am335x-boneblack.dts | 15 +++++++++++++++
3 files changed, 36 insertions(+), 4 deletions(-)

--
1.8.2.1


2013-09-11 06:12:45

by Koen Kooi

[permalink] [raw]
Subject: [PATCH 2/2] am335x-boneblack: add eMMC DT entry

Signed-off-by: Koen Kooi <[email protected]>
---
arch/arm/boot/dts/am335x-bone-common.dtsi | 7 +++++++
arch/arm/boot/dts/am335x-boneblack.dts | 15 +++++++++++++++
2 files changed, 22 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index ced256c..9c61fef 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -241,6 +241,13 @@
regulator-always-on;
};
};
+
+ vmmcsd_fixed: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vmmcsd_fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
};

&cpsw_emac0 {
diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 197cadf..c09947a 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -15,3 +15,18 @@
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
+
+&mmc1 {
+ vmmc-supply = <&vmmcsd_fixed>;
+};
+
+&mmc2 {
+ vmmc-supply = <&vmmcsd_fixed>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_pins>;
+ bus-width = <8>;
+ ti,non-removable;
+ status = "okay";
+ ti,vcc-aux-disable-is-sleep;
+};
+
--
1.8.2.1

2013-09-11 06:13:02

by Koen Kooi

[permalink] [raw]
Subject: [PATCH 1/2] arm: bone: dts: add CD for mmc1

From: Alexander Holler <[email protected]>

This enables the use of MMC cards even when no card was inserted at boot.

Signed-off-by: Alexander Holler <[email protected]>
Signed-off-by: Koen Kooi <[email protected]>
---
arch/arm/boot/dts/am335x-bone-common.dtsi | 14 ++++++++++++++
arch/arm/boot/dts/am335x-bone.dts | 4 ----
2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 2f66ded..ced256c 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -107,6 +107,11 @@
0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
+ mmc1_pins: pinmux_mmc1_pins {
+ pinctrl-single,pins = <
+ 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
+ >;
+ };
};

ocp {
@@ -260,3 +265,12 @@
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
};
+
+&mmc1 {
+ status = "okay";
+ vmmc-supply = <&ldo3_reg>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc1_pins>;
+ cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+ cd-inverted;
+};
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts
index d5f43fe..d34469c 100644
--- a/arch/arm/boot/dts/am335x-bone.dts
+++ b/arch/arm/boot/dts/am335x-bone.dts
@@ -16,7 +16,3 @@
regulator-always-on;
};

-&mmc1 {
- status = "okay";
- vmmc-supply = <&ldo3_reg>;
-};
--
1.8.2.1

2013-09-11 10:12:10

by Sekhar Nori

[permalink] [raw]
Subject: Re: [PATCH 2/2] am335x-boneblack: add eMMC DT entry

On Wednesday 11 September 2013 11:42 AM, Koen Kooi wrote:
> Signed-off-by: Koen Kooi <[email protected]>
> ---
> arch/arm/boot/dts/am335x-bone-common.dtsi | 7 +++++++
> arch/arm/boot/dts/am335x-boneblack.dts | 15 +++++++++++++++
> 2 files changed, 22 insertions(+)
>
> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
> index ced256c..9c61fef 100644
> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
> @@ -241,6 +241,13 @@
> regulator-always-on;
> };
> };
> +
> + vmmcsd_fixed: fixedregulator@0 {
> + compatible = "regulator-fixed";
> + regulator-name = "vmmcsd_fixed";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + };
> };
>
> &cpsw_emac0 {
> diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
> index 197cadf..c09947a 100644
> --- a/arch/arm/boot/dts/am335x-boneblack.dts
> +++ b/arch/arm/boot/dts/am335x-boneblack.dts
> @@ -15,3 +15,18 @@
> regulator-max-microvolt = <1800000>;
> regulator-always-on;
> };
> +
> +&mmc1 {
> + vmmc-supply = <&vmmcsd_fixed>;
> +};
> +
> +&mmc2 {
> + vmmc-supply = <&vmmcsd_fixed>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&emmc_pins>;
> + bus-width = <8>;
> + ti,non-removable;

There is a standard binding available for this: "non-removable"
There should not be a need to introduce a TI specific binding for this
(I know this is not your fault).

I will send a patch to change the existing .dts files and update the
driver - can you drop this line for now so we don't introduce more
incompatibilities? I can send a patch adding "non-removable" to this
node as part of my clean-up series.

Thanks,
Sekhar

2013-09-11 10:57:16

by Koen Kooi

[permalink] [raw]
Subject: Re: [PATCH 2/2] am335x-boneblack: add eMMC DT entry


Op 11 sep. 2013, om 12:06 heeft Sekhar Nori <[email protected]> het volgende geschreven:

> On Wednesday 11 September 2013 11:42 AM, Koen Kooi wrote:
>> Signed-off-by: Koen Kooi <[email protected]>
>> ---
>> arch/arm/boot/dts/am335x-bone-common.dtsi | 7 +++++++
>> arch/arm/boot/dts/am335x-boneblack.dts | 15 +++++++++++++++
>> 2 files changed, 22 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
>> index ced256c..9c61fef 100644
>> --- a/arch/arm/boot/dts/am335x-bone-common.dtsi
>> +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
>> @@ -241,6 +241,13 @@
>> regulator-always-on;
>> };
>> };
>> +
>> + vmmcsd_fixed: fixedregulator@0 {
>> + compatible = "regulator-fixed";
>> + regulator-name = "vmmcsd_fixed";
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> + };
>> };
>>
>> &cpsw_emac0 {
>> diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
>> index 197cadf..c09947a 100644
>> --- a/arch/arm/boot/dts/am335x-boneblack.dts
>> +++ b/arch/arm/boot/dts/am335x-boneblack.dts
>> @@ -15,3 +15,18 @@
>> regulator-max-microvolt = <1800000>;
>> regulator-always-on;
>> };
>> +
>> +&mmc1 {
>> + vmmc-supply = <&vmmcsd_fixed>;
>> +};
>> +
>> +&mmc2 {
>> + vmmc-supply = <&vmmcsd_fixed>;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&emmc_pins>;
>> + bus-width = <8>;
>> + ti,non-removable;
>
> There is a standard binding available for this: "non-removable"
> There should not be a need to introduce a TI specific binding for this
> (I know this is not your fault).
>
> I will send a patch to change the existing .dts files and update the
> driver - can you drop this line for now so we don't introduce more
> incompatibilities? I can send a patch adding "non-removable" to this
> node as part of my clean-up series.

Sure, I'll send a v2 shortly. Thank you very much for killing another ti, prefixed node!

regards,

Koen