xref: /OK3568_Linux_fs/u-boot/doc/device-tree-bindings/clock/rockchip,rk3288-dmc.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunRockchip Dynamic Memory Controller Driver
2*4882a593SmuzhiyunRequired properties:
3*4882a593Smuzhiyun- compatible: "rockchip,rk3288-dmc", "syscon"
4*4882a593Smuzhiyun- rockchip,cru: this driver should access cru regs, so need get cru here
5*4882a593Smuzhiyun- rockchip,grf: this driver should access grf regs, so need get grf here
6*4882a593Smuzhiyun- rockchip,pmu: this driver should access pmu regs, so need get pmu here
7*4882a593Smuzhiyun- rockchip,sgrf: this driver should access sgrf regs, so need get sgrf here
8*4882a593Smuzhiyun- rockchip,noc: this driver should access noc regs, so need get noc here
9*4882a593Smuzhiyun- reg: dynamic ram protocol controller(PCTL) address and phy controller(PHYCTL) address
10*4882a593Smuzhiyun- clock: must include clock specifiers corresponding to entries in the clock-names property.
11*4882a593Smuzhiyun- clock-output-names: from common clock binding to override the default output clock name
12*4882a593Smuzhiyun    Must contain
13*4882a593Smuzhiyun      pclk_ddrupctl0: support clock for access protocol controller registers of channel 0
14*4882a593Smuzhiyun      pclk_publ0: support clock for access phy controller registers of channel 0
15*4882a593Smuzhiyun      pclk_ddrupctl1: support clock for access protocol controller registers of channel 1
16*4882a593Smuzhiyun      pclk_publ1: support clock for access phy controller registers of channel 1
17*4882a593Smuzhiyun      arm_clk: for get arm frequency
18*4882a593Smuzhiyun-logic-supply: this driver should adjust VDD_LOGIC according to dmc frequency, so need get logic-supply here
19*4882a593Smuzhiyun-timings:
20*4882a593Smuzhiyun    Must contain
21*4882a593Smuzhiyun      rockchip,odt-disable-freq: if ddr clock frequency low than odt-disable-freq,this driver should disable DDR ODT
22*4882a593Smuzhiyun      rockchip,dll-disable-freq: if ddr clock frequency low than dll-disable-freq,this driver should disable DDR DLL
23*4882a593Smuzhiyun      rockchip,sr-enable-freq: if ddr clock frequency high than sr-enable-freq,this driver should enable the automatic self refresh function
24*4882a593Smuzhiyun      rockchip,pd-enable-freq: if ddr clock frequency high than pd-enable-freq,this driver should enable the automatic power down function
25*4882a593Smuzhiyun      rockchip,auto-self-refresh-cnt: Self Refresh idle period. Memories are placed into Self-Refresh mode if the NIF is idle in Access state for auto-self-refresh-cnt * 32 * n_clk cycles.The automatic self refresh function is disabled when auto-self-refresh-cnt=0.
26*4882a593Smuzhiyun      rockchip,auto-power-down-cnt: Power-down idle period. Memories are placed into power-down mode if the NIF is idle for auto-power-down-cnt n_clk cycles.The automatic power down function is disabled when auto-power-down-cnt=0.
27*4882a593Smuzhiyun      rockchip,ddr-speed-bin: DDR3 type,AC timing parameters from the memory data-sheet
28*4882a593Smuzhiyun        0.DDR3_800D (5-5-5)
29*4882a593Smuzhiyun        1.DDR3_800E (6-6-6)
30*4882a593Smuzhiyun        2.DDR3_1066E (6-6-6)
31*4882a593Smuzhiyun        3.DDR3_1066F (7-7-7)
32*4882a593Smuzhiyun        4.DDR3_1066G (8-8-8)
33*4882a593Smuzhiyun        5.DDR3_1333F (7-7-7)
34*4882a593Smuzhiyun        6.DDR3_1333G (8-8-8)
35*4882a593Smuzhiyun        7.DDR3_1333H (9-9-9)
36*4882a593Smuzhiyun        8.DDR3_1333J (10-10-10)
37*4882a593Smuzhiyun        9.DDR3_1600G (8-8-8)
38*4882a593Smuzhiyun        10.DDR3_1600H (9-9-9)
39*4882a593Smuzhiyun        11.DDR3_1600J (10-10-10)
40*4882a593Smuzhiyun        12.DDR3_1600K (11-11-11)
41*4882a593Smuzhiyun        13.DDR3_1866J (10-10-10)
42*4882a593Smuzhiyun        14.DDR3_1866K (11-11-11)
43*4882a593Smuzhiyun        15.DDR3_1866L (12-12-12)
44*4882a593Smuzhiyun        16.DDR3_1866M (13-13-13)
45*4882a593Smuzhiyun        17.DDR3_2133K (11-11-11)
46*4882a593Smuzhiyun        18.DDR3_2133L (12-12-12)
47*4882a593Smuzhiyun        19.DDR3_2133M (13-13-13)
48*4882a593Smuzhiyun        20.DDR3_2133N (14-14-14)
49*4882a593Smuzhiyun        21.DDR3_DEFAULT
50*4882a593Smuzhiyun      rockchip,trcd: tRCD,AC timing parameters from the memory data-sheet
51*4882a593Smuzhiyun      rockchip,trp: tRP,AC timing parameters from the memory data-sheet
52*4882a593Smuzhiyun-rockchip,num-channels: number of SDRAM channels (1 or 2)
53*4882a593Smuzhiyun-rockchip,pctl-timing: parameters for the SDRAM setup, in this order:
54*4882a593Smuzhiyun	togcnt1u
55*4882a593Smuzhiyun	tinit
56*4882a593Smuzhiyun	trsth
57*4882a593Smuzhiyun	togcnt100n
58*4882a593Smuzhiyun	trefi
59*4882a593Smuzhiyun	tmrd
60*4882a593Smuzhiyun	trfc
61*4882a593Smuzhiyun	trp
62*4882a593Smuzhiyun	trtw
63*4882a593Smuzhiyun	tal
64*4882a593Smuzhiyun	tcl
65*4882a593Smuzhiyun	tcwl
66*4882a593Smuzhiyun	tras
67*4882a593Smuzhiyun	trc
68*4882a593Smuzhiyun	trcd
69*4882a593Smuzhiyun	trrd
70*4882a593Smuzhiyun	trtp
71*4882a593Smuzhiyun	twr
72*4882a593Smuzhiyun	twtr
73*4882a593Smuzhiyun	texsr
74*4882a593Smuzhiyun	txp
75*4882a593Smuzhiyun	txpdll
76*4882a593Smuzhiyun	tzqcs
77*4882a593Smuzhiyun	tzqcsi
78*4882a593Smuzhiyun	tdqs
79*4882a593Smuzhiyun	tcksre
80*4882a593Smuzhiyun	tcksrx
81*4882a593Smuzhiyun	tcke
82*4882a593Smuzhiyun	tmod
83*4882a593Smuzhiyun	trstl
84*4882a593Smuzhiyun	tzqcl
85*4882a593Smuzhiyun	tmrr
86*4882a593Smuzhiyun	tckesr
87*4882a593Smuzhiyun	tdpd
88*4882a593Smuzhiyun-rockchip,phy-timing: PHY timing information in this order:
89*4882a593Smuzhiyun	dtpr0
90*4882a593Smuzhiyun	dtpr1
91*4882a593Smuzhiyun	dtpr2
92*4882a593Smuzhiyun	mr0..mr3
93*4882a593Smuzhiyun-rockchip,sdram-channel: SDRAM channel information, each 8 bits. Both channels
94*4882a593Smuzhiyunwill be set up the same. The parameters are in this order:
95*4882a593Smuzhiyun	rank
96*4882a593Smuzhiyun	col
97*4882a593Smuzhiyun	bk
98*4882a593Smuzhiyun	bw
99*4882a593Smuzhiyun	dbw
100*4882a593Smuzhiyun	row_3_4
101*4882a593Smuzhiyun	cs0_row
102*4882a593Smuzhiyun	cs1_row
103*4882a593Smuzhiyun- rockchip,sdram-params: SDRAM base parameters, in this order:
104*4882a593Smuzhiyun	NOC timing	- value for ddrtiming register
105*4882a593Smuzhiyun	NOC activate	- value for activate register
106*4882a593Smuzhiyun	ddrconf		- value for ddrconf register
107*4882a593Smuzhiyun	DDR frequency in MHz
108*4882a593Smuzhiyun	DRAM type (3=DDR3, 6=LPDDR3)
109*4882a593Smuzhiyun	stride		- stride value for soc_con2 register
110*4882a593Smuzhiyun	odt             - 1 to enable DDR ODT, 0 to disable
111*4882a593Smuzhiyun
112*4882a593SmuzhiyunExample:
113*4882a593Smuzhiyun	dmc: dmc@ff610000 {
114*4882a593Smuzhiyun		compatible = "rockchip,rk3288-dmc", "syscon";
115*4882a593Smuzhiyun		rockchip,cru = <&cru>;
116*4882a593Smuzhiyun		rockchip,grf = <&grf>;
117*4882a593Smuzhiyun		rockchip,pmu = <&pmu>;
118*4882a593Smuzhiyun		rockchip,sgrf = <&sgrf>;
119*4882a593Smuzhiyun		rockchip,noc = <&noc>;
120*4882a593Smuzhiyun		reg = <0xff610000 0x3fc
121*4882a593Smuzhiyun		       0xff620000 0x294
122*4882a593Smuzhiyun		       0xff630000 0x3fc
123*4882a593Smuzhiyun		       0xff640000 0x294>;
124*4882a593Smuzhiyun		clocks = <&cru PCLK_DDRUPCTL0>, <&cru PCLK_PUBL0>,
125*4882a593Smuzhiyun			 <&cru PCLK_DDRUPCTL1>, <&cru PCLK_PUBL1>,
126*4882a593Smuzhiyun			 <&cru ARMCLK>;
127*4882a593Smuzhiyun		clock-names = "pclk_ddrupctl0", "pclk_publ0",
128*4882a593Smuzhiyun			      "pclk_ddrupctl1", "pclk_publ1",
129*4882a593Smuzhiyun			      "arm_clk";
130*4882a593Smuzhiyun	};
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun	&dmc {
133*4882a593Smuzhiyun		logic-supply = <&vdd_logic>;
134*4882a593Smuzhiyun		timings {
135*4882a593Smuzhiyun			rockchip,odt-disable-freq = <333000000>;
136*4882a593Smuzhiyun			rockchip,dll-disable-freq = <333000000>;
137*4882a593Smuzhiyun			rockchip,sr-enable-freq = <333000000>;
138*4882a593Smuzhiyun			rockchip,pd-enable-freq = <666000000>;
139*4882a593Smuzhiyun			rockchip,auto-self-refresh-cnt = <0>;
140*4882a593Smuzhiyun			rockchip,auto-power-down-cnt = <64>;
141*4882a593Smuzhiyun			rockchip,ddr-speed-bin = <21>;
142*4882a593Smuzhiyun			rockchip,trcd = <10>;
143*4882a593Smuzhiyun			rockchip,trp = <10>;
144*4882a593Smuzhiyun		};
145*4882a593Smuzhiyun		rockchip,num-channels = <2>;
146*4882a593Smuzhiyun		rockchip,pctl-timing = <0x29a 0x1f4 0xc8 0x42 0x4e 0x4 0xea 0xa
147*4882a593Smuzhiyun			0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
148*4882a593Smuzhiyun			0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
149*4882a593Smuzhiyun			0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
150*4882a593Smuzhiyun			0x5 0x0>;
151*4882a593Smuzhiyun		rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
152*4882a593Smuzhiyun			0xa60 0x40 0x10 0x0>;
153*4882a593Smuzhiyun		rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xf 0xf>;
154*4882a593Smuzhiyun		rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
155*4882a593Smuzhiyun	};
156