Skip to content

DT: Leave upstream Raspberry Pi DT files unmodified - #7795

Merged
popcornmix merged 2 commits into
raspberrypi:rpi-7.4.yfrom
popcornmix:dt-minimal
Nov 25, 2026
Merged

popcornmix merged 2 commits into
raspberrypi:rpi-7.4.yfrom
popcornmix:dt-minimal

Conversation

@popcornmix

Copy link
Copy Markdown
Collaborator

Keep the upstream Raspberry Pi DT files (arch/arm*/boot/dts/broadcom) as close to upstream as possible, so rebases only carry small hooks. The downstream changes move into downstream files.

Upstream files still changed (vs v7.4-rc4):

  • bcm2711-rpi-4-b.dts: +3 lines (include at top for the i2c0 label rename, include at end)
  • bcm2711-rpi-400.dts: +2 lines (include at end)
  • bcm2712-rpi-5-b.dts: +3 lines (include downstream file, #if 0 around upstream body)
  • bcm2712.dtsi: MIP1 msi-ranges fix (left as is; it belongs upstream)
  • Makefiles

Now unchanged: bcm283x.dtsi, bcm2835-common.dtsi, bcm2835-rpi.dtsi, bcm2711.dtsi, bcm2711-rpi.dtsi. bcm2712-rpi-5-b-base.dtsi is restored.

Testing:

  • All downstream dtbs (arm and arm64) have the same nodes, properties, labels and references; only node order and phandle values change. Pi 5 dtbs are byte-identical. Overlays are byte-identical.
  • Upstream-only dtbs (bcm2835-*, bcm2836-*, bcm2837-*, bcm2711-rpi-cm4-io) now match upstream exactly.
  • Booted on Pi 4 and Pi 5: same drivers bound and same dmesg as the old dtbs, no deferred devices.

Note: bcm2835-rpi-ds.dtsi copies the upstream firmware/clocks/power/gpio/reset nodes to recreate them under /soc, so upstream changes to those nodes need copying by hand.

Move the downstream changes out of the upstream DT files and into
downstream ones, so that rebases only have to carry small hooks:

- bcm2711-rpi-4-b.dts: an include at the top (bcm2711-rpi-4-b-ds-pre.dtsi,
  the i2c0 label rename) and at the end (bcm2711-rpi-4-b-ds.dtsi).
- bcm2711-rpi-400.dts: an include at the end (bcm2711-rpi-400-ds.dtsi),
  which recreates led_act deleted by the upstream file.
- bcm283x.dtsi, bcm2711.dtsi, bcm2711-rpi.dtsi: overrides moved to
  bcm270x.dtsi and bcm2711-rpi-ds.dtsi.
- bcm2835-common.dtsi, bcm2835-rpi.dtsi: the moves of vc4, firmware and
  power under /soc are done in bcm270x.dtsi and the new bcm2835-rpi-ds.dtsi.

The downstream dtbs keep the same nodes, properties and labels; only
node order and phandle values change. The upstream-only dtbs (bcm2835-*,
bcm2836-*, bcm2837-*, bcm2711-rpi-cm4-io) now match upstream exactly.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
The downstream bcm2712-rpi-5-b.dts replaced the upstream file entirely
and deleted bcm2712-rpi-5-b-base.dtsi. Move the downstream content to
bcm2712-rpi-5-b-ds.dtsi, restore both upstream files, and hook the
downstream file in with an #include and an #if 0 around the upstream
body.

The resulting dtbs are byte-identical.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
@pelwell

pelwell commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

There are some (to me) unexpected changes as a result of the first commit:

#### bcm2835-rpi-a-plus ####
#### bcm2835-rpi-a ####
#### bcm2835-rpi-b-plus ####
#### bcm2835-rpi-b-rev2 ####
#### bcm2835-rpi-b ####
#### bcm2835-rpi-cm1-io1 ####
#### bcm2835-rpi-zero-w ####
#### bcm2835-rpi-zero ####
#### bcm2836-rpi-2-b ####
#### bcm2837-rpi-2-b ####
#### bcm2837-rpi-3-a-plus ####
#### bcm2837-rpi-3-b-plus ####
#### bcm2837-rpi-3-b ####
#### bcm2837-rpi-cm3-io3 ####
#### bcm2837-rpi-zero-2-w ####
    moved: /soc/firmware  ->  /firmware/rpi-firmware
    moved: /soc/gpu  ->  /gpu
    moved: /soc/power  ->  /firmware/rpi-firmware/power
    node /clocks
        - compatible = "simple-bus";
    node /soc/dsi@7e209000
        - clocks = <&clocks BCM2835_PLLD_DSI0>, <&clocks BCM2835_CLOCK_DSI0E>, <&clocks BCM2835_CLOCK_DSI0P>;
        + clocks = <&clocks BCM2835_PLLA_DSI0>, <&clocks BCM2835_CLOCK_DSI0E>, <&clocks BCM2835_CLOCK_DSI0P>;
    node /soc/pwm@7e20c000
        - assigned-clock-rates = <50000000>;
        + assigned-clock-rates = <10000000>;

#### bcm2835-rpi-a-plus ####
#### bcm2835-rpi-a ####
#### bcm2835-rpi-b-plus ####
#### bcm2835-rpi-b-rev2 ####
#### bcm2835-rpi-b ####
#### bcm2835-rpi-cm1-io1 ####
#### bcm2835-rpi-zero-w ####
#### bcm2835-rpi-zero ####
#### bcm2836-rpi-2-b ####
#### bcm2837-rpi-2-b ####
#### bcm2837-rpi-zero-2-w ####
    node /
        + node firmware { ... }  (added, 5 properties, 3 subnodes)

#### bcm2837-rpi-3-a-plus ####
#### bcm2837-rpi-3-b-plus ####
#### bcm2837-rpi-3-b ####
#### bcm2837-rpi-cm3-io3 ####
    node /
        + node firmware { ... }  (added, 9 properties, 4 subnodes)

@popcornmix

Copy link
Copy Markdown
Collaborator Author

Yes, that's intended. Those are the upstream-only dtbs (the firmware loads the bcm27xx-* names). Before this PR they picked up the downstream changes through the shared bcm283x/bcm2835-rpi/bcm2835-common .dtsi files. Now those files match upstream, so these dtbs are identical to a plain v7.4-rc4 build. The downstream dtbs keep the same content.

Should the upstream-named dtbs keep the downstream fixes (DSI0 PLLD clock, /soc/firmware, PWM 50 MHz), or is matching upstream preferred?

@pelwell

pelwell commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Matching upstream is preferred, but it's clear that I need to improve the ovmerge parser to cope with the LED_FUNCTION_LAN defines (which are awful because the literal "lan" is perfectly descriptive enough).

@pelwell

pelwell commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

I've fixed ovmerge and now the overlaycheck passes. I'd merge this as-is.

@popcornmix
popcornmix marked this pull request as ready for review November 25, 2026 17:03
@popcornmix
popcornmix merged commit cfcee34 into raspberrypi:rpi-7.4.y Nov 25, 2026
11 of 13 checks passed
@popcornmix

Copy link
Copy Markdown
Collaborator Author

I'll try to follow this scheme for future major kernel bumps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants