Skip to contentSkip to conversation

dt-bindings: opp/cpufreq: Convert ti-cpufreq to

PATCH Superseded Nishanth Menon 4 participants 12 messages Jul 24, 2023 – Jul 31, 2023

Subsystems (4)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH 1/5 arm: dts: ti: omap: omap36xx: Rename opp_supply nodename

In reply to Nishanth Menon

Use opp-supply as the proper node name.

---

Should probably go via Tony's tree.

 arch/arm/boot/dts/ti/omap/omap36xx.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ti/omap/omap36xx.dtsi +1 -1
index fff9c3d34193..50e640a32b5c 100644
@@ -71,7 +71,7 @@ opp1g-1000000000 {
 		};
 	};
 
-	opp_supply_mpu_iva: opp_supply {
+	opp_supply_mpu_iva: opp-supply {
 		compatible = "ti,omap-opp-supply";
 		ti,absolute-max-voltage-uv = <1375000>;
 	};
Signature · 1 line
2.40.0
author maintainer
#3 lore raw

PATCH 2/5 arm: dts: ti: omap: am5729-beagleboneai: Drop the OPP

In reply to Nishanth Menon

opp_slow is not defined in the table in dra7 or derivatives, drop the definition.

---
Should probably go via Tony's tree

 arch/arm/boot/dts/ti/omap/am5729-beagleboneai.dts | 6 ------
 1 file changed, 6 deletions(-)
arch/arm/boot/dts/ti/omap/am5729-beagleboneai.dts +0 -6
index 149cfafb90bf..9a234dc1431d 100644
@@ -677,12 +677,6 @@ &i2c4 {
 	clock-frequency = <100000>;
 };
 
-&cpu0_opp_table {
-	opp_slow-500000000 {
-		opp-shared;
-	};
-};
-
 &ipu2 {
 	status = "okay";
 	memory-region = <&ipu2_memory_region>;
Signature · 1 line
2.40.0

Nishanth Menon

author maintainer
#0 lore raw

cover dt-bindings: opp/cpufreq: Convert ti-cpufreq to

Hi,

Patches 1-3 are probably meant for omap tree via Tony and cleansup the existing tree while the patches 4-5 convert the exiting txt bindings to yaml.

This series also fixes up a bunch of dtbs_check warnings introduced into the arm64/boot/dts/ti tree as well.

Nishanth Menon (5):
arm: dts: ti: omap: omap36xx: Rename opp_supply nodename
arm: dts: ti: omap: am5729-beagleboneai: Drop the OPP
arm: dts: ti: omap: Fix OPP table node names
dt-bindings: opp: Convert ti-omap5-opp-supply.txt to yaml binding
dt-bindings: cpufreq: Convert ti-cpufreq.txt to yaml binding

 .../bindings/cpufreq/ti-cpufreq.txt           | 132 ------------------
 .../bindings/opp/opp-v2-ti-cpu.yaml           |  88 ++++++++++++
 .../bindings/opp/ti,omap-opp-supply.yaml      | 108 ++++++++++++++
 .../bindings/opp/ti-omap5-opp-supply.txt      |  63 ---------
 .../arm/boot/dts/ti/omap/am335x-boneblack.dts |   3 +-
 .../dts/ti/omap/am335x-osd335x-common.dtsi    |   3 +-
 arch/arm/boot/dts/ti/omap/am33xx.dtsi         |  30 ++--
 arch/arm/boot/dts/ti/omap/am3517.dtsi         |   6 +-
 arch/arm/boot/dts/ti/omap/am4372.dtsi         |  15 +-
 arch/arm/boot/dts/ti/omap/am437x-idk-evm.dts  |   6 +-
 .../boot/dts/ti/omap/am5729-beagleboneai.dts  |   6 -
 arch/arm/boot/dts/ti/omap/dra7.dtsi           |   9 +-
 arch/arm/boot/dts/ti/omap/dra76x.dtsi         |   3 +-
 arch/arm/boot/dts/ti/omap/omap34xx.dtsi       |  12 +-
 arch/arm/boot/dts/ti/omap/omap36xx.dtsi       |  14 +-
 15 files changed, 261 insertions(+), 237 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/cpufreq/ti-cpufreq.txt
 create mode 100644 Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml
 create mode 100644 Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml
 delete mode 100644 Documentation/devicetree/bindings/opp/ti-omap5-opp-supply.txt
Signature · 1 line
2.40.0
author maintainer
#6 lore raw

PATCH 4/5 dt-bindings: opp: Convert ti-omap5-opp-supply.txt to yaml binding

Rename ti-omap5-opp-supply to be bit more generic omap-opp-supply and convert the binding to yaml.

---
 .../bindings/opp/ti,omap-opp-supply.yaml      | 108 ++++++++++++++++++
 .../bindings/opp/ti-omap5-opp-supply.txt      |  63 ----------
 2 files changed, 108 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml
 delete mode 100644 Documentation/devicetree/bindings/opp/ti-omap5-opp-supply.txt
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +108 -0
new file mode 100644
index 000000000000..ff1b3d8fea31
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/ti,omap-opp-supply.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OMAP compatible OPP supply description
+
+description: |
+  OMAP5, DRA7, and AM57 family of SoCs have Class0 AVS eFuse registers which
+  contain data that can be used to adjust voltages programmed for some of their
+  supplies for more efficient operation. This binding provides the information
+  needed to read these values and use them to program the main regulator during
+  an OPP transitions.
+
+  Also, some supplies may have an associated vbb-supply which is an Adaptive Body
+  Bias regulator which much be transitioned in a specific sequence with regards
+  to the vdd-supply and clk when making an OPP transition. By supplying two
+  regulators to the device that will undergo OPP transitions we can make use
+  of the multi regulator binding that is part of the OPP core described
+  to describe both regulators needed by the platform.
+
+maintainers:
+  - Nishanth Menon <[email protected]>
+
+properties:
+  $nodename:
+    pattern: '^opp-supply(@[0-9a-f]+)?$'
+
+  compatible:
+    oneOf:
+      - description: Basic OPP supply controlling VDD and VBB
+        items:
+          - const: ti,omap-opp-supply
+      - description: OMAP5+ optimized voltages in efuse(Class 0) VDD along with
+          VBB.
+        items:
+          - const: ti,omap5-opp-supply
+      - description: OMAP5+ optimized voltages in efuse(class0) VDD but no VBB
+        items:
+          - const: ti,omap5-core-opp-supply
+
+  reg:
+    description: Address and length of the efuse register set for the device
+    maxItems: 1
+
+  ti,absolute-max-voltage-uv:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Absolute maximum voltage for the OPP supply
+
+  ti,efuse-settings:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description: An array of u32 tuple items providing information about
+      optimized efuse configuration. Each item consists of the following
+      voltage_in_uV - reference voltage (OPP Voltage)
+      efuse_offset - efuse offset fromr eg where the optimized voltage is
+        stored.
+    items:
+      minItems: 2
+      maxItems: 2
+    minItems: 1
+
+required:
+  - compatible
+  - ti,absolute-max-voltage-uv
+
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: ti,omap-opp-supply
+    then:
+      required:
+        - reg
+        - ti,efuse-settings
+
+additionalProperties: false
+
+examples:
+  - |
+    opp_supply_mpu_iva_hd: opp-supply {
+        compatible = "ti,omap-opp-supply";
+        ti,absolute-max-voltage-uv = <1375000>;
+    };
+  - |
+    opp_supply_mpu: opp-supply@4a003b20 {
+        compatible = "ti,omap5-opp-supply";
+        reg = <0x4a003b20 0x8>;
+        ti,efuse-settings =
+            /* uV   offset */
+            <1060000 0x0>,
+            <1160000 0x4>,
+            <1210000 0x8>;
+        ti,absolute-max-voltage-uv = <1500000>;
+    };
+  - |
+    opp_supply_mpu2: opp-supply@4a003b00 {
+        compatible = "ti,omap5-core-opp-supply";
+        reg = <0x4a003b00 0x8>;
+        ti,efuse-settings =
+            /* uV   offset */
+            <1060000 0x0>,
+            <1160000 0x4>,
+            <1210000 0x8>;
+        ti,absolute-max-voltage-uv = <1500000>;
+    };
Documentation/devicetree/bindings/opp/ti-omap5-opp-supply.txt deleted +0 -63

63 lines not on this page · raw message

Signature · 1 line
2.40.0
author maintainer
#9 lore raw

PATCH 5/5 dt-bindings: cpufreq: Convert ti-cpufreq.txt to yaml binding

In reply to Nishanth Menon

Move the ti-cpufreq binding over to opp and convert to yaml

---
 .../bindings/cpufreq/ti-cpufreq.txt           | 132 ------------------
 .../bindings/opp/opp-v2-ti-cpu.yaml           |  88 ++++++++++++
 2 files changed, 88 insertions(+), 132 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/cpufreq/ti-cpufreq.txt
 create mode 100644 Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml
Documentation/devicetree/bindings/cpufreq/ti-cpufreq.txt deleted +0 -132
deleted file mode 100644
index 1758051798fe..000000000000
@@ -1,132 +0,0 @@
-TI CPUFreq and OPP bindings
-================================
-
-Certain TI SoCs, like those in the am335x, am437x, am57xx, and dra7xx
-families support different OPPs depending on the silicon variant in use.
-The ti-cpufreq driver can use revision and an efuse value from the SoC to
-provide the OPP framework with supported hardware information. This is
-used to determine which OPPs from the operating-points-v2 table get enabled
-when it is parsed by the OPP framework.
-
-Required properties:
---------------------
-In 'cpus' nodes:
-- operating-points-v2: Phandle to the operating-points-v2 table to use.
-
-In 'operating-points-v2' table:
-- compatible: Should be
-	- 'operating-points-v2-ti-cpu' for am335x, am43xx, and dra7xx/am57xx,
-	  omap34xx, omap36xx and am3517 SoCs
-- syscon: A phandle pointing to a syscon node representing the control module
-	  register space of the SoC.
-
-Optional properties:
---------------------
-- "vdd-supply", "vbb-supply": to define two regulators for dra7xx
-- "cpu0-supply", "vbb-supply": to define two regulators for omap36xx
-
-For each opp entry in 'operating-points-v2' table:
-- opp-supported-hw: Two bitfields indicating:
-	1. Which revision of the SoC the OPP is supported by
-	2. Which eFuse bits indicate this OPP is available
-
-	A bitwise AND is performed against these values and if any bit
-	matches, the OPP gets enabled.
-
-Example:
---------
-
-/* From arch/arm/boot/dts/am33xx.dtsi */
-cpus {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	cpu@0 {
-		compatible = "arm,cortex-a8";
-		device_type = "cpu";
-		reg = <0>;
-
-		operating-points-v2 = <&cpu0_opp_table>;
-
-		clocks = <&dpll_mpu_ck>;
-		clock-names = "cpu";
-
-		clock-latency = <300000>; /* From omap-cpufreq driver */
-	};
-};
-
-/*
- * cpu0 has different OPPs depending on SoC revision and some on revisions
- * 0x2 and 0x4 have eFuse bits that indicate if they are available or not
- */
-cpu0_opp_table: opp-table {
-	compatible = "operating-points-v2-ti-cpu";
-	syscon = <&scm_conf>;
-
-	/*
-	 * The three following nodes are marked with opp-suspend
-	 * because they can not be enabled simultaneously on a
-	 * single SoC.
-	 */
-	opp50-300000000 {
-		opp-hz = /bits/ 64 <300000000>;
-		opp-microvolt = <950000 931000 969000>;
-		opp-supported-hw = <0x06 0x0010>;
-		opp-suspend;
-	};
-
-	opp100-275000000 {
-		opp-hz = /bits/ 64 <275000000>;
-		opp-microvolt = <1100000 1078000 1122000>;
-		opp-supported-hw = <0x01 0x00FF>;
-		opp-suspend;
-	};
-
-	opp100-300000000 {
-		opp-hz = /bits/ 64 <300000000>;
-		opp-microvolt = <1100000 1078000 1122000>;
-		opp-supported-hw = <0x06 0x0020>;
-		opp-suspend;
-	};
-
-	opp100-500000000 {
-		opp-hz = /bits/ 64 <500000000>;
-		opp-microvolt = <1100000 1078000 1122000>;
-		opp-supported-hw = <0x01 0xFFFF>;
-	};
-
-	opp100-600000000 {
-		opp-hz = /bits/ 64 <600000000>;
-		opp-microvolt = <1100000 1078000 1122000>;
-		opp-supported-hw = <0x06 0x0040>;
-	};
-
-	opp120-600000000 {
-		opp-hz = /bits/ 64 <600000000>;
-		opp-microvolt = <1200000 1176000 1224000>;
-		opp-supported-hw = <0x01 0xFFFF>;
-	};
-
-	opp120-720000000 {
-		opp-hz = /bits/ 64 <720000000>;
-		opp-microvolt = <1200000 1176000 1224000>;
-		opp-supported-hw = <0x06 0x0080>;
-	};
-
-	oppturbo-720000000 {
-		opp-hz = /bits/ 64 <720000000>;
-		opp-microvolt = <1260000 1234800 1285200>;
-		opp-supported-hw = <0x01 0xFFFF>;
-	};
-
-	oppturbo-800000000 {
-		opp-hz = /bits/ 64 <800000000>;
-		opp-microvolt = <1260000 1234800 1285200>;
-		opp-supported-hw = <0x06 0x0100>;
-	};
-
-	oppnitro-1000000000 {
-		opp-hz = /bits/ 64 <1000000000>;
-		opp-microvolt = <1325000 1298500 1351500>;
-		opp-supported-hw = <0x04 0x0200>;
-	};
-};
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +88 -0

88 lines not on this page · raw message

Signature · 1 line
2.40.0
author maintainer
#4 lore raw

PATCH 3/5 arm: dts: ti: omap: Fix OPP table node names

In reply to Nishanth Menon

Fix the opp table node names for opps to be compliant with bindings.

---
Should probably go via Tony's tree.

 .../arm/boot/dts/ti/omap/am335x-boneblack.dts |  3 +-
 .../dts/ti/omap/am335x-osd335x-common.dtsi    |  3 +-
 arch/arm/boot/dts/ti/omap/am33xx.dtsi         | 30 ++++++++++++-------
 arch/arm/boot/dts/ti/omap/am3517.dtsi         |  6 ++--
 arch/arm/boot/dts/ti/omap/am4372.dtsi         | 15 ++++++----
 arch/arm/boot/dts/ti/omap/am437x-idk-evm.dts  |  6 ++--
 arch/arm/boot/dts/ti/omap/dra7.dtsi           |  9 ++++--
 arch/arm/boot/dts/ti/omap/dra76x.dtsi         |  3 +-
 arch/arm/boot/dts/ti/omap/omap34xx.dtsi       | 12 ++++----
 arch/arm/boot/dts/ti/omap/omap36xx.dtsi       | 12 +++++---
 10 files changed, 64 insertions(+), 35 deletions(-)
arch/arm/boot/dts/ti/omap/am335x-boneblack.dts +2 -1
index b956e2f60fe0..16b567e3cb47 100644
@@ -20,7 +20,8 @@ &cpu0_opp_table {
 	 * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
 	 * to support 1GHz OPP so enable it for PG 2.0 on this board.
 	 */
-	oppnitro-1000000000 {
+	opp-1000000000 {
+		/* OPP Nitro */
 		opp-supported-hw = <0x06 0x0100>;
 	};
 };
arch/arm/boot/dts/ti/omap/am335x-osd335x-common.dtsi +2 -1
index 9863bf499a39..93a3af83feac 100644
@@ -28,7 +28,8 @@ &cpu0_opp_table {
 	* the HW OPP table, the silicon looks like it is Revision 1.0 (ie the
 	* EFUSE_SMA register reads as all zeros).
 	*/
-	oppnitro-1000000000 {
+	opp-1000000000 {
+		/* OPP Nitro */
 		opp-supported-hw = <0x06 0x0100>;
 	};
 };
arch/arm/boot/dts/ti/omap/am33xx.dtsi +20 -10
index 32d397b3950b..1a2cd5baf402 100644
@@ -80,64 +80,74 @@ cpu0_opp_table: opp-table {
 		 * because the can not be enabled simultaneously on a
 		 * single SoC.
 		 */
-		opp50-300000000 {
+		opp-50-300000000{
+			/* OPP50 */
 			opp-hz = /bits/ 64 <300000000>;
 			opp-microvolt = <950000 931000 969000>;
 			opp-supported-hw = <0x06 0x0010>;
 			opp-suspend;
 		};
 
-		opp100-275000000 {
+		opp-100-275000000{
+			/* OPP100-1 */
 			opp-hz = /bits/ 64 <275000000>;
 			opp-microvolt = <1100000 1078000 1122000>;
 			opp-supported-hw = <0x01 0x00FF>;
 			opp-suspend;
 		};
 
-		opp100-300000000 {
+		opp-100-300000000{
+			/* OPP100-2 */
 			opp-hz = /bits/ 64 <300000000>;
 			opp-microvolt = <1100000 1078000 1122000>;
 			opp-supported-hw = <0x06 0x0020>;
 			opp-suspend;
 		};
 
-		opp100-500000000 {
+		opp-100-500000000{
+			/* OPP100-3 */
 			opp-hz = /bits/ 64 <500000000>;
 			opp-microvolt = <1100000 1078000 1122000>;
 			opp-supported-hw = <0x01 0xFFFF>;
 		};
 
-		opp100-600000000 {
+		opp-100-600000000 {
+			/* OPP100-4 */
 			opp-hz = /bits/ 64 <600000000>;
 			opp-microvolt = <1100000 1078000 1122000>;
 			opp-supported-hw = <0x06 0x0040>;
 		};
 
-		opp120-600000000 {
+		opp-120-600000000 {
+			/* OPP120-1 */
 			opp-hz = /bits/ 64 <600000000>;
 			opp-microvolt = <1200000 1176000 1224000>;
 			opp-supported-hw = <0x01 0xFFFF>;
 		};
 
-		opp120-720000000 {
+		opp-120-720000000 {
+			/* OPP120-2 */
 			opp-hz = /bits/ 64 <720000000>;
 			opp-microvolt = <1200000 1176000 1224000>;
 			opp-supported-hw = <0x06 0x0080>;
 		};
 
-		oppturbo-720000000 {
+		opp-720000000 {
+			/* OPP Turbo-1 */
 			opp-hz = /bits/ 64 <720000000>;
 			opp-microvolt = <1260000 1234800 1285200>;
 			opp-supported-hw = <0x01 0xFFFF>;
 		};
 
-		oppturbo-800000000 {
+		opp-800000000 {
+			/* OPP Turbo-2 */
 			opp-hz = /bits/ 64 <800000000>;
 			opp-microvolt = <1260000 1234800 1285200>;
 			opp-supported-hw = <0x06 0x0100>;
 		};
 
-		oppnitro-1000000000 {
+		opp-1000000000 {
+			/* OPP Nitro */
 			opp-hz = /bits/ 64 <1000000000>;
 			opp-microvolt = <1325000 1298500 1351500>;
 			opp-supported-hw = <0x04 0x0200>;
arch/arm/boot/dts/ti/omap/am3517.dtsi +4 -2
index 823f63502e9f..fbfc956f4e4d 100644
@@ -34,14 +34,16 @@ cpu0_opp_table: opp-table {
 		 * appear to operate at 300MHz as well. Since AM3517 only
 		 * lists one operating voltage, it will remain fixed at 1.2V
 		 */
-		opp50-300000000 {
+		opp-50-300000000 {
+			/* OPP50 */
 			opp-hz = /bits/ 64 <300000000>;
 			opp-microvolt = <1200000>;
 			opp-supported-hw = <0xffffffff 0xffffffff>;
 			opp-suspend;
 		};
 
-		opp100-600000000 {
+		opp-100-600000000 {
+			/* OPP100 */
 			opp-hz = /bits/ 64 <600000000>;
 			opp-microvolt = <1200000>;
 			opp-supported-hw = <0xffffffff 0xffffffff>;
arch/arm/boot/dts/ti/omap/am4372.dtsi +10 -5
index 8613355bbd5e..9d2c064534f7 100644
@@ -70,32 +70,37 @@ cpu0_opp_table: opp-table {
 		compatible = "operating-points-v2-ti-cpu";
 		syscon = <&scm_conf>;
 
-		opp50-300000000 {
+		opp-50-300000000 {
+			/* OPP50 */
 			opp-hz = /bits/ 64 <300000000>;
 			opp-microvolt = <950000 931000 969000>;
 			opp-supported-hw = <0xFF 0x01>;
 			opp-suspend;
 		};
 
-		opp100-600000000 {
+		opp-100-600000000 {
+			/* OPP100 */
 			opp-hz = /bits/ 64 <600000000>;
 			opp-microvolt = <1100000 1078000 1122000>;
 			opp-supported-hw = <0xFF 0x04>;
 		};
 
-		opp120-720000000 {
+		opp-120-720000000 {
+			/* OPP120 */
 			opp-hz = /bits/ 64 <720000000>;
 			opp-microvolt = <1200000 1176000 1224000>;
 			opp-supported-hw = <0xFF 0x08>;
 		};
 
-		oppturbo-800000000 {
+		opp-800000000{
+			/* OPP Turbo */
 			opp-hz = /bits/ 64 <800000000>;
 			opp-microvolt = <1260000 1234800 1285200>;
 			opp-supported-hw = <0xFF 0x10>;
 		};
 
-		oppnitro-1000000000 {
+		opp-1000000000 {
+			/* OPP Nitro */
 			opp-hz = /bits/ 64 <1000000000>;
 			opp-microvolt = <1325000 1298500 1351500>;
 			opp-supported-hw = <0xFF 0x20>;
arch/arm/boot/dts/ti/omap/am437x-idk-evm.dts +4 -2
index 863552393c07..5b2ac88a7e6a 100644
@@ -527,11 +527,13 @@ &cpu0_opp_table {
 	 * Supply voltage supervisor on board will not allow opp50 so
 	 * disable it and set opp100 as suspend OPP.
 	 */
-	opp50-300000000 {
+	opp-50-300000000 {
+		/* opp50-300000000 */
 		status = "disabled";
 	};
 
-	opp100-600000000 {
+	opp-100-600000000 {
+		/* opp100-600000000 */
 		opp-suspend;
 	};
 };
arch/arm/boot/dts/ti/omap/dra7.dtsi +6 -3
index 97ce0c4f1df7..3f3e52e3b375 100644
@@ -101,7 +101,8 @@ cpu0_opp_table: opp-table {
 		compatible = "operating-points-v2-ti-cpu";
 		syscon = <&scm_wkup>;
 
-		opp_nom-1000000000 {
+		opp-1000000000 {
+			/* OPP NOM */
 			opp-hz = /bits/ 64 <1000000000>;
 			opp-microvolt = <1060000 850000 1150000>,
 					<1060000 850000 1150000>;
@@ -109,7 +110,8 @@ opp_nom-1000000000 {
 			opp-suspend;
 		};
 
-		opp_od-1176000000 {
+		opp-1176000000 {
+			/* OPP OD */
 			opp-hz = /bits/ 64 <1176000000>;
 			opp-microvolt = <1160000 885000 1160000>,
 					<1160000 885000 1160000>;
@@ -117,7 +119,8 @@ opp_od-1176000000 {
 			opp-supported-hw = <0xFF 0x02>;
 		};
 
-		opp_high@1500000000 {
+		opp-1500000000 {
+			/* OPP High */
 			opp-hz = /bits/ 64 <1500000000>;
 			opp-microvolt = <1210000 950000 1250000>,
 					<1210000 950000 1250000>;
arch/arm/boot/dts/ti/omap/dra76x.dtsi +2 -1
index 931db7932c11..1045eb24aa0d 100644
@@ -130,7 +130,8 @@ &mmc3 {
 };
 
 &cpu0_opp_table {
-	opp_plus@1800000000 {
+	opp-1800000000 {
+		/* OPP Plus */
 		opp-hz = /bits/ 64 <1800000000>;
 		opp-microvolt = <1250000 950000 1250000>,
 				<1250000 950000 1250000>;
arch/arm/boot/dts/ti/omap/omap34xx.dtsi +6 -6
index 9dbf62797f0f..fc7233ac183a 100644
@@ -25,7 +25,7 @@ cpu0_opp_table: opp-table {
 		compatible = "operating-points-v2-ti-cpu";
 		syscon = <&scm_conf>;
 
-		opp1-125000000 {
+		opp-125000000 {
 			opp-hz = /bits/ 64 <125000000>;
 			/*
 			 * we currently only select the max voltage from table
@@ -40,32 +40,32 @@ opp1-125000000 {
 			opp-supported-hw = <0xffffffff 3>;
 		};
 
-		opp2-250000000 {
+		opp-250000000 {
 			opp-hz = /bits/ 64 <250000000>;
 			opp-microvolt = <1075000 1075000 1075000>;
 			opp-supported-hw = <0xffffffff 3>;
 			opp-suspend;
 		};
 
-		opp3-500000000 {
+		opp-500000000 {
 			opp-hz = /bits/ 64 <500000000>;
 			opp-microvolt = <1200000 1200000 1200000>;
 			opp-supported-hw = <0xffffffff 3>;
 		};
 
-		opp4-550000000 {
+		opp-550000000 {
 			opp-hz = /bits/ 64 <550000000>;
 			opp-microvolt = <1275000 1275000 1275000>;
 			opp-supported-hw = <0xffffffff 3>;
 		};
 
-		opp5-600000000 {
+		opp-600000000 {
 			opp-hz = /bits/ 64 <600000000>;
 			opp-microvolt = <1350000 1350000 1350000>;
 			opp-supported-hw = <0xffffffff 3>;
 		};
 
-		opp6-720000000 {
+		opp-720000000 {
 			opp-hz = /bits/ 64 <720000000>;
 			opp-microvolt = <1350000 1350000 1350000>;
 			/* only high-speed grade omap3530 devices */
arch/arm/boot/dts/ti/omap/omap36xx.dtsi +8 -4
index 50e640a32b5c..e6d8070c1bf8 100644
@@ -30,7 +30,8 @@ cpu0_opp_table: opp-table {
 		compatible = "operating-points-v2-ti-cpu";
 		syscon = <&scm_conf>;
 
-		opp50-300000000 {
+		opp-50-300000000 {
+			/* OPP50 */
 			opp-hz = /bits/ 64 <300000000>;
 			/*
 			 * we currently only select the max voltage from table
@@ -48,21 +49,24 @@ opp50-300000000 {
 			opp-suspend;
 		};
 
-		opp100-600000000 {
+		opp-100-600000000 {
+			/* OPP100 */
 			opp-hz = /bits/ 64 <600000000>;
 			opp-microvolt = <1200000 1200000 1200000>,
 					 <1200000 1200000 1200000>;
 			opp-supported-hw = <0xffffffff 3>;
 		};
 
-		opp130-800000000 {
+		opp-130-800000000 {
+			/* OPP130 */
 			opp-hz = /bits/ 64 <800000000>;
 			opp-microvolt = <1325000 1325000 1325000>,
 					 <1325000 1325000 1325000>;
 			opp-supported-hw = <0xffffffff 3>;
 		};
 
-		opp1g-1000000000 {
+		opp-1000000000 {
+			/* OPP1G */
 			opp-hz = /bits/ 64 <1000000000>;
 			opp-microvolt = <1375000 1375000 1375000>,
 					 <1375000 1375000 1375000>;
Signature · 1 line
2.40.0
maintainer
#7 lore raw

Re: [PATCH 4/5] dt-bindings: opp: Convert ti-omap5-opp-supply.txt to yaml binding

In reply to Nishanth Menon
Quoted 17 lines · Nishanth Menon

Rename ti-omap5-opp-supply to be bit more generic omap-opp-supply and convert the binding to yaml.

---
 .../bindings/opp/ti,omap-opp-supply.yaml      | 108 ++++++++++++++++++
 .../bindings/opp/ti-omap5-opp-supply.txt      |  63 ----------
 2 files changed, 108 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml
 delete mode 100644 Documentation/devicetree/bindings/opp/ti-omap5-opp-supply.txt
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +0 -0
new file mode 100644
index 000000000000..ff1b3d8fea31

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +7 -0
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/ti,omap-opp-supply.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OMAP compatible OPP supply description

Drop "description"

Quoted 27 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +27 -0
+
+description: |
+  OMAP5, DRA7, and AM57 family of SoCs have Class0 AVS eFuse registers which
+  contain data that can be used to adjust voltages programmed for some of their
+  supplies for more efficient operation. This binding provides the information
+  needed to read these values and use them to program the main regulator during
+  an OPP transitions.
+
+  Also, some supplies may have an associated vbb-supply which is an Adaptive Body
+  Bias regulator which much be transitioned in a specific sequence with regards
+  to the vdd-supply and clk when making an OPP transition. By supplying two
+  regulators to the device that will undergo OPP transitions we can make use
+  of the multi regulator binding that is part of the OPP core described
+  to describe both regulators needed by the platform.
+
+maintainers:
+  - Nishanth Menon <[email protected]>
+
+properties:
+  $nodename:
+    pattern: '^opp-supply(@[0-9a-f]+)?$'
+
+  compatible:
+    oneOf:
+      - description: Basic OPP supply controlling VDD and VBB
+        items:
+          - const: ti,omap-opp-supply

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 44

Quoted 10 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +10 -0
+      - description: OMAP5+ optimized voltages in efuse(Class 0) VDD along with
+          VBB.
+        items:
+          - const: ti,omap5-opp-supply
+      - description: OMAP5+ optimized voltages in efuse(class0) VDD but no VBB
+        items:
+          - const: ti,omap5-core-opp-supply
+
+  reg:
+    description: Address and length of the efuse register set for the device

Drop

Quoted 6 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +6 -0
+    maxItems: 1
+
+  ti,absolute-max-voltage-uv:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Absolute maximum voltage for the OPP supply
+

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 60

Quoted 10 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +10 -0
+  ti,efuse-settings:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description: An array of u32 tuple items providing information about
+      optimized efuse configuration. Each item consists of the following
+      voltage_in_uV - reference voltage (OPP Voltage)
+      efuse_offset - efuse offset fromr eg where the optimized voltage is
+        stored.
+    items:
+      minItems: 2
+      maxItems: 2

Constraints on the values?

Quoted 13 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +13 -0
+    minItems: 1
+
+required:
+  - compatible
+  - ti,absolute-max-voltage-uv
+
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: ti,omap-opp-supply

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 83

Quoted 10 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +10 -0
+    then:
+      required:
+        - reg
+        - ti,efuse-settings
+
+additionalProperties: false
+
+examples:
+  - |
+    opp_supply_mpu_iva_hd: opp-supply {

Drop unused labels.

Quoted 15 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +15 -0
+        compatible = "ti,omap-opp-supply";
+        ti,absolute-max-voltage-uv = <1375000>;
+    };
+  - |
+    opp_supply_mpu: opp-supply@4a003b20 {
+        compatible = "ti,omap5-opp-supply";
+        reg = <0x4a003b20 0x8>;
+        ti,efuse-settings =
+            /* uV   offset */
+            <1060000 0x0>,
+            <1160000 0x4>,
+            <1210000 0x8>;
+        ti,absolute-max-voltage-uv = <1500000>;
+    };
+  - |

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 108

Quoted 10 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +10 -0
+    opp_supply_mpu2: opp-supply@4a003b00 {
+        compatible = "ti,omap5-core-opp-supply";
+        reg = <0x4a003b00 0x8>;
+        ti,efuse-settings =
+            /* uV   offset */
+            <1060000 0x0>,
+            <1160000 0x4>,
+            <1210000 0x8>;
+        ti,absolute-max-voltage-uv = <1500000>;
+    };

The 3rd example doesn't add anything. It's just different values.

Rob

maintainer
#10 lore raw

Re: [PATCH 5/5] dt-bindings: cpufreq: Convert ti-cpufreq.txt to yaml binding

In reply to Nishanth Menon

Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml

Quoted 16 lines · Nishanth Menon

Move the ti-cpufreq binding over to opp and convert to yaml

---
 .../bindings/cpufreq/ti-cpufreq.txt           | 132 ------------------
 .../bindings/opp/opp-v2-ti-cpu.yaml           |  88 ++++++++++++
 2 files changed, 88 insertions(+), 132 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/cpufreq/ti-cpufreq.txt
 create mode 100644 Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +0 -0
new file mode 100644
index 000000000000..758f6da619a8

Filename matching the compatible.

Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml line 9

Quoted 10 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +9 -0
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/opp-v2-ti-cpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI CPU OPP
+
+description: |

Don't need '|'.

Quoted 41 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +41 -0
+  Certain TI SoCs, like those in the am335x, am437x, am57xx, am62x and dra7xx
+  families support different OPPs depending on the silicon variant in use.
+  The ti-cpufreq driver can use revision and an efuse value from the SoC to
+  provide the OPP framework with supported hardware information. This is
+  used to determine which OPPs from the operating-points-v2 table get enabled
+  when it is parsed by the OPP framework.
+
+maintainers:
+  - Nishanth Menon <[email protected]>
+
+allOf:
+  - $ref: opp-v2-base.yaml#
+
+properties:
+  compatible:
+    const: operating-points-v2-ti-cpu
+
+  syscon:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: |
+      points to syscon node representing the control module
+      register space of the SoC.
+
+  opp-shared: true
+
+patternProperties:
+  '^opp(-?[0-9]+)*$':
+    type: object
+    additionalProperties: false
+
+    properties:
+      clock-latency-ns: true
+      opp-hz: true
+      opp-microvolt: true
+      opp-supported-hw: true
+      opp-suspend: true
+      turbo-mode: true
+
+    required:
+      - opp-hz
+      - opp-supported-hw

Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml line 60

Quoted 10 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +10 -0
+
+required:
+  - compatible
+  - syscon
+
+additionalProperties: false
+
+examples:
+  - |
+    cpu0_opp_table: opp-table {

Drop unused labels

Quoted 31 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +28 -0
+        compatible = "operating-points-v2-ti-cpu";
+        syscon = <&scm_conf>;
+
+        opp-300000000 {
+            opp-hz = /bits/ 64 <300000000>;
+            opp-microvolt = <1100000 1078000 1122000>;
+            opp-supported-hw = <0x06 0x0020>;
+            opp-suspend;
+        };
+
+        opp-500000000 {
+            opp-hz = /bits/ 64 <500000000>;
+            opp-microvolt = <1100000 1078000 1122000>;
+            opp-supported-hw = <0x01 0xFFFF>;
+        };
+
+        opp-600000000 {
+            opp-hz = /bits/ 64 <600000000>;
+            opp-microvolt = <1100000 1078000 1122000>;
+            opp-supported-hw = <0x06 0x0040>;
+        };
+
+        opp-1000000000 {
+            opp-hz = /bits/ 64 <1000000000>;
+            opp-microvolt = <1325000 1298500 1351500>;
+            opp-supported-hw = <0x04 0x0200>;
+        };
+    };
Signature · 1 line
2.40.0
author maintainer
#8 lore raw

Re: [PATCH 4/5] dt-bindings: opp: Convert ti-omap5-opp-supply.txt to yaml binding

In reply to Rob Herring
Quoted 12 lines · Rob Herring
Quoted 11 lines · Nishanth Menon

Rename ti-omap5-opp-supply to be bit more generic omap-opp-supply and convert the binding to yaml.

---
 .../bindings/opp/ti,omap-opp-supply.yaml      | 108 ++++++++++++++++++
 .../bindings/opp/ti-omap5-opp-supply.txt      |  63 ----------
 2 files changed, 108 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml
 delete mode 100644 Documentation/devicetree/bindings/opp/ti-omap5-opp-supply.txt
Quoted 15 lines

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 7

Quoted 13 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +7 -0
new file mode 100644
index 000000000000..ff1b3d8fea31
@@ -0,0 +1,108 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/ti,omap-opp-supply.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments OMAP compatible OPP supply description

Drop "description"

OK.

Quoted 32 lines
Quoted 32 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +31 -0
+
+description: |
+  OMAP5, DRA7, and AM57 family of SoCs have Class0 AVS eFuse registers which
+  contain data that can be used to adjust voltages programmed for some of their
+  supplies for more efficient operation. This binding provides the information
+  needed to read these values and use them to program the main regulator during
+  an OPP transitions.
+
+  Also, some supplies may have an associated vbb-supply which is an Adaptive Body
+  Bias regulator which much be transitioned in a specific sequence with regards
+  to the vdd-supply and clk when making an OPP transition. By supplying two
+  regulators to the device that will undergo OPP transitions we can make use
+  of the multi regulator binding that is part of the OPP core described
+  to describe both regulators needed by the platform.
+
+maintainers:
+  - Nishanth Menon <[email protected]>
+
+properties:
+  $nodename:
+    pattern: '^opp-supply(@[0-9a-f]+)?$'
+
+  compatible:
+    oneOf:
+      - description: Basic OPP supply controlling VDD and VBB
+        items:
+          - const: ti,omap-opp-supply
+      - description: OMAP5+ optimized voltages in efuse(Class 0) VDD along with
+          VBB.
+        items:
+          - const: ti,omap5-opp-supply
Quoted 8 lines

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 44

Quoted 6 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +6 -0
+      - description: OMAP5+ optimized voltages in efuse(class0) VDD but no VBB
+        items:
+          - const: ti,omap5-core-opp-supply
+
+  reg:
+    description: Address and length of the efuse register set for the device

Drop

Ack.

Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +10 -0
+    maxItems: 1
+
+  ti,absolute-max-voltage-uv:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Absolute maximum voltage for the OPP supply
+
+  ti,efuse-settings:
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    description: An array of u32 tuple items providing information about
+      optimized efuse configuration. Each item consists of the following
Quoted 8 lines

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 60

Quoted 6 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +6 -0
+      voltage_in_uV - reference voltage (OPP Voltage)
+      efuse_offset - efuse offset fromr eg where the optimized voltage is
+        stored.
+    items:
+      minItems: 2
+      maxItems: 2

Constraints on the values?

As I recollect (been a while), it was variant per device. Did you have something in mind or a reference for me to look at?

Quoted 18 lines
Quoted 18 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +17 -0
+    minItems: 1
+
+required:
+  - compatible
+  - ti,absolute-max-voltage-uv
+
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: ti,omap-opp-supply
+    then:
+      required:
+        - reg
+        - ti,efuse-settings
Quoted 8 lines

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 83

Quoted 6 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +6 -0
+
+additionalProperties: false
+
+examples:
+  - |
+    opp_supply_mpu_iva_hd: opp-supply {

Drop unused labels.

Will do.

Quoted 27 lines
Quoted 16 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +15 -0
+        compatible = "ti,omap-opp-supply";
+        ti,absolute-max-voltage-uv = <1375000>;
+    };
+  - |
+    opp_supply_mpu: opp-supply@4a003b20 {
+        compatible = "ti,omap5-opp-supply";
+        reg = <0x4a003b20 0x8>;
+        ti,efuse-settings =
+            /* uV   offset */
+            <1060000 0x0>,
+            <1160000 0x4>,
+            <1210000 0x8>;
+        ti,absolute-max-voltage-uv = <1500000>;
+    };
+  - |

Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml line 108

Quoted 10 lines
Documentation/devicetree/bindings/opp/ti,omap-opp-supply.yaml new file +10 -0
+    opp_supply_mpu2: opp-supply@4a003b00 {
+        compatible = "ti,omap5-core-opp-supply";
+        reg = <0x4a003b00 0x8>;
+        ti,efuse-settings =
+            /* uV   offset */
+            <1060000 0x0>,
+            <1160000 0x4>,
+            <1210000 0x8>;
+        ti,absolute-max-voltage-uv = <1500000>;
+    };
Quoted 1 line

The 3rd example doesn't add anything. It's just different values.

True, Thanks for catching.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author maintainer
#11 lore raw

Re: [PATCH 5/5] dt-bindings: cpufreq: Convert ti-cpufreq.txt to yaml binding

In reply to Rob Herring
Quoted 7 lines · Rob Herring

Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml

Quoted 5 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +0 -0
new file mode 100644
index 000000000000..758f6da619a8

Filename matching the compatible.

operating-points-v2-ti-cpu.yaml, OK

Quoted 13 lines

Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml line 9

Quoted 11 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +9 -0
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/opp/opp-v2-ti-cpu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI CPU OPP
+
+description: |

Don't need '|'.

OK

Quoted 1 line

[..]

Quoted 6 lines

Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml line 60

Quoted 4 lines
Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml new file +4 -0
+
+examples:
+  - |
+    cpu0_opp_table: opp-table {

Drop unused labels

Uggh.. yep, thanks.

[...]

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] arm: dts: ti: omap: omap36xx: Rename opp_supply nodename

In reply to Nishanth Menon
Quoted 15 lines · Nishanth Menon

Use opp-supply as the proper node name.

---

Should probably go via Tony's tree.

 arch/arm/boot/dts/ti/omap/omap36xx.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/ti/omap/omap36xx.dtsi +0 -0
index fff9c3d34193..50e640a32b5c 100644

arch/arm/boot/dts/ti/omap/omap36xx.dtsi opp1g-1000000000 { · line 74

Quoted 5 lines
arch/arm/boot/dts/ti/omap/omap36xx.dtsi +1 -1
@@ -71,7 +71,7 @@ opp1g-1000000000 {
 		};
 	};
 
-	opp_supply_mpu_iva: opp_supply {
+	opp_supply_mpu_iva: opp-supply {
Quoted 6 lines
arch/arm/boot/dts/ti/omap/omap36xx.dtsi +0 -0
 		compatible = "ti,omap-opp-supply";
 		ti,absolute-max-voltage-uv = <1375000>;
 	};
Signature · 1 line
2.40.0
Signature · 2 lines
Best regards,
Dhruva Gole <[email protected]>