Hello,
I want to use these 2 GPIO pin instead of LCD.
Sodimm pin : 60 → lcdif.DATA[2] → gpio3.IO[7]
Sodimm pin : 64 → lcdif.DATA[15] → gpio3.IO[20]
So i decide to modify my “imx7-colibri-eval-v3.dtsi” file and make the dtb. Then with the toradex recommandation change the pin direction and value :
echo 84 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio84/direction
echo 1 > /sys/class/gpio/gpio84/value
echo 71 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio71/direction
echo 1 > /sys/class/gpio/gpio71/value
But nothing append. I can export but the pin is still low.
I change in my dtsi the lcdif status like this :
&lcdif {
status = "disabled";
};
and the iomuxc like this :
&iomuxc {
imx7d-eval-v3 {
pinctrl_additionalgpio: additionalgpios {
fsl,pins = <
MX7D_PAD_LCD_DATA02__GPIO3_IO7 0x14
MX7D_PAD_LCD_DATA15__GPIO3_IO20 0x14
>;
};
};
};
this is my all dtsi file :
/*
* Copyright 2016 Toradex AG
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
/ {
chosen {
bootargs = "console=ttymxc0,115200";
};
clocks {
/* fixed crystal dedicated to mpc258x */
clk16m: clk@1 {
compatible = "fixed-clock";
reg=<1>;
#clock-cells = <0>;
clock-frequency = <16000000>;
clock-output-names = "clk16m";
};
};
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiokeys>;
power {
label = "Wake-Up";
gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_WAKEUP>;
debounce-interval = <10>;
gpio-key,wakeup;
};
};
extcon_usbc_det: usbc_det {
compatible = "linux,extcon-usb-gpio";
debounce = <25>;
id-gpio = <&gpio7 14 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbc_det>;
};
gpio_additional {
pinctrl-name = "default";
pinctrl-0 = <&pinctrl_additionalgpio>;
status = "okay";
};
};
&bl {
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <6>;
status = "okay";
};
&adc1 {
status = "okay";
};
&adc2 {
status = "okay";
};
&epxp {
status = "okay";
};
&ecspi3 {
status = "okay";
mcp258x0: mcp258x@1 {
compatible = "microchip,mcp2515";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_can_int>;
reg = <0>;
clocks = <&clk16m>;
interrupt-parent = <&gpio5>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <10000000>;
status = "okay";
};
spidev0: spidev@1 {
compatible = "toradex,evalspi";
reg = <0>;
spi-max-frequency = <23000000>;
status = "disabled";
};
};
&fec1 {
status = "okay";
};
/*&fec2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet2>;
clocks = <&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET_AXI_ROOT_CLK>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
<&clks IMX7D_PLL_ENET_MAIN_50M_CLK>,
<&clks IMX7D_ENET2_REF_ROOT_CLK>;
clock-names = "ipg", "ahb", "ptp","enet_clk_ref", "enet_out";
assigned-clocks = <&clks IMX7D_ENET2_TIME_ROOT_SRC>,
<&clks IMX7D_ENET2_TIME_ROOT_CLK>,
<&clks IMX7D_ENET_PHY_REF_ROOT_DIV>;
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
assigned-clock-rates = <0>, <100000000>, <50000000>;
phy-mode = "rmii";
fsl,mii-exclusive;
fsl,magic-packet;
status = "okay";
};*/
&i2c4 {
status = "okay";
touch: touchrevf0710a@10 {
compatible = "touchrevolution,fusion-f0710a";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpiotouch>;
reg = <0x10>;
/* SODIMM 28, Pen down interrupt */
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH
/* SODIMM 30, Reset interrupt */
&gpio1 10 GPIO_ACTIVE_LOW
>;
status = "disabled";
};
/* M41T0M6 real time clock on carrier board */
rtc: m41t0m6@68 {
compatible = "st,m41t00";
reg = <0x68>;
};
};
&lcdif {
status = "disabled";
};
&pwm1 {
status = "disabled";
};
&pwm2 {
status = "disabled";
};
&pwm3 {
status = "disabled";
};
&pwm4 {
status = "disabled";
};
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
};
&uart3 {
status = "okay";
};
&usbotg1 {
extcon = <&extcon_usbc_det>;
vbus-supply = <®_usb_otg2_vbus>;
status = "okay";
};
/* The define SD_1_8 allows to use the SD interface at a higher speed mode
* if the card supports it. For this the signaling voltage is switched from
* 3.3V to 1.8V under the usdhc1's drivers control.
* All pins supplied with NVCC_SD1 must be able to cope with this
* and must (MUST!!!) not be driven with a voltage higher than 1.8V or
* the interface will not work.
*/
/* #define SD_1_8 */
&usdhc1 {
#ifdef SD_1_8
pinctrl-names = "default", "state_100mhz", "state_200mhz";
pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_cd_usdhc1>;
pinctrl-1 = <&pinctrl_usdhc1_100mhz &pinctrl_cd_usdhc1>;
pinctrl-2 = <&pinctrl_usdhc1_200mhz &pinctrl_cd_usdhc1>;
vmmc-supply = <®_3p3v>;
vqmmc-supply = <®_LDO2>;
#else
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_cd_usdhc1>;
no-1-8-v;
#endif
cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
disable-wp;
enable-sdio-wakeup;
keep-power-in-suspend;
status = "okay";
};
&iomuxc {
imx7d-eval-v3 {
pinctrl_gpiotouch: touchgpios {
fsl,pins = <
MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x74
MX7D_PAD_GPIO1_IO10__GPIO1_IO10 0x14
>;
};
pinctrl_additionalgpio: additionalgpios {
fsl,pins = <
MX7D_PAD_LCD_DATA02__GPIO3_IO7 0x14
MX7D_PAD_LCD_DATA15__GPIO3_IO20 0x14
>;
};
};
};
Thanks for help !