mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Lucas Tanure <tanure@linux.com>
To: Ronald Claveau <linux-kernel-dev@aliel.fr>,
	Xianwei Zhao <xianwei.zhao@amlogic.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH 1/2] arm64: dts: amlogic: t7: use the real UART pclk
Date: Sun, 23 Aug 2026 12:39:00 +0100	[thread overview]
Message-ID: <0969d872-faff-4b0f-81ad-972b7aa9bb7f@linux.com> (raw)
In-Reply-To: <6673edea-6822-4368-9374-29f92195fcf5@aliel.fr>

On 19/08/2026 08:25, Ronald Claveau wrote:
> On 8/19/26 4:39 AM, Xianwei Zhao wrote:
>> Hi Lucas,
>>
>> On 2026/8/19 03:11, Lucas Tanure wrote:
>>> uart_a lists the 24MHz crystal for all three of its clocks, because
>>> the T7 clock controller driver did not exist when these boards were
>>> added.
>>>
>>> That leaves the real UART bus clock without a user, so the kernel
>>> turns it off when it disables unused clocks at the end of boot, and
>>> the board hangs.
>>>
>>> Point uart_a at the real clocks, the way meson-s4.dtsi does, and drop
>>> the placeholders from the two board files.
>>>
>>> Fixes: 4fef056588f5 ("arm64: dts: amlogic-t7-a311d2-khadas-vim4: add
>>> initial device-tree")
>>> Fixes: 6f048cc7a635 ("arm64: dts: add board AN400")
>>> Signed-off-by: Lucas Tanure<tanure@linux.com>
>>> Assisted-by: Claude:claude-fable-5
>>> ---
>>>    arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts       | 2 --
>>>    arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 2 --
>>>    arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi                   | 4 ++++
>>>    3 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>>> b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>>> index cab2ee9ea0d3..dcbcd08a78b9 100644
>>> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-an400.dts
>>> @@ -33,7 +33,5 @@ xtal: xtal-clk {
>>>    };
>>>
>>>    &uart_a {
>>> -       clocks = <&xtal>, <&xtal>,
>>> <&xtal>;
>>> -       clock-names = "xtal", "pclk", "baud";
>>>           status = "okay";
>>>    };
>>> diff --git
>>> a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>>> b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>>> index c41525a34b72..677069e58f30 100644
>>> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>>> @@ -266,6 +266,4 @@ &sd_emmc_c {
>>>
>>>    &uart_a {
>>>           status = "okay";
>>> -       clocks = <&xtal>, <&xtal>,
>>> <&xtal>;
>>> -       clock-names = "xtal", "pclk", "baud";
>>>    };
>>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>>> b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>>> index cc371fcd1896..7847582e77ed 100644
>>> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
>>> @@ -587,6 +587,10 @@ uart_a: serial@78000 {
>>>                                   compatible = "amlogic,t7-uart",
>>> "amlogic,meson-s4-uart";
>>>                                   reg = <0x0 0x78000 0x0 0x18>;
>>>                                   interrupts = <GIC_SPI 168
>>> IRQ_TYPE_EDGE_RISING>;
>>> +                               clocks = <&xtal>,
>>> +                                        <&clkc_periphs
>>> CLKID_SYS_UART_A>,
>>> +                                        <&xtal>;
>>> +                               clock-names = "xtal", "pclk", "baud";
>>>                                   status = "disabled";
>>>                           };
>>
>> I agree with moving the UART clock configuration to the DTSI file.
>> However, it seems a little odd to keep the XTAL clock definition in the
>> DTS, as the alias may not be consistent across different boards, which
>> could result in compilation errors. Could we move the XTAL clock
>> definition to the DTSI as well, similar to other Amlogic SoCs?
> 
> It seems similar to changes in this series :
> 
> https://lore.kernel.org/all/20260420-add-bluetooth-t7-vim4-v4-0-9505df0e7016@aliel.fr/
> 
> What do you think ?
> 
Thanks for pointing out that series, though I wasn't aware of it.
And after reading I don't agree with it. The clocks are not redundant, 
they are there because we agreed sometime ago that xtal belongs to the 
board files.
So I still vote for my change in v2, that I will send in a few minutes.

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2026-08-23 11:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 19:11 [PATCH 0/2] arm64: dts: amlogic: t7: fix UART clock and SD card recovery Lucas Tanure
2026-08-18 19:11 ` [PATCH 1/2] arm64: dts: amlogic: t7: use the real UART pclk Lucas Tanure
2026-08-19  2:39   ` Xianwei Zhao
2026-08-19  7:25     ` Ronald Claveau
2026-08-23 11:39       ` Lucas Tanure [this message]
2026-08-24  9:15         ` Ronald Claveau
2026-08-24  9:32           ` Lucas Tanure
2026-08-23 11:29     ` Lucas Tanure
2026-08-18 19:11 ` [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: allow the SD card to be power cycled Lucas Tanure

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=0969d872-faff-4b0f-81ad-972b7aa9bb7f@linux.com \
    --to=tanure@linux.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel-dev@aliel.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=xianwei.zhao@amlogic.com \
    /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

all inboxes | Powered by JetHome®