2015-04-27 13:19:11

by Ludovic Desroches

[permalink] [raw]
Subject: [PATCH 1/4] ARM: at91/dt: sama5d3 xplained: fill in mmc1 and set it to disabled

From: Ben Dooks <[email protected]>

The mmc1 channel is not populated on the SAM5D3 Xplained board, however
it is enabled and therefore the driver is attaching to it.

The node configuration for mmc1 is missing, so add an mmc1 node in the
device tree and set its status to disabled. Also add the vmmc and the
necessary slot configuration if this node were enabled to avoid the following
warnings from the driver:

atmel_mci f8000000.mmc: No vmmc regulator found
atmel_mci f8000000.mmc: No vqmmc regulator found

Signed-off-by: Ben Dooks <[email protected]>
Signed-off-by: Ludovic Desroches <[email protected]>
---
arch/arm/boot/dts/at91-sama5d3_xplained.dts | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index 9991240..af8b263 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -43,6 +43,17 @@
};
};

+ mmc1: mmc@f8000000 {
+ vmmc-supply = <&vcc_3v3_reg>;
+ vqmmc-supply = <&vcc_3v3_reg>;
+ status = "disabled";
+ slot@0 {
+ reg = <0>;
+ bus-width = <4>;
+ cd-gpios = <&pioE 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
spi0: spi@f0004000 {
cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
status = "okay";
--
2.2.0


2015-04-27 13:19:30

by Ludovic Desroches

[permalink] [raw]
Subject: [PATCH 2/4] ARM: at91/dt: sama5d3 xplained: add mmc0 vqmmc entry

From: Ben Dooks <[email protected]>

The SAM5D3 Xplained device tree is missing the vqmmc node which is
tied to 3.3V on the board. Add this to avoid the kernel warning that
there is no vqmmc node.

atmel_mci f0000000.mmc: No vqmmc regulator found

Signed-off-by: Ben Dooks <[email protected]>
Signed-off-by: Ludovic Desroches <[email protected]>
---
arch/arm/boot/dts/at91-sama5d3_xplained.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index af8b263..61922b3 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -35,6 +35,7 @@
apb {
mmc0: mmc@f0000000 {
pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
+ vqmmc-supply = <&vcc_3v3_reg>;
status = "okay";
slot@0 {
reg = <0>;
--
2.2.0

2015-04-27 13:19:56

by Ludovic Desroches

[permalink] [raw]
Subject: [PATCH 3/4] ARM: at91/dt: sama5d3 xplained: add fixed regulator for vmmc0

From: Ben Dooks <[email protected]>

Add fixed regulator for vmmc0 and attach the vmmc for it to the mmc0
node on the SAM5D3 Xplained board. This will remove the following
warning from the kernel:

atmel_mci f0000000.mmc: No vmmc regulator found

Note, atmel_defconfig will need fixed regulator support enabled if this
is to be used properly.

Signed-off-by: Ben Dooks <[email protected]>
[use a fixed regulator instead of gpio one]
Signed-off-by: Ludovic Desroches <[email protected]>
---
arch/arm/boot/dts/at91-sama5d3_xplained.dts | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index 61922b3..581986a 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -35,6 +35,7 @@
apb {
mmc0: mmc@f0000000 {
pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
+ vmmc-supply = <&vcc_mmc0_reg>;
vqmmc-supply = <&vcc_3v3_reg>;
status = "okay";
slot@0 {
@@ -296,6 +297,14 @@
};
};

+ vcc_mmc0_reg: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
+ regulator-name = "mmc0-card-supply";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
gpio_keys {
compatible = "gpio-keys";

--
2.2.0

2015-04-27 13:20:23

by Ludovic Desroches

[permalink] [raw]
Subject: [PATCH 4/4] ARM: at91/dt: sama5d4 xplained: add regulators for v(q)mmc1 supplies

Add vcc_mmc1 fixed regulator to remove the 'no vmmc regulator found' warning
when probing the mmc1 device.

Signed-off-by: Ludovic Desroches <[email protected]>
---
arch/arm/boot/dts/at91-sama5d4_xplained.dts | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
index c740e1a..d49cb71 100644
--- a/arch/arm/boot/dts/at91-sama5d4_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
@@ -90,6 +90,7 @@

i2c0: i2c@f8014000 {
status = "okay";
+
};

macb0: ethernet@f8020000 {
@@ -106,6 +107,8 @@
mmc1: mmc@fc000000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+ vmmc-supply = <&vcc_mmc1_reg>;
+ vqmmc-supply = <&vcc_3v3_reg>;
status = "okay";
slot@0 {
reg = <0>;
@@ -238,4 +241,22 @@
linux,default-trigger = "heartbeat";
};
};
+
+ vcc_3v3_reg: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC 3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vcc_mmc1_reg: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ gpio = <&pioE 4 GPIO_ACTIVE_LOW>;
+ regulator-name = "VDD MCI1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3_reg>;
+ };
};
--
2.2.0

2015-04-27 13:27:48

by Ludovic Desroches

[permalink] [raw]
Subject: [PATCH 4/4] ARM: at91/dt: sama5d4 xplained: add regulators for v(q)mmc1 supplies

Add vcc_mmc1 fixed regulator to remove the 'no vmmc regulator found' warning
when probing the mmc1 device.

Signed-off-by: Ludovic Desroches <[email protected]>
---

Remove the additionnal blank line.

arch/arm/boot/dts/at91-sama5d4_xplained.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
index c740e1a..88a0b9f 100644
--- a/arch/arm/boot/dts/at91-sama5d4_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
@@ -106,6 +106,8 @@
mmc1: mmc@fc000000 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
+ vmmc-supply = <&vcc_mmc1_reg>;
+ vqmmc-supply = <&vcc_3v3_reg>;
status = "okay";
slot@0 {
reg = <0>;
@@ -238,4 +240,22 @@
linux,default-trigger = "heartbeat";
};
};
+
+ vcc_3v3_reg: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC 3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ vcc_mmc1_reg: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ gpio = <&pioE 4 GPIO_ACTIVE_LOW>;
+ regulator-name = "VDD MCI1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3_reg>;
+ };
};
--
2.2.0

2015-05-19 09:08:17

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 1/4] ARM: at91/dt: sama5d3 xplained: fill in mmc1 and set it to disabled

Le 27/04/2015 15:19, Ludovic Desroches a ?crit :
> From: Ben Dooks <[email protected]>
>
> The mmc1 channel is not populated on the SAM5D3 Xplained board, however
> it is enabled and therefore the driver is attaching to it.
>
> The node configuration for mmc1 is missing, so add an mmc1 node in the
> device tree and set its status to disabled. Also add the vmmc and the
> necessary slot configuration if this node were enabled to avoid the following
> warnings from the driver:
>
> atmel_mci f8000000.mmc: No vmmc regulator found
> atmel_mci f8000000.mmc: No vqmmc regulator found
>
> Signed-off-by: Ben Dooks <[email protected]>
> Signed-off-by: Ludovic Desroches <[email protected]>

Acked-by: Nicolas Ferre <[email protected]>

and queued on at91-4.2-dt branch.

I also sent the update of the at91 defconfigs. We may need to have a
kind of synchronization between them... but a loose one should be okay...

Bye,

> ---
> arch/arm/boot/dts/at91-sama5d3_xplained.dts | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
> index 9991240..af8b263 100644
> --- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
> +++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
> @@ -43,6 +43,17 @@
> };
> };
>
> + mmc1: mmc@f8000000 {
> + vmmc-supply = <&vcc_3v3_reg>;
> + vqmmc-supply = <&vcc_3v3_reg>;
> + status = "disabled";
> + slot@0 {
> + reg = <0>;
> + bus-width = <4>;
> + cd-gpios = <&pioE 1 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> spi0: spi@f0004000 {
> cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
> status = "okay";
>


--
Nicolas Ferre