* [PATCHv3 0/2] ARM: dts: socfpga: fix booting with SD/MMC
@ 2014-10-21 16:15 dinguyen at opensource.altera.com
2014-10-21 16:15 ` [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect dinguyen at opensource.altera.com
2014-10-21 16:15 ` [PATCHv3 2/2] ARM: dts: socfpga: Add a 3.3V fixed regulator node dinguyen at opensource.altera.com
0 siblings, 2 replies; 7+ messages in thread
From: dinguyen at opensource.altera.com @ 2014-10-21 16:15 UTC (permalink / raw)
To: linux-arm-kernel
From: Dinh Nguyen <dinguyen@opensource.altera.com>
The SOCFPGA dev kit was hanging during bootup on the SD/MMC driver loading.
The first patch fixes the booting and the 2nd patch adds a regulator node
for the SD/MMC driver to use.
v3 diff(s): Thanks to Doug Anderson, the real issue was that the GPIO bank used
by cd-gpios did not have status="okay" in the node. This cause the GPIO to not
get probed correctly.
In fact, prior to patch 3cf890fc42b "mmc: dw_mmc: Pass back errors from
mmc_of_parse()", the error was being masked, so it was not being detected.
v2 diff(s): Patch 2/2 ARM: dts: socfpga: Add a 3.3V fixed regulator node
- Move the regulator nodes to their respective board dts file and
correctly rename the regulator to match the schematic
Dinh Nguyen (2):
ARM: dts: socfpga: Fix SD card detect
ARM: dts: socfpga: Add a 3.3V fixed regulator node
arch/arm/boot/dts/socfpga_arria5.dtsi | 2 +-
arch/arm/boot/dts/socfpga_arria5_socdk.dts | 12 ++++++++++++
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 15 +++++++++++++++
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 12 ++++++++++++
4 files changed, 40 insertions(+), 1 deletion(-)
--
2.0.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect
2014-10-21 16:15 [PATCHv3 0/2] ARM: dts: socfpga: fix booting with SD/MMC dinguyen at opensource.altera.com
@ 2014-10-21 16:15 ` dinguyen at opensource.altera.com
2014-10-21 17:10 ` Steffen Trumtrar
2014-10-21 16:15 ` [PATCHv3 2/2] ARM: dts: socfpga: Add a 3.3V fixed regulator node dinguyen at opensource.altera.com
1 sibling, 1 reply; 7+ messages in thread
From: dinguyen at opensource.altera.com @ 2014-10-21 16:15 UTC (permalink / raw)
To: linux-arm-kernel
From: Dinh Nguyen <dinguyen@opensource.altera.com>
Without this patch, the booting the SOCFPGA platform would hang at the
SDMMC driver loading. The issue, debugged by Doug Anderson, turned out
to be that the GPIO bank used by the SD card-detect was not set to
status="okay".
Suggested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
v3: Correctly degugged the issue to be a gpio node not having status="okay"
---
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
index d7296a5..03a3745 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
@@ -37,6 +37,12 @@
*/
ethernet0 = &gmac1;
};
+
+ soc {
+ gpio at ff709000 {
+ status = "okay";
+ };
+ };
};
&gmac1 {
--
2.0.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHv3 2/2] ARM: dts: socfpga: Add a 3.3V fixed regulator node
2014-10-21 16:15 [PATCHv3 0/2] ARM: dts: socfpga: fix booting with SD/MMC dinguyen at opensource.altera.com
2014-10-21 16:15 ` [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect dinguyen at opensource.altera.com
@ 2014-10-21 16:15 ` dinguyen at opensource.altera.com
1 sibling, 0 replies; 7+ messages in thread
From: dinguyen at opensource.altera.com @ 2014-10-21 16:15 UTC (permalink / raw)
To: linux-arm-kernel
From: Dinh Nguyen <dinguyen@opensource.altera.com>
Without the 3.3V regulator node, the SDMMC driver will give these warnings:
dw_mmc ff704000.dwmmc0: No vmmc regulator found
dw_mmc ff704000.dwmmc0: No vqmmc regulator found
This patch adds the regulator node, and points the SD/MMC to the regulator.
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
---
v3: Rename nodes to have schematic-name_regulator and remove "boot-on" and
"always-on"
v2: Move the regulator nodes to their respective board dts file and
correctly rename them to match the schematic
---
arch/arm/boot/dts/socfpga_arria5.dtsi | 2 +-
arch/arm/boot/dts/socfpga_arria5_socdk.dts | 12 ++++++++++++
arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 9 +++++++++
arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 12 ++++++++++++
4 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/socfpga_arria5.dtsi b/arch/arm/boot/dts/socfpga_arria5.dtsi
index 03e8268..1907cc6 100644
--- a/arch/arm/boot/dts/socfpga_arria5.dtsi
+++ b/arch/arm/boot/dts/socfpga_arria5.dtsi
@@ -29,7 +29,7 @@
};
};
- dwmmc0 at ff704000 {
+ mmc0: dwmmc0 at ff704000 {
num-slots = <1>;
broken-cd;
bus-width = <4>;
diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
index 27d551c..ccaf417 100644
--- a/arch/arm/boot/dts/socfpga_arria5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
@@ -37,6 +37,13 @@
*/
ethernet0 = &gmac1;
};
+
+ regulator_3_3v: 3-3-v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
};
&gmac1 {
@@ -68,6 +75,11 @@
};
};
+&mmc0 {
+ vmmc-supply = <®ulator_3_3v>;
+ vqmmc-supply = <®ulator_3_3v>;
+};
+
&usb1 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
index 03a3745..f962135 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
@@ -43,6 +43,13 @@
status = "okay";
};
};
+
+ regulator_3_3v: 3-3-v-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
};
&gmac1 {
@@ -76,6 +83,8 @@
&mmc0 {
cd-gpios = <&gpio1 18 0>;
+ vmmc-supply = <®ulator_3_3v>;
+ vqmmc-supply = <®ulator_3_3v>;
};
&usb1 {
diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
index d26f155..16ea6f5 100644
--- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
@@ -37,6 +37,13 @@
*/
ethernet0 = &gmac1;
};
+
+ regulator_3_3v: vcc3p3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC3P3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
};
&gmac1 {
@@ -53,6 +60,11 @@
rxc-skew-ps = <2000>;
};
+&mmc0 {
+ vmmc-supply = <®ulator_3_3v>;
+ vqmmc-supply = <®ulator_3_3v>;
+};
+
&usb1 {
status = "okay";
};
--
2.0.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect
2014-10-21 16:15 ` [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect dinguyen at opensource.altera.com
@ 2014-10-21 17:10 ` Steffen Trumtrar
2014-10-21 18:48 ` Dinh Nguyen
0 siblings, 1 reply; 7+ messages in thread
From: Steffen Trumtrar @ 2014-10-21 17:10 UTC (permalink / raw)
To: linux-arm-kernel
Hi!
On Tue, Oct 21, 2014 at 11:15:10AM -0500, dinguyen at opensource.altera.com wrote:
> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>
> Without this patch, the booting the SOCFPGA platform would hang at the
> SDMMC driver loading. The issue, debugged by Doug Anderson, turned out
> to be that the GPIO bank used by the SD card-detect was not set to
> status="okay".
>
> Suggested-by: Doug Anderson <dianders@chromium.org>
> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> ---
> v3: Correctly degugged the issue to be a gpio node not having status="okay"
> ---
> arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
> index d7296a5..03a3745 100644
> --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
> @@ -37,6 +37,12 @@
> */
> ethernet0 = &gmac1;
> };
> +
> + soc {
> + gpio at ff709000 {
> + status = "okay";
> + };
> + };
> };
>
Looks weird. Don't you need to enable the GPIO bank instead:
&gpio1 {
status = "okay";
}
???
Regards,
Steffen
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect
2014-10-21 17:10 ` Steffen Trumtrar
@ 2014-10-21 18:48 ` Dinh Nguyen
2014-10-22 15:45 ` Doug Anderson
0 siblings, 1 reply; 7+ messages in thread
From: Dinh Nguyen @ 2014-10-21 18:48 UTC (permalink / raw)
To: linux-arm-kernel
On 10/21/2014 12:10 PM, Steffen Trumtrar wrote:
> Hi!
>
> On Tue, Oct 21, 2014 at 11:15:10AM -0500, dinguyen at opensource.altera.com wrote:
>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>
>> Without this patch, the booting the SOCFPGA platform would hang at the
>> SDMMC driver loading. The issue, debugged by Doug Anderson, turned out
>> to be that the GPIO bank used by the SD card-detect was not set to
>> status="okay".
>>
>> Suggested-by: Doug Anderson <dianders@chromium.org>
>> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
>> ---
>> v3: Correctly degugged the issue to be a gpio node not having status="okay"
>> ---
>> arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>> index d7296a5..03a3745 100644
>> --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>> @@ -37,6 +37,12 @@
>> */
>> ethernet0 = &gmac1;
>> };
>> +
>> + soc {
>> + gpio at ff709000 {
>> + status = "okay";
>> + };
>> + };
>> };
>>
>
> Looks weird. Don't you need to enable the GPIO bank instead:
>
> &gpio1 {
> status = "okay";
> }
>
No, this will not work as gpio1 is already a node inside gpio at ff709000.
The reason for this was that the Designware GPIO IP can support 1, 2 or
3 gpio ports of varying widths. [1][2]
Dinh
[1]
http://article.gmane.org/gmane.linux.drivers.devicetree/72771/match=dw+apb+gpio
[2] http://article.gmane.org/gmane.linux.kernel/1671576/match=dw+apb+gpio
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect
2014-10-21 18:48 ` Dinh Nguyen
@ 2014-10-22 15:45 ` Doug Anderson
2014-10-22 15:47 ` Dinh Nguyen
0 siblings, 1 reply; 7+ messages in thread
From: Doug Anderson @ 2014-10-22 15:45 UTC (permalink / raw)
To: linux-arm-kernel
Dinh,
(without the HTML mail this time, sorry)
On Tue, Oct 21, 2014 at 11:48 AM, Dinh Nguyen
<dinguyen@opensource.altera.com> wrote:
> On 10/21/2014 12:10 PM, Steffen Trumtrar wrote:
>> Hi!
>>
>> On Tue, Oct 21, 2014 at 11:15:10AM -0500, dinguyen at opensource.altera.com wrote:
>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>
>>> Without this patch, the booting the SOCFPGA platform would hang at the
>>> SDMMC driver loading. The issue, debugged by Doug Anderson, turned out
>>> to be that the GPIO bank used by the SD card-detect was not set to
>>> status="okay".
>>>
>>> Suggested-by: Doug Anderson <dianders@chromium.org>
>>> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
>>> ---
>>> v3: Correctly degugged the issue to be a gpio node not having status="okay"
>>> ---
>>> arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>> index d7296a5..03a3745 100644
>>> --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>> @@ -37,6 +37,12 @@
>>> */
>>> ethernet0 = &gmac1;
>>> };
>>> +
>>> + soc {
>>> + gpio at ff709000 {
>>> + status = "okay";
>>> + };
>>> + };
I haven't dug into the details you provided about the GPIO
infrastructure of socfpga, but it does seem like it might be nice to
some easier way to reference things in
"arch/arm/boot/dts/socfpga.dtsi".
Looking at other examples they call the "gpio at ff708000" "gpio0" and
the sub node something like "porta". Given that this is the only
reference to the GPIO, it seems like now would be the time to change
it.
-Doug
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect
2014-10-22 15:45 ` Doug Anderson
@ 2014-10-22 15:47 ` Dinh Nguyen
0 siblings, 0 replies; 7+ messages in thread
From: Dinh Nguyen @ 2014-10-22 15:47 UTC (permalink / raw)
To: linux-arm-kernel
On 10/22/14, 10:45 AM, Doug Anderson wrote:
> Dinh,
>
> (without the HTML mail this time, sorry)
>
> On Tue, Oct 21, 2014 at 11:48 AM, Dinh Nguyen
> <dinguyen@opensource.altera.com> wrote:
>> On 10/21/2014 12:10 PM, Steffen Trumtrar wrote:
>>> Hi!
>>>
>>> On Tue, Oct 21, 2014 at 11:15:10AM -0500, dinguyen at opensource.altera.com wrote:
>>>> From: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>>
>>>> Without this patch, the booting the SOCFPGA platform would hang at the
>>>> SDMMC driver loading. The issue, debugged by Doug Anderson, turned out
>>>> to be that the GPIO bank used by the SD card-detect was not set to
>>>> status="okay".
>>>>
>>>> Suggested-by: Doug Anderson <dianders@chromium.org>
>>>> Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
>>>> ---
>>>> v3: Correctly degugged the issue to be a gpio node not having status="okay"
>>>> ---
>>>> arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 6 ++++++
>>>> 1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>>> index d7296a5..03a3745 100644
>>>> --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>>> +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
>>>> @@ -37,6 +37,12 @@
>>>> */
>>>> ethernet0 = &gmac1;
>>>> };
>>>> +
>>>> + soc {
>>>> + gpio at ff709000 {
>>>> + status = "okay";
>>>> + };
>>>> + };
>
> I haven't dug into the details you provided about the GPIO
> infrastructure of socfpga, but it does seem like it might be nice to
> some easier way to reference things in
> "arch/arm/boot/dts/socfpga.dtsi".
>
> Looking at other examples they call the "gpio at ff708000" "gpio0" and
> the sub node something like "porta". Given that this is the only
> reference to the GPIO, it seems like now would be the time to change
> it.
Yeah...I like your idea. Let met get a new patch for that...
Thanks,
Dinh
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-22 15:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21 16:15 [PATCHv3 0/2] ARM: dts: socfpga: fix booting with SD/MMC dinguyen at opensource.altera.com
2014-10-21 16:15 ` [PATCHv3 1/2] ARM: dts: socfpga: Fix SD card detect dinguyen at opensource.altera.com
2014-10-21 17:10 ` Steffen Trumtrar
2014-10-21 18:48 ` Dinh Nguyen
2014-10-22 15:45 ` Doug Anderson
2014-10-22 15:47 ` Dinh Nguyen
2014-10-21 16:15 ` [PATCHv3 2/2] ARM: dts: socfpga: Add a 3.3V fixed regulator node dinguyen at opensource.altera.com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).