TI DA850/OMAP-L138/AM18x pinconf
Subsystems (3)
cover TI DA850/OMAP-L138/AM18x pinconf
This series adds a new driver and DT bindings for TI DA850/OMAP-L138/AM18x pinconf (bias pullup/pulldown).
The motivation for this series is LEGO MINDSTORMS EV3 support. It needs most, if not all, internal pullup/down resistors disabled in order to work correctly.
David Lechner (3):
devicetree: bindings: pinctrl: Add binding for ti,da850-pupd
pinctrl: New driver for TI DA8XX/OMAP-L138/AM18XX pinconf
ARM: dts: da850: Add node for pullup/pulldown pinconf
.../devicetree/bindings/pinctrl/ti,da850-pupd.txt | 55 ++++++ arch/arm/boot/dts/da850.dtsi | 5 + drivers/pinctrl/Kconfig | 9 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-da850-pupd.c | 210 +++++++++++++++++++++ 5 files changed, 280 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,da850-pupd.txt create mode 100644 drivers/pinctrl/pinctrl-da850-pupd.c
Signature · 1 line
2.7.4
PATCH 1/3 devicetree: bindings: pinctrl: Add binding for ti,da850-pupd
Device-tree bindings for TI DA8XX/OMAP-L138/AM18XX pullup/pulldown pinconf controller.
--- .../devicetree/bindings/pinctrl/ti,da850-pupd.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,da850-pupd.txt
Documentation/devicetree/bindings/pinctrl/ti,da850-pupd.txt new file +55 -0
@@ -0,0 +1,55 @@ +* Pin configuration for TI DA850/OMAP-L138/AM18x + +These SoCs have a separate controller for setting bias (internal pullup/down). +Bias can only be selected for groups rather than individual pins. + +Required Properties: + + - compatible: Must be "ti,da850-pupd" + - reg: Base address and length of the memory resource used by the pullup/down + controller hardware module. + +The controller node also acts as a container for pin group configuration nodes. +The names of these groups are ignored. + +Pin Group Node Properties: + +- groups: An array of strings, each string containing the name of a pin group. + Valid names are "cp0".."cp31". + +The pin configuration parameters use the generic pinconf bindings defined in +pinctrl-bindings.txt in this directory. The supported parameters are +bias-disable, bias-pull-up, bias-pull-down. + + +Example +------- + +In common dtsi file: + + pinconf: pin-controller at 22c00c { + compatible = "ti,da850-pupd"; + reg = <0x22c00c 0x8>; + }; + +In board-specific file: + + &pinconf { + pinctrl-0 = <&pinconf_bias_groups>; + pinctrl-names = "default"; + + pinconf_bias_groups: bias-groups { + pull-up { + groups = "cp30", "cp31"; + bias-pull-up; + }; + pull-down { + groups = "cp29", "cp28"; + bias-pull-down; + }; + disable { + groups = "cp27", "cp26"; + bias-disable; + }; + }; + };
Signature · 1 line
2.7.4
Re: [PATCH 1/3] devicetree: bindings: pinctrl: Add binding for ti,da850-pupd
Quoted 1 line · David Lechner
Device-tree bindings for TI DA8XX/OMAP-L138/AM18XX pullup/pulldown
s/DA8XX/DA850. It looks like this support is absent from DA830.
Quoted 3 lines
pinconf controller.
Signed-off-by David Lechner <[email protected]>
Thanks,
Sekhar
Re: [PATCH 1/3] devicetree: bindings: pinctrl: Add binding for ti,da850-pupd
In reply to David LechnerQuoted 4 lines · David Lechner
Device-tree bindings for TI DA8XX/OMAP-L138/AM18XX pullup/pulldown pinconf controller.
Signed-off-by David Lechner <[email protected]>
Looks good to me.
Yours,
Linus Walleij
Re: [PATCH 1/3] devicetree: bindings: pinctrl: Add binding for ti,da850-pupd
In reply to David LechnerQuoted 8 lines · David Lechner
Device-tree bindings for TI DA8XX/OMAP-L138/AM18XX pullup/pulldown pinconf controller.
Signed-off-by David Lechner <[email protected]>--- .../devicetree/bindings/pinctrl/ti,da850-pupd.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,da850-pupd.txt
PATCH 2/3 pinctrl: New driver for TI DA8XX/OMAP-L138/AM18XX pinconf
In reply to David LechnerThis adds a new driver for pinconf on TI DA8XX/OMAP-L138/AM18XX. These SoCs have a separate controller for controlling pullup/pulldown groups.
--- drivers/pinctrl/Kconfig | 9 ++ drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-da850-pupd.c | 210 +++++++++++++++++++++++++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 drivers/pinctrl/pinctrl-da850-pupd.c
drivers/pinctrl/Kconfig +9 -0
@@ -93,6 +93,15 @@ config PINCTRL_AMD Requires ACPI/FDT device enumeration code to set up a platform device. +config PINCTRL_DA850_PUPD + tristate "TI DA850/OMAP-L138/AM18XX pullup/pulldown groups" + depends on OF && (ARCH_DAVINCI_DA850 || COMPILE_TEST) + select PINCONF + select GENERIC_PINCONF + help + Driver for TI DA850/OMAP-L138/AM18XX pinconf. Used to control + pullup/pulldown pin groups. + config PINCTRL_DIGICOLOR bool depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
drivers/pinctrl/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_PINCTRL_BF60x) += pinctrl-adi2-bf60x.o obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o obj-$(CONFIG_PINCTRL_AMD) += pinctrl-amd.o +obj-$(CONFIG_PINCTRL_DA850_PUPD) += pinctrl-da850-pupd.o obj-$(CONFIG_PINCTRL_DIGICOLOR) += pinctrl-digicolor.o obj-$(CONFIG_PINCTRL_FALCON) += pinctrl-falcon.o obj-$(CONFIG_PINCTRL_MAX77620) += pinctrl-max77620.o
drivers/pinctrl/pinctrl-da850-pupd.c new file +210 -0
210 lines not on this page · raw message
Signature · 1 line
2.7.4
Re: [PATCH 2/3] pinctrl: New driver for TI DA8XX/OMAP-L138/AM18XX pinconf
Quoted 1 line · David Lechner
This adds a new driver for pinconf on TI DA8XX/OMAP-L138/AM18XX. These
s/DA8XX/DA850/
Quoted 9 lines
SoCs have a separate controller for controlling pullup/pulldown groups.
Signed-off-by David Lechner <[email protected]>drivers/pinctrl/pinctrl-da850-pupd.c new file +5
-0+static const char *da850_pupd_get_get_group_name (struct pinctrl_dev *pctldev, +unsigned int selector) +{ +return da850_pupd_group_names[selector]; +}
drivers/pinctrl/pinctrl-da850-pupd.c line 62
Quoted 10 lines
drivers/pinctrl/pinctrl-da850-pupd.c new file +10
-0+ +static int da850_pupd_get_get_group_pins (struct pinctrl_dev *pctldev, +unsigned int selector, +const unsigned int **pins, +unsigned int *num_pins) +{ + *num_pins =0 ; + +return 0 ; +}
usage of get_get_ in the function names above is odd.
Thanks,
Sekhar
Re: [PATCH 2/3] pinctrl: New driver for TI DA8XX/OMAP-L138/AM18XX pinconf
Quoted 18 lines · Sekhar Nori
Quoted 1 line · David Lechner
This adds a new driver for pinconf on TI DA8XX/OMAP-L138/AM18XX. These
s/DA8XX/DA850/
Quoted 13 lines
SoCs have a separate controller for controlling pullup/pulldown groups.
Signed-off-by David Lechner <[email protected]>drivers/pinctrl/pinctrl-da850-pupd.c new file +9
-0+static const char *da850_pupd_get_get_group_name (struct pinctrl_dev *pctldev, +unsigned int selector) +{ +return da850_pupd_group_names[selector]; +} + +static int da850_pupd_get_get_group_pins(struct pinctrl_dev *pctldev, + unsigned int selector, + const unsigned int **pins,
Quoted 8 lines
drivers/pinctrl/pinctrl-da850-pupd.c line 62
Quoted 6 lines
drivers/pinctrl/pinctrl-da850-pupd.c new file +6
-0+ unsigned int *num_pins) +{ + *num_pins =0 ; + +return 0 ; +}usage of
get_get_in the function names above is odd.
Will fix (copy/paste error)
Quoted 4 lines
Thanks,
Sekhar
Re: [PATCH 2/3] pinctrl: New driver for TI DA8XX/OMAP-L138/AM18XX pinconf
In reply to David LechnerQuoted 4 lines · David Lechner
This adds a new driver for pinconf on TI DA8XX/OMAP-L138/AM18XX. These SoCs have a separate controller for controlling pullup/pulldown groups.
Signed-off-by David Lechner <[email protected]>
Nice and clean driver, resend with the minor fixes pointed out by Sekhar and I'll merge it.
Yours,
Linus Walleij
PATCH 3/3 ARM: dts: da850: Add node for pullup/pulldown pinconf
In reply to David LechnerThis SoC has a separate pin controller for configuring pullup/pulldown bias on groups of pins.
--- arch/arm/boot/dts/da850.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/da850.dtsi +5 -0
@@ -210,6 +210,11 @@ }; }; + pinconf: pin-controller at 22c00c { + compatible = "ti,da850-pupd"; + reg = <0x22c00c 0x8>; + status = "disabled"; + }; prictrl: priority-controller at 14110 { compatible = "ti,da850-mstpri"; reg = <0x14110 0x0c>;
Signature · 1 line
2.7.4
Re: [PATCH 3/3] ARM: dts: da850: Add node for pullup/pulldown pinconf
Quoted 13 lines · David Lechner
This SoC has a separate pin controller for configuring pullup/pulldown bias on groups of pins.
Signed-off-by David Lechner <[email protected]>--- arch/arm/boot/dts/da850.dtsi | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/boot/dts/da850.dtsi +0
-0
arch/arm/boot/dts/da850.dtsi line 217
Quoted 8 lines
arch/arm/boot/dts/da850.dtsi +5
-0@@ -210,6 +210,11 @@ }; }; + pinconf: pin-controller at 22c00c { + compatible = "ti,da850-pupd"; + reg = <0x22c00c 0x8>; + status = "disabled"; + };
Can you please place this below the i2c1 node. I am trying to keep the nodes sorted by unit address. I know thats broken in many places today, but lets add the new ones where they should eventually end up.
Thanks,
Sekhar
Re: [PATCH 3/3] ARM: dts: da850: Add node for pullup/pulldown pinconf
Quoted 16 lines · Sekhar Nori
Quoted 15 lines · David Lechner
This SoC has a separate pin controller for configuring pullup/pulldown bias on groups of pins.
Signed-off-by David Lechner <[email protected]>--- arch/arm/boot/dts/da850.dtsi | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/boot/dts/da850.dtsi +0
-0@@ -210,6 +210,11 @@ };
Quoted 10 lines
arch/arm/boot/dts/da850.dtsi line 217
Quoted 6 lines
arch/arm/boot/dts/da850.dtsi +5
-0}; + pinconf: pin-controller at 22c00c { + compatible = "ti,da850-pupd"; + reg = <0x22c00c 0x8>; + status = "disabled"; + };Can you please place this below the i2c1 node. I am trying to keep the nodes sorted by unit address. I know thats broken in many places today, but lets add the new ones where they should eventually end up.
I can do this, but it seems that the predominant sorting pattern here is to keep subsystems together (e.g. all i2c are together, all uart are together, etc.)
Would a separate patch to sort everything by unit address to get this cleaned up be acceptable?
Quoted 4 lines
Thanks,
Sekhar
Re: [PATCH 3/3] ARM: dts: da850: Add node for pullup/pulldown pinconf
Quoted 28 lines · David Lechner
Quoted 16 lines · Sekhar Nori
Quoted 15 lines · David Lechner
This SoC has a separate pin controller for configuring pullup/pulldown bias on groups of pins.
Signed-off-by David Lechner <[email protected]>--- arch/arm/boot/dts/da850.dtsi | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/boot/dts/da850.dtsi +0
-0@@ -210,6 +210,11 @@ };Quoted 10 lines
arch/arm/boot/dts/da850.dtsi line 217
Quoted 6 lines
arch/arm/boot/dts/da850.dtsi +5
-0}; + pinconf: pin-controller at 22c00c { + compatible = "ti,da850-pupd"; + reg = <0x22c00c 0x8>; + status = "disabled"; + };Can you please place this below the i2c1 node. I am trying to keep the nodes sorted by unit address. I know thats broken in many places today, but lets add the new ones where they should eventually end up.
Quoted 6 lines
I can do this, but it seems that the predominant sorting pattern here is to keep subsystems together (e.g. all i2c are together, all uart are together, etc.)
Would a separate patch to sort everything by unit address to get this cleaned up be acceptable?
No thanks. That kind of thing is the needless churn that gets us flamed.
Kevin
Re: [PATCH 3/3] ARM: dts: da850: Add node for pullup/pulldown pinconf
In reply to David LechnerQuoted 28 lines · David Lechner
Quoted 16 lines · Sekhar Nori
Quoted 15 lines · David Lechner
This SoC has a separate pin controller for configuring pullup/pulldown bias on groups of pins.
Signed-off-by David Lechner <[email protected]>--- arch/arm/boot/dts/da850.dtsi | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/boot/dts/da850.dtsi +0
-0@@ -210,6 +210,11 @@ };Quoted 10 lines
arch/arm/boot/dts/da850.dtsi line 217
Quoted 6 lines
arch/arm/boot/dts/da850.dtsi +5
-0}; + pinconf: pin-controller at 22c00c { + compatible = "ti,da850-pupd"; + reg = <0x22c00c 0x8>; + status = "disabled"; + };Can you please place this below the i2c1 node. I am trying to keep the nodes sorted by unit address. I know thats broken in many places today, but lets add the new ones where they should eventually end up.
Quoted 3 lines
I can do this, but it seems that the predominant sorting pattern here is to keep subsystems together (e.g. all i2c are together, all uart are together, etc.)
Yeah, but that quickly gives away as there are many singleton devices and everyone tries to add theirs at the end of the list resulting in merge conflicts.
Quoted 2 lines
Would a separate patch to sort everything by unit address to get this cleaned up be acceptable?
Agree with Kevin that it would be churn. If done, it should be last thing that gets done in a merge window. I would not attempt it in relatively busy merge windows like this one.
Thanks,
Sekhar
Quoted 5 lines · David Lechner
This series adds a new driver and DT bindings for TI DA850/OMAP-L138/AM18x pinconf (bias pullup/pulldown).
The motivation for this series is LEGO MINDSTORMS EV3 support. It needs most, if not all, internal pullup/down resistors disabled in order to work correctly.
This looks really neat to my non-pinconf trained eyes. I have sent some minor comments. But apart from that:
3/3 should go through my tree. If the driver patches are going to get queued for v4.10, I can queue the DTS portion through my tree.
Thanks,
Sekhar