From fac51a7be1bd4f22843aec72ec773b8152ad1ad4 Mon Sep 17 00:00:00 2001 From: Ian Leung Date: Fri, 6 Sep 2024 18:37:35 +0800 Subject: [PATCH] Fix issues with bluetooth and usb --- .../dts/rockchip/rk3566-orangepi-3b-v2.1.dts | 115 +++++++++++------- 1 file changed, 70 insertions(+), 45 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b-v2.1.dts b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b-v2.1.dts index 047238e418cc..bd8c0bf91ac3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b-v2.1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b-v2.1.dts @@ -12,6 +12,11 @@ #include #include #include +#include +#include +#include +#include +#include #include "rk3566.dtsi" #include "rk3568-linux.dtsi" @@ -159,28 +164,6 @@ status = "okay"; }; - wireless_wlan: wireless-wlan { - compatible = "wlan-platdata"; - rockchip,grf = <&grf>; - wifi_chip_type = "ap6256"; - WIFI,host_wake_irq = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; - - wireless_bluetooth: wireless-bluetooth { - compatible = "bluetooth-platdata"; - clocks = <&rk809 1>; - clock-names = "ext_clock"; - uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>; - pinctrl-names = "default", "rts_gpio"; - pinctrl-0 = <&uart1m0_rtsn>; - pinctrl-1 = <&uart1_gpios>; - BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; - BT,wake_gpio = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; - BT,wake_host_irq = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>; - status = "okay"; - }; - vcc_camera_ov5647: vcc-camera-ov5647 { status = "okay"; compatible = "regulator-fixed"; @@ -325,6 +308,44 @@ }; }; }; + + usb_host0_xhci: usb@fcc00000 { + compatible = "rockchip,rk3568-dwc3", "snps,dwc3"; + reg = <0x0 0xfcc00000 0x0 0x400000>; + interrupts = ; + clocks = <&cru CLK_USB3OTG0_REF>, <&cru CLK_USB3OTG0_SUSPEND>, + <&cru ACLK_USB3OTG0>; + clock-names = "ref_clk", "suspend_clk", + "bus_clk"; + dr_mode = "host"; + phy_type = "utmi_wide"; + power-domains = <&power RK3568_PD_PIPE>; + resets = <&cru SRST_USB3OTG0>; + snps,dis_u2_susphy_quirk; + phys = <&u2phy0_otg>; + phy-names = "usb2-phy"; + extcon = <&usb2phy0>; + maximum-speed = "high-speed"; + status = "okay"; + }; + + usb_host1_xhci: usb@fd000000 { + compatible = "rockchip,rk3568-dwc3", "snps,dwc3"; + reg = <0x0 0xfd000000 0x0 0x400000>; + interrupts = ; + clocks = <&cru CLK_USB3OTG1_REF>, <&cru CLK_USB3OTG1_SUSPEND>, + <&cru ACLK_USB3OTG1>; + clock-names = "ref_clk", "suspend_clk", + "bus_clk"; + dr_mode = "host"; + phys = <&u2phy0_host>, <&combphy1_usq PHY_TYPE_USB3>; + phy-names = "usb2-phy", "usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <&power RK3568_PD_PIPE>; + resets = <&cru SRST_USB3OTG1>; + snps,dis_u2_susphy_quirk; + status = "okay"; + }; }; &bus_npu { @@ -663,7 +684,19 @@ &uart1 { status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>; + pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>; + uart-has-rtscts; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&rk809 1>; + clock-names = "lpo"; + device-wakeup-gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_reset_h>; + }; }; &pwm7 { @@ -705,9 +738,17 @@ }; &pinctrl { - wireless-bluetooth { - uart1_gpios: uart1-gpios { - rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + bt { + bt_reset_h: bt-reset-h { + rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_host_wake_l: bt-host-wake-l { + rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_down>; + }; + + bt_wake_l: bt-wake-l { + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; }; }; @@ -963,24 +1004,6 @@ status = "okay"; }; -&usbdrd_dwc3 { - dr_mode = "otg"; - extcon = <&usb2phy0>; - status = "okay"; -}; - -&usbdrd30 { - status = "okay"; -}; - -&usbhost_dwc3 { - status = "okay"; -}; - -&usbhost30 { - status = "okay"; -}; - &vdpu { status = "okay"; }; @@ -1079,7 +1102,6 @@ ROCKCHIP_VOP2_SMART0 | 1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1 | 1 << ROCKCHIP_VOP2_SMART1)>; rockchip,primary-plane = ; - cursor-win-id = ; }; &i2c1 { @@ -1231,3 +1253,6 @@ }; }; }; + +/delete-node/ &usbdrd30; +/delete-node/ &usbhost30;