mbox series

[v3,0/8] dt-bindings: memory: convert to dtschema

Message ID 20220206135807.211767-1-krzysztof.kozlowski@canonical.com
Headers show
Series dt-bindings: memory: convert to dtschema | expand

Message

Krzysztof Kozlowski Feb. 6, 2022, 1:57 p.m. UTC
Hi,

Changes since v2:
1. Re-order patches so timings get converted earlier. This fixes dt-checker
robot report.
2. Add Dmitry's review tag.
3. Three new patches:
   #6: dt-bindings: memory: lpddr3: deprecate passing timings frequency as unit address
   #7: memory: of: parse max-freq property
   #8: ARM: dts: exynos: remove deprecated unit address for LPDDR3 timings on Odroid

Changes since v1:
1. Drop patch 1 (ARM dts) - applied.
2. Correct description in lpddr2-timings (Dmitry).

Best regards,
Krzysztof

Krzysztof Kozlowski (8):
  dt-bindings: memory: lpddr2-timings: convert to dtschema
  dt-bindings: memory: lpddr3-timings: convert to dtschema
  dt-bindings: memory: lpddr3: convert to dtschema
  dt-bindings: memory: lpddr3: adjust IO width to spec
  dt-bindings: memory: lpddr3: deprecate manufacturer ID
  dt-bindings: memory: lpddr3: deprecate passing timings frequency as
    unit address
  memory: of: parse max-freq property
  ARM: dts: exynos: remove deprecated unit address for LPDDR3 timings on
    Odroid

 .../ddr/jedec,lpddr2-timings.yaml             | 135 +++++++++
 .../memory-controllers/ddr/jedec,lpddr2.yaml  |   6 +-
 .../ddr/jedec,lpddr3-timings.yaml             | 157 +++++++++++
 .../memory-controllers/ddr/jedec,lpddr3.yaml  | 263 ++++++++++++++++++
 .../memory-controllers/ddr/lpddr2-timings.txt |  52 ----
 .../memory-controllers/ddr/lpddr3-timings.txt |  58 ----
 .../memory-controllers/ddr/lpddr3.txt         | 107 -------
 .../samsung,exynos5422-dmc.yaml               |   3 +-
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi |   7 +-
 drivers/memory/of_memory.c                    |   6 +-
 10 files changed, 564 insertions(+), 230 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2-timings.yaml
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3-timings.yaml
 create mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml
 delete mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/lpddr2-timings.txt
 delete mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/lpddr3-timings.txt
 delete mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/lpddr3.txt

Comments

Dmitry Osipenko Feb. 6, 2022, 3:33 p.m. UTC | #1
06.02.2022 16:58, Krzysztof Kozlowski пишет:
> Passing the memory timings maximum frequency as an unit address was
> a workaround and instead 'max-freq' is preferred.  Look for 'max-freq'
> first and then fallback to 'reg'.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
> ---
>  drivers/memory/of_memory.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
> index b94408954d85..bac5c7f34936 100644
> --- a/drivers/memory/of_memory.c
> +++ b/drivers/memory/of_memory.c
> @@ -212,8 +212,10 @@ static int of_lpddr3_do_get_timings(struct device_node *np,
>  {
>  	int ret;
>  
> -	/* The 'reg' param required since DT has changed, used as 'max-freq' */
> -	ret = of_property_read_u32(np, "reg", &tim->max_freq);
> +	ret = of_property_read_u32(np, "max-freq", &tim->max_freq);
> +	if (ret)
> +		/* Deprecated way of passing max-freq as 'reg' */
> +		ret = of_property_read_u32(np, "reg", &tim->max_freq);
>  	ret |= of_property_read_u32(np, "min-freq", &tim->min_freq);
>  	ret |= of_property_read_u32(np, "tRFC", &tim->tRFC);
>  	ret |= of_property_read_u32(np, "tRRD", &tim->tRRD);

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Alim Akhtar Feb. 7, 2022, 4:16 a.m. UTC | #2
Hi Krzysztof

>-----Original Message-----
>From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@canonical.com]
>Sent: Sunday, February 6, 2022 7:28 PM
>To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>; Rob Herring
><robh+dt@kernel.org>; Lukasz Luba <lukasz.luba@arm.com>; Alim Akhtar
><alim.akhtar@samsung.com>; Dmitry Osipenko <digetx@gmail.com>; linux-
>kernel@vger.kernel.org; devicetree@vger.kernel.org; linux-
>pm@vger.kernel.org; linux-samsung-soc@vger.kernel.org; linux-arm-
>kernel@lists.infradead.org
>Subject: [PATCH v3 7/8] memory: of: parse max-freq property
>
>Passing the memory timings maximum frequency as an unit address was a
>workaround and instead 'max-freq' is preferred.  Look for 'max-freq'
>first and then fallback to 'reg'.
>
>Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
>---

Reviewed-by: Alim Akhtar <alim.ahtar@samsung.com>


> drivers/memory/of_memory.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
>index b94408954d85..bac5c7f34936 100644
>--- a/drivers/memory/of_memory.c
>+++ b/drivers/memory/of_memory.c
>@@ -212,8 +212,10 @@ static int of_lpddr3_do_get_timings(struct
>device_node *np,  {
> 	int ret;
>
>-	/* The 'reg' param required since DT has changed, used as 'max-freq'
>*/
>-	ret = of_property_read_u32(np, "reg", &tim->max_freq);
>+	ret = of_property_read_u32(np, "max-freq", &tim->max_freq);
>+	if (ret)
>+		/* Deprecated way of passing max-freq as 'reg' */
>+		ret = of_property_read_u32(np, "reg", &tim->max_freq);
> 	ret |= of_property_read_u32(np, "min-freq", &tim->min_freq);
> 	ret |= of_property_read_u32(np, "tRFC", &tim->tRFC);
> 	ret |= of_property_read_u32(np, "tRRD", &tim->tRRD);
>--
>2.32.0
Rob Herring (Arm) Feb. 7, 2022, 9:57 p.m. UTC | #3
On Sun, Feb 06, 2022 at 02:57:59PM +0100, Krzysztof Kozlowski wrote:
> Hi,
> 
> Changes since v2:
> 1. Re-order patches so timings get converted earlier. This fixes dt-checker
> robot report.
> 2. Add Dmitry's review tag.
> 3. Three new patches:
>    #6: dt-bindings: memory: lpddr3: deprecate passing timings frequency as unit address
>    #7: memory: of: parse max-freq property
>    #8: ARM: dts: exynos: remove deprecated unit address for LPDDR3 timings on Odroid
> 
> Changes since v1:
> 1. Drop patch 1 (ARM dts) - applied.
> 2. Correct description in lpddr2-timings (Dmitry).
> 
> Best regards,
> Krzysztof
> 
> Krzysztof Kozlowski (8):
>   dt-bindings: memory: lpddr2-timings: convert to dtschema
>   dt-bindings: memory: lpddr3-timings: convert to dtschema
>   dt-bindings: memory: lpddr3: convert to dtschema
>   dt-bindings: memory: lpddr3: adjust IO width to spec
>   dt-bindings: memory: lpddr3: deprecate manufacturer ID
>   dt-bindings: memory: lpddr3: deprecate passing timings frequency as
>     unit address
>   memory: of: parse max-freq property
>   ARM: dts: exynos: remove deprecated unit address for LPDDR3 timings on
>     Odroid

Reviewed-by: Rob Herring <robh@kernel.org>
Krzysztof Kozlowski Feb. 9, 2022, 2:36 p.m. UTC | #4
On Sun, 6 Feb 2022 14:57:59 +0100, Krzysztof Kozlowski wrote:
> Changes since v2:
> 1. Re-order patches so timings get converted earlier. This fixes dt-checker
> robot report.
> 2. Add Dmitry's review tag.
> 3. Three new patches:
>    #6: dt-bindings: memory: lpddr3: deprecate passing timings frequency as unit address
>    #7: memory: of: parse max-freq property
>    #8: ARM: dts: exynos: remove deprecated unit address for LPDDR3 timings on Odroid
> 
> [...]

Applied, thanks!

[1/8] dt-bindings: memory: lpddr2-timings: convert to dtschema
      commit: 425fd283e4a2b929a88483525fda3f90dde8a2d0
[2/8] dt-bindings: memory: lpddr3-timings: convert to dtschema
      commit: 180a276c99bb861742c5c423d679b0277d4b1c26
[3/8] dt-bindings: memory: lpddr3: convert to dtschema
      commit: 28f818580e49a97876de5c33231fc0e4c3cde2d9
[4/8] dt-bindings: memory: lpddr3: adjust IO width to spec
      commit: d98e72b6f9b078c57f9d46dc64a669d02ff2ffcc
[5/8] dt-bindings: memory: lpddr3: deprecate manufacturer ID
      commit: e531932c7185b86eccb3688002730950d49eba1a
[6/8] dt-bindings: memory: lpddr3: deprecate passing timings frequency as unit address
      commit: 42f94bb962cd1b15dc57c90aca7e48848ca6c6c3
[7/8] memory: of: parse max-freq property
      commit: 4e890b2228fd14fa6269175e9816bf27ff989e84

Best regards,