From d6092e3229440502b7aa9fbe9ae07b5d0da25e12 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Tue, 11 Aug 2020 14:44:30 +0800 Subject: [PATCH 1/4] rockchip: dts: rk3399-evb: add sdmmc node The sdmmc node is missing after the dts sync patch: 167efc2c7a arm64: dts: rk3399: Sync v5.7-rc1 from Linux But we still need it for boot from SD card, so add it. Signed-off-by: Kever Yang --- arch/arm/dts/rk3399-evb-u-boot.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/dts/rk3399-evb-u-boot.dtsi b/arch/arm/dts/rk3399-evb-u-boot.dtsi index 1be54feacc0..8056dc843e7 100644 --- a/arch/arm/dts/rk3399-evb-u-boot.dtsi +++ b/arch/arm/dts/rk3399-evb-u-boot.dtsi @@ -37,3 +37,16 @@ dr_mode = "host"; status = "okay"; }; + +&sdmmc { + u-boot,dm-pre-reloc; + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + disable-wp; + max-frequency = <150000000>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>; + status = "okay"; +}; From 5c5435093a6c0a6995351b64c6b8b08fe7d6bf59 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Tue, 11 Aug 2020 14:47:01 +0800 Subject: [PATCH 2/4] rockchip: config: evb-rk3399: Add rockchip dwmmc support This enable support for SD card on evb-rk3399. Signed-off-by: Kever Yang --- configs/evb-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/evb-rk3399_defconfig b/configs/evb-rk3399_defconfig index 509c86b81bf..909c68822cc 100644 --- a/configs/evb-rk3399_defconfig +++ b/configs/evb-rk3399_defconfig @@ -30,6 +30,7 @@ CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y CONFIG_MISC=y CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SF_DEFAULT_SPEED=20000000 From e2f8ba8a5f5b100f08118793743cfe5064b8c381 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Thu, 20 Aug 2020 17:31:16 +0800 Subject: [PATCH 3/4] rockchip: rk3188: Fix the code support for SPL_LED Fix the build error for the wrong code when CONFIG_SPL_LED is enabled. Signed-off-by: Kever Yang --- arch/arm/mach-rockchip/rk3188/rk3188.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c b/arch/arm/mach-rockchip/rk3188/rk3188.c index 1b2f4a47571..222953ab94a 100644 --- a/arch/arm/mach-rockchip/rk3188/rk3188.c +++ b/arch/arm/mach-rockchip/rk3188/rk3188.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -105,6 +106,7 @@ int rk_board_late_init(void) } #ifdef CONFIG_SPL_BUILD +DECLARE_GLOBAL_DATA_PTR; static int setup_led(void) { #ifdef CONFIG_SPL_LED @@ -120,7 +122,7 @@ static int setup_led(void) debug("%s: get=%d\n", __func__, ret); return ret; } - ret = led_set_on(dev, 1); + ret = led_set_state(dev, LEDST_ON); if (ret) return ret; #endif From b5b81f2490628650137c9fee3679c995f5fac757 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Thu, 20 Aug 2020 17:32:52 +0800 Subject: [PATCH 4/4] rockchip: firefly-rk3288: Fix the code support for SPL_LED Fix the build error for the wrong code when CONFIG_SPL_LED is enabled. Signed-off-by: Kever Yang --- board/firefly/firefly-rk3288/firefly-rk3288.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c index 1965985a0f4..bd8a32cf7b3 100644 --- a/board/firefly/firefly-rk3288/firefly-rk3288.c +++ b/board/firefly/firefly-rk3288/firefly-rk3288.c @@ -5,9 +5,11 @@ #include #include +#include #include #ifdef CONFIG_SPL_BUILD +DECLARE_GLOBAL_DATA_PTR; static int setup_led(void) { #ifdef CONFIG_SPL_LED @@ -23,7 +25,7 @@ static int setup_led(void) debug("%s: get=%d\n", __func__, ret); return ret; } - ret = led_set_on(dev, 1); + ret = led_set_state(dev, LEDST_ON); if (ret) return ret; #endif