[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <36d63dde-6bfc-925b-51ae-ee801dcfa681@amlogic.com>
Date: Tue, 28 Dec 2021 19:24:11 +0800
From: Yu Tu <yu.tu@...ogic.com>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
CC: <linux-serial@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-amlogic@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Neil Armstrong <narmstrong@...libre.com>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>
Subject: Re: [PATCH 3/3] tty: serial: meson: add UART driver compatible with
S4 SoC on-chip
Hi Martin and Jeromeļ¼
Thank you very much for your reply. I have learned a lot from your
communication.
On 2021/12/28 4:04, Martin Blumenstingl wrote:
> [ EXTERNAL EMAIL ]
>
> Hello,
>
> On Mon, Dec 27, 2021 at 7:56 AM Yu Tu <yu.tu@...ogic.com> wrote:
> [...]
>>> Does the new S4 SoC use an external 12MHz XTAL or does it use a 24MHz XTAL?
>>> If there's still a 24MHz XTAL then I think this description is not
>>> correct - at least based on how I understand the UART controller.
>>>
>> The S4 SoC uses 12MHz(UART_EE_A_REG5[27]=0x1,the bit is set in romcode).
>> This register description is the same as the G12A and G12B you know.
> Thank you for this explanation!
> So the problem is that we're not touching bit 26 and bit 27 - and with
> the updated romcode you would not get any serial output since the
> divider is calculated off the wrong clock.
>
> I agree with Jerome that we shouldn't put a flag in device-tree.
>
> Also I did some experimenting with Jerome's idea to implement the
> clocks using CCF (common clock framework), see the attached patches.
> It was a bit tricky because some initial clean-ups were needed in the
> serial driver.
> Note: I have only briefly tested this on a 32-bit Meson8m2 SoC, see my
> attached patches and the clk_summary debugfs output.
> In fact, I expect that there are some issues with at least one of the
> patches as the whole bit 26 and bit 27 code is untested.
>
> Do you see any problems with this patch?
> Could you try to implement CCF support with the idea from the attached
> patches (you don't need to re-use them, I just wrote them to make it
> clearer in our discussion what we're talking about).
>
I couldn't agree with you more. I have verified it on a 64-bit S4
platform. Please refer to the attachment for verification output
information.
I will prepare the second version of patch according to the example
ideas you provided.
>
> Best regards,
> Martin
View attachment "s4-clk-debug-output.txt" of type "text/plain" (1440 bytes)
Powered by blists - more mailing lists