diff --git a/patch/u-boot/u-boot-dev/add-emmc-orangepi.patch b/patch/u-boot/u-boot-dev/add-emmc-orangepi.patch new file mode 100644 index 000000000..c397acdd6 --- /dev/null +++ b/patch/u-boot/u-boot-dev/add-emmc-orangepi.patch @@ -0,0 +1,54 @@ +diff --git a/arch/arm/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/dts/sun8i-h3-orangepi-pc.dts +index 30ccca0..6475652 100644 +--- a/arch/arm/dts/sun8i-h3-orangepi-pc.dts ++++ b/arch/arm/dts/sun8i-h3-orangepi-pc.dts +@@ -126,6 +126,15 @@ + status = "okay"; + }; + ++&mmc2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc2_8bit_pins>; ++ vmmc-supply = <®_vcc3v0>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ + &ohci1 { + status = "okay"; + }; +diff --git a/arch/arm/dts/sun8i-h3.dtsi b/arch/arm/dts/sun8i-h3.dtsi +index c2f63c5..4a4926b 100644 +--- a/arch/arm/dts/sun8i-h3.dtsi ++++ b/arch/arm/dts/sun8i-h3.dtsi +@@ -530,6 +530,16 @@ + allwinner,drive = ; + allwinner,pull = ; + }; ++ ++ mmc2_8bit_pins: mmc2_8bit { ++ allwinner,pins = "PC5", "PC6", "PC8", ++ "PC9", "PC10", "PC11", ++ "PC12", "PC13", "PC14", ++ "PC15", "PC16"; ++ allwinner,function = "mmc2"; ++ allwinner,drive = ; ++ allwinner,pull = ; ++ }; + }; + + ahb_rst: reset@01c202c0 { +diff --git a/configs/orangepi_pc_defconfig b/configs/orangepi_pc_defconfig +index 7bade8f..3ca75be 100644 +--- a/configs/orangepi_pc_defconfig ++++ b/configs/orangepi_pc_defconfig +@@ -13,6 +13,8 @@ CONFIG_CMD_BOOTZ=y + # CONFIG_CMD_IMLS is not set + # CONFIG_CMD_FLASH is not set + CONFIG_CMD_MMC=y ++CONFIG_MMC0_CD_PIN="PF6" ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 + CONFIG_CMD_I2C=y + # CONFIG_CMD_FPGA is not set + CONFIG_CMD_DHCP=y