From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CDDD36405E for ; Tue, 18 Nov 2025 15:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763478541; cv=none; b=E6fe8S2u8ZOb9mR+p+JHODzsOiMBiMW5+1i0SYzk4tURXUIjTn555uTWVruPqv95rH3kjthl9VOOyecW8gBLqcuOhWovak7XeBAbeV61gRM7MYHwQnMUnaGRAYbgpEtKhevfxPKtyfeb2o4P7s04j4Jtm4QysqvMOMPEvXcajQ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763478541; c=relaxed/simple; bh=b9s039R3AyfTKrLW4QJkKiEj3I6mgg+anQzaMjLPC7s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pJtEENctIw5yCa0PZtrGdMk2fSDIGhl4LuDJ+PsCV0dBbCBgfd/xyT18MknBCZA7HaFC4ET5eLROwbofvI3Ln/H25c/OWaDJsLxKWJXu7I8NdPYXAtdZ4hX7+gPhLD3/i8CD2D6oeJBIav0Z7wBsSqpwzUdQ/YjIzll53nsxsj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Sv9ZFkD1; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Sv9ZFkD1" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-47775fb6cb4so40391745e9.0 for ; Tue, 18 Nov 2025 07:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763478537; x=1764083337; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HinfaPqd1yRAzxd+xjJYcXYd+xWyrMsS3t+eI3gtPdU=; b=Sv9ZFkD1PB5umszGHUg2g3ho+YsOAKfbC+B3lNWoO+6BWbWi+MsMzvqNRFbmdAzafV 9e/qLtZC0xVGFi8R3z9ZJA8hEuDRiqsPYQcCWqlLR+jHy+otXY5Sesq1MjV/QpYrC5L3 dr6HB71wMVpsklWtw3LBUAgX+qyGhVoe696aKTi7D8pPeI4nR9O31DwJ7hxmQE/27NTJ c64gbdfke4rpgfjamaRk0miLe1+pwlWCnjiphxBnjUoOBLKpVJiHVGtOfIPlCipjfyXs 9nkBz9Ru6ow8l569aiIHBR/Zx2KAZw50T7s6U7BoL4CPHg6cj3/aMUmDe5F52FdQ8hG4 4PjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763478537; x=1764083337; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HinfaPqd1yRAzxd+xjJYcXYd+xWyrMsS3t+eI3gtPdU=; b=et86cP0093s3X+OyWURhaiBK/TrNykHTwrHRn0fkmaXdjp74yAg1hXUoJGk00MLi4H eLYA038E2rZdf+y3h6vUXBgBr6Sjpr7mwY3l40BmfusMzfUZ0nz8bKWAkJ/phzNaFRgX 0ulQ9vnVQEapN9z8ZDddnnXUxPIPROmsp7HWN899aqOk5dbgV8osatxFELQg4Ieea0xy 7yTUJAlCIGr75Wyk+GGz9/P/rTDgN59aIoE0r2vhgIK2u9DITw48Z9Vy5aGhUavdDLmi 8N2OMhfcrgH91iyb2oyMC7H/xcuCzy53dlZCuqEElqj1yjkzdUQnYPr8TrR8817A6FaG Hhnw== X-Forwarded-Encrypted: i=1; AJvYcCWBVq4Kbu27Yqlnvp83Rcxzn8ZqCg7Dcv1GvZzyU+nuchXCZMWiPzhae6DDH19wmS+h3JOFxeLaDVug@vger.kernel.org X-Gm-Message-State: AOJu0YxQEP8ZWdFcBLJ6ZOhA007Ne0M2DriQu7xPPguPZUaNaRtGAQWQ nECi82FuDVyU79kZKEOvx+c2TBxDyRz5o272jltnmBV/w2dS8dzfQSKj X-Gm-Gg: ASbGncsZquMcqkYzoYnEBUBY2ENEHmkHjdQnXEEFSrnhw7jfthWZHiY/VgsADuFQx2t Y0GcGWKsA2qw78EryRJEE6SNufbw3VbNMJSN6GB/mDsktdUdFItAorg2NZFgQKosBLVmPkV7Ct4 /Wt5mLGakuzbdITRx4FgRC6UnbGFgLPUwozvjOmCVUyf8Pi1u08fhXFp+QSRf+DEy1sGtbJqGxT pK1vYvqdDVPkM19X/OwM5J+e4t0Uzs83MxaJ1UhHLvsEt2QG7bMvqxMFu78ER0MlGHU6U4C5604 Vek18lbcWEpwtoSIdBjh7pAyVAgQFI3PCtEIN7bHJnIDtgzRLOFJ8OuAPU61MQzQKO5FggrH4w9 jpvTtiuXU6yj03f5XhAnPBjQdpdinRXarJgjrIDzqN5AjoB6NQ+pc+q2t7aJk04Ji2Z7pDpAtNz ZH6kgezhKaiuTvkTsabgx2iAGwrieqmDt3GW/ModeXHsxOgWKUwI8qmhapZN3685t+aZl7xqZoV lgouBZdL1piXkbw X-Google-Smtp-Source: AGHT+IHv1whfW/Gt4BR/61l0viGTeaPUBKraWX/Mr+1w9f4M9OK/6wicCkkZeRbs80bygRAnGOgpxw== X-Received: by 2002:a05:600c:c4ab:b0:477:8b2e:aa7d with SMTP id 5b1f17b1804b1-4778feaf8e6mr180161735e9.30.1763478536873; Tue, 18 Nov 2025 07:08:56 -0800 (PST) Received: from localhost (2a02-842a-9b20-0d01-432b-0dab-f195-2b25.rev.sfr.net. [2a02:842a:9b20:d01:432b:dab:f195:2b25]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47787e36ca3sm397339915e9.5.2025.11.18.07.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Nov 2025 07:08:56 -0800 (PST) From: =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= Date: Tue, 18 Nov 2025 16:07:57 +0100 Subject: [PATCH v9 1/7] dt-bindings: memory: factorise LPDDR props into SDRAM props Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20251118-b4-ddr-bindings-v9-1-a033ac5144da@gmail.com> References: <20251118-b4-ddr-bindings-v9-0-a033ac5144da@gmail.com> In-Reply-To: <20251118-b4-ddr-bindings-v9-0-a033ac5144da@gmail.com> To: Krzysztof Kozlowski , Rob Herring , Conor Dooley , Julius Werner , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= , =?utf-8?q?Cl=C3=A9ment_Le_Goffic?= , Krzysztof Kozlowski X-Mailer: b4 0.15-dev-86b30 From: Clément Le Goffic LPDDR and DDR bindings are SDRAM types and are likely to share the same properties (at least for density, io-width and reg). To avoid bindings duplication, factorise the properties. The compatible description has been updated because the MR (Mode registers) used to get manufacturer ID and revision ID are not present in case of DDR. Those information should be in a SPD (Serial Presence Detect) EEPROM in case of DIMM module or are known in case of soldered memory chips as they are in the datasheet of the memory chips. Signed-off-by: Clément Le Goffic Reviewed-by: Krzysztof Kozlowski Signed-off-by: Clément Le Goffic --- .../memory-controllers/ddr/jedec,lpddr-props.yaml | 74 ----------------- .../memory-controllers/ddr/jedec,lpddr2.yaml | 2 +- .../memory-controllers/ddr/jedec,lpddr3.yaml | 2 +- .../memory-controllers/ddr/jedec,lpddr4.yaml | 2 +- .../memory-controllers/ddr/jedec,lpddr5.yaml | 2 +- .../memory-controllers/ddr/jedec,sdram-props.yaml | 94 ++++++++++++++++++++++ 6 files changed, 98 insertions(+), 78 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 deleted file mode 100644 index 30267ce70124..000000000000 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -%YAML 1.2 ---- -$id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,lpddr-props.yaml# -$schema: http://devicetree.org/meta-schemas/core.yaml# - -title: Common properties for LPDDR types - -description: - Different LPDDR types generally use the same properties and only differ in the - range of legal values for each. This file defines the common parts that can be - reused for each type. Nodes using this schema should generally be nested under - an LPDDR channel node. - -maintainers: - - Krzysztof Kozlowski - -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. - - reg: - description: - The rank number of this LPDDR rank when used as a subnode to an LPDDR - channel. - minimum: 0 - maximum: 3 - - 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. ). - maxItems: 2 - items: - minimum: 0 - maximum: 255 - - density: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - Density in megabits of SDRAM chip. Decoded from Mode Register 8. - enum: - - 64 - - 128 - - 256 - - 512 - - 1024 - - 2048 - - 3072 - - 4096 - - 6144 - - 8192 - - 12288 - - 16384 - - 24576 - - 32768 - - io-width: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - IO bus width in bits of SDRAM chip. Decoded from Mode Register 8. - enum: - - 8 - - 16 - - 32 - -additionalProperties: true diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml index a237bc259273..704bbc562528 100644 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml @@ -10,7 +10,7 @@ maintainers: - Krzysztof Kozlowski allOf: - - $ref: jedec,lpddr-props.yaml# + - $ref: jedec,sdram-props.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml index e328a1195ba6..0d28df3d2bfa 100644 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml @@ -10,7 +10,7 @@ maintainers: - Krzysztof Kozlowski allOf: - - $ref: jedec,lpddr-props.yaml# + - $ref: jedec,sdram-props.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr4.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr4.yaml index a078892fecee..65aa07861453 100644 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr4.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr4.yaml @@ -10,7 +10,7 @@ maintainers: - Krzysztof Kozlowski allOf: - - $ref: jedec,lpddr-props.yaml# + - $ref: jedec,sdram-props.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr5.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr5.yaml index e441dac5f154..cf5d5a8e94b3 100644 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr5.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr5.yaml @@ -10,7 +10,7 @@ maintainers: - Krzysztof Kozlowski allOf: - - $ref: jedec,lpddr-props.yaml# + - $ref: jedec,sdram-props.yaml# properties: compatible: diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,sdram-props.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,sdram-props.yaml new file mode 100644 index 000000000000..fedd66eeb9d5 --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,sdram-props.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/memory-controllers/ddr/jedec,sdram-props.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common properties for SDRAM types + +description: + Different SDRAM types generally use the same properties and only differ in the + range of legal values for each. This file defines the common parts that can be + reused for each type. Nodes using this schema should generally be nested under + a SDRAM channel node. + +maintainers: + - Krzysztof Kozlowski + +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 or ddrX-YYYY,AAAA...-ZZ where X, Y, and Z are lowercase + hexadecimal with leading zeroes, and A is lowercase ASCII. + For LPDDR and DDR SDRAM, X is the SDRAM version (2, 3, 4, etc.). + For LPDDR SDRAM: + - YY is the manufacturer ID (from MR5), 1 byte + - ZZZZ is the revision ID (from MR6 and MR7), 2 bytes + For DDR4 SDRAM with SPD, according to JEDEC SPD4.1.2.L-6: + - YYYY is the manufacturer ID, 2 bytes, from bytes 320 and 321 + - AAAA... is the part number, 20 bytes (20 chars) from bytes 329 to 348 + without trailing spaces + - ZZ is the revision ID, 1 byte, from byte 349 + The former form is useful when the SDRAM vendor and part number are + known, for example, when memory is soldered on the board. The latter + form is useful when SDRAM nodes are created at runtime by boot firmware + that doesn't have access to static part number information. + + reg: + description: + The rank number of this memory rank when used as a subnode to an memory + channel. + minimum: 0 + maximum: 3 + + revision-id: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + SDRAM revision ID: + - LPDDR SDRAM, decoded from Mode Registers 6 and 7, always 2 bytes. + - DDR4 SDRAM, decoded from the SPD from byte 349 according to + JEDEC SPD4.1.2.L-6, always 1 byte. + One byte per uint32 cell (e.g., ). + maxItems: 2 + items: + minimum: 0 + maximum: 255 + + density: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Density of the SDRAM chip in megabits: + - LPDDR SDRAM, decoded from Mode Register 8. + - DDR4 SDRAM, decoded from the SPD from bits 3-0 of byte 4 according to + JEDEC SPD4.1.2.L-6. + enum: + - 64 + - 128 + - 256 + - 512 + - 1024 + - 2048 + - 3072 + - 4096 + - 6144 + - 8192 + - 12288 + - 16384 + - 24576 + - 32768 + + io-width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + I/O bus width in bits of the SDRAM chip: + - LPDDR SDRAM, decoded from Mode Register 8. + - DDR4 SDRAM, decoded from the SPD from bits 2-0 of byte 12 according to + JEDEC SPD4.1.2.L-6. + enum: + - 8 + - 16 + - 32 + +additionalProperties: true -- 2.43.0