From mboxrd@z Thu Jan 1 00:00:00 1970 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 2C357C433EF for ; Mon, 6 Jun 2022 15:14:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240352AbiFFPOo (ORCPT ); Mon, 6 Jun 2022 11:14:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240345AbiFFPOn (ORCPT ); Mon, 6 Jun 2022 11:14:43 -0400 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B35DEEB1; Mon, 6 Jun 2022 08:14:42 -0700 (PDT) Received: by mail-ej1-x62b.google.com with SMTP id y19so29580587ejq.6; Mon, 06 Jun 2022 08:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=wdA5SSs2A+GftYSjZhbZ3WXsisBDCmDB/JAxOYIkUdU=; b=Erz1QKme2uzu1CL53DykcnrB+qfgjJVnrpzSTvOrs+a/I69PggV9QsYYLXjzqxHebU atO+cXtLR7n5ZB6wEgQ6IdC7lYVVlOBMbGAAUyXlYZBNl1FZgYz6TyUWfIAqXNbSXL2T UG9Zo2iohTfIMSlrKX2DPboaZgVGBb57qjEyd0DhZMoYf7eWWUNrKmfleK2dDnVruHHs bK7wxDw/KOtX5hkmXJrnkVW4hhXZ9DQR3zktMyBdMGmPnvC6GGaeQLXbYSn1zNDASMZK hNDcpkbLwl71VmMIITEVDlEXBFz0CGCrQ9VkpyBbLzCgSGeilwXFVz9GQVUfu8L4dHTp 7DzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wdA5SSs2A+GftYSjZhbZ3WXsisBDCmDB/JAxOYIkUdU=; b=evtPmtFBR/UiziSpdssWZnMGh9vRui6yLULDniENbx27wNsWuY8VH3SOGZOfYX7ZYX Kj79dUnGrLe6P+CnBhAUrksHpCFdkQmXo2uAjCfTS1XVXFET+5Fll/2n7JmlQ0XNXiyi etL/xQtVtqVn6IutL6/Bqe9pxvcL07oa5iuohZ/0GUjWvCIuoikRD0Cswg67l0nAU7vf GXkCmmzKu6QDUlUSjS+GiQzBZKUIadjlLdpfhFxZIDXN+fZZi8GKrjDX7HnmHOJHq2un NqgMEsNEsmAhMraFxSotgOmF7/KiN0qbX4K1shbRFLZXpp8o/XgLSqEI7CP2U4+VU24A gvBA== X-Gm-Message-State: AOAM533PzQkzZYKftPB1zbbAe8H9Gf/NkbmrIQI4K/xSSVm/sfXFwpQF YP1lp9YQvR/Z8CZBknsa6YM= X-Google-Smtp-Source: ABdhPJyt2liP+1F1RvMMxu7z+WgrxpjuApud9EFnbwkjgtInQOBqMpdZdFYR9tePcSfc/J8YciKCbQ== X-Received: by 2002:a17:906:8301:b0:6e4:896d:59b1 with SMTP id j1-20020a170906830100b006e4896d59b1mr21131479ejx.396.1654528481019; Mon, 06 Jun 2022 08:14:41 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id be5-20020a0564021a2500b0042e09f44f81sm7494001edb.38.2022.06.06.08.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 08:14:40 -0700 (PDT) From: Ansuel Smith To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Greg Kroah-Hartman , Jens Axboe , Ansuel Smith , =?UTF-8?q?=EF=BF=BDecki?= , Manivannan Sadhasivam , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 1/3] dt-bindings: mtd: partitions: Support label only partition Date: Mon, 6 Jun 2022 17:14:15 +0200 Message-Id: <20220606151417.19227-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220606151417.19227-1-ansuelsmth@gmail.com> References: <20220606151417.19227-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document new partition nodes that declare only the label instead of the reg used to provide an OF node for partition registred at runtime by parsers. This is required for nvmem system to declare and detect nvmem-cells. With these special partitions, the reg / offset is not required. The label binding is used to match the partition allocated by the parser at runtime and the parser will provide reg and offset of the mtd. NVMEM will use the data from the parser and provide the NVMEM cells declared in the DTS, "connecting" the dynamic partition with a static declaration of cells in them. Signed-off-by: Ansuel Smith --- .../bindings/mtd/partitions/partition.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml index e1ac08064425..bff6fb980e6b 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml @@ -11,6 +11,13 @@ description: | relative offset and size specified. Depending on partition function extra properties can be used. + A partition may be dynamically allocated by a specific parser at runtime. + In this specific case, the label is required instead of the reg. + This is used to assign an OF node to the dynamiccally allocated partition + so that subsystem like NVMEM can provide an OF node and declare NVMEM cells. + The OF node will be assigned only if the partition label declared match the + one assigned by the parser at runtime. + maintainers: - Rafał Miłecki @@ -22,6 +29,8 @@ properties: label: description: The label / name for this partition. If omitted, the label is taken from the node name (excluding the unit address). + With dynamically allocated partition the label is required and won't + fallback to the node name. read-only: description: This parameter, if present, is a hint that this partition @@ -41,7 +50,10 @@ properties: immune to paired-pages corruptions type: boolean -required: - - reg +if: + not: + required: [ reg ] +then: + required: [ label ] additionalProperties: true -- 2.36.1