- uboot gpio driver framework
1.Introduction
This page gives the information about the GPIO drivers in u-boot.
1.1.U-boot Configuration
To enable GPIO in u-boot, the following configurations need to be enabled.
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_XXX_GPIO=y //xxx:own soc
1.2. Debug the gpio
It contains code handling the “gpio” command in U-Boot’s shell.
cmd/gpio.c:
U_BOOT_CMD(gpio, 3, 0, do_gpio,
"input/set/clear/toggle gpio pins",
"<input|set|clear|toggle> <pin>\n"
" - input/set/clear/toggle the specified pin");
Enable GPIO command:
CONFIG_CMD_GPIO=y //use the gpio command for debug