Skip to contentSkip to conversation

pinctrl: Add DRA7/AM437x pinctrl compatibility

PATCH In review Nishanth Menon 3 participants 11 messages Aug 22, 2014 – Aug 29, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover pinctrl: Add DRA7/AM437x pinctrl compatibility

The following series are various fixes and improvements for pinctrl for AM437x and DRA7. It also tries to add documentation for existing pinctrl bindings for Texas Instruments' OMAP SoCs.

Functionality depends on the dts update (in series 6), PRM fixes and the pdata quirk changes

This is part 4/6 series which eventually enables framework for suspend-to-ram and cpuidle for OMAP5 and DRA7

Each of series is based on v3.17-rc1 and this specific series is available:
weblink: https://github.com/nmenon/linux-2.6-playground/commits/push/v3.17/pinctrl-compat

git repo: https://github.com/nmenon/linux-2.6-playground.git push/v3.17/pinctrl-compat

An complete integrated branch is available here: https://github.com/nmenon/linux-2.6-playground/commits/testing/v3.17/cpu-idle-suspend-dra7-omap5-framework

Keerthy (1):
pinctrl: single: AM437x: Add pinctrl compatibility

Nishanth Menon (2):
pinctrl: bindings: Add OMAP pinctrl binding
pinctrl: single: Add DRA7 pinctrl compatibility

 .../bindings/pinctrl/ti,omap-pinctrl.txt           |   11 +++++++++++
 drivers/pinctrl/pinctrl-single.c                   |   14 ++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/3 pinctrl: bindings: Add OMAP pinctrl binding

Add basic skeleton of OMAP pinctrl bindings. This is compatible with pinctrl,single bindings and is meant purely as a reference point.

---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |    9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt new file +9 -0
new file mode 100644
index 0000000..156d964
@@ -0,0 +1,9 @@
+OMAP Pinctrl definitions
+
+Required properties:
+- compatible : Should be one of:
+  "ti,omap3-padconf" - OMAP3 compatible pinctrl
+  "ti,omap4-padconf" - OMAP4 compatible pinctrl
+  "ti,omap5-padconf" - OMAP5 compatible pinctrl
+
+See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 2/3 pinctrl: single: Add DRA7 pinctrl compatibility

In reply to Nishanth Menon

DRA7 pinctrl definitions now differ from traditional 16 bit OMAP pin ctrl definitions, in that all 32 bits are used to describe a single pin

Also the location of wakeupenable and event bits have changed.

---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |    1 +
 drivers/pinctrl/pinctrl-single.c                   |    7 +++++++
 2 files changed, 8 insertions(+)
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt +1 -0
index 156d964..d45386d 100644
@@ -5,5 +5,6 @@ Required properties:
   "ti,omap3-padconf" - OMAP3 compatible pinctrl
   "ti,omap4-padconf" - OMAP4 compatible pinctrl
   "ti,omap5-padconf" - OMAP5 compatible pinctrl
+  "ti,dra7-padconf" - DRA7 compatible pinctrl
 
 See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
drivers/pinctrl/pinctrl-single.c +7 -0
index 95dd9cf..598d600 100644
@@ -1981,6 +1981,12 @@ static const struct pcs_soc_data pinctrl_single_omap_wkup = {
 	.irq_status_mask = (1 << 15),	/* OMAP_WAKEUP_EVENT */
 };
 
+static const struct pcs_soc_data pinctrl_single_dra7 = {
+	.flags = PCS_QUIRK_SHARED_IRQ,
+	.irq_enable_mask = (1 << 24),	/* WAKEUPENABLE */
+	.irq_status_mask = (1 << 25),	/* WAKEUPEVENT */
+};
+
 static const struct pcs_soc_data pinctrl_single = {
 };
 
@@ -1992,6 +1998,7 @@ static struct of_device_id pcs_of_match[] = {
 	{ .compatible = "ti,omap3-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,omap4-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,omap5-padconf", .data = &pinctrl_single_omap_wkup },
+	{ .compatible = "ti,dra7-padconf", .data = &pinctrl_single_dra7 },
 	{ .compatible = "pinctrl-single", .data = &pinctrl_single },
 	{ .compatible = "pinconf-single", .data = &pinconf_single },
 	{ },
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH 3/3 pinctrl: single: AM437x: Add pinctrl compatibility

In reply to Nishanth Menon

From: Keerthy <[email protected]>

AM437x pinctrl definitions now differ from traditional 16 bit OMAP pin ctrl definitions, in that all 32 bits are used to describe a single pin

Also the location of wakeupenable and event bits have changed.

[nm at ti.com: minor updates]
---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |    1 +
 drivers/pinctrl/pinctrl-single.c                   |    7 +++++++
 2 files changed, 8 insertions(+)
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt +1 -0
index d45386d..af225fe 100644
@@ -6,5 +6,6 @@ Required properties:
   "ti,omap4-padconf" - OMAP4 compatible pinctrl
   "ti,omap5-padconf" - OMAP5 compatible pinctrl
   "ti,dra7-padconf" - DRA7 compatible pinctrl
+  "ti,am437-padconf" - AM437x compatible pinctrl
 
 See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
drivers/pinctrl/pinctrl-single.c +7 -0
index 598d600..784de13 100644
@@ -1987,6 +1987,12 @@ static const struct pcs_soc_data pinctrl_single_dra7 = {
 	.irq_status_mask = (1 << 25),	/* WAKEUPEVENT */
 };
 
+static const struct pcs_soc_data pinctrl_single_am437x = {
+	.flags = PCS_QUIRK_SHARED_IRQ,
+	.irq_enable_mask = (1 << 29),   /* OMAP_WAKEUP_EN */
+	.irq_status_mask = (1 << 30),   /* OMAP_WAKEUP_EVENT */
+};
+
 static const struct pcs_soc_data pinctrl_single = {
 };
 
@@ -1999,6 +2005,7 @@ static struct of_device_id pcs_of_match[] = {
 	{ .compatible = "ti,omap4-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,omap5-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,dra7-padconf", .data = &pinctrl_single_dra7 },
+	{ .compatible = "ti,am437-padconf", .data = &pinctrl_single_am437x },
 	{ .compatible = "pinctrl-single", .data = &pinctrl_single },
 	{ .compatible = "pinconf-single", .data = &pinconf_single },
 	{ },
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] pinctrl: bindings: Add OMAP pinctrl binding

In reply to Nishanth Menon
Quoted 4 lines · Nishanth Menon

Add basic skeleton of OMAP pinctrl bindings. This is compatible with pinctrl,single bindings and is meant purely as a reference point.

Looks like you have ti,omap2420-padconf and ti,omap2430-padconf missing but after adding those too:

Quoted 23 lines
---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |    9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt new file +9 -0
new file mode 100644
index 0000000..156d964
@@ -0,0 +1,9 @@
+OMAP Pinctrl definitions
+
+Required properties:
+- compatible : Should be one of:
+  "ti,omap3-padconf" - OMAP3 compatible pinctrl
+  "ti,omap4-padconf" - OMAP4 compatible pinctrl
+  "ti,omap5-padconf" - OMAP5 compatible pinctrl
+
+See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 2/3
#6 lore raw

Re: [PATCH 2/3] pinctrl: single: Add DRA7 pinctrl compatibility

In reply to Nishanth Menon
Quoted 6 lines · Nishanth Menon

DRA7 pinctrl definitions now differ from traditional 16 bit OMAP pin ctrl definitions, in that all 32 bits are used to describe a single pin

Also the location of wakeupenable and event bits have changed.

Quoted 44 lines
---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |    1 +
 drivers/pinctrl/pinctrl-single.c                   |    7 +++++++
 2 files changed, 8 insertions(+)
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt +1 -0
index 156d964..d45386d 100644
@@ -5,5 +5,6 @@ Required properties:
   "ti,omap3-padconf" - OMAP3 compatible pinctrl
   "ti,omap4-padconf" - OMAP4 compatible pinctrl
   "ti,omap5-padconf" - OMAP5 compatible pinctrl
+  "ti,dra7-padconf" - DRA7 compatible pinctrl
 
 See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
drivers/pinctrl/pinctrl-single.c +7 -0
index 95dd9cf..598d600 100644
@@ -1981,6 +1981,12 @@ static const struct pcs_soc_data pinctrl_single_omap_wkup = {
 	.irq_status_mask = (1 << 15),	/* OMAP_WAKEUP_EVENT */
 };
 
+static const struct pcs_soc_data pinctrl_single_dra7 = {
+	.flags = PCS_QUIRK_SHARED_IRQ,
+	.irq_enable_mask = (1 << 24),	/* WAKEUPENABLE */
+	.irq_status_mask = (1 << 25),	/* WAKEUPEVENT */
+};
+
 static const struct pcs_soc_data pinctrl_single = {
 };
 
@@ -1992,6 +1998,7 @@ static struct of_device_id pcs_of_match[] = {
 	{ .compatible = "ti,omap3-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,omap4-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,omap5-padconf", .data = &pinctrl_single_omap_wkup },
+	{ .compatible = "ti,dra7-padconf", .data = &pinctrl_single_dra7 },
 	{ .compatible = "pinctrl-single", .data = &pinctrl_single },
 	{ .compatible = "pinconf-single", .data = &pinconf_single },
 	{ },
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 3/3
#9 lore raw

Re: [PATCH 3/3] pinctrl: single: AM437x: Add pinctrl compatibility

In reply to Nishanth Menon
Quoted 10 lines · Nishanth Menon

From: Keerthy <[email protected]>

AM437x pinctrl definitions now differ from traditional 16 bit OMAP pin ctrl definitions, in that all 32 bits are used to describe a single pin

Also the location of wakeupenable and event bits have changed.

[nm at ti.com: minor updates]
Quoted 44 lines
---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |    1 +
 drivers/pinctrl/pinctrl-single.c                   |    7 +++++++
 2 files changed, 8 insertions(+)
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt +1 -0
index d45386d..af225fe 100644
@@ -6,5 +6,6 @@ Required properties:
   "ti,omap4-padconf" - OMAP4 compatible pinctrl
   "ti,omap5-padconf" - OMAP5 compatible pinctrl
   "ti,dra7-padconf" - DRA7 compatible pinctrl
+  "ti,am437-padconf" - AM437x compatible pinctrl
 
 See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
drivers/pinctrl/pinctrl-single.c +7 -0
index 598d600..784de13 100644
@@ -1987,6 +1987,12 @@ static const struct pcs_soc_data pinctrl_single_dra7 = {
 	.irq_status_mask = (1 << 25),	/* WAKEUPEVENT */
 };
 
+static const struct pcs_soc_data pinctrl_single_am437x = {
+	.flags = PCS_QUIRK_SHARED_IRQ,
+	.irq_enable_mask = (1 << 29),   /* OMAP_WAKEUP_EN */
+	.irq_status_mask = (1 << 30),   /* OMAP_WAKEUP_EVENT */
+};
+
 static const struct pcs_soc_data pinctrl_single = {
 };
 
@@ -1999,6 +2005,7 @@ static struct of_device_id pcs_of_match[] = {
 	{ .compatible = "ti,omap4-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,omap5-padconf", .data = &pinctrl_single_omap_wkup },
 	{ .compatible = "ti,dra7-padconf", .data = &pinctrl_single_dra7 },
+	{ .compatible = "ti,am437-padconf", .data = &pinctrl_single_am437x },
 	{ .compatible = "pinctrl-single", .data = &pinctrl_single },
 	{ .compatible = "pinconf-single", .data = &pinconf_single },
 	{ },
Signature · 1 line
1.7.9.5
author Acked-by Tony Lindgren
#3 lore raw

Re: [PATCH 1/3] pinctrl: bindings: Add OMAP pinctrl binding

In reply to Tony Lindgren
Quoted 10 lines · Tony Lindgren
Quoted 4 lines · Nishanth Menon

Add basic skeleton of OMAP pinctrl bindings. This is compatible with pinctrl,single bindings and is meant purely as a reference point.

Looks like you have ti,omap2420-padconf and ti,omap2430-padconf missing but after adding those too:

I now see why I missed them:

arch/arm/boot/dts/omap2420.dtsi:                        compatible = "ti,omap2420-padconf", "pinctrl-single";
arch/arm/boot/dts/omap2430.dtsi:                        compatible = "ti,omap2430-padconf", "pinctrl-single";

These are the only two references to the compatible, there is no driver matching being done, had missed it hence :( - Updated revision below (with your ack). Unless there are anymore review comments OR you'd want me to explicitly, I dont plan on reposting the following again.

---8<---

Quoted 1 line

From 74121c6a2524048eb02c3b33a25e13261edd2e99 Mon Sep 17 00:00:00 2001

From: Nishanth Menon <[email protected]>
Date: Thu, 22 May 2014 23:32:09 -0500
Subject: [PATCH V2] pinctrl: bindings: Add OMAP pinctrl binding

Add basic skeleton of OMAP pinctrl bindings. This is compatible with pinctrl,single bindings and is meant purely as a reference point.

---
 .../bindings/pinctrl/ti,omap-pinctrl.txt           |   11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt
Documentation/devicetree/bindings/pinctrl/ti,omap-pinctrl.txt new file +11 -0
new file mode 100644
index 0000000..b3b57fc
@@ -0,0 +1,11 @@
+OMAP Pinctrl definitions
+
+Required properties:
+- compatible : Should be one of:
+  "ti,omap2420-padconf" - OMAP2420 compatible pinctrl
+  "ti,omap2430-padconf" - OMAP2430 compatible pinctrl
+  "ti,omap3-padconf" - OMAP3 compatible pinctrl
+  "ti,omap4-padconf" - OMAP4 compatible pinctrl
+  "ti,omap5-padconf" - OMAP5 compatible pinctrl
+
+See Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt for further details.
Signature · 5 lines
1.7.9.5

-- 
Regards,
Nishanth Menon
#4 lore raw

Re: [PATCH 1/3] pinctrl: bindings: Add OMAP pinctrl binding

Quoted 11 lines · Nishanth Menon

---8<---
From 74121c6a2524048eb02c3b33a25e13261edd2e99 Mon Sep 17 00:00:00 2001
From: Nishanth Menon <[email protected]>
Date: Thu, 22 May 2014 23:32:09 -0500
Subject: [PATCH V2] pinctrl: bindings: Add OMAP pinctrl binding

Add basic skeleton of OMAP pinctrl bindings. This is compatible with pinctrl,single bindings and is meant purely as a reference point.

Applied this inline v2 version.

Yours,
Linus Walleij

#10 lore raw

Re: [PATCH 3/3] pinctrl: single: AM437x: Add pinctrl compatibility

In reply to Nishanth Menon
Quoted 10 lines · Nishanth Menon

From: Keerthy <[email protected]>

AM437x pinctrl definitions now differ from traditional 16 bit OMAP pin ctrl definitions, in that all 32 bits are used to describe a single pin

Also the location of wakeupenable and event bits have changed.

[nm at ti.com: minor updates]

Patch applied with Tony's ACK.

Yours,
Linus Walleij

#7 lore raw

Re: [PATCH 2/3] pinctrl: single: Add DRA7 pinctrl compatibility

In reply to Nishanth Menon
Quoted 6 lines · Nishanth Menon

DRA7 pinctrl definitions now differ from traditional 16 bit OMAP pin ctrl definitions, in that all 32 bits are used to describe a single pin

Also the location of wakeupenable and event bits have changed.

Patch applied with Tony's ACK.

Yours,
Linus Walleij