Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2884785iob; Sun, 1 May 2022 00:03:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8rgnunV2XxIWYrNuTArbbiHCDTOXX+RT9IVEF3WcP//uakJbPzBhKmMmRmoveeyLiLktu X-Received: by 2002:a05:651c:1a0b:b0:24f:2e86:6089 with SMTP id by11-20020a05651c1a0b00b0024f2e866089mr4549560ljb.439.1651388601802; Sun, 01 May 2022 00:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651388601; cv=none; d=google.com; s=arc-20160816; b=B4JjOs7+BRfPNKusKOdq2eOvQBOluzyLozajernSDgRtKoPLrOsS0MPRdv/d6KvkH/ rw0qWm97DnagWaRwAeHBm1HuwsKlm02pTldw1Rc8PX2XboIZy7QsWGw5Coweqz6j6k4+ nNjzBjKn0fcIhqX1I7mzNejivEQ5nVoc/1QyfL7leXm2wHERJncNsz4jx6g4k4fQ8lvS Rx5auSSSOYp0VG+L+vLPSQuf3hBVIx+dLHF5sxPUDmgsWr3YOMQKRYho906M74hvdkiX mOFOdegcAK50tD+qDa8Q/vxVNzn49AXTSON2DoH61idrMz1w9/XFJwOPRqzuVWyQRBe0 Wkog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SzJXhZg7qGrBl+J121B58kcKO0wVfv/TnHF/oCwmV6o=; b=dAdq5AtqlCj4bVrewtEQvT3Zn2Uh+SlMntHgbPwWbMhtRMLKOAxJGBKckGsyGc/YCf feBtKihIpL8y2rkUvwXK3BZ7RUdlMWganZ/T81PWdMC2aM8941+rqw4uhufftZznYlOx JUwDf2kB6Fg4QZlq2eJgFgIHWVk69Mz4D0CmwHuMCvuERVtcleWHBH01Nw/cG0nm8xRr OGXRXTRWu2k3sFjjAhyhpBxIRpvog4DYe75wby2IvF+wLewyWMy8ZrDqLNmfU6tazT8L W1RKwodkVZWUDCu1lNDOTnwvM9zgBP9R+Vfk20ZWZ9qeEd1xX/fdQ78tXqguSGvok9Vy ypow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hzmBfUP0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020a0565123b8100b004725e5a3f88si2722842lfv.295.2022.05.01.00.02.33; Sun, 01 May 2022 00:03:21 -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=@gmail.com header.s=20210112 header.b=hzmBfUP0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349102AbiD1P17 (ORCPT + 99 others); Thu, 28 Apr 2022 11:27:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243844AbiD1P16 (ORCPT ); Thu, 28 Apr 2022 11:27:58 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D02EB7157; Thu, 28 Apr 2022 08:24:43 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id q185so7169067ljb.5; Thu, 28 Apr 2022 08:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=SzJXhZg7qGrBl+J121B58kcKO0wVfv/TnHF/oCwmV6o=; b=hzmBfUP04rp5lGzXAo7D1RGUZ1S6j/COkdetxgNRb+SU7A+uun0bJ78x2DdmHJ5fHj TT3pTRQ0Rm5XlHh4ZjpHbZXAcVunIS5U9CRKGaVwRYQdAbE/kNkUbaxqJAznMOJCUqwU jqFTZ68BTSNvbHbajn31p8UYJLPGRUN3tsduXGryeD4ia9HnFkAHrwtYyX8WdlUcKyaP 07jVeXi4kaBDcUsV3NuC+nWE2FES5WwKFOvoM2Ge3wq2ijeZwSmKlFpyfPfu/qFRc7fG iYqihaFt4y/OCtpE+lKrTKd8hJNdco+9QJB72olUze5Nq9UUsf5tpEjf7opUOc+RVIaA 89KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=SzJXhZg7qGrBl+J121B58kcKO0wVfv/TnHF/oCwmV6o=; b=Go/qvcigXmycv0B2xLFrd/yKuSNFQ70cADca58eP8o0EkpR9zoWYgomqyWpp4cBTWC YkjNEHA0abvyltezXWRpRXdxrzErvBrK14uafCYu/8Kte5BxpiOx60QdeV1H4+H34nSL scpYWCcIQA08YOYEGyCA7mXIpYFbqQ89JDBCvkxIEnHP+1597QTm7uGISDAbjbfMHui/ ZwyCNBPUqebrZoWI22KCamqzu3AHJwmNpQoRGeW8LOnqEuxbdsfpEairAVPmdjoHEPDW X4iCiaKKsUtIEgtgHDMWAyqb979rvAwJKfIlX47LzEFFeiEbE6OkQuFOPgyMkXUCvzvo k3HQ== X-Gm-Message-State: AOAM531XG6AXv5eYAmf/9KRA4fKb7bjNB4WznPE2emNEUVo3lDRh6Eyr yRrELoWUrm7w7sOc63IOgXY= X-Received: by 2002:a2e:1f11:0:b0:24b:6b35:42e3 with SMTP id f17-20020a2e1f11000000b0024b6b3542e3mr21503724ljf.195.1651159481353; Thu, 28 Apr 2022 08:24:41 -0700 (PDT) Received: from ?IPV6:2a06:a003:501a:a7ce:d836:2ab4:b41d:7819? ([2a06:a004:d009:c8fa:102c:912a:a6e3:41ea]) by smtp.gmail.com with ESMTPSA id s11-20020a2e9c0b000000b0024ace83744asm19844lji.116.2022.04.28.08.24.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Apr 2022 08:24:40 -0700 (PDT) Message-ID: <25da3f43-c46e-8108-2da9-0e4f2b7cc1a4@gmail.com> Date: Thu, 28 Apr 2022 18:24:35 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser Content-Language: en-US To: Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski Cc: NOGUCHI Hiroshi , Karim , M , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20220406195557.1956-1-csharper2005@gmail.com> <20220406195946.2019-1-csharper2005@gmail.com> <8d0d8b27-35ff-3693-cf80-897b80c26b4e@linaro.org> <57bebf2f-af4c-b2d9-10e5-19e5104946fb@gmail.com> <29cfa017-bbaf-3aba-fe1d-06771957dbaa@linaro.org> <1b391399-984b-7a63-3265-62ef09caec39@gmail.com> From: Mikhail Zhilkin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Hi, Krzysztof, On 4/10/2022 11:18 AM, Krzysztof Kozlowski wrote: > I am sorry, but you changed now a lot in the bindings and it looks > entirely different. Things previously being correct now are wrong, so > rather start from your old bindings... Looks like I'm a bit confused... I use dual "compatible" in my real dts and I realized that: 1. Therefore I have to use  dual "compatible" in example too: compatible = "sercomm,sc-partitions", "fixed-partitions"; 2. When I'm trying to reuse "fixed-partitions" compatible from fixed-partitions.yaml in my new .yaml I get "too long" errors. Real dts: Link: https://github.com/openwrt/openwrt/blob/edcc1a9a734bb3fcdc9242025290d3f173e71b78/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts#L79 So, I currently found another solution - to extend fixed-partitions.yaml with "sercomm,sc-partitions". Is It ok from your side? Can I use this code in v3? diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index ea4cace6a955..9eebe39a57fb 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -19,7 +19,11 @@ maintainers:    properties:    compatible: -    const: fixed-partitions +    oneOf: +      - const: fixed-partitions +      - items: +          - const: sercomm,sc-partitions +          - const: fixed-partitions      "#address-cells": true   @@ -27,7 +31,18 @@ properties:    patternProperties:    "@[0-9a-f]+$": -    $ref: "partition.yaml#" +    allOf: +      - $ref: "partition.yaml#" +      - if: +          properties: +            compatible: +              contains: +                const: sercomm,sc-partitions +        then: +          properties: +            scpart-id: +              description: Partition id in Sercomm partition map +              $ref: /schemas/types.yaml#/definitions/uint32    required:    - "#address-cells" @@ -119,3 +134,29 @@ examples:              };          };      }; +  - | +    partitions { +        compatible = "sercomm,sc-partitions", "fixed-partitions"; +        #address-cells = <1>; +        #size-cells = <1>; + +        partition@0 { +            label = "u-boot"; +            reg = <0x0 0x100000>; +            scpart-id=<0>; +            read-only; +        }; + +        partition@100000 { +            label = "dynamic partition map"; +            reg = <0x100000 0x100000>; +            scpart-id = <1>; +        }; + +        partition@200000 { +            label = "Factory"; +            reg = <0x200000 0x100000>; +            scpart-id = <2>; +            read-only; +        }; +    }; -- 2.25.1 >> + >> +additionalProperties: true > This is wrong, why it became true? You're right. Got it > Best regards, > Krzysztof -- Best regards, Mikhail