Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: Add doc for the Ingenic TCU drivers

Add documentation about how to properly use the Ingenic TCU
(Timer/Counter Unit) drivers from devicetree.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Mathieu Malaterre <malat@debian.org>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-clk@vger.kernel.org
Cc: od@zcrc.me

authored by

Paul Cercueil and committed by
Paul Burton
2e8722a5 97689a1a

+137 -39
-22
Documentation/devicetree/bindings/pwm/ingenic,jz47xx-pwm.txt
··· 1 - Ingenic JZ47xx PWM Controller 2 - ============================= 3 - 4 - Required properties: 5 - - compatible: Should be "ingenic,jz4740-pwm" 6 - - #pwm-cells: Should be 3. See pwm.txt in this directory for a description 7 - of the cells format. 8 - - clocks : phandle to the external clock. 9 - - clock-names : Should be "ext". 10 - 11 - 12 - Example: 13 - 14 - pwm: pwm@10002000 { 15 - compatible = "ingenic,jz4740-pwm"; 16 - reg = <0x10002000 0x1000>; 17 - 18 - #pwm-cells = <3>; 19 - 20 - clocks = <&ext>; 21 - clock-names = "ext"; 22 - };
+137
Documentation/devicetree/bindings/timer/ingenic,tcu.txt
··· 1 + Ingenic JZ47xx SoCs Timer/Counter Unit devicetree bindings 2 + ========================================================== 3 + 4 + For a description of the TCU hardware and drivers, have a look at 5 + Documentation/mips/ingenic-tcu.txt. 6 + 7 + Required properties: 8 + 9 + - compatible: Must be one of: 10 + * ingenic,jz4740-tcu 11 + * ingenic,jz4725b-tcu 12 + * ingenic,jz4770-tcu 13 + followed by "simple-mfd". 14 + - reg: Should be the offset/length value corresponding to the TCU registers 15 + - clocks: List of phandle & clock specifiers for clocks external to the TCU. 16 + The "pclk", "rtc" and "ext" clocks should be provided. The "tcu" clock 17 + should be provided if the SoC has it. 18 + - clock-names: List of name strings for the external clocks. 19 + - #clock-cells: Should be <1>; 20 + Clock consumers specify this argument to identify a clock. The valid values 21 + may be found in <dt-bindings/clock/ingenic,tcu.h>. 22 + - interrupt-controller : Identifies the node as an interrupt controller 23 + - #interrupt-cells : Specifies the number of cells needed to encode an 24 + interrupt source. The value should be 1. 25 + - interrupts : Specifies the interrupt the controller is connected to. 26 + 27 + Optional properties: 28 + 29 + - ingenic,pwm-channels-mask: Bitmask of TCU channels reserved for PWM use. 30 + Default value is 0xfc. 31 + 32 + 33 + Children nodes 34 + ========================================================== 35 + 36 + 37 + PWM node: 38 + --------- 39 + 40 + Required properties: 41 + 42 + - compatible: Must be one of: 43 + * ingenic,jz4740-pwm 44 + * ingenic,jz4725b-pwm 45 + - #pwm-cells: Should be 3. See ../pwm/pwm.txt for a description of the cell 46 + format. 47 + - clocks: List of phandle & clock specifiers for the TCU clocks. 48 + - clock-names: List of name strings for the TCU clocks. 49 + 50 + 51 + Watchdog node: 52 + -------------- 53 + 54 + Required properties: 55 + 56 + - compatible: Must be "ingenic,jz4740-watchdog" 57 + - clocks: phandle to the WDT clock 58 + - clock-names: should be "wdt" 59 + 60 + 61 + OS Timer node: 62 + --------- 63 + 64 + Required properties: 65 + 66 + - compatible: Must be one of: 67 + * ingenic,jz4725b-ost 68 + * ingenic,jz4770-ost 69 + - clocks: phandle to the OST clock 70 + - clock-names: should be "ost" 71 + - interrupts : Specifies the interrupt the OST is connected to. 72 + 73 + 74 + Example 75 + ========================================================== 76 + 77 + #include <dt-bindings/clock/jz4770-cgu.h> 78 + #include <dt-bindings/clock/ingenic,tcu.h> 79 + 80 + / { 81 + tcu: timer@10002000 { 82 + compatible = "ingenic,jz4770-tcu", "simple-mfd"; 83 + reg = <0x10002000 0x1000>; 84 + #address-cells = <1>; 85 + #size-cells = <1>; 86 + ranges = <0x0 0x10002000 0x1000>; 87 + 88 + #clock-cells = <1>; 89 + 90 + clocks = <&cgu JZ4770_CLK_RTC 91 + &cgu JZ4770_CLK_EXT 92 + &cgu JZ4770_CLK_PCLK>; 93 + clock-names = "rtc", "ext", "pclk"; 94 + 95 + interrupt-controller; 96 + #interrupt-cells = <1>; 97 + 98 + interrupt-parent = <&intc>; 99 + interrupts = <27 26 25>; 100 + 101 + watchdog: watchdog@0 { 102 + compatible = "ingenic,jz4740-watchdog"; 103 + reg = <0x0 0xc>; 104 + 105 + clocks = <&tcu TCU_CLK_WDT>; 106 + clock-names = "wdt"; 107 + }; 108 + 109 + pwm: pwm@40 { 110 + compatible = "ingenic,jz4740-pwm"; 111 + reg = <0x40 0x80>; 112 + 113 + #pwm-cells = <3>; 114 + 115 + clocks = <&tcu TCU_CLK_TIMER0 116 + &tcu TCU_CLK_TIMER1 117 + &tcu TCU_CLK_TIMER2 118 + &tcu TCU_CLK_TIMER3 119 + &tcu TCU_CLK_TIMER4 120 + &tcu TCU_CLK_TIMER5 121 + &tcu TCU_CLK_TIMER6 122 + &tcu TCU_CLK_TIMER7>; 123 + clock-names = "timer0", "timer1", "timer2", "timer3", 124 + "timer4", "timer5", "timer6", "timer7"; 125 + }; 126 + 127 + ost: timer@e0 { 128 + compatible = "ingenic,jz4770-ost"; 129 + reg = <0xe0 0x20>; 130 + 131 + clocks = <&tcu TCU_CLK_OST>; 132 + clock-names = "ost"; 133 + 134 + interrupts = <15>; 135 + }; 136 + }; 137 + };
-17
Documentation/devicetree/bindings/watchdog/ingenic,jz4740-wdt.txt
··· 1 - Ingenic Watchdog Timer (WDT) Controller for JZ4740 & JZ4780 2 - 3 - Required properties: 4 - compatible: "ingenic,jz4740-watchdog" or "ingenic,jz4780-watchdog" 5 - reg: Register address and length for watchdog registers 6 - clocks: phandle to the RTC clock 7 - clock-names: should be "rtc" 8 - 9 - Example: 10 - 11 - watchdog: jz4740-watchdog@10002000 { 12 - compatible = "ingenic,jz4740-watchdog"; 13 - reg = <0x10002000 0x10>; 14 - 15 - clocks = <&cgu JZ4740_CLK_RTC>; 16 - clock-names = "rtc"; 17 - };