dt-bindings: clock: loongson,ls2k: add ls2k1000 compatible
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/2 dt-bindings: clock: loongson,ls2k: add ls2k1000 compatible
Add a SoC-specific "loongson,ls2k1000-clk" compatible. Retain the existing "loongson,ls2k-clk" as a deprecated fallback for backward compatibility.
--- .../devicetree/bindings/clock/loongson,ls2k-clk.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml +5 -1
@@ -13,12 +13,16 @@ description: | Loongson-2 SoC clock control module is an integrated clock controller, which generates and supplies to all modules. + The "loongson,ls2k1000-clk" string should be used for Loongson-2K1000. + The "loongson,ls2k-clk" string is kept as a fallback for backward compatibility for Loongson-2K1000. + properties: compatible: enum: - loongson,ls2k0300-clk - loongson,ls2k0500-clk - - loongson,ls2k-clk # This is for Loongson-2K1000 + - loongson,ls2k-clk + - loongson,ls2k1000-clk - loongson,ls2k2000-clk reg:
Signature · 1 line
2.43.0
Quoted 18 lines · wjjsn
Add a SoC-specific "loongson,ls2k1000-clk" compatible. Retain the existing "loongson,ls2k-clk" as a deprecated fallback for backward compatibility.
Signed-off-by wjjsn <[email protected]>--- .../devicetree/bindings/clock/loongson,ls2k-clk.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml +1
-0@@ -13,12 +13,16 @@ description: | Loongson-2 SoC clock control module is an integrated clock controller, which generates and supplies to all modules. + The "loongson,ls2k1000-clk" string should be used for Loongson-2K1000.
Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml description: | · line 25
Quoted 10 lines
Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml +4
-1+ The "loongson,ls2k-clk" string is kept as a fallback for backward compatibility for Loongson-2K1000. + properties: compatible: enum: - loongson,ls2k0300-clk - loongson,ls2k0500-clk - - loongson,ls2k-clk # This is for Loongson-2K1000 + - loongson,ls2k-clk + - loongson,ls2k1000-clk
If you want to deprecate loongson,ls2k-clk, you should probably mark it as "deprecated: true", instead of describing such situation in human language.
I don't have a strong opinion on the change, but I don't think it improves the situation much. We still need to document the historical compatible in bindings and support it in driver, the only thing gets improved is a slightly more clear compatible name in devicetree.
However, even if someone is confused by the current compatible, they could have a look in the binding and get an explanation quickly.
Regards,
Yao Zi
Quoted 7 lines
Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml +0
-0- loongson,ls2k2000-clk reg:Signature · 1 line
2.43.0
PATCH v2 2/2 clk: loongson2: add support for ls2k1000 compatible
In reply to a message not in the archiveAdd driver support for the "loongson,ls2k1000-clk" compatible and update the Loongson-2K1000 DTS to use it while retaining "loongson,ls2k-clk" as a fallback.
--- arch/loongarch/boot/dts/loongson-2k1000.dtsi | 2 +- drivers/clk/clk-loongson2.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
arch/loongarch/boot/dts/loongson-2k1000.dtsi +1 -1
@@ -156,7 +156,7 @@ pctrl: pinctrl@1fe00420 { }; clk: clock-controller@1fe00480 { - compatible = "loongson,ls2k-clk"; + compatible = "loongson,ls2k1000-clk", "loongson,ls2k-clk"; reg = <0x0 0x1fe00480 0x0 0x58>; #clock-cells = <1>; clocks = <&ref_100m>;
drivers/clk/clk-loongson2.c +1 -0
@@ -441,6 +441,7 @@ 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 }, { } };
Signature · 1 line
2.43.0