mediatek: backport upstream mediatek patches
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.14 / 0142-mmc-dt-bindings-Add-reg-source_cg-latch-ck-for-Media.patch
1 From 9ff279fef1a47a152993bf23f8d75fd233c27015 Mon Sep 17 00:00:00 2001
2 From: Chaotian Jing <chaotian.jing@mediatek.com>
3 Date: Mon, 16 Oct 2017 09:46:28 +0800
4 Subject: [PATCH 142/224] mmc: dt-bindings: Add reg/source_cg/latch-ck for
5 Mediatek MMC bindings
6
7 Change the comptiable for support of multi-platform
8 Make compatible explicit, as MMC host of mt8173 has difference with
9 mt8135(mt8173 supports hs400 and hs400_tune),so that need separate
10 mt8173/mt8135 compatible name.
11 Add description for reg
12 Add description for source_cg
13 Add description for mediatek,latch-ck
14 Note that source_cg and mediatek,latch-ck are optional for some projects,
15 eg, MT2701 do not have source_cg, and MT2712 do not need
16 mediatek,latch-ck
17
18 Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
19 Acked-by: Rob Herring <robh@kernel.org>
20 Tested-by: Sean Wang <sean.wang@mediatek.com>
21 Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
22 ---
23 Documentation/devicetree/bindings/mmc/mtk-sd.txt | 18 +++++++++++++++---
24 1 file changed, 15 insertions(+), 3 deletions(-)
25
26 diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
27 index 4182ea36ca5b..72d2a734ab85 100644
28 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
29 +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
30 @@ -7,10 +7,18 @@ This file documents differences between the core properties in mmc.txt
31 and the properties used by the msdc driver.
32
33 Required properties:
34 -- compatible: Should be "mediatek,mt8173-mmc","mediatek,mt8135-mmc"
35 +- compatible: value should be either of the following.
36 + "mediatek,mt8135-mmc": for mmc host ip compatible with mt8135
37 + "mediatek,mt8173-mmc": for mmc host ip compatible with mt8173
38 + "mediatek,mt2701-mmc": for mmc host ip compatible with mt2701
39 + "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712
40 +- reg: physical base address of the controller and length
41 - interrupts: Should contain MSDC interrupt number
42 -- clocks: MSDC source clock, HCLK
43 -- clock-names: "source", "hclk"
44 +- clocks: Should contain phandle for the clock feeding the MMC controller
45 +- clock-names: Should contain the following:
46 + "source" - source clock (required)
47 + "hclk" - HCLK which used for host (required)
48 + "source_cg" - independent source clock gate (required for MT2712)
49 - pinctrl-names: should be "default", "state_uhs"
50 - pinctrl-0: should contain default/high speed pin ctrl
51 - pinctrl-1: should contain uhs mode pin ctrl
52 @@ -30,6 +38,10 @@ Optional properties:
53 - mediatek,hs400-cmd-resp-sel-rising: HS400 command response sample selection
54 If present,HS400 command responses are sampled on rising edges.
55 If not present,HS400 command responses are sampled on falling edges.
56 +- mediatek,latch-ck: Some SoCs do not support enhance_rx, need set correct latch-ck to avoid data crc
57 + error caused by stop clock(fifo full)
58 + Valid range = [0:0x7]. if not present, default value is 0.
59 + applied to compatible "mediatek,mt2701-mmc".
60
61 Examples:
62 mmc0: mmc@11230000 {
63 --
64 2.11.0
65