arm64: dts: k3: Sync sdhci0 node from kernel and change driver name

Sync the sdhci0 node from kernel. This changes the compatible that is
required to be there in the driver. Change the same for the SD card node
which is not yet supported in kernel. This also syncs the main_pmx0 node
as a side effect.

Also change the name of the driver to match the compatible in kernel.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 890ef35..98d3f7a 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -468,14 +468,14 @@
 
 	  If unsure, say N.
 
-config MMC_SDHCI_K3_ARASAN
-	bool "Arasan SDHCI controller for TI's K3 based SoCs"
+config MMC_SDHCI_AM654
+	bool "SDHCI Controller on TI's Am654 devices"
 	depends on ARCH_K3
 	depends on MMC_SDHCI
 	depends on DM_MMC && OF_CONTROL && BLK
 	help
-	  Support for Arasan SDHCI host controller on Texas Instruments'
-	  K3 family based SoC platforms
+	  Support for Secure Digital Host Controller Interface (SDHCI)
+	  controllers present on TI's AM654 SOCs.
 
 config MMC_SDHCI_KONA
 	bool "SDHCI support on Broadcom KONA platform"
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 3c8c53a..6cc018b 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -50,7 +50,7 @@
 obj-$(CONFIG_MMC_SDHCI_BCM2835)		+= bcm2835_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_BCMSTB)		+= bcmstb_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_CADENCE)		+= sdhci-cadence.o
-obj-$(CONFIG_MMC_SDHCI_K3_ARASAN)	+= k3_arsan_sdhci.o
+obj-$(CONFIG_MMC_SDHCI_AM654)		+= am654_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_KONA)		+= kona_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_MSM)		+= msm_sdhci.o
 obj-$(CONFIG_MMC_SDHCI_MV)		+= mv_sdhci.o
diff --git a/drivers/mmc/k3_arsan_sdhci.c b/drivers/mmc/am654_sdhci.c
similarity index 67%
rename from drivers/mmc/k3_arsan_sdhci.c
rename to drivers/mmc/am654_sdhci.c
index d5f2857..2d08fe3 100644
--- a/drivers/mmc/k3_arsan_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -12,17 +12,17 @@
 #include <power-domain.h>
 #include <sdhci.h>
 
-#define K3_ARASAN_SDHCI_MIN_FREQ	0
+#define AM654_SDHCI_MIN_FREQ	400000
 
-struct k3_arasan_sdhci_plat {
+struct am654_sdhci_plat {
 	struct mmc_config cfg;
 	struct mmc mmc;
 	unsigned int f_max;
 };
 
-static int k3_arasan_sdhci_probe(struct udevice *dev)
+static int am654_sdhci_probe(struct udevice *dev)
 {
-	struct k3_arasan_sdhci_plat *plat = dev_get_platdata(dev);
+	struct am654_sdhci_plat *plat = dev_get_platdata(dev);
 	struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
 	struct sdhci_host *host = dev_get_priv(dev);
 	struct power_domain sdhci_pwrdmn;
@@ -60,7 +60,7 @@
 	host->max_clk = clock;
 
 	ret = sdhci_setup_cfg(&plat->cfg, host, plat->f_max,
-			      K3_ARASAN_SDHCI_MIN_FREQ);
+			      AM654_SDHCI_MIN_FREQ);
 	host->mmc = &plat->mmc;
 	if (ret)
 		return ret;
@@ -71,9 +71,9 @@
 	return sdhci_probe(dev);
 }
 
-static int k3_arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
+static int am654_sdhci_ofdata_to_platdata(struct udevice *dev)
 {
-	struct k3_arasan_sdhci_plat *plat = dev_get_platdata(dev);
+	struct am654_sdhci_plat *plat = dev_get_platdata(dev);
 	struct sdhci_host *host = dev_get_priv(dev);
 
 	host->name = dev->name;
@@ -84,26 +84,26 @@
 	return 0;
 }
 
-static int k3_arasan_sdhci_bind(struct udevice *dev)
+static int am654_sdhci_bind(struct udevice *dev)
 {
-	struct k3_arasan_sdhci_plat *plat = dev_get_platdata(dev);
+	struct am654_sdhci_plat *plat = dev_get_platdata(dev);
 
 	return sdhci_bind(dev, &plat->mmc, &plat->cfg);
 }
 
-static const struct udevice_id k3_arasan_sdhci_ids[] = {
-	{ .compatible = "arasan,sdhci-5.1" },
+static const struct udevice_id am654_sdhci_ids[] = {
+	{ .compatible = "ti,am654-sdhci-5.1" },
 	{ }
 };
 
-U_BOOT_DRIVER(k3_arasan_sdhci_drv) = {
-	.name		= "k3_arasan_sdhci",
+U_BOOT_DRIVER(am654_sdhci_drv) = {
+	.name		= "am654_sdhci",
 	.id		= UCLASS_MMC,
-	.of_match	= k3_arasan_sdhci_ids,
-	.ofdata_to_platdata = k3_arasan_sdhci_ofdata_to_platdata,
+	.of_match	= am654_sdhci_ids,
+	.ofdata_to_platdata = am654_sdhci_ofdata_to_platdata,
 	.ops		= &sdhci_ops,
-	.bind		= k3_arasan_sdhci_bind,
-	.probe		= k3_arasan_sdhci_probe,
+	.bind		= am654_sdhci_bind,
+	.probe		= am654_sdhci_probe,
 	.priv_auto_alloc_size = sizeof(struct sdhci_host),
-	.platdata_auto_alloc_size = sizeof(struct k3_arasan_sdhci_plat),
+	.platdata_auto_alloc_size = sizeof(struct am654_sdhci_plat),
 };