Part Number: 66AK2G12
Hello,
I have a need to toggle 66AK2G process pins in Linux. I am testing on a EVMK2G board.
I want to control GPIO pins like GPIO0_76.
I configured this pin in Mode3 GPIO pin in the Device Tree in keystone-k2g-evm.dts file:
&k2g_pinctrl {
. . . . . .
mcasp2_pins: pinmux_mcasp2_pins {
pinctrl-single,pins = <
K2G_CORE_IOPAD(0x1234) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo2.mcasp2_axr2 */
K2G_CORE_IOPAD(0x1238) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo3.mcasp2_axr3 */
K2G_CORE_IOPAD(0x1254) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo10.mcasp2_afsx */
K2G_CORE_IOPAD(0x125c) (BUFFER_CLASS_B | PIN_PULLDOWN | MUX_MODE4) /* pr0_pru_gpo12.mcasp2_aclkx */
>;
};
gpio_pins: pinmux_gpio_pins {
pinctrl-single,pins = <
K2G_CORE_IOPAD(0x1130) (PIN_PULLUP | MUX_MODE3) /* GPIO0_76 */
>;
};
In Linux OS, I tried these commands to configure this pin:
# devmem2 0x02603060 w 0xFFFFEFFF //Set GPIO0_76 Pin direction to output pin
# devmem2 0x02603068 w 0x1000 //Set pin output High in its Set Data Register
# devmem2 0x02603064 //Read output data to confirm this pin output High
0x00001000
However, when I test using multi-meter, this pin output voltage remains Low. is this because I did not set BUFFER_CLASS_x ? I do not know what is BUFFER_CLASS_B, C, D....?
Can someone help me how to correctly configure and toggle 66AK2G pins?
Tom