Commit 686fe63b authored by Julius Werner's avatar Julius Werner Committed by Krzysztof Kozlowski
Browse files

dt-bindings: memory: Add numeric LPDDR compatible string variant



This patch allows a new kind of compatible string for LPDDR parts in the
device tree bindings, in addition to the existing hardcoded
<vendor>,<part-number> strings. The new format contains manufacturer and
part (revision) information in numerical form, such as lpddr3-ff,0201
for an LPDDR3 part with manufacturer ID ff and revision ID 0201. This
helps cases where LPDDR parts are probed at runtime by boot firmware and
cannot be matched to hardcoded part numbers, such as the firmware on the
qcom/sc7280-herobrine boards does (which supports 4 different memory
configurations at the moment, and more are expected to be added later at
a point where the boot firmware can no longer be updated to specifically
accommodate them).

Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
Acked-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220930220606.303395-2-jwerner@chromium.org


Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
parent b7178cd5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -15,6 +15,16 @@ maintainers:
  - Krzysztof Kozlowski <krzk@kernel.org>

properties:
  compatible:
    description:
      Compatible strings can be either explicit vendor names and part numbers
      (e.g. elpida,ECB240ABACN), or generated strings of the form
      lpddrX-YY,ZZZZ where X is the LPDDR version, YY is the manufacturer ID
      (from MR5) and ZZZZ is the revision ID (from MR6 and MR7). Both IDs are
      formatted in lower case hexadecimal representation with leading zeroes.
      The latter form can be useful when LPDDR nodes are created at runtime by
      boot firmware that doesn't have access to static part number information.

  revision-id:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    description:
+5 −3
Original line number Diff line number Diff line
@@ -20,13 +20,15 @@ properties:
              - elpida,ECB240ABACN
              - elpida,B8132B2PB-6D-F
          - enum:
              - jedec,lpddr2-s4
      - items:
          - enum:
              - jedec,lpddr2-nvm
              - jedec,lpddr2-s2
              - jedec,lpddr2-s4
      - items:
          - pattern: "^lpddr2-[0-9a-f]{2},[0-9a-f]{4}$"
          - enum:
              - jedec,lpddr2-nvm
              - jedec,lpddr2-s2
              - jedec,lpddr2-s4

  revision-id1:
    $ref: /schemas/types.yaml#/definitions/uint32
+8 −4
Original line number Diff line number Diff line
@@ -14,10 +14,14 @@ allOf:

properties:
  compatible:
    items:
    oneOf:
      - items:
          - enum:
              - samsung,K3QF2F20DB
          - const: jedec,lpddr3
      - items:
          - pattern: "^lpddr3-[0-9a-f]{2},[0-9a-f]{4}$"
          - const: jedec,lpddr3

  '#address-cells':
    const: 1