1*1eece23dSJohan Jonker# SPDX-License-Identifier: GPL-2.0 2*1eece23dSJohan Jonker%YAML 1.2 3*1eece23dSJohan Jonker--- 4*1eece23dSJohan Jonker$id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml# 5*1eece23dSJohan Jonker$schema: http://devicetree.org/meta-schemas/core.yaml# 6*1eece23dSJohan Jonker 7*1eece23dSJohan Jonkertitle: Rockchip designware mobile storage host controller device tree bindings 8*1eece23dSJohan Jonker 9*1eece23dSJohan Jonkerdescription: 10*1eece23dSJohan Jonker Rockchip uses the Synopsys designware mobile storage host controller 11*1eece23dSJohan Jonker to interface a SoC with storage medium such as eMMC or SD/MMC cards. 12*1eece23dSJohan Jonker This file documents the combined properties for the core Synopsys dw mshc 13*1eece23dSJohan Jonker controller that are not already included in the synopsys-dw-mshc-common.yaml 14*1eece23dSJohan Jonker file and the Rockchip specific extensions. 15*1eece23dSJohan Jonker 16*1eece23dSJohan JonkerallOf: 17*1eece23dSJohan Jonker - $ref: "synopsys-dw-mshc-common.yaml#" 18*1eece23dSJohan Jonker 19*1eece23dSJohan Jonkermaintainers: 20*1eece23dSJohan Jonker - Heiko Stuebner <heiko@sntech.de> 21*1eece23dSJohan Jonker 22*1eece23dSJohan Jonker# Everything else is described in the common file 23*1eece23dSJohan Jonkerproperties: 24*1eece23dSJohan Jonker compatible: 25*1eece23dSJohan Jonker oneOf: 26*1eece23dSJohan Jonker # for Rockchip RK2928 and before RK3288 27*1eece23dSJohan Jonker - const: rockchip,rk2928-dw-mshc 28*1eece23dSJohan Jonker # for Rockchip RK3288 29*1eece23dSJohan Jonker - const: rockchip,rk3288-dw-mshc 30*1eece23dSJohan Jonker - items: 31*1eece23dSJohan Jonker - enum: 32*1eece23dSJohan Jonker # for Rockchip PX30 33*1eece23dSJohan Jonker - rockchip,px30-dw-mshc 34*1eece23dSJohan Jonker # for Rockchip RK3036 35*1eece23dSJohan Jonker - rockchip,rk3036-dw-mshc 36*1eece23dSJohan Jonker # for Rockchip RK322x 37*1eece23dSJohan Jonker - rockchip,rk3228-dw-mshc 38*1eece23dSJohan Jonker # for Rockchip RK3328 39*1eece23dSJohan Jonker - rockchip,rk3328-dw-mshc 40*1eece23dSJohan Jonker # for Rockchip RK3368 41*1eece23dSJohan Jonker - rockchip,rk3368-dw-mshc 42*1eece23dSJohan Jonker # for Rockchip RK3399 43*1eece23dSJohan Jonker - rockchip,rk3399-dw-mshc 44*1eece23dSJohan Jonker # for Rockchip RV1108 45*1eece23dSJohan Jonker - rockchip,rv1108-dw-mshc 46*1eece23dSJohan Jonker - const: rockchip,rk3288-dw-mshc 47*1eece23dSJohan Jonker 48*1eece23dSJohan Jonker reg: 49*1eece23dSJohan Jonker maxItems: 1 50*1eece23dSJohan Jonker 51*1eece23dSJohan Jonker interrupts: 52*1eece23dSJohan Jonker maxItems: 1 53*1eece23dSJohan Jonker 54*1eece23dSJohan Jonker clocks: 55*1eece23dSJohan Jonker minItems: 2 56*1eece23dSJohan Jonker maxItems: 4 57*1eece23dSJohan Jonker description: 58*1eece23dSJohan Jonker Handle to "biu" and "ciu" clocks for the bus interface unit clock and 59*1eece23dSJohan Jonker the card interface unit clock. If "ciu-drive" and "ciu-sample" are 60*1eece23dSJohan Jonker specified in clock-names, it should also contain 61*1eece23dSJohan Jonker handles to these clocks. 62*1eece23dSJohan Jonker 63*1eece23dSJohan Jonker clock-names: 64*1eece23dSJohan Jonker minItems: 2 65*1eece23dSJohan Jonker items: 66*1eece23dSJohan Jonker - const: biu 67*1eece23dSJohan Jonker - const: ciu 68*1eece23dSJohan Jonker - const: ciu-drive 69*1eece23dSJohan Jonker - const: ciu-sample 70*1eece23dSJohan Jonker description: 71*1eece23dSJohan Jonker Apart from the clock-names "biu" and "ciu" two more clocks 72*1eece23dSJohan Jonker "ciu-drive" and "ciu-sample" are supported. They are used 73*1eece23dSJohan Jonker to control the clock phases, "ciu-sample" is required for tuning 74*1eece23dSJohan Jonker high speed modes. 75*1eece23dSJohan Jonker 76*1eece23dSJohan Jonker rockchip,default-sample-phase: 77*1eece23dSJohan Jonker allOf: 78*1eece23dSJohan Jonker - $ref: /schemas/types.yaml#/definitions/uint32 79*1eece23dSJohan Jonker minimum: 0 80*1eece23dSJohan Jonker maximum: 360 81*1eece23dSJohan Jonker default: 0 82*1eece23dSJohan Jonker description: 83*1eece23dSJohan Jonker The default phase to set "ciu-sample" at probing, 84*1eece23dSJohan Jonker low speeds or in case where all phases work at tuning time. 85*1eece23dSJohan Jonker If not specified 0 deg will be used. 86*1eece23dSJohan Jonker 87*1eece23dSJohan Jonker rockchip,desired-num-phases: 88*1eece23dSJohan Jonker allOf: 89*1eece23dSJohan Jonker - $ref: /schemas/types.yaml#/definitions/uint32 90*1eece23dSJohan Jonker minimum: 0 91*1eece23dSJohan Jonker maximum: 360 92*1eece23dSJohan Jonker default: 360 93*1eece23dSJohan Jonker description: 94*1eece23dSJohan Jonker The desired number of times that the host execute tuning when needed. 95*1eece23dSJohan Jonker If not specified, the host will do tuning for 360 times, 96*1eece23dSJohan Jonker namely tuning for each degree. 97*1eece23dSJohan Jonker 98*1eece23dSJohan Jonkerrequired: 99*1eece23dSJohan Jonker - compatible 100*1eece23dSJohan Jonker - reg 101*1eece23dSJohan Jonker - interrupts 102*1eece23dSJohan Jonker - clocks 103*1eece23dSJohan Jonker - clock-names 104*1eece23dSJohan Jonker 105*1eece23dSJohan Jonkerexamples: 106*1eece23dSJohan Jonker - | 107*1eece23dSJohan Jonker #include <dt-bindings/clock/rk3288-cru.h> 108*1eece23dSJohan Jonker #include <dt-bindings/interrupt-controller/arm-gic.h> 109*1eece23dSJohan Jonker #include <dt-bindings/interrupt-controller/irq.h> 110*1eece23dSJohan Jonker sdmmc: mmc@ff0c0000 { 111*1eece23dSJohan Jonker compatible = "rockchip,rk3288-dw-mshc"; 112*1eece23dSJohan Jonker reg = <0x0 0xff0c0000 0x0 0x4000>; 113*1eece23dSJohan Jonker interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; 114*1eece23dSJohan Jonker clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>, 115*1eece23dSJohan Jonker <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>; 116*1eece23dSJohan Jonker clock-names = "biu", "ciu", "ciu-drive", "ciu-sample"; 117*1eece23dSJohan Jonker resets = <&cru SRST_MMC0>; 118*1eece23dSJohan Jonker reset-names = "reset"; 119*1eece23dSJohan Jonker fifo-depth = <0x100>; 120*1eece23dSJohan Jonker max-frequency = <150000000>; 121*1eece23dSJohan Jonker }; 122*1eece23dSJohan Jonker 123*1eece23dSJohan Jonker... 124