[PATCH v2 4/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2

Jacobe Zang posted 5 patches 1 year, 6 months ago
There is a newer version of this series
[PATCH v2 4/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
Posted by Jacobe Zang 1 year, 6 months ago
Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module.

Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
 .../boot/dts/rockchip/rk3588s-khadas-edge2.dts  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
index 233bab17bffd2..7d7cc3e76838c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -365,6 +365,23 @@ &pcie2x1l2 {
 	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc3v3_pcie_wl>;
 	status = "okay";
+
+	pcie@0,0 {
+		reg = <0x400000 0 0 0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+		device_type = "pci";
+		bus-range = <0x40 0x4f>;
+
+		wifi: wifi@0,0 {
+			compatible = "pci14e4,449d";
+			reg = <0x410000 0 0 0 0>;
+			clocks = <&hym8563>;
+			clock-names = "32k";
+		};
+	};
+
 };
 
 &pwm11 {
-- 
2.34.1
Re: [PATCH v2 4/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
Posted by Alexey Charkov 1 year, 6 months ago
On 17/06/2024 10:11, Jacobe Zang wrote:
> Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module.
>
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
> ---
>   .../boot/dts/rockchip/rk3588s-khadas-edge2.dts  | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
> index 233bab17bffd2..7d7cc3e76838c 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
> @@ -365,6 +365,23 @@ &pcie2x1l2 {
>   	reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
>   	vpcie3v3-supply = <&vcc3v3_pcie_wl>;
>   	status = "okay";
> +
> +	pcie@0,0 {
> +		reg = <0x400000 0 0 0 0>;
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		ranges;
> +		device_type = "pci";
> +		bus-range = <0x40 0x4f>;
> +
> +		wifi: wifi@0,0 {
> +			compatible = "pci14e4,449d";

This doesn't seem to be listed in the bindings, nor is there a mainline 
driver that would match either this compatible or PCI ID 14e4:449d. 
Maybe submit either or both of those first, to make sure they are 
reviewed and acceptable for mainline inclusion, before this change lands 
in DTS and becomes part of the ABI?

I'm also wondering why would adding a DT node for a PCI device be needed 
in the first place, given that PCI supports device discovery? Does it 
require some sort of boot-time fixup by the bootloader? If so, it might 
be helpful to state that in comments.

Best regards,

Alexey