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

dt-bindings: dma: convert MediaTek High-Speed controller to the json-schema

This helps validating DTS files. Introduced changes:
1. Adjusted "reg" in example
2. Added includes to example

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240213063919.20196-1-zajec5@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Rafał Miłecki and committed by
Vinod Koul
fa340050 cf497f35

+63 -33
+63
Documentation/devicetree/bindings/dma/mediatek,mt7622-hsdma.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/dma/mediatek,mt7622-hsdma.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek High-Speed DMA Controller 8 + 9 + maintainers: 10 + - Sean Wang <sean.wang@mediatek.com> 11 + 12 + allOf: 13 + - $ref: dma-controller.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt7622-hsdma 19 + - mediatek,mt7623-hsdma 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 1 29 + 30 + clock-names: 31 + const: hsdma 32 + 33 + power-domains: 34 + maxItems: 1 35 + 36 + "#dma-cells": 37 + description: Channel number 38 + const: 1 39 + 40 + required: 41 + - reg 42 + - interrupts 43 + - clocks 44 + - clock-names 45 + - power-domains 46 + 47 + unevaluatedProperties: false 48 + 49 + examples: 50 + - | 51 + #include <dt-bindings/clock/mt2701-clk.h> 52 + #include <dt-bindings/interrupt-controller/arm-gic.h> 53 + #include <dt-bindings/power/mt2701-power.h> 54 + 55 + dma-controller@1b007000 { 56 + compatible = "mediatek,mt7623-hsdma"; 57 + reg = <0x1b007000 0x1000>; 58 + interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>; 59 + clocks = <&ethsys CLK_ETHSYS_HSDMA>; 60 + clock-names = "hsdma"; 61 + power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; 62 + #dma-cells = <1>; 63 + };
-33
Documentation/devicetree/bindings/dma/mtk-hsdma.txt
··· 1 - MediaTek High-Speed DMA Controller 2 - ================================== 3 - 4 - This device follows the generic DMA bindings defined in dma/dma.txt. 5 - 6 - Required properties: 7 - 8 - - compatible: Must be one of 9 - "mediatek,mt7622-hsdma": for MT7622 SoC 10 - "mediatek,mt7623-hsdma": for MT7623 SoC 11 - - reg: Should contain the register's base address and length. 12 - - interrupts: Should contain a reference to the interrupt used by this 13 - device. 14 - - clocks: Should be the clock specifiers corresponding to the entry in 15 - clock-names property. 16 - - clock-names: Should contain "hsdma" entries. 17 - - power-domains: Phandle to the power domain that the device is part of 18 - - #dma-cells: The length of the DMA specifier, must be <1>. This one cell 19 - in dmas property of a client device represents the channel 20 - number. 21 - Example: 22 - 23 - hsdma: dma-controller@1b007000 { 24 - compatible = "mediatek,mt7623-hsdma"; 25 - reg = <0 0x1b007000 0 0x1000>; 26 - interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>; 27 - clocks = <&ethsys CLK_ETHSYS_HSDMA>; 28 - clock-names = "hsdma"; 29 - power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>; 30 - #dma-cells = <1>; 31 - }; 32 - 33 - DMA clients must use the format described in dma/dma.txt file.