Issue and question: anther pin config issue

John Clark inindev at gmail.com
Sun Dec 24 14:53:43 PST 2023


> Hi, Developers
>
> I want to report another pin config issue for rk3566-roc-pc
>
>
>          bluetooth {
>                  compatible = "brcm,bcm43438-bt";
>                  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_enable_h>;
>                  vbat-supply = <&vcc3v3_sys>;
>                  vddio-supply = <&vcca1v8_pmu>;
>          };
>
>          bt {
>                  bt_enable_h: bt-enable-h {
>                          rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
>                  };
>
>                  bt_host_wake_l: bt-host-wake-l {
>                          rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_down>;
>                  };
>
>                  bt_wake_l: bt-wake-l {
>                          rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
>                  };
>          };
>
> I think pin configs are wrong. same as previous report, I don't have
> schemetics, thus not able to write a patch.

If these are the schematics, try these GPIOs:

https://drive.google.com/drive/folders/1uVSDLxdVoOLizdvEAig-08CH35e1UExT
GPIO2_B7_d  BT_REG_ON_H_GPIO2_B7
GPIO2_C0_d  BT_WAKE_HOST_H_GPIO2_C0
GPIO2_C1_d  HOST_WAKE_BT_H_GPIO2_C1


bt_enable_h: bt-enable-h {
         rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
};

bt_host_wake_l: bt-host-wake-l {
         rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
};

bt_wake_l: bt-wake-l {
         rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
};

>
> meanwhile, I want to ask a question about enable same bluetooth chip on
> another RK3566 board for mainline kernel.
>
> in its vendor OS, dtb dump shows:
>          wireless-bluetooth {
>                  pinctrl-names = "default\0rts_gpio";
>                  pinctrl-0 = <0x13c>;
>                  clock-names = "ext_clock";
>                  clocks = <0x138 0x01>;
>                  BT,wake_gpio = <0x13a 0x11 0x00>;
>                  BT,reset_gpio = <0x13a 0x0f 0x00>;
>                  uart_rts_gpios = <0x13a 0x0d 0x01>;
>                  compatible = "bluetooth-platdata";
>                  BT,wake_host_irq = <0x13a 0x10 0x00>;
>                  pinctrl-1 = <0x13d>;
>                  status = "okay";
>                  phandle = <0x1e7>;
>          };
>
> phandle 0x13a is gpio2. phandle 0x138 is rk809 pmic.
> pinctrl-0, pinctrl-1 and uart_rts_gpio are decription for gpio2 RK_PB5, which should be uart1 rtsn pin.
>
> thus I write my dts for bluetooth:
>
> &uart1 {
> 	pinctrl-names = "default";
> 	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn &uart1m0_rtsn>;
> 	status = "okay";
> 	uart-has-rtscts;
>
> 	bluetooth {
> 		compatible = "brcm,bcm43438-bt";
> 		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_enable_h>;
> 		vbat-supply = <&vcc3v3_sys>;
> 		vddio-supply = <&vcca1v8_pmu>;
> 	};
> };
>
> but kernel log:
> [   14.433949] Bluetooth: hci0: command 0xfc18 tx timeout
> [   22.498017] Bluetooth: hci0: BCM: failed to write update baudrate (-110)
> [   22.498690] Bluetooth: hci0: Failed to set baudrate
> [   24.514009] Bluetooth: hci0: command 0x0c03 tx timeout
> [   32.737999] Bluetooth: hci0: BCM: Reset failed (-110)
>
> I don't where I'm wrong, don't know how to do next step.
> thus ask commuinte, could you give me some advices, let me know how to
> debug or fix it.
>
> BR.
> Ning.
>
> full dtb dump from vendor os:
> https://forum.armbian.com/applications/core/interface/file/attachment.php?id=11326&key=a140f008da42b8d80b750f09306c3d73
> full dts for mainline:
> https://github.com/zhangn1985/linux-stable/tree/jianpian/arch/arm64/boot/dts/rockchip/rk3566-jianpian.dts
>
> BR.
> Ning.
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>



More information about the Linux-rockchip mailing list