xref: /OK3568_Linux_fs/kernel/Documentation/driver-api/memory-devices/ti-emif.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun===============================
4*4882a593SmuzhiyunTI EMIF SDRAM Controller Driver
5*4882a593Smuzhiyun===============================
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunAuthor
8*4882a593Smuzhiyun======
9*4882a593SmuzhiyunAneesh V <aneesh@ti.com>
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunLocation
12*4882a593Smuzhiyun========
13*4882a593Smuzhiyundriver/memory/emif.c
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunSupported SoCs:
16*4882a593Smuzhiyun===============
17*4882a593SmuzhiyunTI OMAP44xx
18*4882a593SmuzhiyunTI OMAP54xx
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunMenuconfig option:
21*4882a593Smuzhiyun==================
22*4882a593SmuzhiyunDevice Drivers
23*4882a593Smuzhiyun	Memory devices
24*4882a593Smuzhiyun		Texas Instruments EMIF driver
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunDescription
27*4882a593Smuzhiyun===========
28*4882a593SmuzhiyunThis driver is for the EMIF module available in Texas Instruments
29*4882a593SmuzhiyunSoCs. EMIF is an SDRAM controller that, based on its revision,
30*4882a593Smuzhiyunsupports one or more of DDR2, DDR3, and LPDDR2 SDRAM protocols.
31*4882a593SmuzhiyunThis driver takes care of only LPDDR2 memories presently. The
32*4882a593Smuzhiyunfunctions of the driver includes re-configuring AC timing
33*4882a593Smuzhiyunparameters and other settings during frequency, voltage and
34*4882a593Smuzhiyuntemperature changes
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunPlatform Data (see include/linux/platform_data/emif_plat.h)
37*4882a593Smuzhiyun===========================================================
38*4882a593SmuzhiyunDDR device details and other board dependent and SoC dependent
39*4882a593Smuzhiyuninformation can be passed through platform data (struct emif_platform_data)
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun- DDR device details: 'struct ddr_device_info'
42*4882a593Smuzhiyun- Device AC timings: 'struct lpddr2_timings' and 'struct lpddr2_min_tck'
43*4882a593Smuzhiyun- Custom configurations: customizable policy options through
44*4882a593Smuzhiyun  'struct emif_custom_configs'
45*4882a593Smuzhiyun- IP revision
46*4882a593Smuzhiyun- PHY type
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunInterface to the external world
49*4882a593Smuzhiyun===============================
50*4882a593SmuzhiyunEMIF driver registers notifiers for voltage and frequency changes
51*4882a593Smuzhiyunaffecting EMIF and takes appropriate actions when these are invoked.
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun- freq_pre_notify_handling()
54*4882a593Smuzhiyun- freq_post_notify_handling()
55*4882a593Smuzhiyun- volt_notify_handling()
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunDebugfs
58*4882a593Smuzhiyun=======
59*4882a593SmuzhiyunThe driver creates two debugfs entries per device.
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun- regcache_dump : dump of register values calculated and saved for all
62*4882a593Smuzhiyun  frequencies used so far.
63*4882a593Smuzhiyun- mr4 : last polled value of MR4 register in the LPDDR2 device. MR4
64*4882a593Smuzhiyun  indicates the current temperature level of the device.
65