Fixed OrangePi 4 bluetooth and mic in dev (#1888)

This commit is contained in:
simple 2020-04-17 04:54:27 +08:00 committed by GitHub
parent 88f2596744
commit 69327492c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 7 deletions

View File

@ -3024,7 +3024,8 @@ CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
# end of Serial drivers
CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_DEV_BUS=m
CONFIG_SERIAL_DEV_BUS=y
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
CONFIG_TTY_PRINTK=m
CONFIG_TTY_PRINTK_LEVEL=6
CONFIG_HVC_DRIVER=y

View File

@ -12,10 +12,10 @@ index aed41ff1d..92d796a33 100644
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock-pi-4.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-orangepi-4.dts b/arch/arm64/boot/dts/rockchip/rk3399-orangepi-4.dts
new file mode 100644
index 00000000..17010305
index 000000000..1e1747ceb
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-orangepi-4.dts
@@ -0,0 +1,1130 @@
@@ -0,0 +1,1159 @@
+/*
+ * SPDX-License-Identifier: (GPL-2.0+ or MIT)
+ * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
@ -198,7 +198,8 @@ index 00000000..17010305
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Mic Jack", "micbias1",
+ "IN1P", "Mic Jack",
+ "IN2P", "Mic Jack",
+ "IN3P", "Mic Jack",
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+
@ -370,7 +371,7 @@ index 00000000..17010305
+ wifi_chip_type = "ap6255";
+ sdio_vref = <1800>;
+ WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
+ status = "okay";
+ status = "disabled";
+ };
+
+ rk_bluetooth: wireless-bluetooth {
@ -386,7 +387,7 @@ index 00000000..17010305
+ BT,reset_gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
+ BT,wake_gpio = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
+ BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
+ status = "okay";
+ status = "disabled";
+ };
+};
+
@ -461,8 +462,21 @@ index 00000000..17010305
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_xfer &uart0_cts>;
+ pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm4345c5";
+ clocks = <&rk808 1>;
+ clock-names = "lpo";
+ device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>;
+ host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
+ shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
+ max-speed = <1500000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&bt_host_wake &bt_wake &bt_reset>;
+ };
+
+};
+
+&uart2 {
@ -1129,6 +1143,21 @@ index 00000000..17010305
+ <1 10 RK_FUNC_GPIO &pcfg_output_low>;
+ };
+ };
+
+ bt {
+ bt_host_wake: bt-host-wake {
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_reset: bt-reset {
+ rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ bt_wake: bt-wake {
+ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+};
+
+&hdmi_in_vopb {