Skip to contentSkip to conversation

pinctrl-single: introduce am654-padconf compatible

PATCH In review Dhruva Gole 4 participants 7 messages Aug 8, 2023 – Aug 10, 2023

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

cover pinctrl-single: introduce am654-padconf compatible

The K3 family of SOCs use certain bits of the padconfig registers like WKUP_EVT and WKUP_EN to enable daisychain wakeups.

For example, these bits are described in the AM654 TRM [0] under "Table 5-517. Description Of The Pad Configuration Register Bits"

This series adds the DT binding changes for adding the compatible and also the driver changes which make use of this compatible.

NOTE: Some K3 SoCs may have these bits marked as reserved which means that they don't support IO daisychain. Such SOCs are not expected to use this compatible.

The general expected usage is when the device is in a suspended state like Deep Sleep or Suspend to RAM, and any IO activity on configured pads can trigger a wakeup.

Link to complete series:
https://lore.kernel.org/all/[email protected]

Base commit:
71cd4fc492ec (tag: next-20230808, linux-next/master) Add linux-next specific files for 20230808

depends on:
https://lore.kernel.org/r/[email protected]

which has been picked up by Linus Walleij in his tree here:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?h=devel&id=677a62482bd6e584f83d0342e78735e3cd449ba4

However, it hasn't reflected in -next yet so specifying the depends on above.

[0] https://www.ti.com/lit/pdf/spruid7

Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Rob Herring <[email protected]>
Cc Haojian Zhuang <[email protected]>

Dhruva Gole (1):
dt-bindings: pinctrl: pinctrl-single: add ti,am654-padconf compatible

Tony Lindgren (1):
pinctrl: single: Add compatible for ti,am654-padconf

 .../devicetree/bindings/pinctrl/pinctrl-single.yaml        | 1 +
 drivers/pinctrl/pinctrl-single.c                           | 7 +++++++
 2 files changed, 8 insertions(+)
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/2 dt-bindings: pinctrl: pinctrl-single: add ti,am654-padconf compatible

Add the "ti,am654-padconf" compatible to support the new wakeup enable and status bits positions on K3 family SOCs that support the IO daisychain feature.

---

Previously, this was posted here:
https://lore.kernel.org/all/[email protected]/

However since then I have tweaked the commit message and also the name of compatible. Hence didn't pickup the Acked-by: Conor and Tony's R-by:
https://lore.kernel.org/all/[email protected]/

 Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml +1 -0
index b6b6bcd7074b..45a307d3ce16 100644
@@ -24,6 +24,7 @@ properties:
       - items:
           - enum:
               - ti,am437-padconf
+              - ti,am654-padconf
               - ti,dra7-padconf
               - ti,omap2420-padconf
               - ti,omap2430-padconf
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] dt-bindings: pinctrl: pinctrl-single: add ti,am654-padconf compatible

Quoted 3 lines · Dhruva Gole

Add the "ti,am654-padconf" compatible to support the new wakeup enable and status bits positions on K3 family SOCs that support the IO daisychain feature.

This one too:

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

Re: [PATCH 1/2] dt-bindings: pinctrl: pinctrl-single: add ti,am654-padconf compatible

In reply to Dhruva Gole
Quoted 5 lines · Dhruva Gole

Add the "ti,am654-padconf" compatible to support the new wakeup enable and status bits positions on K3 family SOCs that support the IO daisychain feature.

Patch applied.

Yours,
Linus Walleij

#4 lore raw

PATCH 2/2 pinctrl: single: Add compatible for ti,am654-padconf

In reply to Dhruva Gole

From: Tony Lindgren <[email protected]>

Use the "ti,am654-padconf" compatible to enable the use of wake-up enable and event bits on K3 SOCs that support the daisychain feature

---

The previous version of this patch was posted stand alone here:
https://lore.kernel.org/all/[email protected]/

changelog: the compatible name has been changed in this series.

 drivers/pinctrl/pinctrl-single.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/pinctrl/pinctrl-single.c +7 -0
index f056923ecc98..92e495d13b9b 100644
@@ -1954,6 +1954,12 @@ static const struct pcs_soc_data pinctrl_single_am437x = {
 	.irq_status_mask = (1 << 30),   /* OMAP_WAKEUP_EVENT */
 };
 
+static const struct pcs_soc_data pinctrl_single_am654 = {
+	.flags = PCS_QUIRK_SHARED_IRQ | PCS_CONTEXT_LOSS_OFF,
+	.irq_enable_mask = (1 << 29),   /* WKUP_EN */
+	.irq_status_mask = (1 << 30),   /* WKUP_EVT */
+};
+
 static const struct pcs_soc_data pinctrl_single = {
 };
 
@@ -1962,6 +1968,7 @@ static const struct pcs_soc_data pinconf_single = {
 };
 
 static const struct of_device_id pcs_of_match[] = {
+	{ .compatible = "ti,am654-padconf", .data = &pinctrl_single_am654 },
 	{ .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 },
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw

Re: [PATCH 2/2] pinctrl: single: Add compatible for ti,am654-padconf

Quoted 7 lines · Dhruva Gole

From: Tony Lindgren <[email protected]>

Use the "ti,am654-padconf" compatible to enable the use of wake-up enable and event bits on K3 SOCs that support the daisychain feature

Patch applied and I also alphabetized the compatibles when applying.

Yours,
Linus Walleij

Reviewed-by on the v1 series
#6 lore raw
In reply to Dhruva Gole
Quoted 23 lines · Dhruva Gole

The K3 family of SOCs use certain bits of the padconfig registers like WKUP_EVT and WKUP_EN to enable daisychain wakeups.

For example, these bits are described in the AM654 TRM [0] under "Table 5-517. Description Of The Pad Configuration Register Bits"

This series adds the DT binding changes for adding the compatible and also the driver changes which make use of this compatible.

NOTE: Some K3 SoCs may have these bits marked as reserved which means that they don't support IO daisychain. Such SOCs are not expected to use this compatible.

The general expected usage is when the device is in a suspended state like Deep Sleep or Suspend to RAM, and any IO activity on configured pads can trigger a wakeup.

Link to complete series:
https://lore.kernel.org/all/[email protected]

Base commit:
71cd4fc492ec (tag: next-20230808, linux-next/master) Add linux-next specific files for 20230808

Quoted 8 lines

depends on:
https://lore.kernel.org/r/[email protected]

which has been picked up by Linus Walleij in his tree here:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?h=devel&id=677a62482bd6e584f83d0342e78735e3cd449ba4

However, it hasn't reflected in -next yet so specifying the depends on above.

next-20230809 has it today - so just a day or two of sync.. no biggie.

Quoted 10 lines

[0] https://www.ti.com/lit/pdf/spruid7

Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Tony Lindgren <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Rob Herring <[email protected]>
Cc Haojian Zhuang <[email protected]>

For the series:

Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D