Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chuan Liu <chuan.liu@amlogic.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/13] soc: amlogic: clk-measure: Add more SoCs to support clk-measure
Date: Tue, 19 Aug 2025 11:32:07 +0800	[thread overview]
Message-ID: <673d8146-1cc6-430f-81fe-9e99896a56f5@amlogic.com> (raw)
In-Reply-To: <8e64245a-d7ce-40b7-b884-84a7234c4a3e@linaro.org>

Hi Neil:

     Thanks for review. Here I'll briefly outline the background for 
this patch series:

The motivation for moving the data to DTS is primarily to reduce memory
consumption. Currently, this issue is easily overlooked since we have only
submitted support for a small number of chips upstream. However, as more 
SoCs
adopt clk-measure, this problem will become increasingly significant (we've
already encountered it frequently in our internal branches).

Moving the data to DT can also make our clk-measure driver more 'common'
by encapsulating chip-specific hardware variations in the DT rather than
requiring frequent driver modifications. This approach should help reduce
long-term maintenance costs to some extent?

Admittedly, defining this data in DT may appear less organized at first 
glance,
this approach effectively addresses the dilemma we're currently facing. 
If you
have better suggestions, we're happy to adapt. However, the current 
approach is
critical for memory-sensitive scenarios, and maintaining it otherwise 
has proven
quite challenging for us.


On 8/18/2025 4:01 PM, Neil Armstrong wrote:
> [ EXTERNAL EMAIL ]
>
> Hi,
>
> On 15/08/2025 10:37, Chuan Liu via B4 Relay wrote:
>> As support for clk-measure expands across more SoCs, the current
>> approach of defining all SoC-specific clk-measure table data in the
>> driver .c file results in progressively larger compiled images,
>> resulting in memory wastage.
>>
>> Move SoC-specific clk-measure tables to DTS definitions and extend
>> support for additional SoCs (A4, A5, S7, S7D and S6).
>
> This breaks ABI and most importantly the clk measure feature on new 
> kernel
> and old DTs. So instead keep it as-is for current platforms and try to
> add this for new platforms.
>
> But the fact you need clkmsr-reg-v2 means you at least need to add a 
> generic
> compatible for v2 register map and drop this property.
>
> Overall, I'm not a great fan of this, it moves data to DT and duplicates
> the strings in _all_ board DTs, which is worse in fine.


If you agree with this approach, I can refine it based on your feedback by:
1. Adding a new compatible property: "amlogic,clk-measure-v2".
2. Implementing a struct platform_driver meson_msr_driver_v2 for the newly
supported SoCs.

I may not have fully grasped your intent, please correct me if I've
misinterpreted anything. Thank you!


>
> Neil
>
>>
>> Signed-off-by: Chuan Liu <chuan.liu@amlogic.com>
>> ---
>> Chuan Liu (13):
>>        dt-bindings: soc: amlogic: Add clk-measure related properties
>>        soc: amlogic: clk-measure: Remove the msr_data from clk-measure
>>        ARM: dts: amlogic: add clk-measure IDs and names for meson SoC 
>> family
>>        arm64: dts: amlogic: add clk-measure IDs and names for Amlogic 
>> SoCs
>>        dt-bindings: soc: amlogic: Unify the compatible property for 
>> clk-measure
>>        soc: amlogic: clk-measure: Unify the compatible property
>>        ARM: dts: amlogic: Unify the compatible property for clk-measure
>>        arm64: dts: amlogic: Unify the compatible property for 
>> clk-measure
>>        arm64: dts: amlogic: A4: Add clk-measure controller node
>>        arm64: dts: amlogic: A5: Add clk-measure controller node
>>        arm64: dts: amlogic: S7: Add clk-measure controller node
>>        arm64: dts: amlogic: S7D: Add clk-measure controller node
>>        arm64: dts: amlogic: S6: Add clk-measure controller node
>>
>>   .../soc/amlogic/amlogic,meson-gx-clk-measure.yaml  |  66 +-
>>   arch/arm/boot/dts/amlogic/meson8.dtsi              |  94 ++-
>>   arch/arm/boot/dts/amlogic/meson8b.dtsi             |  94 ++-
>>   arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi        | 212 +++++
>>   arch/arm64/boot/dts/amlogic/amlogic-a5.dtsi        | 202 +++++
>>   arch/arm64/boot/dts/amlogic/amlogic-c3.dtsi        | 275 +++++-
>>   arch/arm64/boot/dts/amlogic/amlogic-s6.dtsi        | 312 +++++++
>>   arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi        | 253 ++++++
>>   arch/arm64/boot/dts/amlogic/amlogic-s7d.dtsi       | 243 ++++++
>>   arch/arm64/boot/dts/amlogic/meson-axg.dtsi         | 144 +++-
>>   arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi  |   2 +-
>>   arch/arm64/boot/dts/amlogic/meson-g12a.dtsi        | 229 +++++
>>   arch/arm64/boot/dts/amlogic/meson-gx.dtsi          | 136 ++-
>>   arch/arm64/boot/dts/amlogic/meson-s4.dtsi          | 301 ++++++-
>>   arch/arm64/boot/dts/amlogic/meson-sm1.dtsi         | 255 +++++-
>>   drivers/soc/amlogic/meson-clk-measure.c            | 930 
>> ++-------------------
>>   16 files changed, 2877 insertions(+), 871 deletions(-)
>> ---
>> base-commit: e5624eb63c452efa753759e74eb27fe132eb577c
>> change-id: 20250731-add-more-socs-to-support-clk_measure-b2a43590d5aa
>>
>> Best regards,
>

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

  reply	other threads:[~2025-08-19  3:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15  8:37 [PATCH 00/13] soc: amlogic: clk-measure: Add more SoCs to support clk-measure Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 01/13] dt-bindings: soc: amlogic: Add clk-measure related properties Chuan Liu via B4 Relay
2025-08-20  8:08   ` Krzysztof Kozlowski
2025-08-15  8:37 ` [PATCH 02/13] soc: amlogic: clk-measure: Remove the msr_data from clk-measure Chuan Liu via B4 Relay
2025-08-20  8:10   ` Krzysztof Kozlowski
2025-08-15  8:37 ` [PATCH 03/13] ARM: dts: amlogic: add clk-measure IDs and names for meson SoC family Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 04/13] arm64: dts: amlogic: add clk-measure IDs and names for Amlogic SoCs Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 05/13] dt-bindings: soc: amlogic: Unify the compatible property for clk-measure Chuan Liu via B4 Relay
2025-08-20  8:09   ` Krzysztof Kozlowski
2025-08-15  8:37 ` [PATCH 06/13] soc: amlogic: clk-measure: Unify the compatible property Chuan Liu via B4 Relay
2025-08-20  8:11   ` Krzysztof Kozlowski
2025-08-15  8:37 ` [PATCH 07/13] ARM: dts: amlogic: Unify the compatible property for clk-measure Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 08/13] arm64: " Chuan Liu via B4 Relay
2025-08-20  8:11   ` Krzysztof Kozlowski
2025-08-15  8:37 ` [PATCH 09/13] arm64: dts: amlogic: A4: Add clk-measure controller node Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 10/13] arm64: dts: amlogic: A5: " Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 11/13] arm64: dts: amlogic: S7: " Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 12/13] arm64: dts: amlogic: S7D: " Chuan Liu via B4 Relay
2025-08-15  8:37 ` [PATCH 13/13] arm64: dts: amlogic: S6: " Chuan Liu via B4 Relay
2025-08-18  8:01 ` [PATCH 00/13] soc: amlogic: clk-measure: Add more SoCs to support clk-measure Neil Armstrong
2025-08-19  3:32   ` Chuan Liu [this message]
2025-08-20  8:12     ` Krzysztof Kozlowski
2025-08-20 10:05       ` Chuan Liu

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=673d8146-1cc6-430f-81fe-9e99896a56f5@amlogic.com \
    --to=chuan.liu@amlogic.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --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@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.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