Utilize pinctrl-single for bcm7038-style chips
Subsystems (4)
cover Utilize pinctrl-single for bcm7038-style chips
This patch set allows Broadcom STB chips with the BCM7038-style pinmux/configuration blocks to use pinctrl-single. This does not preclude us from making use of a more sophisticated driver in the future, should we need to.
Florian Fainelli (2):
dt-bindings: pinctrl: pinctrl-single: Add brcm,bcm7038-padconf
pinctrl: single: Add bcm7038-padconf compatible matching
.../devicetree/bindings/pinctrl/pinctrl-single.yaml | 4 ++++ drivers/pinctrl/pinctrl-single.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 dt-bindings: pinctrl: pinctrl-single: Add brcm,bcm7038-padconf
Add the "brcm,bcm7038-padconf" compatible to the pinctrl-single binding.
--- Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml +4 -0
@@ -38,6 +38,10 @@ properties: - enum: - marvell,pxa1908-padconf - const: pinconf-single + - items: + - enum: + - brcm,bcm7038-padconf + - const: pinctrl-single reg: maxItems: 1
Signature · 1 line
2.34.1
Re: [PATCH 1/2] dt-bindings: pinctrl: pinctrl-single: Add brcm,bcm7038-padconf
Quoted 12 lines · Florian Fainelli
Add the "brcm,bcm7038-padconf" compatible to the pinctrl-single binding.
Signed-off-by Florian Fainelli <[email protected]>--- Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml | 4 ++++ 1 file changed, 4 insertions(+)Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml +0
-0
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml properties: · line 44
Quoted 7 lines
Documentation/devicetree/bindings/pinctrl/pinctrl-single.yaml +4
-0@@ -38,6 +38,10 @@ properties: - enum: - marvell,pxa1908-padconf - const: pinconf-single + - items: + - enum: + - brcm,bcm7038-padconf + - const: pinctrl-single
If there is going to be a new version, entire block should be placed before 'ti' to have some sort of sorting by compatible.
But no need to resend just for that.
Best regards,
Krzysztof
PATCH 2/2 pinctrl: single: Add bcm7038-padconf compatible matching
In reply to Florian FainelliJust like the TI J7200 padconf, we lose the context and therefore need to save it and restore it across suspend/resume states.
--- drivers/pinctrl/pinctrl-single.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pinctrl/pinctrl-single.c +3 -2
@@ -1960,7 +1960,7 @@ static const struct pcs_soc_data pinctrl_single_am654 = { .irq_status_mask = (1 << 30), /* WKUP_EVT */ }; -static const struct pcs_soc_data pinctrl_single_j7200 = { +static const struct pcs_soc_data pinctrl_single_loss_off = { .flags =PCS_CONTEXT_LOSS_OFF , };
@@ -1972,6 +1972,7 @@ static const struct pcs_soc_data pinconf_single = { };static const struct of_device_id pcs_of_match[] = { + { .compatible ="brcm,bcm7038-padconf" , .data = &pinctrl_single_loss_off }, { .compatible ="marvell,pxa1908-padconf" , .data = &pinconf_single }, { .compatible ="ti,am437-padconf" , .data = &pinctrl_single_am437x }, { .compatible ="ti,am654-padconf" , .data = &pinctrl_single_am654 },
@@ -1979,7 +1980,7 @@ static const 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,j7200-padconf", .data = &pinctrl_single_j7200 }, + { .compatible = "ti,j7200-padconf", .data = &pinctrl_single_loss_off }, { .compatible = "pinctrl-single", .data = &pinctrl_single }, { .compatible = "pinconf-single", .data = &pinconf_single }, { },
Signature · 1 line
2.34.1
Linus Walleij
maintainerQuoted 4 lines · Florian Fainelli
This patch set allows Broadcom STB chips with the BCM7038-style pinmux/configuration blocks to use pinctrl-single. This does not preclude us from making use of a more sophisticated driver in the future, should we need to.
OK that's one way to do it. I wonder if this approach also works for BCMBCA given Haojian's comments on my previous patch attempts.
drivers/pinctrl/bcm/pinctrl-bcm4908.c would then be phased over to pinctrl-single, or does the MSB/LSB register layout create a problem? If we always write 0 into MSB I guess we could just add some quirk...
Yours,
Linus Walleij
Linus Walleij
maintainerQuoted 4 lines · Florian Fainelli
This patch set allows Broadcom STB chips with the BCM7038-style pinmux/configuration blocks to use pinctrl-single. This does not preclude us from making use of a more sophisticated driver in the future, should we need to.
Patches applied for v7.1!
Yours,
Linus Walleij