Re: [PATCH 02/13] Documentation: add BCM6328 pincontroller binding documentation

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

 




On Fri, Aug 19, 2016 at 4:30 PM, Jonas Gorski <jonas.gorski@xxxxxxxxx> wrote:
> On 19 August 2016 at 16:14, Rob Herring <robh@xxxxxxxxxx> wrote:

>>> +pinctrl: pin-controller@10000080 {
>>> +     compatible = "brcm,bcm6328-pinctrl";
>>> +     reg = <0x10000080 0x8>,
>>> +           <0x10000088 0x8>,
>>> +           <0x10000098 0x4>,
>>> +           <0x1000009c 0xc>;
>>> +     reg-names = "dirout", "dat", "mode", "mux";
>>
>> What's in the holes? Just do one range or perhaps this should be part of
>> some larger block.
>
> For this particular SoC it's SPI Slave Config; Registers found in the
> holes on other SoCs:
>
> * TestControl
> * OscControl (just the name, no other documentation what it does)
> * Switch LED control (for integrated switches)
> * Legacy LED controller
> * Reset Controller for the VDSL PHY
>
> And there are also usually quite a few other registers on this block.
> This seems to have been treated as a "GPIO and everything else that
> isn't large enough for its own block" by Broadcom - with BCM6328/6362
> they even introduced a "MISC" block then.

What I would do myself is to put a syscon over this node.

syscon: syscon@10000080 {
    compatible = "broadcom,foo", "syscon";
    reg = <0x10000000 0x100>;
(...)

Or however that looks.

Then use the generic GPIO syscon driver on top of this,
see drivers/gpio/gpio-syscon.c

That driver does not support any pincontrol/muxing but
is a good candidate to handle the GPIO portions.

Syscons are there to handle these composite "misc sys
regs" devices.

You can even spawn subdevices to it by adding the
compatible-string "mfd-simple".

The rest of the subdevices would also have to be syscon
children.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux