11eece23dSJohan Jonker# SPDX-License-Identifier: GPL-2.0
21eece23dSJohan Jonker%YAML 1.2
31eece23dSJohan Jonker---
41eece23dSJohan Jonker$id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
51eece23dSJohan Jonker$schema: http://devicetree.org/meta-schemas/core.yaml#
61eece23dSJohan Jonker
7dd3cb467SAndrew Lunntitle: Rockchip designware mobile storage host controller
81eece23dSJohan Jonker
91eece23dSJohan Jonkerdescription:
101eece23dSJohan Jonker  Rockchip uses the Synopsys designware mobile storage host controller
111eece23dSJohan Jonker  to interface a SoC with storage medium such as eMMC or SD/MMC cards.
121eece23dSJohan Jonker  This file documents the combined properties for the core Synopsys dw mshc
131eece23dSJohan Jonker  controller that are not already included in the synopsys-dw-mshc-common.yaml
141eece23dSJohan Jonker  file and the Rockchip specific extensions.
151eece23dSJohan Jonker
161eece23dSJohan JonkerallOf:
171e52a7e6SKrzysztof Kozlowski  - $ref: synopsys-dw-mshc-common.yaml#
181eece23dSJohan Jonker
191eece23dSJohan Jonkermaintainers:
201eece23dSJohan Jonker  - Heiko Stuebner <heiko@sntech.de>
211eece23dSJohan Jonker
221eece23dSJohan Jonker# Everything else is described in the common file
231eece23dSJohan Jonkerproperties:
241eece23dSJohan Jonker  compatible:
251eece23dSJohan Jonker    oneOf:
261eece23dSJohan Jonker      # for Rockchip RK2928 and before RK3288
271eece23dSJohan Jonker      - const: rockchip,rk2928-dw-mshc
281eece23dSJohan Jonker      # for Rockchip RK3288
291eece23dSJohan Jonker      - const: rockchip,rk3288-dw-mshc
301eece23dSJohan Jonker      - items:
311eece23dSJohan Jonker          - enum:
321eece23dSJohan Jonker              - rockchip,px30-dw-mshc
338931acceSAndreas Färber              - rockchip,rk1808-dw-mshc
341eece23dSJohan Jonker              - rockchip,rk3036-dw-mshc
35bef82870SJohan Jonker              - rockchip,rk3128-dw-mshc
361eece23dSJohan Jonker              - rockchip,rk3228-dw-mshc
37c389b003SJohan Jonker              - rockchip,rk3308-dw-mshc
381eece23dSJohan Jonker              - rockchip,rk3328-dw-mshc
391eece23dSJohan Jonker              - rockchip,rk3368-dw-mshc
401eece23dSJohan Jonker              - rockchip,rk3399-dw-mshc
41873e9088SLiang Chen              - rockchip,rk3568-dw-mshc
42*f613feecSLucas Tanure              - rockchip,rk3588-dw-mshc
431eece23dSJohan Jonker              - rockchip,rv1108-dw-mshc
44d2f35ed0SJagan Teki              - rockchip,rv1126-dw-mshc
451eece23dSJohan Jonker          - const: rockchip,rk3288-dw-mshc
461eece23dSJohan Jonker
471eece23dSJohan Jonker  reg:
481eece23dSJohan Jonker    maxItems: 1
491eece23dSJohan Jonker
501eece23dSJohan Jonker  interrupts:
511eece23dSJohan Jonker    maxItems: 1
521eece23dSJohan Jonker
531eece23dSJohan Jonker  clocks:
541eece23dSJohan Jonker    minItems: 2
551eece23dSJohan Jonker    maxItems: 4
561eece23dSJohan Jonker    description:
571eece23dSJohan Jonker      Handle to "biu" and "ciu" clocks for the bus interface unit clock and
581eece23dSJohan Jonker      the card interface unit clock. If "ciu-drive" and "ciu-sample" are
591eece23dSJohan Jonker      specified in clock-names, it should also contain
601eece23dSJohan Jonker      handles to these clocks.
611eece23dSJohan Jonker
621eece23dSJohan Jonker  clock-names:
631eece23dSJohan Jonker    minItems: 2
641eece23dSJohan Jonker    items:
651eece23dSJohan Jonker      - const: biu
661eece23dSJohan Jonker      - const: ciu
671eece23dSJohan Jonker      - const: ciu-drive
681eece23dSJohan Jonker      - const: ciu-sample
691eece23dSJohan Jonker    description:
701eece23dSJohan Jonker      Apart from the clock-names "biu" and "ciu" two more clocks
711eece23dSJohan Jonker      "ciu-drive" and "ciu-sample" are supported. They are used
721eece23dSJohan Jonker      to control the clock phases, "ciu-sample" is required for tuning
731eece23dSJohan Jonker      high speed modes.
741eece23dSJohan Jonker
750b278ea2SJagan Teki  power-domains:
760b278ea2SJagan Teki    maxItems: 1
770b278ea2SJagan Teki
781eece23dSJohan Jonker  rockchip,default-sample-phase:
793d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
801eece23dSJohan Jonker    minimum: 0
811eece23dSJohan Jonker    maximum: 360
821eece23dSJohan Jonker    default: 0
831eece23dSJohan Jonker    description:
841eece23dSJohan Jonker      The default phase to set "ciu-sample" at probing,
851eece23dSJohan Jonker      low speeds or in case where all phases work at tuning time.
861eece23dSJohan Jonker      If not specified 0 deg will be used.
871eece23dSJohan Jonker
881eece23dSJohan Jonker  rockchip,desired-num-phases:
893d21a460SRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
901eece23dSJohan Jonker    minimum: 0
911eece23dSJohan Jonker    maximum: 360
921eece23dSJohan Jonker    default: 360
931eece23dSJohan Jonker    description:
941eece23dSJohan Jonker      The desired number of times that the host execute tuning when needed.
951eece23dSJohan Jonker      If not specified, the host will do tuning for 360 times,
961eece23dSJohan Jonker      namely tuning for each degree.
971eece23dSJohan Jonker
981eece23dSJohan Jonkerrequired:
991eece23dSJohan Jonker  - compatible
1001eece23dSJohan Jonker  - reg
1011eece23dSJohan Jonker  - interrupts
1021eece23dSJohan Jonker  - clocks
1031eece23dSJohan Jonker  - clock-names
1041eece23dSJohan Jonker
1056fdc6e23SRob HerringunevaluatedProperties: false
1066fdc6e23SRob Herring
1071eece23dSJohan Jonkerexamples:
1081eece23dSJohan Jonker  - |
1091eece23dSJohan Jonker    #include <dt-bindings/clock/rk3288-cru.h>
1101eece23dSJohan Jonker    #include <dt-bindings/interrupt-controller/arm-gic.h>
1111eece23dSJohan Jonker    #include <dt-bindings/interrupt-controller/irq.h>
1121eece23dSJohan Jonker    sdmmc: mmc@ff0c0000 {
1131eece23dSJohan Jonker      compatible = "rockchip,rk3288-dw-mshc";
114fba56184SRob Herring      reg = <0xff0c0000 0x4000>;
1151eece23dSJohan Jonker      interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
1161eece23dSJohan Jonker      clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
1171eece23dSJohan Jonker               <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
1181eece23dSJohan Jonker      clock-names = "biu", "ciu", "ciu-drive", "ciu-sample";
1191eece23dSJohan Jonker      resets = <&cru SRST_MMC0>;
1201eece23dSJohan Jonker      reset-names = "reset";
1211eece23dSJohan Jonker      fifo-depth = <0x100>;
1221eece23dSJohan Jonker      max-frequency = <150000000>;
1231eece23dSJohan Jonker    };
1241eece23dSJohan Jonker
1251eece23dSJohan Jonker...
126