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

dt-bindings: dma: Convert mtk-uart-apdma to DT schema

Convert the MediaTek UART APDMA Controller binding to DT schema.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20220217095242.13761-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

AngeloGioacchino Del Regno and committed by
Vinod Koul
9c391ceb 417c7d0d

+122 -56
+122
Documentation/devicetree/bindings/dma/mediatek,uart-dma.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,uart-dma.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek UART APDMA controller 8 + 9 + maintainers: 10 + - Long Cheng <long.cheng@mediatek.com> 11 + 12 + description: | 13 + The MediaTek UART APDMA controller provides DMA capabilities 14 + for the UART peripheral bus. 15 + 16 + allOf: 17 + - $ref: "dma-controller.yaml#" 18 + 19 + properties: 20 + compatible: 21 + oneOf: 22 + - items: 23 + - enum: 24 + - mediatek,mt2712-uart-dma 25 + - mediatek,mt8516-uart-dma 26 + - const: mediatek,mt6577-uart-dma 27 + - enum: 28 + - mediatek,mt6577-uart-dma 29 + 30 + reg: 31 + minItems: 1 32 + maxItems: 16 33 + 34 + interrupts: 35 + description: | 36 + TX, RX interrupt lines for each UART APDMA channel 37 + minItems: 1 38 + maxItems: 16 39 + 40 + clocks: 41 + description: Must contain one entry for the APDMA main clock 42 + maxItems: 1 43 + 44 + clock-names: 45 + const: apdma 46 + 47 + "#dma-cells": 48 + const: 1 49 + description: | 50 + The first cell specifies the UART APDMA channel number 51 + 52 + dma-requests: 53 + description: | 54 + Number of virtual channels of the UART APDMA controller 55 + maximum: 16 56 + 57 + mediatek,dma-33bits: 58 + type: boolean 59 + description: Enable 33-bits UART APDMA support 60 + 61 + required: 62 + - compatible 63 + - reg 64 + - interrupts 65 + 66 + additionalProperties: false 67 + 68 + if: 69 + not: 70 + required: 71 + - dma-requests 72 + then: 73 + properties: 74 + interrupts: 75 + maxItems: 8 76 + reg: 77 + maxItems: 8 78 + 79 + examples: 80 + - | 81 + #include <dt-bindings/interrupt-controller/arm-gic.h> 82 + #include <dt-bindings/clock/mt2712-clk.h> 83 + soc { 84 + #address-cells = <2>; 85 + #size-cells = <2>; 86 + 87 + apdma: dma-controller@11000400 { 88 + compatible = "mediatek,mt2712-uart-dma", 89 + "mediatek,mt6577-uart-dma"; 90 + reg = <0 0x11000400 0 0x80>, 91 + <0 0x11000480 0 0x80>, 92 + <0 0x11000500 0 0x80>, 93 + <0 0x11000580 0 0x80>, 94 + <0 0x11000600 0 0x80>, 95 + <0 0x11000680 0 0x80>, 96 + <0 0x11000700 0 0x80>, 97 + <0 0x11000780 0 0x80>, 98 + <0 0x11000800 0 0x80>, 99 + <0 0x11000880 0 0x80>, 100 + <0 0x11000900 0 0x80>, 101 + <0 0x11000980 0 0x80>; 102 + interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_LOW>, 103 + <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>, 104 + <GIC_SPI 105 IRQ_TYPE_LEVEL_LOW>, 105 + <GIC_SPI 106 IRQ_TYPE_LEVEL_LOW>, 106 + <GIC_SPI 107 IRQ_TYPE_LEVEL_LOW>, 107 + <GIC_SPI 108 IRQ_TYPE_LEVEL_LOW>, 108 + <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>, 109 + <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>, 110 + <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>, 111 + <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>, 112 + <GIC_SPI 113 IRQ_TYPE_LEVEL_LOW>, 113 + <GIC_SPI 114 IRQ_TYPE_LEVEL_LOW>; 114 + dma-requests = <12>; 115 + clocks = <&pericfg CLK_PERI_AP_DMA>; 116 + clock-names = "apdma"; 117 + mediatek,dma-33bits; 118 + #dma-cells = <1>; 119 + }; 120 + }; 121 + 122 + ...
-56
Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt
··· 1 - * Mediatek UART APDMA Controller 2 - 3 - Required properties: 4 - - compatible should contain: 5 - * "mediatek,mt2712-uart-dma" for MT2712 compatible APDMA 6 - * "mediatek,mt6577-uart-dma" for MT6577 and all of the above 7 - * "mediatek,mt8516-uart-dma", "mediatek,mt6577" for MT8516 SoC 8 - 9 - - reg: The base address of the APDMA register bank. 10 - 11 - - interrupts: A single interrupt specifier. 12 - One interrupt per dma-requests, or 8 if no dma-requests property is present 13 - 14 - - dma-requests: The number of DMA channels 15 - 16 - - clocks : Must contain an entry for each entry in clock-names. 17 - See ../clocks/clock-bindings.txt for details. 18 - - clock-names: The APDMA clock for register accesses 19 - 20 - - mediatek,dma-33bits: Present if the DMA requires support 21 - 22 - Examples: 23 - 24 - apdma: dma-controller@11000400 { 25 - compatible = "mediatek,mt2712-uart-dma", 26 - "mediatek,mt6577-uart-dma"; 27 - reg = <0 0x11000400 0 0x80>, 28 - <0 0x11000480 0 0x80>, 29 - <0 0x11000500 0 0x80>, 30 - <0 0x11000580 0 0x80>, 31 - <0 0x11000600 0 0x80>, 32 - <0 0x11000680 0 0x80>, 33 - <0 0x11000700 0 0x80>, 34 - <0 0x11000780 0 0x80>, 35 - <0 0x11000800 0 0x80>, 36 - <0 0x11000880 0 0x80>, 37 - <0 0x11000900 0 0x80>, 38 - <0 0x11000980 0 0x80>; 39 - interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_LOW>, 40 - <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>, 41 - <GIC_SPI 105 IRQ_TYPE_LEVEL_LOW>, 42 - <GIC_SPI 106 IRQ_TYPE_LEVEL_LOW>, 43 - <GIC_SPI 107 IRQ_TYPE_LEVEL_LOW>, 44 - <GIC_SPI 108 IRQ_TYPE_LEVEL_LOW>, 45 - <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>, 46 - <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>, 47 - <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>, 48 - <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>, 49 - <GIC_SPI 113 IRQ_TYPE_LEVEL_LOW>, 50 - <GIC_SPI 114 IRQ_TYPE_LEVEL_LOW>; 51 - dma-requests = <12>; 52 - clocks = <&pericfg CLK_PERI_AP_DMA>; 53 - clock-names = "apdma"; 54 - mediatek,dma-33bits; 55 - #dma-cells = <1>; 56 - };