[PATCH v1 0/4] dts: amlogic: fix FCLK{3,4} clocks for new PWM controller binding

Martin Blumenstingl posted 4 patches 9 months, 3 weeks ago
arch/arm/boot/dts/amlogic/meson8.dtsi             | 6 +++---
arch/arm/boot/dts/amlogic/meson8b.dtsi            | 6 +++---
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 +++---
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi       | 6 +++---
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi        | 6 +++---
5 files changed, 15 insertions(+), 15 deletions(-)
[PATCH v1 0/4] dts: amlogic: fix FCLK{3,4} clocks for new PWM controller binding
Posted by Martin Blumenstingl 9 months, 3 weeks ago
Christian has reported Bluetooth issues on some of his boards, for
example on a (GXBB) WeTek Play 2:
  # dmesg | grep -i blue
  Bluetooth: Core ver 2.22
  NET: Registered PF_BLUETOOTH protocol family
  Bluetooth: HCI device and connection manager initialized
  Bluetooth: HCI socket layer initialized
  Bluetooth: L2CAP socket layer initialized
  Bluetooth: SCO socket layer initialized
  Bluetooth: HCI UART driver ver 2.3
  Bluetooth: HCI UART protocol H4 registered
  Bluetooth: HCI UART protocol Three-wire (H5) registered
  Bluetooth: HCI UART protocol Broadcom registered
  Bluetooth: HCI UART protocol QCA registered
  Bluetooth: HCI UART protocol AML registered
  Bluetooth: null: hu 0000000023fa9791
  Bluetooth: hci0: hu 0000000023fa9791
  Bluetooth: hci0: hu 0000000023fa9791 skb 000000003f7acf2f
  Bluetooth: hci0: command 0x0c03 tx timeout
  Bluetooth: hci0: BCM: Reset failed (-110)
  Bluetooth: hci0: hu 0000000023fa9791
  Bluetooth: hci0: hu 0000000023fa9791

It turns out there's a typo in the references to the untested/unknown
clock input that made it into the already applied series
"dts: amlogic: switch to the new PWM controller binding" [0]

The original goal was to skip this input. This can be achieved by
specifying a clock input as <0> (which this series does). When using
<> (note the lack of 0) the clock is completely ignored when parsing
the .dtb, resulting in a shift in index of the FCLK DIV4 / DIV3 inputs.
This then results in the PWM controller driver calculating the
frequencies for a different clock compared to what the actual hardware
uses.

Neil, please apply this as a fix for the next 6.15-rc.


[0] https://lore.kernel.org/linux-amlogic/20241227212514.1376682-1-martin.blumenstingl@googlemail.com/


Martin Blumenstingl (4):
  ARM: dts: amlogic: meson8: fix reference to unknown/untested PWM clock
  ARM: dts: amlogic: meson8b: fix reference to unknown/untested PWM
    clock
  arm64: dts: amlogic: gx: fix reference to unknown/untested PWM clock
  arm64: dts: amlogic: g12: fix reference to unknown/untested PWM clock

 arch/arm/boot/dts/amlogic/meson8.dtsi             | 6 +++---
 arch/arm/boot/dts/amlogic/meson8b.dtsi            | 6 +++---
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 +++---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi       | 6 +++---
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi        | 6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)

-- 
2.49.0
Re: [PATCH v1 0/4] dts: amlogic: fix FCLK{3,4} clocks for new PWM controller binding
Posted by Neil Armstrong 9 months, 3 weeks ago
Hi,

On Sun, 20 Apr 2025 18:47:57 +0200, Martin Blumenstingl wrote:
> Christian has reported Bluetooth issues on some of his boards, for
> example on a (GXBB) WeTek Play 2:
>   # dmesg | grep -i blue
>   Bluetooth: Core ver 2.22
>   NET: Registered PF_BLUETOOTH protocol family
>   Bluetooth: HCI device and connection manager initialized
>   Bluetooth: HCI socket layer initialized
>   Bluetooth: L2CAP socket layer initialized
>   Bluetooth: SCO socket layer initialized
>   Bluetooth: HCI UART driver ver 2.3
>   Bluetooth: HCI UART protocol H4 registered
>   Bluetooth: HCI UART protocol Three-wire (H5) registered
>   Bluetooth: HCI UART protocol Broadcom registered
>   Bluetooth: HCI UART protocol QCA registered
>   Bluetooth: HCI UART protocol AML registered
>   Bluetooth: null: hu 0000000023fa9791
>   Bluetooth: hci0: hu 0000000023fa9791
>   Bluetooth: hci0: hu 0000000023fa9791 skb 000000003f7acf2f
>   Bluetooth: hci0: command 0x0c03 tx timeout
>   Bluetooth: hci0: BCM: Reset failed (-110)
>   Bluetooth: hci0: hu 0000000023fa9791
>   Bluetooth: hci0: hu 0000000023fa9791
> 
> [...]

Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v6.15/fixes)

[1/4] ARM: dts: amlogic: meson8: fix reference to unknown/untested PWM clock
      https://git.kernel.org/amlogic/c/3409f843c04df9434beb637602382eeee90e0bee
[2/4] ARM: dts: amlogic: meson8b: fix reference to unknown/untested PWM clock
      https://git.kernel.org/amlogic/c/a994b58f9d1163c4f559bd169721f0fc15866919
[3/4] arm64: dts: amlogic: gx: fix reference to unknown/untested PWM clock
      https://git.kernel.org/amlogic/c/511d388a4007ba580feeb2fd2e9ba35a614c093f
[4/4] arm64: dts: amlogic: g12: fix reference to unknown/untested PWM clock
      https://git.kernel.org/amlogic/c/a08b28c1ed454502abeb90ffa4a55445dae1d22a

These changes has been applied on the intermediate git tree [1].

The v6.15/fixes branch will then be sent via a formal Pull Request to the Linux SoC maintainers
for inclusion in their intermediate git branches in order to be sent to Linus during
the next merge window, or sooner if it's a set of fixes.

In the cases of fixes, those will be merged in the current release candidate
kernel and as soon they appear on the Linux master branch they will be
backported to the previous Stable and Long-Stable kernels [2].

The intermediate git branches are merged daily in the linux-next tree [3],
people are encouraged testing these pre-release kernels and report issues on the
relevant mailing-lists.

If problems are discovered on those changes, please submit a signed-off-by revert
patch followed by a corrective changeset.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git

-- 
Neil
Re: [PATCH v1 0/4] dts: amlogic: fix FCLK{3,4} clocks for new PWM controller binding
Posted by neil.armstrong@linaro.org 9 months, 3 weeks ago
On 20/04/2025 18:47, Martin Blumenstingl wrote:
> Christian has reported Bluetooth issues on some of his boards, for
> example on a (GXBB) WeTek Play 2:
>    # dmesg | grep -i blue
>    Bluetooth: Core ver 2.22
>    NET: Registered PF_BLUETOOTH protocol family
>    Bluetooth: HCI device and connection manager initialized
>    Bluetooth: HCI socket layer initialized
>    Bluetooth: L2CAP socket layer initialized
>    Bluetooth: SCO socket layer initialized
>    Bluetooth: HCI UART driver ver 2.3
>    Bluetooth: HCI UART protocol H4 registered
>    Bluetooth: HCI UART protocol Three-wire (H5) registered
>    Bluetooth: HCI UART protocol Broadcom registered
>    Bluetooth: HCI UART protocol QCA registered
>    Bluetooth: HCI UART protocol AML registered
>    Bluetooth: null: hu 0000000023fa9791
>    Bluetooth: hci0: hu 0000000023fa9791
>    Bluetooth: hci0: hu 0000000023fa9791 skb 000000003f7acf2f
>    Bluetooth: hci0: command 0x0c03 tx timeout
>    Bluetooth: hci0: BCM: Reset failed (-110)
>    Bluetooth: hci0: hu 0000000023fa9791
>    Bluetooth: hci0: hu 0000000023fa9791
> 
> It turns out there's a typo in the references to the untested/unknown
> clock input that made it into the already applied series
> "dts: amlogic: switch to the new PWM controller binding" [0]
> 
> The original goal was to skip this input. This can be achieved by
> specifying a clock input as <0> (which this series does). When using
> <> (note the lack of 0) the clock is completely ignored when parsing
> the .dtb, resulting in a shift in index of the FCLK DIV4 / DIV3 inputs.
> This then results in the PWM controller driver calculating the
> frequencies for a different clock compared to what the actual hardware
> uses.
> 
> Neil, please apply this as a fix for the next 6.15-rc.
> 
> 
> [0] https://lore.kernel.org/linux-amlogic/20241227212514.1376682-1-martin.blumenstingl@googlemail.com/
> 
> 
> Martin Blumenstingl (4):
>    ARM: dts: amlogic: meson8: fix reference to unknown/untested PWM clock
>    ARM: dts: amlogic: meson8b: fix reference to unknown/untested PWM
>      clock
>    arm64: dts: amlogic: gx: fix reference to unknown/untested PWM clock
>    arm64: dts: amlogic: g12: fix reference to unknown/untested PWM clock
> 
>   arch/arm/boot/dts/amlogic/meson8.dtsi             | 6 +++---
>   arch/arm/boot/dts/amlogic/meson8b.dtsi            | 6 +++---
>   arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 +++---
>   arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi       | 6 +++---
>   arch/arm64/boot/dts/amlogic/meson-gxl.dtsi        | 6 +++---
>   5 files changed, 15 insertions(+), 15 deletions(-)
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>