[PATCH 3/4] arm64: dts: rockchip: enable wifi on ArmSoM Sige5

Nicolas Frattaroli nicolas.frattaroli at collabora.com
Wed Jun 4 12:01:20 PDT 2025


On Tuesday, 3 June 2025 19:01:15 Central European Summer Time Alexey Charkov wrote:
> 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.

Okay, so there's two board revisions, which makes this patch and the
following that adds bluetooth a problem. This patch here doesn't
seem to actually add the SDIO Wi-Fi module node where it'll differ,
so skirts around the issue AFAIU. It might also be that it's not
needed for you and I just don't notice because I have v1.1 where the
SDIO driver for that module doesn't exist yet iirc.

But what we should think about is first doing
- probably add a new compatible for armsom,sige5-v1.2
- git mv arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts \
         arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dtsi
- commit here like Sebastian Reichel had to do for [1]
- create a new arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
  that includes the dtsi and moves the model and compatible property
  there. Make sure the model includes v1.1 in the name, compatible
  should remain the same
- commit here that will be a squash commit like Sebastian Reichel
  had to do in [2]
- create a new arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5-v1.2.dts,
  could be adding the Wi-Fi node here to cut down on how many patches we
  do. I assume you only have the v1.2 board and can't test the older Wi-Fi,
  which is fine.
  compatible should probably be something like
    compatible = "armsom,sige5-v1.2", "armsom,sige5", "rockchip,rk3576";
  Don't forget to change the model property as well.

I know this will be a royal PITA, especially considering they'll likely
never produce v1.1 again and it now hogs the name, but keeping the
current dts as 1.1 may be the best way forward, as it keeps compat (though
the Wi-Fi changes won't affect anything already in there) and will stop
people from accidentally picking the higher number better DTS like what
happens with rockpro64 all the time where the non-numbered DTS is 2.1 and
the numbered one is 2.0 and people keep picking 2.0.

> 
> 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 at 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

Okay, I think adding the sdio node to the SoC dtsi should be a separate
patch before this one.

> 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 at 2a310000 {
>  			status = "disabled";
>  		};
>  
> +		sdio: mmc at 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 at 2a330000 {
>  			compatible = "rockchip,rk3576-dwcmshc", "rockchip,rk3588-dwcmshc";
>  			reg = <0x0 0x2a330000 0x0 0x10000>;
> 
>

So in conclusion:
- bindings patch adding v1.2 compatible
- SoC dtsi patch for the sdio node
- git mv patch
- rk3576-armsom-sige5.dts patch, ask maintainer to squash it into the
  previous patch, make it obvious by giving it the same subject or something
- rk3576-armsom-sige5-v1.2.dts patch

Sorry to drop all this on you, it's a little unpleasant and in-the-woods
with regards to preparing a patch series. Basically, the reason why I've
held off on this for the moment is that I don't have a v1.2 board and my
v1.1 board's Wi-Fi module doesn't seem to be supported (yet).

Kind regards,
Nicolas Frattaroli

[1]: https://lore.kernel.org/linux-rockchip/20250508-rock5bp-for-upstream-v2-1-677033cc1ac2@kernel.org/
[2]: https://lore.kernel.org/linux-rockchip/20250508-rock5bp-for-upstream-v2-2-677033cc1ac2@kernel.org/






More information about the Linux-rockchip mailing list