Files
build/patch/kernel/archive/rockchip64-6.3/overlays-06-add-rk3318-box-wlan-ap6330.patch
Ricardo Pardini 906ca66430 rockchip64/edge/6.3: rebase/rewrite patches against v6.3.1; do archeology for mbox-less patches; materialize overwrites
- materialized overwrites:
  - `add-board-helios64.patch`
  - `add-board-orangepi-r1-plus.patch`
  - `add-driver-for-Motorcomm-YT85xx+PHYs.patch`
  - `add-board-rk3328-roc-pc.patch`
- not touched: wifi patches, those still require work before rebase is consistent.
  - `wifi-4003-uwe5622-adjust-for-rockchip.patch`
    - this patch is done on top of the wifi drivers patches exclusively, and fails to apply out of tree.
    - we should probably consider moving this into the wifi drivers patch harness, not in the rockchip tree.
2023-05-16 08:55:33 +02:00

153 lines
4.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Tue, 20 Apr 2021 16:24:58 +0000
Subject: rk3318-box: add overlay for full support to Ampak AP6330
---
arch/arm64/boot/dts/rockchip/overlay/Makefile | 3 +-
arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays | 4 +
arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-wlan-ap6330.dts | 106 ++++++++++
3 files changed, 112 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile
index 5e3318b57ef6..9bf45a0742ba 100644
--- a/arch/arm64/boot/dts/rockchip/overlay/Makefile
+++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile
@@ -14,7 +14,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
rockchip-rk3318-box-led-conf1.dtbo \
rockchip-rk3318-box-emmc-ddr.dtbo \
rockchip-rk3318-box-wlan-ap6334.dtbo \
- rockchip-rk3318-box-wlan-ext.dtbo
+ rockchip-rk3318-box-wlan-ext.dtbo \
+ rockchip-rk3318-box-wlan-ap6330.dtbo
scr-$(CONFIG_ARCH_ROCKCHIP) += \
rockchip-fixup.scr
diff --git a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
index b414e3069bb5..7b5073498869 100644
--- a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
+++ b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
@@ -140,3 +140,7 @@ wifi chip and clones
Use sdmmc_ext device for sdio devices, enabled wifi on some boards (notably
X88 Pro) which have wifi chip attached to sdmmc_ext controller.
+### rk3318-box-wlan-ap6330
+
+Set up additional device tree bits properly support ap6330 (broaccom BCM4330)
+wifi + bt chip and clones.
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-wlan-ap6330.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-wlan-ap6330.dts
new file mode 100644
index 000000000000..9bc02a2173e4
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-wlan-ap6330.dts
@@ -0,0 +1,106 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+
+ fragment@0 {
+ target = <&sdio>;
+ __overlay__ {
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ brcmf_sdio: wifi@1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ //brcm,drive-strength = <2>;
+ interrupt-parent = <&gpio1>;
+ interrupt-names = "host_wake";
+ interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio_host_wake>;
+ };
+
+ };
+ };
+
+ fragment@1 {
+ target = <&sdio_ext>;
+ __overlay__ {
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ brcmf_ext: wifi@1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ //brcm,drive-strength = <2>;
+ interrupt-parent = <&gpio3>;
+ interrupt-names = "host_wake";
+ interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio_host_wake_ext>;
+ };
+
+ };
+ };
+
+ fragment@2 {
+ target = <&uart0>;
+ __overlay__ {
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_xfer &uart0_rts &uart0_cts>;
+
+ bluetooth {
+ compatible = "brcm,bcm4330-bt";
+ max-speed = <4000000>;
+ shutdown-gpios = <&gpio1 RK_PC5 GPIO_ACTIVE_HIGH>;
+ device-wakeup-gpios = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
+ //host-wakeup-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ vbat-supply = <&vcc_io>;
+ vddio-supply = <&vcc_18>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_reg_on_h>, <&bt_host_wake_l>, <&bt_device_wake_l>;
+ /*
+ interrupt-names = "host-wakeup";
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PD2 IRQ_TYPE_LEVEL_LOW>;
+ */
+ brcm,bt-pcm-int-params = [01 02 00 01 01];
+ };
+
+
+ };
+
+ };
+
+ fragment@3 {
+ target = <&pinctrl>;
+ __overlay__ {
+
+ bluetooth {
+
+
+ bt_reg_on_h: bt-enable {
+ rockchip,pins = <1 RK_PC5 0 &pcfg_pull_none>;
+ };
+
+ bt_device_wake_l: bt-device-wake {
+ rockchip,pins = <1 RK_PC7 0 &pcfg_pull_none>;
+ };
+
+ bt_host_wake_l: bt-host-wake {
+ rockchip,pins = <1 RK_PD2 0 &pcfg_pull_none>;
+ };
+
+ };
+
+ };
+ };
+
+};
--
Armbian