Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp275400rwn; Wed, 7 Sep 2022 16:35:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TNBBroypSgmzApp4NvAETVPY2NPyR2PQ/szixhvUOsKQywzm1KpFTnPY2LGfjnxZAn/vE X-Received: by 2002:a17:902:d14c:b0:176:acfb:a84c with SMTP id t12-20020a170902d14c00b00176acfba84cmr6380246plt.159.1662593731622; Wed, 07 Sep 2022 16:35:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662593731; cv=none; d=google.com; s=arc-20160816; b=gAyEtCs8zjKFsO17To84e6zmSe1G/PA/PZ/duUmlpjeuPPQKey7pyPrQQVyZHzJz+e OgG/4HxQNAuOJIomZ0IlE40QEpREf0FqZZ8dSSy9XCH1i+NfojuwkCbXFu1NxJftuKcY 9BHFnlZ6Vjob5n4GNCxSBzemj8vFOlqWtLCJivRwEuGhN5ywXxOypcg6KSjpzJ4lzV5v aSDctqemZBuAt2TjX+eaUFhShsiZ9aTOFPDJTWUDQQhr6VNw4Aa5DNQDZltZ9vHg3d1o AhYsMJkZ8y8oN2SqoHZlYKIniHBSm4L2Y+HoBD0y1lvNXyZYMgNzn+ngbnbGsEV/66Xi 8IYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nAzRb5IG40N9kD80lZ5f/eFJ3lUDj53vPPmtb3g2dNA=; b=vth+WQAYZYMyT8Jc6yKE8hWMr9Nr+Iw/Vaj531IHCZ7RMCrG0eEX8Q3Z/ojPpB1k16 mfkwHmkYcjDo9S2QG2VvmTIghJ67mzSPXLfnvv2oEXn3mfyEtcepGAirP4wSAdmnFRqx LOBESaz4fBI99j+bv/y5Y2fUwE6FsPRqk+5m2Btp9LRdVPp8GzitEkeC5c+X+JB/uZSH UXlsxSpOOSQl5zSfYg6kwrKhYg04YOxWxWJtl2TL1omnNAXDkzI0OkLIG9CZ3tO686TE VedY3JTitdTfj7pPxQJToJ4ZmPp6gimYmJESo7cluDzzV6JEiOigrqoR3g/t2wHzIOFe Zw/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ehzYxHgo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a631a41000000b0042bb9a64cb7si15368259pgm.53.2022.09.07.16.35.15; Wed, 07 Sep 2022 16:35:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ehzYxHgo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbiIGX3o (ORCPT + 99 others); Wed, 7 Sep 2022 19:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbiIGX33 (ORCPT ); Wed, 7 Sep 2022 19:29:29 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07CD65AF for ; Wed, 7 Sep 2022 16:29:21 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id t65so4094416pgt.2 for ; Wed, 07 Sep 2022 16:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=nAzRb5IG40N9kD80lZ5f/eFJ3lUDj53vPPmtb3g2dNA=; b=ehzYxHgobx7obM5HHdDeMRSpB773IBQaabyUfdYTjMa+y945g0J9mPBOGR+LNF8RON kfz0/JBcMnTaDtjoQVaFkl6ad1O8zOSnIA/wAJBRDV7JHiLBCz11ms9/gK0LKThoSkw2 1/Jk05Bgn/su1PLyKkPwnjsyEAswVGF5HejoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=nAzRb5IG40N9kD80lZ5f/eFJ3lUDj53vPPmtb3g2dNA=; b=P76M5aWH98kId4NBWeW635OHKzF5WDgkjyLUNWLqIa6/u2HWrZXy+Zh5BbR/LPw9zE 2FULQ2zE+vECIW6NbWxdWkDhSgJlWvGxO+/jRtitimm+8fBahMa+UpNOTKlxJHuc7rPM tnJqET3i23sliiXaMT6OYBDZqZLrk2+n9AO6a6BW5vsbmhvZ+Y1z0Sw8ETeboySjuOvN 3vcR1tNgC4uSn6yyyBaJkO7rat+rhbKAuVrbTEisJFOKdK9W6TKC90K25yxnlJucvzCG 0xSGEPTTkb6JafnATndKrTN9ZA+AoEl4DDRzrPF9/Muqi8NwgYQDbV+QIBApy/7qHsMG rQNw== X-Gm-Message-State: ACgBeo1B4v4gpZLQWUqlj8FEHH/wtVWdmlbt1AjS0BsI79Ueg3v1Wvgy LyTm6cpSACBxkyQowZTPhe0rQQ== X-Received: by 2002:a05:6a00:1d1a:b0:537:d750:65b5 with SMTP id a26-20020a056a001d1a00b00537d75065b5mr6318852pfx.85.1662593361201; Wed, 07 Sep 2022 16:29:21 -0700 (PDT) Received: from jwerner-p920.mtv.corp.google.com ([2620:15c:202:201:1cee:f8f:cc9f:568f]) by smtp.gmail.com with ESMTPSA id g6-20020a17090a708600b002000dabc356sm201521pjk.45.2022.09.07.16.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 16:29:20 -0700 (PDT) From: Julius Werner To: Krzysztof Kozlowski Cc: Rob Herring , Dmitry Osipenko , Doug Anderson , Jian-Jia Su , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julius Werner Subject: [PATCH 1/4 v2] dt-bindings: memory: Factor out common properties of LPDDR bindings Date: Wed, 7 Sep 2022 16:29:11 -0700 Message-Id: <20220907232914.243502-1-jwerner@chromium.org> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The bindings for different LPDDR versions mostly use the same kinds of properties, so in order to reduce duplication when we're adding support for more versions, this patch creates a new lpddr-props subschema that can be referenced by the others to define these common parts. (This will consider a few smaller I/O width and density numbers "legal" for LPDDR3 that are usually not used there, but this should be harmless.) Signed-off-by: Julius Werner --- .../ddr/jedec,lpddr-props.yaml | 52 +++++++++++++++++++ .../memory-controllers/ddr/jedec,lpddr2.yaml | 40 ++------------ .../memory-controllers/ddr/jedec,lpddr3.yaml | 32 ++---------- 3 files changed, 60 insertions(+), 64 deletions(-) create mode 100644 Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml Changelog: - v2: - removed minItems - reordered io-width enum from lowest to highest - moved `$ref` below `mainainers` - removed part about undeprecating manufacturer-id diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml new file mode 100644 index 00000000000000..02700ac3c387ec --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr-props.yaml @@ -0,0 +1,52 @@ +# 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. + +maintainers: + - Krzysztof Kozlowski + +properties: + 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 + - 4096 + - 8192 + - 16384 + - 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 9d78f140609b6c..65f4926d39c254 100644 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr2.yaml @@ -9,6 +9,9 @@ title: LPDDR2 SDRAM compliant to JEDEC JESD209-2 maintainers: - Krzysztof Kozlowski +allOf: + - $ref: "jedec,lpddr-props.yaml#" + properties: compatible: oneOf: @@ -41,41 +44,6 @@ properties: 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. ). - minItems: 2 - maxItems: 2 - items: - minimum: 0 - maximum: 255 - - density: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Density in megabits of SDRAM chip. Obtained from device datasheet. - enum: - - 64 - - 128 - - 256 - - 512 - - 1024 - - 2048 - - 4096 - - 8192 - - 16384 - - 32768 - - io-width: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - IO bus width in bits of SDRAM chip. Obtained from device datasheet. - enum: - - 32 - - 16 - - 8 - tRRD-min-tck: $ref: /schemas/types.yaml#/definitions/uint32 maximum: 16 @@ -168,7 +136,7 @@ required: - density - io-width -additionalProperties: false +unevaluatedProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml index 48908a19473c3f..91b64943062472 100644 --- a/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/ddr/jedec,lpddr3.yaml @@ -9,6 +9,9 @@ title: LPDDR3 SDRAM compliant to JEDEC JESD209-3 maintainers: - Krzysztof Kozlowski +allOf: + - $ref: "jedec,lpddr-props.yaml#" + properties: compatible: items: @@ -20,24 +23,6 @@ properties: const: 1 deprecated: true - density: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - Density in megabits of SDRAM chip. - enum: - - 4096 - - 8192 - - 16384 - - 32768 - - io-width: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - IO bus width in bits of SDRAM chip. - enum: - - 32 - - 16 - manufacturer-id: $ref: /schemas/types.yaml#/definitions/uint32 description: | @@ -45,15 +30,6 @@ properties: deprecated, manufacturer should be derived from the compatible. deprecated: true - revision-id: - $ref: /schemas/types.yaml#/definitions/uint32-array - minItems: 2 - maxItems: 2 - items: - maximum: 255 - description: | - Revision value of SDRAM chip read from Mode Registers 6 and 7. - '#size-cells': const: 0 deprecated: true @@ -206,7 +182,7 @@ required: - density - io-width -additionalProperties: false +unevaluatedProperties: false examples: - | -- 2.31.0