[PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
Stefan Wahren
stefan.wahren at i2se.com
Wed May 4 14:43:17 PDT 2022
Hi,
Am 13.04.22 um 18:27 schrieb Stefan Wahren:
> The commit 3d2cbb644836 ("ARM: dts: bcm2711: Move emmc2 into its own bus")
> assumed that all bootloader pass the FDT modified by the firmware to the
> kernel. But this is not always the case (e.g. Fedora) and cause boot
> issues for boards with a BCM2711 C0 SoC (RPi 400, CM4, newer RPi 4 B)
> which does have different DMA constraints.
>
> Since we are not able to detect the SoC revision, let's assume a BCM2711
> C0 SoC for bcm2711.dtsi and move the restricted DMA constrains to a
> separate RPi 4 B board file just for the old SoC revision.
>
> Fixes: 3d2cbb644836 ("ARM: dts: bcm2711: Move emmc2 into its own bus")
> Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
since there wasn't any feedback yet, i want to ping ...
> ---
> arch/arm/boot/dts/Makefile | 1 +
> arch/arm/boot/dts/bcm2711-rpi-4-b-b0.dts | 22 ++++++++++++++++++++++
> arch/arm/boot/dts/bcm2711.dtsi | 11 +++--------
> 3 files changed, 26 insertions(+), 8 deletions(-)
> create mode 100644 arch/arm/boot/dts/bcm2711-rpi-4-b-b0.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 7c16f8a2b738..560d36ba1041 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -96,6 +96,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
> bcm2837-rpi-zero-2-w.dtb \
> bcm2711-rpi-400.dtb \
> bcm2711-rpi-4-b.dtb \
> + bcm2711-rpi-4-b-b0.dtb \
> bcm2711-rpi-cm4-io.dtb \
> bcm2835-rpi-zero.dtb \
> bcm2835-rpi-zero-w.dtb
> diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b-b0.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b-b0.dts
> new file mode 100644
> index 000000000000..c53ed510392f
> --- /dev/null
> +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b-b0.dts
> @@ -0,0 +1,22 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/dts-v1/;
> +#include "bcm2711-rpi-4-b.dts"
> +
> +&emmc2bus {
> + /*
> + * emmc2 on initial SoC revision (only assembled on RPi 4 B)
> + * has different DMA constraints.
> + */
> + dma-ranges = <0x0 0xc0000000 0x0 0x00000000 0x40000000>;
> +};
> +
> +&pcie0 {
> + /*
> + * The wrapper around the PCIe block has a bug
> + * preventing it from accessing beyond the first 3GB of
> + * memory.
> + */
> + dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000
> + 0x0 0xc0000000>;
> +};
> +
> diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
> index 89af57482bc8..c307c45385a0 100644
> --- a/arch/arm/boot/dts/bcm2711.dtsi
> +++ b/arch/arm/boot/dts/bcm2711.dtsi
> @@ -420,7 +420,7 @@ emmc2bus: emmc2bus {
> #size-cells = <1>;
>
> ranges = <0x0 0x7e000000 0x0 0xfe000000 0x01800000>;
> - dma-ranges = <0x0 0xc0000000 0x0 0x00000000 0x40000000>;
> + dma-ranges = <0x0 0x00000000 0x0 0x00000000 0xfc000000>;
>
> emmc2: mmc at 7e340000 {
> compatible = "brcm,bcm2711-emmc2";
> @@ -574,13 +574,8 @@ IRQ_TYPE_LEVEL_HIGH>,
>
> ranges = <0x02000000 0x0 0xf8000000 0x6 0x00000000
> 0x0 0x04000000>;
> - /*
> - * The wrapper around the PCIe block has a bug
> - * preventing it from accessing beyond the first 3GB of
> - * memory.
> - */
> - dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000
> - 0x0 0xc0000000>;
> + dma-ranges = <0x02000000 0x4 0x00000000 0x0 0x00000000
> + 0x1 0x00000000>;
> brcm,enable-ssc;
> };
>
More information about the linux-arm-kernel
mailing list