mbox series

[RFC,0/4] pinctrl: bcm2835: Add support for all BCM2711 GPIOs

Message ID 1580148908-4863-1-git-send-email-stefan.wahren@i2se.com (mailing list archive)
Headers show
Series pinctrl: bcm2835: Add support for all BCM2711 GPIOs | expand

Message

Stefan Wahren Jan. 27, 2020, 6:15 p.m. UTC
The BCM2711 supports 58 GPIOs [1] by using the existing BCM2835 GPIO registers
completely. So there is no need to change the binding.

Patch 1 and 2 prepare the pinctrl driver to be extended to 58 GPIOs in Patch 3.
I didn't want to squash them in order to make review as easy as possible.
The final patch 4 assigns all SoC GPIOs a label as we already did for
the older Raspberry Pi boards.

[1] - https://github.com/raspberrypi/linux/issues/3101#issuecomment-573092294

Stefan Wahren (4):
  pinctrl: bcm2835: Drop unused define
  pinctrl: bcm2835: Refactor platform data
  pinctrl: bcm2835: Add support for all GPIOs on BCM2711
  ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels

 arch/arm/boot/dts/bcm2711-rpi-4-b.dts |  74 ++++++++++++++++++++++++
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 106 ++++++++++++++++++++++++++--------
 2 files changed, 156 insertions(+), 24 deletions(-)

Comments

Nicolas Saenz Julienne Jan. 28, 2020, 10:17 a.m. UTC | #1
On Mon Jan 27, 2020 at 7:15 PM, Stefan Wahren wrote:
> The BCM2711 supports 58 GPIOs [1] by using the existing BCM2835 GPIO
> registers
> completely. So there is no need to change the binding.
>
> Patch 1 and 2 prepare the pinctrl driver to be extended to 58 GPIOs in
> Patch 3.
> I didn't want to squash them in order to make review as easy as
> possible.
> The final patch 4 assigns all SoC GPIOs a label as we already did for
> the older Raspberry Pi boards.
>
> [1] -
> https://github.com/raspberrypi/linux/issues/3101#issuecomment-573092294
>
> Stefan Wahren (4):
> pinctrl: bcm2835: Drop unused define
> pinctrl: bcm2835: Refactor platform data
> pinctrl: bcm2835: Add support for all GPIOs on BCM2711
> ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels
>
> arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 74 ++++++++++++++++++++++++
> drivers/pinctrl/bcm/pinctrl-bcm2835.c | 106
> ++++++++++++++++++++++++++--------
> 2 files changed, 156 insertions(+), 24 deletions(-)

Apart from the review, I gave it a test on an RPi4 and RPi3b, looks good to me.
Nicolas Saenz Julienne Jan. 29, 2020, 1:56 p.m. UTC | #2
On Mon, 2020-01-27 at 19:15 +0100, Stefan Wahren wrote:
> The BCM2711 supports 58 GPIOs [1] by using the existing BCM2835 GPIO registers
> completely. So there is no need to change the binding.
> 
> Patch 1 and 2 prepare the pinctrl driver to be extended to 58 GPIOs in Patch
> 3.
> I didn't want to squash them in order to make review as easy as possible.
> The final patch 4 assigns all SoC GPIOs a label as we already did for
> the older Raspberry Pi boards.
> 
> [1] - https://github.com/raspberrypi/linux/issues/3101#issuecomment-573092294
> 
> Stefan Wahren (4):
>   pinctrl: bcm2835: Drop unused define
>   pinctrl: bcm2835: Refactor platform data
>   pinctrl: bcm2835: Add support for all GPIOs on BCM2711
>   ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels
> 
>  arch/arm/boot/dts/bcm2711-rpi-4-b.dts |  74 ++++++++++++++++++++++++
>  drivers/pinctrl/bcm/pinctrl-bcm2835.c | 106 ++++++++++++++++++++++++++-------
> -
>  2 files changed, 156 insertions(+), 24 deletions(-)

Overall this looks good to me (modulo the small comments). I also gave it a go
on RPi4 and RPi3b without issues.

Regards,
Nicolas