From: Stefan Wahren <stefan.wahren@i2se.com> To: Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org> Cc: bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne <nsaenz@kernel.org>, Peter Robinson <pbrobinson@gmail.com>, matthias.bgg@kernel.org, Marek Szyprowski <m.szyprowski@samsung.com>, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren <stefan.wahren@i2se.com> Subject: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards Date: Wed, 13 Apr 2022 18:27:39 +0200 [thread overview] Message-ID: <20220413162739.6717-1-stefan.wahren@i2se.com> (raw) 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@i2se.com> --- 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@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; }; -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Wahren <stefan.wahren@i2se.com> To: Florian Fainelli <f.fainelli@gmail.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org> Cc: bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne <nsaenz@kernel.org>, Peter Robinson <pbrobinson@gmail.com>, matthias.bgg@kernel.org, Marek Szyprowski <m.szyprowski@samsung.com>, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren <stefan.wahren@i2se.com> Subject: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards Date: Wed, 13 Apr 2022 18:27:39 +0200 [thread overview] Message-ID: <20220413162739.6717-1-stefan.wahren@i2se.com> (raw) 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@i2se.com> --- 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@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; }; -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-04-13 16:28 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-13 16:27 Stefan Wahren [this message] 2022-04-13 16:27 ` [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards Stefan Wahren 2022-05-04 21:43 ` Stefan Wahren 2022-05-04 21:43 ` Stefan Wahren 2022-05-18 20:18 ` Florian Fainelli 2022-05-18 20:18 ` Florian Fainelli 2022-05-19 18:48 ` Stefan Wahren 2022-05-19 18:48 ` Stefan Wahren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220413162739.6717-1-stefan.wahren@i2se.com \ --to=stefan.wahren@i2se.com \ --cc=bcm-kernel-feedback-list@broadcom.com \ --cc=devicetree@vger.kernel.org \ --cc=f.fainelli@gmail.com \ --cc=krzk+dt@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-rpi-kernel@lists.infradead.org \ --cc=m.szyprowski@samsung.com \ --cc=matthias.bgg@kernel.org \ --cc=nsaenz@kernel.org \ --cc=pbrobinson@gmail.com \ --cc=rjui@broadcom.com \ --cc=robh+dt@kernel.org \ --cc=sbranden@broadcom.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.