Change direction of Beagle Y AI GPIO without being in supervisor mode?

Does anybody know if it is possible to change the direction of a Beagle Y AI pin without being in Linux supervisor mode? This was always something that caused heartburn with other Beagle boards when trying to port stuff from RPI-land.

Thanks.

RPI hides these with udev rules…

we have similar rules for gpio, but are probally missing something.

/etc/udev/rules.d/80-gpio-noroot.rules
/etc/udev/rules.d/85-gpio-noroot.rules

Regards,

1 Like

That … didn’t answer the question? As, presumably, those kinds of changes go through the kernel and, presumably, supervisory mode?

The issue with the BBB was that you couldn’t access the PINMUX registers from standard user mode or the PRUs and, thus, couldn’t change the direction of the pin without a trip through the kernel.

The BBY-AI seems to have a gpio_DIR01 register which seems to be allocated as part of the GPIO module. However, I don’t see anything one way of the other as to if that register has similar limitations where you wouldn’t be able to access the direction registers from user mode or the MCU.

Thanks.

From J722S_Registers_Public_20250115.xlsx:

|0060 0010h|0060 1010h|0420 1010h|32|10h|gpio|gpio_DIR01||||FFFFFFFFh|Direction Register|
|---|---|---|---|---|---|---|---|---|---|---|---|
|0060 0010h|0060 1010h|0420 1010h|32|10h|gpio|gpio_DIR01|31:16|DIR1|R/W|FFFFh|Direction of GPIO bank 1 bits, 0 = output, 1 = input.     Reset Source: mod_g_srst_n|
|0060 0010h|0060 1010h|0420 1010h|32|10h|gpio|gpio_DIR01|15:0|DIR0|R/W|FFFFh|Direction of GPIO bank 0 bits, 0 = output, 1 = input.     Reset Source: mod_g_srst_n|