All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3
@ 2022-02-24  0:34 Julius Werner
  2022-02-24  0:34 ` [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property " Julius Werner
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Julius Werner @ 2022-02-24  0:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dmitry Osipenko, devicetree, linux-kernel, Julius Werner

This patch series updates the device tree binding for "jedec,lpddr2" to
encode the revision ID (mode registers 6 and 7) in the same way as they
were already done for the "jedec,lpddr3" binding, and deprecates the old
way.

Julius Werner (3):
  dt-bindings: memory: lpddr2: Adjust revision ID property to match
    lpddr3
  memory: Update of_memory lpddr2 revision-id binding
  ARM: dts: Update jedec,lpddr2 revision-id binding

 .../memory-controllers/ddr/jedec,lpddr2.yaml  | 17 ++++++++++++--
 arch/arm/boot/dts/tegra20-asus-tf101.dts      |  2 +-
 drivers/memory/of_memory.c                    | 23 ++++++++++++-------
 3 files changed, 31 insertions(+), 11 deletions(-)

-- 
2.31.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property to match lpddr3
  2022-02-24  0:34 [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Julius Werner
@ 2022-02-24  0:34 ` Julius Werner
  2022-02-24 20:24   ` Rob Herring
  2022-02-25 12:35   ` Krzysztof Kozlowski
  2022-02-24  0:34 ` [PATCH 2/3] memory: Update of_memory lpddr2 revision-id binding Julius Werner
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Julius Werner @ 2022-02-24  0:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dmitry Osipenko, devicetree, linux-kernel, Julius Werner

Commit 3539a2 (dt-bindings: memory: lpddr2: Add revision-id properties)
added the properties `revision-id1` and `revision-id2` to the
"jedec,lpddr2" binding. The "jedec,lpddr3" binding already had a single
array property `revision-id` for the same purpose. For consistency
between related memory types, this patch deprecates the LPDDR2
properties and instead adds a property in the same style as for LPDDR3
to that binding.

Signed-off-by: Julius Werner <jwerner@chromium.org>
---
 .../memory-controllers/ddr/jedec,lpddr2.yaml    | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

Changelog:

- v2:
  - Updated commit message to fill in commit reference to earlier patch
- v3:
  - Added `items` specification with `minimum` and `maximum` values to
    `revision-id` binding
  - Updated binding example to preserve previous revision ID values

diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
index 25ed0266f6dd3d..e9d0936861b779 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
+++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml
@@ -30,12 +30,26 @@ properties:
     maximum: 255
     description: |
       Revision 1 value of SDRAM chip. Obtained from device datasheet.
+      Property is deprecated, use revision-id instead.
+    deprecated: true
 
   revision-id2:
     $ref: /schemas/types.yaml#/definitions/uint32
     maximum: 255
     description: |
       Revision 2 value of SDRAM chip. Obtained from device datasheet.
+      Property is deprecated, use revision-id instead.
+    deprecated: true
+
+  revision-id:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    description: |
+      Revision IDs read from Mode Register 6 and 7. One byte per uint32 cell (i.e. <MR6 MR7>).
+    minItems: 2
+    maxItems: 2
+    items:
+      minimum: 0
+      maximum: 255
 
   density:
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -164,8 +178,7 @@ examples:
         compatible = "elpida,ECB240ABACN", "jedec,lpddr2-s4";
         density = <2048>;
         io-width = <32>;
-        revision-id1 = <1>;
-        revision-id2 = <0>;
+        revision-id = <1 0>;
 
         tRPab-min-tck = <3>;
         tRCD-min-tck = <3>;
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] memory: Update of_memory lpddr2 revision-id binding
  2022-02-24  0:34 [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Julius Werner
  2022-02-24  0:34 ` [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property " Julius Werner
@ 2022-02-24  0:34 ` Julius Werner
  2022-02-24  0:34 ` [PATCH 3/3] ARM: dts: Update jedec,lpddr2 " Julius Werner
  2022-02-25 12:37 ` [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Krzysztof Kozlowski
  3 siblings, 0 replies; 11+ messages in thread
From: Julius Werner @ 2022-02-24  0:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dmitry Osipenko, devicetree, linux-kernel, Julius Werner

This patch updates the code parsing the "jedec,lpddr2" device tree
binding to use the new `revision-id` property instead of the deprecated
`revision-id1` and `revision-id2` properties if available.

Signed-off-by: Julius Werner <jwerner@chromium.org>
---
 drivers/memory/of_memory.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index b94408954d85cc..454a0e6d544cac 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -316,14 +316,21 @@ const struct lpddr2_info
 	struct property *prop;
 	const char *cp;
 	int err;
-
-	err = of_property_read_u32(np, "revision-id1", &info.revision_id1);
-	if (err)
-		info.revision_id1 = -ENOENT;
-
-	err = of_property_read_u32(np, "revision-id2", &info.revision_id2);
-	if (err)
-		info.revision_id2 = -ENOENT;
+	u32 revision_id[2];
+
+	err = of_property_read_u32_array(np, "revision-id", revision_id, 2);
+	if (!err) {
+		info.revision_id1 = revision_id[0];
+		info.revision_id2 = revision_id[1];
+	} else {
+		err = of_property_read_u32(np, "revision-id1", &info.revision_id1);
+		if (err)
+			info.revision_id1 = -ENOENT;
+
+		err = of_property_read_u32(np, "revision-id2", &info.revision_id2);
+		if (err)
+			info.revision_id2 = -ENOENT;
+	}
 
 	err = of_property_read_u32(np, "io-width", &info.io_width);
 	if (err)
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] ARM: dts: Update jedec,lpddr2 revision-id binding
  2022-02-24  0:34 [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Julius Werner
  2022-02-24  0:34 ` [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property " Julius Werner
  2022-02-24  0:34 ` [PATCH 2/3] memory: Update of_memory lpddr2 revision-id binding Julius Werner
@ 2022-02-24  0:34 ` Julius Werner
  2022-02-24  7:29   ` Krzysztof Kozlowski
  2022-02-25 12:37 ` [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Krzysztof Kozlowski
  3 siblings, 1 reply; 11+ messages in thread
From: Julius Werner @ 2022-02-24  0:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Dmitry Osipenko, devicetree, linux-kernel, Julius Werner

This patch updates the tegra20-asus-tf101 device tree to replace the
deprecated `revision-id1` binding with the new `revision-id` binding in
its "jedec,lpddr2"-compatible node. This was the only DTS in the tree
using this binding.

The revision-id2 (mode register 7) of this memory chip was not given in
the existing device tree, so let's assume 0 for now until it becomes
relevant.

Signed-off-by: Julius Werner <jwerner@chromium.org>
---
 arch/arm/boot/dts/tegra20-asus-tf101.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra20-asus-tf101.dts b/arch/arm/boot/dts/tegra20-asus-tf101.dts
index 020172ee7340ec..c700f80e2a366e 100644
--- a/arch/arm/boot/dts/tegra20-asus-tf101.dts
+++ b/arch/arm/boot/dts/tegra20-asus-tf101.dts
@@ -756,7 +756,7 @@ emc-tables@3 {
 
 			lpddr2 {
 				compatible = "elpida,B8132B2PB-6D-F", "jedec,lpddr2-s4";
-				revision-id1 = <1>;
+				revision-id = <1 0>;
 				density = <2048>;
 				io-width = <16>;
 			};
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] ARM: dts: Update jedec,lpddr2 revision-id binding
  2022-02-24  0:34 ` [PATCH 3/3] ARM: dts: Update jedec,lpddr2 " Julius Werner
@ 2022-02-24  7:29   ` Krzysztof Kozlowski
  2022-02-24 12:38     ` Thierry Reding
  0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-24  7:29 UTC (permalink / raw)
  To: Julius Werner
  Cc: Dmitry Osipenko, devicetree, linux-kernel, Jonathan Hunter,
	Thierry Reding, linux-tegra

On 24/02/2022 01:34, Julius Werner wrote:
> This patch updates the tegra20-asus-tf101 device tree to replace the
> deprecated `revision-id1` binding with the new `revision-id` binding in
> its "jedec,lpddr2"-compatible node. This was the only DTS in the tree
> using this binding.
> 
> The revision-id2 (mode register 7) of this memory chip was not given in
> the existing device tree, so let's assume 0 for now until it becomes
> relevant.
> 
> Signed-off-by: Julius Werner <jwerner@chromium.org>
> ---
>  arch/arm/boot/dts/tegra20-asus-tf101.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Please use scripts/get_maintainer.pl to get the list of people/lists to
CC. You skipped here Tegra maintainers, so no one would pick up this patch.

I bounced the mail to Jonathan, Thierry and linux-tegra (+Cc), so
hopefully they will get it. If not, series might need resend with proper
addresses.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] ARM: dts: Update jedec,lpddr2 revision-id binding
  2022-02-24  7:29   ` Krzysztof Kozlowski
@ 2022-02-24 12:38     ` Thierry Reding
  2022-02-25  1:41       ` Julius Werner
  0 siblings, 1 reply; 11+ messages in thread
From: Thierry Reding @ 2022-02-24 12:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Julius Werner, Dmitry Osipenko, devicetree, linux-kernel,
	Jonathan Hunter, linux-tegra

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

On Thu, Feb 24, 2022 at 08:29:27AM +0100, Krzysztof Kozlowski wrote:
> On 24/02/2022 01:34, Julius Werner wrote:
> > This patch updates the tegra20-asus-tf101 device tree to replace the
> > deprecated `revision-id1` binding with the new `revision-id` binding in
> > its "jedec,lpddr2"-compatible node. This was the only DTS in the tree
> > using this binding.
> > 
> > The revision-id2 (mode register 7) of this memory chip was not given in
> > the existing device tree, so let's assume 0 for now until it becomes
> > relevant.
> > 
> > Signed-off-by: Julius Werner <jwerner@chromium.org>
> > ---
> >  arch/arm/boot/dts/tegra20-asus-tf101.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Please use scripts/get_maintainer.pl to get the list of people/lists to
> CC. You skipped here Tegra maintainers, so no one would pick up this patch.
> 
> I bounced the mail to Jonathan, Thierry and linux-tegra (+Cc), so
> hopefully they will get it. If not, series might need resend with proper
> addresses.

Thanks for the bounce. Applied.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property to match lpddr3
  2022-02-24  0:34 ` [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property " Julius Werner
@ 2022-02-24 20:24   ` Rob Herring
  2022-02-25 12:35   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 11+ messages in thread
From: Rob Herring @ 2022-02-24 20:24 UTC (permalink / raw)
  To: Julius Werner
  Cc: linux-kernel, Krzysztof Kozlowski, Dmitry Osipenko, devicetree

On Wed, 23 Feb 2022 16:34:19 -0800, Julius Werner wrote:
> Commit 3539a2 (dt-bindings: memory: lpddr2: Add revision-id properties)
> added the properties `revision-id1` and `revision-id2` to the
> "jedec,lpddr2" binding. The "jedec,lpddr3" binding already had a single
> array property `revision-id` for the same purpose. For consistency
> between related memory types, this patch deprecates the LPDDR2
> properties and instead adds a property in the same style as for LPDDR3
> to that binding.
> 
> Signed-off-by: Julius Werner <jwerner@chromium.org>
> ---
>  .../memory-controllers/ddr/jedec,lpddr2.yaml    | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> Changelog:
> 
> - v2:
>   - Updated commit message to fill in commit reference to earlier patch
> - v3:
>   - Added `items` specification with `minimum` and `maximum` values to
>     `revision-id` binding
>   - Updated binding example to preserve previous revision ID values
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] ARM: dts: Update jedec,lpddr2 revision-id binding
  2022-02-24 12:38     ` Thierry Reding
@ 2022-02-25  1:41       ` Julius Werner
  2022-02-25  7:08         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Julius Werner @ 2022-02-25  1:41 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Krzysztof Kozlowski, Julius Werner, Dmitry Osipenko, devicetree,
	LKML, Jonathan Hunter, linux-tegra

> > I bounced the mail to Jonathan, Thierry and linux-tegra (+Cc), so
> > hopefully they will get it. If not, series might need resend with proper
> > addresses.
>
> Thanks for the bounce. Applied.

Sorry, I wasn't sure how this was supposed to work for interdependent
patches, I thought they would all go through the same maintainer tree.
If you do split them up please be aware of the dependency, i.e. this
patch should not be applied anywhere without patch 1 and 2 of this
series landing first.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/3] ARM: dts: Update jedec,lpddr2 revision-id binding
  2022-02-25  1:41       ` Julius Werner
@ 2022-02-25  7:08         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-25  7:08 UTC (permalink / raw)
  To: Julius Werner, Thierry Reding
  Cc: Dmitry Osipenko, devicetree, LKML, Jonathan Hunter, linux-tegra

On 25/02/2022 02:41, Julius Werner wrote:
>>> I bounced the mail to Jonathan, Thierry and linux-tegra (+Cc), so
>>> hopefully they will get it. If not, series might need resend with proper
>>> addresses.
>>
>> Thanks for the bounce. Applied.
> 
> Sorry, I wasn't sure how this was supposed to work for interdependent
> patches, I thought they would all go through the same maintainer tree.
> If you do split them up please be aware of the dependency, i.e. this
> patch should not be applied anywhere without patch 1 and 2 of this
> series landing first.

DTS changes never go with driver changes. Even if within the same tree,
these will be different branches, so you cannot maintain dependency. The
cover letter therefore should mention such dependency, so DTS won't get
applied too fast.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property to match lpddr3
  2022-02-24  0:34 ` [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property " Julius Werner
  2022-02-24 20:24   ` Rob Herring
@ 2022-02-25 12:35   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-25 12:35 UTC (permalink / raw)
  To: Julius Werner; +Cc: Dmitry Osipenko, devicetree, linux-kernel

On 24/02/2022 01:34, Julius Werner wrote:
> Commit 3539a2 (dt-bindings: memory: lpddr2: Add revision-id properties)

Please run checkpatch on your commits.

Fixed this time.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3
  2022-02-24  0:34 [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Julius Werner
                   ` (2 preceding siblings ...)
  2022-02-24  0:34 ` [PATCH 3/3] ARM: dts: Update jedec,lpddr2 " Julius Werner
@ 2022-02-25 12:37 ` Krzysztof Kozlowski
  3 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-25 12:37 UTC (permalink / raw)
  To: Julius Werner
  Cc: Krzysztof Kozlowski, devicetree, Dmitry Osipenko, linux-kernel

On Wed, 23 Feb 2022 16:34:18 -0800, Julius Werner wrote:
> This patch series updates the device tree binding for "jedec,lpddr2" to
> encode the revision ID (mode registers 6 and 7) in the same way as they
> were already done for the "jedec,lpddr3" binding, and deprecates the old
> way.
> 
> Julius Werner (3):
>   dt-bindings: memory: lpddr2: Adjust revision ID property to match
>     lpddr3
>   memory: Update of_memory lpddr2 revision-id binding
>   ARM: dts: Update jedec,lpddr2 revision-id binding
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: memory: lpddr2: Adjust revision ID property to match lpddr3
      commit: 80ce91730d3283f10810245db2605498d794fa29
[2/3] memory: Update of_memory lpddr2 revision-id binding
      commit: a06bf59d07f45a0a6ab4ab8ac69c1d708d3fadcb


Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-02-25 12:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24  0:34 [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Julius Werner
2022-02-24  0:34 ` [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property " Julius Werner
2022-02-24 20:24   ` Rob Herring
2022-02-25 12:35   ` Krzysztof Kozlowski
2022-02-24  0:34 ` [PATCH 2/3] memory: Update of_memory lpddr2 revision-id binding Julius Werner
2022-02-24  0:34 ` [PATCH 3/3] ARM: dts: Update jedec,lpddr2 " Julius Werner
2022-02-24  7:29   ` Krzysztof Kozlowski
2022-02-24 12:38     ` Thierry Reding
2022-02-25  1:41       ` Julius Werner
2022-02-25  7:08         ` Krzysztof Kozlowski
2022-02-25 12:37 ` [PATCH 0/3] Update lpddr2 revision-id binding to match lpddr3 Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.