diff mbox series

[v2,10/13] arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node

Message ID 20241031070232.1793078-11-masterr3c0rd@epochal.quest (mailing list archive)
State New
Headers show
Series sunxi: A100/A133 second stage support | expand

Commit Message

Cody Eksal Oct. 31, 2024, 7:02 a.m. UTC
From: Yangtao Li <frank@allwinnertech.com>

A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
---
 .../allwinner/sun50i-a100-allwinner-perf1.dts    | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Chen-Yu Tsai Nov. 2, 2024, 11:48 a.m. UTC | #1
On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> From: Yangtao Li <frank@allwinnertech.com>
>
> A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.
>
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>

So I skipped this one since Andre had some questions about the previous
mmc clock patch. And I believe this one won't work without it?

ChenYu

> ---
>  .../allwinner/sun50i-a100-allwinner-perf1.dts    | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> index 2f8c7ee60283..d418fc272b3c 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
> @@ -39,6 +39,22 @@ &ehci1 {
>         status = "okay";
>  };
>
> +&mmc0 {
> +       vmmc-supply = <&reg_dcdc1>;
> +       cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
> +       bus-width = <4>;
> +       status = "okay";
> +};
> +
> +&mmc2 {
> +       vmmc-supply = <&reg_dcdc1>;
> +       vqmmc-supply = <&reg_aldo1>;
> +       cap-mmc-hw-reset;
> +       non-removable;
> +       bus-width = <8>;
> +       status = "okay";
> +};
> +
>  &ohci0 {
>         status = "okay";
>  };
> --
> 2.47.0
>
Cody Eksal Nov. 2, 2024, 9:23 p.m. UTC | #2
On 2024/11/02 8:48 am, Chen-Yu Tsai wrote:
> On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>>
>> From: Yangtao Li <frank@allwinnertech.com>
>>
>> A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.
>>
>> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
>> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> 
> So I skipped this one since Andre had some questions about the previous
> mmc clock patch. And I believe this one won't work without it?
eMMC (mmc2) works fine after more testing, even without the clock
reparenting patch (in fact, it appears to work more consistently), but
mmc0 and mmc1 require more testing and debugging. I'll deal with
the remaining MMC issues in a future patch.

- Cody

> ChenYu
> 
>> ---
>>  .../allwinner/sun50i-a100-allwinner-perf1.dts    | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
Chen-Yu Tsai Nov. 3, 2024, 2:54 a.m. UTC | #3
On Sun, Nov 3, 2024 at 5:23 AM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
>
> On 2024/11/02 8:48 am, Chen-Yu Tsai wrote:
> > On Thu, Oct 31, 2024 at 3:03 PM Cody Eksal <masterr3c0rd@epochal.quest> wrote:
> >>
> >> From: Yangtao Li <frank@allwinnertech.com>
> >>
> >> A100 perf1 hava MicroSD slot and on-board eMMC module, add support for them.
> >>
> >> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> >> Signed-off-by: Cody Eksal <masterr3c0rd@epochal.quest>
> >
> > So I skipped this one since Andre had some questions about the previous
> > mmc clock patch. And I believe this one won't work without it?
> eMMC (mmc2) works fine after more testing, even without the clock
> reparenting patch (in fact, it appears to work more consistently), but
> mmc0 and mmc1 require more testing and debugging. I'll deal with
> the remaining MMC issues in a future patch.

I think it would be better if only the eMMC was enabled. Enabling something
that is almost guaranteed to cause data corruption isn't going to be fun
for users.

ChenYu
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
index 2f8c7ee60283..d418fc272b3c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a100-allwinner-perf1.dts
@@ -39,6 +39,22 @@  &ehci1 {
 	status = "okay";
 };
 
+&mmc0 {
+	vmmc-supply = <&reg_dcdc1>;
+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+	bus-width = <4>;
+	status = "okay";
+};
+
+&mmc2 {
+	vmmc-supply = <&reg_dcdc1>;
+	vqmmc-supply = <&reg_aldo1>;
+	cap-mmc-hw-reset;
+	non-removable;
+	bus-width = <8>;
+	status = "okay";
+};
+
 &ohci0 {
 	status = "okay";
 };