xref: /freebsd/sys/contrib/device-tree/Bindings/mmc/aspeed,sdhci.yaml (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-or-later
2*c66ec88fSEmmanuel Vadot# Copyright 2019 IBM Corp.
3*c66ec88fSEmmanuel Vadot%YAML 1.2
4*c66ec88fSEmmanuel Vadot---
5*c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/mmc/aspeed,sdhci.yaml#
6*c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel Vadottitle: ASPEED SD/SDIO/MMC Controller
9*c66ec88fSEmmanuel Vadot
10*c66ec88fSEmmanuel Vadotmaintainers:
11*c66ec88fSEmmanuel Vadot  - Andrew Jeffery <andrew@aj.id.au>
12*c66ec88fSEmmanuel Vadot  - Ryan Chen <ryanchen.aspeed@gmail.com>
13*c66ec88fSEmmanuel Vadot
14*c66ec88fSEmmanuel Vadotdescription: |+
15*c66ec88fSEmmanuel Vadot  The ASPEED SD/SDIO/eMMC controller exposes two slots implementing the SDIO
16*c66ec88fSEmmanuel Vadot  Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit data bus if
17*c66ec88fSEmmanuel Vadot  only a single slot is enabled.
18*c66ec88fSEmmanuel Vadot
19*c66ec88fSEmmanuel Vadot  The two slots are supported by a common configuration area. As the SDHCIs for
20*c66ec88fSEmmanuel Vadot  the slots are dependent on the common configuration area, they are described
21*c66ec88fSEmmanuel Vadot  as child nodes.
22*c66ec88fSEmmanuel Vadot
23*c66ec88fSEmmanuel Vadotproperties:
24*c66ec88fSEmmanuel Vadot  compatible:
25*c66ec88fSEmmanuel Vadot    enum:
26*c66ec88fSEmmanuel Vadot      - aspeed,ast2400-sd-controller
27*c66ec88fSEmmanuel Vadot      - aspeed,ast2500-sd-controller
28*c66ec88fSEmmanuel Vadot      - aspeed,ast2600-sd-controller
29*c66ec88fSEmmanuel Vadot  reg:
30*c66ec88fSEmmanuel Vadot    maxItems: 1
31*c66ec88fSEmmanuel Vadot    description: Common configuration registers
32*c66ec88fSEmmanuel Vadot  "#address-cells":
33*c66ec88fSEmmanuel Vadot    const: 1
34*c66ec88fSEmmanuel Vadot  "#size-cells":
35*c66ec88fSEmmanuel Vadot    const: 1
36*c66ec88fSEmmanuel Vadot  ranges: true
37*c66ec88fSEmmanuel Vadot  clocks:
38*c66ec88fSEmmanuel Vadot    maxItems: 1
39*c66ec88fSEmmanuel Vadot    description: The SD/SDIO controller clock gate
40*c66ec88fSEmmanuel Vadot
41*c66ec88fSEmmanuel VadotpatternProperties:
42*c66ec88fSEmmanuel Vadot  "^sdhci@[0-9a-f]+$":
43*c66ec88fSEmmanuel Vadot    type: object
44*c66ec88fSEmmanuel Vadot    $ref: mmc-controller.yaml
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel Vadot    properties:
47*c66ec88fSEmmanuel Vadot      compatible:
48*c66ec88fSEmmanuel Vadot        enum:
49*c66ec88fSEmmanuel Vadot          - aspeed,ast2400-sdhci
50*c66ec88fSEmmanuel Vadot          - aspeed,ast2500-sdhci
51*c66ec88fSEmmanuel Vadot          - aspeed,ast2600-sdhci
52*c66ec88fSEmmanuel Vadot      reg:
53*c66ec88fSEmmanuel Vadot        maxItems: 1
54*c66ec88fSEmmanuel Vadot        description: The SDHCI registers
55*c66ec88fSEmmanuel Vadot      clocks:
56*c66ec88fSEmmanuel Vadot        maxItems: 1
57*c66ec88fSEmmanuel Vadot        description: The SD bus clock
58*c66ec88fSEmmanuel Vadot      interrupts:
59*c66ec88fSEmmanuel Vadot        maxItems: 1
60*c66ec88fSEmmanuel Vadot        description: The SD interrupt shared between both slots
61*c66ec88fSEmmanuel Vadot      sdhci,auto-cmd12:
62*c66ec88fSEmmanuel Vadot        type: boolean
63*c66ec88fSEmmanuel Vadot        description: Specifies that controller should use auto CMD12
64*c66ec88fSEmmanuel Vadot    required:
65*c66ec88fSEmmanuel Vadot      - compatible
66*c66ec88fSEmmanuel Vadot      - reg
67*c66ec88fSEmmanuel Vadot      - clocks
68*c66ec88fSEmmanuel Vadot      - interrupts
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel VadotadditionalProperties: false
71*c66ec88fSEmmanuel Vadot
72*c66ec88fSEmmanuel Vadotrequired:
73*c66ec88fSEmmanuel Vadot  - compatible
74*c66ec88fSEmmanuel Vadot  - reg
75*c66ec88fSEmmanuel Vadot  - "#address-cells"
76*c66ec88fSEmmanuel Vadot  - "#size-cells"
77*c66ec88fSEmmanuel Vadot  - ranges
78*c66ec88fSEmmanuel Vadot  - clocks
79*c66ec88fSEmmanuel Vadot
80*c66ec88fSEmmanuel Vadotexamples:
81*c66ec88fSEmmanuel Vadot  - |
82*c66ec88fSEmmanuel Vadot    #include <dt-bindings/clock/aspeed-clock.h>
83*c66ec88fSEmmanuel Vadot    sdc@1e740000 {
84*c66ec88fSEmmanuel Vadot            compatible = "aspeed,ast2500-sd-controller";
85*c66ec88fSEmmanuel Vadot            reg = <0x1e740000 0x100>;
86*c66ec88fSEmmanuel Vadot            #address-cells = <1>;
87*c66ec88fSEmmanuel Vadot            #size-cells = <1>;
88*c66ec88fSEmmanuel Vadot            ranges = <0 0x1e740000 0x20000>;
89*c66ec88fSEmmanuel Vadot            clocks = <&syscon ASPEED_CLK_GATE_SDCLK>;
90*c66ec88fSEmmanuel Vadot
91*c66ec88fSEmmanuel Vadot            sdhci0: sdhci@100 {
92*c66ec88fSEmmanuel Vadot                    compatible = "aspeed,ast2500-sdhci";
93*c66ec88fSEmmanuel Vadot                    reg = <0x100 0x100>;
94*c66ec88fSEmmanuel Vadot                    interrupts = <26>;
95*c66ec88fSEmmanuel Vadot                    sdhci,auto-cmd12;
96*c66ec88fSEmmanuel Vadot                    clocks = <&syscon ASPEED_CLK_SDIO>;
97*c66ec88fSEmmanuel Vadot            };
98*c66ec88fSEmmanuel Vadot
99*c66ec88fSEmmanuel Vadot            sdhci1: sdhci@200 {
100*c66ec88fSEmmanuel Vadot                    compatible = "aspeed,ast2500-sdhci";
101*c66ec88fSEmmanuel Vadot                    reg = <0x200 0x100>;
102*c66ec88fSEmmanuel Vadot                    interrupts = <26>;
103*c66ec88fSEmmanuel Vadot                    sdhci,auto-cmd12;
104*c66ec88fSEmmanuel Vadot                    clocks = <&syscon ASPEED_CLK_SDIO>;
105*c66ec88fSEmmanuel Vadot            };
106*c66ec88fSEmmanuel Vadot    };
107