~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/arch/mips/ingenic-tcu.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/arch/mips/ingenic-tcu.rst (Architecture sparc) and /Documentation/arch/mips/ingenic-tcu.rst (Architecture mips)


  1 .. SPDX-License-Identifier: GPL-2.0                 1 .. SPDX-License-Identifier: GPL-2.0
  2                                                     2 
  3 ==============================================      3 ===============================================
  4 Ingenic JZ47xx SoCs Timer/Counter Unit hardwar      4 Ingenic JZ47xx SoCs Timer/Counter Unit hardware
  5 ==============================================      5 ===============================================
  6                                                     6 
  7 The Timer/Counter Unit (TCU) in Ingenic JZ47xx      7 The Timer/Counter Unit (TCU) in Ingenic JZ47xx SoCs is a multi-function
  8 hardware block. It features up to eight channe      8 hardware block. It features up to eight channels, that can be used as
  9 counters, timers, or PWM.                           9 counters, timers, or PWM.
 10                                                    10 
 11 - JZ4725B, JZ4750, JZ4755 only have six TCU ch     11 - JZ4725B, JZ4750, JZ4755 only have six TCU channels. The other SoCs all
 12   have eight channels.                             12   have eight channels.
 13                                                    13 
 14 - JZ4725B introduced a separate channel, calle     14 - JZ4725B introduced a separate channel, called Operating System Timer
 15   (OST). It is a 32-bit programmable timer. On     15   (OST). It is a 32-bit programmable timer. On JZ4760B and above, it is
 16   64-bit.                                          16   64-bit.
 17                                                    17 
 18 - Each one of the TCU channels has its own clo     18 - Each one of the TCU channels has its own clock, which can be reparented to three
 19   different clocks (pclk, ext, rtc), gated, an     19   different clocks (pclk, ext, rtc), gated, and reclocked, through their TCSR register.
 20                                                    20 
 21     - The watchdog and OST hardware blocks als     21     - The watchdog and OST hardware blocks also feature a TCSR register with the same
 22       format in their register space.              22       format in their register space.
 23     - The TCU registers used to gate/ungate ca     23     - The TCU registers used to gate/ungate can also gate/ungate the watchdog and
 24       OST clocks.                                  24       OST clocks.
 25                                                    25 
 26 - Each TCU channel works in one of two modes:      26 - Each TCU channel works in one of two modes:
 27                                                    27 
 28     - mode TCU1: channels cannot work in sleep     28     - mode TCU1: channels cannot work in sleep mode, but are easier to
 29       operate.                                     29       operate.
 30     - mode TCU2: channels can work in sleep mo     30     - mode TCU2: channels can work in sleep mode, but the operation is a bit
 31       more complicated than with TCU1 channels     31       more complicated than with TCU1 channels.
 32                                                    32 
 33 - The mode of each TCU channel depends on the      33 - The mode of each TCU channel depends on the SoC used:
 34                                                    34 
 35     - On the oldest SoCs (up to JZ4740), all o     35     - On the oldest SoCs (up to JZ4740), all of the eight channels operate in
 36       TCU1 mode.                                   36       TCU1 mode.
 37     - On JZ4725B, channel 5 operates as TCU2,      37     - On JZ4725B, channel 5 operates as TCU2, the others operate as TCU1.
 38     - On newest SoCs (JZ4750 and above), chann     38     - On newest SoCs (JZ4750 and above), channels 1-2 operate as TCU2, the
 39       others operate as TCU1.                      39       others operate as TCU1.
 40                                                    40 
 41 - Each channel can generate an interrupt. Some     41 - Each channel can generate an interrupt. Some channels share an interrupt
 42   line, some don't, and this changes between S     42   line, some don't, and this changes between SoC versions:
 43                                                    43 
 44     - on older SoCs (JZ4740 and below), channe     44     - on older SoCs (JZ4740 and below), channel 0 and channel 1 have their
 45       own interrupt line; channels 2-7 share t     45       own interrupt line; channels 2-7 share the last interrupt line.
 46     - On JZ4725B, channel 0 has its own interr     46     - On JZ4725B, channel 0 has its own interrupt; channels 1-5 share one
 47       interrupt line; the OST uses the last in     47       interrupt line; the OST uses the last interrupt line.
 48     - on newer SoCs (JZ4750 and above), channe     48     - on newer SoCs (JZ4750 and above), channel 5 has its own interrupt;
 49       channels 0-4 and (if eight channels) 6-7     49       channels 0-4 and (if eight channels) 6-7 all share one interrupt line;
 50       the OST uses the last interrupt line.        50       the OST uses the last interrupt line.
 51                                                    51 
 52 Implementation                                     52 Implementation
 53 ==============                                     53 ==============
 54                                                    54 
 55 The functionalities of the TCU hardware are sp     55 The functionalities of the TCU hardware are spread across multiple drivers:
 56                                                    56 
 57 ===========  =====                                 57 ===========  =====
 58 clocks       drivers/clk/ingenic/tcu.c             58 clocks       drivers/clk/ingenic/tcu.c
 59 interrupts   drivers/irqchip/irq-ingenic-tcu.c     59 interrupts   drivers/irqchip/irq-ingenic-tcu.c
 60 timers       drivers/clocksource/ingenic-timer     60 timers       drivers/clocksource/ingenic-timer.c
 61 OST          drivers/clocksource/ingenic-ost.c     61 OST          drivers/clocksource/ingenic-ost.c
 62 PWM          drivers/pwm/pwm-jz4740.c              62 PWM          drivers/pwm/pwm-jz4740.c
 63 watchdog     drivers/watchdog/jz4740_wdt.c         63 watchdog     drivers/watchdog/jz4740_wdt.c
 64 ===========  =====                                 64 ===========  =====
 65                                                    65 
 66 Because various functionalities of the TCU tha     66 Because various functionalities of the TCU that belong to different drivers
 67 and frameworks can be controlled from the same     67 and frameworks can be controlled from the same registers, all of these
 68 drivers access their registers through the sam     68 drivers access their registers through the same regmap.
 69                                                    69 
 70 For more information regarding the devicetree      70 For more information regarding the devicetree bindings of the TCU drivers,
 71 have a look at Documentation/devicetree/bindin     71 have a look at Documentation/devicetree/bindings/timer/ingenic,tcu.yaml.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php