Renesas RZ/G2L Multi-Function Timer Pulse Unit 3 (MTU3a)
Schema identifier ($id): "http://devicetree.org/schemas/timer/renesas,rz-mtu3.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Biju Das <biju.das.jz@bp.renesas.com>"
This hardware block consists of eight 16-bit timer channels and one
32-bit timer channel. It supports the following specifications:
- Pulse input/output: 28 lines max
- Pulse input 3 lines
- Count clock 11 clocks for each channel (14 clocks for MTU0, 12 clocks
for MTU2, and 10 clocks for MTU5, four clocks for MTU1-MTU2 combination
(when LWA = 1))
- Operating frequency Up to 100 MHz
- Available operations [MTU0 to MTU4, MTU6, MTU7, and MTU8]
- Waveform output on compare match
- Input capture function (noise filter setting available)
- Counter-clearing operation
- Simultaneous writing to multiple timer counters (TCNT)
(excluding MTU8)
- Simultaneous clearing on compare match or input capture
(excluding MTU8)
- Simultaneous input and output to registers in synchronization with
counter operations (excluding MTU8)
- Up to 12-phase PWM output in combination with synchronous operation
(excluding MTU8)
- [MTU0 MTU3, MTU4, MTU6, MTU7, and MTU8]
- Buffer operation specifiable
- [MTU1, MTU2]
- Phase counting mode can be specified independently
- 32-bit phase counting mode can be specified for interlocked operation
of MTU1 and MTU2 (when TMDR3.LWA = 1)
- Cascade connection operation available
- [MTU3, MTU4, MTU6, and MTU7]
- Through interlocked operation of MTU3/4 and MTU6/7, the positive and
negative signals in six phases (12 phases in total) can be output in
complementary PWM and reset-synchronized PWM operation
- In complementary PWM mode, values can be transferred from buffer
registers to temporary registers at crests and troughs of the timer-
counter values or when the buffer registers (TGRD registers in MTU4
and MTU7) are written to
- Double-buffering selectable in complementary PWM mode
- [MTU3 and MTU4]
- Through interlocking with MTU0, a mode for driving AC synchronous
motors (brushless DC motors) by using complementary PWM output and
reset-synchronized PWM output is settable and allows the selection
of two types of waveform output (chopping or level)
- [MTU5]
- Capable of operation as a dead-time compensation counter
- [MTU0/MTU5, MTU1, MTU2, and MTU8]
- 32-bit phase counting mode specifiable by combining MTU1 and MTU2 and
through interlocked operation with MTU0/MTU5 and MTU8
- Interrupt-skipping function
- In complementary PWM mode, interrupts on crests and troughs of counter
values and triggers to start conversion by the A/D converter can be
skipped
- Interrupt sources: 43 sources.
- Buffer operation:
- Automatic transfer of register data (transfer from the buffer
register to the timer register).
- Trigger generation
- A/D converter start triggers can be generated
- A/D converter start request delaying function enables A/D converter
to be started with any desired timing and to be synchronized with
PWM output
- Low power consumption function
- The MTU3a can be placed in the module-stop state
There are two phase counting modes. 16-bit phase counting mode in which
MTU1 and MTU2 operate independently, and cascade connection 32-bit phase
counting mode in which MTU1 and MTU2 are cascaded.
In phase counting mode, the phase difference between two external input
clocks is detected and the corresponding TCNT is incremented or
decremented.
The below counters are supported
count0 - MTU1 16-bit phase counting
count1 - MTU2 16-bit phase counting
count2 - MTU1+ MTU2 32-bit phase counting
The module supports PWM mode{1,2}, Reset-synchronized PWM mode and
complementary PWM mode{1,2,3}.
In complementary PWM mode, six positive-phase and six negative-phase PWM
waveforms (12 phases in total) with dead time can be output by
combining MTU{3,4} and MTU{6,7}.
The below pwm channels are supported in pwm mode 1.
pwm0 - MTU0.MTIOC0A PWM mode 1
pwm1 - MTU0.MTIOC0C PWM mode 1
pwm2 - MTU1.MTIOC1A PWM mode 1
pwm3 - MTU2.MTIOC2A PWM mode 1
pwm4 - MTU3.MTIOC3A PWM mode 1
pwm5 - MTU3.MTIOC3C PWM mode 1
pwm6 - MTU4.MTIOC4A PWM mode 1
pwm7 - MTU4.MTIOC4C PWM mode 1
pwm8 - MTU6.MTIOC6A PWM mode 1
pwm9 - MTU6.MTIOC6C PWM mode 1
pwm10 - MTU7.MTIOC7A PWM mode 1
pwm11 - MTU7.MTIOC7C PWM mode 1
Properties and child nodes (properties) #
compatible — required here #
Array item rules (items) #
Item 1
Allowed values (
enum):"renesas,r9a07g043-mtu3","renesas,r9a07g044-mtu3","renesas,r9a07g054-mtu3"
Item 2
Exact value (
const):"renesas,rz-mtu3"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Array item rules (items) #
Item 1
MTU0.TGRA input capture/compare match
Item 2
MTU0.TGRB input capture/compare match
Item 3
MTU0.TGRC input capture/compare match
Item 4
MTU0.TGRD input capture/compare match
Item 5
MTU0.TCNT overflow
Item 6
MTU0.TGRE compare match
Item 7
MTU0.TGRF compare match
Item 8
MTU1.TGRA input capture/compare match
Item 9
MTU1.TGRB input capture/compare match
Item 10
MTU1.TCNT overflow
Item 11
MTU1.TCNT underflow
Item 12
MTU2.TGRA input capture/compare match
Item 13
MTU2.TGRB input capture/compare match
Item 14
MTU2.TCNT overflow
Item 15
MTU2.TCNT underflow
Item 16
MTU3.TGRA input capture/compare match
Item 17
MTU3.TGRB input capture/compare match
Item 18
MTU3.TGRC input capture/compare match
Item 19
MTU3.TGRD input capture/compare match
Item 20
MTU3.TCNT overflow
Item 21
MTU4.TGRA input capture/compare match
Item 22
MTU4.TGRB input capture/compare match
Item 23
MTU4.TGRC input capture/compare match
Item 24
MTU4.TGRD input capture/compare match
Item 25
MTU4.TCNT overflow/underflow
Item 26
MTU5.TGRU input capture/compare match
Item 27
MTU5.TGRV input capture/compare match
Item 28
MTU5.TGRW input capture/compare match
Item 29
MTU6.TGRA input capture/compare match
Item 30
MTU6.TGRB input capture/compare match
Item 31
MTU6.TGRC input capture/compare match
Item 32
MTU6.TGRD input capture/compare match
Item 33
MTU6.TCNT overflow
Item 34
MTU7.TGRA input capture/compare match
Item 35
MTU7.TGRB input capture/compare match
Item 36
MTU7.TGRC input capture/compare match
Item 37
MTU7.TGRD input capture/compare match
Item 38
MTU7.TCNT overflow/underflow
Item 39
MTU8.TGRA input capture/compare match
Item 40
MTU8.TGRB input capture/compare match
Item 41
MTU8.TGRC input capture/compare match
Item 42
MTU8.TGRD input capture/compare match
Item 43
MTU8.TCNT overflow
Item 44
MTU8.TCNT underflow
interrupt-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"tgia0"
Item 2
Exact value (
const):"tgib0"
Item 3
Exact value (
const):"tgic0"
Item 4
Exact value (
const):"tgid0"
Item 5
Exact value (
const):"tciv0"
Item 6
Exact value (
const):"tgie0"
Item 7
Exact value (
const):"tgif0"
Item 8
Exact value (
const):"tgia1"
Item 9
Exact value (
const):"tgib1"
Item 10
Exact value (
const):"tciv1"
Item 11
Exact value (
const):"tciu1"
Item 12
Exact value (
const):"tgia2"
Item 13
Exact value (
const):"tgib2"
Item 14
Exact value (
const):"tciv2"
Item 15
Exact value (
const):"tciu2"
Item 16
Exact value (
const):"tgia3"
Item 17
Exact value (
const):"tgib3"
Item 18
Exact value (
const):"tgic3"
Item 19
Exact value (
const):"tgid3"
Item 20
Exact value (
const):"tciv3"
Item 21
Exact value (
const):"tgia4"
Item 22
Exact value (
const):"tgib4"
Item 23
Exact value (
const):"tgic4"
Item 24
Exact value (
const):"tgid4"
Item 25
Exact value (
const):"tciv4"
Item 26
Exact value (
const):"tgiu5"
Item 27
Exact value (
const):"tgiv5"
Item 28
Exact value (
const):"tgiw5"
Item 29
Exact value (
const):"tgia6"
Item 30
Exact value (
const):"tgib6"
Item 31
Exact value (
const):"tgic6"
Item 32
Exact value (
const):"tgid6"
Item 33
Exact value (
const):"tciv6"
Item 34
Exact value (
const):"tgia7"
Item 35
Exact value (
const):"tgib7"
Item 36
Exact value (
const):"tgic7"
Item 37
Exact value (
const):"tgid7"
Item 38
Exact value (
const):"tciv7"
Item 39
Exact value (
const):"tgia8"
Item 40
Exact value (
const):"tgib8"
Item 41
Exact value (
const):"tgic8"
Item 42
Exact value (
const):"tgid8"
Item 43
Exact value (
const):"tciv8"
Item 44
Exact value (
const):"tciu8"
clocks — required here #
Maximum number of items (maxItems): 1
power-domains — required here #
Maximum number of items (maxItems): 1
resets — required here #
Maximum number of items (maxItems): 1
#pwm-cells — not listed as required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):2Deprecated (
deprecated):true
Rule 2
Exact value (
const):3
Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "clocks", "power-domains", "resets"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/r9a07g044-cpg.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
mtu3: timer@10001200 {
compatible = "renesas,r9a07g044-mtu3", "renesas,rz-mtu3";
reg = <0x10001200 0xb00>;
interrupts = <GIC_SPI 170 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 171 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 172 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 173 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 174 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 175 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 176 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 177 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 178 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 179 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 180 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 181 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 182 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 183 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 184 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 185 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 186 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 187 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 188 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 189 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 190 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 191 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 192 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 193 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 194 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 195 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 196 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 197 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 198 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 199 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 200 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 201 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 202 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 203 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 204 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 205 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 206 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 207 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 210 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 211 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 212 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 213 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "tgia0", "tgib0", "tgic0", "tgid0", "tciv0", "tgie0",
"tgif0",
"tgia1", "tgib1", "tciv1", "tciu1",
"tgia2", "tgib2", "tciv2", "tciu2",
"tgia3", "tgib3", "tgic3", "tgid3", "tciv3",
"tgia4", "tgib4", "tgic4", "tgid4", "tciv4",
"tgiu5", "tgiv5", "tgiw5",
"tgia6", "tgib6", "tgic6", "tgid6", "tciv6",
"tgia7", "tgib7", "tgic7", "tgid7", "tciv7",
"tgia8", "tgib8", "tgic8", "tgid8", "tciv8", "tciu8";
clocks = <&cpg CPG_MOD R9A07G044_MTU_X_MCK_MTU3>;
power-domains = <&cpg>;
resets = <&cpg R9A07G044_MTU_X_PRESET_MTU3>;
#pwm-cells = <3>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
Line 112: RZ/{G2UL,Five}
Line 113: RZ/G2{L,LC}
Line 114: RZ/V2L