Skip to contentSkip to conversation

dt/bindings: clk: Add YAML schemas for LS1028A Display Clock bindings

PATCH Superseded Wen He 3 participants 5 messages Nov 27, 2019 – Dec 4, 2019

Subsystems (2)

v10 of 12 Superseded Latest is v12 →

lore
Share & tools
lore

Wen He

author
#0 lore raw

PATCH v10 1/2 dt/bindings: clk: Add YAML schemas for LS1028A Display Clock bindings

LS1028A has a clock domain PXLCLK0 used for provide pixel clocks to Display output interface. Add a YAML schema for this.

---
change in v10:
- Add optional feild 'vco-frequency'.

 .../devicetree/bindings/clock/fsl,plldig.yaml | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/fsl,plldig.yaml
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +54 -0
new file mode 100644
index 000000000000..ee5b5c61a471
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/fsl,plldig.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP QorIQ Layerscape LS1028A Display PIXEL Clock Binding
+
+maintainers:
+  - Wen He <[email protected]>
+
+description: |
+  NXP LS1028A has a clock domain PXLCLK0 used for the Display output
+  interface in the display core, as implemented in TSMC CLN28HPM PLL.
+  which generate and offers pixel clocks to Display.
+
+properties:
+  compatible:
+    const: fsl,ls1028a-plldig
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 0
+
+  vco-frequency:
+     $ref: '/schemas/types.yaml#/definitions/uint32'
+     description: Optional for VCO frequency of the PLL in Hertz.
+        The VCO frequency of this PLL cannot be changed during runtime
+        only at startup. Therefore, the output frequencies are very
+        limited and might not even closely match the requested frequency.
+        To work around this restriction the user may specify its own
+        desired VCO frequency for the PLL. The frequency has to be in the
+        range of 650000000 to 1300000000.
+        If not set, the default frequency is 1188000000.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+examples:
+  # Display PIXEL Clock node:
+  - |
+    dpclk: clock-display@f1f0000 {
+        compatible = "fsl,ls1028a-plldig";
+        reg = <0x0 0xf1f0000 0x0 0xffff>;
+        #clock-cells = <0>;
+        clocks = <&osc_27m>;
+    };
+
+...
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v10 2/2 clk: ls1028a: Add clock driver for Display output interface

Add clock driver for QorIQ LS1028A Display output interfaces(LCD, DPHY), as implemented in TSMC CLN28HPM PLL, this PLL supports the programmable integer division and range of the display output pixel clock's 27-594MHz.

---
change in v10:
- Add vco-frequency configurable;

 drivers/clk/Kconfig      |  10 ++
 drivers/clk/Makefile     |   1 +
 drivers/clk/clk-plldig.c | 301 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 312 insertions(+)
 create mode 100644 drivers/clk/clk-plldig.c
drivers/clk/Kconfig +10 -0
index 0530bebfc25a..9f6b0196c604 100644
@@ -218,6 +218,16 @@ config CLK_QORIQ
 	  This adds the clock driver support for Freescale QorIQ platforms
 	  using common clock framework.
 
+config CLK_LS1028A_PLLDIG
+        tristate "Clock driver for LS1028A Display output"
+        depends on ARCH_LAYERSCAPE || COMPILE_TEST
+        default ARCH_LAYERSCAPE
+        help
+          This driver support the Display output interfaces(LCD, DPHY) pixel clocks
+          of the QorIQ Layerscape LS1028A, as implemented TSMC CLN28HPM PLL. Not all
+          features of the PLL are currently supported by the driver. By default,
+          configured bypass mode with this PLL.
+
 config COMMON_CLK_XGENE
 	bool "Clock driver for APM XGene SoC"
 	default ARCH_XGENE
drivers/clk/Makefile +1 -0
index 0138fb14e6f8..97d1e5bc6de5 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_ARCH_NPCM7XX)	    	+= clk-npcm7xx.o
 obj-$(CONFIG_ARCH_NSPIRE)		+= clk-nspire.o
 obj-$(CONFIG_COMMON_CLK_OXNAS)		+= clk-oxnas.o
 obj-$(CONFIG_COMMON_CLK_PALMAS)		+= clk-palmas.o
+obj-$(CONFIG_CLK_LS1028A_PLLDIG)	+= clk-plldig.o
 obj-$(CONFIG_COMMON_CLK_PWM)		+= clk-pwm.o
 obj-$(CONFIG_CLK_QORIQ)			+= clk-qoriq.o
 obj-$(CONFIG_COMMON_CLK_RK808)		+= clk-rk808.o
drivers/clk/clk-plldig.c new file +301 -0

301 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer
#2 lore raw
In reply to Wen He
Quoted 36 lines · Wen He

LS1028A has a clock domain PXLCLK0 used for provide pixel clocks to Display output interface. Add a YAML schema for this.

---
change in v10:
- Add optional feild 'vco-frequency'.

 .../devicetree/bindings/clock/fsl,plldig.yaml | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/fsl,plldig.yaml
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +17 -0
new file mode 100644
index 000000000000..ee5b5c61a471
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/fsl,plldig.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP QorIQ Layerscape LS1028A Display PIXEL Clock Binding
+
+maintainers:
+  - Wen He <[email protected]>
+
+description: |
+  NXP LS1028A has a clock domain PXLCLK0 used for the Display output
+  interface in the display core, as implemented in TSMC CLN28HPM PLL.
+  which generate and offers pixel clocks to Display.
+
+properties:

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +10 -0
+  compatible:
+    const: fsl,ls1028a-plldig
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 0
+
+  vco-frequency:

Needs vendor prefix and unit suffix:

fsl,vco-hz

Or you could perhaps just use 'clock-frequency'.

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 36

Quoted 9 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +9 -0
+     $ref: '/schemas/types.yaml#/definitions/uint32'
+     description: Optional for VCO frequency of the PLL in Hertz.
+        The VCO frequency of this PLL cannot be changed during runtime
+        only at startup. Therefore, the output frequencies are very
+        limited and might not even closely match the requested frequency.
+        To work around this restriction the user may specify its own
+        desired VCO frequency for the PLL. The frequency has to be in the
+        range of 650000000 to 1300000000.
+        If not set, the default frequency is 1188000000.

A bunch of constraints you've listed here that should be schema rather than freeform text:

minimum: 650000000
maximum: 1300000000
default: 1188000000

Quoted 21 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +18 -0
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+examples:
+  # Display PIXEL Clock node:
+  - |
+    dpclk: clock-display@f1f0000 {
+        compatible = "fsl,ls1028a-plldig";
+        reg = <0x0 0xf1f0000 0x0 0xffff>;
+        #clock-cells = <0>;
+        clocks = <&osc_27m>;
+    };
+
+...
Signature · 1 line
2.17.1
#3 lore raw

Am 2019-12-02 19:47, schrieb Rob Herring:

Quoted 52 lines · Wen He
Quoted 38 lines

LS1028A has a clock domain PXLCLK0 used for provide pixel clocks to Display output interface. Add a YAML schema for this.

---
change in v10:
- Add optional feild 'vco-frequency'.

 .../devicetree/bindings/clock/fsl,plldig.yaml | 54 
+++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 

Documentation/devicetree/bindings/clock/fsl,plldig.yaml

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +17 -0
new file mode 100644
index 000000000000..ee5b5c61a471
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/clock/fsl,plldig.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP QorIQ Layerscape LS1028A Display PIXEL Clock Binding
+
+maintainers:
+  - Wen He <[email protected]>
+
+description: |
+  NXP LS1028A has a clock domain PXLCLK0 used for the Display output
+  interface in the display core, as implemented in TSMC CLN28HPM PLL.
+  which generate and offers pixel clocks to Display.
+
+properties:

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +10 -0
+  compatible:
+    const: fsl,ls1028a-plldig
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 0
+
+  vco-frequency:

Needs vendor prefix and unit suffix:

Quoted 3 lines

fsl,vco-hz

Or you could perhaps just use 'clock-frequency'.

Ok, fsl,vco-hz sounds good. clock-frequency sounds like it is the output.

-michael

Quoted 41 lines

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 36

Quoted 12 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +3 -0
+     $ref: '/schemas/types.yaml#/definitions/uint32'
+     description: Optional for VCO frequency of the PLL in Hertz.
+        The VCO frequency of this PLL cannot be changed during 

runtime

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +2 -0
+        only at startup. Therefore, the output frequencies are very
+        limited and might not even closely match the requested 

frequency.

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +2 -0
+        To work around this restriction the user may specify its own
+        desired VCO frequency for the PLL. The frequency has to be in 

the

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +2 -0
+        range of 650000000 to 1300000000.
+        If not set, the default frequency is 1188000000.

A bunch of constraints you've listed here that should be schema rather than freeform text:

minimum: 650000000
maximum: 1300000000
default: 1188000000

Quoted 21 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +18 -1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+examples:
+  # Display PIXEL Clock node:
+  - |
+    dpclk: clock-display@f1f0000 {
+        compatible = "fsl,ls1028a-plldig";
+        reg = <0x0 0xf1f0000 0x0 0xffff>;
+        #clock-cells = <0>;
+        clocks = <&osc_27m>;
+    };
+
+...
--

2.17.1

author
#4 lore raw
Quoted 94 lines

-----Original Message-----
From: Michael Walle <[email protected]>
Sent: 2019年12月3日 5:32
To: Rob Herring <[email protected]>
Cc: Wen He <[email protected]>; Michael Turquette <[email protected]>; Stephen Boyd <[email protected]>; Mark Rutland <[email protected]>; Leo Li <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: [EXT] Re: [v10 1/2] dt/bindings: clk: Add YAML schemas for LS1028A Display Clock bindings

Caution: EXT Email

Am 2019-12-02 19:47, schrieb Rob Herring:

Quoted 16 lines · Wen He
Quoted 15 lines

LS1028A has a clock domain PXLCLK0 used for provide pixel clocks to Display output interface. Add a YAML schema for this.

---
change in v10:
- Add optional feild 'vco-frequency'.

 .../devicetree/bindings/clock/fsl,plldig.yaml | 54
+++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/clock/fsl,plldig.yaml

Quoted 13 lines

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 5

Quoted 13 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +5 -0
new file mode 100644
index 000000000000..ee5b5c61a471
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id:
+https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdev

+icetree.org%2Fschemas%2Fbindings%2Fclock%2Ffsl%2Cplldig.yaml%23&amp ;

Quoted 1 line
Quoted 1 line

+data=02%7C01%7Cwen.he_1%40nxp.com%7Cc235afc88d844a2002ef08d77 76f1b33

Quoted 1 line
Quoted 1 line

+%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63710919139775 3988&amp

Quoted 1 line
Quoted 1 line

+;sdata=VTmnjZ7tyLCmu21dymla8xUlpvWXMYA0A6FtcOg9u9U%3D&amp;res erved=0

Quoted 3 lines
Quoted 3 lines

+$schema:
+https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdev

+icetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7Cwe n.he_

Quoted 1 line
Quoted 1 line

+1%40nxp.com%7Cc235afc88d844a2002ef08d7776f1b33%7C686ea1d3bc2b 4c6fa92

Quoted 1 line
Quoted 1 line

+cd99c5c301635%7C0%7C0%7C637109191397753988&amp;sdata=CDVXbcg 9qikkXj6

Quoted 26 lines
Quoted 13 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +13 -0
+bIATTtrBGWO%2FYUHo6ZYx5erqqRpM%3D&amp;reserved=0
+
+title: NXP QorIQ Layerscape LS1028A Display PIXEL Clock Binding
+
+maintainers:
+  - Wen He <[email protected]>
+
+description: |
+  NXP LS1028A has a clock domain PXLCLK0 used for the Display output
+  interface in the display core, as implemented in TSMC CLN28HPM PLL.
+  which generate and offers pixel clocks to Display.
+
+properties:

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +10 -0
+  compatible:
+    const: fsl,ls1028a-plldig
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 0
+
+  vco-frequency:

Needs vendor prefix and unit suffix:

Quoted 5 lines
Quoted 3 lines

fsl,vco-hz

Or you could perhaps just use 'clock-frequency'.

Ok, fsl,vco-hz sounds good. clock-frequency sounds like it is the output.

Yes, fsl,vco-hz sounds good, I will update it in next version patch.

Thanks,
Wen

Quoted 45 lines

-michael

Quoted 42 lines

Documentation/devicetree/bindings/clock/fsl,plldig.yaml line 36

Quoted 13 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +3 -0
+     $ref: '/schemas/types.yaml#/definitions/uint32'
+     description: Optional for VCO frequency of the PLL in Hertz.
+        The VCO frequency of this PLL cannot be changed during

runtime

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +2 -0
+        only at startup. Therefore, the output frequencies are very
+        limited and might not even closely match the requested

frequency.

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +3 -0
+        To work around this restriction the user may specify its own
+        desired VCO frequency for the PLL. The frequency has to be
+ in

the

Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +2 -0
+        range of 650000000 to 1300000000.
+        If not set, the default frequency is 1188000000.

A bunch of constraints you've listed here that should be schema rather than freeform text:

minimum: 650000000
maximum: 1300000000
default: 1188000000

Quoted 21 lines
Documentation/devicetree/bindings/clock/fsl,plldig.yaml new file +18 -1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+
+examples:
+  # Display PIXEL Clock node:
+  - |
+    dpclk: clock-display@f1f0000 {
+        compatible = "fsl,ls1028a-plldig";
+        reg = <0x0 0xf1f0000 0x0 0xffff>;
+        #clock-cells = <0>;
+        clocks = <&osc_27m>;
+    };
+
+...
--

2.17.1