diff mbox series

[V3,1/2] dt-bindings: mtd: partitions: u-boot: allow dynamic subpartitions

Message ID 20221018154202.4634-1-zajec5@gmail.com (mailing list archive)
State New, archived
Headers show
Series [V3,1/2] dt-bindings: mtd: partitions: u-boot: allow dynamic subpartitions | expand

Commit Message

Rafał Miłecki Oct. 18, 2022, 3:42 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

U-Boot partition may contain subpartitions. For example Broadcom
includes environment data block in the middle of its U-Boot partition.

This allows describing Broadcom's U-Boot env data and will allow
referencing its NVMEM cell in the future.

Reg: 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition")
Ref: dd638202dfb65 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V3: Add this patch as pre-requirement for u-boot,env.yaml & brcm,env
---
 .../devicetree/bindings/mtd/partitions/u-boot.yaml         | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Conor Dooley Oct. 18, 2022, 3:50 p.m. UTC | #1
On Tue, Oct 18, 2022 at 05:42:01PM +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> U-Boot partition may contain subpartitions. For example Broadcom
> includes environment data block in the middle of its U-Boot partition.
> 
> This allows describing Broadcom's U-Boot env data and will allow
> referencing its NVMEM cell in the future.
> 
> Reg: 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition")

Pardon my ignorance here, but what is the significance of a "Reg" tag?
Thanks,
Conor.

> Ref: dd638202dfb65 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V3: Add this patch as pre-requirement for u-boot,env.yaml & brcm,env
> ---
>  .../devicetree/bindings/mtd/partitions/u-boot.yaml         | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
> index 8a88e7d16524..3c56efe48efd 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
> @@ -27,6 +27,10 @@ properties:
>            Broadcom stores environment variables inside a U-Boot partition. They
>            can be identified by a custom header with magic value.
>  
> +patternProperties:
> +  "^partition-.*$":
> +    $ref: partition.yaml#
> +
>  unevaluatedProperties: false
>  
>  examples:
> @@ -40,6 +44,9 @@ examples:
>              compatible = "brcm,u-boot";
>              reg = <0x0 0x100000>;
>              label = "u-boot";
> +
> +            partition-u-boot-env {
> +            };
>          };
>  
>          partition@100000 {
> -- 
> 2.34.1
>
Rafał Miłecki Oct. 18, 2022, 3:55 p.m. UTC | #2
On 18.10.2022 17:50, Conor Dooley wrote:
> On Tue, Oct 18, 2022 at 05:42:01PM +0200, Rafał Miłecki wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> U-Boot partition may contain subpartitions. For example Broadcom
>> includes environment data block in the middle of its U-Boot partition.
>>
>> This allows describing Broadcom's U-Boot env data and will allow
>> referencing its NVMEM cell in the future.
>>
>> Reg: 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition")
> 
> Pardon my ignorance here, but what is the significance of a "Reg" tag?

That was meant to be "Ref:" and was meant to show commit that introduced
concept of dynamic partitions. I thought it's a new feature not everyone
may be familiar with yet. I thought it may help to review this patch.

If that is pointless though could you Rob just drop those tags while
applying, please? I guess I'll just let you decide.


>> Ref: dd638202dfb65 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part")
>> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Conor Dooley Oct. 18, 2022, 4:01 p.m. UTC | #3
On Tue, Oct 18, 2022 at 05:55:14PM +0200, Rafał Miłecki wrote:
> On 18.10.2022 17:50, Conor Dooley wrote:
> > On Tue, Oct 18, 2022 at 05:42:01PM +0200, Rafał Miłecki wrote:
> > > From: Rafał Miłecki <rafal@milecki.pl>
> > > 
> > > U-Boot partition may contain subpartitions. For example Broadcom
> > > includes environment data block in the middle of its U-Boot partition.
> > > 
> > > This allows describing Broadcom's U-Boot env data and will allow
> > > referencing its NVMEM cell in the future.
> > > 
> > > Reg: 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition")
> > 
> > Pardon my ignorance here, but what is the significance of a "Reg" tag?
> 
> That was meant to be "Ref:" and was meant to show commit that introduced
> concept of dynamic partitions. I thought it's a new feature not everyone
> may be familiar with yet. I thought it may help to review this patch.

Ah nw, I wasn't sure if it ws a typo or "Reg" short for regression.

> 
> If that is pointless though could you Rob just drop those tags while
> applying, please? I guess I'll just let you decide.
> 
> 
> > > Ref: dd638202dfb65 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part")
> > > Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>
Rob Herring (Arm) Oct. 31, 2022, 2:45 p.m. UTC | #4
On Tue, 18 Oct 2022 17:42:01 +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> U-Boot partition may contain subpartitions. For example Broadcom
> includes environment data block in the middle of its U-Boot partition.
> 
> This allows describing Broadcom's U-Boot env data and will allow
> referencing its NVMEM cell in the future.
> 
> Reg: 118f3fbe517f4 ("dt-bindings: mtd: partitions: support label/name only partition")
> Ref: dd638202dfb65 ("dt-bindings: mtd: partitions: add additional example for qcom,smem-part")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V3: Add this patch as pre-requirement for u-boot,env.yaml & brcm,env
> ---
>  .../devicetree/bindings/mtd/partitions/u-boot.yaml         | 7 +++++++
>  1 file changed, 7 insertions(+)
> 

Applied, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
index 8a88e7d16524..3c56efe48efd 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/u-boot.yaml
@@ -27,6 +27,10 @@  properties:
           Broadcom stores environment variables inside a U-Boot partition. They
           can be identified by a custom header with magic value.
 
+patternProperties:
+  "^partition-.*$":
+    $ref: partition.yaml#
+
 unevaluatedProperties: false
 
 examples:
@@ -40,6 +44,9 @@  examples:
             compatible = "brcm,u-boot";
             reg = <0x0 0x100000>;
             label = "u-boot";
+
+            partition-u-boot-env {
+            };
         };
 
         partition@100000 {