uboot-sunxi: add DM_MMC support for Allwinner H6
authorZoltan HERPAI <wigyori@uid0.hu>
Mon, 26 Aug 2019 08:19:32 +0000 (10:19 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Tue, 5 Nov 2019 23:36:29 +0000 (00:36 +0100)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
package/boot/uboot-sunxi/patches/260-mmc-sunxi-add-DM_MMC-support-for-H6.patch [new file with mode: 0644]

diff --git a/package/boot/uboot-sunxi/patches/260-mmc-sunxi-add-DM_MMC-support-for-H6.patch b/package/boot/uboot-sunxi/patches/260-mmc-sunxi-add-DM_MMC-support-for-H6.patch
new file mode 100644 (file)
index 0000000..619f55c
--- /dev/null
@@ -0,0 +1,43 @@
+From 9e23338268d40d162a44d5c5d0ec71c209ccabf6 Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan@amarulasolutions.com>
+Date: Tue, 29 Jan 2019 15:54:12 +0000
+Subject: [PATCH] mmc: sunxi: Add DM_MMC support for H6
+
+Unlike other Allwinner SoC's, H6 uses a different MMC mod clock offset.
+Connect that with the respective compatible string.
+
+Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
+Reviewed-by: Andre Przywara <andre.przywara@arm.com>
+Signed-off-by: Andre Przywara <andre.przywara@arm.com>
+---
+ drivers/mmc/sunxi_mmc.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/mmc/sunxi_mmc.c
++++ b/drivers/mmc/sunxi_mmc.c
+@@ -680,6 +680,10 @@ static const struct sunxi_mmc_variant su
+       .mclk_offset = 0x88,
+ };
++static const struct sunxi_mmc_variant sun50i_h6_variant = {
++      .mclk_offset = 0x830,
++};
++
+ static const struct udevice_id sunxi_mmc_ids[] = {
+       {
+         .compatible = "allwinner,sun4i-a10-mmc",
+@@ -693,6 +697,14 @@ static const struct udevice_id sunxi_mmc
+         .compatible = "allwinner,sun7i-a20-mmc",
+         .data = (ulong)&sun4i_a10_variant,
+       },
++      {
++        .compatible = "allwinner,sun50i-h6-mmc",
++        .data = (ulong)&sun50i_h6_variant,
++      },
++      {
++        .compatible = "allwinner,sun50i-h6-emmc",
++        .data = (ulong)&sun50i_h6_variant,
++      },
+       { /* sentinel */ }
+ };