From 708b5da38a19d41e6ccb9bff14f54b5f2d1db43c Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Mon, 21 Jan 2019 16:01:15 +0530 Subject: arm: dts: sunxi: Alter mmc2 auto-numbering to mmc1 Environment and fastboot mmc devices are configured based on the number of mmc slots defined on particular board configs, MMC_SUNXI_SLOT_EXTRA. If MMC_SUNXI_SLOT_EXTRA is more than 1, the default env and fastboot mmc devices is mmc1 by assuming mmc0 is SD and mmc1 is emmc device. But with DM_MMC the mmc devices are numbered as per the dts node enablement. If there is a chance of having enabling all mmc nodes in dts say mmc0, mmc1, mmc2 then the default env and fastboot devices will failed to assign proper emmc device since mmc2 is emmc in most of the Allwinner platforms. So, we need to alter the auto-numbering by aliasing mmc2 to mmc1 since aliases take precedence over auto-numbering. If the dts enables mmc0, mmc1, mmc2, then all the nodes will probe sequentially and auto-numbered as it is. but when aliases mmc1 with mmc2 the resulting number should be that mmc0 is till mmc0, mmc2 become mmc1 and mmc2 become mmc1 Without aliases of mmc1 = &mmc2; ------------------------------- MMC: mmc@1c0f000: 0, mmc@1c10000: 1, mmc@1c11000: 2 With aliases of mmc1 = &mmc2; ---------------------------- MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000' mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1 Loading Environment from FAT... OK Some platforms like A20 has mmc0...mmc3, but there is no usecases now for enabling all mmc controllers in any of A20 board dts files. Signed-off-by: Jagan Teki --- arch/arm/dts/sunxi-u-boot.dtsi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch') diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi index 8a9f2a6417..fdd4c80aa4 100644 --- a/arch/arm/dts/sunxi-u-boot.dtsi +++ b/arch/arm/dts/sunxi-u-boot.dtsi @@ -1,6 +1,10 @@ #include / { + aliases { + mmc1 = &mmc2; + }; + binman { filename = "u-boot-sunxi-with-spl.bin"; pad-byte = <0xff>; -- cgit v1.2.1 From cebeba9fdf1e15f8af709ca37f1f0e048fe73209 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Fri, 25 Jan 2019 13:58:25 +0530 Subject: sunxi: A64: pinebook-u-boot: Include sunxi-u-boot.dtsi Like other Allwinner A64 boards, pinebook also need altering auto-numbering of mmc2 to mmc1 which is available in common sunxi dsti file, sunxi-u-boot.dtsi Pinebook has a separate sun50i-a64-pinebook-u-boot.dtsi which takes more precedence for u-boot.dtsi inclusion and it eventually failed to include the sunxi-u-boot.dtsi. So, this patch add support to include the sunxi-u-boot.dtsi in the sun50i-a64-pinebook-u-boot.dtsi Signed-off-by: Jagan Teki Tested-by: Vasily Khoruzhick # Pinebook --- arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi index a99b7171d0..650ab97ec9 100644 --- a/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi +++ b/arch/arm/dts/sun50i-a64-pinebook-u-boot.dtsi @@ -4,6 +4,8 @@ * */ +#include "sunxi-u-boot.dtsi" + /* The ANX6345 eDP-bridge is on r_i2c */ &r_i2c { anx6345: edp-bridge@38 { -- cgit v1.2.1 From a7cca5793774ee139b75a704d6efaa4d29f09f93 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Tue, 29 Jan 2019 15:54:15 +0000 Subject: arm: sunxi: Enable DM_MMC Enable DM_MMC for all Allwinner SoCs, this will eventually enable BLK. Also removed DM_MMC enablement in few parts of sunxi configurations. Signed-off-by: Jagan Teki Reviewed-by: Andre Przywara Signed-off-by: Andre Przywara --- arch/arm/Kconfig | 1 + arch/arm/mach-sunxi/Kconfig | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cefa8f40d0..f0edb10003 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -851,6 +851,7 @@ config ARCH_SUNXI select DM_ETH select DM_GPIO select DM_KEYBOARD + select DM_MMC if MMC select DM_SERIAL select DM_USB if DISTRO_DEFAULTS select OF_BOARD_SETUP diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 3c54f5106d..74e234cded 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -154,7 +154,6 @@ config MACH_SUN4I bool "sun4i (Allwinner A10)" select CPU_V7A select ARM_CORTEX_CPU_IS_UP - select DM_MMC if MMC select DM_SCSI if SCSI select PHY_SUN4I_USB select DRAM_SUN4I -- cgit v1.2.1