Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1583

How to configure GPIO Pins in U-boot

$
0
0

I want to set a GPIO pin to high in the u-boot stage.

for example the following GPIO pin:

Defined at the "rzn1d-db-pinmux.h" file

"_RZP(P_GPIO0, RZN1_MUX_6MA(62, GPIO)),/* kGPIO_LED_1 (GPIO0A[25]) */"

I tried to configure the pin with the following functions:

1. dm_gpio_lookup_name("1A25", &gpio_desc_ext_uart_mux);

2. dm_gpio_request(&gpio_desc_ext_uart_mux, "kGPIO_LED_1");

3. dm_gpio_set_dir_flags(&gpio_desc_ext_uart_mux, GPIOD_IS_OUT);

4. dm_gpio_set_value(&gpio_desc_ext_uart_mux, 1);

the function "dm_gpio_lookup_name" return an error value -> the operation of configuring the pin failed. 

int dm_gpio_lookup_name(const char *name, struct gpio_desc *desc)

what should be the value of "name"?

what should be the value of "label" in the function: int dm_gpio_request(struct gpio_desc *desc, const char *label)


Viewing all articles
Browse latest Browse all 1583

Trending Articles