* [PATCH v2 0/5] Add AP6275P wireless support
@ 2024-06-24 8:19 Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 8:19 UTC (permalink / raw)
To: arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jacobe Zang
These add AP6275P wireless support on Khadas Edge2. Enable 32k clock
for Wi-Fi module and extend the hardware IDs table in the brcmfmac
driver for it to attach.
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 (5):
arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
net: wireless: brcmfmac: Add optional 32k clock enable support
net: wireless: brcmfmac: Add support for AP6275P
dt-bindings: net: wireless: brcm4329-fmac: add clock description.
dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d
.../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 10 ++++++++++
.../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++++++++++++
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 15 ++++++++++++++-
.../broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++
4 files changed, 42 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
2024-06-24 8:19 [PATCH v2 0/5] Add AP6275P wireless support Jacobe Zang
@ 2024-06-24 8:19 ` Jacobe Zang
2024-06-24 11:52 ` Krzysztof Kozlowski
2024-06-24 8:19 ` [PATCH v2 2/5] net: wireless: brcmfmac: Add optional 32k clock enable support Jacobe Zang
` (3 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 8:19 UTC (permalink / raw)
To: arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jacobe Zang
Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module.
Co-developed-by: Muhammed Efe Cetin <efectn@protonmail.com>
Signed-off-by: Muhammed Efe Cetin <efectn@protonmail.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 3b6286461a746..f674deb6f7da8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -356,6 +356,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 {
+ reg = <0x410000 0 0 0 0>;
+ clocks = <&hym8563>;
+ clock-names = "32k";
+ };
+ };
+
};
&pwm11 {
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 2/5] net: wireless: brcmfmac: Add optional 32k clock enable support
2024-06-24 8:19 [PATCH v2 0/5] Add AP6275P wireless support Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
@ 2024-06-24 8:19 ` Jacobe Zang
2024-06-24 12:31 ` Kalle Valo
2024-06-24 8:19 ` [PATCH v2 3/5] net: wireless: brcmfmac: Add support for AP6275P Jacobe Zang
` (2 subsequent siblings)
4 siblings, 1 reply; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 8:19 UTC (permalink / raw)
To: arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jacobe Zang
WiFi modules often require 32kHz clock to function. Add support to
enable the clock to PCIe driver.
Co-developed-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
.../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 06698a714b523..4a7eb83a60ffc 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -3,6 +3,7 @@
* Copyright (c) 2014 Broadcom Corporation
*/
+#include <linux/clk.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/firmware.h>
@@ -2411,6 +2412,7 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
struct brcmf_pciedev *pcie_bus_dev;
struct brcmf_core *core;
struct brcmf_bus *bus;
+ struct clk *clk;
if (!id) {
id = pci_match_id(brcmf_pcie_devid_table, pdev);
@@ -2422,6 +2424,14 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
brcmf_dbg(PCIE, "Enter %x:%x\n", pdev->vendor, pdev->device);
+ clk = devm_clk_get_optional_enabled(&pdev->dev, "32k");
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
+ if (clk) {
+ brcmf_dbg(PCIE, "enabling 32kHz clock\n", pdev->vendor, pdev->device);
+ clk_set_rate(clk, 32768);
+ }
+
ret = -ENOMEM;
devinfo = kzalloc(sizeof(*devinfo), GFP_KERNEL);
if (devinfo == NULL)
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 3/5] net: wireless: brcmfmac: Add support for AP6275P
2024-06-24 8:19 [PATCH v2 0/5] Add AP6275P wireless support Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 2/5] net: wireless: brcmfmac: Add optional 32k clock enable support Jacobe Zang
@ 2024-06-24 8:19 ` Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d Jacobe Zang
4 siblings, 0 replies; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 8:19 UTC (permalink / raw)
To: arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jacobe Zang
This module features BCM43752A2 chipset. The firmware requires
randomness seeding, so enabled it.
Co-developed-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Ondrej Jirman <megi@xff.cz>
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
Link: https://megous.com/git/linux/commit/?h=ap6275p-6.10&id=1a99573bc8ed412e60e1969c0b29d53a0e5782e0
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 5 ++++-
.../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 4a7eb83a60ffc..8b9574c5c65a7 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -71,6 +71,7 @@ BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie");
BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie");
BRCMF_FW_CLM_DEF(4378B3, "brcmfmac4378b3-pcie");
BRCMF_FW_CLM_DEF(4387C2, "brcmfmac4387c2-pcie");
+BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-pcie");
/* firmware config files */
MODULE_FIRMWARE(BRCMF_FW_DEFAULT_PATH "brcmfmac*-pcie.txt");
@@ -105,6 +106,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = {
BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C),
BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C),
BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371),
+ BRCMF_FW_ENTRY(BRCM_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752),
BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* revision ID 4 */
BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0x0000000F, 4378B1), /* revision ID 3 */
BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFE0, 4378B3), /* revision ID 5 */
@@ -1721,7 +1723,7 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo,
memcpy_toio(devinfo->tcm + address, nvram, nvram_len);
brcmf_fw_nvram_free(nvram);
- if (devinfo->otp.valid) {
+ if (devinfo->otp.valid || devinfo->ci->chip == BRCM_CC_43752_CHIP_ID) {
size_t rand_len = BRCMF_RANDOM_SEED_LENGTH;
struct brcmf_random_seed_footer footer = {
.length = cpu_to_le32(rand_len),
@@ -2710,6 +2712,7 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = {
BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID, BCA),
BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID, WCC),
BRCMF_PCIE_DEVICE(BRCM_PCIE_43596_DEVICE_ID, CYW),
+ BRCMF_PCIE_DEVICE(BRCM_PCIE_43752_DEVICE_ID, WCC),
BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC),
BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC),
BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC),
diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
index 44684bf1b9acc..c1e22c589d85e 100644
--- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
+++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
@@ -52,6 +52,7 @@
#define BRCM_CC_43664_CHIP_ID 43664
#define BRCM_CC_43666_CHIP_ID 43666
#define BRCM_CC_4371_CHIP_ID 0x4371
+#define BRCM_CC_43752_CHIP_ID 43752
#define BRCM_CC_4377_CHIP_ID 0x4377
#define BRCM_CC_4378_CHIP_ID 0x4378
#define BRCM_CC_4387_CHIP_ID 0x4387
@@ -94,6 +95,7 @@
#define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5
#define BRCM_PCIE_4371_DEVICE_ID 0x440d
#define BRCM_PCIE_43596_DEVICE_ID 0x4415
+#define BRCM_PCIE_43752_DEVICE_ID 0x449d
#define BRCM_PCIE_4377_DEVICE_ID 0x4488
#define BRCM_PCIE_4378_DEVICE_ID 0x4425
#define BRCM_PCIE_4387_DEVICE_ID 0x4433
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description.
2024-06-24 8:19 [PATCH v2 0/5] Add AP6275P wireless support Jacobe Zang
` (2 preceding siblings ...)
2024-06-24 8:19 ` [PATCH v2 3/5] net: wireless: brcmfmac: Add support for AP6275P Jacobe Zang
@ 2024-06-24 8:19 ` Jacobe Zang
2024-06-24 8:59 ` Arend van Spriel
2024-06-24 11:45 ` Krzysztof Kozlowski
2024-06-24 8:19 ` [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d Jacobe Zang
4 siblings, 2 replies; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 8:19 UTC (permalink / raw)
To: arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jacobe Zang
Add clocks and clock-names for brcm4329-fmac.
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
.../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
index e564f20d8f415..b9e39a62c3b32 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
@@ -121,6 +121,15 @@ properties:
NVRAM. This would normally be filled in by the bootloader from platform
configuration data.
+ clocks:
+ description: phandle to the clock connected on rtc clock line.
+ maxItems: 1
+
+ clock-names:
+ description: Names of the supplied clocks.
+ items:
+ - const: 32k
+
required:
- compatible
- reg
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d
2024-06-24 8:19 [PATCH v2 0/5] Add AP6275P wireless support Jacobe Zang
` (3 preceding siblings ...)
2024-06-24 8:19 ` [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description Jacobe Zang
@ 2024-06-24 8:19 ` Jacobe Zang
2024-06-25 18:23 ` Arend Van Spriel
4 siblings, 1 reply; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 8:19 UTC (permalink / raw)
To: arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel, Jacobe Zang
AP6275P Wi-Fi module connected via the PCIe interface.
Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
---
.../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
index b9e39a62c3b32..fd22ade92210c 100644
--- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
@@ -53,6 +53,7 @@ properties:
- pci14e4,4488 # BCM4377
- pci14e4,4425 # BCM4378
- pci14e4,4433 # BCM4387
+ - pci14e4,449d # BCM4329
reg:
description: SDIO function number for the device (for most cases
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description.
2024-06-24 8:19 ` [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description Jacobe Zang
@ 2024-06-24 8:59 ` Arend van Spriel
2024-06-24 9:04 ` Jacobe Zang
2024-06-24 11:45 ` Krzysztof Kozlowski
1 sibling, 1 reply; 15+ messages in thread
From: Arend van Spriel @ 2024-06-24 8:59 UTC (permalink / raw)
To: Jacobe Zang
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]
On 6/24/2024 10:19 AM, Jacobe Zang wrote:
> Add clocks and clock-names for brcm4329-fmac.
Thanks. Prefer another clock name though ...
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
> ---
> .../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> index e564f20d8f415..b9e39a62c3b32 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> @@ -121,6 +121,15 @@ properties:
> NVRAM. This would normally be filled in by the bootloader from platform
> configuration data.
>
> + clocks:
> + description: phandle to the clock connected on rtc clock line.
> + maxItems: 1
> +
> + clock-names:
> + description: Names of the supplied clocks.
> + items:
> + - const: 32k
While it is a 32kHz clock I would prefer to use the functional name. The
input pin on the chip is called "LPO_IN" in our schematics as well as in
the AMPAK datasheet. In the Edge 2 schematics it is simply "LPO".
Another name used is "EXT_LPO" as opposed to the internal LPO, which can
be selected through boardflags3 in nvram file. Having the clock external
is better although it seems the edge 2 does not provide the recommended
ppm. In short I would suggest to pick one of the following names:
lpo-in, lpo, or ext-lpo.
This affect the driver patch which is why I tend to go for consensus on
the bindings first before posting a driver patch. With only a single
rename it is not that much churn though.
Regards,
Arend
> required:
> - compatible
> - reg
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description.
2024-06-24 8:59 ` Arend van Spriel
@ 2024-06-24 9:04 ` Jacobe Zang
0 siblings, 0 replies; 15+ messages in thread
From: Jacobe Zang @ 2024-06-24 9:04 UTC (permalink / raw)
To: Arend van Spriel
Cc: kvalo@kernel.org, duoming@zju.edu.cn, bhelgaas@google.com,
minipli@grsecurity.net, linux-wireless@vger.kernel.org,
brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
megi@xff.cz, robh@kernel.org, efectn@protonmail.com,
krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de,
Nick Xie, jagan@edgeble.ai, dsimic@manjaro.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
> In short I would suggest to pick one of the following names:
> lpo-in, lpo, or ext-lpo.
Sure. LPO is more common for the clock name. I will rename it.
---
Best Regards
Jacobe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description.
2024-06-24 8:19 ` [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description Jacobe Zang
2024-06-24 8:59 ` Arend van Spriel
@ 2024-06-24 11:45 ` Krzysztof Kozlowski
1 sibling, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-24 11:45 UTC (permalink / raw)
To: Jacobe Zang, arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
On 24/06/2024 10:19, Jacobe Zang wrote:
> Add clocks and clock-names for brcm4329-fmac.
Which devices have this clock? All? You now mention driver, but this is
a binding so please describe hardware.
Subject: drop full stops. In every patch.
>
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
> ---
> .../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> index e564f20d8f415..b9e39a62c3b32 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> @@ -121,6 +121,15 @@ properties:
> NVRAM. This would normally be filled in by the bootloader from platform
> configuration data.
>
> + clocks:
> + description: phandle to the clock connected on rtc clock line.
Drop redundant parts, like "phandle to the". Just use items with
description instead of above and maxItems.
> + maxItems: 1
> +
> + clock-names:
> + description: Names of the supplied clocks.
Drop description, completely redundant.
> + items:
> + - const: 32k
32k? That's the name of the clock? In the datasheet?
> +
> required:
> - compatible
> - reg
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
2024-06-24 8:19 ` [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
@ 2024-06-24 11:52 ` Krzysztof Kozlowski
2024-06-25 8:04 ` Jacobe Zang
0 siblings, 1 reply; 15+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-24 11:52 UTC (permalink / raw)
To: Jacobe Zang, arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
On 24/06/2024 10:19, Jacobe Zang wrote:
> Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module.
>
> Co-developed-by: Muhammed Efe Cetin <efectn@protonmail.com>
> Signed-off-by: Muhammed Efe Cetin <efectn@protonmail.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 3b6286461a746..f674deb6f7da8 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
> @@ -356,6 +356,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>;
Isn't bus-range a property of PCI host bridge, so the parent? This is a
PCI device, right?
> +
> + wifi: wifi@0,0 {
Binding does not say anything about this. Rockchip PCI controller is the
PCI host bridge, isn't it? Then the pci@0,0 is the child, so what is this?
> + reg = <0x410000 0 0 0 0>;
> + clocks = <&hym8563>;
> + clock-names = "32k";
1. Bindings are before the users.
2. Where is the compatible? Are you sure this validates?
> + };
> + };
> +
No need for this blank line.
> };
>
> &pwm11 {
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 2/5] net: wireless: brcmfmac: Add optional 32k clock enable support
2024-06-24 8:19 ` [PATCH v2 2/5] net: wireless: brcmfmac: Add optional 32k clock enable support Jacobe Zang
@ 2024-06-24 12:31 ` Kalle Valo
0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2024-06-24 12:31 UTC (permalink / raw)
To: Jacobe Zang
Cc: arend.vanspriel, duoming, bhelgaas, minipli, linux-wireless,
brcm80211, brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt,
conor+dt, heiko, nick, jagan, dsimic, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
Jacobe Zang <jacobe.zang@wesion.com> writes:
> WiFi modules often require 32kHz clock to function. Add support to
> enable the clock to PCIe driver.
>
> Co-developed-by: Ondrej Jirman <megi@xff.cz>
> Signed-off-by: Ondrej Jirman <megi@xff.cz>
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
The title prefix should be 'wifi: brcmfmac:'.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
2024-06-24 11:52 ` Krzysztof Kozlowski
@ 2024-06-25 8:04 ` Jacobe Zang
2024-07-01 8:41 ` Krzysztof Kozlowski
0 siblings, 1 reply; 15+ messages in thread
From: Jacobe Zang @ 2024-06-25 8:04 UTC (permalink / raw)
To: Krzysztof Kozlowski, arend.vanspriel@broadcom.com
Cc: kvalo@kernel.org, duoming@zju.edu.cn, bhelgaas@google.com,
minipli@grsecurity.net, linux-wireless@vger.kernel.org,
brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
megi@xff.cz, robh@kernel.org, efectn@protonmail.com,
krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de,
Nick Xie, jagan@edgeble.ai, dsimic@manjaro.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
>> index 3b6286461a746..f674deb6f7da8 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
>> +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
>> @@ -356,6 +356,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>;
>
>Isn't bus-range a property of PCI host bridge, so the parent? This is a
>PCI device, right?
>
>> +
>> + wifi: wifi@0,0 {
>
>Binding does not say anything about this. Rockchip PCI controller is the
>PCI host bridge, isn't it? Then the pci@0,0 is the child, so what is this?
The host bridge is the parent of pcie@0,0. And pcie@0,0 is Bridge1, so the
wifi@0,0 as a device under the Bridge1.
>
>> + reg = <0x410000 0 0 0 0>;
>> + clocks = <&hym8563>;
>> + clock-names = "32k";
>
>1. Bindings are before the users.
>2. Where is the compatible? Are you sure this validates?
Before, the compatible is "pci14e4,449d", but when I checkpatch the warning
said that "pci14e4" was not documented, so I remove the compatible which
doesn't affect the Wi-Fi function. I have tried to add "pci14e4" to
vendor-prefixes.yaml but was refused. So whether should I add the compatible
with warning?
References:
https://lore.kernel.org/all/20220629155956.1138955-15-nfraprado@collabora.com/
---
Best Regards
Jacobe
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d
2024-06-24 8:19 ` [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d Jacobe Zang
@ 2024-06-25 18:23 ` Arend Van Spriel
2024-06-26 6:28 ` Kalle Valo
0 siblings, 1 reply; 15+ messages in thread
From: Arend Van Spriel @ 2024-06-25 18:23 UTC (permalink / raw)
To: Jacobe Zang, arend.vanspriel
Cc: kvalo, duoming, bhelgaas, minipli, linux-wireless, brcm80211,
brcm80211-dev-list.pdl, megi, robh, efectn, krzk+dt, conor+dt,
heiko, nick, jagan, dsimic, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
On 6/24/2024 10:19 AM, Jacobe Zang wrote:
> AP6275P Wi-Fi module connected via the PCIe interface.
Repeating my remark from v1 series although I gained some knowledge what
chip it should be now ;-)
> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
> ---
> .../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> index b9e39a62c3b32..fd22ade92210c 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
> @@ -53,6 +53,7 @@ properties:
> - pci14e4,4488 # BCM4377
> - pci14e4,4425 # BCM4378
> - pci14e4,4433 # BCM4387
> + - pci14e4,449d # BCM4329
This should BCM43752 iso BCM4329.
>
> reg:
> description: SDIO function number for the device (for most case
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d
2024-06-25 18:23 ` Arend Van Spriel
@ 2024-06-26 6:28 ` Kalle Valo
0 siblings, 0 replies; 15+ messages in thread
From: Kalle Valo @ 2024-06-26 6:28 UTC (permalink / raw)
To: Arend Van Spriel
Cc: Jacobe Zang, arend.vanspriel, duoming, bhelgaas, minipli,
linux-wireless, brcm80211, brcm80211-dev-list.pdl, megi, robh,
efectn, krzk+dt, conor+dt, heiko, nick, jagan, dsimic, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
Arend Van Spriel <aspriel@gmail.com> writes:
> On 6/24/2024 10:19 AM, Jacobe Zang wrote:
>> AP6275P Wi-Fi module connected via the PCIe interface.
>
> Repeating my remark from v1 series although I gained some knowledge
> what chip it should be now ;-)
>
>> Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
>> ---
>> .../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>> diff --git
>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> index b9e39a62c3b32..fd22ade92210c 100644
>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>> @@ -53,6 +53,7 @@ properties:
>> - pci14e4,4488 # BCM4377
>> - pci14e4,4425 # BCM4378
>> - pci14e4,4433 # BCM4387
>> + - pci14e4,449d # BCM4329
>
> This should BCM43752 iso BCM4329.
My simple english parser threw an exception here ;)
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2
2024-06-25 8:04 ` Jacobe Zang
@ 2024-07-01 8:41 ` Krzysztof Kozlowski
0 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-01 8:41 UTC (permalink / raw)
To: Jacobe Zang, arend.vanspriel@broadcom.com
Cc: kvalo@kernel.org, duoming@zju.edu.cn, bhelgaas@google.com,
minipli@grsecurity.net, linux-wireless@vger.kernel.org,
brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
megi@xff.cz, robh@kernel.org, efectn@protonmail.com,
krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de,
Nick Xie, jagan@edgeble.ai, dsimic@manjaro.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
On 25/06/2024 10:04, Jacobe Zang wrote:
>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
>>> index 3b6286461a746..f674deb6f7da8 100644
>>> --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
>>> +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
>>> @@ -356,6 +356,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>;
>>
>> Isn't bus-range a property of PCI host bridge, so the parent? This is a
>> PCI device, right?
>>
>>> +
>>> + wifi: wifi@0,0 {
>>
>> Binding does not say anything about this. Rockchip PCI controller is the
>> PCI host bridge, isn't it? Then the pci@0,0 is the child, so what is this?
>
> The host bridge is the parent of pcie@0,0. And pcie@0,0 is Bridge1, so the
Do you want to say Rockchip PCI is PCI-PCI bridge? Bindings do not allow it.
> wifi@0,0 as a device under the Bridge1.
>
>>
>>> + reg = <0x410000 0 0 0 0>;
>>> + clocks = <&hym8563>;
>>> + clock-names = "32k";
>>
>> 1. Bindings are before the users.
>> 2. Where is the compatible? Are you sure this validates?
>
> Before, the compatible is "pci14e4,449d", but when I checkpatch the warning
> said that "pci14e4" was not documented, so I remove the compatible which
> doesn't affect the Wi-Fi function. I have tried to add "pci14e4" to
> vendor-prefixes.yaml but was refused. So whether should I add the compatible
> with warning?
I talk about dtbs_check, not checkpatch. That checkpatch warning does
not matter, obviously.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-07-01 8:41 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 8:19 [PATCH v2 0/5] Add AP6275P wireless support Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 1/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Jacobe Zang
2024-06-24 11:52 ` Krzysztof Kozlowski
2024-06-25 8:04 ` Jacobe Zang
2024-07-01 8:41 ` Krzysztof Kozlowski
2024-06-24 8:19 ` [PATCH v2 2/5] net: wireless: brcmfmac: Add optional 32k clock enable support Jacobe Zang
2024-06-24 12:31 ` Kalle Valo
2024-06-24 8:19 ` [PATCH v2 3/5] net: wireless: brcmfmac: Add support for AP6275P Jacobe Zang
2024-06-24 8:19 ` [PATCH v2 4/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description Jacobe Zang
2024-06-24 8:59 ` Arend van Spriel
2024-06-24 9:04 ` Jacobe Zang
2024-06-24 11:45 ` Krzysztof Kozlowski
2024-06-24 8:19 ` [PATCH v2 5/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d Jacobe Zang
2024-06-25 18:23 ` Arend Van Spriel
2024-06-26 6:28 ` Kalle Valo
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).