Dynamic pinmux changes on AM5x have issues specific to AM5x. For GPIO, accessing via register writes in userspace (/dev/mem) has no more negative consequences than on AM3x or on any system running Linux for that matter. Standard caveats apply.
Ideally, we’d create a kernel module to avoid latency and keep kernel resource control. This doesn’t have to be that complicated. In short of that, the same old hacks will work fine on AM5x—just don’t touch the pinmux without doing a LOT more digging. On Fri, Mar 27, 2020 at 5:52 AM Drew Fustini <[email protected]> wrote: > You my want to consider using libgpiod with the /dev/gpiochipN character > device. You can get and set multiple lines in one syscall. > > The libgpiod tools are installed on the Debian image. > > More info: > > https://www.cnx-software.com/2017/11/03/learn-more-about-linuxs-new-gpio-user-space-subsystem-libgpiod/ > > On Fri, Mar 27, 2020, 09:30 Stephan Böck <[email protected]> wrote: > >> Hello Robert, >> >> if I get this correctly, setting the direction of a gpio via the >> corresponding register (e.g. let's say gpio4 base_addr + 0x134) should be >> avoided? >> >> We use the BBB in combination with a carrier-board to have some >> industrial in- and outputs. Therefore, some pins enable some flipflops >> during initialization (the pins need to be outputs). These pins are later >> on used as inputs. The current implementation manages all this with an >> assembly program running on the pru and directly setting the right bits in >> the different registers of the gpios. >> Now, I want to port this to the BB AI. Since direct access causes >> trouble, is there a better practise, than setting the direction/value of a >> gpio via /sys/class/gpio? >> >> Regards, >> Stephan >> >> >> Am Donnerstag, 26. März 2020 15:26:56 UTC+1 schrieb RobertCNelson: >>> >>> On Thu, Mar 26, 2020 at 9:20 AM John Allwine <[email protected]> >>> wrote: >>> > >>> > Is it possible to access the GPIO on the Beaglebone AI via /dev/mem >>> similar to how it is done in this stackoverflow question on the Beaglebone >>> Black? If so, how would I find what the offsets are? >>> >>> Hi John, >>> >>> dynamic changes to the am57xx's pinmux registers and gpio values is a >>> bad idea.. >>> >>> Figure out what you need and set them up in the device tree. >>> >>> Regards, >>> >>> -- >>> Robert Nelson >>> https://rcn-ee.com/ >>> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/2ee15690-0da0-4cc0-889b-6f3c8326c5aa%40googlegroups.com >> <https://groups.google.com/d/msgid/beagleboard/2ee15690-0da0-4cc0-889b-6f3c8326c5aa%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/CAEf4M_DgSg%3Dse0LCpsB%2BzV5sAq4-SphR6tNKiECd29jqOFwAOw%40mail.gmail.com > <https://groups.google.com/d/msgid/beagleboard/CAEf4M_DgSg%3Dse0LCpsB%2BzV5sAq4-SphR6tNKiECd29jqOFwAOw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- https://beagleboard.org/about - a 501c3 non-profit educating around open hardware computing -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CA%2BT6QPnUBffM0RE8CETw5PtcNPFaH2ntrptm7D1pJApazWOBYA%40mail.gmail.com.
