Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: BeagleBone Black and GPIO issues



On Mon, 2024-10-14 at 11:03 -0600, Brook Milligan wrote:
> > That block starts (@0) at 0x44e10000 and the 0x800 offset is the GPIO
> control registers.
> 
> Does this look right?
> 

Yes and no. 

I have finished one bit of work on the Zybo sooner than I expected
after I realised that it I was making extra work for myself.

I was looking in to how to do a proper job of this and I arrived at the
same place as you from a different direction. I noticed that the
devicetree bindings talked about a "pinctrl-single", which is a vendor
independent name, so not relying on TI specific code. 

Sure enough, we have a driver for it in the kernel. Oh, it is attached
when booting a BBB. The line in dmesg is "pinctrl0 at simplebus18",
which can be improved. 

I'm pretty sure that the bus_space code won't let us access the Control
Module hardware with a vile hack because the pinctrl driver will have
claimed that address space. (I am somewhat uncertain here).

The gpio0 node in am33xx-l4.dtsi has a gpio-ranges property which is
what is supposed to tell the GPIO device driver where to go to
configure the pins. Unfortunately there is no support in any NetBSD
driver for the "gpio-ranges" property for us to copy.

Good news, we'll have to do a proper job. Bad news, we'll have to do it
mostly from scratch. 

I might start by documenting the current pinctrl kernel API so that we
know where we are and then work what to do next. I almost used the
phrase "gap analysis", but luckily avoided it.

Ngā mihi,
Lloyd



Home | Main Index | Thread Index | Old Index