Message ID | 1399267649-20218-7-git-send-email-antoine.tenart@free-electrons.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, May 5, 2014 at 7:27 AM, Antoine Ténart <antoine.tenart@free-electrons.com> wrote: > Add the documentation related to the Berlin pin-controller driver and > explain how to configure this group based controller. > > Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com> > Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> (...) When I see this: > +Required subnode-properties: > +- marvell,groups: a list of strings describing the group names. > +- marvell,function: a string describing the function used to mux the groups. > + > +Example: > + > +sm_pinctrl: pin-controller@0 { > + compatible = "marvell,berlin2q-sysmgr-pinctrl"; > + reg = <0xfc0000 0x44>; > + > + uart0_pmux: uart0-pmux { > + marvell,groups = "GSM12", "GSM13"; > + marvell,function = "uart0"; > + }; > +} I feel like ... can't we just standardize that and make it a common pinctrl binding, and name the properties "groups" and "function" for a family of pin controllers just mapping N groups to 1 function? I will merge the patches as are, but maybe we can make it generic on top of this before the merge window? Yours, Linus Walleij
Linus, On Fri, May 16, 2014 at 03:35:48PM +0200, Linus Walleij wrote: > On Mon, May 5, 2014 at 7:27 AM, Antoine Ténart > <antoine.tenart@free-electrons.com> wrote: > > > Add the documentation related to the Berlin pin-controller driver and > > explain how to configure this group based controller. > > > > Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com> > > Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> > (...) > > When I see this: > > > +Required subnode-properties: > > +- marvell,groups: a list of strings describing the group names. > > +- marvell,function: a string describing the function used to mux the groups. > > + > > +Example: > > + > > +sm_pinctrl: pin-controller@0 { > > + compatible = "marvell,berlin2q-sysmgr-pinctrl"; > > + reg = <0xfc0000 0x44>; > > + > > + uart0_pmux: uart0-pmux { > > + marvell,groups = "GSM12", "GSM13"; > > + marvell,function = "uart0"; > > + }; > > +} > > I feel like ... can't we just standardize that and make it a common > pinctrl binding, and name the properties "groups" and "function" > for a family of pin controllers just mapping N groups to 1 function? > > I will merge the patches as are, but maybe we can make it generic > on top of this before the merge window? Do you mean just changing: s/marvell,groups/groups/ s/marvell,function/function/ and updating the documentation ? If so, I can definitely do that. Antoine
On Fri, May 16, 2014 at 6:47 PM, Antoine Ténart <antoine.tenart@free-electrons.com> wrote: > Linus, >> > +sm_pinctrl: pin-controller@0 { >> > + compatible = "marvell,berlin2q-sysmgr-pinctrl"; >> > + reg = <0xfc0000 0x44>; >> > + >> > + uart0_pmux: uart0-pmux { >> > + marvell,groups = "GSM12", "GSM13"; >> > + marvell,function = "uart0"; >> > + }; >> > +} >> >> I feel like ... can't we just standardize that and make it a common >> pinctrl binding, and name the properties "groups" and "function" >> for a family of pin controllers just mapping N groups to 1 function? >> >> I will merge the patches as are, but maybe we can make it generic >> on top of this before the merge window? > > Do you mean just changing: > > s/marvell,groups/groups/ > s/marvell,function/function/ > > and updating the documentation ? To the pinctrl.txt document as generic bindings. Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt That and maybe moving some of the parsing into the pinctrl-utils. > If so, I can definitely do that. No big deal, we're a bit late on it. But if you like the looks of it, please send a patch like that. Yours, Linus Walleij
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,berlin-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,berlin-pinctrl.txt new file mode 100644 index 000000000000..4ca92ab2c1de --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,berlin-pinctrl.txt @@ -0,0 +1,45 @@ +* Pin-controller driver for the Marvell Berlin SoCs + +The pins controlled by the Marvell Berlin controller are organized in groups. +Configuration is done by group, so no actual pin information is needed. + +Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is called +a 'function' in the pin-controller subsystem. + +Required properties: +- compatible: should be one of: + "marvell,berlin2-soc-pinctrl", + "marvell,berlin2-sysmgr-pinctrl", + "marvell,berlin2cd-soc-pinctrl", + "marvell,berlin2cd-sysmgr-pinctrl", + "marvell,berlin2q-soc-pinctrl", + "marvell,berlin2q-sysmgr-pinctrl" +- reg: registers physical address and length of the pin controller. + +Please refer to pinctrl-bindings.txt in this directory for details of the +common pin-controller bindings used by client devices. + +A pin-controller node should contain subnodes representing the pin group +configurations, one per function. Each subnode has the group name and the muxing +function used. + +Required subnode-properties: +- marvell,groups: a list of strings describing the group names. +- marvell,function: a string describing the function used to mux the groups. + +Example: + +sm_pinctrl: pin-controller@0 { + compatible = "marvell,berlin2q-sysmgr-pinctrl"; + reg = <0xfc0000 0x44>; + + uart0_pmux: uart0-pmux { + marvell,groups = "GSM12", "GSM13"; + marvell,function = "uart0"; + }; +} + +&uart0 { + pinctrl-0 = <&uart0_pmux>; + pinctrl-names = "default"; +};