This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Replies: 10
Views: 4050
Hi,
I work on Sitara am335x-evmsk base on ti-processor-sdk-linux-am335x-evm-02.00.00.00 os.
the problem is that 48060000.mmc cd is not send an interrupt when the sd card are get out and in to cd base.
here is how mmc1 define in the DTS:
mmc1_pins_default: pinmux_mmc1_pins { pinctrl-single,pins = < 0x0F0 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */ 0x0F4 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */ 0x0F8 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */ 0x0FC (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */ 0x100 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_clk.mmc0_clk */ 0x104 (PIN_INPUT_PULLUP | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */ 0x1A0 (PIN_INPUT_PULLUP | MUX_MODE7) /* mcasp0_aclkr.gpio3_18 */ 0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */ >; };
mmc1_pins_sleep: pinmux_mmc1_pins_sleep { pinctrl-single,pins = < 0x0F0 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x0F4 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x0F8 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x0FC (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x100 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x104 (PIN_INPUT_PULLDOWN | MUX_MODE7) //0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE7) >; };
&mmc1 { status = "okay"; vmmc-supply = <&vmmc_reg>; bus-width = <4>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mmc1_pins_default>; pinctrl-1 = <&mmc1_pins_sleep>; cd-gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; };
the result of "cat /proc/interrupts" is:
root@am335x-evm:~# cat /proc/interrupts CPU0 16: 5148 INTC 68 Level gp_timer 19: 1 INTC 78 Level wkup_m3_txev 20: 3333 INTC 12 Level edma 22: 26 INTC 14 Level edma_error 61: 0 4804c000.gpio 4 Edge button4 91: 0 481ac000.gpio 1 Edge 48060000.mmc cd 92: 0 481ac000.gpio 2 Edge button2 93: 0 481ac000.gpio 3 Edge button1 94: 0 481ac000.gpio 4 Edge button5 95: 0 481ac000.gpio 5 Edge button3126: 0 481ae000.gpio 3 Level wl18xx141: 491 481ae000.gpio 18 Edge rf_irq_2142: 1050 481ae000.gpio 19 Edge rf_irq_1155: 30 INTC 72 Level 44e09000.serial156: 3678 INTC 73 Level 48022000.serial157: 2540 INTC 70 Level 44e0b000.i2c158: 10134 INTC 64 Level mmc0159: 274 INTC 28 Level mmc1161: 0 INTC 77 Level wkup_m3167: 0 INTC 75 Level rtc1168: 0 INTC 76 Level rtc1172: 434 INTC 41 Level 4a100000.ethernet173: 29 INTC 42 Level 4a100000.ethernet183: 1250 INTC 36 Level tilcdc184: 64 INTC 16 Level TI-am335x-tsc, TI-am335x-adc185: 0 INTC 109 Level 53100000.sham187: 0 INTC 82 Level 4803c000.mcasp_tx
188: 0 INTC 83 Level 4803c000.mcasp_rx
189: 4 INTC 111 Level 48310000.rng192: 1 INTC 18 Level musb-hdrc.1.auto193: 95 INTC 19 Level musb-hdrc.2.auto194: 149 INTC 17 Level 47400000.dma-controllerErr: 0root@am335x-evm:~#
the result of "cat /sys/kernel/debug/gpio" is:
root@am335x-evm:~# cat /sys/kernel/debug/gpioGPIOs 0-31, platform/44e07000.gpio, gpio: gpio-5 (? ) out hi gpio-7 (vtt ) out hi gpio-16 (? ) out hi gpio-19 (? ) out hi gpio-20 (? ) out hi gpio-21 (? ) out lo gpio-28 (? ) out hi
GPIOs 32-63, platform/4804c000.gpio, gpio: gpio-36 (button4 ) in hi IRQ gpio-37 (? ) out lo gpio-38 (? ) out lo gpio-39 (? ) out lo gpio-40 (sysfs ) in lo gpio-41 (? ) out hi gpio-44 (kim ) out hi gpio-61 (wlan-en-regulator ) out lo
GPIOs 64-95, platform/481ac000.gpio, gpio: gpio-64 (GPIO_LF_MOD ) out lo gpio-65 (cd ) in lo IRQ gpio-66 (button2 ) in lo IRQ gpio-67 (button1 ) in lo IRQ gpio-68 (button5 ) in hi IRQ gpio-69 (button3 ) in lo IRQ gpio-84 (? ) out lo gpio-85 (? ) out lo
GPIOs 96-127, platform/481ae000.gpio, gpio: gpio-100 (? ) out hi gpio-114 (rf_irq_2 ) in lo IRQ gpio-115 (rf_irq_1 ) in hi IRQ gpio-116 (phy_reset ) out hi gpio-117 (? ) out lo
GPIOs 480-487, i2c/0-0070, tca9554, can sleep:
GPIOs 488-495, i2c/0-0022, pcf8574, can sleep: gpio-490 (sysfs ) out lo gpio-491 (sysfs ) in hi gpio-492 (sysfs ) in hi gpio-493 (sysfs ) in hi gpio-494 (sysfs ) in lo gpio-495 (sysfs ) in hi
GPIOs 496-503, i2c/0-0021, pcf8574, can sleep: gpio-496 (sysfs ) in lo gpio-497 (sysfs ) in hi gpio-498 (sysfs ) in lo gpio-499 (sysfs ) in lo gpio-500 (sysfs ) in lo gpio-501 (sysfs ) in hi gpio-502 (sysfs ) in hi gpio-503 (sysfs ) in hi
GPIOs 504-511, i2c/0-0020, pcf8574, can sleep: gpio-504 (reset_fg_i2c_mux ) out hi gpio-505 (sysfs ) out lo gpio-506 (sysfs ) out lo gpio-507 (sysfs ) out lo gpio-508 (sysfs ) out lo gpio-509 (sysfs ) out lo gpio-510 (sysfs ) out hi gpio-511 (sysfs ) out loroot@am335x-evm:~#
What can be the problem that mmc cd not send interrupt?
Thanks Oded
In reply to Biser Gatchev-XID:
In reply to Oded Almog:
If you're using AM335x Starter Kit, then as Biser suggested, you need to change mmc1 section in the dts to:
&mmc1 {
status = "okay";
vmmc-supply = <&vmmc_reg>;
bus-width = <4>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc1_pins_default>;
pinctrl-1 = <&mmc1_pins_sleep>;
cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
};
Best Regards, Yordan
Please make sure you read the forum guidelines first.
In reply to Yordan Kovachev: