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

Part Number: PROCESSOR-SDK-AM62X
Other Parts Discussed in Thread: DA8XX

Hi,

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 

CONFIG_DA8XX_GPIO=y

in device tree file i have made the changes as

k3-am62x-sk.dts

&main_gpio0{

         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);
if(!err)
      printf("cannot able to find requested gpio");
else{
      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.

regards,

Murali C