linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support
@ 2021-08-07 11:06 Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 01/10] ARM: dts: bcm2711: fix MDIO #address- and #size-cells Stefan Wahren
                   ` (11 more replies)
  0 siblings, 12 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

This series add support for the Raspberry Pi Compute Module 4 and its
IO board.

Changes in V2:
- drop emmc2bus patch as it affects userspace (thanks to Marc Zyngier)
- tested with CM4 and integrate sdhci patches from Nicolas (just include kHz fixups)
- add Rob's Acked-by
- add HS200 property to emmc2 node for a slight performance gain
- move antenna comment to the proper position

Nicolas Saenz Julienne (2):
  mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711

Stefan Wahren (8):
  ARM: dts: bcm2711: fix MDIO #address- and #size-cells
  ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states
  dt-bindings: display: bcm2835: add optional property power-domains
  ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi
  dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4
  ARM: dts: Add Raspberry Pi Compute Module 4
  ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
  arm64: dts: broadcom: Add reference to RPi CM4 IO Board

 .../devicetree/bindings/arm/bcm/bcm2835.yaml       |   1 +
 .../bindings/display/brcm,bcm2835-dsi0.yaml        |   3 +
 .../bindings/display/brcm,bcm2835-hdmi.yaml        |   3 +
 .../bindings/display/brcm,bcm2835-v3d.yaml         |   3 +
 .../bindings/display/brcm,bcm2835-vec.yaml         |   3 +
 arch/arm/boot/dts/Makefile                         |   1 +
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts              |  42 ++-----
 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts           | 138 +++++++++++++++++++++
 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi             | 113 +++++++++++++++++
 arch/arm/boot/dts/bcm2711.dtsi                     |   4 +-
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts           |  31 ++---
 arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts         |  36 ++----
 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts         |  36 ++----
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts              |  36 ++----
 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi         |  34 +++++
 arch/arm64/boot/dts/broadcom/Makefile              |   1 +
 .../arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts |   2 +
 drivers/mmc/host/sdhci-iproc.c                     |  21 +++-
 18 files changed, 366 insertions(+), 142 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
 create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi
 create mode 100644 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi
 create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts

-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 01/10] ARM: dts: bcm2711: fix MDIO #address- and #size-cells
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 02/10] ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states Stefan Wahren
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

The values of #address-cells and #size-cells are swapped. Fix this
and avoid the following DT schema warnings for mdio@e14:

 #address-cells:0:0: 1 was expected
 #size-cells:0:0: 0 was expected

Fixes: be8af7a9e3cc ("ARM: dts: bcm2711-rpi-4: Enable GENET support")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2711.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index b8a4096..a0db9b0 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -532,8 +532,8 @@
 				compatible = "brcm,genet-mdio-v5";
 				reg = <0xe14 0x8>;
 				reg-names = "mdio";
-				#address-cells = <0x0>;
-				#size-cells = <0x1>;
+				#address-cells = <0x1>;
+				#size-cells = <0x0>;
 			};
 		};
 	};
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 02/10] ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 01/10] ARM: dts: bcm2711: fix MDIO #address- and #size-cells Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 03/10] dt-bindings: display: bcm2835: add optional property power-domains Stefan Wahren
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

DT schema check complains at sd_io_1v8_reg about the following:

 [1800000, 1, 3300000, 0] is too long
 Additional items are not allowed (3300000, 0 were unexpected)

So fix the states definition.

Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index f24bdd0..abf8298 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -40,8 +40,8 @@
 		regulator-always-on;
 		regulator-settling-time-us = <5000>;
 		gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
-		states = <1800000 0x1
-			  3300000 0x0>;
+		states = <1800000 0x1>,
+			 <3300000 0x0>;
 		status = "okay";
 	};
 
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 03/10] dt-bindings: display: bcm2835: add optional property power-domains
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 01/10] ARM: dts: bcm2711: fix MDIO #address- and #size-cells Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 02/10] ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Stefan Wahren
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

The Raspberry Pi boards with BCM283x needs control of the power domains
to get display components running. DT schema warns us that it's used, but not
documented as a optional property:

hdmi@7e902000: 'power-domains' does not match any of the regexes: ...

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 3 +++
 Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 3 +++
 Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml  | 3 +++
 Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml  | 3 +++
 4 files changed, 12 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
index 3260857..c8b2459 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
@@ -47,6 +47,9 @@ properties:
   interrupts:
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
 required:
   - "#clock-cells"
   - compatible
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
index 031e35e..48c8cad 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
@@ -51,6 +51,9 @@ properties:
   dma-names:
     const: audio-rx
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
index 8a73780..c55a821 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
@@ -24,6 +24,9 @@ properties:
   interrupts:
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
index 9b24081..5d921e3 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
@@ -24,6 +24,9 @@ properties:
   interrupts:
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
 required:
   - compatible
   - reg
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (2 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 03/10] dt-bindings: display: bcm2835: add optional property power-domains Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-16 13:59   ` Ulf Hansson
  2021-08-07 11:06 ` [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Stefan Wahren
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenz@kernel.org>

There is a known bug on BCM2711's SDHCI core integration where the
controller will hang when the difference between the core clock and the
bus clock is too great. Specifically this can be reproduced under the
following conditions:

- No SD card plugged in, polling thread is running, probing cards at
  100 kHz.
- BCM2711's core clock configured at 500MHz or more.

So set 200 kHz as the minimum clock frequency available for that board.

For more information on the issue see this:
https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index cce390f..032bf85 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host)
 		return pltfm_host->clock;
 }
 
+/*
+ * There is a known bug on BCM2711's SDHCI core integration where the
+ * controller will hang when the difference between the core clock and the bus
+ * clock is too great. Specifically this can be reproduced under the following
+ * conditions:
+ *
+ *  - No SD card plugged in, polling thread is running, probing cards at
+ *    100 kHz.
+ *  - BCM2711's core clock configured at 500MHz or more
+ *
+ * So we set 200kHz as the minimum clock frequency available for that SoC.
+ */
+static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host)
+{
+	return 200000;
+}
+
 static const struct sdhci_ops sdhci_iproc_ops = {
 	.set_clock = sdhci_set_clock,
 	.get_max_clock = sdhci_iproc_get_max_clock,
@@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
 	.set_clock = sdhci_set_clock,
 	.set_power = sdhci_set_power_and_bus_voltage,
 	.get_max_clock = sdhci_iproc_get_max_clock,
+	.get_min_clock = sdhci_iproc_bcm2711_get_min_clock,
 	.set_bus_width = sdhci_set_bus_width,
 	.reset = sdhci_reset,
 	.set_uhs_signaling = sdhci_set_uhs_signaling,
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (3 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-16 13:59   ` Ulf Hansson
  2021-08-26  6:36   ` Jeremy Linton
  2021-08-07 11:06 ` [PATCH V2 06/10] ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi Stefan Wahren
                   ` (6 subsequent siblings)
  11 siblings, 2 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

From: Nicolas Saenz Julienne <nsaenz@kernel.org>

The controller doesn't seem to pick-up on clock changes, so set the
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
directly from the clock.

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mmc/host/sdhci-iproc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
index 032bf85..e7565c6 100644
--- a/drivers/mmc/host/sdhci-iproc.c
+++ b/drivers/mmc/host/sdhci-iproc.c
@@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
 };
 
 static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
-	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
+	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
+		  SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
 	.ops = &sdhci_iproc_bcm2711_ops,
 };
 
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 06/10] ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (4 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 07/10] dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4 Stefan Wahren
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

A Wifi/BT chip is quite common for the Raspberry Pi boards. So move those
definitions into a separate dtsi in order to avoid copy & paste. This
change was inspired by a vendor tree patch from Phil Elwell.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2711-rpi-4-b.dts      | 38 +++++++-----------------------
 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts   | 31 +++++++-----------------
 arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 36 ++++++----------------------
 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 36 +++++++---------------------
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts      | 36 +++++++---------------------
 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi | 34 ++++++++++++++++++++++++++
 6 files changed, 74 insertions(+), 137 deletions(-)
 create mode 100644 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi

diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index abf8298..c54ba5cf 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -3,6 +3,7 @@
 #include "bcm2711.dtsi"
 #include "bcm2711-rpi.dtsi"
 #include "bcm283x-rpi-usb-peripheral.dtsi"
+#include "bcm283x-rpi-wifi-bt.dtsi"
 
 / {
 	compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
@@ -26,11 +27,6 @@
 		};
 	};
 
-	wifi_pwrseq: wifi-pwrseq {
-		compatible = "mmc-pwrseq-simple";
-		reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
-	};
-
 	sd_io_1v8_reg: sd_io_1v8_reg {
 		compatible = "regulator-gpio";
 		regulator-name = "vdd-sd-io";
@@ -56,6 +52,10 @@
 	};
 };
 
+&bt {
+	shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
+};
+
 &ddc0 {
 	status = "okay";
 };
@@ -178,23 +178,6 @@
 	status = "okay";
 };
 
-/* SDHCI is used to control the SDIO for wireless */
-&sdhci {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	bus-width = <4>;
-	non-removable;
-	mmc-pwrseq = <&wifi_pwrseq>;
-	status = "okay";
-
-	brcmf: wifi@1 {
-		reg = <1>;
-		compatible = "brcm,bcm4329-fmac";
-	};
-};
-
 /* EMMC2 is used to drive the SD card */
 &emmc2 {
 	vqmmc-supply = <&sd_io_1v8_reg>;
@@ -236,13 +219,6 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
 	uart-has-rtscts;
-	status = "okay";
-
-	bluetooth {
-		compatible = "brcm,bcm43438-bt";
-		max-speed = <2000000>;
-		shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
-	};
 };
 
 /* uart1 is mapped to the pin header */
@@ -259,3 +235,7 @@
 &vec {
 	status = "disabled";
 };
+
+&wifi_pwrseq {
+	reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
index 33b2b77..243236b 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
@@ -7,6 +7,7 @@
 #include "bcm2835.dtsi"
 #include "bcm2835-rpi.dtsi"
 #include "bcm283x-rpi-usb-otg.dtsi"
+#include "bcm283x-rpi-wifi-bt.dtsi"
 
 / {
 	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
@@ -27,11 +28,10 @@
 			gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
 		};
 	};
+};
 
-	wifi_pwrseq: wifi-pwrseq {
-		compatible = "mmc-pwrseq-simple";
-		reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
-	};
+&bt {
+	shutdown-gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
 };
 
 &gpio {
@@ -110,19 +110,7 @@
 };
 
 &sdhci {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
 	pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
-	bus-width = <4>;
-	mmc-pwrseq = <&wifi_pwrseq>;
-	non-removable;
-	status = "okay";
-
-	brcmf: wifi@1 {
-		reg = <1>;
-		compatible = "brcm,bcm4329-fmac";
-	};
 };
 
 &sdhost {
@@ -135,13 +123,6 @@
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_gpio32 &uart0_ctsrts_gpio30>;
-	status = "okay";
-
-	bluetooth {
-		compatible = "brcm,bcm43438-bt";
-		max-speed = <2000000>;
-		shutdown-gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
-	};
 };
 
 &uart1 {
@@ -149,3 +130,7 @@
 	pinctrl-0 = <&uart1_gpio14>;
 	status = "okay";
 };
+
+&wifi_pwrseq {
+	reset-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
index 77099a7..d73daf5 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
@@ -3,6 +3,7 @@
 #include "bcm2837.dtsi"
 #include "bcm2836-rpi.dtsi"
 #include "bcm283x-rpi-usb-host.dtsi"
+#include "bcm283x-rpi-wifi-bt.dtsi"
 
 / {
 	compatible = "raspberrypi,3-model-a-plus", "brcm,bcm2837";
@@ -130,28 +131,6 @@
 	status = "okay";
 };
 
-/*
- * SDHCI is used to control the SDIO for wireless
- *
- * WL_REG_ON and BT_REG_ON of the CYW43455 Wifi/BT module are driven
- * by a single GPIO. We can't give GPIO control to one of the drivers,
- * otherwise the other part would get unexpectedly disturbed.
- */
-&sdhci {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	status = "okay";
-	bus-width = <4>;
-	non-removable;
-
-	brcmf: wifi@1 {
-		reg = <1>;
-		compatible = "brcm,bcm4329-fmac";
-	};
-};
-
 /* SDHOST is used to drive the SD card */
 &sdhost {
 	pinctrl-names = "default";
@@ -160,16 +139,15 @@
 	bus-width = <4>;
 };
 
-/* uart0 communicates with the BT module */
+/* uart0 communicates with the BT module
+ *
+ * WL_REG_ON and BT_REG_ON of the CYW43455 Wifi/BT module are driven
+ * by a single GPIO. We can't give GPIO control to one of the drivers,
+ * otherwise the other part would get unexpectedly disturbed.
+ */
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>;
-	status = "okay";
-
-	bluetooth {
-		compatible = "brcm,bcm43438-bt";
-		max-speed = <2000000>;
-	};
 };
 
 /* uart1 is mapped to the pin header */
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
index 6101026..e12938b 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
@@ -4,6 +4,7 @@
 #include "bcm2836-rpi.dtsi"
 #include "bcm283x-rpi-lan7515.dtsi"
 #include "bcm283x-rpi-usb-host.dtsi"
+#include "bcm283x-rpi-wifi-bt.dtsi"
 
 / {
 	compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837";
@@ -31,11 +32,10 @@
 			linux,default-trigger = "default-on";
 		};
 	};
+};
 
-	wifi_pwrseq: wifi-pwrseq {
-		compatible = "mmc-pwrseq-simple";
-		reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
-	};
+&bt {
+	shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
 };
 
 &firmware {
@@ -137,23 +137,6 @@
 	status = "okay";
 };
 
-/* SDHCI is used to control the SDIO for wireless */
-&sdhci {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	status = "okay";
-	bus-width = <4>;
-	non-removable;
-	mmc-pwrseq = <&wifi_pwrseq>;
-
-	brcmf: wifi@1 {
-		reg = <1>;
-		compatible = "brcm,bcm4329-fmac";
-	};
-};
-
 /* SDHOST is used to drive the SD card */
 &sdhost {
 	pinctrl-names = "default";
@@ -166,13 +149,6 @@
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>;
-	status = "okay";
-
-	bluetooth {
-		compatible = "brcm,bcm43438-bt";
-		max-speed = <2000000>;
-		shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
-	};
 };
 
 /* uart1 is mapped to the pin header */
@@ -181,3 +157,7 @@
 	pinctrl-0 = <&uart1_gpio14>;
 	status = "okay";
 };
+
+&wifi_pwrseq {
+	reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index dd4a486..42b5383 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -4,6 +4,7 @@
 #include "bcm2836-rpi.dtsi"
 #include "bcm283x-rpi-smsc9514.dtsi"
 #include "bcm283x-rpi-usb-host.dtsi"
+#include "bcm283x-rpi-wifi-bt.dtsi"
 
 / {
 	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
@@ -24,11 +25,10 @@
 			gpios = <&expgpio 2 GPIO_ACTIVE_HIGH>;
 		};
 	};
+};
 
-	wifi_pwrseq: wifi-pwrseq {
-		compatible = "mmc-pwrseq-simple";
-		reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
-	};
+&bt {
+	shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
 };
 
 &firmware {
@@ -134,13 +134,6 @@
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
-	status = "okay";
-
-	bluetooth {
-		compatible = "brcm,bcm43438-bt";
-		max-speed = <2000000>;
-		shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
-	};
 };
 
 /* uart1 is mapped to the pin header */
@@ -150,23 +143,6 @@
 	status = "okay";
 };
 
-/* SDHCI is used to control the SDIO for wireless */
-&sdhci {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&emmc_gpio34>;
-	status = "okay";
-	bus-width = <4>;
-	non-removable;
-	mmc-pwrseq = <&wifi_pwrseq>;
-
-	brcmf: wifi@1 {
-		reg = <1>;
-		compatible = "brcm,bcm4329-fmac";
-	};
-};
-
 /* SDHOST is used to drive the SD card */
 &sdhost {
 	pinctrl-names = "default";
@@ -174,3 +150,7 @@
 	status = "okay";
 	bus-width = <4>;
 };
+
+&wifi_pwrseq {
+	reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+};
diff --git a/arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi b/arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi
new file mode 100644
index 0000000..0b64cc1
--- /dev/null
+++ b/arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/ {
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+	};
+};
+
+/* SDHCI is used to control the SDIO for wireless */
+&sdhci {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_gpio34>;
+	bus-width = <4>;
+	non-removable;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	status = "okay";
+
+	brcmf: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+	};
+};
+
+/* uart0 communicates with the BT module */
+&uart0 {
+	status = "okay";
+
+	bt: bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <2000000>;
+	};
+};
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 07/10] dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (5 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 06/10] ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 08/10] ARM: dts: " Stefan Wahren
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

Add the Raspberry Pi Compute Module 4 to DT schema.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
index 230b80d..5dc4824 100644
--- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
@@ -19,6 +19,7 @@ properties:
         items:
           - enum:
               - raspberrypi,400
+              - raspberrypi,4-compute-module
               - raspberrypi,4-model-b
           - const: brcm,bcm2711
 
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 08/10] ARM: dts: Add Raspberry Pi Compute Module 4
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (6 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 07/10] dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4 Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-07 11:06 ` [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board Stefan Wahren
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

The Raspberry Pi Compute Module 4 (CM4) are SoMs which contain the
following:
  * BCM2711 quad core processor
  * up to 8 GB RAM
  * up to 32 GB eMMC
  * a GPIO expander
  * Gigabit PHY BCM54210PE
  * Wifi/BT module with internal and external antenna

The eMMC and the Wifi/BT module are optional.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi | 113 +++++++++++++++++++++++++++++++++
 1 file changed, 113 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi

diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi b/arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi
new file mode 100644
index 0000000..a2954d4
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2711.dtsi"
+#include "bcm2711-rpi.dtsi"
+#include "bcm283x-rpi-wifi-bt.dtsi"
+
+/ {
+	compatible = "raspberrypi,4-compute-module", "brcm,bcm2711";
+
+	chosen {
+		/* 8250 auxiliary UART instead of pl011 */
+		stdout-path = "serial1:115200n8";
+	};
+
+	sd_io_1v8_reg: sd_io_1v8_reg {
+		compatible = "regulator-gpio";
+		regulator-name = "vdd-sd-io";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+		regulator-settling-time-us = <5000>;
+		gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
+		states = <1800000 0x1>,
+			 <3300000 0x0>;
+		status = "okay";
+	};
+
+	sd_vcc_reg: sd_vcc_reg {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-sd";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		enable-active-high;
+		gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&bt {
+	shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
+};
+
+/* EMMC2 is used to drive the eMMC */
+&emmc2 {
+	bus-width = <8>;
+	vqmmc-supply = <&sd_io_1v8_reg>;
+	vmmc-supply = <&sd_vcc_reg>;
+	broken-cd;
+	/* Even the IP block is limited to 100 MHz
+	 * this provides a throughput gain
+	 */
+	mmc-hs200-1_8v;
+	status = "okay";
+};
+
+&expgpio {
+	gpio-line-names = "BT_ON",
+			  "WL_ON",
+			  "PWR_LED_OFF",
+			  "ANT1",
+			  "VDD_SD_IO_SEL",
+			  "CAM_GPIO",
+			  "SD_PWR_ON",
+			  "ANT2";
+
+	ant1: ant1-hog {
+		gpio-hog;
+		gpios = <3 GPIO_ACTIVE_HIGH>;
+		/* internal antenna enabled */
+		output-high;
+		line-name = "ant1";
+	};
+
+	ant2: ant2-hog {
+		gpio-hog;
+		gpios = <7 GPIO_ACTIVE_HIGH>;
+		/* external antenna disabled */
+		output-low;
+		line-name = "ant2";
+	};
+};
+
+&genet {
+	phy-handle = <&phy1>;
+	phy-mode = "rgmii-rxid";
+	status = "okay";
+};
+
+&genet_mdio {
+	phy1: ethernet-phy@0 {
+		/* No PHY interrupt */
+		reg = <0x0>;
+	};
+};
+
+/* uart0 communicates with the BT module */
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
+	uart-has-rtscts;
+};
+
+/* uart1 is mapped to the pin header */
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_gpio14>;
+	status = "okay";
+};
+
+&wifi_pwrseq {
+	reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+};
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (7 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 08/10] ARM: dts: " Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-09-04 14:52   ` nicolas saenz julienne
  2021-08-07 11:06 ` [PATCH V2 10/10] arm64: dts: broadcom: Add reference to RPi CM4 " Stefan Wahren
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

This adds the matching carrier for Raspberry Pi Compute Module 4.
Instead of xHCI USB host controller there is just a USB 2.0 interface
connected to the DWC2 controller from the BCM2711. As a result
there is a free PCIe Gen 2 socket. Also there are 2 full-size HDMI 2.0
connectors.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm/boot/dts/Makefile               |   1 +
 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts | 138 +++++++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 863347b..d3f25b9 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -90,6 +90,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
 	bcm2837-rpi-cm3-io3.dtb \
 	bcm2711-rpi-400.dtb \
 	bcm2711-rpi-4-b.dtb \
+	bcm2711-rpi-cm4-io.dtb \
 	bcm2835-rpi-zero.dtb \
 	bcm2835-rpi-zero-w.dtb
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
new file mode 100644
index 0000000..19600b6
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2711-rpi-cm4.dtsi"
+#include "bcm283x-rpi-usb-host.dtsi"
+
+/ {
+	model = "Raspberry Pi Compute Module 4 IO Board";
+
+	leds {
+		led-act {
+			gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-pwr {
+			label = "PWR";
+			gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
+			default-state = "keep";
+			linux,default-trigger = "default-on";
+		};
+	};
+};
+
+&ddc0 {
+	status = "okay";
+};
+
+&ddc1 {
+	status = "okay";
+};
+
+&gpio {
+	/*
+	 * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
+	 * the official GPU firmware DT blob.
+	 *
+	 * Legend:
+	 * "FOO" = GPIO line named "FOO" on the schematic
+	 * "FOO_N" = GPIO line named "FOO" on schematic, active low
+	 */
+	gpio-line-names = "ID_SDA",
+			  "ID_SCL",
+			  "SDA1",
+			  "SCL1",
+			  "GPIO_GCLK",
+			  "GPIO5",
+			  "GPIO6",
+			  "SPI_CE1_N",
+			  "SPI_CE0_N",
+			  "SPI_MISO",
+			  "SPI_MOSI",
+			  "SPI_SCLK",
+			  "GPIO12",
+			  "GPIO13",
+			  /* Serial port */
+			  "TXD1",
+			  "RXD1",
+			  "GPIO16",
+			  "GPIO17",
+			  "GPIO18",
+			  "GPIO19",
+			  "GPIO20",
+			  "GPIO21",
+			  "GPIO22",
+			  "GPIO23",
+			  "GPIO24",
+			  "GPIO25",
+			  "GPIO26",
+			  "GPIO27",
+			  "RGMII_MDIO",
+			  "RGMIO_MDC",
+			  /* Used by BT module */
+			  "CTS0",
+			  "RTS0",
+			  "TXD0",
+			  "RXD0",
+			  /* Used by Wifi */
+			  "SD1_CLK",
+			  "SD1_CMD",
+			  "SD1_DATA0",
+			  "SD1_DATA1",
+			  "SD1_DATA2",
+			  "SD1_DATA3",
+			  /* Shared with SPI flash */
+			  "PWM0_MISO",
+			  "PWM1_MOSI",
+			  "STATUS_LED_G_CLK",
+			  "SPIFLASH_CE_N",
+			  "SDA0",
+			  "SCL0",
+			  "RGMII_RXCLK",
+			  "RGMII_RXCTL",
+			  "RGMII_RXD0",
+			  "RGMII_RXD1",
+			  "RGMII_RXD2",
+			  "RGMII_RXD3",
+			  "RGMII_TXCLK",
+			  "RGMII_TXCTL",
+			  "RGMII_TXD0",
+			  "RGMII_TXD1",
+			  "RGMII_TXD2",
+			  "RGMII_TXD3";
+};
+
+&hdmi0 {
+	status = "okay";
+};
+
+&hdmi1 {
+	status = "okay";
+};
+
+&genet {
+	status = "okay";
+};
+
+&pixelvalve0 {
+	status = "okay";
+};
+
+&pixelvalve1 {
+	status = "okay";
+};
+
+&pixelvalve2 {
+	status = "okay";
+};
+
+&pixelvalve4 {
+	status = "okay";
+};
+
+&vc4 {
+	status = "okay";
+};
+
+&vec {
+	status = "disabled";
+};
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* [PATCH V2 10/10] arm64: dts: broadcom: Add reference to RPi CM4 IO Board
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (8 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board Stefan Wahren
@ 2021-08-07 11:06 ` Stefan Wahren
  2021-08-22 10:31 ` [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Florian Fainelli
  2021-09-04 14:45 ` nicolas saenz julienne
  11 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-08-07 11:06 UTC (permalink / raw)
  To: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel, Stefan Wahren

This adds a reference to the dts of the Raspberry Pi Compute Module 4
IO Board, so we don't need to maintain the content in arm64.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 arch/arm64/boot/dts/broadcom/Makefile               | 1 +
 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts | 2 ++
 2 files changed, 3 insertions(+)
 create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts

diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index 11eae3e..c688203 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2711-rpi-4-b.dtb \
+			      bcm2711-rpi-cm4-io.dtb \
 			      bcm2837-rpi-3-a-plus.dtb \
 			      bcm2837-rpi-3-b.dtb \
 			      bcm2837-rpi-3-b-plus.dtb \
diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
new file mode 100644
index 0000000..e36d395
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "arm/bcm2711-rpi-cm4-io.dts"
-- 
2.7.4


_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711
  2021-08-07 11:06 ` [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Stefan Wahren
@ 2021-08-16 13:59   ` Ulf Hansson
  0 siblings, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2021-08-16 13:59 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ray Jui, Scott Branden, BCM Kernel Feedback,
	Maxime Ripard, iivanov, DTML, moderated list:BROADCOM BCM2835...,
	linux-mmc, Linux ARM

On Sat, 7 Aug 2021 at 13:07, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> From: Nicolas Saenz Julienne <nsaenz@kernel.org>
>
> There is a known bug on BCM2711's SDHCI core integration where the
> controller will hang when the difference between the core clock and the
> bus clock is too great. Specifically this can be reproduced under the
> following conditions:
>
> - No SD card plugged in, polling thread is running, probing cards at
>   100 kHz.
> - BCM2711's core clock configured at 500MHz or more.
>
> So set 200 kHz as the minimum clock frequency available for that board.
>
> For more information on the issue see this:
> https://lore.kernel.org/linux-mmc/20210322185816.27582-1-nsaenz@kernel.org/T/#m11f2783a09b581da6b8a15f302625b43a6ecdeca
>
> Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-iproc.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index cce390f..032bf85 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -173,6 +173,23 @@ static unsigned int sdhci_iproc_get_max_clock(struct sdhci_host *host)
>                 return pltfm_host->clock;
>  }
>
> +/*
> + * There is a known bug on BCM2711's SDHCI core integration where the
> + * controller will hang when the difference between the core clock and the bus
> + * clock is too great. Specifically this can be reproduced under the following
> + * conditions:
> + *
> + *  - No SD card plugged in, polling thread is running, probing cards at
> + *    100 kHz.
> + *  - BCM2711's core clock configured at 500MHz or more
> + *
> + * So we set 200kHz as the minimum clock frequency available for that SoC.
> + */
> +static unsigned int sdhci_iproc_bcm2711_get_min_clock(struct sdhci_host *host)
> +{
> +       return 200000;
> +}
> +
>  static const struct sdhci_ops sdhci_iproc_ops = {
>         .set_clock = sdhci_set_clock,
>         .get_max_clock = sdhci_iproc_get_max_clock,
> @@ -271,6 +288,7 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
>         .set_clock = sdhci_set_clock,
>         .set_power = sdhci_set_power_and_bus_voltage,
>         .get_max_clock = sdhci_iproc_get_max_clock,
> +       .get_min_clock = sdhci_iproc_bcm2711_get_min_clock,
>         .set_bus_width = sdhci_set_bus_width,
>         .reset = sdhci_reset,
>         .set_uhs_signaling = sdhci_set_uhs_signaling,
> --
> 2.7.4
>

_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-08-07 11:06 ` [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Stefan Wahren
@ 2021-08-16 13:59   ` Ulf Hansson
  2021-08-26  6:36   ` Jeremy Linton
  1 sibling, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2021-08-16 13:59 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ray Jui, Scott Branden, BCM Kernel Feedback,
	Maxime Ripard, iivanov, DTML, moderated list:BROADCOM BCM2835...,
	linux-mmc, Linux ARM

On Sat, 7 Aug 2021 at 13:07, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> From: Nicolas Saenz Julienne <nsaenz@kernel.org>
>
> The controller doesn't seem to pick-up on clock changes, so set the
> SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
> directly from the clock.
>
> Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-iproc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 032bf85..e7565c6 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
>  };
>
>  static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
> -       .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> +       .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
> +                 SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>         .ops = &sdhci_iproc_bcm2711_ops,
>  };
>
> --
> 2.7.4
>

_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (9 preceding siblings ...)
  2021-08-07 11:06 ` [PATCH V2 10/10] arm64: dts: broadcom: Add reference to RPi CM4 " Stefan Wahren
@ 2021-08-22 10:31 ` Florian Fainelli
  2021-08-30  8:46   ` nicolas saenz julienne
  2021-09-04 14:45 ` nicolas saenz julienne
  11 siblings, 1 reply; 22+ messages in thread
From: Florian Fainelli @ 2021-08-22 10:31 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Nicolas Saenz Julienne,
	Florian Fainelli, Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel



On 8/7/2021 1:06 PM, Stefan Wahren wrote:
> This series add support for the Raspberry Pi Compute Module 4 and its
> IO board.
> 
> Changes in V2:
> - drop emmc2bus patch as it affects userspace (thanks to Marc Zyngier)
> - tested with CM4 and integrate sdhci patches from Nicolas (just include kHz fixups)
> - add Rob's Acked-by
> - add HS200 property to emmc2 node for a slight performance gain
> - move antenna comment to the proper position

Nicolas, I am assuming you will be picking up these patches and submit a 
BCM283x pull request with them. Thanks!

> 
> Nicolas Saenz Julienne (2):
>    mmc: sdhci-iproc: Cap min clock frequency on BCM2711
>    mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
> 
> Stefan Wahren (8):
>    ARM: dts: bcm2711: fix MDIO #address- and #size-cells
>    ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states
>    dt-bindings: display: bcm2835: add optional property power-domains
>    ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi
>    dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4
>    ARM: dts: Add Raspberry Pi Compute Module 4
>    ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
>    arm64: dts: broadcom: Add reference to RPi CM4 IO Board
> 
>   .../devicetree/bindings/arm/bcm/bcm2835.yaml       |   1 +
>   .../bindings/display/brcm,bcm2835-dsi0.yaml        |   3 +
>   .../bindings/display/brcm,bcm2835-hdmi.yaml        |   3 +
>   .../bindings/display/brcm,bcm2835-v3d.yaml         |   3 +
>   .../bindings/display/brcm,bcm2835-vec.yaml         |   3 +
>   arch/arm/boot/dts/Makefile                         |   1 +
>   arch/arm/boot/dts/bcm2711-rpi-4-b.dts              |  42 ++-----
>   arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts           | 138 +++++++++++++++++++++
>   arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi             | 113 +++++++++++++++++
>   arch/arm/boot/dts/bcm2711.dtsi                     |   4 +-
>   arch/arm/boot/dts/bcm2835-rpi-zero-w.dts           |  31 ++---
>   arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts         |  36 ++----
>   arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts         |  36 ++----
>   arch/arm/boot/dts/bcm2837-rpi-3-b.dts              |  36 ++----
>   arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi         |  34 +++++
>   arch/arm64/boot/dts/broadcom/Makefile              |   1 +
>   .../arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts |   2 +
>   drivers/mmc/host/sdhci-iproc.c                     |  21 +++-
>   18 files changed, 366 insertions(+), 142 deletions(-)
>   create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
>   create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi
>   create mode 100644 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi
>   create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> 

-- 
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] 22+ messages in thread

* Re: [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-08-07 11:06 ` [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Stefan Wahren
  2021-08-16 13:59   ` Ulf Hansson
@ 2021-08-26  6:36   ` Jeremy Linton
  2021-08-26  9:22     ` Ulf Hansson
  1 sibling, 1 reply; 22+ messages in thread
From: Jeremy Linton @ 2021-08-26  6:36 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Nicolas Saenz Julienne,
	Florian Fainelli, Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel

Hi,


On 8/7/21 6:06 AM, Stefan Wahren wrote:
> From: Nicolas Saenz Julienne <nsaenz@kernel.org>
> 
> The controller doesn't seem to pick-up on clock changes, so set the
> SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
> directly from the clock.
> 
> Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>   drivers/mmc/host/sdhci-iproc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> index 032bf85..e7565c6 100644
> --- a/drivers/mmc/host/sdhci-iproc.c
> +++ b/drivers/mmc/host/sdhci-iproc.c
> @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
>   };
>   
>   static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
> -	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> +	.quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
> +		  SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>   	.ops = &sdhci_iproc_bcm2711_ops,
>   };

I just noticed that this got merged to rc7, and it breaks the ACPI based 
rpi's because it causes the 100Mhz max clock to be overridden to the 
return from sdhci_iproc_get_max_clock() which is 0 because there isn't a 
OF/DT based clock device.



_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-08-26  6:36   ` Jeremy Linton
@ 2021-08-26  9:22     ` Ulf Hansson
  2021-08-26 11:18       ` Stefan Wahren
  0 siblings, 1 reply; 22+ messages in thread
From: Ulf Hansson @ 2021-08-26  9:22 UTC (permalink / raw)
  To: Jeremy Linton
  Cc: Stefan Wahren, Rob Herring, Nicolas Saenz Julienne,
	Florian Fainelli, Adrian Hunter, Ray Jui, Scott Branden,
	BCM Kernel Feedback, Maxime Ripard, iivanov, DTML,
	moderated list:BROADCOM BCM2835...,
	linux-mmc, Linux ARM

On Thu, 26 Aug 2021 at 08:36, Jeremy Linton <jeremy.linton@arm.com> wrote:
>
> Hi,
>
>
> On 8/7/21 6:06 AM, Stefan Wahren wrote:
> > From: Nicolas Saenz Julienne <nsaenz@kernel.org>
> >
> > The controller doesn't seem to pick-up on clock changes, so set the
> > SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
> > directly from the clock.
> >
> > Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> > Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > ---
> >   drivers/mmc/host/sdhci-iproc.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> > index 032bf85..e7565c6 100644
> > --- a/drivers/mmc/host/sdhci-iproc.c
> > +++ b/drivers/mmc/host/sdhci-iproc.c
> > @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
> >   };
> >
> >   static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
> > -     .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> > +     .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
> > +               SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> >       .ops = &sdhci_iproc_bcm2711_ops,
> >   };
>
> I just noticed that this got merged to rc7, and it breaks the ACPI based
> rpi's because it causes the 100Mhz max clock to be overridden to the
> return from sdhci_iproc_get_max_clock() which is 0 because there isn't a
> OF/DT based clock device.

Thanks for reporting! I allow Stefan to respond in a day or two,
before I do a revert of it.

Kind regards
Uffe

_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-08-26  9:22     ` Ulf Hansson
@ 2021-08-26 11:18       ` Stefan Wahren
  2021-08-27 14:44         ` Ulf Hansson
  0 siblings, 1 reply; 22+ messages in thread
From: Stefan Wahren @ 2021-08-26 11:18 UTC (permalink / raw)
  To: Ulf Hansson, Jeremy Linton
  Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ray Jui, Scott Branden, BCM Kernel Feedback,
	Maxime Ripard, iivanov, DTML, moderated list:BROADCOM BCM2835...,
	linux-mmc, Linux ARM

Am 26.08.21 um 11:22 schrieb Ulf Hansson:
> On Thu, 26 Aug 2021 at 08:36, Jeremy Linton <jeremy.linton@arm.com> wrote:
>> Hi,
>>
>>
>> On 8/7/21 6:06 AM, Stefan Wahren wrote:
>>> From: Nicolas Saenz Julienne <nsaenz@kernel.org>
>>>
>>> The controller doesn't seem to pick-up on clock changes, so set the
>>> SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
>>> directly from the clock.
>>>
>>> Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
>>> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
>>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>>> ---
>>>   drivers/mmc/host/sdhci-iproc.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
>>> index 032bf85..e7565c6 100644
>>> --- a/drivers/mmc/host/sdhci-iproc.c
>>> +++ b/drivers/mmc/host/sdhci-iproc.c
>>> @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
>>>   };
>>>
>>>   static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
>>> -     .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
>>> +     .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
>>> +               SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
>>>       .ops = &sdhci_iproc_bcm2711_ops,
>>>   };
>> I just noticed that this got merged to rc7, and it breaks the ACPI based
>> rpi's because it causes the 100Mhz max clock to be overridden to the
>> return from sdhci_iproc_get_max_clock() which is 0 because there isn't a
>> OF/DT based clock device.
> Thanks for reporting! I allow Stefan to respond in a day or two,
> before I do a revert of it.

I'm fine with a revert.

Thanks

>
> Kind regards
> Uffe

_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
  2021-08-26 11:18       ` Stefan Wahren
@ 2021-08-27 14:44         ` Ulf Hansson
  0 siblings, 0 replies; 22+ messages in thread
From: Ulf Hansson @ 2021-08-27 14:44 UTC (permalink / raw)
  To: Stefan Wahren, Jeremy Linton
  Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli,
	Adrian Hunter, Ray Jui, Scott Branden, BCM Kernel Feedback,
	Maxime Ripard, iivanov, DTML, moderated list:BROADCOM BCM2835...,
	linux-mmc, Linux ARM

On Thu, 26 Aug 2021 at 13:18, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Am 26.08.21 um 11:22 schrieb Ulf Hansson:
> > On Thu, 26 Aug 2021 at 08:36, Jeremy Linton <jeremy.linton@arm.com> wrote:
> >> Hi,
> >>
> >>
> >> On 8/7/21 6:06 AM, Stefan Wahren wrote:
> >>> From: Nicolas Saenz Julienne <nsaenz@kernel.org>
> >>>
> >>> The controller doesn't seem to pick-up on clock changes, so set the
> >>> SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
> >>> directly from the clock.
> >>>
> >>> Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
> >>> Signed-off-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> >>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> >>> ---
> >>>   drivers/mmc/host/sdhci-iproc.c | 3 ++-
> >>>   1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c
> >>> index 032bf85..e7565c6 100644
> >>> --- a/drivers/mmc/host/sdhci-iproc.c
> >>> +++ b/drivers/mmc/host/sdhci-iproc.c
> >>> @@ -295,7 +295,8 @@ static const struct sdhci_ops sdhci_iproc_bcm2711_ops = {
> >>>   };
> >>>
> >>>   static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = {
> >>> -     .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12,
> >>> +     .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 |
> >>> +               SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
> >>>       .ops = &sdhci_iproc_bcm2711_ops,
> >>>   };
> >> I just noticed that this got merged to rc7, and it breaks the ACPI based
> >> rpi's because it causes the 100Mhz max clock to be overridden to the
> >> return from sdhci_iproc_get_max_clock() which is 0 because there isn't a
> >> OF/DT based clock device.
> > Thanks for reporting! I allow Stefan to respond in a day or two,
> > before I do a revert of it.
>
> I'm fine with a revert.
>
> Thanks

Patch reverted and applied for fixes, thanks!

Kind regards
Uffe

_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support
  2021-08-22 10:31 ` [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Florian Fainelli
@ 2021-08-30  8:46   ` nicolas saenz julienne
  0 siblings, 0 replies; 22+ messages in thread
From: nicolas saenz julienne @ 2021-08-30  8:46 UTC (permalink / raw)
  To: Florian Fainelli, Stefan Wahren, Rob Herring, Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel

Hi Florian,

On Sun, 2021-08-22 at 12:31 +0200, Florian Fainelli wrote:
> 
> On 8/7/2021 1:06 PM, Stefan Wahren wrote:
> > This series add support for the Raspberry Pi Compute Module 4 and its
> > IO board.
> > 
> > Changes in V2:
> > - drop emmc2bus patch as it affects userspace (thanks to Marc Zyngier)
> > - tested with CM4 and integrate sdhci patches from Nicolas (just include kHz fixups)
> > - add Rob's Acked-by
> > - add HS200 property to emmc2 node for a slight performance gain
> > - move antenna comment to the proper position
> 
> Nicolas, I am assuming you will be picking up these patches and submit a 
> BCM283x pull request with them. Thanks!

Yes, sorry for the late replies. I'm just back from vacation.

Regards,
Nicolas


_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support
  2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
                   ` (10 preceding siblings ...)
  2021-08-22 10:31 ` [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Florian Fainelli
@ 2021-09-04 14:45 ` nicolas saenz julienne
  11 siblings, 0 replies; 22+ messages in thread
From: nicolas saenz julienne @ 2021-09-04 14:45 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Florian Fainelli, Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel

Hi Stefan,

On Sat, 2021-08-07 at 13:06 +0200, Stefan Wahren wrote:
> This series add support for the Raspberry Pi Compute Module 4 and its
> IO board.

Sorry for the late review. I finally got some time to review/test this
properly. The devicetree patches look really good, dtbs_check's shows no new
errors, and all peripherals work. The only thing I can't verify is PCIe as I
have nothing to plug into it, but it should work.

I'll apply the series (modulo the mmc patches) for-next soon.

Thanks!

> Changes in V2:
> - drop emmc2bus patch as it affects userspace (thanks to Marc Zyngier)
> - tested with CM4 and integrate sdhci patches from Nicolas (just include kHz fixups)
> - add Rob's Acked-by
> - add HS200 property to emmc2 node for a slight performance gain
> - move antenna comment to the proper position
> 
> Nicolas Saenz Julienne (2):
>   mmc: sdhci-iproc: Cap min clock frequency on BCM2711
>   mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
> 
> Stefan Wahren (8):
>   ARM: dts: bcm2711: fix MDIO #address- and #size-cells
>   ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states
>   dt-bindings: display: bcm2835: add optional property power-domains
>   ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi
>   dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4
>   ARM: dts: Add Raspberry Pi Compute Module 4
>   ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
>   arm64: dts: broadcom: Add reference to RPi CM4 IO Board
> 
>  .../devicetree/bindings/arm/bcm/bcm2835.yaml       |   1 +
>  .../bindings/display/brcm,bcm2835-dsi0.yaml        |   3 +
>  .../bindings/display/brcm,bcm2835-hdmi.yaml        |   3 +
>  .../bindings/display/brcm,bcm2835-v3d.yaml         |   3 +
>  .../bindings/display/brcm,bcm2835-vec.yaml         |   3 +
>  arch/arm/boot/dts/Makefile                         |   1 +
>  arch/arm/boot/dts/bcm2711-rpi-4-b.dts              |  42 ++-----
>  arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts           | 138 +++++++++++++++++++++
>  arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi             | 113 +++++++++++++++++
>  arch/arm/boot/dts/bcm2711.dtsi                     |   4 +-
>  arch/arm/boot/dts/bcm2835-rpi-zero-w.dts           |  31 ++---
>  arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts         |  36 ++----
>  arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts         |  36 ++----
>  arch/arm/boot/dts/bcm2837-rpi-3-b.dts              |  36 ++----
>  arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi         |  34 +++++
>  arch/arm64/boot/dts/broadcom/Makefile              |   1 +
>  .../arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts |   2 +
>  drivers/mmc/host/sdhci-iproc.c                     |  21 +++-
>  18 files changed, 366 insertions(+), 142 deletions(-)
>  create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-io.dts
>  create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4.dtsi
>  create mode 100644 arch/arm/boot/dts/bcm283x-rpi-wifi-bt.dtsi
>  create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-io.dts
> 



_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
  2021-08-07 11:06 ` [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board Stefan Wahren
@ 2021-09-04 14:52   ` nicolas saenz julienne
  2021-09-05 10:33     ` Stefan Wahren
  0 siblings, 1 reply; 22+ messages in thread
From: nicolas saenz julienne @ 2021-09-04 14:52 UTC (permalink / raw)
  To: Stefan Wahren, Rob Herring, Florian Fainelli, Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel

On Sat, 2021-08-07 at 13:06 +0200, Stefan Wahren wrote:
> This adds the matching carrier for Raspberry Pi Compute Module 4.
> Instead of xHCI USB host controller there is just a USB 2.0 interface
> connected to the DWC2 controller from the BCM2711. As a result
> there is a free PCIe Gen 2 socket. Also there are 2 full-size HDMI 2.0
> connectors.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---

A general note: the CM4 carrier board contains an RTC and a simple fan
controller, which will need to be enabled further down the road.

Regards,
Nicolas


_______________________________________________
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] 22+ messages in thread

* Re: [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board
  2021-09-04 14:52   ` nicolas saenz julienne
@ 2021-09-05 10:33     ` Stefan Wahren
  0 siblings, 0 replies; 22+ messages in thread
From: Stefan Wahren @ 2021-09-05 10:33 UTC (permalink / raw)
  To: nicolas saenz julienne, Rob Herring, Florian Fainelli,
	Adrian Hunter, Ulf Hansson
  Cc: Ray Jui, Scott Branden, bcm-kernel-feedback-list, Maxime Ripard,
	iivanov, devicetree, linux-rpi-kernel, linux-mmc,
	linux-arm-kernel

Hi Nicolas,

Am 04.09.21 um 16:52 schrieb nicolas saenz julienne:
> On Sat, 2021-08-07 at 13:06 +0200, Stefan Wahren wrote:
>> This adds the matching carrier for Raspberry Pi Compute Module 4.
>> Instead of xHCI USB host controller there is just a USB 2.0 interface
>> connected to the DWC2 controller from the BCM2711. As a result
>> there is a free PCIe Gen 2 socket. Also there are 2 full-size HDMI 2.0
>> connectors.
>>
>> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>> ---
> A general note: the CM4 carrier board contains an RTC and a simple fan
> controller, which will need to be enabled further down the road.

yes i forgot to mention that i left out these parts because they are
connected to the VideoCore I2C. But yes, this could be added later ...

Best regards
Stefan

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

_______________________________________________
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] 22+ messages in thread

end of thread, other threads:[~2021-09-05 10:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 11:06 [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 01/10] ARM: dts: bcm2711: fix MDIO #address- and #size-cells Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 02/10] ARM: dts: bcm2711-rpi-4-b: fix sd_io_1v8_reg regulator states Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 03/10] dt-bindings: display: bcm2835: add optional property power-domains Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 04/10] mmc: sdhci-iproc: Cap min clock frequency on BCM2711 Stefan Wahren
2021-08-16 13:59   ` Ulf Hansson
2021-08-07 11:06 ` [PATCH V2 05/10] mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN " Stefan Wahren
2021-08-16 13:59   ` Ulf Hansson
2021-08-26  6:36   ` Jeremy Linton
2021-08-26  9:22     ` Ulf Hansson
2021-08-26 11:18       ` Stefan Wahren
2021-08-27 14:44         ` Ulf Hansson
2021-08-07 11:06 ` [PATCH V2 06/10] ARM: dts: bcm283x-rpi: Move Wifi/BT into separate dtsi Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 07/10] dt-bindings: arm: bcm2835: Add Raspberry Pi Compute Module 4 Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 08/10] ARM: dts: " Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 09/10] ARM: dts: Add Raspberry Pi Compute Module 4 IO Board Stefan Wahren
2021-09-04 14:52   ` nicolas saenz julienne
2021-09-05 10:33     ` Stefan Wahren
2021-08-07 11:06 ` [PATCH V2 10/10] arm64: dts: broadcom: Add reference to RPi CM4 " Stefan Wahren
2021-08-22 10:31 ` [PATCH V2 00/10] ARM: dts: Add Raspberry Pi CM4 & CM4 IO Board support Florian Fainelli
2021-08-30  8:46   ` nicolas saenz julienne
2021-09-04 14:45 ` nicolas saenz julienne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).