* [PATCH v12 0/2] Add Wi-Fi support for Khadas Edge2 and fallback compatible for Apple
@ 2024-08-28 3:39 Jacobe Zang
2024-08-28 3:39 ` [PATCH v12 1/2] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
2024-08-28 3:39 ` [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible Jacobe Zang
0 siblings, 2 replies; 7+ messages in thread
From: Jacobe Zang @ 2024-08-28 3:39 UTC (permalink / raw)
To: marcan, sven, alyssa, robh, heiko, krzk+dt
Cc: linux-rockchip, dsimic, conor+dt, asahi, linux-arm-kernel,
devicetree, linux-kernel, nick, Jacobe Zang
Add basic Wi-Fi support on Khadas Edge2. Wireless driver need to check "brcm,bcm4329-fmac"
compatible so add it to Apple's devices.
Changes in v12:
- Add fallback compatible for Apple's devices
- Link to v11: https://lore.kernel.org/all/20240816015214.1271162-1-jacobe.zang@wesion.com/
Changes in v11:
- Split DTS and submit separately
- Link to v10: https://lore.kernel.org/all/20240813082007.2625841-1-jacobe.zang@wesion.com/
Changes in v10:
- Use ret instead unused probe_attach_result in sdio.c
- Link to v9: https://lore.kernel.org/all/20240810035141.439024-1-jacobe.zang@wesion.com/
Changes in v9:
- Add return -ENODEV error pointer from brcmf_sdio_probe as the default for the fail path
- Add if statement for brcmf_of_probe in common.c
- Retain modifications to of.c other than the return values
- Link to v8: https://lore.kernel.org/all/20240805073425.3492078-1-jacobe.zang@wesion.com/
Changes in v8:
- Add appropriate errno's for return values that will be
send to bus when error occurred.
- Link to v7: https://lore.kernel.org/all/20240802025715.2360456-1-jacobe.zang@wesion.com/
Changes in v7:
- Change brcmf_of_probe prototypes from void to int, add appropriate errno's for return
value, move clock check to the end of brcmf_of_probe
- Add "brcm,bcm4329-fmac" compatible for wifi node
- Link to v6: https://lore.kernel.org/all/20240731061132.703368-1-jacobe.zang@wesion.com/
Changes in v6:
- Move "brcm,bcm4329-fmac" check to the top of brcmf_of_probe in of.c
- Add return if clk didn't set in DTS
-Link to v5: https://lore.kernel.org/all/20240730033053.4092132-1-jacobe.zang@wesion.com/
Changes in v5:
- Add more commit message to the clock in bindings
- Use IS_ERR_OR_NULL as a judgment condition of clk
- Link to v4: https://lore.kernel.org/all/20240729070102.3770318-1-jacobe.zang@wesion.com/
Changes in v4:
- Change clock description in dt-bindings
- Move enable clk from pcie.c to of.c
- Add compatible for wifi node in DTS
- Add random seed flag for firmware download
- Link to v3: https://lore.kernel.org/all/20240630073605.2164346-1-jacobe.zang@wesion.com/
Changes in v3:
- Dropped redundant parts in dt-bindings.
- Change driver patch title prefix as 'wifi: brcmfmac:'.
- Change DTS Wi-Fi node clock-name as 'lpo'.
- Link to v2: https://lore.kernel.org/all/20240624081906.1399447-1-jacobe.zang@wesion.com/
Changes in v2:
- Add SoB tags for original developer.
- Add dt-bindings for pci14e4,449d and clocks.
- Replace dev_info to brcmf_dbg in pcie.c
- Link to v1: https://lore.kernel.org/all/20240620020015.4021696-1-jacobe.zang@wesion.com/
Jacobe Zang (2):
arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible
arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +-
arch/arm64/boot/dts/apple/t8112-j493.dts | 2 +-
.../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++++++++++++
4 files changed, 19 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v12 1/2] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
2024-08-28 3:39 [PATCH v12 0/2] Add Wi-Fi support for Khadas Edge2 and fallback compatible for Apple Jacobe Zang
@ 2024-08-28 3:39 ` Jacobe Zang
2024-08-28 3:39 ` [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible Jacobe Zang
1 sibling, 0 replies; 7+ messages in thread
From: Jacobe Zang @ 2024-08-28 3:39 UTC (permalink / raw)
To: marcan, sven, alyssa, robh, heiko, krzk+dt
Cc: linux-rockchip, dsimic, conor+dt, asahi, linux-arm-kernel,
devicetree, linux-kernel, nick, Jacobe Zang, Muhammed Efe Cetin,
Arend van Spriel
Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module. The
pcie@0 node can be used as Bridge1, so the wifi@0 node is used as a
device under the Bridge1.
Co-developed-by: Muhammed Efe Cetin <efectn@protonmail.com>
Signed-off-by: Muhammed Efe Cetin <efectn@protonmail.com>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
.../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
index dbddfc3bb4641..3d0f55c123d92 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -283,6 +283,22 @@ &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", "brcm,bcm4329-fmac";
+ reg = <0x410000 0 0 0 0>;
+ clocks = <&hym8563>;
+ clock-names = "lpo";
+ };
+ };
};
&pwm11 {
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible
2024-08-28 3:39 [PATCH v12 0/2] Add Wi-Fi support for Khadas Edge2 and fallback compatible for Apple Jacobe Zang
2024-08-28 3:39 ` [PATCH v12 1/2] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
@ 2024-08-28 3:39 ` Jacobe Zang
2024-08-28 5:56 ` Krzysztof Kozlowski
1 sibling, 1 reply; 7+ messages in thread
From: Jacobe Zang @ 2024-08-28 3:39 UTC (permalink / raw)
To: marcan, sven, alyssa, robh, heiko, krzk+dt
Cc: linux-rockchip, dsimic, conor+dt, asahi, linux-arm-kernel,
devicetree, linux-kernel, nick, Jacobe Zang
Broadcom driver need to check "brcm,bcm4329-fmac" compatible. Before
PCIe devices used PCI ID as base compabile so add it as fallback
compatible to pass the check.
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +-
arch/arm64/boot/dts/apple/t8112-j493.dts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
index 5988a4eb6efaa..4b021626d4692 100644
--- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
@@ -72,7 +72,7 @@ hpm1: usb-pd@3f {
&port00 {
bus-range = <1 1>;
wifi0: network@0,0 {
- compatible = "pci14e4,4425";
+ compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
reg = <0x10000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-mac-address = [00 00 00 00 00 00];
diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts/apple/t8112-j413.dts
index 6f69658623bf8..df2a63d8dd5e9 100644
--- a/arch/arm64/boot/dts/apple/t8112-j413.dts
+++ b/arch/arm64/boot/dts/apple/t8112-j413.dts
@@ -43,7 +43,7 @@ led-0 {
&port00 {
bus-range = <1 1>;
wifi0: wifi@0,0 {
- compatible = "pci14e4,4433";
+ compatible = "pci14e4,4433", "brcm,bcm4329-fmac";
reg = <0x10000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-mac-address = [00 10 18 00 00 10];
diff --git a/arch/arm64/boot/dts/apple/t8112-j493.dts b/arch/arm64/boot/dts/apple/t8112-j493.dts
index 0ad908349f554..5f3453e109b85 100644
--- a/arch/arm64/boot/dts/apple/t8112-j493.dts
+++ b/arch/arm64/boot/dts/apple/t8112-j493.dts
@@ -43,7 +43,7 @@ led-0 {
&port00 {
bus-range = <1 1>;
wifi0: wifi@0,0 {
- compatible = "pci14e4,4425";
+ compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
reg = <0x10000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-mac-address = [00 00 00 00 00 00];
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible
2024-08-28 3:39 ` [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible Jacobe Zang
@ 2024-08-28 5:56 ` Krzysztof Kozlowski
2024-08-28 6:13 ` Jacobe Zang
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-28 5:56 UTC (permalink / raw)
To: Jacobe Zang, marcan, sven, alyssa, robh, heiko, krzk+dt
Cc: linux-rockchip, dsimic, conor+dt, asahi, linux-arm-kernel,
devicetree, linux-kernel, nick
On 28/08/2024 05:39, Jacobe Zang wrote:
> Broadcom driver need to check "brcm,bcm4329-fmac" compatible. Before
What for?
> PCIe devices used PCI ID as base compabile so add it as fallback
> compatible to pass the check.
>
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
> ---
> arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
> arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +-
> arch/arm64/boot/dts/apple/t8112-j493.dts | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
> index 5988a4eb6efaa..4b021626d4692 100644
> --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
> +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
> @@ -72,7 +72,7 @@ hpm1: usb-pd@3f {
> &port00 {
> bus-range = <1 1>;
> wifi0: network@0,0 {
> - compatible = "pci14e4,4425";
> + compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
So devices are not compatible, but your argument is that driver needs to
do something here? That's not enough.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible
2024-08-28 5:56 ` Krzysztof Kozlowski
@ 2024-08-28 6:13 ` Jacobe Zang
2024-08-28 9:08 ` Krzysztof Kozlowski
0 siblings, 1 reply; 7+ messages in thread
From: Jacobe Zang @ 2024-08-28 6:13 UTC (permalink / raw)
To: Krzysztof Kozlowski, marcan, sven, alyssa, robh, heiko, krzk+dt
Cc: linux-rockchip, dsimic, conor+dt, asahi, linux-arm-kernel,
devicetree, linux-kernel, nick
On 2024/8/28 13:56, Krzysztof Kozlowski wrote:
> On 28/08/2024 05:39, Jacobe Zang wrote:
>> Broadcom driver need to check "brcm,bcm4329-fmac" compatible. Before
>
> What for?
>
It matches the changes in the other series that I sent.
>> PCIe devices used PCI ID as base compabile so add it as fallback
>> compatible to pass the check.
>>
>> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
>> ---
>> arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
>> arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +-
>> arch/arm64/boot/dts/apple/t8112-j493.dts | 2 +-
>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
>> index 5988a4eb6efaa..4b021626d4692 100644
>> --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
>> +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
>> @@ -72,7 +72,7 @@ hpm1: usb-pd@3f {
>> &port00 {
>> bus-range = <1 1>;
>> wifi0: network@0,0 {
>> - compatible = "pci14e4,4425";
>> + compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
>
> So devices are not compatible, but your argument is that driver needs to
> do something here? That's not enough.
>
Before this change, the check of "brcm,bcm4329-fmac" compatible is set
at the end of probe function for SDIO devices which need IRQ. But after
this change I set it to the top as the first check. So I add this
fallback compatible to the Apple's DTS.
Oh..I got what you mean. Maybe my commit message is not clearly. It is
no need to mention driver in it. Because the intent of adding the
"brcm,bcm4329-fmac" compatible is to conform to the bindings.
--
Best Regards
Jacobe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible
2024-08-28 6:13 ` Jacobe Zang
@ 2024-08-28 9:08 ` Krzysztof Kozlowski
0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-28 9:08 UTC (permalink / raw)
To: Jacobe Zang, marcan, sven, alyssa, robh, heiko, krzk+dt
Cc: linux-rockchip, dsimic, conor+dt, asahi, linux-arm-kernel,
devicetree, linux-kernel, nick
On 28/08/2024 08:13, Jacobe Zang wrote:
>
>
> On 2024/8/28 13:56, Krzysztof Kozlowski wrote:
>> On 28/08/2024 05:39, Jacobe Zang wrote:
>>> Broadcom driver need to check "brcm,bcm4329-fmac" compatible. Before
>>
>> What for?
>>
>
> It matches the changes in the other series that I sent.
Commit msg did not explain this at all. Anyway, then bindings should
provide proper rationale without referring to "driver" as the reason.
>
>>> PCIe devices used PCI ID as base compabile so add it as fallback
>>> compatible to pass the check.
>>>
>>> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
>>> ---
>>> arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
>>> arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +-
>>> arch/arm64/boot/dts/apple/t8112-j493.dts | 2 +-
>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
>>> index 5988a4eb6efaa..4b021626d4692 100644
>>> --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
>>> +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
>>> @@ -72,7 +72,7 @@ hpm1: usb-pd@3f {
>>> &port00 {
>>> bus-range = <1 1>;
>>> wifi0: network@0,0 {
>>> - compatible = "pci14e4,4425";
>>> + compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
>>
>> So devices are not compatible, but your argument is that driver needs to
>> do something here? That's not enough.
>>
> Before this change, the check of "brcm,bcm4329-fmac" compatible is set
> at the end of probe function for SDIO devices which need IRQ. But after
> this change I set it to the top as the first check. So I add this
> fallback compatible to the Apple's DTS.
You are not listening, I think, and still keep talking about driver. It
has nothing to do. Fix your driver.
>
> Oh..I got what you mean. Maybe my commit message is not clearly. It is
> no need to mention driver in it. Because the intent of adding the
> "brcm,bcm4329-fmac" compatible is to conform to the bindings.
Explain the hardware, not the driver. DTS represents hardware, not drivers.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible
2024-08-28 7:58 [PATCH v12 0/2] (no cover subject) Jacobe Zang
@ 2024-08-28 7:58 ` Jacobe Zang
0 siblings, 0 replies; 7+ messages in thread
From: Jacobe Zang @ 2024-08-28 7:58 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
Hector Martin, Sven Peter, Alyssa Rosenzweig
Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
asahi, Jacobe Zang
Wi-Fi compatible in these DTS is based on PCI ID. Bindings need
"brcm,bcm4329-fmac" as fallback compatible.
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +-
arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +-
arch/arm64/boot/dts/apple/t8112-j493.dts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
index 5988a4eb6efaa..4b021626d4692 100644
--- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
@@ -72,7 +72,7 @@ hpm1: usb-pd@3f {
&port00 {
bus-range = <1 1>;
wifi0: network@0,0 {
- compatible = "pci14e4,4425";
+ compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
reg = <0x10000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-mac-address = [00 00 00 00 00 00];
diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts/apple/t8112-j413.dts
index 6f69658623bf8..df2a63d8dd5e9 100644
--- a/arch/arm64/boot/dts/apple/t8112-j413.dts
+++ b/arch/arm64/boot/dts/apple/t8112-j413.dts
@@ -43,7 +43,7 @@ led-0 {
&port00 {
bus-range = <1 1>;
wifi0: wifi@0,0 {
- compatible = "pci14e4,4433";
+ compatible = "pci14e4,4433", "brcm,bcm4329-fmac";
reg = <0x10000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-mac-address = [00 10 18 00 00 10];
diff --git a/arch/arm64/boot/dts/apple/t8112-j493.dts b/arch/arm64/boot/dts/apple/t8112-j493.dts
index 0ad908349f554..5f3453e109b85 100644
--- a/arch/arm64/boot/dts/apple/t8112-j493.dts
+++ b/arch/arm64/boot/dts/apple/t8112-j493.dts
@@ -43,7 +43,7 @@ led-0 {
&port00 {
bus-range = <1 1>;
wifi0: wifi@0,0 {
- compatible = "pci14e4,4425";
+ compatible = "pci14e4,4425", "brcm,bcm4329-fmac";
reg = <0x10000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */
local-mac-address = [00 00 00 00 00 00];
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-28 9:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-28 3:39 [PATCH v12 0/2] Add Wi-Fi support for Khadas Edge2 and fallback compatible for Apple Jacobe Zang
2024-08-28 3:39 ` [PATCH v12 1/2] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
2024-08-28 3:39 ` [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible Jacobe Zang
2024-08-28 5:56 ` Krzysztof Kozlowski
2024-08-28 6:13 ` Jacobe Zang
2024-08-28 9:08 ` Krzysztof Kozlowski
2024-08-28 7:58 [PATCH v12 0/2] (no cover subject) Jacobe Zang
2024-08-28 7:58 ` [PATCH v12 2/2] arm64: dts: apple: add "brcm,bcm4329-fmac" fallback compatible Jacobe Zang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®