Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Julius Werner <jwerner@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220930220606.303395-2-jwerner@chromium.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Julius Werner and committed by
Krzysztof Kozlowski
686fe63b b7178cd5

+23 -7
+10
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
··· 15 15 - Krzysztof Kozlowski <krzk@kernel.org> 16 16 17 17 properties: 18 + compatible: 19 + description: 20 + Compatible strings can be either explicit vendor names and part numbers 21 + (e.g. elpida,ECB240ABACN), or generated strings of the form 22 + lpddrX-YY,ZZZZ where X is the LPDDR version, YY is the manufacturer ID 23 + (from MR5) and ZZZZ is the revision ID (from MR6 and MR7). Both IDs are 24 + formatted in lower case hexadecimal representation with leading zeroes. 25 + The latter form can be useful when LPDDR nodes are created at runtime by 26 + boot firmware that doesn't have access to static part number information. 27 + 18 28 revision-id: 19 29 $ref: /schemas/types.yaml#/definitions/uint32-array 20 30 description:
+5 -3
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
··· 20 20 - elpida,ECB240ABACN 21 21 - elpida,B8132B2PB-6D-F 22 22 - enum: 23 + - jedec,lpddr2-nvm 24 + - jedec,lpddr2-s2 23 25 - jedec,lpddr2-s4 24 26 - items: 25 - - enum: 26 - - jedec,lpddr2-s2 27 - - items: 27 + - pattern: "^lpddr2-[0-9a-f]{2},[0-9a-f]{4}$" 28 28 - enum: 29 29 - jedec,lpddr2-nvm 30 + - jedec,lpddr2-s2 31 + - jedec,lpddr2-s4 30 32 31 33 revision-id1: 32 34 $ref: /schemas/types.yaml#/definitions/uint32
+8 -4
Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
··· 14 14 15 15 properties: 16 16 compatible: 17 - items: 18 - - enum: 19 - - samsung,K3QF2F20DB 20 - - const: jedec,lpddr3 17 + oneOf: 18 + - items: 19 + - enum: 20 + - samsung,K3QF2F20DB 21 + - const: jedec,lpddr3 22 + - items: 23 + - pattern: "^lpddr3-[0-9a-f]{2},[0-9a-f]{4}$" 24 + - const: jedec,lpddr3 21 25 22 26 '#address-cells': 23 27 const: 1