[imx6ull 14x14 evk] Modifying dts to use arduino pins for GPIO LEDs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[imx6ull 14x14 evk] Modifying dts to use arduino pins for GPIO LEDs

ソリューションへジャンプ
2,234件の閲覧回数
namnguyenao
Contributor I

I am currently trying to use the arduino headers on the evalkit to control LEDs via the generic leds-gpio driver. My problem is, that I can not use most of the pins and I don't know why.

What I did:

I changed the imx6ull-14x14-evk.dts to include the following:

leds {
compatible = "gpio-leds";
my_red_led {
label = "rgb_r";
gpios = <&gpio1 20 GPIO_ACTIVE_HIGH>;
};
my_green_led {
label = "rgb_g";
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
};
my_blue_led {
label = "rgb_b";
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
};
my_white_led {
label = "white_led";
gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
};
};

In addition to that, I commented out the following sections: 

pinctrl_uart2: uart2grp{...};

&uart2 {...};

What works:

All 4 LEDs show up under /sys/class/leds/

When I call 

echo 255 > /sys/class/leds/{name_of_led}/brightness

the LEDs on pin 20, 21 and 25 can be turned on.

The pins 30,31 also work when I take out I2C (but I need it so I can not use those pins).

What doesn't work:

The LED on pin 24 can not be turned on.

I put some printk()-calls in the kernel module to check for errors, but the driver is working correctly.

I also tried some other arduino pins (those named GPIO0-4, SD1_DATA0-3, SD1_CLK, SD1_CMD and ECSPI4_* on the schematics) but they also don't work.

I always took out the components that use the pins in the dts-file to make sure the drivers don't re-configure the pins.

I also tried manually setting the pins using the following (adapted to each individual pin)

gpioset gpiochip0 24=1

When I call:

gpioinfo

I can see that the pin is configured as "output" with "active-high" value.

 

My question:

What do I have to do/change in the dts-file in order to use pin 24 (or one of the other pins mentioned)?

ラベル(1)
0 件の賞賛
返信
1 解決策
2,109件の閲覧回数
namnguyenao
Contributor I

So I just found out where my problem was. the resistor r1732 is not installed so the pin header is not connected and thus the pin was not connected to anything. pin 24 also works just like the others. I just had so manually connect the pin with the pin header.

元の投稿で解決策を見る

2 返答(返信)
2,110件の閲覧回数
namnguyenao
Contributor I

So I just found out where my problem was. the resistor r1732 is not installed so the pin header is not connected and thus the pin was not connected to anything. pin 24 also works just like the others. I just had so manually connect the pin with the pin header.

2,109件の閲覧回数
gusarambula
NXP TechSupport
NXP TechSupport

Hello Stefan Mayrhofer, 

Thank you for updating this thread with your findings! I'm sure they will help other community users.

Regards,

0 件の賞賛
返信