1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/dma/mediatek,uart-dma.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: MediaTek UART APDMA controller 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Long Cheng <long.cheng@mediatek.com> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel Vadotdescription: | 13c9ccf3a3SEmmanuel Vadot The MediaTek UART APDMA controller provides DMA capabilities 14c9ccf3a3SEmmanuel Vadot for the UART peripheral bus. 15c9ccf3a3SEmmanuel Vadot 16c9ccf3a3SEmmanuel VadotallOf: 17*cb7aa33aSEmmanuel Vadot - $ref: dma-controller.yaml# 18c9ccf3a3SEmmanuel Vadot 19c9ccf3a3SEmmanuel Vadotproperties: 20c9ccf3a3SEmmanuel Vadot compatible: 21c9ccf3a3SEmmanuel Vadot oneOf: 22c9ccf3a3SEmmanuel Vadot - items: 23c9ccf3a3SEmmanuel Vadot - enum: 24c9ccf3a3SEmmanuel Vadot - mediatek,mt2712-uart-dma 257ef62cebSEmmanuel Vadot - mediatek,mt6795-uart-dma 26b97ee269SEmmanuel Vadot - mediatek,mt8365-uart-dma 27c9ccf3a3SEmmanuel Vadot - mediatek,mt8516-uart-dma 28c9ccf3a3SEmmanuel Vadot - const: mediatek,mt6577-uart-dma 29c9ccf3a3SEmmanuel Vadot - enum: 30c9ccf3a3SEmmanuel Vadot - mediatek,mt6577-uart-dma 31c9ccf3a3SEmmanuel Vadot 32c9ccf3a3SEmmanuel Vadot reg: 33c9ccf3a3SEmmanuel Vadot minItems: 1 34c9ccf3a3SEmmanuel Vadot maxItems: 16 35c9ccf3a3SEmmanuel Vadot 36c9ccf3a3SEmmanuel Vadot interrupts: 37c9ccf3a3SEmmanuel Vadot description: | 38c9ccf3a3SEmmanuel Vadot TX, RX interrupt lines for each UART APDMA channel 39c9ccf3a3SEmmanuel Vadot minItems: 1 40c9ccf3a3SEmmanuel Vadot maxItems: 16 41c9ccf3a3SEmmanuel Vadot 42c9ccf3a3SEmmanuel Vadot clocks: 43c9ccf3a3SEmmanuel Vadot description: Must contain one entry for the APDMA main clock 44c9ccf3a3SEmmanuel Vadot maxItems: 1 45c9ccf3a3SEmmanuel Vadot 46c9ccf3a3SEmmanuel Vadot clock-names: 47c9ccf3a3SEmmanuel Vadot const: apdma 48c9ccf3a3SEmmanuel Vadot 49c9ccf3a3SEmmanuel Vadot "#dma-cells": 50c9ccf3a3SEmmanuel Vadot const: 1 51c9ccf3a3SEmmanuel Vadot description: | 52c9ccf3a3SEmmanuel Vadot The first cell specifies the UART APDMA channel number 53c9ccf3a3SEmmanuel Vadot 54c9ccf3a3SEmmanuel Vadot dma-requests: 55c9ccf3a3SEmmanuel Vadot description: | 56c9ccf3a3SEmmanuel Vadot Number of virtual channels of the UART APDMA controller 57c9ccf3a3SEmmanuel Vadot maximum: 16 58c9ccf3a3SEmmanuel Vadot 59c9ccf3a3SEmmanuel Vadot mediatek,dma-33bits: 60c9ccf3a3SEmmanuel Vadot type: boolean 61c9ccf3a3SEmmanuel Vadot description: Enable 33-bits UART APDMA support 62c9ccf3a3SEmmanuel Vadot 63c9ccf3a3SEmmanuel Vadotrequired: 64c9ccf3a3SEmmanuel Vadot - compatible 65c9ccf3a3SEmmanuel Vadot - reg 66c9ccf3a3SEmmanuel Vadot - interrupts 67c9ccf3a3SEmmanuel Vadot 68c9ccf3a3SEmmanuel VadotadditionalProperties: false 69c9ccf3a3SEmmanuel Vadot 70c9ccf3a3SEmmanuel Vadotif: 71c9ccf3a3SEmmanuel Vadot not: 72c9ccf3a3SEmmanuel Vadot required: 73c9ccf3a3SEmmanuel Vadot - dma-requests 74c9ccf3a3SEmmanuel Vadotthen: 75c9ccf3a3SEmmanuel Vadot properties: 76c9ccf3a3SEmmanuel Vadot interrupts: 77c9ccf3a3SEmmanuel Vadot maxItems: 8 78c9ccf3a3SEmmanuel Vadot reg: 79c9ccf3a3SEmmanuel Vadot maxItems: 8 80c9ccf3a3SEmmanuel Vadot 81c9ccf3a3SEmmanuel Vadotexamples: 82c9ccf3a3SEmmanuel Vadot - | 83c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 84c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/mt2712-clk.h> 85c9ccf3a3SEmmanuel Vadot soc { 86c9ccf3a3SEmmanuel Vadot #address-cells = <2>; 87c9ccf3a3SEmmanuel Vadot #size-cells = <2>; 88c9ccf3a3SEmmanuel Vadot 89c9ccf3a3SEmmanuel Vadot apdma: dma-controller@11000400 { 90c9ccf3a3SEmmanuel Vadot compatible = "mediatek,mt2712-uart-dma", 91c9ccf3a3SEmmanuel Vadot "mediatek,mt6577-uart-dma"; 92c9ccf3a3SEmmanuel Vadot reg = <0 0x11000400 0 0x80>, 93c9ccf3a3SEmmanuel Vadot <0 0x11000480 0 0x80>, 94c9ccf3a3SEmmanuel Vadot <0 0x11000500 0 0x80>, 95c9ccf3a3SEmmanuel Vadot <0 0x11000580 0 0x80>, 96c9ccf3a3SEmmanuel Vadot <0 0x11000600 0 0x80>, 97c9ccf3a3SEmmanuel Vadot <0 0x11000680 0 0x80>, 98c9ccf3a3SEmmanuel Vadot <0 0x11000700 0 0x80>, 99c9ccf3a3SEmmanuel Vadot <0 0x11000780 0 0x80>, 100c9ccf3a3SEmmanuel Vadot <0 0x11000800 0 0x80>, 101c9ccf3a3SEmmanuel Vadot <0 0x11000880 0 0x80>, 102c9ccf3a3SEmmanuel Vadot <0 0x11000900 0 0x80>, 103c9ccf3a3SEmmanuel Vadot <0 0x11000980 0 0x80>; 104c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_LOW>, 105c9ccf3a3SEmmanuel Vadot <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>, 106c9ccf3a3SEmmanuel Vadot <GIC_SPI 105 IRQ_TYPE_LEVEL_LOW>, 107c9ccf3a3SEmmanuel Vadot <GIC_SPI 106 IRQ_TYPE_LEVEL_LOW>, 108c9ccf3a3SEmmanuel Vadot <GIC_SPI 107 IRQ_TYPE_LEVEL_LOW>, 109c9ccf3a3SEmmanuel Vadot <GIC_SPI 108 IRQ_TYPE_LEVEL_LOW>, 110c9ccf3a3SEmmanuel Vadot <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>, 111c9ccf3a3SEmmanuel Vadot <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>, 112c9ccf3a3SEmmanuel Vadot <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>, 113c9ccf3a3SEmmanuel Vadot <GIC_SPI 112 IRQ_TYPE_LEVEL_LOW>, 114c9ccf3a3SEmmanuel Vadot <GIC_SPI 113 IRQ_TYPE_LEVEL_LOW>, 115c9ccf3a3SEmmanuel Vadot <GIC_SPI 114 IRQ_TYPE_LEVEL_LOW>; 116c9ccf3a3SEmmanuel Vadot dma-requests = <12>; 117c9ccf3a3SEmmanuel Vadot clocks = <&pericfg CLK_PERI_AP_DMA>; 118c9ccf3a3SEmmanuel Vadot clock-names = "apdma"; 119c9ccf3a3SEmmanuel Vadot mediatek,dma-33bits; 120c9ccf3a3SEmmanuel Vadot #dma-cells = <1>; 121c9ccf3a3SEmmanuel Vadot }; 122c9ccf3a3SEmmanuel Vadot }; 123c9ccf3a3SEmmanuel Vadot 124c9ccf3a3SEmmanuel Vadot... 125