From: John Clark <inindev@gmail.com>
To: linux-rockchip@lists.infradead.org
Subject: Re: Issue and question: anther pin config issue
Date: Sun, 24 Dec 2023 17:53:43 -0500 [thread overview]
Message-ID: <b217ef9f-e933-a9d9-0c04-0c4973cc1ed7@gmail.com> (raw)
In-Reply-To: <OS0P286MB06419C18DF7CA73B2E33A907CD9AA@OS0P286MB0641.JPNP286.PROD.OUTLOOK.COM>
> 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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2023-12-24 22:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-24 9:02 Issue and question: anther pin config issue Zhang Ning
2023-12-24 22:53 ` John Clark [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b217ef9f-e933-a9d9-0c04-0c4973cc1ed7@gmail.com \
--to=inindev@gmail.com \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox