1. 程式人生 > >am335x系統升級之kernel tf(五)

am335x系統升級之kernel tf(五)

在現有的框圖之後,除錯TF卡也是比較簡單的,

通過原理圖需要確認的有如下幾點:

1) TF卡的引腳:資料線,時鐘線,命令線,檢測腳,

2) 供電:VCC以及其電壓的控制,有的是預設上電的,本文就是採用系統預設上電方式

3) 資料匯流排的寬度 

 

Index: am335x-evm.dts
===================================================================
--- am335x-evm.dts (revision 17)
+++ am335x-evm.dts (revision 18)
@@ -37,6 +37,19 @@
regulator-boot-on;
};

+ regulators {
+ compatible = "simple-bus";
+
+ vcc3v3: fixedregulator1 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ };
+ };
+
+
lis3_reg: fixedregulator1 {
compatible = "regulator-fixed";
regulator-name = "lis3_reg";
@@ -242,7 +255,6 @@
引腳初始化
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = <
- AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
@@ -249,7 +261,7 @@
AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */
- /*AM33XX_IOPAD(0x9a0, PIN_INPUT | MUX_MODE4)*/ /* mcasp0_aclkr.mmc0_sdwp */
+ AM33XX_IOPAD(0x9a0, PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkr.mmc0_sdwp */
>;
};

@@ -669,12 +681,13 @@
};

&mmc1 {
- status = "disable";
- vmmc-supply = <&vmmc_reg>;

使能驅動
+ status = "okay";

指明3.3V供電,預設上電
+ /*vmmc-supply = <&vmmc_reg>;*/
+ vmmc-supply = <&vcc3v3>;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;

指明檢測腳
- cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+ cd-gpios = <&gpio3 18 GPIO_ACTIVE_LOW>;
};

&sham {

系統重新編譯之後,插入TF卡,即可看到TF被正常列舉。