mbox series

[RFC,00/18] ARM: Add minimal Raspberry Pi 4 support

Message ID 1563393026-17118-1-git-send-email-wahrenst@gmx.net (mailing list archive)
Headers show
Series ARM: Add minimal Raspberry Pi 4 support | expand

Message

Stefan Wahren July 17, 2019, 7:50 p.m. UTC
This series adds minimal support for the new Raspberry Pi 4, so we are able
to login via debug UART.

Patch 1-5:   Prepare platform and DTS for the new SoC BMC2838
Patch 6-9:   Enable support for emmc2 on BCM2838
Patch 10-14: Enable pinctrl for BCM2838
Patch 15:    Enable SPI support for BCM2838
Patch 16-18: Add Raspberry Pi 4 DTS support

Unfortunately the Raspberry Pi Foundation didn't released a
peripheral documentation for the new SoC yet. So we only have a preliminary
datasheet [1] and reduced schematics [2].

This series is marked as RFC because some parts (e.g. pinctrl) are still
work in progress.

[1] - https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0_preliminary.pdf
[2] - https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf

Discussible things:
- SoC compatible BCM2711 (as on the SoC label) vs BCM2838 (existing naming scheme)
- ARCH membership ARCH_BCM2835 vs ARCH_BCMSTB
...


Al Cooper (1):
  pinctrl: bcm2835: bcm7211: Add support for 7211 pull-up functionality

Martin Sperl (1):
  spi: bcm2835: enable shared interrupt support

Phil Elwell (2):
  ARM: bcm2835: DMA can only address 1GB
  ARM: bcm2835: Add bcm2838 compatible string

Stefan Wahren (14):
  ARM: bcm283x: Reduce register ranges for UART, SPI and I2C
  ARM: dts: bcm283x: Move BCM2835/6/7 specific to bcm2835-common.dtsi
  ARM: dts: bcm283x: Define MMC interfaces at board level
  ARM: dts: bcm283x: Define memory at board level
  dt-bindings: bcm2835-cprman: Add bcm2838 support
  clk: bcm2835: Add BCM2838_CLOCK_EMMC2 support
  dt-bindings: sdhci-iproc: Add brcm,bcm2838-emmc2
  mmc: sdhci-iproc: Add support for emmc2 of the BCM2838
  pinctrl: bcm2835: Fix BCM7211 pinconf handling
  dt-bindings: pinctrl: bcm2835: Add brcm,bcm2838 compatible
  pinctrl: bcm2835: Add BCM2838 support
  HACK: pinctrl: bcm2835: Implement legacy pull for BCM7211
  dt-bindings: bcm: Add Raspberry Pi 4 B
  ARM: dts: Add minimal Raspberry Pi 4 support

 .../devicetree/bindings/arm/bcm/brcm,bcm2835.txt   |   4 +
 .../bindings/clock/brcm,bcm2835-cprman.txt         |   4 +-
 .../devicetree/bindings/mmc/brcm,sdhci-iproc.txt   |   4 +-
 .../bindings/pinctrl/brcm,bcm2835-gpio.txt         |   1 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/bcm2835-common.dtsi              | 173 ++++++
 arch/arm/boot/dts/bcm2835-rpi-a-plus.dts           |  12 +
 arch/arm/boot/dts/bcm2835-rpi-a.dts                |  12 +
 arch/arm/boot/dts/bcm2835-rpi-b-plus.dts           |  12 +
 arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts           |  12 +
 arch/arm/boot/dts/bcm2835-rpi-b.dts                |  12 +
 arch/arm/boot/dts/bcm2835-rpi-cm1-io1.dts          |   7 +
 arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi             |   5 +
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts           |  12 +
 arch/arm/boot/dts/bcm2835-rpi-zero.dts             |  12 +
 arch/arm/boot/dts/bcm2835-rpi.dtsi                 |  18 -
 arch/arm/boot/dts/bcm2835.dtsi                     |   1 +
 arch/arm/boot/dts/bcm2836-rpi-2-b.dts              |   8 +
 arch/arm/boot/dts/bcm2836.dtsi                     |   1 +
 arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts         |   1 +
 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts         |   1 +
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              |   1 +
 arch/arm/boot/dts/bcm2837-rpi-cm3-io3.dts          |   7 +
 arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi             |   1 +
 arch/arm/boot/dts/bcm2837.dtsi                     |   1 +
 arch/arm/boot/dts/bcm2838-rpi-4-b.dts              | 120 ++++
 arch/arm/boot/dts/bcm2838.dtsi                     | 657 +++++++++++++++++++++
 arch/arm/boot/dts/bcm283x.dtsi                     | 166 +-----
 arch/arm/mach-bcm/board_bcm2835.c                  |   2 +
 drivers/clk/bcm/clk-bcm2835.c                      |  33 +-
 drivers/mmc/host/sdhci-iproc.c                     |   9 +
 drivers/pinctrl/bcm/pinctrl-bcm2835.c              |  97 ++-
 drivers/spi/spi-bcm2835.c                          |   8 +-
 include/dt-bindings/clock/bcm2835.h                |   2 +
 34 files changed, 1232 insertions(+), 185 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm2835-common.dtsi
 create mode 100644 arch/arm/boot/dts/bcm2838-rpi-4-b.dts
 create mode 100644 arch/arm/boot/dts/bcm2838.dtsi

--
2.7.4

Comments

Eric Anholt July 18, 2019, 6:45 p.m. UTC | #1
Stefan Wahren <wahrenst@gmx.net> writes:

> This series adds minimal support for the new Raspberry Pi 4, so we are able
> to login via debug UART.
>
> Patch 1-5:   Prepare platform and DTS for the new SoC BMC2838
> Patch 6-9:   Enable support for emmc2 on BCM2838
> Patch 10-14: Enable pinctrl for BCM2838
> Patch 15:    Enable SPI support for BCM2838
> Patch 16-18: Add Raspberry Pi 4 DTS support
>
> Unfortunately the Raspberry Pi Foundation didn't released a
> peripheral documentation for the new SoC yet. So we only have a preliminary
> datasheet [1] and reduced schematics [2].
>
> This series is marked as RFC because some parts (e.g. pinctrl) are still
> work in progress.
>
> [1] - https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0_preliminary.pdf
> [2] - https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf
>
> Discussible things:
> - SoC compatible BCM2711 (as on the SoC label) vs BCM2838 (existing naming scheme)
> - ARCH membership ARCH_BCM2835 vs ARCH_BCMSTB

Thanks for taking this on!

I would love to see us drop this silly upstream/downstream compatible
string naming scheme and just use 2711 (or 7211 for modules shared with
7211 that were enabled there first).  However, I don't feel that
strongly about it when I'm not the one doing the work.

Other than the SPI shared interrupt change that looks dodgy, and a
preference for the clock change being data-driven instead, I would be
willing to ack the whole thing.
Florian Fainelli July 18, 2019, 6:58 p.m. UTC | #2
On 7/18/19 11:45 AM, Eric Anholt wrote:
> Stefan Wahren <wahrenst@gmx.net> writes:
> 
>> This series adds minimal support for the new Raspberry Pi 4, so we are able
>> to login via debug UART.
>>
>> Patch 1-5:   Prepare platform and DTS for the new SoC BMC2838
>> Patch 6-9:   Enable support for emmc2 on BCM2838
>> Patch 10-14: Enable pinctrl for BCM2838
>> Patch 15:    Enable SPI support for BCM2838
>> Patch 16-18: Add Raspberry Pi 4 DTS support
>>
>> Unfortunately the Raspberry Pi Foundation didn't released a
>> peripheral documentation for the new SoC yet. So we only have a preliminary
>> datasheet [1] and reduced schematics [2].
>>
>> This series is marked as RFC because some parts (e.g. pinctrl) are still
>> work in progress.
>>
>> [1] - https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0_preliminary.pdf
>> [2] - https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf
>>
>> Discussible things:
>> - SoC compatible BCM2711 (as on the SoC label) vs BCM2838 (existing naming scheme)
>> - ARCH membership ARCH_BCM2835 vs ARCH_BCMSTB
> 
> Thanks for taking this on!
> 
> I would love to see us drop this silly upstream/downstream compatible
> string naming scheme and just use 2711 (or 7211 for modules shared with
> 7211 that were enabled there first).  However, I don't feel that
> strongly about it when I'm not the one doing the work.

2711 and 7211 are really different chips so we would need to keep
differentiating the two form a hardware description perspective, even if
the driver behavior is strictly the same (that's a software
implementation detail).

> 
> Other than the SPI shared interrupt change that looks dodgy, and a
> preference for the clock change being data-driven instead, I would be
> willing to ack the whole thing.
> 

It does look good to me as well, will do a more thorough pass again.
Nicolas Saenz Julienne July 19, 2019, 1:18 p.m. UTC | #3
On Thu, 2019-07-18 at 11:45 -0700, Eric Anholt wrote:
> Stefan Wahren <wahrenst@gmx.net> writes:
> 
> > This series adds minimal support for the new Raspberry Pi 4, so we are able
> > to login via debug UART.
> > 
> > Patch 1-5:   Prepare platform and DTS for the new SoC BMC2838
> > Patch 6-9:   Enable support for emmc2 on BCM2838
> > Patch 10-14: Enable pinctrl for BCM2838
> > Patch 15:    Enable SPI support for BCM2838
> > Patch 16-18: Add Raspberry Pi 4 DTS support
> > 
> > Unfortunately the Raspberry Pi Foundation didn't released a
> > peripheral documentation for the new SoC yet. So we only have a preliminary
> > datasheet [1] and reduced schematics [2].
> > 
> > This series is marked as RFC because some parts (e.g. pinctrl) are still
> > work in progress.
> > 
> > [1] - 
> > 
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0_preliminary.pdf
> > [2] - 
> > 
https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_4b_4p0_reduced.pdf
> > 
> > Discussible things:
> > - SoC compatible BCM2711 (as on the SoC label) vs BCM2838 (existing naming
> > scheme)
> > - ARCH membership ARCH_BCM2835 vs ARCH_BCMSTB
> 
> Thanks for taking this on!
> 
> I would love to see us drop this silly upstream/downstream compatible
> string naming scheme and just use 2711 (or 7211 for modules shared with
> 7211 that were enabled there first).  However, I don't feel that
> strongly about it when I'm not the one doing the work.

In the long run it would have the added benefit of being able to use all the
overlays the RPi Foundation supports. That said I agree with Eric's sentiment.