xref: /linux/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
17a7e55f4SAndrew Jeffery# SPDX-License-Identifier: GPL-2.0-or-later
2f47fdb85SAndrew Jeffery# Copyright 2019 IBM Corp.
37a7e55f4SAndrew Jeffery%YAML 1.2
47a7e55f4SAndrew Jeffery---
57a7e55f4SAndrew Jeffery$id: http://devicetree.org/schemas/mmc/aspeed,sdhci.yaml#
67a7e55f4SAndrew Jeffery$schema: http://devicetree.org/meta-schemas/core.yaml#
77a7e55f4SAndrew Jeffery
87a7e55f4SAndrew Jefferytitle: ASPEED SD/SDIO/MMC Controller
97a7e55f4SAndrew Jeffery
107a7e55f4SAndrew Jefferymaintainers:
117a7e55f4SAndrew Jeffery  - Andrew Jeffery <andrew@aj.id.au>
127a7e55f4SAndrew Jeffery  - Ryan Chen <ryanchen.aspeed@gmail.com>
137a7e55f4SAndrew Jeffery
147a7e55f4SAndrew Jefferydescription: |+
157a7e55f4SAndrew Jeffery  The ASPEED SD/SDIO/eMMC controller exposes two slots implementing the SDIO
167a7e55f4SAndrew Jeffery  Host Specification v2.00, with 1 or 4 bit data buses, or an 8 bit data bus if
177a7e55f4SAndrew Jeffery  only a single slot is enabled.
187a7e55f4SAndrew Jeffery
197a7e55f4SAndrew Jeffery  The two slots are supported by a common configuration area. As the SDHCIs for
207a7e55f4SAndrew Jeffery  the slots are dependent on the common configuration area, they are described
217a7e55f4SAndrew Jeffery  as child nodes.
227a7e55f4SAndrew Jeffery
237a7e55f4SAndrew Jefferyproperties:
247a7e55f4SAndrew Jeffery  compatible:
257a7e55f4SAndrew Jeffery    enum:
267a7e55f4SAndrew Jeffery      - aspeed,ast2400-sd-controller
277a7e55f4SAndrew Jeffery      - aspeed,ast2500-sd-controller
287a7e55f4SAndrew Jeffery      - aspeed,ast2600-sd-controller
297a7e55f4SAndrew Jeffery  reg:
307a7e55f4SAndrew Jeffery    maxItems: 1
317a7e55f4SAndrew Jeffery    description: Common configuration registers
327a7e55f4SAndrew Jeffery  "#address-cells":
337a7e55f4SAndrew Jeffery    const: 1
347a7e55f4SAndrew Jeffery  "#size-cells":
357a7e55f4SAndrew Jeffery    const: 1
367a7e55f4SAndrew Jeffery  ranges: true
377a7e55f4SAndrew Jeffery  clocks:
387a7e55f4SAndrew Jeffery    maxItems: 1
397a7e55f4SAndrew Jeffery    description: The SD/SDIO controller clock gate
407a7e55f4SAndrew Jeffery
417a7e55f4SAndrew JefferypatternProperties:
427a7e55f4SAndrew Jeffery  "^sdhci@[0-9a-f]+$":
437a7e55f4SAndrew Jeffery    type: object
443d21a460SRob Herring    $ref: mmc-controller.yaml
45*e62fc182SRob Herring    unevaluatedProperties: false
463d21a460SRob Herring
477a7e55f4SAndrew Jeffery    properties:
487a7e55f4SAndrew Jeffery      compatible:
497a7e55f4SAndrew Jeffery        enum:
507a7e55f4SAndrew Jeffery          - aspeed,ast2400-sdhci
517a7e55f4SAndrew Jeffery          - aspeed,ast2500-sdhci
527a7e55f4SAndrew Jeffery          - aspeed,ast2600-sdhci
537a7e55f4SAndrew Jeffery      reg:
547a7e55f4SAndrew Jeffery        maxItems: 1
557a7e55f4SAndrew Jeffery        description: The SDHCI registers
567a7e55f4SAndrew Jeffery      clocks:
577a7e55f4SAndrew Jeffery        maxItems: 1
587a7e55f4SAndrew Jeffery        description: The SD bus clock
597a7e55f4SAndrew Jeffery      interrupts:
607a7e55f4SAndrew Jeffery        maxItems: 1
617a7e55f4SAndrew Jeffery        description: The SD interrupt shared between both slots
627a7e55f4SAndrew Jeffery      sdhci,auto-cmd12:
637a7e55f4SAndrew Jeffery        type: boolean
647a7e55f4SAndrew Jeffery        description: Specifies that controller should use auto CMD12
657a7e55f4SAndrew Jeffery    required:
667a7e55f4SAndrew Jeffery      - compatible
677a7e55f4SAndrew Jeffery      - reg
687a7e55f4SAndrew Jeffery      - clocks
697a7e55f4SAndrew Jeffery      - interrupts
707a7e55f4SAndrew Jeffery
717a7e55f4SAndrew JefferyadditionalProperties: false
727a7e55f4SAndrew Jeffery
737a7e55f4SAndrew Jefferyrequired:
747a7e55f4SAndrew Jeffery  - compatible
757a7e55f4SAndrew Jeffery  - reg
767a7e55f4SAndrew Jeffery  - "#address-cells"
777a7e55f4SAndrew Jeffery  - "#size-cells"
787a7e55f4SAndrew Jeffery  - ranges
797a7e55f4SAndrew Jeffery  - clocks
807a7e55f4SAndrew Jeffery
817a7e55f4SAndrew Jefferyexamples:
827a7e55f4SAndrew Jeffery  - |
837a7e55f4SAndrew Jeffery    #include <dt-bindings/clock/aspeed-clock.h>
847a7e55f4SAndrew Jeffery    sdc@1e740000 {
857a7e55f4SAndrew Jeffery            compatible = "aspeed,ast2500-sd-controller";
867a7e55f4SAndrew Jeffery            reg = <0x1e740000 0x100>;
877a7e55f4SAndrew Jeffery            #address-cells = <1>;
887a7e55f4SAndrew Jeffery            #size-cells = <1>;
89f47fdb85SAndrew Jeffery            ranges = <0 0x1e740000 0x20000>;
907a7e55f4SAndrew Jeffery            clocks = <&syscon ASPEED_CLK_GATE_SDCLK>;
917a7e55f4SAndrew Jeffery
927a7e55f4SAndrew Jeffery            sdhci0: sdhci@100 {
937a7e55f4SAndrew Jeffery                    compatible = "aspeed,ast2500-sdhci";
947a7e55f4SAndrew Jeffery                    reg = <0x100 0x100>;
957a7e55f4SAndrew Jeffery                    interrupts = <26>;
967a7e55f4SAndrew Jeffery                    sdhci,auto-cmd12;
977a7e55f4SAndrew Jeffery                    clocks = <&syscon ASPEED_CLK_SDIO>;
987a7e55f4SAndrew Jeffery            };
997a7e55f4SAndrew Jeffery
1007a7e55f4SAndrew Jeffery            sdhci1: sdhci@200 {
1017a7e55f4SAndrew Jeffery                    compatible = "aspeed,ast2500-sdhci";
1027a7e55f4SAndrew Jeffery                    reg = <0x200 0x100>;
1037a7e55f4SAndrew Jeffery                    interrupts = <26>;
1047a7e55f4SAndrew Jeffery                    sdhci,auto-cmd12;
1057a7e55f4SAndrew Jeffery                    clocks = <&syscon ASPEED_CLK_SDIO>;
1067a7e55f4SAndrew Jeffery            };
1077a7e55f4SAndrew Jeffery    };
108