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

Rob Herring robh at kernel.org
Wed Jul 26 10:14:36 PDT 2023


On Mon, Jul 24, 2023 at 10:39:11AM -0500, Nishanth Menon wrote:
> Move the ti-cpufreq binding over to opp and convert to yaml
> 
> Signed-off-by: Nishanth Menon <nm at ti.com>
> ---
>  .../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


> diff --git a/Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml b/Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml
> new file mode 100644
> index 000000000000..758f6da619a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/opp/opp-v2-ti-cpu.yaml

Filename matching the compatible.

> @@ -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 '|'.

> +  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 <nm at ti.com>
> +
> +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
> +
> +required:
> +  - compatible
> +  - syscon
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    cpu0_opp_table: opp-table {

Drop unused labels

> +        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>;
> +        };
> +    };
> -- 
> 2.40.0
> 



More information about the linux-arm-kernel mailing list