* [PATCH v3 1/2] dt-bindings: clock: loongson,ls2k: Add ls2k1000 compatible and deprecate legacy
[not found] <20260322152030.60257-1-wjjsn@qq.com>
@ 2026-03-22 15:20 ` wjjsn
2026-03-22 20:28 ` Krzysztof Kozlowski
2026-03-22 15:20 ` [PATCH v3 2/2] clk: loongson2: Add ls2k1000 compatible wjjsn
1 sibling, 1 reply; 3+ messages in thread
From: wjjsn @ 2026-03-22 15:20 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, chenhuacai, zhuyinbo, mturquette, sboyd
Cc: linux-clk, linux-kernel, loongarch, kernel, devicetree, wjjsn
Add a SoC-specific compatible string "loongson,ls2k1000-clk" for
Loongson-2K1000.
Mark the legacy "loongson,ls2k-clk" compatible as deprecated using
the structured "deprecated: true" property instead of relying on
textual description.
Update the example to use the new compatible.
Signed-off-by: wjjsn <wjjsn@qq.com>
---
.../bindings/clock/loongson,ls2k-clk.yaml | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml b/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml
index c07ad1f85857..b0ef5cd5af32 100644
--- a/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml
+++ b/Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml
@@ -15,11 +15,14 @@ description: |
properties:
compatible:
- enum:
- - loongson,ls2k0300-clk
- - loongson,ls2k0500-clk
- - loongson,ls2k-clk # This is for Loongson-2K1000
- - loongson,ls2k2000-clk
+ oneOf:
+ - enum:
+ - loongson,ls2k0300-clk
+ - loongson,ls2k0500-clk
+ - loongson,ls2k1000-clk
+ - loongson,ls2k2000-clk
+ - const: loongson,ls2k-clk
+ deprecated: true
reg:
maxItems: 1
@@ -69,7 +72,7 @@ examples:
};
clk: clock-controller@1fe00480 {
- compatible = "loongson,ls2k-clk";
+ compatible = "loongson,ls2k1000-clk";
reg = <0x1fe00480 0x58>;
#clock-cells = <1>;
clocks = <&ref_100m>;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH v3 2/2] clk: loongson2: Add ls2k1000 compatible
[not found] <20260322152030.60257-1-wjjsn@qq.com>
2026-03-22 15:20 ` [PATCH v3 1/2] dt-bindings: clock: loongson,ls2k: Add ls2k1000 compatible and deprecate legacy wjjsn
@ 2026-03-22 15:20 ` wjjsn
1 sibling, 0 replies; 3+ messages in thread
From: wjjsn @ 2026-03-22 15:20 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, chenhuacai, zhuyinbo, mturquette, sboyd
Cc: linux-clk, linux-kernel, loongarch, kernel, devicetree, wjjsn
Add a SoC-specific compatible string "loongson,ls2k1000-clk" for
Loongson-2K1000.
Update the clock controller in DTS and driver:
- DTS: compatible changed from "loongson,ls2k-clk" to
"loongson,ls2k1000-clk"
- Driver: add { .compatible = "loongson,ls2k1000-clk" }
to of_device_id table while retaining the legacy
"loongson,ls2k-clk" for backward compatibility.
Signed-off-by: wjjsn <wjjsn@qq.com>
---
arch/loongarch/boot/dts/loongson-2k1000.dtsi | 2 +-
drivers/clk/clk-loongson2.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/loongarch/boot/dts/loongson-2k1000.dtsi b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
index ab6a55937e9e..6dff7eacf3f3 100644
--- a/arch/loongarch/boot/dts/loongson-2k1000.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k1000.dtsi
@@ -156,7 +156,7 @@ pctrl: pinctrl@1fe00420 {
};
clk: clock-controller@1fe00480 {
- compatible = "loongson,ls2k-clk";
+ compatible = "loongson,ls2k1000-clk";
reg = <0x0 0x1fe00480 0x0 0x58>;
#clock-cells = <1>;
clocks = <&ref_100m>;
diff --git a/drivers/clk/clk-loongson2.c b/drivers/clk/clk-loongson2.c
index 9c4c6c99db3e..ac075e970699 100644
--- a/drivers/clk/clk-loongson2.c
+++ b/drivers/clk/clk-loongson2.c
@@ -440,8 +440,9 @@ static int loongson2_clk_probe(struct platform_device *pdev)
static const struct of_device_id loongson2_clk_match_table[] = {
{ .compatible = "loongson,ls2k0300-clk", .data = &ls2k0300_clks },
{ .compatible = "loongson,ls2k0500-clk", .data = &ls2k0500_clks },
- { .compatible = "loongson,ls2k-clk", .data = &ls2k1000_clks },
+ { .compatible = "loongson,ls2k1000-clk", .data = &ls2k1000_clks },
{ .compatible = "loongson,ls2k2000-clk", .data = &ls2k2000_clks },
+ { .compatible = "loongson,ls2k-clk", .data = &ls2k1000_clks },
{ }
};
MODULE_DEVICE_TABLE(of, loongson2_clk_match_table);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread