162306a36Sopenharmony_ci* EMIF family of TI SDRAM controllers
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciEMIF - External Memory Interface - is an SDRAM controller used in
462306a36Sopenharmony_ciTI SoCs. EMIF supports, based on the IP revision, one or more of
562306a36Sopenharmony_ciDDR2/DDR3/LPDDR2 protocols. This binding describes a given instance
662306a36Sopenharmony_ciof the EMIF IP and memory parts attached to it. Certain revisions
762306a36Sopenharmony_ciof the EMIF controller also contain optional ECC support, which
862306a36Sopenharmony_cicorrects one bit errors and detects two bit errors.
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciRequired properties:
1162306a36Sopenharmony_ci- compatible	: Should be of the form "ti,emif-<ip-rev>" where <ip-rev>
1262306a36Sopenharmony_ci  is the IP revision of the specific EMIF instance. For newer controllers,
1362306a36Sopenharmony_ci  compatible should be one of the following:
1462306a36Sopenharmony_ci  	     "ti,emif-am3352"
1562306a36Sopenharmony_ci	     "ti,emif-am4372"
1662306a36Sopenharmony_ci	     "ti,emif-dra7xx"
1762306a36Sopenharmony_ci	     "ti,emif-keystone"
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci- phy-type	: <u32> indicating the DDR phy type. Following are the
2062306a36Sopenharmony_ci  allowed values
2162306a36Sopenharmony_ci  <1>	: Attila PHY
2262306a36Sopenharmony_ci  <2>	: Intelli PHY
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci- device-handle	: phandle to a "lpddr2" node representing the memory part
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci- ti,hwmods	: For TI hwmods processing and omap device creation
2762306a36Sopenharmony_ci  the value shall be "emif<n>" where <n> is the number of the EMIF
2862306a36Sopenharmony_ci  instance with base 1.
2962306a36Sopenharmony_ci- interrupts	: interrupt used by the controller
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciRequired only for "ti,emif-am3352" and "ti,emif-am4372":
3262306a36Sopenharmony_ci- sram			: Phandles for generic sram driver nodes,
3362306a36Sopenharmony_ci  first should be type 'protect-exec' for the driver to use to copy
3462306a36Sopenharmony_ci  and run PM functions, second should be regular pool to be used for
3562306a36Sopenharmony_ci  data region for code. See Documentation/devicetree/bindings/sram/sram.yaml
3662306a36Sopenharmony_ci  for more details.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciOptional properties:
3962306a36Sopenharmony_ci- cs1-used		: Have this property if CS1 of this EMIF
4062306a36Sopenharmony_ci  instance has a memory part attached to it. If there is a memory
4162306a36Sopenharmony_ci  part attached to CS1, it should be the same type as the one on CS0,
4262306a36Sopenharmony_ci  so there is no need to give the details of this memory part.
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci- cal-resistor-per-cs	: Have this property if the board has one
4562306a36Sopenharmony_ci  calibration resistor per chip-select.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci- hw-caps-read-idle-ctrl: Have this property if the controller
4862306a36Sopenharmony_ci  supports read idle window programming
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ci- hw-caps-dll-calib-ctrl: Have this property if the controller
5162306a36Sopenharmony_ci  supports dll calibration control
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci- hw-caps-ll-interface	: Have this property if the controller
5462306a36Sopenharmony_ci  has a low latency interface and corresponding interrupt events
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci- hw-caps-temp-alert	: Have this property if the controller
5762306a36Sopenharmony_ci  has capability for generating SDRAM temperature alerts
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci-Examples:
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ciemif1: emif@4c000000 {
6262306a36Sopenharmony_ci	compatible	= "ti,emif-4d";
6362306a36Sopenharmony_ci	ti,hwmods	= "emif2";
6462306a36Sopenharmony_ci	phy-type	= <1>;
6562306a36Sopenharmony_ci	device-handle	= <&elpida_ECB240ABACN>;
6662306a36Sopenharmony_ci	cs1-used;
6762306a36Sopenharmony_ci	hw-caps-read-idle-ctrl;
6862306a36Sopenharmony_ci	hw-caps-ll-interface;
6962306a36Sopenharmony_ci	hw-caps-temp-alert;
7062306a36Sopenharmony_ci};
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci/* From am33xx.dtsi */
7362306a36Sopenharmony_ciemif: emif@4c000000 {
7462306a36Sopenharmony_ci        compatible = "ti,emif-am3352";
7562306a36Sopenharmony_ci        reg =   <0x4C000000 0x1000>;
7662306a36Sopenharmony_ci        sram = <&pm_sram_code
7762306a36Sopenharmony_ci                &pm_sram_data>;
7862306a36Sopenharmony_ci};
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciemif1: emif@4c000000 {
8162306a36Sopenharmony_ci	compatible = "ti,emif-dra7xx";
8262306a36Sopenharmony_ci	reg = <0x4c000000 0x200>;
8362306a36Sopenharmony_ci	interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
8462306a36Sopenharmony_ci};
85