Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp219199iob; Mon, 2 May 2022 17:34:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZTfJGkFoQxb+KFlFpKmnf2VRXdi5eyyFfgUh6utfrR6/n8DURrsE0c3sFv1cMLeYT+5ZJ X-Received: by 2002:a62:685:0:b0:50a:5870:10b1 with SMTP id 127-20020a620685000000b0050a587010b1mr13806897pfg.61.1651538058721; Mon, 02 May 2022 17:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651538058; cv=none; d=google.com; s=arc-20160816; b=viM0xybedbsFBWJGrwTHhyjPzuOTlgSWXfUACW8kZARdrsBCPckkVAtBMUJaUhj6gK v2WGdfUDQvzkXVS+mQe7/a4IoFuOvze8HpLJqCkeB9LB+HABQzoEbmqgWmSWatI48vqa AGS4vzSywPbujEanUEn409gNc3SkP6akVVxXM/ed1K6u++sK+/nSD/3jDi9lHVP0Y45W 8kHVcoTJ+65PPUdqNBlt5r0ihxUNsc0Y+N9ZHR2NgTsoMrcwRaxj4mfCPm0ZWviJmmjt 4mtCZbqDiPiEv5pWyBlcTsA6+gnKrzlTRskH75Z/0xEBhluSJcahjfJex3Lnlv98SJ+I Rwyw== 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=B5xgiQuwPDVq6wa2pBHGsA/S0+n6F6tg1rxMU8HQg9Q=; b=Fqc2ci56onPSg9kdp9govZJVqRjmMFwR+D/+FVIlXIbo6aZcJudhmAZtx2yAkBJFHW 2uq0Y+nqBy8XtKJn7xB6hW58g1jsrQ55lvDReWxvxS5uC/4B8ufQCysNwTWes1/FGbCj MgS+zn2NHuswcXqdrHBZ6mDFPhSP1bAcORm+89xRCzTFlmDIkNo4oKhZV3X8L3Cdvw+Q vcWov07TKv8+ruBhMLw0OWQdPy/Qe/4AQ8bF1ssuOAIDhHkQVOU+VodMf/mGynu2T6CB 0L3ha1h8HwMGLMc7ZCHFtap53CptCzVhY0N+ga+Rf+VtCOZKpq16KL0F6ThGx4yVGJCp Ictw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mcE120ii; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j14-20020a170902da8e00b0015823058edasi16891347plx.464.2022.05.02.17.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:34:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mcE120ii; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA3F037BD7; Mon, 2 May 2022 17:27:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239542AbiD2UZg (ORCPT + 99 others); Fri, 29 Apr 2022 16:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239571AbiD2UZd (ORCPT ); Fri, 29 Apr 2022 16:25:33 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A02FB53B76 for ; Fri, 29 Apr 2022 13:22:13 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id m20so17422653ejj.10 for ; Fri, 29 Apr 2022 13:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=B5xgiQuwPDVq6wa2pBHGsA/S0+n6F6tg1rxMU8HQg9Q=; b=mcE120iimXDKlF7XgivbJgAkUJRut3u22lfY1qcg5dF4wBAejZVviizpd9QnMZA03a a4O+PDTm1C+oyCjfvUFiyFfPwd4Pwq5pwv9FsgUl7ohsZZ7xQtITz6LjK6usT0ELjzK4 MDQYsDK2+NMe6Ff0Ukby5fyhFZf8q6I6j7yriQ/pJbk9cQDvP9JPzqKurw3JQhYSVAA5 nMUuAeVDdEnbI5eAcwEUlL/87tKb+pkmK9arU7u5s8B7GrZbHyxOPtW86MGKNTW1cPEf fuhDF1sgFbZSX08hvTx1X+ay6UpebhSVeqAHx2dL5y7id82s4HzHkRgxjMlCTNm1YHBe SdgA== 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=B5xgiQuwPDVq6wa2pBHGsA/S0+n6F6tg1rxMU8HQg9Q=; b=5M9zXNWuIc2tvh/LEFcJsc/N0kaVqeXcrA7Tko3aEvM01JIY8oc0Uk3HcRE/1GP6tE yaQ25UKIxIq5fIH0bTyZBwbEz3DHT3XAo8YjlJgH0eIFPuL9iJqnTiMBplLrW9xJ+xqT HW4fV54nPz5n/7/UjVp4FdoXvuUuKybgQomUJmxH+CaQpZlxoOJvrke1k6uKSEDC+6G+ Yl57neDPLykAo/OU/aTDfiYp3QhJIY9Bstckh6vkpQl5CGtU5u/pDFh4jj5PGsm4TzX6 Xf8d4S5sMnI6oAwxPNlfPaNH9anOCjhUQK/Tqv89wTnnH07pZfL3aBpASOYZ/I2fS/g5 Q6SQ== X-Gm-Message-State: AOAM533FNM6GBbkWkZl+v/eMu6sCtUUzUfP5dot/+ng0hXKQyY84dkgB SDtv3BHGbnS8DHT7BCzoOocxxA== X-Received: by 2002:a17:907:c01a:b0:6f3:b313:2fd1 with SMTP id ss26-20020a170907c01a00b006f3b3132fd1mr971345ejc.680.1651263732039; Fri, 29 Apr 2022 13:22:12 -0700 (PDT) Received: from [192.168.0.176] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id w23-20020a170907271700b006f3ef214d9fsm959747ejk.5.2022.04.29.13.22.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Apr 2022 13:22:11 -0700 (PDT) Message-ID: Date: Fri, 29 Apr 2022 22:22:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser Content-Language: en-US To: Mikhail Zhilkin , 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> <25da3f43-c46e-8108-2da9-0e4f2b7cc1a4@gmail.com> <1c19faf9-fc1c-9adf-d038-97b673a8f0be@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <1c19faf9-fc1c-9adf-d038-97b673a8f0be@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 29/04/2022 17:26, Mikhail Zhilkin wrote: > On 4/29/2022 9:46 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. >> Yes, the fixed-partitions.yaml would have to be changed to allow extension. > > Well. > >>> 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? >> Not really, I don't understand why do you need it > > The main idea is keeping original Sercomm firmware behavior: > > 1. If dynamic partition map found then use offsets and mtd sizes stored > in partition map. It's provided by "sercomm,sc-partitions" compatible. > > 2. If dynamic partition map doesn't exist or broken then default values > (from dts) are used. It's provided by "fixed-partitions" compatible. Then you need to adjust fixed-partitions for such case. See syscon case (all over the tree and Documentation/devicetree/bindings/mfd/syscon.yaml). > >> and it does not >> include our previous talks. > > At the time, I didn't realize how important is it. Understanding began > to come after dozens of experiments and checking the similar Linux patches. > >>> 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: >> It still misses vendor prefix and we agreed you don't need it, didn't we? > > Do you mean "sercomm" vendor prefix? If so then we agreed that I include > it in a separate patch: There was some misunderstanding then. We talk here about scpart-id name. Adding vendor prefix cannot be a separate patch because it does not make much sense. You add new property with wrong name and immediately change/fix it in next patch. No, it should have proper name since beginning. The property is not used in the kernel. > > Link: > https://lore.kernel.org/linux-mtd/1b391399-984b-7a63-3265-62ef09caec39@gmail.com/ > > I'm going to send it in v3: > > --- > dt-bindings: Add Sercomm (Suzhou) Corporation vendor prefix > > Update Documentation/devicetree/bindings/vendor-prefixes.yaml to include > "sercomm" as a vendor prefix for "Sercomm (Suzhou) Corporation". > Company website: > Link: https://www.sercomm.com/ > > Signed-off-by: Mikhail Zhilkin > --- >  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ >  1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml > b/Documentation/devicetree/bindings/vendor-prefixes.yaml > index 01430973ecec..65ff22364fb3 100644 > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml > @@ -1082,6 +1082,8 @@ patternProperties: >      description: Sensirion AG >    "^sensortek,.*": >      description: Sensortek Technology Corporation > +  "^sercomm,.*": > +    description: Sercomm (Suzhou) Corporation This can be separate patch, but it's separate issue... Best regards, Krzysztof