I'm working with TI AM64XX and a base project that has limited definition of some GPIO of the board on the device tree. And I need more GPIOs than what it's defined in the DTS in order to use in my c/c++ code later and manipulate them as simple outputs. Based on the datasheet I've selected pins gpio1_26, gpio1_25 and I don't know how to modify the device tree exactly, in order to implement these three GPIOs
&gpio1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_gpio1_pins_default>;
gpio-controller;
};
main_gpio1_pins_default: main-gpio1-pins-default {
pinctrl-single,pins = <
AM64X_IOPAD(0x01C8, PIN_OUTPUT, 7) /* gpio1_26 */
AM64X_IOPAD(0x01C4, PIN_OUTPUT, 7) /* gpio1_25 */
AM64X_IOPAD(0x01C0, PIN_OUTPUT, 7) /*gpio1_24 */
>;
};
Have you any idea?
I've tried some definition like this but it fails in the compilation part, here is the error screenshot
label or path gpio1 not found
I don't know your CPU but in general it should be possible to extend the current block by additional GPIOs.
Look into the description of your CPU to find the PIN of the required GPIOs. There should be also a description to calculate the address. For other TI CPUs this can be done with an online tool. Or there could be a mapping file which contains all available GPIO pins. Grep the code for it.