From 56d867fe25139d580dfb538a8484b807e135aff6 Mon Sep 17 00:00:00 2001 From: TheSnowfield <17957399+TheSnowfield@users.noreply.github.com> Date: Sun, 13 Apr 2025 06:38:10 +0800 Subject: [PATCH] sakurapi-rk3308b: fix uart4 bcm4345c5 bluetooth hci, enable i2c1 --- .../dt/rk3308-sakurapi-rk3308b.dts | 40 +++++++++++++++++++ .../dt/rk3308-sakurapi-rk3308b.dts | 40 +++++++++++++++++++ .../dt/rk3308-sakurapi-rk3308b.dts | 40 +++++++++++++++++++ .../dt/rk3308-sakurapi-rk3308b.dts | 40 +++++++++++++++++++ 4 files changed, 160 insertions(+) diff --git a/patch/kernel/archive/rockchip64-6.12/dt/rk3308-sakurapi-rk3308b.dts b/patch/kernel/archive/rockchip64-6.12/dt/rk3308-sakurapi-rk3308b.dts index 535e709df..a9b576c89 100755 --- a/patch/kernel/archive/rockchip64-6.12/dt/rk3308-sakurapi-rk3308b.dts +++ b/patch/kernel/archive/rockchip64-6.12/dt/rk3308-sakurapi-rk3308b.dts @@ -231,6 +231,20 @@ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + bluetooth { + bt_reg_on: bt-reg-on { + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_host: bt-wake-host { + rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + host_wake_bt: host-wake-bt { + rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm0 { @@ -265,12 +279,38 @@ status = "okay"; }; +&i2c1 { + status = "okay"; +}; + &uart2 { pinctrl-names = "default"; pinctrl-0 = <&uart2m0_xfer>; status = "okay"; }; +&uart4 { + pinctrl-names = "default"; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&cru SCLK_RTC32K>; + clock-names = "lpo"; + pinctrl-names = "default"; + pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>; + device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + max-speed = <1500000>; + }; +}; + +&tsadc{ + status = "okay"; +}; + &usb20_otg { status = "okay"; }; diff --git a/patch/kernel/archive/rockchip64-6.14/dt/rk3308-sakurapi-rk3308b.dts b/patch/kernel/archive/rockchip64-6.14/dt/rk3308-sakurapi-rk3308b.dts index 535e709df..a9b576c89 100755 --- a/patch/kernel/archive/rockchip64-6.14/dt/rk3308-sakurapi-rk3308b.dts +++ b/patch/kernel/archive/rockchip64-6.14/dt/rk3308-sakurapi-rk3308b.dts @@ -231,6 +231,20 @@ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + bluetooth { + bt_reg_on: bt-reg-on { + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_host: bt-wake-host { + rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + host_wake_bt: host-wake-bt { + rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm0 { @@ -265,12 +279,38 @@ status = "okay"; }; +&i2c1 { + status = "okay"; +}; + &uart2 { pinctrl-names = "default"; pinctrl-0 = <&uart2m0_xfer>; status = "okay"; }; +&uart4 { + pinctrl-names = "default"; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&cru SCLK_RTC32K>; + clock-names = "lpo"; + pinctrl-names = "default"; + pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>; + device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + max-speed = <1500000>; + }; +}; + +&tsadc{ + status = "okay"; +}; + &usb20_otg { status = "okay"; }; diff --git a/patch/kernel/archive/rockchip64-6.6/dt/rk3308-sakurapi-rk3308b.dts b/patch/kernel/archive/rockchip64-6.6/dt/rk3308-sakurapi-rk3308b.dts index 535e709df..a9b576c89 100755 --- a/patch/kernel/archive/rockchip64-6.6/dt/rk3308-sakurapi-rk3308b.dts +++ b/patch/kernel/archive/rockchip64-6.6/dt/rk3308-sakurapi-rk3308b.dts @@ -231,6 +231,20 @@ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + bluetooth { + bt_reg_on: bt-reg-on { + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_host: bt-wake-host { + rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + host_wake_bt: host-wake-bt { + rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm0 { @@ -265,12 +279,38 @@ status = "okay"; }; +&i2c1 { + status = "okay"; +}; + &uart2 { pinctrl-names = "default"; pinctrl-0 = <&uart2m0_xfer>; status = "okay"; }; +&uart4 { + pinctrl-names = "default"; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&cru SCLK_RTC32K>; + clock-names = "lpo"; + pinctrl-names = "default"; + pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>; + device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + max-speed = <1500000>; + }; +}; + +&tsadc{ + status = "okay"; +}; + &usb20_otg { status = "okay"; }; diff --git a/patch/kernel/archive/rockchip64-6.9/dt/rk3308-sakurapi-rk3308b.dts b/patch/kernel/archive/rockchip64-6.9/dt/rk3308-sakurapi-rk3308b.dts index 535e709df..a9b576c89 100755 --- a/patch/kernel/archive/rockchip64-6.9/dt/rk3308-sakurapi-rk3308b.dts +++ b/patch/kernel/archive/rockchip64-6.9/dt/rk3308-sakurapi-rk3308b.dts @@ -231,6 +231,20 @@ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + bluetooth { + bt_reg_on: bt-reg-on { + rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_host: bt-wake-host { + rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + host_wake_bt: host-wake-bt { + rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm0 { @@ -265,12 +279,38 @@ status = "okay"; }; +&i2c1 { + status = "okay"; +}; + &uart2 { pinctrl-names = "default"; pinctrl-0 = <&uart2m0_xfer>; status = "okay"; }; +&uart4 { + pinctrl-names = "default"; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&cru SCLK_RTC32K>; + clock-names = "lpo"; + pinctrl-names = "default"; + pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>; + device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; + max-speed = <1500000>; + }; +}; + +&tsadc{ + status = "okay"; +}; + &usb20_otg { status = "okay"; };