|
|
Log in / Subscribe / Register

Add Loongson-2k0500 and Loongson-2k2000 clock support

From:  Binbin Zhou <zhoubinbin-AT-loongson.cn>
To:  Binbin Zhou <zhoubb.aaron-AT-gmail.com>, Huacai Chen <chenhuacai-AT-loongson.cn>, Michael Turquette <mturquette-AT-baylibre.com>, Stephen Boyd <sboyd-AT-kernel.org>, Rob Herring <robh+dt-AT-kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt-AT-linaro.org>, Conor Dooley <conor+dt-AT-kernel.org>, Yinbo Zhu <zhuyinbo-AT-loongson.cn>
Subject:  [PATCH v3 0/6] Add Loongson-2k0500 and Loongson-2k2000 clock support
Date:  Thu, 11 Apr 2024 10:58:05 +0800
Message-ID:  <cover.1712731524.git.zhoubinbin@loongson.cn>
Cc:  Huacai Chen <chenhuacai-AT-kernel.org>, loongson-kernel-AT-lists.loongnix.cn, linux-clk-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, Xuerui Wang <kernel-AT-xen0n.name>, loongarch-AT-lists.linux.dev, Binbin Zhou <zhoubinbin-AT-loongson.cn>
Archive-link:  Article

Hi all:

As we know, the Loongson-2K family of SoCs (ls2k0500/ls2k1000/ls2k2000)
have a similar clock structure, and I support them to be configured with
different parameters (e.g., register offsets, etc.).

To make it easier to add support for different SoCs, I refactored the
original driver to make the whole driver as understandable as possible.

Briefly, I have divided all clocks into three categories according to
their properties and their parent clocks: Independent PLLs, clocks based
on frequency scales, and clock dividers.

Thanks.

----
V3:
- Remove the dts-related patches and update dts at once after all relevant
  drivers are complete.
patch(1/6):
 - Drop unsuitable comments.

Link to V2:
https://lore.kernel.org/all/cover.1711504700.git.zhoubinb...

V2:
patch(1/8):
 - Drop LOONGSON2_CLK_END, for it is not a binding.
patch(1/8)(3/8)(5/8):
 - Add Acked-by tag from Conor, Thanks.

Link to V1:
https://lore.kernel.org/all/cover.1710926402.git.zhoubinb...

Binbin Zhou (6):
  dt-bindings: clock: Add Loongson-2K expand clock index
  clk: clk-loongson2: Refactor driver for adding new platforms
  dt-bindings: clock: loongson2: Add Loongson-2K0500 compatible
  clk: clk-loongson2: Add Loongson-2K0500 clock support
  dt-bindings: clock: loongson2: Add Loongson-2K2000 compatible
  clk: clk-loongson2: Add Loongson-2K2000 clock support

 .../bindings/clock/loongson,ls2k-clk.yaml     |   4 +-
 drivers/clk/clk-loongson2.c                   | 549 ++++++++++--------
 include/dt-bindings/clock/loongson,ls2k-clk.h |  54 +-
 3 files changed, 329 insertions(+), 278 deletions(-)

-- 
2.43.0




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds