linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema
@ 2021-05-26  8:43 Lokesh Vutla
  2021-05-26  8:43 ` [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible Lokesh Vutla
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Lokesh Vutla @ 2021-05-26  8:43 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List, Lokesh Vutla

This series:
- drops a redundant compatible
- converts tiehrpwn to DT schema format using json-schema
- Add new compatible for AM64 SoC.

Lokesh Vutla (4):
  arm: dts: ti: drop usage of redundant compatible
  dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required
    properties
  dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema
  dt-bindings: pwm: pwm-tiehrpwm: Add compatible string for AM64 SoC

 .../devicetree/bindings/pwm/pwm-tiehrpwm.txt  | 50 --------------
 .../devicetree/bindings/pwm/pwm-tiehrpwm.yaml | 65 +++++++++++++++++++
 arch/arm/boot/dts/am33xx-l4.dtsi              |  9 +--
 arch/arm/boot/dts/am437x-l4.dtsi              | 18 ++---
 arch/arm/boot/dts/da850.dtsi                  |  6 +-
 5 files changed, 76 insertions(+), 72 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml

-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible
  2021-05-26  8:43 [PATCH 0/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
@ 2021-05-26  8:43 ` Lokesh Vutla
  2021-05-31 11:17   ` Grygorii Strashko
  2021-05-26  8:43 ` [PATCH 2/4] dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required properties Lokesh Vutla
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Lokesh Vutla @ 2021-05-26  8:43 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List, Lokesh Vutla

Commit 229110c1aa691 ("ARM: dts: am437x/am33xx/da850: Add new ECAP and
EPWM bindings") added ti,am3352-ehrpwm compatible which is similar to
ti,am33xx-ehrpwm but without out t,hwmod properties. But with commit
58bfbea5b1c68 ("ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP
and EPWM nodes") dropped support for all ti,hwmod for ehrpwm, but
missed deprecating ti,am33xx-ehrpwm compatible. So drop ti,am33xx-ehrpwm
from DT as it is no longer needed.

ti-ehrpwn driver still support ti,am33xx-ehrpwm in order to maintain
backward compatibility.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../devicetree/bindings/pwm/pwm-tiehrpwm.txt   | 13 ++++++-------
 arch/arm/boot/dts/am33xx-l4.dtsi               |  9 +++------
 arch/arm/boot/dts/am437x-l4.dtsi               | 18 ++++++------------
 arch/arm/boot/dts/da850.dtsi                   |  6 ++----
 4 files changed, 17 insertions(+), 29 deletions(-)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index c7e28f6d28be..e124e41418d8 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -2,10 +2,10 @@ TI SOC EHRPWM based PWM controller
 
 Required properties:
 - compatible: Must be "ti,<soc>-ehrpwm".
-  for am33xx  - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
-  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
+  for am33xx  - compatible = "ti,am3352-ehrpwm";
+  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm";
   for am654   - compatible = "ti,am654-ehrpwm", "ti-am3352-ehrpwm";
-  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
+  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm";
   for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm";
 - #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
   the cells format. The only third cell flag supported by this binding is
@@ -19,7 +19,7 @@ Optional properties:
 Example:
 
 ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
-	compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
+	compatible = "ti,am3352-ehrpwm";
 	#pwm-cells = <3>;
 	reg = <0x48300200 0x100>;
 	clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
@@ -27,16 +27,15 @@ ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
 };
 
 ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
-	compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
+	compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm";
 	#pwm-cells = <3>;
 	reg = <0x48300200 0x80>;
 	clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
 	clock-names = "tbclk", "fck";
-	ti,hwmods = "ehrpwm0";
 };
 
 ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
-	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
+	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
 	#pwm-cells = <3>;
 	reg = <0x1f00000 0x2000>;
 };
diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
index 039a9ab4c7ea..fbf3458ab246 100644
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
@@ -2017,8 +2017,7 @@ eqep0: counter@180 {
 				};
 
 				ehrpwm0: pwm@200 {
-					compatible = "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+					compatible = "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
@@ -2078,8 +2077,7 @@ eqep1: counter@180 {
 				};
 
 				ehrpwm1: pwm@200 {
-					compatible = "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+					compatible = "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
@@ -2139,8 +2137,7 @@ eqep2: counter@180 {
 				};
 
 				ehrpwm2: pwm@200 {
-					compatible = "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+					compatible = "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
index e217ffc09770..e796b9bcc54e 100644
--- a/arch/arm/boot/dts/am437x-l4.dtsi
+++ b/arch/arm/boot/dts/am437x-l4.dtsi
@@ -1760,8 +1760,7 @@ ecap0: ecap@100 {
 
 				ehrpwm0: pwm@200 {
 					compatible = "ti,am4372-ehrpwm",
-						     "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+						     "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
@@ -1812,8 +1811,7 @@ ecap1: ecap@100 {
 
 				ehrpwm1: pwm@200 {
 					compatible = "ti,am4372-ehrpwm",
-						     "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+						     "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
@@ -1864,8 +1862,7 @@ ecap2: ecap@100 {
 
 				ehrpwm2: pwm@200 {
 					compatible = "ti,am4372-ehrpwm",
-						     "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+						     "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
@@ -1905,8 +1902,7 @@ epwmss3: epwmss@0 {
 
 				ehrpwm3: pwm@200 {
 					compatible = "ti,am4372-ehrpwm",
-						     "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+						     "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm3_tbclk>, <&l4ls_gclk>;
@@ -1946,8 +1942,7 @@ epwmss4: epwmss@0 {
 
 				ehrpwm4: pwm@48308200 {
 					compatible = "ti,am4372-ehrpwm",
-						     "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+						     "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm4_tbclk>, <&l4ls_gclk>;
@@ -1987,8 +1982,7 @@ epwmss5: epwmss@0 {
 
 				ehrpwm5: pwm@200 {
 					compatible = "ti,am4372-ehrpwm",
-						     "ti,am3352-ehrpwm",
-						     "ti,am33xx-ehrpwm";
+						     "ti,am3352-ehrpwm";
 					#pwm-cells = <3>;
 					reg = <0x200 0x80>;
 					clocks = <&ehrpwm5_tbclk>, <&l4ls_gclk>;
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 7cf31b6e48b7..afdf3d3747ce 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -574,8 +574,7 @@ mmc1: mmc@21b000 {
 			status = "disabled";
 		};
 		ehrpwm0: pwm@300000 {
-			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
-				     "ti,am33xx-ehrpwm";
+			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
 			#pwm-cells = <3>;
 			reg = <0x300000 0x2000>;
 			clocks = <&psc1 17>, <&ehrpwm_tbclk>;
@@ -584,8 +583,7 @@ ehrpwm0: pwm@300000 {
 			status = "disabled";
 		};
 		ehrpwm1: pwm@302000 {
-			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
-				     "ti,am33xx-ehrpwm";
+			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
 			#pwm-cells = <3>;
 			reg = <0x302000 0x2000>;
 			clocks = <&psc1 17>, <&ehrpwm_tbclk>;
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required properties
  2021-05-26  8:43 [PATCH 0/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
  2021-05-26  8:43 ` [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible Lokesh Vutla
@ 2021-05-26  8:43 ` Lokesh Vutla
  2021-05-31 11:21   ` Grygorii Strashko
  2021-05-26  8:43 ` [PATCH 3/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
  2021-05-26  8:43 ` [PATCH 4/4] dt-bindings: pwm: pwm-tiehrpwm: Add compatible string for AM64 SoC Lokesh Vutla
  3 siblings, 1 reply; 9+ messages in thread
From: Lokesh Vutla @ 2021-05-26  8:43 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List, Lokesh Vutla

Driver fails to probe when 'clock' and 'clock-names' properties are not
populated in DT. But the binding documentation says these properties are
optional. Fix this by making 'clock' and 'clock-names' properties as
required.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
index e124e41418d8..8eae48c9c5cd 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
@@ -11,8 +11,6 @@ Required properties:
   the cells format. The only third cell flag supported by this binding is
   PWM_POLARITY_INVERTED.
 - reg: physical base address and size of the registers map.
-
-Optional properties:
 - clocks: Handle to the PWM's time-base and functional clock.
 - clock-names: Must be set to "tbclk" and "fck".
 
@@ -38,6 +36,8 @@ ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
 	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
 	#pwm-cells = <3>;
 	reg = <0x1f00000 0x2000>;
+	clocks = <&psc1 17>, <&ehrpwm_tbclk>;
+	clock-names = "fck", "tbclk";
 };
 
 ehrpwm0: pwm@4843e200 { /* EHRPWM on dra746 */
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema
  2021-05-26  8:43 [PATCH 0/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
  2021-05-26  8:43 ` [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible Lokesh Vutla
  2021-05-26  8:43 ` [PATCH 2/4] dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required properties Lokesh Vutla
@ 2021-05-26  8:43 ` Lokesh Vutla
  2021-05-26  8:43 ` [PATCH 4/4] dt-bindings: pwm: pwm-tiehrpwm: Add compatible string for AM64 SoC Lokesh Vutla
  3 siblings, 0 replies; 9+ messages in thread
From: Lokesh Vutla @ 2021-05-26  8:43 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List, Lokesh Vutla

Convert the tiehrpwm binding to DT schema format using json-schema.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 .../devicetree/bindings/pwm/pwm-tiehrpwm.txt  | 49 --------------
 .../devicetree/bindings/pwm/pwm-tiehrpwm.yaml | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 49 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml

diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
deleted file mode 100644
index 8eae48c9c5cd..000000000000
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-TI SOC EHRPWM based PWM controller
-
-Required properties:
-- compatible: Must be "ti,<soc>-ehrpwm".
-  for am33xx  - compatible = "ti,am3352-ehrpwm";
-  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm";
-  for am654   - compatible = "ti,am654-ehrpwm", "ti-am3352-ehrpwm";
-  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm";
-  for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm";
-- #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
-  the cells format. The only third cell flag supported by this binding is
-  PWM_POLARITY_INVERTED.
-- reg: physical base address and size of the registers map.
-- clocks: Handle to the PWM's time-base and functional clock.
-- clock-names: Must be set to "tbclk" and "fck".
-
-Example:
-
-ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
-	compatible = "ti,am3352-ehrpwm";
-	#pwm-cells = <3>;
-	reg = <0x48300200 0x100>;
-	clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
-	clock-names = "tbclk", "fck";
-};
-
-ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
-	compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm";
-	#pwm-cells = <3>;
-	reg = <0x48300200 0x80>;
-	clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
-	clock-names = "tbclk", "fck";
-};
-
-ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
-	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
-	#pwm-cells = <3>;
-	reg = <0x1f00000 0x2000>;
-	clocks = <&psc1 17>, <&ehrpwm_tbclk>;
-	clock-names = "fck", "tbclk";
-};
-
-ehrpwm0: pwm@4843e200 { /* EHRPWM on dra746 */
-	compatible = "ti,dra746-ehrpwm", "ti,am3352-ehrpwm";
-	#pwm-cells = <3>;
-	reg = <0x4843e200 0x80>;
-	clocks = <&ehrpwm0_tbclk>, <&l4_root_clk_div>;
-	clock-names = "tbclk", "fck";
-};
diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
new file mode 100644
index 000000000000..84a8d6d38cee
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pwm/pwm-tiehrpwm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI SOC EHRPWM based PWM controller
+
+maintainers:
+  - Vignesh R <vigneshr@ti.com>
+
+allOf:
+  - $ref: pwm.yaml#
+
+properties:
+  compatible:
+    oneOf:
+      - const: ti,am3352-ehrpwm
+      - items:
+          - enum:
+              - ti,da850-ehrpwm
+              - ti,am4372-ehrpwm
+              - ti,dra746-ehrpwm
+              - ti,am654-ehrpwm
+          - const: ti,am3352-ehrpwm
+
+  reg:
+    maxItems: 1
+
+  "#pwm-cells":
+    const: 3
+    description: |
+      See pwm.yaml in this directory for a description of the cells format.
+      The only third cell flag supported by this binding is PWM_POLARITY_INVERTED.
+
+  clock-names:
+    items:
+      - const: tbclk
+      - const: fck
+
+  clocks:
+    maxItems: 2
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - "#pwm-cells"
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
+        compatible = "ti,am3352-ehrpwm";
+        #pwm-cells = <3>;
+        reg = <0x48300200 0x100>;
+        clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
+        clock-names = "tbclk", "fck";
+    };
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] dt-bindings: pwm: pwm-tiehrpwm: Add compatible string for AM64 SoC
  2021-05-26  8:43 [PATCH 0/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
                   ` (2 preceding siblings ...)
  2021-05-26  8:43 ` [PATCH 3/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
@ 2021-05-26  8:43 ` Lokesh Vutla
  3 siblings, 0 replies; 9+ messages in thread
From: Lokesh Vutla @ 2021-05-26  8:43 UTC (permalink / raw)
  To: thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List, Lokesh Vutla

Add compatible string for AM64 SoC in device tree binding.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
index 84a8d6d38cee..347ba356a3f5 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
@@ -22,6 +22,7 @@ properties:
               - ti,am4372-ehrpwm
               - ti,dra746-ehrpwm
               - ti,am654-ehrpwm
+              - ti,am64-ehrpwm
           - const: ti,am3352-ehrpwm
 
   reg:
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible
  2021-05-26  8:43 ` [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible Lokesh Vutla
@ 2021-05-31 11:17   ` Grygorii Strashko
  2021-05-31 11:31     ` Grygorii Strashko
  2021-06-01  5:32     ` Lokesh Vutla
  0 siblings, 2 replies; 9+ messages in thread
From: Grygorii Strashko @ 2021-05-31 11:17 UTC (permalink / raw)
  To: Lokesh Vutla, thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List



On 26/05/2021 11:43, Lokesh Vutla wrote:
> Commit 229110c1aa691 ("ARM: dts: am437x/am33xx/da850: Add new ECAP and
> EPWM bindings") added ti,am3352-ehrpwm compatible which is similar to
> ti,am33xx-ehrpwm but without out t,hwmod properties. But with commit
> 58bfbea5b1c68 ("ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP
> and EPWM nodes") dropped support for all ti,hwmod for ehrpwm, but
> missed deprecating ti,am33xx-ehrpwm compatible. So drop ti,am33xx-ehrpwm
> from DT as it is no longer needed.
> 
> ti-ehrpwn driver still support ti,am33xx-ehrpwm in order to maintain
> backward compatibility.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>   .../devicetree/bindings/pwm/pwm-tiehrpwm.txt   | 13 ++++++-------
>   arch/arm/boot/dts/am33xx-l4.dtsi               |  9 +++------
>   arch/arm/boot/dts/am437x-l4.dtsi               | 18 ++++++------------
>   arch/arm/boot/dts/da850.dtsi                   |  6 ++----
>   4 files changed, 17 insertions(+), 29 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> index c7e28f6d28be..e124e41418d8 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> @@ -2,10 +2,10 @@ TI SOC EHRPWM based PWM controller
>   
>   Required properties:
>   - compatible: Must be "ti,<soc>-ehrpwm".
> -  for am33xx  - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
> -  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
> +  for am33xx  - compatible = "ti,am3352-ehrpwm";
> +  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm";
>     for am654   - compatible = "ti,am654-ehrpwm", "ti-am3352-ehrpwm";
> -  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
> +  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm";
>     for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm";
>   - #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
>     the cells format. The only third cell flag supported by this binding is
> @@ -19,7 +19,7 @@ Optional properties:
>   Example:
>   
>   ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
> -	compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
> +	compatible = "ti,am3352-ehrpwm";
>   	#pwm-cells = <3>;
>   	reg = <0x48300200 0x100>;
>   	clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
> @@ -27,16 +27,15 @@ ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
>   };
>   
>   ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
> -	compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
> +	compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm";
>   	#pwm-cells = <3>;
>   	reg = <0x48300200 0x80>;
>   	clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>   	clock-names = "tbclk", "fck";
> -	ti,hwmods = "ehrpwm0";
>   };
>   
>   ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
> -	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
> +	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>   	#pwm-cells = <3>;
>   	reg = <0x1f00000 0x2000>;
>   };
> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
> index 039a9ab4c7ea..fbf3458ab246 100644
> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
> @@ -2017,8 +2017,7 @@ eqep0: counter@180 {
>   				};
>   
>   				ehrpwm0: pwm@200 {
> -					compatible = "ti,am3352-ehrpwm",
> -						     "ti,am33xx-ehrpwm";
> +					compatible = "ti,am3352-ehrpwm";
>   					#pwm-cells = <3>;
>   					reg = <0x200 0x80>;
>   					clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
> @@ -2078,8 +2077,7 @@ eqep1: counter@180 {
>   				};
>   
>   				ehrpwm1: pwm@200 {
> -					compatible = "ti,am3352-ehrpwm",
> -						     "ti,am33xx-ehrpwm";
> +					compatible = "ti,am3352-ehrpwm";
>   					#pwm-cells = <3>;
>   					reg = <0x200 0x80>;
>   					clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
> @@ -2139,8 +2137,7 @@ eqep2: counter@180 {
>   				};
>   
>   				ehrpwm2: pwm@200 {
> -					compatible = "ti,am3352-ehrpwm",
> -						     "ti,am33xx-ehrpwm";
> +					compatible = "ti,am3352-ehrpwm";
>   					#pwm-cells = <3>;
>   					reg = <0x200 0x80>;
>   					clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
> diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi

[...]

> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 7cf31b6e48b7..afdf3d3747ce 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -574,8 +574,7 @@ mmc1: mmc@21b000 {
>   			status = "disabled";
>   		};
>   		ehrpwm0: pwm@300000 {
> -			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
> -				     "ti,am33xx-ehrpwm";
> +			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>   			#pwm-cells = <3>;
>   			reg = <0x300000 0x2000>;
>   			clocks = <&psc1 17>, <&ehrpwm_tbclk>;
> @@ -584,8 +583,7 @@ ehrpwm0: pwm@300000 {
>   			status = "disabled";
>   		};
>   		ehrpwm1: pwm@302000 {
> -			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
> -				     "ti,am33xx-ehrpwm";
> +			compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>   			#pwm-cells = <3>;
>   			reg = <0x302000 0x2000>;
>   			clocks = <&psc1 17>, <&ehrpwm_tbclk>;
> 

I think, the DT changes can be split and posted standalone while bindings fixed
as part of yaml conversation.
Personally I do not see reasons for separate .txt bindings fix here as ymal conversation just
reveals inconsistency between DT bindings, DTBs and code which leads to DTBs fix.

But, of course, it's up to Rob first of all.

-- 
Best regards,
grygorii

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/4] dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required properties
  2021-05-26  8:43 ` [PATCH 2/4] dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required properties Lokesh Vutla
@ 2021-05-31 11:21   ` Grygorii Strashko
  0 siblings, 0 replies; 9+ messages in thread
From: Grygorii Strashko @ 2021-05-31 11:21 UTC (permalink / raw)
  To: Lokesh Vutla, thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List



On 26/05/2021 11:43, Lokesh Vutla wrote:
> Driver fails to probe when 'clock' and 'clock-names' properties are not
> populated in DT. But the binding documentation says these properties are
> optional. Fix this by making 'clock' and 'clock-names' properties as
> required.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>   Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> index e124e41418d8..8eae48c9c5cd 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
> @@ -11,8 +11,6 @@ Required properties:
>     the cells format. The only third cell flag supported by this binding is
>     PWM_POLARITY_INVERTED.
>   - reg: physical base address and size of the registers map.
> -
> -Optional properties:
>   - clocks: Handle to the PWM's time-base and functional clock.
>   - clock-names: Must be set to "tbclk" and "fck".
>   
> @@ -38,6 +36,8 @@ ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
>   	compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>   	#pwm-cells = <3>;
>   	reg = <0x1f00000 0x2000>;
> +	clocks = <&psc1 17>, <&ehrpwm_tbclk>;
> +	clock-names = "fck", "tbclk";
>   };
>   
>   ehrpwm0: pwm@4843e200 { /* EHRPWM on dra746 */
> 

Here also, many text bindings missed standard props or miss-define them comparing to code,
which is accumulated over years. Now, thanks to .yaml conversation, we can catch them.

So, I ,personally, do not see reasons for separate patch here and think it can be done as part of
Patch 3.


-- 
Best regards,
grygorii

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible
  2021-05-31 11:17   ` Grygorii Strashko
@ 2021-05-31 11:31     ` Grygorii Strashko
  2021-06-01  5:32     ` Lokesh Vutla
  1 sibling, 0 replies; 9+ messages in thread
From: Grygorii Strashko @ 2021-05-31 11:31 UTC (permalink / raw)
  To: Lokesh Vutla, thierry.reding, u.kleine-koenig, lee.jones, Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List



On 31/05/2021 14:17, Grygorii Strashko wrote:
> 
> 
> On 26/05/2021 11:43, Lokesh Vutla wrote:
>> Commit 229110c1aa691 ("ARM: dts: am437x/am33xx/da850: Add new ECAP and
>> EPWM bindings") added ti,am3352-ehrpwm compatible which is similar to
>> ti,am33xx-ehrpwm but without out t,hwmod properties. But with commit
>> 58bfbea5b1c68 ("ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP
>> and EPWM nodes") dropped support for all ti,hwmod for ehrpwm, but
>> missed deprecating ti,am33xx-ehrpwm compatible. So drop ti,am33xx-ehrpwm
>> from DT as it is no longer needed.
>>
>> ti-ehrpwn driver still support ti,am33xx-ehrpwm in order to maintain
>> backward compatibility.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>   .../devicetree/bindings/pwm/pwm-tiehrpwm.txt   | 13 ++++++-------
>>   arch/arm/boot/dts/am33xx-l4.dtsi               |  9 +++------
>>   arch/arm/boot/dts/am437x-l4.dtsi               | 18 ++++++------------
>>   arch/arm/boot/dts/da850.dtsi                   |  6 ++----
>>   4 files changed, 17 insertions(+), 29 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> index c7e28f6d28be..e124e41418d8 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> @@ -2,10 +2,10 @@ TI SOC EHRPWM based PWM controller
>>   Required properties:
>>   - compatible: Must be "ti,<soc>-ehrpwm".
>> -  for am33xx  - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> -  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +  for am33xx  - compatible = "ti,am3352-ehrpwm";
>> +  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm";

More over, this fix is incorrect by itself - there is no "ti-am3352-ehrpwm".

>>     for am654   - compatible = "ti,am654-ehrpwm", "ti-am3352-ehrpwm";
>> -  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm";
>>     for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm";
>>   - #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
>>     the cells format. The only third cell flag supported by this binding is
>> @@ -19,7 +19,7 @@ Optional properties:
>>   Example:
>>   ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
>> -    compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +    compatible = "ti,am3352-ehrpwm";
>>       #pwm-cells = <3>;
>>       reg = <0x48300200 0x100>;
>>       clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>> @@ -27,16 +27,15 @@ ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
>>   };
>>   ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
>> -    compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +    compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm";
>>       #pwm-cells = <3>;
>>       reg = <0x48300200 0x80>;
>>       clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>>       clock-names = "tbclk", "fck";
>> -    ti,hwmods = "ehrpwm0";
>>   };
>>   ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
>> -    compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +    compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>>       #pwm-cells = <3>;
>>       reg = <0x1f00000 0x2000>;
>>   };
>> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
>> index 039a9ab4c7ea..fbf3458ab246 100644
>> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
>> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
>> @@ -2017,8 +2017,7 @@ eqep0: counter@180 {
>>                   };
>>                   ehrpwm0: pwm@200 {
>> -                    compatible = "ti,am3352-ehrpwm",
>> -                             "ti,am33xx-ehrpwm";
>> +                    compatible = "ti,am3352-ehrpwm";
>>                       #pwm-cells = <3>;
>>                       reg = <0x200 0x80>;
>>                       clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>> @@ -2078,8 +2077,7 @@ eqep1: counter@180 {
>>                   };
>>                   ehrpwm1: pwm@200 {
>> -                    compatible = "ti,am3352-ehrpwm",
>> -                             "ti,am33xx-ehrpwm";
>> +                    compatible = "ti,am3352-ehrpwm";
>>                       #pwm-cells = <3>;
>>                       reg = <0x200 0x80>;
>>                       clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
>> @@ -2139,8 +2137,7 @@ eqep2: counter@180 {
>>                   };
>>                   ehrpwm2: pwm@200 {
>> -                    compatible = "ti,am3352-ehrpwm",
>> -                             "ti,am33xx-ehrpwm";
>> +                    compatible = "ti,am3352-ehrpwm";
>>                       #pwm-cells = <3>;
>>                       reg = <0x200 0x80>;
>>                       clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
>> diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
> 
> [...]
> 
>> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
>> index 7cf31b6e48b7..afdf3d3747ce 100644
>> --- a/arch/arm/boot/dts/da850.dtsi
>> +++ b/arch/arm/boot/dts/da850.dtsi
>> @@ -574,8 +574,7 @@ mmc1: mmc@21b000 {
>>               status = "disabled";
>>           };
>>           ehrpwm0: pwm@300000 {
>> -            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
>> -                     "ti,am33xx-ehrpwm";
>> +            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>>               #pwm-cells = <3>;
>>               reg = <0x300000 0x2000>;
>>               clocks = <&psc1 17>, <&ehrpwm_tbclk>;
>> @@ -584,8 +583,7 @@ ehrpwm0: pwm@300000 {
>>               status = "disabled";
>>           };
>>           ehrpwm1: pwm@302000 {
>> -            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
>> -                     "ti,am33xx-ehrpwm";
>> +            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>>               #pwm-cells = <3>;
>>               reg = <0x302000 0x2000>;
>>               clocks = <&psc1 17>, <&ehrpwm_tbclk>;
>>
> 
> I think, the DT changes can be split and posted standalone while bindings fixed
> as part of yaml conversation.
> Personally I do not see reasons for separate .txt bindings fix here as ymal conversation just
> reveals inconsistency between DT bindings, DTBs and code which leads to DTBs fix.
> 
> But, of course, it's up to Rob first of all.
> 

-- 
Best regards,
grygorii

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible
  2021-05-31 11:17   ` Grygorii Strashko
  2021-05-31 11:31     ` Grygorii Strashko
@ 2021-06-01  5:32     ` Lokesh Vutla
  1 sibling, 0 replies; 9+ messages in thread
From: Lokesh Vutla @ 2021-06-01  5:32 UTC (permalink / raw)
  To: Grygorii Strashko, thierry.reding, u.kleine-koenig, lee.jones,
	Rob Herring
  Cc: tony, Sekhar Nori, Vignesh R, Nishanth Menon, linux-pwm,
	Device Tree Mailing List, Linux ARM Mailing List,
	Linux OMAP Mailing List



On 31/05/21 4:47 pm, Grygorii Strashko wrote:
> 
> 
> On 26/05/2021 11:43, Lokesh Vutla wrote:
>> Commit 229110c1aa691 ("ARM: dts: am437x/am33xx/da850: Add new ECAP and
>> EPWM bindings") added ti,am3352-ehrpwm compatible which is similar to
>> ti,am33xx-ehrpwm but without out t,hwmod properties. But with commit
>> 58bfbea5b1c68 ("ARM: dts: am437x/am33xx: Remove hwmod entries for ECAP
>> and EPWM nodes") dropped support for all ti,hwmod for ehrpwm, but
>> missed deprecating ti,am33xx-ehrpwm compatible. So drop ti,am33xx-ehrpwm
>> from DT as it is no longer needed.
>>
>> ti-ehrpwn driver still support ti,am33xx-ehrpwm in order to maintain
>> backward compatibility.
>>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>   .../devicetree/bindings/pwm/pwm-tiehrpwm.txt   | 13 ++++++-------
>>   arch/arm/boot/dts/am33xx-l4.dtsi               |  9 +++------
>>   arch/arm/boot/dts/am437x-l4.dtsi               | 18 ++++++------------
>>   arch/arm/boot/dts/da850.dtsi                   |  6 ++----
>>   4 files changed, 17 insertions(+), 29 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> index c7e28f6d28be..e124e41418d8 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.txt
>> @@ -2,10 +2,10 @@ TI SOC EHRPWM based PWM controller
>>     Required properties:
>>   - compatible: Must be "ti,<soc>-ehrpwm".
>> -  for am33xx  - compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> -  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm",
>> "ti,am33xx-ehrpwm";
>> +  for am33xx  - compatible = "ti,am3352-ehrpwm";
>> +  for am4372  - compatible = "ti,am4372-ehrpwm", "ti-am3352-ehrpwm";
>>     for am654   - compatible = "ti,am654-ehrpwm", "ti-am3352-ehrpwm";
>> -  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm",
>> "ti,am33xx-ehrpwm";
>> +  for da850   - compatible = "ti,da850-ehrpwm", "ti-am3352-ehrpwm";
>>     for dra746 - compatible = "ti,dra746-ehrpwm", "ti-am3352-ehrpwm";
>>   - #pwm-cells: should be 3. See pwm.yaml in this directory for a description of
>>     the cells format. The only third cell flag supported by this binding is
>> @@ -19,7 +19,7 @@ Optional properties:
>>   Example:
>>     ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
>> -    compatible = "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +    compatible = "ti,am3352-ehrpwm";
>>       #pwm-cells = <3>;
>>       reg = <0x48300200 0x100>;
>>       clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>> @@ -27,16 +27,15 @@ ehrpwm0: pwm@48300200 { /* EHRPWM on am33xx */
>>   };
>>     ehrpwm0: pwm@48300200 { /* EHRPWM on am4372 */
>> -    compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +    compatible = "ti,am4372-ehrpwm", "ti,am3352-ehrpwm";
>>       #pwm-cells = <3>;
>>       reg = <0x48300200 0x80>;
>>       clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>>       clock-names = "tbclk", "fck";
>> -    ti,hwmods = "ehrpwm0";
>>   };
>>     ehrpwm0: pwm@1f00000 { /* EHRPWM on da850 */
>> -    compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm", "ti,am33xx-ehrpwm";
>> +    compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>>       #pwm-cells = <3>;
>>       reg = <0x1f00000 0x2000>;
>>   };
>> diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
>> index 039a9ab4c7ea..fbf3458ab246 100644
>> --- a/arch/arm/boot/dts/am33xx-l4.dtsi
>> +++ b/arch/arm/boot/dts/am33xx-l4.dtsi
>> @@ -2017,8 +2017,7 @@ eqep0: counter@180 {
>>                   };
>>                     ehrpwm0: pwm@200 {
>> -                    compatible = "ti,am3352-ehrpwm",
>> -                             "ti,am33xx-ehrpwm";
>> +                    compatible = "ti,am3352-ehrpwm";
>>                       #pwm-cells = <3>;
>>                       reg = <0x200 0x80>;
>>                       clocks = <&ehrpwm0_tbclk>, <&l4ls_gclk>;
>> @@ -2078,8 +2077,7 @@ eqep1: counter@180 {
>>                   };
>>                     ehrpwm1: pwm@200 {
>> -                    compatible = "ti,am3352-ehrpwm",
>> -                             "ti,am33xx-ehrpwm";
>> +                    compatible = "ti,am3352-ehrpwm";
>>                       #pwm-cells = <3>;
>>                       reg = <0x200 0x80>;
>>                       clocks = <&ehrpwm1_tbclk>, <&l4ls_gclk>;
>> @@ -2139,8 +2137,7 @@ eqep2: counter@180 {
>>                   };
>>                     ehrpwm2: pwm@200 {
>> -                    compatible = "ti,am3352-ehrpwm",
>> -                             "ti,am33xx-ehrpwm";
>> +                    compatible = "ti,am3352-ehrpwm";
>>                       #pwm-cells = <3>;
>>                       reg = <0x200 0x80>;
>>                       clocks = <&ehrpwm2_tbclk>, <&l4ls_gclk>;
>> diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
> 
> [...]
> 
>> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
>> index 7cf31b6e48b7..afdf3d3747ce 100644
>> --- a/arch/arm/boot/dts/da850.dtsi
>> +++ b/arch/arm/boot/dts/da850.dtsi
>> @@ -574,8 +574,7 @@ mmc1: mmc@21b000 {
>>               status = "disabled";
>>           };
>>           ehrpwm0: pwm@300000 {
>> -            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
>> -                     "ti,am33xx-ehrpwm";
>> +            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>>               #pwm-cells = <3>;
>>               reg = <0x300000 0x2000>;
>>               clocks = <&psc1 17>, <&ehrpwm_tbclk>;
>> @@ -584,8 +583,7 @@ ehrpwm0: pwm@300000 {
>>               status = "disabled";
>>           };
>>           ehrpwm1: pwm@302000 {
>> -            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm",
>> -                     "ti,am33xx-ehrpwm";
>> +            compatible = "ti,da850-ehrpwm", "ti,am3352-ehrpwm";
>>               #pwm-cells = <3>;
>>               reg = <0x302000 0x2000>;
>>               clocks = <&psc1 17>, <&ehrpwm_tbclk>;
>>
> 
> I think, the DT changes can be split and posted standalone while bindings fixed
> as part of yaml conversation.
> Personally I do not see reasons for separate .txt bindings fix here as ymal
> conversation just
> reveals inconsistency between DT bindings, DTBs and code which leads to DTBs fix.

I agree. Will split the series into DT changes and yaml conversion.

Thanks and regards,
Lokesh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-01  5:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26  8:43 [PATCH 0/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
2021-05-26  8:43 ` [PATCH 1/4] arm: dts: ti: drop usage of redundant compatible Lokesh Vutla
2021-05-31 11:17   ` Grygorii Strashko
2021-05-31 11:31     ` Grygorii Strashko
2021-06-01  5:32     ` Lokesh Vutla
2021-05-26  8:43 ` [PATCH 2/4] dt-bindings: pwm: tiehrpwm: Make clock and clock-names as required properties Lokesh Vutla
2021-05-31 11:21   ` Grygorii Strashko
2021-05-26  8:43 ` [PATCH 3/4] dt-bindings: pwm: pwm-tiehrpwm: Convert to json schema Lokesh Vutla
2021-05-26  8:43 ` [PATCH 4/4] dt-bindings: pwm: pwm-tiehrpwm: Add compatible string for AM64 SoC Lokesh Vutla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).