From: Dang Huynh <dang.hu...@mainlining.org> Add documentation describing the SD/MMC controller in RDA Micro RDA8810PL SoC.
Signed-off-by: Dang Huynh <dang.hu...@mainlining.org> --- Documentation/devicetree/bindings/mmc/rda,mmc.yaml | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/rda,mmc.yaml b/Documentation/devicetree/bindings/mmc/rda,mmc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dfdd9c6d3044061c342519e35e39c7751874bb03 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/rda,mmc.yaml @@ -0,0 +1,91 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/rda,mmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RDA Micro SD/MMC Controller + +allOf: + - $ref: mmc-controller.yaml + +maintainers: + - Dang Huynh <dang.hu...@mainlining.org> + +properties: + compatible: + const: rda,8810pl-mmc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: apb + + resets: + maxItems: 1 + + dmas: + minItems: 2 + maxItems: 2 + + dma-names: + items: + - const: tx + - const: rx + + rda,mclk-adj: + $ref: /schemas/types.yaml#/definitions/uint8 + description: + Some board need MCLK to be adjusted for the card to work. + If not present, MCLK will be handled by an external PCLK. + minimum: 0 + maximum: 255 + + rda,mclk-inv: + $ref: /schemas/types.yaml#/definitions/flag + description: + Some board need MCLK to be inverted for the card to work. + If not present, MCLK is not inverted. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - dmas + - dma-names + - vmmc-supply + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/clock/rda,8810pl-apclk.h> + #include <dt-bindings/dma/rda-ifc.h> + mmc1: mmc@20950000 { + compatible = "rda,8810pl-mmc"; + reg = <0x20950000 0x1000>; + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ap_syscon CLK_APB2>; + clock-names = "apb"; + resets = <&ap_syscon RST_APB2_SDMMC1>; + dmas = <&ifc IFC_SDMMC1_TX>, <&ifc IFC_SDMMC1_RX>; + dma-names = "tx", "rx"; + vmmc-supply = <&vdd_sdmmc>; + rda,mclk-adj = /bits/ 8 <1>; + rda,mclk-inv; + status = "disabled"; + }; + +... -- 2.51.0