Texas Instruments divider clock

Schema identifier ($id): "http://devicetree.org/schemas/clock/ti/ti,divider-clock.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Tero Kristo <kristo@kernel.org>"

This clock It assumes a register-mapped adjustable clock rate divider that does not gate and has only one input clock or parent. By default the value programmed into the register is one less than the actual divisor value. E.g:

register value actual divisor value 0 1 1 2 2 3

This assumption may be modified by the following optional properties:

ti,index-starts-at-one - valid divisor values start at 1, not the default of 0. E.g: register value actual divisor value 1 1 2 2 3 3

ti,index-power-of-two - valid divisor values are powers of two. E.g: register value actual divisor value 0 1 1 2 2 4

Additionally an array of valid dividers may be supplied like so:

ti,dividers = <4>, <8>, <0>, <16>;

Which will map the resulting values to a divisor table by their index: register value actual divisor value 0 4 1 8 2 <invalid divisor, skipped> 3 16

Any zero value in this array means the corresponding bit-value is invalid and must not be used.

The binding must also provide the register to control the divider and unless the divider array is provided, min and max dividers. Optionally the number of bits to shift that mask, if necessary. If the shift value is missing it is the same as supplying a zero shift.

This binding can also optionally provide support to the hardware autoidle feature.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): ti,autoidle.yaml#

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "ti,divider-clock", "ti,composite-divider-clock"

#clock-cells — required here #

Exact value (const): 0

clocks — required here #

Maximum number of items (maxItems): 1

clock-output-names — not listed as required here #

Maximum number of items (maxItems): 1

reg — required here #

Maximum number of items (maxItems): 1

ti,dividers — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

array of integers defining divisors

ti,bit-shift — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

number of bits to shift the divider value

Maximum value (maximum): 31

Default value (default): 0

ti,min-div — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

min divisor for dividing the input clock rate, only needed if the first divisor is offset from the default value (1)

Minimum value (minimum): 1

Default value (default): 1

ti,max-div — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

max divisor for dividing the input clock rate, only needed if ti,dividers is not defined.

ti,index-starts-at-one — not listed as required here #

Value type (type): "boolean"

valid divisor programming starts at 1, not zero, only valid if ti,dividers is not defined

ti,index-power-of-two — not listed as required here #

Value type (type): "boolean"

valid divisor programming must be a power of two, only valid if ti,dividers is not defined.

ti,set-rate-parent — not listed as required here #

Value type (type): "boolean"

clk_set_rate is propagated to parent |

ti,latch-bit — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

latch the divider value to HW, only needed if the register compatible access requires this. As an example dra76x DPLL_GMAC H14 divider implements such behavior.

Rules triggered by another property (dependentSchemas) #

ti,dividers — applies when this property is present #

Properties and child nodes (properties) #

ti,min-div — not listed as required here

false — Not permitted by this property rule.

ti,max-div — not listed as required here

false — Not permitted by this property rule.

ti,index-power-of-two — not listed as required here

false — Not permitted by this property rule.

ti,index-starts-at-one — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "compatible", "#clock-cells", "clocks", "reg"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

bus {
  #address-cells = <1>;
  #size-cells = <0>;

  clock-controller@190 {
    #clock-cells = <0>;
    compatible = "ti,divider-clock";
    clocks = <&dpll_usb_ck>;
    ti,max-div = <127>;
    reg = <0x190>;
    ti,index-starts-at-one;
  };

  clock-controller@528 {
    #clock-cells = <0>;
    compatible = "ti,divider-clock";
    clocks = <&abe_clk>;
    ti,bit-shift = <24>;
    reg = <0x528>;
    ti,max-div = <2>;
  };

  clock-controller@a40 {
    #clock-cells = <0>;
    compatible = "ti,composite-divider-clock";
    clocks = <&corex2_fck>;
    ti,bit-shift = <8>;
    reg = <0x0a40>;
    ti,dividers = <0>, <1>, <2>, <3>, <4>, <0>, <6>, <0>, <8>;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Edit this page