Allwinner A31 PRCM

Schema identifier ($id): "http://devicetree.org/schemas/mfd/allwinner,sun6i-a31-prcm.yaml#"

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

Maintainers (maintainers): "Chen-Yu Tsai <wens@csie.org>", "Maxime Ripard <mripard@kernel.org>"

Deprecated (deprecated): true

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "allwinner,sun6i-a31-prcm"

reg — required here #

Maximum number of items (maxItems): 1

Properties matching a name pattern (patternProperties) #

^.*-(clk|rst)$ — name matches this regular expression #

Value type (type): "object"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

compatible — required here

Allowed values (enum): "allwinner,sun4i-a10-mod0-clk", "allwinner,sun6i-a31-apb0-clk", "allwinner,sun6i-a31-apb0-gates-clk", "allwinner,sun6i-a31-ar100-clk", "allwinner,sun6i-a31-clock-reset", "fixed-factor-clock"

Required in this object (required): "compatible"

All of these rules must match (allOf) #

Rule 1

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "fixed-factor-clock"

When the condition matches (then)

Shared schema rule ($ref): /schemas/clock/fixed-factor-clock.yaml#

Rule 2

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "allwinner,sun4i-a10-mod0-clk"

When the condition matches (then)

Properties and child nodes (properties)

#clock-cells — required here

Exact value (const): 0

clocks — required here

Maximum number of items (maxItems): 2

clock-output-names — required here

Maximum number of items (maxItems): 1

Required in this object (required): "#clock-cells", "clocks", "clock-output-names"

Rule 3

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "allwinner,sun6i-a31-apb0-clk"

When the condition matches (then)

Properties and child nodes (properties)

#clock-cells — required here

Exact value (const): 0

clocks — required here

Maximum number of items (maxItems): 1

clock-output-names — required here

Maximum number of items (maxItems): 1

Required in this object (required): "#clock-cells", "clocks", "clock-output-names"

Rule 4

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "allwinner,sun6i-a31-apb0-gates-clk"

When the condition matches (then)

Properties and child nodes (properties)

#clock-cells — required here

Exact value (const): 1

This additional argument passed to that clock is the offset of the bit controlling this particular gate in the register.

clocks — required here

Maximum number of items (maxItems): 1

clock-output-names — required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 32

Required in this object (required): "#clock-cells", "clocks", "clock-output-names"

Rule 5

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "allwinner,sun6i-a31-ar100-clk"

When the condition matches (then)

Properties and child nodes (properties)

#clock-cells — required here

Exact value (const): 0

clocks — required here

Maximum number of items (maxItems): 4

The parent order must match the hardware programming order.

clock-output-names — required here

Maximum number of items (maxItems): 1

Required in this object (required): "#clock-cells", "clocks", "clock-output-names"

Rule 6

Condition (if)

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "allwinner,sun6i-a31-clock-reset"

When the condition matches (then)

Properties and child nodes (properties)

#reset-cells — required here

Exact value (const): 1

Required in this object (required): "#reset-cells"

Required in this object (required): "compatible", "reg"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/clock/sun6i-a31-ccu.h>

prcm@1f01400 {
    compatible = "allwinner,sun6i-a31-prcm";
    reg = <0x01f01400 0x200>;

    ar100: ar100-clk {
        compatible = "allwinner,sun6i-a31-ar100-clk";
        #clock-cells = <0>;
        clocks = <&rtc 0>, <&osc24M>,
                 <&ccu CLK_PLL_PERIPH>,
                 <&ccu CLK_PLL_PERIPH>;
        clock-output-names = "ar100";
    };

    ahb0: ahb0-clk {
        compatible = "fixed-factor-clock";
        #clock-cells = <0>;
        clock-div = <1>;
        clock-mult = <1>;
        clocks = <&ar100>;
        clock-output-names = "ahb0";
    };

    apb0: apb0-clk {
        compatible = "allwinner,sun6i-a31-apb0-clk";
        #clock-cells = <0>;
        clocks = <&ahb0>;
        clock-output-names = "apb0";
    };

    apb0_gates: apb0-gates-clk {
        compatible = "allwinner,sun6i-a31-apb0-gates-clk";
        #clock-cells = <1>;
        clocks = <&apb0>;
        clock-output-names = "apb0_pio", "apb0_ir",
                             "apb0_timer", "apb0_p2wi",
                             "apb0_uart", "apb0_1wire",
                             "apb0_i2c";
    };

    ir_clk: ir-clk {
        #clock-cells = <0>;
        compatible = "allwinner,sun4i-a10-mod0-clk";
        clocks = <&rtc 0>, <&osc24M>;
        clock-output-names = "ir";
    };

    apb0_rst: apb0-rst {
        compatible = "allwinner,sun6i-a31-clock-reset";
        #reset-cells = <1>;
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page