Date: Wed, 29 Aug 2018 20:01:28 +0200 From: Nicola Mingotti <nmingotti@gmail.com> To: 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: <a9141acf-79dd-d702-ff35-d2a380f68e67@gmail.com> In-Reply-To: <CABx9NuS%2B_HiUxReryc%2B5f7fYHq5OMK0FKBfEUWbRb88tOXjw7A@mail.gmail.com> References: <4661fc41-935a-56d5-2cc2-125085daf30a@gmail.com> <CABx9NuS%2B_HiUxReryc%2B5f7fYHq5OMK0FKBfEUWbRb88tOXjw7A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 On 08/29/18 18:26, Russell Haley wrote: > Does this help? > https://www.freebsd.org/cgi/man.cgi?gpio > > Russ > > On Wed, Aug 29, 2018 at 6:13 AM Nicola Mingotti <nmingotti@gmail.com > <mailto:nmingotti@gmail.com>> wrote: > > > Hi, > > I would like to know if such utility already exists, if not I > can start to program it. > > The script should work like the example below, that is, > it gives the list of all pins (starting from their physical > position on > the board), > their mode, and so their associated name/function. > > #> pinfunc > ---------------------------- > P9.1 -- > P9.2 -- > ........ > P9.21 MODE-3 ehrpwm0B > P9.22 MODE-3 ehrpwm0A > P9.23 MODE-7 gpio.1.17 > ..... > --------------------------- > > The only way i know to read the pin mode is by direct memory > access, as done in "devmem2". If you know other ways let me know. > > I saw there is "man 9 fdt_pinctrl" but it seems more for writing pin > configuration than to read it. > > bye > Nicola > > > > > > > > > > > > > > > > > -- > -------------------------- > Dr. Nicola Mingotti > R&D - Borghi Srl > CTO - BondInsider > -------------------------- > > _______________________________________________ > freebsd-arm@freebsd.org <mailto:freebsd-arm@freebsd.org> mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to > "freebsd-arm-unsubscribe@freebsd.org > <mailto:freebsd-arm-unsubscribe@freebsd.org>" > -- -------------------------- Dr. Nicola Mingotti R&D - Borghi Srl CTO - BondInsider --------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9141acf-79dd-d702-ff35-d2a380f68e67>