Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2018 12:46:14 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Nicola Mingotti <nmingotti@gmail.com>, Russell Haley <russ.haley@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: utility for pin in BBB: PX.Y --> pin_mode, pin_name
Message-ID:  <1535568374.33841.47.camel@freebsd.org>
In-Reply-To: <a9141acf-79dd-d702-ff35-d2a380f68e67@gmail.com>
References:  <4661fc41-935a-56d5-2cc2-125085daf30a@gmail.com> <CABx9NuS%2B_HiUxReryc%2B5f7fYHq5OMK0FKBfEUWbRb88tOXjw7A@mail.gmail.com> <a9141acf-79dd-d702-ff35-d2a380f68e67@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1535568374.33841.47.camel>