Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ec94453 authored by Aneesh V's avatar Aneesh V Committed by Greg Kroah-Hartman
Browse files

memory: emif: add basic infrastructure for EMIF driver



EMIF is an SDRAM controller used in various Texas Instruments
SoCs. EMIF supports, based on its revision, one or more of
LPDDR2/DDR2/DDR3 protocols.

Add the basic infrastructure for EMIF driver that includes
driver registration, probe, parsing of platform data etc.

Signed-off-by: default avatarAneesh V <aneesh@ti.com>
Reviewed-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: default avatarBenoit Cousson <b-cousson@ti.com>
[santosh.shilimkar@ti.com: Moved to drivers/memory from drivers/misc]
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c8b0906
Loading
Loading
Loading
Loading
+57 −0
Original line number Original line Diff line number Diff line
TI EMIF SDRAM Controller Driver:

Author
========
Aneesh V <aneesh@ti.com>

Location
============
driver/memory/emif.c

Supported SoCs:
===================
TI OMAP44xx
TI OMAP54xx

Menuconfig option:
==========================
Device Drivers
	Memory devices
		Texas Instruments EMIF driver

Description
===========
This driver is for the EMIF module available in Texas Instruments
SoCs. EMIF is an SDRAM controller that, based on its revision,
supports one or more of DDR2, DDR3, and LPDDR2 SDRAM protocols.
This driver takes care of only LPDDR2 memories presently. The
functions of the driver includes re-configuring AC timing
parameters and other settings during frequency, voltage and
temperature changes

Platform Data (see include/linux/platform_data/emif_plat.h):
=====================================================================
DDR device details and other board dependent and SoC dependent
information can be passed through platform data (struct emif_platform_data)
- DDR device details: 'struct ddr_device_info'
- Device AC timings: 'struct lpddr2_timings' and 'struct lpddr2_min_tck'
- Custom configurations: customizable policy options through
  'struct emif_custom_configs'
- IP revision
- PHY type

Interface to the external world:
================================
EMIF driver registers notifiers for voltage and frequency changes
affecting EMIF and takes appropriate actions when these are invoked.
- freq_pre_notify_handling()
- freq_post_notify_handling()
- volt_notify_handling()

Debugfs
========
The driver creates two debugfs entries per device.
- regcache_dump : dump of register values calculated and saved for all
  frequencies used so far.
- mr4 : last polled value of MR4 register in the LPDDR2 device. MR4
  indicates the current temperature level of the device.
+2 −0
Original line number Original line Diff line number Diff line
@@ -142,4 +142,6 @@ source "drivers/devfreq/Kconfig"


source "drivers/extcon/Kconfig"
source "drivers/extcon/Kconfig"


source "drivers/memory/Kconfig"

endmenu
endmenu
+1 −0
Original line number Original line Diff line number Diff line
@@ -135,3 +135,4 @@ obj-$(CONFIG_HYPERV) += hv/


obj-$(CONFIG_PM_DEVFREQ)	+= devfreq/
obj-$(CONFIG_PM_DEVFREQ)	+= devfreq/
obj-$(CONFIG_EXTCON)		+= extcon/
obj-$(CONFIG_EXTCON)		+= extcon/
obj-$(CONFIG_MEMORY)		+= memory/

drivers/memory/Kconfig

0 → 100644
+22 −0
Original line number Original line Diff line number Diff line
#
# Memory devices
#

menuconfig MEMORY
	bool "Memory Controller drivers"

if MEMORY

config TI_EMIF
	tristate "Texas Instruments EMIF driver"
	select DDR
	help
	  This driver is for the EMIF module available in Texas Instruments
	  SoCs. EMIF is an SDRAM controller that, based on its revision,
	  supports one or more of DDR2, DDR3, and LPDDR2 SDRAM protocols.
	  This driver takes care of only LPDDR2 memories presently. The
	  functions of the driver includes re-configuring AC timing
	  parameters and other settings during frequency, voltage and
	  temperature changes

endif
+5 −0
Original line number Original line Diff line number Diff line
#
# Makefile for memory devices
#

obj-$(CONFIG_TI_EMIF)		+= emif.o
Loading