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

dt-bindings: timer: Convert i.MX TPM to json-schema

Convert the i.MX TPM binding to DT schema format using json-schema.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Anson Huang and committed by
Rob Herring
8f2d9010 268b7e3c

+61 -28
-28
Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt
··· 1 - NXP Low Power Timer/Pulse Width Modulation Module (TPM) 2 - 3 - The Timer/PWM Module (TPM) supports input capture, output compare, 4 - and the generation of PWM signals to control electric motor and power 5 - management applications. The counter, compare and capture registers 6 - are clocked by an asynchronous clock that can remain enabled in low 7 - power modes. TPM can support global counter bus where one TPM drives 8 - the counter bus for the others, provided bit width is the same. 9 - 10 - Required properties: 11 - 12 - - compatible : should be "fsl,imx7ulp-tpm" 13 - - reg : Specifies base physical address and size of the register sets 14 - for the clock event device and clock source device. 15 - - interrupts : Should be the clock event device interrupt. 16 - - clocks : The clocks provided by the SoC to drive the timer, must contain 17 - an entry for each entry in clock-names. 18 - - clock-names : Must include the following entries: "ipg" and "per". 19 - 20 - Example: 21 - tpm5: tpm@40260000 { 22 - compatible = "fsl,imx7ulp-tpm"; 23 - reg = <0x40260000 0x1000>; 24 - interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; 25 - clocks = <&clks IMX7ULP_CLK_NIC1_BUS_DIV>, 26 - <&clks IMX7ULP_CLK_LPTPM5>; 27 - clock-names = "ipg", "per"; 28 - };
+61
Documentation/devicetree/bindings/timer/nxp,tpm-timer.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/timer/nxp,tpm-timer.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP Low Power Timer/Pulse Width Modulation Module (TPM) 8 + 9 + maintainers: 10 + - Dong Aisheng <aisheng.dong@nxp.com> 11 + 12 + description: | 13 + The Timer/PWM Module (TPM) supports input capture, output compare, 14 + and the generation of PWM signals to control electric motor and power 15 + management applications. The counter, compare and capture registers 16 + are clocked by an asynchronous clock that can remain enabled in low 17 + power modes. TPM can support global counter bus where one TPM drives 18 + the counter bus for the others, provided bit width is the same. 19 + 20 + properties: 21 + compatible: 22 + const: fsl,imx7ulp-tpm 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + maxItems: 1 29 + 30 + clocks: 31 + items: 32 + - description: SoC TPM ipg clock 33 + - description: SoC TPM per clock 34 + 35 + clock-names: 36 + items: 37 + - const: ipg 38 + - const: per 39 + 40 + required: 41 + - compatible 42 + - reg 43 + - interrupts 44 + - clocks 45 + - clock-names 46 + 47 + additionalProperties: false 48 + 49 + examples: 50 + - | 51 + #include <dt-bindings/clock/imx7ulp-clock.h> 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + 54 + timer@40260000 { 55 + compatible = "fsl,imx7ulp-tpm"; 56 + reg = <0x40260000 0x1000>; 57 + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; 58 + clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>, 59 + <&pcc2 IMX7ULP_CLK_LPTPM5>; 60 + clock-names = "ipg", "per"; 61 + };