From: Julius Werner <jwerner@chromium.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Dmitry Osipenko <digetx@gmail.com>,
Doug Anderson <dianders@chromium.org>,
Jian-Jia Su <jjsu@google.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Julius Werner <jwerner@chromium.org>
Subject: [PATCH 2/4] dt-bindings: memory: Add numeric LPDDR compatible string variant
Date: Tue, 30 Aug 2022 18:33:57 -0700 [thread overview]
Message-ID: <20220831013359.1807905-3-jwerner@chromium.org> (raw)
In-Reply-To: <20220831013359.1807905-1-jwerner@chromium.org>
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.
Signed-off-by: Julius Werner <jwerner@chromium.org>
---
.../memory-controllers/ddr/jedec,lpddr-props.yaml | 10 ++++++++++
.../memory-controllers/ddr/jedec,lpddr2.yaml | 8 +++++---
.../memory-controllers/ddr/jedec,lpddr3.yaml | 12 ++++++++----
3 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
index 8b31c60ea2435b..0c7d2feafd77c8 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml
@@ -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.
+
manufacturer-id:
$ref: /schemas/types.yaml#/definitions/uint32
description:
diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
index 63c47235cb9896..0eb7a66dfd08db 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
@@ -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
diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
index 5969166cdc9e0f..cd076a4fd91194 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
@@ -14,10 +14,14 @@ maintainers:
properties:
compatible:
- items:
- - enum:
- - samsung,K3QF2F20DB
- - const: jedec,lpddr3
+ 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
--
2.31.0
next prev parent reply other threads:[~2022-08-31 1:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 1:33 [PATCH 0/4] dt-bindings: memory: Describing LPDDR topology Julius Werner
2022-08-31 1:33 ` [PATCH 1/4] dt-bindings: memory: Factor out common properties of LPDDR bindings Julius Werner
2022-08-31 6:18 ` Krzysztof Kozlowski
2022-09-01 1:09 ` Julius Werner
2022-09-05 12:32 ` Krzysztof Kozlowski
2022-08-31 6:30 ` Krzysztof Kozlowski
2022-08-31 1:33 ` Julius Werner [this message]
2022-08-31 6:23 ` [PATCH 2/4] dt-bindings: memory: Add numeric LPDDR compatible string variant Krzysztof Kozlowski
2022-08-31 1:33 ` [PATCH 3/4] dt-bindings: memory: Add jedec,lpddr4 and jedec,lpddr5 bindings Julius Werner
2022-08-31 6:28 ` Krzysztof Kozlowski
2022-09-01 1:10 ` Julius Werner
2022-09-02 20:24 ` Rob Herring
2022-08-31 1:33 ` [PATCH 4/4] dt-bindings: memory: Add jedec,lpddrX-channel binding Julius Werner
2022-08-31 6:55 ` Krzysztof Kozlowski
2022-09-01 1:11 ` Julius Werner
2022-09-08 13:56 ` Krzysztof Kozlowski
2022-09-09 23:36 ` Julius Werner
2022-08-31 6:34 ` [PATCH 0/4] dt-bindings: memory: Describing LPDDR topology Krzysztof Kozlowski
2022-09-01 1:05 ` Julius Werner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220831013359.1807905-3-jwerner@chromium.org \
--to=jwerner@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=digetx@gmail.com \
--cc=jjsu@google.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).