This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: Controlling Am62x GPIO Pins in u-Boot

Other Parts Discussed in Thread: DA8XX


We have to control multiple GPIO pins on Am62x in one of our project at u-Boot level. The dir,set and get api needs to accessed at u-boot level.

For Am62x the compatible driver is ti-keystone-gpio. i have done the below mentioned configuration, but cant able to get it working.

kindly help us to solve the problem.

in Configuration file 


in device tree file i have made the changes as



         test-gpio = <&main_gpio0 49 GPIO_ACTIVE_HIGH>


Then in the .C File

struct udevice *dev;
struct gpio_desc desc;
int err = gpio_request_by_name(dev, "test-gpio", 0, &desc, GPIOD_IS_OUT);
      printf("cannot able to find requested gpio");
      int ret = dm_gpio_get_value(&desc);
      printf("ret : %d\n",ret);

While testing i have got the ret value as -2. which is negative value says there is a error.  

Whether this changes are sufficient or do i need to modify more, to get it working.


Murali C