IMX7D IO multiplexing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX7D IO multiplexing

820 Views
864535720
Contributor II

Hello everyone
      The chip model I am using is MCIMX7D7DVM10SD. We refer to the official website of the official website MCIMX7SABRE development board. We are using the eMMC approach. Therefore, we want to use the SD1_CLK pin as a normal GPIO port. But we are multiplexing this IO port and using it as an output. But when we measure this IO port, we get a low level. Below is our code. Is there any problem with our configuration?

    ssd2828{
        compatible = "comen,ssd2828";
        pinctrl-names = "default";
        pintctrl-0 = <&pinctrl_ssd2828>;
        status = "okay";
        gpio-mosi = <&gpio5 0 0>;
        gpio-miso = <&gpio5 1 0>;
        gpio-sclk = <&gpio5 2 0>;
        gpio-cs = <&gpio5 3 0>;                   //fail
        ssd2828-reset = <&gpio3 4 1>;    
    };

pinctrl_ssd2828:spi-ssd2828{    
        fsl,pins = <
                    MX7D_PAD_SD1_CLK__GPIO5_IO3 0x37      //fail
//                    MX7D_PAD_SD1_CLK__GPIO5_IO3 0x59      //fail
//                    MX7D_PAD_SD1_CLK__GPIO5_IO3 0x18      //fail
//                    MX7D_PAD_SD1_CLK__GPIO5_IO3 0x1b      //fail
                >;    
        };

ssd2828_info_data->spi_cs = of_get_named_gpio(node, "gpio-cs", 0);   //success

ret = gpio_request(ssd2828_info_data->spi_cs, "cs");                              //success

ret = gpio_direction_output(ssd2828_info_data->spi_cs, 1);                   //success,  but  Measurement level is 0

We are using GPIO5-IO3, this pin has not been able to work as we expected, its level has been 0

I hope everyone can help.

Labels (1)
0 Kudos
3 Replies

681 Views
igorpadykov
NXP Employee
NXP Employee

Hi 其东 刘 

this pin is used in pinctrl_usdhc1: usdhc1grp in

linux/arch/arm/boot/dts/imx7d-sdb.dts

imx7d-sdb.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

so one can try to disable usdhc1: status = "okay";

Also one can attach jtag debugger and check iomux registers for that pin.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

681 Views
864535720
Contributor II

Hi  igorpadykov

I changed the status to status = "disabled" according to what you said.
Then I checked my GPIO5-IO3 usage again and determined that it was not used elsewhere.
At the same time I also tried another way.
Cd /sys/class/gpio
Echo 131 > export
Cd gpio131
Echo out > direction
Echo 1 > value
Echo 0 > value

During the above command execution, no error message is prompted. But when I went to detect the level status of GPIO-IO3, I found that it was always 0.
May I ask me what is the solution to this situation? Or you can test on your board to see if this can be resolved.
look forward to your reply

0 Kudos

681 Views
igorpadykov
NXP Employee
NXP Employee

to check if linux seetings become valid one can attach jtag debugger and

look at iomux registers for that pin, then try to toggle pin using jtag to check if pin

is not shorted on board or damaged.

Best regards
igor

0 Kudos