Lines Matching +full:ast2500 +full:- +full:sd +full:- +full:controller

1 // SPDX-License-Identifier: GPL-2.0+
5 * Rockchip SD Host Controller Interface
10 #include <dt-structs.h>
36 struct sdhci_host *host = prv->host; in aspeed_sdhci_probe()
47 pr_debug("%s: Can't get clock for %s: %d\n", __func__, dev->name, in aspeed_sdhci_probe()
60 //1: sd card pwr, 0: no pwr in aspeed_sdhci_probe()
61 gpio_request_by_name_nodev(offset_to_ofnode(node), "pwr-gpios", 0, in aspeed_sdhci_probe()
62 &host->pwr_gpio, GPIOD_IS_OUT); in aspeed_sdhci_probe()
63 if (dm_gpio_is_valid(&host->pwr_gpio)) { in aspeed_sdhci_probe()
65 dm_gpio_set_value(&host->pwr_gpio, 1); in aspeed_sdhci_probe()
73 gpio_request_by_name_nodev(offset_to_ofnode(node), "pwr-sw-gpios", 0, in aspeed_sdhci_probe()
74 &host->pwr_sw_gpio, GPIOD_IS_OUT); in aspeed_sdhci_probe()
76 if (dm_gpio_is_valid(&host->pwr_sw_gpio)) { in aspeed_sdhci_probe()
77 dm_gpio_set_value(&host->pwr_sw_gpio, 1); in aspeed_sdhci_probe()
84 // host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD; in aspeed_sdhci_probe()
85 host->max_clk = clock; in aspeed_sdhci_probe()
86 f_max = dev_read_u32_default(dev, "max-frequency", clock); in aspeed_sdhci_probe()
88 host->bus_width = dev_read_u32_default(dev, "bus-width", 4); in aspeed_sdhci_probe()
90 if (host->bus_width == 8) in aspeed_sdhci_probe()
91 host->host_caps |= MMC_MODE_8BIT; in aspeed_sdhci_probe()
93 ret = sdhci_setup_cfg(&plat->cfg, host, f_max, EMMC_MIN_FREQ); in aspeed_sdhci_probe()
95 host->mmc = &plat->mmc; in aspeed_sdhci_probe()
99 host->mmc->drv_type = dev_read_u32_default(dev, "sdhci-drive-type", 0); in aspeed_sdhci_probe()
100 host->mmc->priv = host; in aspeed_sdhci_probe()
101 host->mmc->dev = dev; in aspeed_sdhci_probe()
102 upriv->mmc = host->mmc; in aspeed_sdhci_probe()
111 priv->host = calloc(1, sizeof(struct sdhci_host)); in aspeed_sdhci_ofdata_to_platdata()
112 if (!priv->host) in aspeed_sdhci_ofdata_to_platdata()
113 return -1; in aspeed_sdhci_ofdata_to_platdata()
115 priv->host->name = dev->name; in aspeed_sdhci_ofdata_to_platdata()
116 priv->host->ioaddr = (void *)dev_read_addr(dev); in aspeed_sdhci_ofdata_to_platdata()
125 return sdhci_bind(dev, &plat->mmc, &plat->cfg); in aspeed_sdhci_bind()
129 { .compatible = "aspeed,sdhci-ast2500" },
130 { .compatible = "aspeed,sdhci-ast2600" },
131 { .compatible = "aspeed,emmc-ast2600" },