All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
@ 2022-04-13 16:27 ` Stefan Wahren
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2022-04-13 16:27 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Rob Herring,
	Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel, 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@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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
@ 2022-04-13 16:27 ` Stefan Wahren
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2022-04-13 16:27 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Rob Herring,
	Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel, 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@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
  2022-04-13 16:27 ` Stefan Wahren
@ 2022-05-04 21:43   ` Stefan Wahren
  -1 siblings, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2022-05-04 21:43 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Rob Herring,
	Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel

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@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@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;
>   		};
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
@ 2022-05-04 21:43   ` Stefan Wahren
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2022-05-04 21:43 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Rob Herring,
	Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel

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@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@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;
>   		};
>   

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
  2022-05-04 21:43   ` Stefan Wahren
@ 2022-05-18 20:18     ` Florian Fainelli
  -1 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2022-05-18 20:18 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden,
	Rob Herring, Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel



On 5/4/2022 2:43 PM, Stefan Wahren wrote:
> 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@i2se.com>
> since there wasn't any feedback yet, i want to ping ...

Could not we just rely on the VPU patching the Device Tree instead of 
having to differentiate the 2711 revision and having to use different 
DTS/DTBs?

Also, can we consider that the older B0 are less predominant in the wild 
than the C0 nowadays, especially with the shortages going on is that 
even remotely the case?
-- 
Florian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
@ 2022-05-18 20:18     ` Florian Fainelli
  0 siblings, 0 replies; 8+ messages in thread
From: Florian Fainelli @ 2022-05-18 20:18 UTC (permalink / raw)
  To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden,
	Rob Herring, Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel



On 5/4/2022 2:43 PM, Stefan Wahren wrote:
> 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@i2se.com>
> since there wasn't any feedback yet, i want to ping ...

Could not we just rely on the VPU patching the Device Tree instead of 
having to differentiate the 2711 revision and having to use different 
DTS/DTBs?

Also, can we consider that the older B0 are less predominant in the wild 
than the C0 nowadays, especially with the shortages going on is that 
even remotely the case?
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
  2022-05-18 20:18     ` Florian Fainelli
@ 2022-05-19 18:48       ` Stefan Wahren
  -1 siblings, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2022-05-19 18:48 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Rob Herring,
	Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel

Am 18.05.22 um 22:18 schrieb Florian Fainelli:
>
>
> On 5/4/2022 2:43 PM, Stefan Wahren wrote:
>> 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@i2se.com>
>> since there wasn't any feedback yet, i want to ping ...
>
> Could not we just rely on the VPU patching the Device Tree instead of 
> having to differentiate the 2711 revision and having to use different 
> DTS/DTBs?
As long as every bootloader in the boot chain take care everything is 
fine. The problem is the VPU firmware is closed source, so only a few 
people knows about the hardware differences. So the idea was to make it 
more transparent and yes i'm also not happy with this patch.
>
> Also, can we consider that the older B0 are less predominant in the 
> wild than the C0 nowadays, especially with the shortages going on is 
> that even remotely the case?
So your idea is to make C0 the default and let the firmware patch the B0 
part? I must confess that i never tested this.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards
@ 2022-05-19 18:48       ` Stefan Wahren
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Wahren @ 2022-05-19 18:48 UTC (permalink / raw)
  To: Florian Fainelli, Ray Jui, Scott Branden, Rob Herring,
	Krzysztof Kozlowski
  Cc: bcm-kernel-feedback-list, Nicolas Saenz Julienne, Peter Robinson,
	matthias.bgg, Marek Szyprowski, devicetree, linux-rpi-kernel,
	linux-arm-kernel

Am 18.05.22 um 22:18 schrieb Florian Fainelli:
>
>
> On 5/4/2022 2:43 PM, Stefan Wahren wrote:
>> 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@i2se.com>
>> since there wasn't any feedback yet, i want to ping ...
>
> Could not we just rely on the VPU patching the Device Tree instead of 
> having to differentiate the 2711 revision and having to use different 
> DTS/DTBs?
As long as every bootloader in the boot chain take care everything is 
fine. The problem is the VPU firmware is closed source, so only a few 
people knows about the hardware differences. So the idea was to make it 
more transparent and yes i'm also not happy with this patch.
>
> Also, can we consider that the older B0 are less predominant in the 
> wild than the C0 nowadays, especially with the shortages going on is 
> that even remotely the case?
So your idea is to make C0 the default and let the firmware patch the B0 
part? I must confess that i never tested this.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-19 18:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13 16:27 [PATCH RFC] ARM: dts: bcm2711: Fix DMA constrains for newer BCM2711 boards Stefan Wahren
2022-04-13 16:27 ` 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

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.