Ingenic SoCs Timer/Counter Unit (TCU)
Schema identifier ($id): "http://devicetree.org/schemas/timer/ingenic,tcu.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
For a description of the TCU hardware and drivers, have a look at Documentation/arch/mips/ingenic-tcu.rst.
Maintainers (maintainers): "Paul Cercueil <paul@crapouillou.net>"
Automatic schema selection (select) #
Properties and child nodes (
properties) #
compatible— required here #Rule for matching array elements (
contains)Allowed values (
enum):"ingenic,jz4740-tcu","ingenic,jz4725b-tcu","ingenic,jz4760-tcu","ingenic,jz4760b-tcu","ingenic,jz4770-tcu","ingenic,jz4780-tcu","ingenic,x1000-tcu"
Properties and child nodes (properties) #
$nodename — not listed as required here #
String pattern (pattern): "^timer@[0-9a-f]+$"
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 1
#clock-cells — required here #
Exact value (const): 1
#interrupt-cells — required here #
Exact value (const): 1
interrupt-controller — required here #
true — No constraints added by this property rule.
ranges — not listed as required here #
true — No constraints added by this property rule.
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"ingenic,jz4740-tcu","ingenic,jz4725b-tcu","ingenic,jz4760-tcu","ingenic,x1000-tcu"Item 2
Exact value (
const):"simple-mfd"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"ingenic,jz4780-tcu","ingenic,jz4770-tcu","ingenic,jz4760b-tcu"Item 2
Exact value (
const):"ingenic,jz4760-tcu"Item 3
Exact value (
const):"simple-mfd"
reg — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Array item rules (items) #
Item 1
RTC clock
Item 2
EXT clock
Item 3
PCLK clock
Item 4
TCU clock
Minimum number of items (minItems): 3
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"rtc"
Item 2
Exact value (
const):"ext"
Item 3
Exact value (
const):"pclk"
Item 4
Exact value (
const):"tcu"
Minimum number of items (minItems): 3
interrupts — required here #
Array item rules (items) #
Item 1
TCU0 interrupt
Item 2
TCU1 interrupt
Item 3
TCU2 interrupt
Minimum number of items (minItems): 1
assigned-clocks — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 8
assigned-clock-parents — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 8
assigned-clock-rates — not listed as required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 8
ingenic,pwm-channels-mask — not listed as required here #
Bitmask of TCU channels reserved for PWM use.
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 0
Maximum value (maximum): 255
Default value (default): 252
Properties matching a name pattern (patternProperties) #
^watchdog@[a-f0-9]+$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/watchdog/watchdog.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
compatible — required here
Exactly one of these rules must match (oneOf)
Rule 1
Allowed values (
enum):"ingenic,jz4740-watchdog","ingenic,jz4780-watchdog"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"ingenic,jz4770-watchdog","ingenic,jz4760b-watchdog","ingenic,jz4760-watchdog","ingenic,jz4725b-watchdog"Item 2
Exact value (
const):"ingenic,jz4740-watchdog"
reg — required here
Maximum number of items (maxItems): 1
clocks — required here
Maximum number of items (maxItems): 1
clock-names — required here
Exact value (const): "wdt"
Required in this object (required): "compatible", "reg", "clocks", "clock-names"
^pwm@[a-f0-9]+$ — name matches this regular expression #
Value type (type): "object"
Shared schema rule ($ref): /schemas/pwm/pwm.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
compatible — required here
Exactly one of these rules must match (oneOf)
Rule 1
Allowed values (
enum):"ingenic,jz4740-pwm","ingenic,jz4725b-pwm","ingenic,x1000-pwm"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"ingenic,jz4760-pwm","ingenic,jz4760b-pwm","ingenic,jz4770-pwm","ingenic,jz4780-pwm"Item 2
Exact value (
const):"ingenic,jz4740-pwm"
reg — required here
Maximum number of items (maxItems): 1
clocks — required here
Minimum number of items (minItems): 6
Maximum number of items (maxItems): 8
clock-names — required here
Array item rules (items)
Item 1
Exact value (
const):"timer0"
Item 2
Exact value (
const):"timer1"
Item 3
Exact value (
const):"timer2"
Item 4
Exact value (
const):"timer3"
Item 5
Exact value (
const):"timer4"
Item 6
Exact value (
const):"timer5"
Item 7
Exact value (
const):"timer6"
Item 8
Exact value (
const):"timer7"
Minimum number of items (minItems): 6
Required in this object (required): "compatible", "reg", "clocks", "clock-names"
^timer@[a-f0-9]+$ — name matches this regular expression #
Value type (type): "object"
Properties and child nodes (properties) #
compatible — required here
Exactly one of these rules must match (oneOf)
Rule 1
Allowed values (
enum):"ingenic,jz4725b-ost","ingenic,jz4760b-ost"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"ingenic,jz4760-ost"Item 2
Exact value (
const):"ingenic,jz4725b-ost"
Rule 3
Array item rules (
items)Item 1
Allowed values (
enum):"ingenic,jz4780-ost","ingenic,jz4770-ost"Item 2
Exact value (
const):"ingenic,jz4760b-ost"
reg — required here
Maximum number of items (maxItems): 1
clocks — required here
Maximum number of items (maxItems): 1
clock-names — required here
Exact value (const): "ost"
interrupts — required here
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg", "clocks", "clock-names", "interrupts"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "#clock-cells", "#interrupt-cells", "interrupt-controller", "compatible", "reg", "clocks", "clock-names", "interrupts"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/ingenic,jz4770-cgu.h>
#include <dt-bindings/clock/ingenic,tcu.h>
tcu: timer@10002000 {
compatible = "ingenic,jz4770-tcu", "ingenic,jz4760-tcu", "simple-mfd";
reg = <0x10002000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x10002000 0x1000>;
#clock-cells = <1>;
clocks = <&cgu JZ4770_CLK_RTC>,
<&cgu JZ4770_CLK_EXT>,
<&cgu JZ4770_CLK_PCLK>;
clock-names = "rtc", "ext", "pclk";
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <27 26 25>;
watchdog: watchdog@0 {
compatible = "ingenic,jz4770-watchdog", "ingenic,jz4740-watchdog";
reg = <0x0 0xc>;
clocks = <&tcu TCU_CLK_WDT>;
clock-names = "wdt";
};
pwm: pwm@40 {
compatible = "ingenic,jz4770-pwm", "ingenic,jz4740-pwm";
reg = <0x40 0x80>;
#pwm-cells = <3>;
clocks = <&tcu TCU_CLK_TIMER0>,
<&tcu TCU_CLK_TIMER1>,
<&tcu TCU_CLK_TIMER2>,
<&tcu TCU_CLK_TIMER3>,
<&tcu TCU_CLK_TIMER4>,
<&tcu TCU_CLK_TIMER5>,
<&tcu TCU_CLK_TIMER6>,
<&tcu TCU_CLK_TIMER7>;
clock-names = "timer0", "timer1", "timer2", "timer3",
"timer4", "timer5", "timer6", "timer7";
};
ost: timer@e0 {
compatible = "ingenic,jz4770-ost", "ingenic,jz4760b-ost";
reg = <0xe0 0x20>;
clocks = <&tcu TCU_CLK_OST>;
clock-names = "ost";
interrupts = <15>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)