Renesas RZ/G2L General PWM Timer (GPT)

Schema identifier ($id): "http://devicetree.org/schemas/pwm/renesas,rzg2l-gpt.yaml#"

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

Maintainers (maintainers): "Biju Das <biju.das.jz@bp.renesas.com>"

RZ/G2L General PWM Timer (GPT) composed of 8 channels with 32-bit timer
(GPT32E). It supports the following functions
* 32 bits x 8 channels.
* Up-counting or down-counting (saw waves) or up/down-counting
  (triangle waves) for each counter.
* Clock sources independently selectable for each channel.
* Two I/O pins per channel.
* Two output compare/input capture registers per channel.
* For the two output compare/input capture registers of each channel,
  four registers are provided as buffer registers and are capable of
  operating as comparison registers when buffering is not in use.
* In output compare operation, buffer switching can be at crests or
  troughs, enabling the generation of laterally asymmetric PWM waveforms.
* Registers for setting up frame cycles in each channel (with capability
  for generating interrupts at overflow or underflow)
* Generation of dead times in PWM operation.
* Synchronous starting, stopping and clearing counters for arbitrary
  channels.
* Starting, stopping, clearing and up/down counters in response to input
  level comparison.
* Starting, clearing, stopping and up/down counters in response to a
  maximum of four external triggers.
* Output pin disable function by dead time error and detected
  short-circuits between output pins.
* A/D converter start triggers can be generated (GPT32E0 to GPT32E3)
* Enables the noise filter for input capture and external trigger
  operation.
The below pwm channels are supported.
  pwm0  - GPT32E0.GTIOC0A channel
  pwm1  - GPT32E0.GTIOC0B channel
  pwm2  - GPT32E1.GTIOC1A channel
  pwm3  - GPT32E1.GTIOC1B channel
  pwm4  - GPT32E2.GTIOC2A channel
  pwm5  - GPT32E2.GTIOC2B channel
  pwm6  - GPT32E3.GTIOC3A channel
  pwm7  - GPT32E3.GTIOC3B channel
  pwm8  - GPT32E4.GTIOC4A channel
  pwm9  - GPT32E4.GTIOC4B channel
  pwm10 - GPT32E5.GTIOC5A channel
  pwm11 - GPT32E5.GTIOC5B channel
  pwm12 - GPT32E6.GTIOC6A channel
  pwm13 - GPT32E6.GTIOC6B channel
  pwm14 - GPT32E7.GTIOC7A channel
  pwm15 - GPT32E7.GTIOC7B channel

Properties and child nodes (properties) #

compatible — required here #

Array item rules (items) #

Item 1

Allowed values (enum): "renesas,r9a07g044-gpt", "renesas,r9a07g054-gpt"

Item 2

Exact value (const): "renesas,rzg2l-gpt"

reg — required here #

Maximum number of items (maxItems): 1

#pwm-cells — not listed as required here #

Exact value (const): 3

interrupts — required here #

Array item rules (items) #

Item 1

GPT32E0.GTCCRA input capture/compare match

Item 2

GPT32E0.GTCCRB input capture/compare

Item 3

GPT32E0.GTCCRC compare match

Item 4

GPT32E0.GTCCRD compare match

Item 5

GPT32E0.GTCCRE compare match

Item 6

GPT32E0.GTCCRF compare match

Item 7

GPT32E0.GTADTRA compare match

Item 8

GPT32E0.GTADTRB compare match

Item 9

GPT32E0.GTCNT overflow/GTPR compare match

Item 10

GPT32E0.GTCNT underflow

Item 11

GPT32E1.GTCCRA input capture/compare match

Item 12

GPT32E1.GTCCRB input capture/compare

Item 13

GPT32E1.GTCCRC compare match

Item 14

GPT32E1.GTCCRD compare match

Item 15

GPT32E1.GTCCRE compare match

Item 16

GPT32E1.GTCCRF compare match

Item 17

GPT32E1.GTADTRA compare match

Item 18

GPT32E1.GTADTRB compare match

Item 19

GPT32E1.GTCNT overflow/GTPR compare match

Item 20

GPT32E1.GTCNT underflow

Item 21

GPT32E2.GTCCRA input capture/compare match

Item 22

GPT32E2.GTCCRB input capture/compare

Item 23

GPT32E2.GTCCRC compare match

Item 24

GPT32E2.GTCCRD compare match

Item 25

GPT32E2.GTCCRE compare match

Item 26

GPT32E2.GTCCRF compare match

Item 27

GPT32E2.GTADTRA compare match

Item 28

GPT32E2.GTADTRB compare match

Item 29

GPT32E2.GTCNT overflow/GTPR compare match

Item 30

GPT32E2.GTCNT underflow

Item 31

GPT32E3.GTCCRA input capture/compare match

Item 32

GPT32E3.GTCCRB input capture/compare

Item 33

GPT32E3.GTCCRC compare match

Item 34

GPT32E3.GTCCRD compare match

Item 35

GPT32E3.GTCCRE compare match

Item 36

GPT32E3.GTCCRF compare match

Item 37

GPT32E3.GTADTRA compare match

Item 38

GPT32E3.GTADTRB compare match

Item 39

GPT32E3.GTCNT overflow/GTPR compare match

Item 40

GPT32E3.GTCNT underflow

Item 41

GPT32E4.GTCCRA input capture/compare match

Item 42

GPT32E4.GTCCRB input capture/compare

Item 43

GPT32E4.GTCCRC compare match

Item 44

GPT32E4.GTCCRD compare match

Item 45

GPT32E4.GTCCRE compare match

Item 46

GPT32E4.GTCCRF compare match

Item 47

GPT32E4.GTADTRA compare match

Item 48

GPT32E4.GTADTRB compare match

Item 49

GPT32E4.GTCNT overflow/GTPR compare match

Item 50

GPT32E4.GTCNT underflow

Item 51

GPT32E5.GTCCRA input capture/compare match

Item 52

GPT32E5.GTCCRB input capture/compare

Item 53

GPT32E5.GTCCRC compare match

Item 54

GPT32E5.GTCCRD compare match

Item 55

GPT32E5.GTCCRE compare match

Item 56

GPT32E5.GTCCRF compare match

Item 57

GPT32E5.GTADTRA compare match

Item 58

GPT32E5.GTADTRB compare match

Item 59

GPT32E5.GTCNT overflow/GTPR compare match

Item 60

GPT32E5.GTCNT underflow

Item 61

GPT32E6.GTCCRA input capture/compare match

Item 62

GPT32E6.GTCCRB input capture/compare

Item 63

GPT32E6.GTCCRC compare match

Item 64

GPT32E6.GTCCRD compare match

Item 65

GPT32E6.GTCCRE compare match

Item 66

GPT32E6.GTCCRF compare match

Item 67

GPT32E6.GTADTRA compare match

Item 68

GPT32E6.GTADTRB compare match

Item 69

GPT32E6.GTCNT overflow/GTPR compare match

Item 70

GPT32E6.GTCNT underflow

Item 71

GPT32E7.GTCCRA input capture/compare match

Item 72

GPT32E7.GTCCRB input capture/compare

Item 73

GPT32E7.GTCCRC compare match

Item 74

GPT32E7.GTCCRD compare match

Item 75

GPT32E7.GTCCRE compare match

Item 76

GPT32E7.GTCCRF compare match

Item 77

GPT32E7.GTADTRA compare match

Item 78

GPT32E7.GTADTRB compare match

Item 79

GPT32E7.GTCNT overflow/GTPR compare match

Item 80

GPT32E7.GTCNT underflow

interrupt-names — required here #

Array item rules (items) #

Item 1

Exact value (const): "ccmpa0"

Item 2

Exact value (const): "ccmpb0"

Item 3

Exact value (const): "cmpc0"

Item 4

Exact value (const): "cmpd0"

Item 5

Exact value (const): "cmpe0"

Item 6

Exact value (const): "cmpf0"

Item 7

Exact value (const): "adtrga0"

Item 8

Exact value (const): "adtrgb0"

Item 9

Exact value (const): "ovf0"

Item 10

Exact value (const): "unf0"

Item 11

Exact value (const): "ccmpa1"

Item 12

Exact value (const): "ccmpb1"

Item 13

Exact value (const): "cmpc1"

Item 14

Exact value (const): "cmpd1"

Item 15

Exact value (const): "cmpe1"

Item 16

Exact value (const): "cmpf1"

Item 17

Exact value (const): "adtrga1"

Item 18

Exact value (const): "adtrgb1"

Item 19

Exact value (const): "ovf1"

Item 20

Exact value (const): "unf1"

Item 21

Exact value (const): "ccmpa2"

Item 22

Exact value (const): "ccmpb2"

Item 23

Exact value (const): "cmpc2"

Item 24

Exact value (const): "cmpd2"

Item 25

Exact value (const): "cmpe2"

Item 26

Exact value (const): "cmpf2"

Item 27

Exact value (const): "adtrga2"

Item 28

Exact value (const): "adtrgb2"

Item 29

Exact value (const): "ovf2"

Item 30

Exact value (const): "unf2"

Item 31

Exact value (const): "ccmpa3"

Item 32

Exact value (const): "ccmpb3"

Item 33

Exact value (const): "cmpc3"

Item 34

Exact value (const): "cmpd3"

Item 35

Exact value (const): "cmpe3"

Item 36

Exact value (const): "cmpf3"

Item 37

Exact value (const): "adtrga3"

Item 38

Exact value (const): "adtrgb3"

Item 39

Exact value (const): "ovf3"

Item 40

Exact value (const): "unf3"

Item 41

Exact value (const): "ccmpa4"

Item 42

Exact value (const): "ccmpb4"

Item 43

Exact value (const): "cmpc4"

Item 44

Exact value (const): "cmpd4"

Item 45

Exact value (const): "cmpe4"

Item 46

Exact value (const): "cmpf4"

Item 47

Exact value (const): "adtrga4"

Item 48

Exact value (const): "adtrgb4"

Item 49

Exact value (const): "ovf4"

Item 50

Exact value (const): "unf4"

Item 51

Exact value (const): "ccmpa5"

Item 52

Exact value (const): "ccmpb5"

Item 53

Exact value (const): "cmpc5"

Item 54

Exact value (const): "cmpd5"

Item 55

Exact value (const): "cmpe5"

Item 56

Exact value (const): "cmpf5"

Item 57

Exact value (const): "adtrga5"

Item 58

Exact value (const): "adtrgb5"

Item 59

Exact value (const): "ovf5"

Item 60

Exact value (const): "unf5"

Item 61

Exact value (const): "ccmpa6"

Item 62

Exact value (const): "ccmpb6"

Item 63

Exact value (const): "cmpc6"

Item 64

Exact value (const): "cmpd6"

Item 65

Exact value (const): "cmpe6"

Item 66

Exact value (const): "cmpf6"

Item 67

Exact value (const): "adtrga6"

Item 68

Exact value (const): "adtrgb6"

Item 69

Exact value (const): "ovf6"

Item 70

Exact value (const): "unf6"

Item 71

Exact value (const): "ccmpa7"

Item 72

Exact value (const): "ccmpb7"

Item 73

Exact value (const): "cmpc7"

Item 74

Exact value (const): "cmpd7"

Item 75

Exact value (const): "cmpe7"

Item 76

Exact value (const): "cmpf7"

Item 77

Exact value (const): "adtrga7"

Item 78

Exact value (const): "adtrgb7"

Item 79

Exact value (const): "ovf7"

Item 80

Exact value (const): "unf7"

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

Required in this object (required): "compatible", "reg", "interrupts", "interrupt-names", "clocks", "power-domains", "resets"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): pwm.yaml#

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>

gpt: pwm@10048000 {
    compatible = "renesas,r9a07g044-gpt", "renesas,rzg2l-gpt";
    reg = <0x10048000 0x800>;
    interrupts = <GIC_SPI 218 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 219 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 220 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 221 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 222 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 223 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 224 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 225 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 226 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 227 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 231 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 232 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 233 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 234 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 235 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 236 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 237 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 238 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 239 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 240 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 244 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 245 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 246 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 247 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 248 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 249 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 250 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 251 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 252 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 253 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 257 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 258 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 259 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 260 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 261 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 262 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 263 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 265 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 266 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 270 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 271 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 272 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 273 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 274 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 275 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 276 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 277 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 278 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 279 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 283 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 284 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 285 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 286 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 287 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 288 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 289 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 290 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 291 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 292 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 296 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 297 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 298 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 299 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 300 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 301 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 302 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 303 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 304 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 305 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 309 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 310 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 311 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 312 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 313 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 314 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 315 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 316 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 317 IRQ_TYPE_EDGE_RISING>,
                 <GIC_SPI 318 IRQ_TYPE_EDGE_RISING>;
    interrupt-names = "ccmpa0", "ccmpb0", "cmpc0", "cmpd0",
                      "cmpe0", "cmpf0", "adtrga0", "adtrgb0",
                      "ovf0", "unf0",
                      "ccmpa1", "ccmpb1", "cmpc1", "cmpd1",
                      "cmpe1", "cmpf1", "adtrga1", "adtrgb1",
                      "ovf1", "unf1",
                      "ccmpa2", "ccmpb2", "cmpc2", "cmpd2",
                      "cmpe2", "cmpf2", "adtrga2", "adtrgb2",
                      "ovf2", "unf2",
                      "ccmpa3", "ccmpb3", "cmpc3", "cmpd3",
                      "cmpe3", "cmpf3", "adtrga3", "adtrgb3",
                      "ovf3", "unf3",
                      "ccmpa4", "ccmpb4", "cmpc4", "cmpd4",
                      "cmpe4", "cmpf4", "adtrga4", "adtrgb4",
                      "ovf4", "unf4",
                      "ccmpa5", "ccmpb5", "cmpc5", "cmpd5",
                      "cmpe5", "cmpf5", "adtrga5", "adtrgb5",
                      "ovf5", "unf5",
                      "ccmpa6", "ccmpb6", "cmpc6", "cmpd6",
                      "cmpe6", "cmpf6", "adtrga6", "adtrgb6",
                      "ovf6", "unf6",
                      "ccmpa7", "ccmpb7", "cmpc7", "cmpd7",
                      "cmpe7", "cmpf7", "adtrga7", "adtrgb7",
                      "ovf7", "unf7";
    clocks = <&cpg CPG_MOD R9A07G044_GPT_PCLK>;
    power-domains = <&cpg>;
    resets = <&cpg R9A07G044_GPT_RST_C>;
    #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 63: RZ/G2{L,LC}

Line 64: RZ/V2L

Edit this page