dt-bindings: clock: Convert HiSilicon clocks to DT schema
Subsystems (2)
Rob Herring (Arm)
maintainerPATCH 1/1 dt-bindings: clock: Convert HiSilicon clocks to DT schema
Convert the HiSilicon Hi6220/Hi3660/Hi3670 clock bindings to DT schema format. Rearrange the binding documents splitting out the stub clock binding from everything else.
--- .../bindings/clock/hi3660-clock.txt | 47 ----------------- .../bindings/clock/hi3670-clock.txt | 43 --------------- .../bindings/clock/hi6220-clock.txt | 52 ------------------- .../bindings/clock/hisilicon,clocks.yaml | 51 ++++++++++++++++++ .../clock/hisilicon,hi6220-stub-clk.yaml | 49 +++++++++++++++++ 5 files changed, 100 insertions(+), 142 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/hi3660-clock.txt delete mode 100644 Documentation/devicetree/bindings/clock/hi3670-clock.txt delete mode 100644 Documentation/devicetree/bindings/clock/hi6220-clock.txt create mode 100644 Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml create mode 100644 Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml
Documentation/devicetree/bindings/clock/hi3660-clock.txt deleted +0 -47
@@ -1,47 +0,0 @@ -* Hisilicon Hi3660 Clock Controller - -The Hi3660 clock controller generates and supplies clock to various -controllers within the Hi3660 SoC. - -Required Properties: - -- compatible: the compatible should be one of the following strings to - indicate the clock controller functionality. - - - "hisilicon,hi3660-crgctrl" - - "hisilicon,hi3660-pctrl" - - "hisilicon,hi3660-pmuctrl" - - "hisilicon,hi3660-sctrl" - - "hisilicon,hi3660-iomcu" - - "hisilicon,hi3660-stub-clk" - -- reg: physical base address of the controller and length of memory mapped - region. - -- #clock-cells: should be 1. - -Optional Properties: - -- mboxes: Phandle to the mailbox for sending message to MCU. - (See: ../mailbox/hisilicon,hi3660-mailbox.txt for more info) - -Each clock is assigned an identifier and client nodes use this identifier -to specify the clock which they consume. - -All these identifier could be found in <dt-bindings/clock/hi3660-clock.h>. - -Examples: - crg_ctrl: clock-controller@fff35000 { - compatible = "hisilicon,hi3660-crgctrl", "syscon"; - reg = <0x0 0xfff35000 0x0 0x1000>; - #clock-cells = <1>; - }; - - uart0: serial@fdf02000 { - compatible = "arm,pl011", "arm,primecell"; - reg = <0x0 0xfdf02000 0x0 0x1000>; - interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&crg_ctrl HI3660_CLK_MUX_UART0>, - <&crg_ctrl HI3660_PCLK>; - clock-names = "uartclk", "apb_pclk"; - };
Documentation/devicetree/bindings/clock/hi3670-clock.txt deleted +0 -43
43 lines not on this page · raw message
Documentation/devicetree/bindings/clock/hi6220-clock.txt deleted +0 -52
52 lines not on this page · raw message
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml new file +51 -0
51 lines not on this page · raw message
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] dt-bindings: missing if-then constraints for stub clock properties - [Low] dt-bindings: YAML…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: missing if-then constraints for stub clock properties
- [Low] dt-bindings: YAML conversion dropped all DT examples
--
commit 9d6ccc9389906ef23ff428ed84de04603566232a
Author: Rob Herring (Arm) <[email protected]> Date: Thu Oct 1 21:20:48 2026 +0000
dt-bindings: clock: Convert HiSilicon clocks to DT schema
This commit converts the HiSilicon Hi6220, Hi3660, and Hi3670 clock bindings from legacy text format to YAML DT schema format. It also splits out the stub clock binding into its own standalone document.
Quoted 5 lines
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml new file +0
-0
[ ... ]
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml line 51
Quoted 6 lines
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml new file +6
-0+required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false
[Severity: Low]
Were the device tree examples intentionally omitted during the conversion?
The original hi3660-clock.txt and hi3670-clock.txt bindings included example nodes, but they have been dropped entirely here. Running make dt_binding_check will only validate the schema syntax itself, but without an examples block, it will not validate any real configurations. This circumvents the primary self-testing mechanism of the schema conversion.
Quoted 5 lines
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml new file +0
-0
[ ... ]
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml line 47
Quoted 4 lines
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml new file +4
-0+required: + - compatible + - '#clock-cells' + - mboxes
[Severity: Medium]
Should there be conditional (if-then) constraints here to enforce hardware-specific requirements?
The schema groups hisilicon,hi3660-stub-clk and hisilicon,hi6220-stub-clk, but lacks variant-specific checks. Without conditional constraints, schema validation will silently pass incomplete configurations that will later cause the drivers to fail during probe.
For instance, the hi3660 driver unequivocally requires the reg property:
drivers/clk/hisilicon/clk-hi3660-stub.c:hi3660_stub_clk_probe() {
...
freq_reg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(freq_reg))
return PTR_ERR(freq_reg);
...
}Similarly, the hi6220 driver unequivocally requires the hisilicon,hi6220-clk-sram property:
drivers/clk/hisilicon/clk-hi6220-stub.c:hi6220_stub_clk_probe() {
...
stub_clk->dfs_map = syscon_regmap_lookup_by_phandle(np,
"hisilicon,hi6220-clk-sram");
if (IS_ERR(stub_clk->dfs_map)) {
dev_err(dev, "failed to get sram regmap\n");
return PTR_ERR(stub_clk->dfs_map);
}
...
}Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml
Quoted 2 lines
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml new file +2
-0+ +additionalProperties: false
[Severity: Low]
Just as with the hisilicon,clocks.yaml file, the examples from the original hi6220-clock.txt bindings were completely dropped here. Is it possible to restore the stub_clock example to ensure make dt_binding_check tests a valid hardware configuration?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Rob Herring
maintainerQuoted 23 lines · On Fri, Oct 02, 2026 at 09:13:50AM +0000, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: missing if-then constraints for stub clock properties
- [Low] dt-bindings: YAML conversion dropped all DT examples
--commit
9d6ccc9389906ef23ff428ed84de04603566232aAuthor: Rob Herring (Arm) <[email protected]> Date: Thu Oct 1 21:20:48 2026 +0000dt-bindings: clock: Convert HiSilicon clocks to DT schema
This commit converts the HiSilicon Hi6220, Hi3660, and Hi3670 clock bindings from legacy text format to YAML DT schema format. It also splits out the stub clock binding into its own standalone document.
Quoted 5 lines
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml new file +0
-0[ ... ]
Quoted 9 lines
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml line 51
Quoted 6 lines
Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml new file +6
-0+required: + - compatible + - reg + - '#clock-cells' + +additionalProperties: false[Severity: Low]
Were the device tree examples intentionally omitted during the conversion?
Yes. The binding is trivial.
Quoted 14 lines
The original hi3660-clock.txt and hi3670-clock.txt bindings included example nodes, but they have been dropped entirely here. Running make
dt_binding_checkwill only validate the schema syntax itself, but without an examples block, it will not validate any real configurations. This circumvents the primary self-testing mechanism of the schema conversion.Quoted 5 lines
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml new file +0
-0[ ... ]
Quoted 8 lines
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml line 47
Quoted 4 lines
Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml new file +4
-0+required: + - compatible + - '#clock-cells' + - mboxes[Severity: Medium]
Should there be conditional (if-then) constraints here to enforce hardware-specific requirements?
No. These are old, hardly maintained devices with no new platforms being added. It just doesn't matter here.
Rob
Hi Rob,
Quoted 5 lines · Rob Herring (Arm)
Convert the HiSilicon Hi6220/Hi3660/Hi3670 clock bindings to DT schema format. Rearrange the binding documents splitting out the stub clock binding from everything else.
Signed-off-by Rob Herring (Arm) <[email protected]>
Thanks!
Fine to add hardware-specific constraints later.
Best Regards,
Wei
Brian Masney
AppliedQuoted 1 line · Rob Herring (Arm)
dt-bindings: clock: Convert HiSilicon clocks to DT schema
Applied, thanks!
[1/1] dt-bindings: clock: Convert HiSilicon clocks to DT schema
commit: 8ebee4049bb55abce37a7a0ff8ad44f4c354da49
Best regards,
Signature · 1 line
Brian Masney <[email protected]>