rk3288 kernel-4.4 修改 mmc 编号

原来 3.0 内核, emmc 的编号是 mmc0. 到了 4.4 变成 mmc2 了.

要改回 mmc0, 只要修改 rk3288.dtsi 中 emmc 的顺序就可以了

old mode 100644
new mode 100755
index 18e6897..ac56932
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -278,6 +278,19 @@
                ports = <&vopl_out>, <&vopb_out>;
        };

+       emmc: dwmmc@ff0f0000 {
+               compatible = "rockchip,rk3288-dw-mshc";
+               clock-freq-min-max = <400000 150000000>;
+               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
+                        <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+               reg = <0x0 0xff0f0000 0x0 0x4000>;
+               status = "disabled";
+               supports-emmc;
+       };
+
        sdmmc: dwmmc@ff0c0000 {
                compatible = "rockchip,rk3288-dw-mshc";
                clock-freq-min-max = <400000 150000000>;
@@ -314,19 +327,6 @@
                status = "disabled";
        };

-       emmc: dwmmc@ff0f0000 {
:
                ports = <&vopl_out>, <&vopb_out>;
        };

+       emmc: dwmmc@ff0f0000 {
+               compatible = "rockchip,rk3288-dw-mshc";
+               clock-freq-min-max = <400000 150000000>;
+               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
+                        <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
+               reg = <0x0 0xff0f0000 0x0 0x4000>;
+               status = "disabled";
+               supports-emmc;
+       };
+
        sdmmc: dwmmc@ff0c0000 {
                compatible = "rockchip,rk3288-dw-mshc";
                clock-freq-min-max = <400000 150000000>;
@@ -314,19 +327,6 @@
                status = "disabled";
        };

-       emmc: dwmmc@ff0f0000 {
-               compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
-               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
-                        <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
-               clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
-               fifo-depth = <0x100>;
-               interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
-               reg = <0x0 0xff0f0000 0x0 0x4000>;
-               status = "disabled";
-               supports-emmc;
-       };
-
        saradc: saradc@ff100000 {
                compatible = "rockchip,saradc";
                reg = <0x0 0xff100000 0x0 0x100>;

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一份针对RK3288-EVB-Android SDK的DTS文件修改示例,可以实现SD卡启动: ``` /dts-v1/; /plugin/; / { model = "Rockchip RK3288-EVB board"; compatible = "rockchip,rk3288-evb"; memory@60000000 { device_type = "memory"; reg = <0x60000000 0x40000000>; }; chosen { bootargs = "console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootwait earlyprintk"; stdout-path = &uart2; }; uart2: serial@11004000 { compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart"; reg = <0x11004000 0x1000>; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; clocks = <&uart2_clk>; clock-names = "uartclk"; status = "okay"; }; sdhci@11014000 { compatible = "rockchip,rk3288-dw-mshc"; reg = <0x11014000 0x1000>; interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru SCLK_SDMMC>, <&cru PCLK_SDMMC>; clock-names = "sdmmc", "apb_pclk"; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4 &sdmmc_bus8 &sdmmc_cd_n>; status = "okay"; mmc-slot@0 { reg = <0>; bus-width = <8>; cd-gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; non-removable; status = "okay"; }; }; &dpu { status = "okay"; }; &lcdc { status = "okay"; }; &backlight { status = "okay"; }; &act8846_reg { status = "okay"; }; &i2c1 { status = "okay"; act8846: act8846@5b { compatible = "active-semi,act8846"; reg = <0x5b>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio2>; interrupts = <6 IRQ_TYPE_LEVEL_LOW>; status = "okay"; }; }; &mmc { status = "okay"; }; &mmc1 { status = "okay"; }; &mmc2 { status = "okay"; }; &mmc3 { status = "okay"; }; &mmc4 { status = "okay"; }; &sdmmc_clk { rockchip,pins = <RK_GPIO3 8 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_cmd { rockchip,pins = <RK_GPIO3 9 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_bus4 { rockchip,pins = <RK_GPIO3 10 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_bus8 { rockchip,pins = <RK_GPIO3 11 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_cd_n { rockchip,pins = <RK_GPIO7 3 RK_FUNC_GPIO &pcfg_pull_up>; }; }; ``` 此外,你还需要在编译内核时加入SD卡启动相关的配置选项。具体方法可以参考RK3288-Android SDK的文档。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值