xref: /linux/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,sdram-channel.yaml (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
16ab3581aSClément Le Goffic# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26ab3581aSClément Le Goffic%YAML 1.2
36ab3581aSClément Le Goffic---
46ab3581aSClément Le Goffic$id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,sdram-channel.yaml#
56ab3581aSClément Le Goffic$schema: http://devicetree.org/meta-schemas/core.yaml#
66ab3581aSClément Le Goffic
76ab3581aSClément Le Goffictitle: SDRAM channel with chip/rank topology description
86ab3581aSClément Le Goffic
96ab3581aSClément Le Gofficdescription:
106ab3581aSClément Le Goffic  A memory channel of SDRAM memory like DDR SDRAM or LPDDR SDRAM is a completely
116ab3581aSClément Le Goffic  independent set of pins (DQ, CA, CS, CK, etc.) that connect one or more memory
126ab3581aSClément Le Goffic  chips to a host system. The main purpose of this node is to overall memory
136ab3581aSClément Le Goffic  topology of the system, including the amount of individual memory chips and
146ab3581aSClément Le Goffic  the ranks per chip.
156ab3581aSClément Le Goffic
166ab3581aSClément Le Gofficmaintainers:
176ab3581aSClément Le Goffic  - Julius Werner <jwerner@chromium.org>
186ab3581aSClément Le Goffic
196ab3581aSClément Le Gofficproperties:
20*9805f2cfSClément Le Goffic  $nodename:
21*9805f2cfSClément Le Goffic    pattern: "sdram-channel-[0-9]+$"
22*9805f2cfSClément Le Goffic
236ab3581aSClément Le Goffic  compatible:
246ab3581aSClément Le Goffic    enum:
2536ecc834SClément Le Goffic      - jedec,ddr4-channel
266ab3581aSClément Le Goffic      - jedec,lpddr2-channel
276ab3581aSClément Le Goffic      - jedec,lpddr3-channel
286ab3581aSClément Le Goffic      - jedec,lpddr4-channel
296ab3581aSClément Le Goffic      - jedec,lpddr5-channel
306ab3581aSClément Le Goffic
316ab3581aSClément Le Goffic  io-width:
326ab3581aSClément Le Goffic    description:
336ab3581aSClément Le Goffic      The number of DQ pins in the channel. If this number is different
346ab3581aSClément Le Goffic      from (a multiple of) the io-width of the SDRAM chip, that means that
356ab3581aSClément Le Goffic      multiple instances of that type of chip are wired in parallel on this
366ab3581aSClément Le Goffic      channel (with the channel's DQ pins split up between the different
376ab3581aSClément Le Goffic      chips, and the CA, CS, etc. pins of the different chips all shorted
386ab3581aSClément Le Goffic      together).  This means that the total physical memory controlled by a
396ab3581aSClément Le Goffic      channel is equal to the sum of the densities of each rank on the
406ab3581aSClément Le Goffic      connected SDRAM chip, times the io-width of the channel divided by
416ab3581aSClément Le Goffic      the io-width of the SDRAM chip.
426ab3581aSClément Le Goffic    enum:
436ab3581aSClément Le Goffic      - 8
446ab3581aSClément Le Goffic      - 16
456ab3581aSClément Le Goffic      - 32
466ab3581aSClément Le Goffic      - 64
476ab3581aSClément Le Goffic      - 128
486ab3581aSClément Le Goffic
496ab3581aSClément Le Goffic  "#address-cells":
506ab3581aSClément Le Goffic    const: 1
516ab3581aSClément Le Goffic
526ab3581aSClément Le Goffic  "#size-cells":
536ab3581aSClément Le Goffic    const: 0
546ab3581aSClément Le Goffic
556ab3581aSClément Le GofficpatternProperties:
566ab3581aSClément Le Goffic  "^rank@[0-9]+$":
576ab3581aSClément Le Goffic    type: object
586ab3581aSClément Le Goffic    description:
596ab3581aSClément Le Goffic      Each physical SDRAM chip may have one or more ranks. Ranks are
606ab3581aSClément Le Goffic      internal but fully independent sub-units of the chip. Each SDRAM bus
616ab3581aSClément Le Goffic      transaction on the channel targets exactly one rank, based on the
626ab3581aSClément Le Goffic      state of the CS pins. Different ranks may have different densities and
636ab3581aSClément Le Goffic      timing requirements.
646ab3581aSClément Le Goffic    required:
656ab3581aSClément Le Goffic      - reg
666ab3581aSClément Le Goffic
676ab3581aSClément Le GofficallOf:
686ab3581aSClément Le Goffic  - if:
696ab3581aSClément Le Goffic      properties:
706ab3581aSClément Le Goffic        compatible:
716ab3581aSClément Le Goffic          contains:
7236ecc834SClément Le Goffic            const: jedec,ddr4-channel
7336ecc834SClément Le Goffic    then:
7436ecc834SClément Le Goffic      patternProperties:
7536ecc834SClément Le Goffic        "^rank@[0-9]+$":
7636ecc834SClément Le Goffic          $ref: /schemas/memory-controllers/ddr/jedec,ddr4.yaml#
7736ecc834SClément Le Goffic  - if:
7836ecc834SClément Le Goffic      properties:
7936ecc834SClément Le Goffic        compatible:
8036ecc834SClément Le Goffic          contains:
816ab3581aSClément Le Goffic            const: jedec,lpddr2-channel
826ab3581aSClément Le Goffic    then:
836ab3581aSClément Le Goffic      patternProperties:
846ab3581aSClément Le Goffic        "^rank@[0-9]+$":
856ab3581aSClément Le Goffic          $ref: /schemas/memory-controllers/ddr/jedec,lpddr2.yaml#
866ab3581aSClément Le Goffic  - if:
876ab3581aSClément Le Goffic      properties:
886ab3581aSClément Le Goffic        compatible:
896ab3581aSClément Le Goffic          contains:
906ab3581aSClément Le Goffic            const: jedec,lpddr3-channel
916ab3581aSClément Le Goffic    then:
926ab3581aSClément Le Goffic      patternProperties:
936ab3581aSClément Le Goffic        "^rank@[0-9]+$":
946ab3581aSClément Le Goffic          $ref: /schemas/memory-controllers/ddr/jedec,lpddr3.yaml#
956ab3581aSClément Le Goffic  - if:
966ab3581aSClément Le Goffic      properties:
976ab3581aSClément Le Goffic        compatible:
986ab3581aSClément Le Goffic          contains:
996ab3581aSClément Le Goffic            const: jedec,lpddr4-channel
1006ab3581aSClément Le Goffic    then:
1016ab3581aSClément Le Goffic      patternProperties:
1026ab3581aSClément Le Goffic        "^rank@[0-9]+$":
1036ab3581aSClément Le Goffic          $ref: /schemas/memory-controllers/ddr/jedec,lpddr4.yaml#
1046ab3581aSClément Le Goffic  - if:
1056ab3581aSClément Le Goffic      properties:
1066ab3581aSClément Le Goffic        compatible:
1076ab3581aSClément Le Goffic          contains:
1086ab3581aSClément Le Goffic            const: jedec,lpddr5-channel
1096ab3581aSClément Le Goffic    then:
1106ab3581aSClément Le Goffic      patternProperties:
1116ab3581aSClément Le Goffic        "^rank@[0-9]+$":
1126ab3581aSClément Le Goffic          $ref: /schemas/memory-controllers/ddr/jedec,lpddr5.yaml#
1136ab3581aSClément Le Goffic
1146ab3581aSClément Le Gofficrequired:
1156ab3581aSClément Le Goffic  - compatible
1166ab3581aSClément Le Goffic  - io-width
1176ab3581aSClément Le Goffic  - "#address-cells"
1186ab3581aSClément Le Goffic  - "#size-cells"
1196ab3581aSClément Le Goffic
1206ab3581aSClément Le GofficadditionalProperties: false
1216ab3581aSClément Le Goffic
1226ab3581aSClément Le Gofficexamples:
1236ab3581aSClément Le Goffic  - |
124*9805f2cfSClément Le Goffic    sdram-channel-0 {
1256ab3581aSClément Le Goffic      #address-cells = <1>;
1266ab3581aSClément Le Goffic      #size-cells = <0>;
1276ab3581aSClément Le Goffic      compatible = "jedec,lpddr3-channel";
1286ab3581aSClément Le Goffic      io-width = <32>;
1296ab3581aSClément Le Goffic
1306ab3581aSClément Le Goffic      rank@0 {
1316ab3581aSClément Le Goffic        compatible = "lpddr3-ff,0100", "jedec,lpddr3";
1326ab3581aSClément Le Goffic        reg = <0>;
1336ab3581aSClément Le Goffic        density = <8192>;
1346ab3581aSClément Le Goffic        io-width = <16>;
1356ab3581aSClément Le Goffic        revision-id = <1 0>;
1366ab3581aSClément Le Goffic      };
1376ab3581aSClément Le Goffic    };
1386ab3581aSClément Le Goffic
139*9805f2cfSClément Le Goffic    sdram-channel-1 {
1406ab3581aSClément Le Goffic      #address-cells = <1>;
1416ab3581aSClément Le Goffic      #size-cells = <0>;
1426ab3581aSClément Le Goffic      compatible = "jedec,lpddr4-channel";
1436ab3581aSClément Le Goffic      io-width = <32>;
1446ab3581aSClément Le Goffic
1456ab3581aSClément Le Goffic      rank@0 {
1466ab3581aSClément Le Goffic        compatible = "lpddr4-05,0301", "jedec,lpddr4";
1476ab3581aSClément Le Goffic        reg = <0>;
1486ab3581aSClément Le Goffic        density = <4096>;
1496ab3581aSClément Le Goffic        io-width = <32>;
1506ab3581aSClément Le Goffic        revision-id = <3 1>;
1516ab3581aSClément Le Goffic      };
1526ab3581aSClément Le Goffic
1536ab3581aSClément Le Goffic      rank@1 {
1546ab3581aSClément Le Goffic        compatible = "lpddr4-05,0301", "jedec,lpddr4";
1556ab3581aSClément Le Goffic        reg = <1>;
1566ab3581aSClément Le Goffic        density = <2048>;
1576ab3581aSClément Le Goffic        io-width = <32>;
1586ab3581aSClément Le Goffic        revision-id = <3 1>;
1596ab3581aSClément Le Goffic      };
1606ab3581aSClément Le Goffic    };
161