Re: [PATCH 6/7] arm64: dts: broadcom: bcm2712: Add second SDHCI controller node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

[add Arend and Raspberry Pi devs]

Am 31.07.24 um 08:28 schrieb Ivan T. Ivanov:
Add SDIO2 node. On RPi5 it is connected to WiFi chip.
Add related pin, gpio and regulator definitions and
add WiFi node. With this and firmware already provided by
distributions, at least on openSUSE Tumbleweed, this is
sufficient to make WiFi operational on RPi5 \o/.

Signed-off-by: Ivan T. Ivanov <iivanov@xxxxxxx>
---
  .../boot/dts/broadcom/bcm2712-rpi-5-b.dts     | 55 +++++++++++++++++++
  arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 13 +++++
  2 files changed, 68 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
index 06e926af16b7..b6bfe0abb774 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
@@ -46,6 +46,20 @@ sd_vcc_reg: sd-vcc-reg {
  		gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
  	};

+	wl_on_reg: wl-on-reg {
+		compatible = "regulator-fixed";
+		regulator-name = "wl-on-regulator";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		pinctrl-0 = <&wl_on_pins>;
+		pinctrl-names = "default";
+
+		gpio = <&gio 28 GPIO_ACTIVE_HIGH>;
+
+		startup-delay-us = <150000>;
+		enable-active-high;
+	};
I don't think this GPIO is a regulator from hardware perspective. I
guess it's the same reset pin we have on the older Raspberry Pis. Please
look at bcm283x-rpi-wifi-bt.dtsi for the wifi power sequence.
+
  	pwr-button {
  		compatible = "gpio-keys";

@@ -80,6 +94,25 @@ &sdio1 {
  	cd-gpios = <&gio_aon 5 GPIO_ACTIVE_LOW>;
  };

+/* SDIO2 drives the WLAN interface */
+&sdio2 {
+	pinctrl-0 = <&sdio2_30_pins>;
+	pinctrl-names = "default";
+	bus-width = <4>;
+	vmmc-supply = <&wl_on_reg>;
+	sd-uhs-ddr50;
+	non-removable;
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	wifi: wifi@1 {
+		reg = <1>;
+		compatible = "brcm,bcm4329-fmac";
+		local-mac-address = [00 00 00 00 00 00];
I think we can drop this?
+	};
+};
+
  &pinctrl_aon {
  	emmc_aon_cd_pins: emmc-aon-cd-pins {
  		function = "sd_card_g";
@@ -95,9 +128,31 @@ pwr_button_pins: pwr-button-pins {
  		bias-pull-up;
  	};

+	wl_on_pins: wl-on-pins {
+		function = "gpio";
+		pins = "gpio28";
+	};
+
  	emmc_sd_pulls: emmc-sd-pulls {
  		pins = "emmc_cmd", "emmc_dat0", "emmc_dat1", "emmc_dat2", "emmc_dat3";
  		bias-pull-up;
  	};

+	sdio2_30_pins: sdio2-30-pins {
+		pin-clk {
+			function = "sd2";
+			pins = "gpio30";
+			bias-disable;
+		};
+		pin-cmd {
+			function = "sd2";
+			pins = "gpio31";
+			bias-pull-up;
+		};
+		pins-dat {
+			function = "sd2";
+			pins = "gpio32", "gpio33", "gpio34", "gpio35";
+			bias-pull-up;
+		};
+	};
  };
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index 39d2419ffce2..3c0663dc6712 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -27,6 +27,19 @@ sdio1: mmc@1000fff000 {
  			mmc-ddr-3_3v;
  		};

+		sdio2: mmc@1001100000 {
+			compatible = "brcm,bcm2712-sdhci";
+			reg = <0x10 0x01100000  0x260>,
+			      <0x10 0x01100400  0x200>;
+			reg-names = "host", "cfg";
+			interrupts = <GIC_SPI 274 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk_emmc2>;
+			sdhci-caps-mask = <0x0000C000 0x0>;
+			sdhci-caps = <0x0 0x0>;
+			mmc-ddr-3_3v;
+			status = "disabled";
+		};
+
  		gicv2: interrupt-controller@107fff9000 {
  			interrupt-controller;
  			#interrupt-cells = <3>;






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux