From nobody Tue Jun 23 23:41:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 933B4C433FE for ; Thu, 24 Feb 2022 00:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230124AbiBXAfO (ORCPT ); Wed, 23 Feb 2022 19:35:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiBXAfN (ORCPT ); Wed, 23 Feb 2022 19:35:13 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A12C89EB92 for ; Wed, 23 Feb 2022 16:34:39 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id 132so318390pga.5 for ; Wed, 23 Feb 2022 16:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vG/5kA9N04CwQy4bX0Kb6i3wWo0eXRHeMpuwd4x5Q/c=; b=jiBcPWY52X9e/uzNvYV2TiVy3I2p7YH1Aio3N86LL3F6hY5MTAQMANosqFD3oDYCbm pgoTOF75+LpesRgDwHVx00c6vatB+Z2rNe1WdvV0OHVVZbQb/7k6LvYYt0J9mWxi5Ezv iovAxNryPBhK2YpLzNMuk11LODuxTMATgAerI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vG/5kA9N04CwQy4bX0Kb6i3wWo0eXRHeMpuwd4x5Q/c=; b=reTy+Os+F4DATZr90xh+KvG1GdzPM6haKJ2ema3yRPkukCeCAV9F4HUeqjqR6YEuSb mDK6BXgEJum5pesN6LvB0wmFWgQ3Lmlt57pj4niEkriTheMlOxsdmQ2Bt9EgjdI6VyLo a6vU6NdBSIKYgGc6X4i+Wd0vwp12yoqLKyZs2d7ot5Ss1hJkxIHTNSWnsHZ7gYQyA1vl uwefTb7rOXIWh5Hxy+zNarQUEK9ZeWRgDKBQs9reB5QhCt2/O4gJ5//+lyyJdPUAKcIJ /+0f4aaXMQT5bFZWy82URrnoiNMMxd8PWPQvcky6H5CVK89GLCjgc4VBH6etcovGWrkW VN6Q== X-Gm-Message-State: AOAM533ghT7GwztjUA9KQIfQpMsyF/BSbGteT9K84DuXp5GUQHlOz/tj Wi/yaM5WjtLvTLYX00uQti/q9JuSoAxoSw== X-Google-Smtp-Source: ABdhPJzB30yXUg/ww0v2ftOzZv01+PA4tr9dDxl1M4WmeEwfAF4LbeQR2yIc+HYO7spA6z9bda51cQ== X-Received: by 2002:a63:4d52:0:b0:343:8d41:eb12 with SMTP id n18-20020a634d52000000b003438d41eb12mr267178pgl.527.1645662879182; Wed, 23 Feb 2022 16:34:39 -0800 (PST) Received: from jwerner-p920.mtv.corp.google.com ([2620:15c:202:201:e321:1e1b:f71e:33c]) by smtp.gmail.com with ESMTPSA id ms7-20020a17090b234700b001bc7e6fc01csm4100344pjb.40.2022.02.23.16.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:34:38 -0800 (PST) From: Julius Werner To: Krzysztof Kozlowski Cc: Dmitry Osipenko , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julius Werner Subject: [PATCH v3 1/3] dt-bindings: memory: lpddr2: Adjust revision ID property to match lpddr3 Date: Wed, 23 Feb 2022 16:34:19 -0800 Message-Id: <20220224003421.3440124-2-jwerner@chromium.org> X-Mailer: git-send-email 2.35.1.473.g83b2b277ed-goog In-Reply-To: <20220224003421.3440124-1-jwerner@chromium.org> References: <20220224003421.3440124-1-jwerner@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Acked-by: Rob Herring --- .../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/jed= ec,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 =20 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 ce= ll (i.e. ). + minItems: 2 + maxItems: 2 + items: + minimum: 0 + maximum: 255 =20 density: $ref: /schemas/types.yaml#/definitions/uint32 @@ -164,8 +178,7 @@ examples: compatible =3D "elpida,ECB240ABACN", "jedec,lpddr2-s4"; density =3D <2048>; io-width =3D <32>; - revision-id1 =3D <1>; - revision-id2 =3D <0>; + revision-id =3D <1 0>; =20 tRPab-min-tck =3D <3>; tRCD-min-tck =3D <3>; --=20 2.31.0 From nobody Tue Jun 23 23:41:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C954FC433EF for ; Thu, 24 Feb 2022 00:34:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230440AbiBXAfY (ORCPT ); Wed, 23 Feb 2022 19:35:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbiBXAfN (ORCPT ); Wed, 23 Feb 2022 19:35:13 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 967F59EBB2 for ; Wed, 23 Feb 2022 16:34:40 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id x18so417593pfh.5 for ; Wed, 23 Feb 2022 16:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gL3XTGq5gUROAVlMpm5UUf8rBYQ3NN/e4SMIW+cAkbs=; b=C4Rwg+RXOE2nLS9hHfaHBhxlxsndRx3kbfna2NfsUdZ3XpJQ5AADxr5uwaG260StFf 6dnGtOShKtq3c29HEH35A3y13TZqQ9JgnufIEZ1nU8zOKrimmg+qFqpAQIXasCV44575 TVJzBGqfbzWcTV65qxGiCssqAQmdcLROSZQfI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gL3XTGq5gUROAVlMpm5UUf8rBYQ3NN/e4SMIW+cAkbs=; b=QqYx0HcbsbJdRalRVZ+m5ZyyNN7zX/Fww4jwLj2gvsFkriAcsXIp881wOn6tmWvvPH oVQp/pHfquAdeyva7Bmlrs6y0oGachuNmjnMlMB0Jf8a9MhDHqkk/vB5yNANNuh8zuHa Chyl87Bh9BvXNvECniQWtfZy4cu5rfPcqBKcwkzqhRpyFNg0zbFbXmTe02NIceevJpj2 76ETdUDady9lM1gf7levmD71HcOXemzHw5nJdB0mAIzPLLvY1iyJEECarbhh2F2DBLnz y/uFu+SBD6i6/qwfoVC2zWYmBf8QFBvdqAhvE4YfMWxygYbxUANEtkSOoaaFevZHMLUw S0hg== X-Gm-Message-State: AOAM531VNpA1PI4H4Yx7jwA/mXNheOyWmBh88jGsiynG7kxZSru6lvPp 8UMB+tl5QoqhoxG88BSev0Sksg== X-Google-Smtp-Source: ABdhPJxfcv9LTi9fBh7Sk0mFa56j247B7kDzJ4ZLZMn7uUMjmf4tjsmzTnpNBeSPYQ6RV0PGjwdj2A== X-Received: by 2002:a63:602:0:b0:373:efe4:8a24 with SMTP id 2-20020a630602000000b00373efe48a24mr269659pgg.287.1645662880090; Wed, 23 Feb 2022 16:34:40 -0800 (PST) Received: from jwerner-p920.mtv.corp.google.com ([2620:15c:202:201:e321:1e1b:f71e:33c]) by smtp.gmail.com with ESMTPSA id ms7-20020a17090b234700b001bc7e6fc01csm4100344pjb.40.2022.02.23.16.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:34:39 -0800 (PST) From: Julius Werner To: Krzysztof Kozlowski Cc: Dmitry Osipenko , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julius Werner Subject: [PATCH 2/3] memory: Update of_memory lpddr2 revision-id binding Date: Wed, 23 Feb 2022 16:34:20 -0800 Message-Id: <20220224003421.3440124-3-jwerner@chromium.org> X-Mailer: git-send-email 2.35.1.473.g83b2b277ed-goog In-Reply-To: <20220224003421.3440124-1-jwerner@chromium.org> References: <20220224003421.3440124-1-jwerner@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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 =3D of_property_read_u32(np, "revision-id1", &info.revision_id1); - if (err) - info.revision_id1 =3D -ENOENT; - - err =3D of_property_read_u32(np, "revision-id2", &info.revision_id2); - if (err) - info.revision_id2 =3D -ENOENT; + u32 revision_id[2]; + + err =3D of_property_read_u32_array(np, "revision-id", revision_id, 2); + if (!err) { + info.revision_id1 =3D revision_id[0]; + info.revision_id2 =3D revision_id[1]; + } else { + err =3D of_property_read_u32(np, "revision-id1", &info.revision_id1); + if (err) + info.revision_id1 =3D -ENOENT; + + err =3D of_property_read_u32(np, "revision-id2", &info.revision_id2); + if (err) + info.revision_id2 =3D -ENOENT; + } =20 err =3D of_property_read_u32(np, "io-width", &info.io_width); if (err) --=20 2.31.0 From nobody Tue Jun 23 23:41:55 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A409FC433EF for ; Thu, 24 Feb 2022 00:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230391AbiBXAfU (ORCPT ); Wed, 23 Feb 2022 19:35:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbiBXAfN (ORCPT ); Wed, 23 Feb 2022 19:35:13 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 586C39F3B8 for ; Wed, 23 Feb 2022 16:34:41 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id y5so418800pfe.4 for ; Wed, 23 Feb 2022 16:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WjlQPejglQ4l0/ZVVSaNpSupfbDyFF7DpYFPDOdJqWE=; b=c/jS859klS21fGUvkR4Gw/Q7uZQ4a3LJVJ6f4aao1Mo0O6PvBdAnTE6iW0WnKCyeg1 lXS33l3mNaqClERlEyP8fOm7LMKI00NHSoXibHRN0cFkTJujdovuJu5WHRMueex4O0vZ MAjsmbSgavXKDi0bbSJIX17c/VxO1HObW+L3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WjlQPejglQ4l0/ZVVSaNpSupfbDyFF7DpYFPDOdJqWE=; b=x/njET/L1GOyVreGSdxi2JvuQ6QwRudIsUUqcKthNfj0rpVS1Vh7L7px32PnpPRGzB TkwzvMAFZLafj90CiCQQm/up4zzXfoNAYdsS0+6leqrz/SSpTWZv0oQVBw+J8Ob7i+vA oyWIuyfxRZav592FT8VYEVV4F8ynleX62ZputxSuc7oOofaZA/deDfOxSxhATY3uV+Mb V+wIg34RUuDQMqfxXdFqKBsPmewmZBQGjgopLjm0uGsG0R6T8Im3pM9iILoh99Nf9AwS 3oVIB3fch1/3UV78J2xXnmX5f5RQI4XP6yuGONnhmwqmiBES2HbR62K1OoQK8fKw6J+9 G7rw== X-Gm-Message-State: AOAM530Tf+pqaaWGlHplKjAchJVcwjXoHHPmZwH/iXSAhvud8+EKetIA 62FuhUkXVsNtsIl8to7YAh82wf5j4E8Mog== X-Google-Smtp-Source: ABdhPJwRH9RI9geNc69VQvb+Z2AsIzQqCH++UjnphZBy4Hyi/jD8hpHjdHngO6ZsCs9XInfCqjsMeQ== X-Received: by 2002:a63:5fd7:0:b0:338:9599:f098 with SMTP id t206-20020a635fd7000000b003389599f098mr291528pgb.226.1645662880866; Wed, 23 Feb 2022 16:34:40 -0800 (PST) Received: from jwerner-p920.mtv.corp.google.com ([2620:15c:202:201:e321:1e1b:f71e:33c]) by smtp.gmail.com with ESMTPSA id ms7-20020a17090b234700b001bc7e6fc01csm4100344pjb.40.2022.02.23.16.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:34:40 -0800 (PST) From: Julius Werner To: Krzysztof Kozlowski Cc: Dmitry Osipenko , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julius Werner Subject: [PATCH 3/3] ARM: dts: Update jedec,lpddr2 revision-id binding Date: Wed, 23 Feb 2022 16:34:21 -0800 Message-Id: <20220224003421.3440124-4-jwerner@chromium.org> X-Mailer: git-send-email 2.35.1.473.g83b2b277ed-goog In-Reply-To: <20220224003421.3440124-1-jwerner@chromium.org> References: <20220224003421.3440124-1-jwerner@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 --- 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/t= egra20-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 { =20 lpddr2 { compatible =3D "elpida,B8132B2PB-6D-F", "jedec,lpddr2-s4"; - revision-id1 =3D <1>; + revision-id =3D <1 0>; density =3D <2048>; io-width =3D <16>; }; --=20 2.31.0