^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) TI EMIF SDRAM Controller Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) Author
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) ======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) Aneesh V <aneesh@ti.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) Location
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) ========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) driver/memory/emif.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) Supported SoCs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) ===============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) TI OMAP44xx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) TI OMAP54xx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) Menuconfig option:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) ==================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Device Drivers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) Memory devices
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) Texas Instruments EMIF driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) ===========
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) This driver is for the EMIF module available in Texas Instruments
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) SoCs. EMIF is an SDRAM controller that, based on its revision,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) supports one or more of DDR2, DDR3, and LPDDR2 SDRAM protocols.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) This driver takes care of only LPDDR2 memories presently. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) functions of the driver includes re-configuring AC timing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) parameters and other settings during frequency, voltage and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) temperature changes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) Platform Data (see include/linux/platform_data/emif_plat.h)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) ===========================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) DDR device details and other board dependent and SoC dependent
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) information can be passed through platform data (struct emif_platform_data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - DDR device details: 'struct ddr_device_info'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) - Device AC timings: 'struct lpddr2_timings' and 'struct lpddr2_min_tck'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - Custom configurations: customizable policy options through
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 'struct emif_custom_configs'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - IP revision
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) - PHY type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) Interface to the external world
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) EMIF driver registers notifiers for voltage and frequency changes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) affecting EMIF and takes appropriate actions when these are invoked.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - freq_pre_notify_handling()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - freq_post_notify_handling()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) - volt_notify_handling()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) Debugfs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) =======
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) The driver creates two debugfs entries per device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) - regcache_dump : dump of register values calculated and saved for all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) frequencies used so far.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) - mr4 : last polled value of MR4 register in the LPDDR2 device. MR4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) indicates the current temperature level of the device.