lkml.org 
[lkml]   [2017]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 05/13] MIPS: jz4740: DTS: Add node for the jz4740-pinctrl driver
On Wed, Jan 18, 2017 at 12:14 AM, Paul Cercueil <paul@crapouillou.net> wrote:

> For a description of the devicetree node, please read
> Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.txt
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>

(...)

> + pinctrl: ingenic-pinctrl@10010000 {
> + compatible = "ingenic,jz4740-pinctrl";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + gpio-chips {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + gpa: gpa {
> + reg = <0x10010000 0x100>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <28>;
> +
> + ingenic,pull-ups = <0xffffffff>;
> + };
> +
> + gpb: gpb {
> + reg = <0x10010100 0x100>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <27>;
> +
> + ingenic,pull-ups = <0xffffffff>;
> + };
> +
> + gpc: gpc {
> + reg = <0x10010200 0x100>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <26>;
> +
> + ingenic,pull-ups = <0xffffffff>;
> + };
> +
> + gpd: gpd {
> + reg = <0x10010300 0x100>;
> +
> + gpio-controller;
> + #gpio-cells = <2>;
> +
> + interrupt-controller;
> + #interrupt-cells = <2>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <25>;
> +
> + ingenic,pull-ups = <0xdfffffff>;
> + };
> + };

Just pull all these down two levels and make them one device
each instead of having them inside the pin controller node
like this.

Then make a pin controller node separately, it can reference the
pin controller by phandles if necessary, and use the standard
gpio-ranges property to cross make GPIO and pin control.

It seems you driver is similar to for example the
drivers/pinctrl/nomadik/* pin controller.

Look in arch/arm/boot/dts/ste-dbx500.dtsi for examples,
NB: I'm not fully using standard bindings in it, because they
were not invented at the time.

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2017-01-19 01:00    [W:0.300 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site