rk3368 dts: add ddr timing node in rk3368.dtsi
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / dram / rk3368_dram_timing.txt
1 * rk3368 dram default timing is at arch/arm64/boot/dts/rk3368_dram_default_timing.dtsi
2
3 Required properties:
4 - compatible : Should be "rockchip,ddr-timing"
5 - dram_spd_bin : value is defined at include/dt-bindings/clock/ddr.h
6   it select ddr3 cl-trp-trcd type, default value "DDR3_DEFAULT".it must selected
7   according to "Speed Bin" in ddr3 datasheet, DO NOT use smaller "Speed Bin" than
8   ddr3 exactly is.
9
10 - sr_idle : configure the SR_IDLE value, defined the selfrefresh idle period,
11   memories are places into self-refresh mode if bus is idle for SR_IDLE*32 DFI
12   clocks (DFI clocks freq is half of dram's clocks), defaule value is "1"
13
14 - pd_idle : config the PD_IDLE value, defined the power-down idle period, memories
15   are places into power-down mode if bus is idle for PD_IDLE DFI clocks.
16
17 - dram_dll_disb_freq : it's defined the DDR3 dll bypass frequency in MHz (Mega Hz),
18   when ddr freq less than DRAM_DLL_DISB_FREQ, ddr3 dll will bypssed
19   note: if dll was bypassed, the odt also stop working.
20
21 - phy_dll_disb_freq : defined the PHY dll bypass frequency in MHz (Mega Hz),
22   when ddr freq less than DRAM_DLL_DISB_FREQ, phy dll will bypssed
23   note: phy dll and phy odt are independent
24
25 - dram_odt_disb_freq : defined the DDR3 and LPDDR3 odt disable frequency in
26   MHz (Mega Hz), when ddr frequency less then DRAM_ODT_DISB_FREQ, the DDR3
27   and LPDDR3 ODT are disabled.
28
29 - phy_odt_disb_freq : defined the PHY odt disable frequency in MHz (Mega Hz),
30   when ddr frequency less then PHY_ODT_DISB_FREQ, the PHY ODT are disabled.
31
32 - ddr3_drv : define the DDR3 driver stength in ohm, default value is DDR3_DS_40
33
34 - ddr3_odt : define the DDR3 ODT in ohm, default value is DDR3_ODT_120
35
36 - lpddr3_drv : define the lPDDR3 driver stength in ohm, default value is LP3_DS_34
37
38 - lpddr3_odt : define the LPDDR3 ODT in ohm, default value is LP3_ODT_240
39
40 - lpddr2_drv : define the LPDDR2 driver stength in ohm, default value is LP2_DS_34
41
42 - phy_clk_drv : define the phy clocks driver strength in ohm, default value is
43   PHY_RON_45ohm
44
45 - phy_cmd_drv : define the phy commands driver strength in ohm, default value is
46   PHY_RON_34ohm
47
48 - phy_dqs_drv : define the phy dqs and dq driver strength in ohm, default value is
49   PHY_RON_34ohm
50
51 - phy_odt : define the phy odt in ohm, default value isPHY_RTT_279ohm
52
53 the driver strength and odt value are defined at include/dt-bindings/dram/rockchip,rk3368.h
54
55 Example:
56
57 / {
58         ddr_timing: ddr_timing {
59                 compatible = "rockchip,ddr-timing";
60                 dram_spd_bin = <DDR3_DEFAULT>;
61                 sr_idle = <1>;
62                 pd_idle = <0x20>;
63                 dram_dll_disb_freq = <300>;
64                 phy_dll_disb_freq = <400>;
65                 dram_odt_disb_freq = <333>;
66                 phy_odt_disb_freq = <333>;
67                 ddr3_drv = <DDR3_DS_40ohm>;
68                 ddr3_odt = <DDR3_ODT_120ohm>;
69                 lpddr3_drv = <LP3_DS_34ohm>;
70                 lpddr3_odt = <LP3_ODT_240ohm>;
71                 lpddr2_drv = <LP2_DS_34ohm>;/*lpddr2 not supported odt*/
72                 phy_clk_drv = <PHY_RON_45ohm>;
73                 phy_cmd_drv = <PHY_RON_34ohm>;
74                 phy_dqs_drv = <PHY_RON_34ohm>;
75                 phy_odt = <PHY_RTT_279ohm>;
76         };
77 };