15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25956d97fSEmmanuel Vadot%YAML 1.2 35956d97fSEmmanuel Vadot--- 45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/nvidia,tegra20-emc.yaml# 55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65956d97fSEmmanuel Vadot 75956d97fSEmmanuel Vadottitle: NVIDIA Tegra20 SoC External Memory Controller 85956d97fSEmmanuel Vadot 95956d97fSEmmanuel Vadotmaintainers: 105956d97fSEmmanuel Vadot - Dmitry Osipenko <digetx@gmail.com> 115956d97fSEmmanuel Vadot - Jon Hunter <jonathanh@nvidia.com> 125956d97fSEmmanuel Vadot - Thierry Reding <thierry.reding@gmail.com> 135956d97fSEmmanuel Vadot 145956d97fSEmmanuel Vadotdescription: | 155956d97fSEmmanuel Vadot The External Memory Controller (EMC) interfaces with the off-chip SDRAM to 165956d97fSEmmanuel Vadot service the request stream sent from Memory Controller. The EMC also has 175956d97fSEmmanuel Vadot various performance-affecting settings beyond the obvious SDRAM configuration 185956d97fSEmmanuel Vadot parameters and initialization settings. Tegra20 EMC supports multiple JEDEC 195956d97fSEmmanuel Vadot standard protocols: DDR1, LPDDR2 and DDR2. 205956d97fSEmmanuel Vadot 215956d97fSEmmanuel Vadotproperties: 225956d97fSEmmanuel Vadot compatible: 235956d97fSEmmanuel Vadot const: nvidia,tegra20-emc 245956d97fSEmmanuel Vadot 255956d97fSEmmanuel Vadot reg: 265956d97fSEmmanuel Vadot maxItems: 1 275956d97fSEmmanuel Vadot 285956d97fSEmmanuel Vadot clocks: 295956d97fSEmmanuel Vadot maxItems: 1 305956d97fSEmmanuel Vadot 315956d97fSEmmanuel Vadot interrupts: 325956d97fSEmmanuel Vadot maxItems: 1 335956d97fSEmmanuel Vadot 345956d97fSEmmanuel Vadot "#address-cells": 355956d97fSEmmanuel Vadot const: 1 365956d97fSEmmanuel Vadot 375956d97fSEmmanuel Vadot "#size-cells": 385956d97fSEmmanuel Vadot const: 0 395956d97fSEmmanuel Vadot 405956d97fSEmmanuel Vadot "#interconnect-cells": 415956d97fSEmmanuel Vadot const: 0 425956d97fSEmmanuel Vadot 435956d97fSEmmanuel Vadot nvidia,memory-controller: 445956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 455956d97fSEmmanuel Vadot description: 465956d97fSEmmanuel Vadot Phandle of the Memory Controller node. 475956d97fSEmmanuel Vadot 485956d97fSEmmanuel Vadot power-domains: 495956d97fSEmmanuel Vadot maxItems: 1 505956d97fSEmmanuel Vadot description: 515956d97fSEmmanuel Vadot Phandle of the SoC "core" power domain. 525956d97fSEmmanuel Vadot 535956d97fSEmmanuel Vadot operating-points-v2: 545956d97fSEmmanuel Vadot description: 555956d97fSEmmanuel Vadot Should contain freqs and voltages and opp-supported-hw property, which 565956d97fSEmmanuel Vadot is a bitfield indicating SoC process ID mask. 575956d97fSEmmanuel Vadot 585956d97fSEmmanuel Vadot nvidia,use-ram-code: 595956d97fSEmmanuel Vadot type: boolean 605956d97fSEmmanuel Vadot description: 615956d97fSEmmanuel Vadot If present, the emc-tables@ sub-nodes will be addressed. 625956d97fSEmmanuel Vadot 635956d97fSEmmanuel Vadot$defs: 645956d97fSEmmanuel Vadot emc-table: 655956d97fSEmmanuel Vadot type: object 665956d97fSEmmanuel Vadot properties: 675956d97fSEmmanuel Vadot compatible: 685956d97fSEmmanuel Vadot const: nvidia,tegra20-emc-table 695956d97fSEmmanuel Vadot 705956d97fSEmmanuel Vadot clock-frequency: 715956d97fSEmmanuel Vadot description: 725956d97fSEmmanuel Vadot Memory clock rate in kHz. 735956d97fSEmmanuel Vadot minimum: 1000 745956d97fSEmmanuel Vadot maximum: 900000 755956d97fSEmmanuel Vadot 765956d97fSEmmanuel Vadot reg: 775956d97fSEmmanuel Vadot maxItems: 1 785956d97fSEmmanuel Vadot description: 795956d97fSEmmanuel Vadot Either an opaque enumerator to tell different tables apart, or 805956d97fSEmmanuel Vadot the valid frequency for which the table should be used (in kHz). 815956d97fSEmmanuel Vadot 825956d97fSEmmanuel Vadot nvidia,emc-registers: 835956d97fSEmmanuel Vadot description: 845956d97fSEmmanuel Vadot EMC timing characterization data. These are the registers 855956d97fSEmmanuel Vadot (see section "15.4.1 EMC Registers" in the TRM) whose values 865956d97fSEmmanuel Vadot need to be specified, according to the board documentation. 875956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 885956d97fSEmmanuel Vadot items: 895956d97fSEmmanuel Vadot - description: EMC_RC 905956d97fSEmmanuel Vadot - description: EMC_RFC 915956d97fSEmmanuel Vadot - description: EMC_RAS 925956d97fSEmmanuel Vadot - description: EMC_RP 935956d97fSEmmanuel Vadot - description: EMC_R2W 945956d97fSEmmanuel Vadot - description: EMC_W2R 955956d97fSEmmanuel Vadot - description: EMC_R2P 965956d97fSEmmanuel Vadot - description: EMC_W2P 975956d97fSEmmanuel Vadot - description: EMC_RD_RCD 985956d97fSEmmanuel Vadot - description: EMC_WR_RCD 995956d97fSEmmanuel Vadot - description: EMC_RRD 1005956d97fSEmmanuel Vadot - description: EMC_REXT 1015956d97fSEmmanuel Vadot - description: EMC_WDV 1025956d97fSEmmanuel Vadot - description: EMC_QUSE 1035956d97fSEmmanuel Vadot - description: EMC_QRST 1045956d97fSEmmanuel Vadot - description: EMC_QSAFE 1055956d97fSEmmanuel Vadot - description: EMC_RDV 1065956d97fSEmmanuel Vadot - description: EMC_REFRESH 1075956d97fSEmmanuel Vadot - description: EMC_BURST_REFRESH_NUM 1085956d97fSEmmanuel Vadot - description: EMC_PDEX2WR 1095956d97fSEmmanuel Vadot - description: EMC_PDEX2RD 1105956d97fSEmmanuel Vadot - description: EMC_PCHG2PDEN 1115956d97fSEmmanuel Vadot - description: EMC_ACT2PDEN 1125956d97fSEmmanuel Vadot - description: EMC_AR2PDEN 1135956d97fSEmmanuel Vadot - description: EMC_RW2PDEN 1145956d97fSEmmanuel Vadot - description: EMC_TXSR 1155956d97fSEmmanuel Vadot - description: EMC_TCKE 1165956d97fSEmmanuel Vadot - description: EMC_TFAW 1175956d97fSEmmanuel Vadot - description: EMC_TRPAB 1185956d97fSEmmanuel Vadot - description: EMC_TCLKSTABLE 1195956d97fSEmmanuel Vadot - description: EMC_TCLKSTOP 1205956d97fSEmmanuel Vadot - description: EMC_TREFBW 1215956d97fSEmmanuel Vadot - description: EMC_QUSE_EXTRA 1225956d97fSEmmanuel Vadot - description: EMC_FBIO_CFG6 1235956d97fSEmmanuel Vadot - description: EMC_ODT_WRITE 1245956d97fSEmmanuel Vadot - description: EMC_ODT_READ 1255956d97fSEmmanuel Vadot - description: EMC_FBIO_CFG5 1265956d97fSEmmanuel Vadot - description: EMC_CFG_DIG_DLL 1275956d97fSEmmanuel Vadot - description: EMC_DLL_XFORM_DQS 1285956d97fSEmmanuel Vadot - description: EMC_DLL_XFORM_QUSE 1295956d97fSEmmanuel Vadot - description: EMC_ZCAL_REF_CNT 1305956d97fSEmmanuel Vadot - description: EMC_ZCAL_WAIT_CNT 1315956d97fSEmmanuel Vadot - description: EMC_AUTO_CAL_INTERVAL 1325956d97fSEmmanuel Vadot - description: EMC_CFG_CLKTRIM_0 1335956d97fSEmmanuel Vadot - description: EMC_CFG_CLKTRIM_1 1345956d97fSEmmanuel Vadot - description: EMC_CFG_CLKTRIM_2 1355956d97fSEmmanuel Vadot 1365956d97fSEmmanuel Vadot required: 1375956d97fSEmmanuel Vadot - clock-frequency 1385956d97fSEmmanuel Vadot - compatible 1395956d97fSEmmanuel Vadot - reg 1405956d97fSEmmanuel Vadot - nvidia,emc-registers 1415956d97fSEmmanuel Vadot 1425956d97fSEmmanuel Vadot additionalProperties: false 1435956d97fSEmmanuel Vadot 1445956d97fSEmmanuel VadotpatternProperties: 1455956d97fSEmmanuel Vadot "^emc-table@[0-9]+$": 1465956d97fSEmmanuel Vadot $ref: "#/$defs/emc-table" 1475956d97fSEmmanuel Vadot 148*01950c46SEmmanuel Vadot "^emc-tables@[a-f0-9-]+$": 1495956d97fSEmmanuel Vadot type: object 1505956d97fSEmmanuel Vadot properties: 1515956d97fSEmmanuel Vadot reg: 1525956d97fSEmmanuel Vadot maxItems: 1 1535956d97fSEmmanuel Vadot description: 1545956d97fSEmmanuel Vadot An opaque enumerator to tell different tables apart. 1555956d97fSEmmanuel Vadot 1565956d97fSEmmanuel Vadot nvidia,ram-code: 1575956d97fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1585956d97fSEmmanuel Vadot description: 1595956d97fSEmmanuel Vadot Value of RAM_CODE this timing set is used for. 1605956d97fSEmmanuel Vadot 1615956d97fSEmmanuel Vadot "#address-cells": 1625956d97fSEmmanuel Vadot const: 1 1635956d97fSEmmanuel Vadot 1645956d97fSEmmanuel Vadot "#size-cells": 1655956d97fSEmmanuel Vadot const: 0 1665956d97fSEmmanuel Vadot 1678cc087a1SEmmanuel Vadot lpddr2: 168f126890aSEmmanuel Vadot $ref: ddr/jedec,lpddr2.yaml# 1698cc087a1SEmmanuel Vadot type: object 1708cc087a1SEmmanuel Vadot 1715956d97fSEmmanuel Vadot patternProperties: 1725956d97fSEmmanuel Vadot "^emc-table@[0-9]+$": 1735956d97fSEmmanuel Vadot $ref: "#/$defs/emc-table" 1745956d97fSEmmanuel Vadot 1758cc087a1SEmmanuel Vadot oneOf: 1768cc087a1SEmmanuel Vadot - required: 1775956d97fSEmmanuel Vadot - nvidia,ram-code 1785956d97fSEmmanuel Vadot 1798cc087a1SEmmanuel Vadot - required: 1808cc087a1SEmmanuel Vadot - lpddr2 1818cc087a1SEmmanuel Vadot 1825956d97fSEmmanuel Vadot additionalProperties: false 1835956d97fSEmmanuel Vadot 1845956d97fSEmmanuel Vadotrequired: 1855956d97fSEmmanuel Vadot - compatible 1865956d97fSEmmanuel Vadot - reg 1875956d97fSEmmanuel Vadot - interrupts 1885956d97fSEmmanuel Vadot - clocks 1895956d97fSEmmanuel Vadot - nvidia,memory-controller 1905956d97fSEmmanuel Vadot - "#interconnect-cells" 1915956d97fSEmmanuel Vadot - operating-points-v2 1925956d97fSEmmanuel Vadot 1935956d97fSEmmanuel VadotadditionalProperties: false 1945956d97fSEmmanuel Vadot 1955956d97fSEmmanuel Vadotexamples: 1965956d97fSEmmanuel Vadot - | 1975956d97fSEmmanuel Vadot external-memory-controller@7000f400 { 1985956d97fSEmmanuel Vadot compatible = "nvidia,tegra20-emc"; 1995956d97fSEmmanuel Vadot reg = <0x7000f400 0x400>; 2005956d97fSEmmanuel Vadot interrupts = <0 78 4>; 2015956d97fSEmmanuel Vadot clocks = <&clock_controller 57>; 2025956d97fSEmmanuel Vadot 2035956d97fSEmmanuel Vadot nvidia,memory-controller = <&mc>; 2045956d97fSEmmanuel Vadot operating-points-v2 = <&dvfs_opp_table>; 2055956d97fSEmmanuel Vadot power-domains = <&domain>; 2065956d97fSEmmanuel Vadot 2075956d97fSEmmanuel Vadot #interconnect-cells = <0>; 2085956d97fSEmmanuel Vadot #address-cells = <1>; 2095956d97fSEmmanuel Vadot #size-cells = <0>; 2105956d97fSEmmanuel Vadot 2115956d97fSEmmanuel Vadot nvidia,use-ram-code; 2125956d97fSEmmanuel Vadot 2135956d97fSEmmanuel Vadot emc-tables@0 { 2145956d97fSEmmanuel Vadot nvidia,ram-code = <0>; 2155956d97fSEmmanuel Vadot reg = <0>; 2165956d97fSEmmanuel Vadot 2175956d97fSEmmanuel Vadot #address-cells = <1>; 2185956d97fSEmmanuel Vadot #size-cells = <0>; 2195956d97fSEmmanuel Vadot 2205956d97fSEmmanuel Vadot emc-table@333000 { 2215956d97fSEmmanuel Vadot reg = <333000>; 2225956d97fSEmmanuel Vadot compatible = "nvidia,tegra20-emc-table"; 2235956d97fSEmmanuel Vadot clock-frequency = <333000>; 2245956d97fSEmmanuel Vadot nvidia,emc-registers = <0x00000018 0x00000033 2255956d97fSEmmanuel Vadot 0x00000012 0x00000004 0x00000004 0x00000005 2265956d97fSEmmanuel Vadot 0x00000003 0x0000000c 0x00000006 0x00000006 2275956d97fSEmmanuel Vadot 0x00000003 0x00000001 0x00000004 0x00000005 2285956d97fSEmmanuel Vadot 0x00000004 0x00000009 0x0000000d 0x00000bff 2295956d97fSEmmanuel Vadot 0x00000000 0x00000003 0x00000003 0x00000006 2305956d97fSEmmanuel Vadot 0x00000006 0x00000001 0x00000011 0x000000c8 2315956d97fSEmmanuel Vadot 0x00000003 0x0000000e 0x00000007 0x00000008 2325956d97fSEmmanuel Vadot 0x00000002 0x00000000 0x00000000 0x00000002 2335956d97fSEmmanuel Vadot 0x00000000 0x00000000 0x00000083 0xf0440303 2345956d97fSEmmanuel Vadot 0x007fe010 0x00001414 0x00000000 0x00000000 2355956d97fSEmmanuel Vadot 0x00000000 0x00000000 0x00000000 0x00000000>; 2365956d97fSEmmanuel Vadot }; 2375956d97fSEmmanuel Vadot }; 2388cc087a1SEmmanuel Vadot 2398cc087a1SEmmanuel Vadot emc-tables@1 { 2408cc087a1SEmmanuel Vadot reg = <1>; 2418cc087a1SEmmanuel Vadot 2428cc087a1SEmmanuel Vadot lpddr2 { 2438cc087a1SEmmanuel Vadot compatible = "elpida,B8132B2PB-6D-F", "jedec,lpddr2-s4"; 2448cc087a1SEmmanuel Vadot revision-id1 = <1>; 2458cc087a1SEmmanuel Vadot density = <2048>; 2468cc087a1SEmmanuel Vadot io-width = <16>; 2478cc087a1SEmmanuel Vadot }; 2488cc087a1SEmmanuel Vadot }; 2495956d97fSEmmanuel Vadot }; 250