aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHan Gao <gaohan@iscas.ac.cn>2023-07-30 03:57:28 +0800
committerHan Gao <gaohan@iscas.ac.cn>2023-07-30 03:57:28 +0800
commitea605b77cfb10179a1eb1a9816d2697d03c90e71 (patch)
treef22a7a86339b7480d441020dc0f4254de4f57f4b /drivers
parentabc7bb33e3f21fc50bae818183b23fc208212ea2 (diff)
feat: update SDK1.2.0
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/snps_sdhci.c20
-rw-r--r--drivers/net/designware.c17
-rw-r--r--drivers/video/Kconfig5
3 files changed, 36 insertions, 6 deletions
diff --git a/drivers/mmc/snps_sdhci.c b/drivers/mmc/snps_sdhci.c
index dd42e7e7..6c9e91eb 100644
--- a/drivers/mmc/snps_sdhci.c
+++ b/drivers/mmc/snps_sdhci.c
@@ -13,6 +13,7 @@
#define HS400_DELAY_LANE 24
volatile int DELAY_LANE = 50;
+volatile int manual_set_delay = 0; //flag for cmd manual setted DELAY_LANE,non-zero is setted. auto clear in cmd
static void sdhci_phy_1_8v_init_no_pull(struct sdhci_host *host)
{
@@ -154,10 +155,14 @@ void snps_set_uhs_timing(struct sdhci_host *host)
{
struct mmc *mmc = (struct mmc *)host->mmc;
u32 reg;
-
+ int restore_delay;
reg = sdhci_readw(host, SDHCI_HOST_CONTROL2);
reg &= ~SDHCI_CTRL_UHS_MASK;
-
+
+ if(manual_set_delay){
+ DELAY_LANE = DELAY_LANE & 0x7f; /*limit bit[0:6]*/
+ printf("%s: manual set delay (%d) active \n",host->name,DELAY_LANE);
+ }
switch (mmc->selected_mode) {
case UHS_SDR50:
case MMC_HS_52:
@@ -175,9 +180,13 @@ void snps_set_uhs_timing(struct sdhci_host *host)
reg |= SDHCI_CTRL_UHS_SDR104;
break;
case MMC_HS_400:
- DELAY_LANE = HS400_DELAY_LANE;
+ restore_delay = DELAY_LANE;
+ if(!manual_set_delay){ /*default not set manual in cmd,when set in cmd,use DELAY_LANE set in cmd*/
+ DELAY_LANE = HS400_DELAY_LANE;
+ }
sdhci_phy_1_8v_init(host);
reg |= SNPS_SDHCI_CTRL_HS400;
+ DELAY_LANE = restore_delay; /*restore for other modes*/
break;
default:
sdhci_phy_3_3v_init(host);
@@ -345,7 +354,10 @@ static int snps_sdhci_probe(struct udevice *dev)
ret = max_clk;
goto err;
}
-
+ //get Maximum Base Clock frequency from dts clock-frequency
+ if(0 == dev_read_u32(dev, "clock-frequency", &max_clk)){
+ host->max_clk = max_clk;
+ }
host->mmc = &plat->mmc;
host->mmc->dev = dev;
host->mmc->priv = host;
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 1a5beb9d..394e9bef 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -508,7 +508,7 @@ static int dw_phy_init(struct dw_eth_dev *priv, void *dev)
{
struct phy_device *phydev;
int phy_addr = -1, ret;
-
+
#ifdef CONFIG_PHY_ADDR
phy_addr = CONFIG_PHY_ADDR;
#endif
@@ -801,13 +801,16 @@ int designware_eth_probe(struct udevice *dev)
err = ret;
goto mdio_err;
}
-
+#ifdef GMAC_USE_FIRST_MII_BUS
if (!g_mii_bus) {
priv->bus = miiphy_get_dev_by_name(dev->name);
g_mii_bus = priv->bus;
} else {
priv->bus = g_mii_bus;
}
+#else
+ priv->bus = miiphy_get_dev_by_name(dev->name);
+#endif
ret = dw_phy_init(priv, dev);
debug("%s, ret=%d\n", __func__, ret);
if (!ret)
@@ -815,8 +818,18 @@ int designware_eth_probe(struct udevice *dev)
/* continue here for cleanup if no PHY found */
err = ret;
+#ifdef GMAC_USE_FIRST_MII_BUS
+ struct mii_dev *t_mii = NULL;
+ t_mii = miiphy_get_dev_by_name(dev->name);
+ if((g_mii_bus != t_mii) && (t_mii != NULL) ){
+ printf("free mdio bus %s\n",t_mii->name);
+ mdio_unregister(t_mii);
+ mdio_free(t_mii);
+ }
+#else
mdio_unregister(priv->bus);
mdio_free(priv->bus);
+#endif
mdio_err:
#ifdef CONFIG_CLK
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8aace57e..306bfebb 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -351,6 +351,11 @@ config VIDEO_LCD_ILITEK_ILI9881C
Say Y here if you want to enable support for ILITEK ILI9881C
800x1280 DSI video mode panel.
+config VIDEO_LCD_CUSTOM_LOGO
+ bool "LCD CUSTOM logo support"
+ help
+ Say Y here if you want to enable support for custom logo.
+
config VIDEO_LCD_SSD2828
bool "SSD2828 bridge chip"
default n