Skip to content

Commit

Permalink
Fix issues with bluetooth and usb
Browse files Browse the repository at this point in the history
  • Loading branch information
dust-7 committed Sep 6, 2024
1 parent 221a476 commit fac51a7
Showing 1 changed file with 70 additions and 45 deletions.
115 changes: 70 additions & 45 deletions arch/arm64/boot/dts/rockchip/rk3566-orangepi-3b-v2.1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#include <dt-bindings/display/drm_mipi_dsi.h>
#include <dt-bindings/sensor-dev.h>
#include <dt-bindings/display/rockchip_vop.h>
#include <dt-bindings/clock/rk3568-cru.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/power/rk3568-power.h>
#include "rk3566.dtsi"
#include "rk3568-linux.dtsi"

Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -325,6 +308,44 @@
};
};
};

usb_host0_xhci: usb@fcc00000 {
compatible = "rockchip,rk3568-dwc3", "snps,dwc3";
reg = <0x0 0xfcc00000 0x0 0x400000>;
interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
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 = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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>;
};
};

Expand Down Expand Up @@ -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";
};
Expand Down Expand Up @@ -1079,7 +1102,6 @@
ROCKCHIP_VOP2_SMART0 | 1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1 | 1 <<
ROCKCHIP_VOP2_SMART1)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_SMART0>;
cursor-win-id = <ROCKCHIP_VOP2_CLUSTER0>;
};

&i2c1 {
Expand Down Expand Up @@ -1231,3 +1253,6 @@
};
};
};

/delete-node/ &usbdrd30;
/delete-node/ &usbhost30;

0 comments on commit fac51a7

Please sign in to comment.