Can I Control GPIO Input on U-boot?

hi

Can I Control GPIO Input on U-boot?

I use LCD_VDD_EN(B26, GPIO3_PP.03) pin

Tested below

Tegra186 (P2771-0000-500) # gpio input 123
gpio: pin 123 (gpio 123) value is 0
Tegra186 (P2771-0000-500) # gpio input 123
gpio: pin 123 (gpio 123) value is 0

This pin is controlled on Linux. But can not control on U-Boot.

I think this pin(LCD_VDD_EN) can not assign gpio on U-Boot.

I would like to change pinmux on U-boot.

is it ok?

hello walterkim,

yes, you’re able to control GPIO pins in u-boot,

Usage:
gpio <input|set|clear|toggle> <pin>
    - input/set/clear/toggle the specified pin
gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs

hi JerryChang

thank you .

i tested gpio output below… and i used osiloscope to verify the signal. it is good!.

Tegra186 (P2771-0000-500) # gpio toggle 123
gpio: pin 123 (gpio 123) value is 1
Tegra186 (P2771-0000-500) # gpio toggle 123
gpio: pin 123 (gpio 123) value is 0
Tegra186 (P2771-0000-500) # gpio toggle 123
gpio: pin 123 (gpio 123) value is 1

But gpio 123 input is not working. always low.
I confirmed that SD Card Detection pin. this pin number is 125…

Tegra186 (P2771-0000-500) # gpio status
Bank P:
P4: input: 1 [x] sdhci@3400000.wp-gpios
P5: input: 1 [x] sdhci@3400000.cd-gpios
P6: output: 1 [x] sdhci@3400000.power-gpios
Tegra186 (P2771-0000-500) # gpio status
Bank P:
P4: input: 0 [x] sdhci@3400000.wp-gpios
P5: input: 0 [x] sdhci@3400000.cd-gpios
P6: output: 1 [x] sdhci@3400000.power-gpios

check please…

i modify below file

Linux_for_Tegra/bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg

i can controlled gpio input