All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Zhilkin <csharper2005@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: NOGUCHI Hiroshi <drvlabo@gmail.com>, Karim <Karimdplay@gmail.com>,
	M <x1@disroot.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser
Date: Fri, 29 Apr 2022 18:26:40 +0300	[thread overview]
Message-ID: <1c19faf9-fc1c-9adf-d038-97b673a8f0be@gmail.com> (raw)
In-Reply-To: <b279040a-a782-a2ca-2acb-2d8f07709081@linaro.org>

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.

> 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:

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 <csharper2005@gmail.com>
---
 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
   "^sff,.*":
     description: Small Form Factor Committee
   "^sgd,.*":
-- 
2.25.1

> Best regards,
> Krzysztof

-- 
Best regards,
Mikhail


WARNING: multiple messages have this Message-ID (diff)
From: Mikhail Zhilkin <csharper2005@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: NOGUCHI Hiroshi <drvlabo@gmail.com>, Karim <Karimdplay@gmail.com>,
	M <x1@disroot.org>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser
Date: Fri, 29 Apr 2022 18:26:40 +0300	[thread overview]
Message-ID: <1c19faf9-fc1c-9adf-d038-97b673a8f0be@gmail.com> (raw)
In-Reply-To: <b279040a-a782-a2ca-2acb-2d8f07709081@linaro.org>

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.

> 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:

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 <csharper2005@gmail.com>
---
 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
   "^sff,.*":
     description: Small Form Factor Committee
   "^sgd,.*":
-- 
2.25.1

> Best regards,
> Krzysztof

-- 
Best regards,
Mikhail


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2022-04-29 15:26 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 19:55 [PATCH v2 0/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser Mikhail Zhilkin
2022-04-06 19:55 ` Mikhail Zhilkin
2022-04-06 19:59 ` [PATCH v2 1/2] " Mikhail Zhilkin
2022-04-06 19:59   ` Mikhail Zhilkin
2022-04-07  7:48   ` Krzysztof Kozlowski
2022-04-07  7:48     ` Krzysztof Kozlowski
2022-04-09 12:26     ` Mikhail Zhilkin
2022-04-09 12:26       ` Mikhail Zhilkin
2022-04-09 12:43       ` Krzysztof Kozlowski
2022-04-09 12:43         ` Krzysztof Kozlowski
2022-04-09 18:04         ` Mikhail Zhilkin
2022-04-09 18:04           ` Mikhail Zhilkin
2022-04-09 18:17           ` Mikhail Zhilkin
2022-04-09 18:17             ` Mikhail Zhilkin
2022-04-10  8:18             ` Krzysztof Kozlowski
2022-04-10  8:18               ` Krzysztof Kozlowski
2022-04-28 15:24               ` Mikhail Zhilkin
2022-04-28 15:24                 ` Mikhail Zhilkin
2022-04-29  6:46                 ` Krzysztof Kozlowski
2022-04-29  6:46                   ` Krzysztof Kozlowski
2022-04-29 15:26                   ` Mikhail Zhilkin [this message]
2022-04-29 15:26                     ` Mikhail Zhilkin
2022-04-29 20:22                     ` Krzysztof Kozlowski
2022-04-29 20:22                       ` Krzysztof Kozlowski
2022-04-30  8:04                       ` Mikhail Zhilkin
2022-04-30  8:04                         ` Mikhail Zhilkin
2022-04-30 14:35                         ` Krzysztof Kozlowski
2022-04-30 14:35                           ` Krzysztof Kozlowski
2022-04-30 18:54                           ` Mikhail Zhilkin
2022-04-30 18:54                             ` Mikhail Zhilkin
2022-05-01  8:17                             ` Krzysztof Kozlowski
2022-05-01  8:17                               ` Krzysztof Kozlowski
2022-05-01 14:51                               ` Mikhail Zhilkin
2022-05-01 14:51                                 ` Mikhail Zhilkin
2022-05-01 16:17                                 ` Krzysztof Kozlowski
2022-05-01 16:17                                   ` Krzysztof Kozlowski
2022-05-02  5:42                                   ` Mikhail Zhilkin
2022-05-02  5:42                                     ` Mikhail Zhilkin
2022-04-10  8:14           ` Krzysztof Kozlowski
2022-04-10  8:14             ` Krzysztof Kozlowski
2022-04-07 13:50   ` Rob Herring
2022-04-07 13:50     ` Rob Herring
2022-04-09 12:35     ` Mikhail Zhilkin
2022-04-09 12:35       ` Mikhail Zhilkin
2022-04-09 12:49       ` Krzysztof Kozlowski
2022-04-09 12:49         ` Krzysztof Kozlowski
2022-04-10  6:54         ` Mikhail Zhilkin
2022-04-10  6:54           ` Mikhail Zhilkin
2022-04-06 20:00 ` [PATCH v2 2/2] mtd: parsers: add support for Sercomm partitions Mikhail Zhilkin
2022-04-06 20:00   ` Mikhail Zhilkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c19faf9-fc1c-9adf-d038-97b673a8f0be@gmail.com \
    --to=csharper2005@gmail.com \
    --cc=Karimdplay@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drvlabo@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    --cc=x1@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.