Part Number:AM3352
Tool/software: Linux
Hi all,
1,Now my dts as below:
nandflash_pins_default: nandflash_pins_default {
pinctrl-single,pins = <
0x0 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad0.gpmc_ad0 */
0x4 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad1.gpmc_ad1 */
0x8 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad2.gpmc_ad2 */
0xc (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad3.gpmc_ad3 */
0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
0x7c (PIN_OUTPUT | MUX_MODE0) /* gpmc_csn0.gpmc_csn0 */
0x90 (PIN_OUTPUT | MUX_MODE0) /* gpmc_advn_ale.gpmc_advn_ale */
0x94 (PIN_OUTPUT | MUX_MODE0) /* gpmc_oen_ren.gpmc_oen_ren */
0x98 (PIN_OUTPUT | MUX_MODE0) /* gpmc_wen.gpmc_wen */
0x9c (PIN_OUTPUT | MUX_MODE0) /* gpmc_be0n_cle.gpmc_be0n_cle */
>;
};
gpio0_pins_default: gpio0_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x20, PIN_OUTPUT | MUX_MODE7) /* (U10) gpmc_ad8.gpio0[22] */
AM33XX_IOPAD(0x24, PIN_OUTPUT | MUX_MODE7) /* (T10) gpmc_ad9.gpio0[23] */
AM33XX_IOPAD(0x28, PIN_INPUT | MUX_MODE7) /* (T11) gpmc_ad10.gpio0[26] */
AM33XX_IOPAD(0x2c, PIN_INPUT | MUX_MODE7) /* (U12) gpmc_ad11.gpio0[27] */
>;
};
gpio1_pins_default: gpio1_pins_default {
pinctrl-single,pins = <
AM33XX_IOPAD(0x30, PIN_INPUT | MUX_MODE7) /* (T12) gpmc_ad12.gpio1[12] */
AM33XX_IOPAD(0x34, PIN_INPUT | MUX_MODE7) /* (R12) gpmc_ad13.gpio1[13] */
AM33XX_IOPAD(0x38, PIN_INPUT | MUX_MODE7) /* (V13) gpmc_ad14.gpio1[14] */
AM33XX_IOPAD(0x3c, PIN_INPUT | MUX_MODE7) /* (U13) gpmc_ad15.gpio1[15] */
AM33XX_IOPAD(0x80, PIN_OUTPUT | MUX_MODE7) /* (U9) gpmc_csn1.gpio1[30] */
AM33XX_IOPAD(0x84, PIN_OUTPUT | MUX_MODE7) /* (V9) gpmc_csn2.gpio1[31] */
>;
};
2,my nand is 8bit-data bus.
3,notice that I use these pin as input gpio:
(T11) gpmc_ad10.gpio0[26]
(U12) gpmc_ad11.gpio0[27]
(T12) gpmc_ad12.gpio1[12]
(R12) gpmc_ad13.gpio1[13]
(V13) gpmc_ad14.gpio1[14]
(U13) gpmc_ad15.gpio1[15]
4,operations as below:
1,when boot by sd card.I read the gpio value, it is ok.
2,when boot by nand flash,I read the gpio value,it wrong.
3,read actions:
cd /sys/class/gpio
echo 26 > export
cd gpio26
echo "in" > direction
cat value
4,the nand flash is made by the sdcard,
What is the problem?
Best regards