Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp137371rwn; Wed, 14 Sep 2022 17:34:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49N7XD5URnEVdXdBdHJ2HcKLCjFv7rWIGPRZijpyAbP9G3YoT5iwgOa1Hj/XxxTQE7LV20 X-Received: by 2002:a17:902:7d86:b0:170:a752:cbd1 with SMTP id a6-20020a1709027d8600b00170a752cbd1mr1641365plm.17.1663202073480; Wed, 14 Sep 2022 17:34:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663202073; cv=none; d=google.com; s=arc-20160816; b=RF+NexfwlSxV2SsxIjCfJxk79SShXvXG75HIUBi28m5fP7Z3lP+Otls0cz4fbo0cqw brleox7LYYNwpXowzZMr5MN2+2WeSsPWNd4UuwF1Bqw6EWtvsHS9ZSg27irW1yooOfTS /LZBbNLLxZyLpXCHT0VniHOhiTbVzAqkquuZ5TneBAGx3kAjYbVlinre52K6ZfOjI+8V ztRg+sDuK2XTY7ZNOGIcMX3uxJBg56rL26BZ3rwsVQIPbH7p2pv5CH5oyLYC3UDNBRL8 Tprpyfx4zV2N2DTJbXuStoc6DEMpXZZSdZGWTNL0x1JQC6YXqmU3weMTDBTFOWo5zpEr czIg== 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=++UiSGqIH4IC0nsofuOOHjKfbTWnq3EwUA/auAISft0=; b=udomSAYizeNSUtmn+RvOguzTC3eRoLXc/j+ISvr2PmWOq6DjBMsE7fYM3yHjY0239u fP77puWssLue1mylbsuPN9cmIBJ5bM38vpTSvG2Y3lbg1mC6KAPJa3gmmY0i7X62xa6U QZ5TsVbugEk1026CUODAA5fe7AlN3Uidx4pfjXpcxe6IU5Yc2Xvi7ii2WDPPMiHU9vmC rcjl8kc0mrZ2n9Ld72hffeGFXOa+rCIRV1m3rznPf5bU6xHkqVjbY7qJKDz9iVYC25UM IIq6HfHhJMCSjHmoDdfbUgeK7eQdrgdyPizw65+VzH/8XM1RFjp4/jvQALNzZKm+y2Kv Usyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=l0eOWm0H; 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 w9-20020a17090a528900b001fda01de650si15483259pjh.122.2022.09.14.17.34.22; Wed, 14 Sep 2022 17:34:33 -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=l0eOWm0H; 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 S230084AbiIOAci (ORCPT + 99 others); Wed, 14 Sep 2022 20:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbiIOAcf (ORCPT ); Wed, 14 Sep 2022 20:32:35 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27DCE89827 for ; Wed, 14 Sep 2022 17:32:32 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id j12so16439017pfi.11 for ; Wed, 14 Sep 2022 17:32:32 -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=++UiSGqIH4IC0nsofuOOHjKfbTWnq3EwUA/auAISft0=; b=l0eOWm0HW0P9tmohrgUbbkAbBE7RuBb1Z0UXWM6wCRubqY9gWQvdENXDha62bt9j7B wR/3VN7N2Tz5o0Xw95ILYuDmibyLJ8ULhVMqiWQLuEuAUT05rv4fanMnzFUBhp1Pn86N Jb5quaIYmZ5Ei+s9d01fXq/YZYYnsCnFnvMHw= 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=++UiSGqIH4IC0nsofuOOHjKfbTWnq3EwUA/auAISft0=; b=s+V7b8m/qzr5V3JgS2U9zgNUleEm89BHRDmSJq98kVMQEKwWtM0/S4MCtexusL/n9/ jkfKtcB8wpIuh8JT6DLO9VSXWs704lEgwa3mquS6ft0al8jFvjdTftv8MsOWkmrLnR+6 q12RMQYQ5lefWqObeBjSBPhLtjYZT5DcrUnUIT5OP1dgyTAvs35jvPTn+1M/MbCIZolf RX/PMlbdSHxeakNjvz0RjJJfEG0BGoqaoTNvKWPwdlOBaDix7QWzh1k0Ln24380QzzaF tiK9VORzAuTVd72KfwOb7o7VAhqIDc/3fm1s/7YUnD9y7vTpmjyTvGRGXPfGX5NdjEoR 4KMw== X-Gm-Message-State: ACgBeo1whmyFAMWThl9wo3/E1XxoqSmvqZN0AkT1p9EhYi9+TGvXbV/U xJ8QehhCXO5sb3iB+IcdLDS/CQ== X-Received: by 2002:a63:2bcc:0:b0:439:36bb:c036 with SMTP id r195-20020a632bcc000000b0043936bbc036mr10687283pgr.447.1663201952089; Wed, 14 Sep 2022 17:32:32 -0700 (PDT) Received: from jwerner-p920.mtv.corp.google.com ([2620:15c:202:201:347e:2a81:558b:d912]) by smtp.gmail.com with ESMTPSA id 199-20020a6214d0000000b0053e22c7f135sm10991202pfu.141.2022.09.14.17.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 17:32:31 -0700 (PDT) From: Julius Werner To: Krzysztof Kozlowski , Rob Herring Cc: Dmitry Osipenko , Doug Anderson , Jian-Jia Su , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Julius Werner Subject: [PATCH 1/4 v4] dt-bindings: memory: Factor out common properties of LPDDR bindings Date: Wed, 14 Sep 2022 17:32:19 -0700 Message-Id: <20220915003222.1296421-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 - v3: - no changes - v4: - removed quotes from schema $ref strings 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..e5e15d288d89b2 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..0f7ab51842ae09 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