diff mbox series

[PATCHv3,4/5] dt-bindings: documentation: add clock bindings information for Agilex

Message ID 20200317161022.11181-5-dinguyen@kernel.org
State Changes Requested, archived
Headers show
Series clk: agilex: add clock driver | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Dinh Nguyen March 17, 2020, 4:10 p.m. UTC
Document the Agilex clock bindings, and add the clock header file. The
clock header is an enumeration of all the different clocks on the Agilex
platform.

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
v3: address comments from Stephen Boyd
    fix build error(tab removed in line 37)
    renamed to intel,agilex.yaml
v2: convert original document to YAML
---
 .../bindings/clock/intel,agilex.yaml          | 36 ++++++++++
 include/dt-bindings/clock/agilex-clock.h      | 70 +++++++++++++++++++
 2 files changed, 106 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/intel,agilex.yaml
 create mode 100644 include/dt-bindings/clock/agilex-clock.h

Comments

Rob Herring (Arm) March 18, 2020, 10:40 p.m. UTC | #1
On Tue, 17 Mar 2020 11:10:21 -0500, Dinh Nguyen wrote:
> Document the Agilex clock bindings, and add the clock header file. The
> clock header is an enumeration of all the different clocks on the Agilex
> platform.
> 
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
> ---
> v3: address comments from Stephen Boyd
>     fix build error(tab removed in line 37)
>     renamed to intel,agilex.yaml
> v2: convert original document to YAML
> ---
>  .../bindings/clock/intel,agilex.yaml          | 36 ++++++++++
>  include/dt-bindings/clock/agilex-clock.h      | 70 +++++++++++++++++++
>  2 files changed, 106 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/intel,agilex.yaml
>  create mode 100644 include/dt-bindings/clock/agilex-clock.h
> 

My bot found errors running 'make dt_binding_check' on your patch:

Error: Documentation/devicetree/bindings/clock/intel,agilex.example.dts:17.3-4 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:311: recipe for target 'Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml] Error 1
Makefile:1262: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1256630
Please check and re-submit.
Dinh Nguyen March 19, 2020, 4:16 p.m. UTC | #2
Hi Rob,

On 3/18/20 5:40 PM, Rob Herring wrote:
> On Tue, 17 Mar 2020 11:10:21 -0500, Dinh Nguyen wrote:
>> Document the Agilex clock bindings, and add the clock header file. The
>> clock header is an enumeration of all the different clocks on the Agilex
>> platform.
>>
>> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
>> ---
>> v3: address comments from Stephen Boyd
>>     fix build error(tab removed in line 37)
>>     renamed to intel,agilex.yaml
>> v2: convert original document to YAML
>> ---
>>  .../bindings/clock/intel,agilex.yaml          | 36 ++++++++++
>>  include/dt-bindings/clock/agilex-clock.h      | 70 +++++++++++++++++++
>>  2 files changed, 106 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/clock/intel,agilex.yaml
>>  create mode 100644 include/dt-bindings/clock/agilex-clock.h
>>
> 
> My bot found errors running 'make dt_binding_check' on your patch:
> 
> Error: Documentation/devicetree/bindings/clock/intel,agilex.example.dts:17.3-4 syntax error
> FATAL ERROR: Unable to parse input tree
> scripts/Makefile.lib:311: recipe for target 'Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml' failed
> make[1]: *** [Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml] Error 1
> Makefile:1262: recipe for target 'dt_binding_check' failed
> make: *** [dt_binding_check] Error 2
> 
> See https://patchwork.ozlabs.org/patch/1256630
> Please check and re-submit.
> 

I want to be able check these errors locally before sending the next
version. But I keep getting various errors when I try to "make
dt_binding_check":

Traceback (most recent call last):
  File "/bin/dt-doc-validate", line 15, in <module>
    import ruamel.yaml
ImportError: No module named 'ruamel'
Documentation/devicetree/bindings/Makefile:12: recipe for target
'Documentation/devicetree/bindings/arm/l2c2x0.example.dts' failed


Do you have a pointer on how to run the dt_binding_check?

Thanks,
Dinh
Rob Herring (Arm) March 19, 2020, 4:56 p.m. UTC | #3
On Thu, Mar 19, 2020 at 10:16 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
>
> Hi Rob,
>
> On 3/18/20 5:40 PM, Rob Herring wrote:
> > On Tue, 17 Mar 2020 11:10:21 -0500, Dinh Nguyen wrote:
> >> Document the Agilex clock bindings, and add the clock header file. The
> >> clock header is an enumeration of all the different clocks on the Agilex
> >> platform.
> >>
> >> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
> >> ---
> >> v3: address comments from Stephen Boyd
> >>     fix build error(tab removed in line 37)
> >>     renamed to intel,agilex.yaml
> >> v2: convert original document to YAML
> >> ---
> >>  .../bindings/clock/intel,agilex.yaml          | 36 ++++++++++
> >>  include/dt-bindings/clock/agilex-clock.h      | 70 +++++++++++++++++++
> >>  2 files changed, 106 insertions(+)
> >>  create mode 100644 Documentation/devicetree/bindings/clock/intel,agilex.yaml
> >>  create mode 100644 include/dt-bindings/clock/agilex-clock.h
> >>
> >
> > My bot found errors running 'make dt_binding_check' on your patch:
> >
> > Error: Documentation/devicetree/bindings/clock/intel,agilex.example.dts:17.3-4 syntax error
> > FATAL ERROR: Unable to parse input tree
> > scripts/Makefile.lib:311: recipe for target 'Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml' failed
> > make[1]: *** [Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml] Error 1
> > Makefile:1262: recipe for target 'dt_binding_check' failed
> > make: *** [dt_binding_check] Error 2
> >
> > See https://patchwork.ozlabs.org/patch/1256630
> > Please check and re-submit.
> >
>
> I want to be able check these errors locally before sending the next
> version. But I keep getting various errors when I try to "make
> dt_binding_check":
>
> Traceback (most recent call last):
>   File "/bin/dt-doc-validate", line 15, in <module>
>     import ruamel.yaml
> ImportError: No module named 'ruamel'
> Documentation/devicetree/bindings/Makefile:12: recipe for target
> 'Documentation/devicetree/bindings/arm/l2c2x0.example.dts' failed
>
>
> Do you have a pointer on how to run the dt_binding_check?

Documentation/devicetree/writing-schema.rst

ruamel should get installed automatically when you run pip3. If you
just cloned dt-schema, then you still need to run pip on the project
directory. That's documented in the project readme.

Rob
Dinh Nguyen March 19, 2020, 7:18 p.m. UTC | #4
Hi Rob,

On 3/19/20 11:56 AM, Rob Herring wrote:
> On Thu, Mar 19, 2020 at 10:16 AM Dinh Nguyen <dinguyen@kernel.org> wrote:
>>
>> Hi Rob,
>>
>> On 3/18/20 5:40 PM, Rob Herring wrote:
>>> On Tue, 17 Mar 2020 11:10:21 -0500, Dinh Nguyen wrote:
>>>> Document the Agilex clock bindings, and add the clock header file. The
>>>> clock header is an enumeration of all the different clocks on the Agilex
>>>> platform.
>>>>
>>>> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
>>>> ---
>>>> v3: address comments from Stephen Boyd
>>>>     fix build error(tab removed in line 37)
>>>>     renamed to intel,agilex.yaml
>>>> v2: convert original document to YAML
>>>> ---
>>>>  .../bindings/clock/intel,agilex.yaml          | 36 ++++++++++
>>>>  include/dt-bindings/clock/agilex-clock.h      | 70 +++++++++++++++++++
>>>>  2 files changed, 106 insertions(+)
>>>>  create mode 100644 Documentation/devicetree/bindings/clock/intel,agilex.yaml
>>>>  create mode 100644 include/dt-bindings/clock/agilex-clock.h
>>>>
>>>
>>> My bot found errors running 'make dt_binding_check' on your patch:
>>>
>>> Error: Documentation/devicetree/bindings/clock/intel,agilex.example.dts:17.3-4 syntax error
>>> FATAL ERROR: Unable to parse input tree
>>> scripts/Makefile.lib:311: recipe for target 'Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml' failed
>>> make[1]: *** [Documentation/devicetree/bindings/clock/intel,agilex.example.dt.yaml] Error 1
>>> Makefile:1262: recipe for target 'dt_binding_check' failed
>>> make: *** [dt_binding_check] Error 2
>>>
>>> See https://patchwork.ozlabs.org/patch/1256630
>>> Please check and re-submit.
>>>
>>
>> I want to be able check these errors locally before sending the next
>> version. But I keep getting various errors when I try to "make
>> dt_binding_check":
>>
>> Traceback (most recent call last):
>>   File "/bin/dt-doc-validate", line 15, in <module>
>>     import ruamel.yaml
>> ImportError: No module named 'ruamel'
>> Documentation/devicetree/bindings/Makefile:12: recipe for target
>> 'Documentation/devicetree/bindings/arm/l2c2x0.example.dts' failed
>>
>>
>> Do you have a pointer on how to run the dt_binding_check?
> 
> Documentation/devicetree/writing-schema.rst
> 
> ruamel should get installed automatically when you run pip3. If you
> just cloned dt-schema, then you still need to run pip on the project
> directory. That's documented in the project readme.
> 

Thanks alot for the pointers. Fixed it.

Dinh
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/intel,agilex.yaml b/Documentation/devicetree/bindings/clock/intel,agilex.yaml
new file mode 100644
index 000000000000..c0025afb2d73
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/intel,agilex.yaml
@@ -0,0 +1,36 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/intel,agilex.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel SoCFPGA Agilex platform clock controller binding
+
+maintainers:
+  - Dinh Nguyen <dinguyen@kernel.org>
+
+description:
+  The Intel Agilex Clock controller is an integrated clock controller, which
+  generates and supplies to all modules.
+
+properties:
+  compatible:
+    const: intel,agilex-clkmgr
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+examples:
+  - |
+    # Clock controller node
+    clkmgr: clock-controller@ffd10000 {
+      compatible = "intel,agilex-clkmgr";
+      reg = <0xffd10000 0x1000>;
+      #clock-cells = <1>;
+    };
+...
diff --git a/include/dt-bindings/clock/agilex-clock.h b/include/dt-bindings/clock/agilex-clock.h
new file mode 100644
index 000000000000..f19cf8ccbdd2
--- /dev/null
+++ b/include/dt-bindings/clock/agilex-clock.h
@@ -0,0 +1,70 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2019, Intel Corporation
+ */
+
+#ifndef __AGILEX_CLOCK_H
+#define __AGILEX_CLOCK_H
+
+/* fixed rate clocks */
+#define AGILEX_OSC1			0
+#define AGILEX_CB_INTOSC_HS_DIV2_CLK	1
+#define AGILEX_CB_INTOSC_LS_CLK		2
+#define AGILEX_L4_SYS_FREE_CLK		3
+#define AGILEX_F2S_FREE_CLK		4
+
+/* PLL clocks */
+#define AGILEX_MAIN_PLL_CLK		5
+#define AGILEX_MAIN_PLL_C0_CLK		6
+#define AGILEX_MAIN_PLL_C1_CLK		7
+#define AGILEX_MAIN_PLL_C2_CLK		8
+#define AGILEX_MAIN_PLL_C3_CLK		9
+#define AGILEX_PERIPH_PLL_CLK		10
+#define AGILEX_PERIPH_PLL_C0_CLK	11
+#define AGILEX_PERIPH_PLL_C1_CLK	12
+#define AGILEX_PERIPH_PLL_C2_CLK	13
+#define AGILEX_PERIPH_PLL_C3_CLK	14
+#define AGILEX_MPU_FREE_CLK		15
+#define AGILEX_MPU_CCU_CLK		16
+#define AGILEX_BOOT_CLK			17
+
+/* fixed factor clocks */
+#define AGILEX_L3_MAIN_FREE_CLK		18
+#define AGILEX_NOC_FREE_CLK		19
+#define AGILEX_S2F_USR0_CLK		20
+#define AGILEX_NOC_CLK			21
+#define AGILEX_EMAC_A_FREE_CLK		22
+#define AGILEX_EMAC_B_FREE_CLK		23
+#define AGILEX_EMAC_PTP_FREE_CLK	24
+#define AGILEX_GPIO_DB_FREE_CLK		25
+#define AGILEX_SDMMC_FREE_CLK		26
+#define AGILEX_S2F_USER0_FREE_CLK	27
+#define AGILEX_S2F_USER1_FREE_CLK	28
+#define AGILEX_PSI_REF_FREE_CLK		29
+
+/* Gate clocks */
+#define AGILEX_MPU_CLK			30
+#define AGILEX_MPU_L2RAM_CLK		31
+#define AGILEX_MPU_PERIPH_CLK		32
+#define AGILEX_L4_MAIN_CLK		33
+#define AGILEX_L4_MP_CLK		34
+#define AGILEX_L4_SP_CLK		35
+#define AGILEX_CS_AT_CLK		36
+#define AGILEX_CS_TRACE_CLK		37
+#define AGILEX_CS_PDBG_CLK		38
+#define AGILEX_CS_TIMER_CLK		39
+#define AGILEX_S2F_USER0_CLK		40
+#define AGILEX_EMAC0_CLK		41
+#define AGILEX_EMAC1_CLK		43
+#define AGILEX_EMAC2_CLK		44
+#define AGILEX_EMAC_PTP_CLK		45
+#define AGILEX_GPIO_DB_CLK		46
+#define AGILEX_NAND_CLK			47
+#define AGILEX_PSI_REF_CLK		48
+#define AGILEX_S2F_USER1_CLK		49
+#define AGILEX_SDMMC_CLK		50
+#define AGILEX_SPI_M_CLK		51
+#define AGILEX_USB_CLK			52
+#define AGILEX_NUM_CLKS			53
+
+#endif	/* __AGILEX_CLOCK_H */