utility for pin in BBB: PX.Y --> pin_mode, pin_name

Ian Lepore ian at freebsd.org
Wed Aug 29 18:46:23 UTC 2018


On Wed, 2018-08-29 at 20:01 +0200, Nicola Mingotti wrote:
> Thank you for suggestion Russel,
> 
> but unfortunately, at best of my knowldege,
> $> man 3 gpio_open
> and its shell command brother
> $> man 8 gpioctl
> 
> are not appropriate, they are useful only if a pin
> has been configured as GPIO pin.
> 
> The program i look for would be useful instead to esablish
> which physical pin has been configured as GPIO pin or
> PWM, PRU, I2C etc.
> 
> I asked also in the Forum, but the only one aswering
> (@Phishry) has given me your same suggestion.
> 
> If nobody knows of such a program i will start the implementation,
> maybe 
> tomorrow.
> 
> bye
> Nicola
> 

Please bottom-post when replying to freebsd mailing lists.

There is no interface defined for getting an fdt_pinctrl driver to
return info about the current configuration. Even if such an interface
existed, there would also need to be a new driver providing a cdev so
that userland can access the information.

There is also nothing in freebsd equivelent to the linux devmem2
program. A driver would have to be written to provide access to device-
mapped memory before such a program could be written. You can't access
arm hardware registers via /dev/mem or /dev/kmem.

-- Ian



More information about the freebsd-arm mailing list