Skip to contentSkip to conversation

arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes

PATCH Applied Diederik de Haas 3 participants 3 messages Oct 18, 2024 – Oct 23, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes

Paragraph "3.4 Power up Timing Sequence" of the AzureWave-CM256SM datasheet mentions the following about the BT_REG_ON pin, which is connected to GPIO0_C4_d:

When this pin is low and WL_REG_ON is high,
the BT section is in reset.

Therefor set that pin to GPIO_ACTIVE_HIGH so that it can be pulled low for a reset.
If set to GPIO_ACTIVE_LOW, the following errors are observed:

Bluetooth: hci0: command 0x0c03 tx timeout
Bluetooth: hci0: BCM: Reset failed (-110)

So fix the GPIO polarity by setting it to ACTIVE_HIGH. This also matches what other devices with the same BT device have.

Fixes a3a625086192 ("arm64: dts: rockchip: Fix reset-gpios property on brcm BT nodes")

---
Changes in v2:
- Better commit description with references to the datasheet
- Dropped the (self-)blame as it's not useful to evaluate the usefulness of this patch

 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 2 +-
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +1 -1
index a477bd992b40..0131f2cdd312 100644
@@ -688,7 +688,7 @@ bluetooth {
 		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
-		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
+		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
 		vbat-supply = <&vcc_wl>;
 		vddio-supply = <&vcca_1v8_pmu>;
 	};
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi +1 -1
index e9fa9bee995a..1e36f73840da 100644
@@ -404,7 +404,7 @@ bluetooth {
 		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
-		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
+		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
 		vbat-supply = <&vcc_3v3>;
 		vddio-supply = <&vcc_1v8>;
 	};
Signature · 1 line
2.45.2
maintainer Applied
#1 lore raw
Quoted 8 lines · Diederik de Haas

Paragraph "3.4 Power up Timing Sequence" of the AzureWave-CM256SM datasheet mentions the following about the BT_REG_ON pin, which is connected to GPIO0_C4_d:

When this pin is low and WL_REG_ON is high,
the BT section is in reset.

[...]

Applied, thanks!

[1/1] arm64: dts: rockchip: Correct GPIO polarity on brcm BT nodes

      commit: 273070dad96f046e622173b595e4719b82188376

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>
#2 lore raw
In reply to Diederik de Haas

Hello Diederik,

Quoted 14 lines · Diederik de Haas

Paragraph "3.4 Power up Timing Sequence" of the AzureWave-CM256SM datasheet mentions the following about the BT_REG_ON pin, which is connected to GPIO0_C4_d:

When this pin is low and WL_REG_ON is high,
the BT section is in reset.

Therefor set that pin to GPIO_ACTIVE_HIGH so that it can be pulled low for a reset.
If set to GPIO_ACTIVE_LOW, the following errors are observed:

Bluetooth: hci0: command 0x0c03 tx timeout
Bluetooth: hci0: BCM: Reset failed (-110)

Quoted 6 lines

So fix the GPIO polarity by setting it to ACTIVE_HIGH. This also matches what other devices with the same BT device have.

Fixes a3a625086192 ("arm64: dts: rockchip: Fix reset-gpios property

on brcm BT nodes")

I'm a bit late to the party, :) but just wanted to confirm that the information provided in the patch description is correct.

Quoted 39 lines

---
Changes in v2:
- Better commit description with references to the datasheet
- Dropped the (self-)blame as it's not useful to evaluate the usefulness
of this patch

 arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi  | 2 +-
 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +1 -1
index a477bd992b40..0131f2cdd312 100644
@@ -688,7 +688,7 @@ bluetooth {
 		host-wakeup-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
 		pinctrl-0 = <&bt_enable_h>, <&bt_host_wake_l>, <&bt_wake_h>;
 		pinctrl-names = "default";
-		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
+		shutdown-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
 		vbat-supply = <&vcc_wl>;
 		vddio-supply = <&vcca_1v8_pmu>;
 	};
arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi +1 -1
index e9fa9bee995a..1e36f73840da 100644
@@ -404,7 +404,7 @@ bluetooth {
 		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
-		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
+		shutdown-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
 		vbat-supply = <&vcc_3v3>;
 		vddio-supply = <&vcc_1v8>;
 	};