mbox series

[0/6] spear: Fix SPEAr3XX plgpio support

Message ID 20211202095255.165797-1-herve.codina@bootlin.com
Headers show
Series spear: Fix SPEAr3XX plgpio support | expand

Message

Herve Codina Dec. 2, 2021, 9:52 a.m. UTC
Hi,

This patch series fixes the plgpio support on SPEAr3xx SOCs.

The first four patches of this series fixes a ressources
sharing issue between the plgpio driver and the pinmux
driver.
Indeed, these two drivers can use the same IO address range
on some SPEAr3xx SOCs.
To solve the issue, a regmap (syscon managed) is used in both
drivers and the plgpio driver can reference the pinmux regmap
to use it.

The second part of this series is related to IRQs.
The plgpio on SPEAr320s SOC uses an IRQ line in the reserve
range (from SPEAr320 point of view).
This issue is fixed enabling all the 'reserved' IRQs and
adding a dtsi file for the SPEAr320s with the correct interrupt
for the plgpio node.

Best regards,
Herve

Herve Codina (6):
  pinctrl: spear: spear: Convert to regmap
  pinctrl: spear: plgpio: Convert to regmap
  pinctrl: spear: plgpio: Introduce regmap phandle
  ARM: dts: spear3xx: Use plgpio regmap in SPEAr310 and SPEAr320
  irq: spear-shirq: Add support for IRQ 0..6
  ARM: dts: spear3xx: Add spear320s dtsi

 arch/arm/boot/dts/spear310.dtsi        |   1 +
 arch/arm/boot/dts/spear320.dtsi        |   1 +
 arch/arm/boot/dts/spear320s.dtsi       |  24 ++++
 drivers/irqchip/spear-shirq.c          |   2 +
 drivers/pinctrl/spear/pinctrl-plgpio.c | 148 +++++++++++++++----------
 drivers/pinctrl/spear/pinctrl-spear.c  |  10 +-
 drivers/pinctrl/spear/pinctrl-spear.h  |  12 +-
 7 files changed, 131 insertions(+), 67 deletions(-)
 create mode 100644 arch/arm/boot/dts/spear320s.dtsi

Comments

Viresh Kumar Dec. 2, 2021, 11:27 a.m. UTC | #1
On 02-12-21, 10:52, Herve Codina wrote:
> Hi,
> 
> This patch series fixes the plgpio support on SPEAr3xx SOCs.
> 
> The first four patches of this series fixes a ressources
> sharing issue between the plgpio driver and the pinmux
> driver.
> Indeed, these two drivers can use the same IO address range
> on some SPEAr3xx SOCs.
> To solve the issue, a regmap (syscon managed) is used in both
> drivers and the plgpio driver can reference the pinmux regmap
> to use it.
> 
> The second part of this series is related to IRQs.
> The plgpio on SPEAr320s SOC uses an IRQ line in the reserve
> range (from SPEAr320 point of view).
> This issue is fixed enabling all the 'reserved' IRQs and
> adding a dtsi file for the SPEAr320s with the correct interrupt
> for the plgpio node.

Are these changes backwards compatible ? I mean new kernel will work
with old DTBs ? It may be quite important to not break that here.
Viresh Kumar Dec. 3, 2021, 4:43 a.m. UTC | #2
On 02-12-21, 10:52, Herve Codina wrote:
> Hi,
> 
> This patch series fixes the plgpio support on SPEAr3xx SOCs.
> 
> The first four patches of this series fixes a ressources
> sharing issue between the plgpio driver and the pinmux
> driver.
> Indeed, these two drivers can use the same IO address range
> on some SPEAr3xx SOCs.
> To solve the issue, a regmap (syscon managed) is used in both
> drivers and the plgpio driver can reference the pinmux regmap
> to use it.
> 
> The second part of this series is related to IRQs.
> The plgpio on SPEAr320s SOC uses an IRQ line in the reserve
> range (from SPEAr320 point of view).
> This issue is fixed enabling all the 'reserved' IRQs and
> adding a dtsi file for the SPEAr320s with the correct interrupt
> for the plgpio node.
> 
> Best regards,
> Herve
> 
> Herve Codina (6):
>   pinctrl: spear: spear: Convert to regmap
>   pinctrl: spear: plgpio: Convert to regmap
>   pinctrl: spear: plgpio: Introduce regmap phandle
>   ARM: dts: spear3xx: Use plgpio regmap in SPEAr310 and SPEAr320
>   irq: spear-shirq: Add support for IRQ 0..6
>   ARM: dts: spear3xx: Add spear320s dtsi

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Linus Walleij Dec. 4, 2021, 11:36 p.m. UTC | #3
On Thu, Dec 2, 2021 at 10:53 AM Herve Codina <herve.codina@bootlin.com> wrote:

> Herve Codina (6):
>   pinctrl: spear: spear: Convert to regmap
>   pinctrl: spear: plgpio: Convert to regmap
>   pinctrl: spear: plgpio: Introduce regmap phandle

These three applied to the pinctrl tree.

>   ARM: dts: spear3xx: Use plgpio regmap in SPEAr310 and SPEAr320

Please apply this to the SoC tree.

>   irq: spear-shirq: Add support for IRQ 0..6

Please ask Marc Zyngier to apply this to the irqchip tree.

>   ARM: dts: spear3xx: Add spear320s dtsi

Please apply this to the SoC tree.

Yours,
Linus Walleij