devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Charkov <alchark@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-rockchip@lists.infradead.org,
	linux-kernel@vger.kernel.org,  Alexey Charkov <alchark@gmail.com>
Subject: [PATCH 3/4] arm64: dts: rockchip: enable wifi on ArmSoM Sige5
Date: Tue, 03 Jun 2025 21:01:15 +0400	[thread overview]
Message-ID: <20250603-sige5-updates-v1-3-717e8ce4ab77@gmail.com> (raw)
In-Reply-To: <20250603-sige5-updates-v1-0-717e8ce4ab77@gmail.com>

ArmSoM Sige5 uses a soldered-on SDIO connected WiFi module. Namely,
board v1.1 uses a Realtek based BL-M8852BS2, while v1.2 uses a Broadcom
based BW3752-50B1.

Add required device tree nodes in the SoC .dtsi for the SDIO controller
and pinctrl / clock wiring in the board .dts for the module itself.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
---
 .../boot/dts/rockchip/rk3576-armsom-sige5.dts      | 36 ++++++++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3576.dtsi           | 16 ++++++++++
 2 files changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
index 7ce1fb1380b0863c902fdd9cbc7454ee6011cf92..dcd033859398312f7693bebb7f080ee4f2ecaa32 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
@@ -219,6 +219,15 @@ vcc_5v0_host: regulator-vcc-5v0-host {
 		pinctrl-names = "default";
 		pinctrl-0 = <&usb_host_pwren>;
 	};
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&hym8563>;
+		clock-names = "ext_clock";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_reg_on>;
+		reset-gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &combphy1_psu {
@@ -781,6 +790,16 @@ usb_host_pwren: usb-host-pwren {
 			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
+
+	wireless-wlan {
+		wifi_wake_host: wifi-wake-host {
+			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+
+		wifi_reg_on: wifi-reg-on {
+			rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 &sai1 {
@@ -808,6 +827,23 @@ &sdhci {
 	status = "okay";
 };
 
+&sdio {
+	bus-width = <4>;
+	cap-sdio-irq;
+	disable-wp;
+	keep-power-in-suspend;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	no-sd;
+	no-mmc;
+	non-removable;
+	sd-uhs-sdr50;
+	sd-uhs-sdr104;
+	vmmc-supply = <&vcc_3v3_s3>;
+	vqmmc-supply = <&vcc_1v8_s3>;
+	wakeup-source;
+	status = "okay";
+};
+
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index 1086482f04792325dc4c22fb8ceeb27eef59afe4..a09582470bb7f654b711308da1e51fa8571ca1e8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -1695,6 +1695,22 @@ sdmmc: mmc@2a310000 {
 			status = "disabled";
 		};
 
+		sdio: mmc@2a320000 {
+			compatible = "rockchip,rk3576-dw-mshc", "rockchip,rk3288-dw-mshc";
+			reg = <0x0 0x2a320000 0x0 0x4000>;
+			clocks = <&cru HCLK_SDIO>, <&cru CCLK_SRC_SDIO>;
+			clock-names = "biu", "ciu";
+			fifo-depth = <0x100>;
+			interrupts = <GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH>;
+			max-frequency = <200000000>;
+			pinctrl-0 = <&sdmmc1m0_clk &sdmmc1m0_cmd &sdmmc1m0_bus4>;
+			pinctrl-names = "default";
+			power-domains = <&power RK3576_PD_SDGMAC>;
+			resets = <&cru SRST_H_SDIO>;
+			reset-names = "reset";
+			status = "disabled";
+		};
+
 		sdhci: mmc@2a330000 {
 			compatible = "rockchip,rk3576-dwcmshc", "rockchip,rk3588-dwcmshc";
 			reg = <0x0 0x2a330000 0x0 0x10000>;

-- 
2.49.0


  parent reply	other threads:[~2025-06-03 17:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-03 17:01 [PATCH 0/4] arm64: dts: rockchip: enable further peripherals on ArmSoM Sige5 Alexey Charkov
2025-06-03 17:01 ` [PATCH 1/4] arm64: dts: rockchip: list all CPU supplies " Alexey Charkov
2025-06-04 18:38   ` Nicolas Frattaroli
2025-06-04 19:12     ` Alexey Charkov
2025-06-04 19:23       ` Nicolas Frattaroli
2025-06-04 19:54         ` Alexey Charkov
2025-06-05 13:22       ` Piotr Oniszczuk
2025-06-05 13:42         ` Alexey Charkov
2025-06-08  7:24           ` Piotr Oniszczuk
2025-06-09 14:05             ` Alexey Charkov
2025-06-15 15:59               ` Piotr Oniszczuk
2025-06-15 16:20                 ` Alexey Charkov
2025-06-18 13:51                 ` Alexey Charkov
2025-06-18 14:06                   ` Nicolas Frattaroli
2025-06-18 14:48                     ` Alexey Charkov
2025-06-20 16:02                       ` Alexey Charkov
2025-06-21 19:35                         ` Alexey Charkov
2025-06-21 19:44                           ` Heiko Stuebner
2025-06-21 21:21                             ` Alexey Charkov
2025-06-22 13:48                               ` Heiko Stuebner
2025-06-23  9:19                                 ` Alexey Charkov
2025-06-23 13:58                                   ` Alexey Charkov
2025-06-23 15:02                                     ` Piotr Oniszczuk
2025-06-23 17:40                                       ` Jonas Karlman
2025-06-23 21:07                                         ` Jonas Karlman
2025-06-23 21:17                                           ` Heiko Stuebner
2025-06-24  7:41                                         ` Alexey Charkov
2025-06-23 18:04                                     ` Jonas Karlman
2025-06-05 11:17   ` Diederik de Haas
2025-06-05 11:23     ` Alexey Charkov
2025-06-03 17:01 ` [PATCH 2/4] arm64: dts: rockchip: enable USB A ports " Alexey Charkov
2025-06-03 17:51   ` Nicolas Frattaroli
2025-06-04  6:52     ` Alexey Charkov
2025-06-04 13:24       ` Nicolas Frattaroli
2025-06-03 17:01 ` Alexey Charkov [this message]
2025-06-04 19:01   ` [PATCH 3/4] arm64: dts: rockchip: enable wifi " Nicolas Frattaroli
2025-06-04 19:48     ` Alexey Charkov
2025-06-05  2:43   ` Jimmy Hon
2025-06-05  6:32     ` Alexey Charkov
2025-06-05 14:14       ` Alexey Charkov
2025-06-07  2:42         ` Jimmy Hon
2025-06-03 17:01 ` [PATCH 4/4] arm64: dts: rockchip: enable bluetooth " Alexey Charkov
2025-06-04 13:58 ` [PATCH 0/4] arm64: dts: rockchip: enable further peripherals " Rob Herring (Arm)
2025-06-04 14:15   ` Alexey Charkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250603-sige5-updates-v1-3-717e8ce4ab77@gmail.com \
    --to=alchark@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).