Skip to content

Raspberry Pi 4B machine

Sergey Kambalin qemu-arm qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest45 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/45Split out common part of BCM283X classeshw/arm/bcm2836.c hw/arm/raspi.c include/hw/arm/bcm2836.h+83 -470 replies
2/45Split out common part of peripheralshw/arm/bcm2835_peripherals.c hw/arm/bcm2836.c include/hw/arm/bcm2835_peripherals.h +1 more+154 -1000 replies
3/45Split out raspi machine common parthw/arm/raspi.c include/hw/arm/raspi_platform.h+85 -480 replies
4/45Introduce BCM2838 SoChw/arm/bcm2838.c hw/arm/bcm2838_peripherals.c hw/arm/meson.build +2 more+239 -00 replies
5/45Add GIC-400 to BCM2838 SoChw/arm/bcm2838.c hw/arm/trace-events include/hw/arm/bcm2838.h +1 more+210 -00 replies
6/45Add BCM2838 GPIO stubhw/arm/bcm2838.c hw/gpio/bcm2838_gpio.c hw/gpio/meson.build +2 more+198 -50 replies
7/45Implement BCM2838 GPIO functionalityhw/gpio/bcm2838_gpio.c+189 -30 replies
8/45Connect SD controller to BCM2838 GPIOhw/gpio/bcm2838_gpio.c include/hw/gpio/bcm2838_gpio.h+60 -40 replies
9/45Add GPIO and SD to BCM2838 periphhw/arm/bcm2838_peripherals.c include/hw/arm/bcm2838_peripherals.h+149 -00 replies
10/45Add BCM2838 checkpoint supporthw/arm/bcm2838_peripherals.c+1 -10 replies
11/45Introduce Raspberry PI 4 machinehw/arm/bcm2835_peripherals.c hw/arm/bcm2836.c hw/arm/bcm2838.c +5 more+125 -140 replies
12/45Temporarily disable unimplemented rpi4b deviceshw/arm/raspi.c hw/arm/raspi4b.c include/hw/arm/raspi_platform.h+65 -40 replies
13/45Add memory region for BCM2837 RPiVid ASBhw/arm/bcm2838_peripherals.c include/hw/arm/bcm2838_peripherals.h include/hw/arm/raspi_platform.h+6 -10 replies
14/45Add BCM2838 PCIE Root Complexhw/arm/bcm2838_pcie.c hw/arm/meson.build hw/arm/trace-events +1 more+135 -10 replies
15/45Add BCM2838 PCIE hosthw/arm/bcm2838_pcie.c include/hw/arm/bcm2838_pcie.h+236 -20 replies
16/45Enable BCM2838 PCIEhw/arm/bcm2838_pcie.c hw/arm/bcm2838_peripherals.c hw/arm/meson.build +2 more+36 -40 replies
17/45Add RNG200 skeletonhw/misc/bcm2838_rng200.c hw/misc/meson.build hw/misc/trace-events +1 more+213 -00 replies
18/45Add RNG200 RNG and RBGhw/misc/bcm2838_rng200.c include/hw/misc/bcm2838_rng200.h+275 -270 replies
19/45Get rid of RNG200 timerhw/arm/bcm2838_peripherals.c hw/arm/raspi4b.c hw/misc/bcm2838_rng200.c +2 more+63 -360 replies
20/45Implement BCM2838 thermal sensorhw/arm/bcm2838_peripherals.c hw/arm/raspi4b.c hw/misc/bcm2838_thermal.c +3 more+147 -80 replies
21/45Add clock_isp stubhw/arm/bcm2838_peripherals.c include/hw/arm/bcm2838_peripherals.h+7 -00 replies
22/45Add GENET stubhw/misc/bcm2838_thermal.c hw/net/bcm2838_genet.c hw/net/meson.build +2 more+158 -10 replies
23/45Add GENET register structs. Part 1hw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+113 -10 replies
24/45Add GENET register structs. Part 2hw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+178 -00 replies
25/45Add GENET register structs. Part 3hw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+176 -00 replies
26/45Add GENET register structs. Part 4include/hw/net/bcm2838_genet.h+37 -00 replies
27/45Add GENET register access macrosinclude/hw/net/bcm2838_genet.h+76 -00 replies
28/45Implement GENET register opshw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+182 -90 replies
29/45Implement GENET MDIOhw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+126 -30 replies
30/45Implement GENET TX pathhw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+237 -10 replies
31/45Implement GENET RX pathhw/net/bcm2838_genet.c include/hw/net/bcm2838_genet.h+265 -10 replies
32/45Enable BCM2838 GENET controllerhw/arm/bcm2838_peripherals.c hw/arm/raspi4b.c include/hw/arm/bcm2838_peripherals.h+18 -170 replies
33/45Connect RNG200, PCIE and GENET to GIChw/arm/bcm2838.c include/hw/arm/bcm2838_peripherals.h+21 -00 replies
34/45Add Rpi4b boot teststests/avocado/boot_linux_console.py+92 -00 replies
35/45Add mailbox test stubinclude/hw/arm/bcm2838_peripherals.h tests/qtest/bcm2838-mailbox.c tests/qtest/bcm2838-mailbox.h +1 more+120 -00 replies
36/45Add mailbox test constantstests/qtest/bcm2838-mailbox.h+139 -00 replies
37/45Add mailbox tests tags. Part 1tests/qtest/bcm2838-mailbox.h+190 -50 replies
38/45Add mailbox tests tags. Part 2tests/qtest/bcm2838-mailbox.h+152 -00 replies
39/45Add mailbox tests tags. Part 3tests/qtest/bcm2838-mailbox.h+78 -00 replies
40/45Add mailbox property tests. Part 1tests/qtest/bcm2838-mailbox.c tests/qtest/bcm2838-mailbox.h tests/qtest/bcm2838-mbox-property-test.c +1 more+220 -400 replies
41/45Add mailbox property tests. Part 2tests/qtest/bcm2838-mbox-property-test.c+195 -10 replies
42/45Add mailbox property tests. Part 3tests/qtest/bcm2838-mbox-property-test.c+212 -10 replies
43/45Add missed BCM2835 propertieshw/misc/bcm2835_property.c include/hw/arm/raspberrypi-fw-defs.h+58 -10 replies
44/45Append added properties to mailbox testtests/qtest/bcm2838-mbox-property-test.c+16 -60 replies
45/45Add RPi4B to paspi4.rstdocs/system/arm/raspi.rst+7 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/45] Raspberry Pi 4B machine

Introducing Raspberry Pi 4B model.
It contains new BCM2838 SoC, PCIE subsystem, RNG200, Thermal sensor and Genet network controller.

It can work with recent linux kernels 6.x.x.
Two avocado tests was added to check that.

Unit tests has been made as read/write operations
via mailbox properties.

Genet integration test is under development.

Every single commit
1) builds without errors
2) passes regression tests
3) passes style check*
*the only exception is bcm2838-mbox-property-test.c file containing heavy macros usage which cause a lot of false-positives of checkpatch.pl.

I did my best to keep the commits less than 200 changes, but had to make some of them a bit more in order to keep their integrity.

This is v2 patchset with the most of v1 remarks fixed.

Sergey Kambalin (45):
Split out common part of BCM283X classes
Split out common part of peripherals
Split out raspi machine common part
Introduce BCM2838 SoC
Add GIC-400 to BCM2838 SoC
Add BCM2838 GPIO stub
Implement BCM2838 GPIO functionality
Connect SD controller to BCM2838 GPIO
Add GPIO and SD to BCM2838 periph
Add BCM2838 checkpoint support
Introduce Raspberry PI 4 machine
Temporarily disable unimplemented rpi4b devices
Add memory region for BCM2837 RPiVid ASB
Add BCM2838 PCIE Root Complex
Add BCM2838 PCIE host
Enable BCM2838 PCIE
Add RNG200 skeleton
Add RNG200 RNG and RBG
Get rid of RNG200 timer
Implement BCM2838 thermal sensor
Add clock_isp stub
Add GENET stub
Add GENET register structs. Part 1
Add GENET register structs. Part 2
Add GENET register structs. Part 3
Add GENET register structs. Part 4
Add GENET register access macros
Implement GENET register ops
Implement GENET MDIO
Implement GENET TX path
Implement GENET RX path
Enable BCM2838 GENET controller
Connect RNG200, PCIE and GENET to GIC
Add Rpi4b boot tests
Add mailbox test stub
Add mailbox test constants
Add mailbox tests tags. Part 1
Add mailbox tests tags. Part 2
Add mailbox tests tags. Part 3
Add mailbox property tests. Part 1
Add mailbox property tests. Part 2
Add mailbox property tests. Part 3
Add missed BCM2835 properties
Append added properties to mailbox test
Add RPi4B to paspi4.rst

 docs/system/arm/raspi.rst                |   11 +-
 hw/arm/bcm2835_peripherals.c             |  218 +++--
 hw/arm/bcm2836.c                         |  116 ++-
 hw/arm/bcm2838.c                         |  288 ++++++
 hw/arm/bcm2838_pcie.c                    |  289 ++++++
 hw/arm/bcm2838_peripherals.c             |  292 ++++++
 hw/arm/meson.build                       |    8 +-
 hw/arm/raspi.c                           |  131 +--
 hw/arm/raspi4b.c                         |  112 +++
 hw/arm/trace-events                      |    6 +
 hw/gpio/bcm2838_gpio.c                   |  389 ++++++++
 hw/gpio/meson.build                      |    5 +-
 hw/misc/bcm2835_property.c               |   47 +
 hw/misc/bcm2838_rng200.c                 |  420 +++++++++
 hw/misc/bcm2838_thermal.c                |   98 ++
 hw/misc/meson.build                      |    2 +
 hw/misc/trace-events                     |    9 +
 hw/net/bcm2838_genet.c                   | 1088 ++++++++++++++++++++++
 hw/net/meson.build                       |    2 +
 hw/net/trace-events                      |   16 +
 include/hw/arm/bcm2835_peripherals.h     |   29 +-
 include/hw/arm/bcm2836.h                 |   27 +-
 include/hw/arm/bcm2838.h                 |   31 +
 include/hw/arm/bcm2838_pcie.h            |   75 ++
 include/hw/arm/bcm2838_peripherals.h     |   97 ++
 include/hw/arm/raspberrypi-fw-defs.h     |   12 +-
 include/hw/arm/raspi_platform.h          |   37 +
 include/hw/display/bcm2835_fb.h          |    2 +
 include/hw/gpio/bcm2838_gpio.h           |   45 +
 include/hw/misc/bcm2838_rng200.h         |   43 +
 include/hw/misc/bcm2838_thermal.h        |   24 +
 include/hw/net/bcm2838_genet.h           |  426 +++++++++
 tests/avocado/boot_linux_console.py      |   92 ++
 tests/qtest/bcm2838-mailbox.c            |   61 ++
 tests/qtest/bcm2838-mailbox.h            |  584 ++++++++++++
 tests/qtest/bcm2838-mbox-property-test.c |  621 ++++++++++++
 tests/qtest/meson.build                  |    3 +-
 37 files changed, 5551 insertions(+), 205 deletions(-)
 create mode 100644 hw/arm/bcm2838.c
 create mode 100644 hw/arm/bcm2838_pcie.c
 create mode 100644 hw/arm/bcm2838_peripherals.c
 create mode 100644 hw/arm/raspi4b.c
 create mode 100644 hw/gpio/bcm2838_gpio.c
 create mode 100644 hw/misc/bcm2838_rng200.c
 create mode 100644 hw/misc/bcm2838_thermal.c
 create mode 100644 hw/net/bcm2838_genet.c
 create mode 100644 include/hw/arm/bcm2838.h
 create mode 100644 include/hw/arm/bcm2838_pcie.h
 create mode 100644 include/hw/arm/bcm2838_peripherals.h
 create mode 100644 include/hw/gpio/bcm2838_gpio.h
 create mode 100644 include/hw/misc/bcm2838_rng200.h
 create mode 100644 include/hw/misc/bcm2838_thermal.h
 create mode 100644 include/hw/net/bcm2838_genet.h
 create mode 100644 tests/qtest/bcm2838-mailbox.c
 create mode 100644 tests/qtest/bcm2838-mailbox.h
 create mode 100644 tests/qtest/bcm2838-mbox-property-test.c
Signature · 1 line
2.34.1