From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: Add SEAMA partition bindings
Date: Wed, 5 Jul 2023 13:51:54 -0600 [thread overview]
Message-ID: <20230705195154.GA1702900-robh@kernel.org> (raw)
In-Reply-To: <20230705-seama-partitions-v2-1-9d349f0d5ab7@linaro.org>
On Wed, Jul 05, 2023 at 12:17:46PM +0200, Linus Walleij wrote:
> This types of NAND partitions appear in OpenWrt and
> U-Boot.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Fix up the binding to be childless
> ---
> .../bindings/mtd/partitions/partitions.yaml | 1 +
> .../devicetree/bindings/mtd/partitions/seama.yaml | 50 ++++++++++++++++++++++
> 2 files changed, 51 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> index 2edc65e0e361..9bd0a8d800da 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> @@ -21,6 +21,7 @@ oneOf:
> - $ref: linksys,ns-partitions.yaml
> - $ref: qcom,smem-part.yaml
> - $ref: redboot-fis.yaml
> + - $ref: seama.yaml
I think this is in the wrong place. These should be device level
partitioning schemas, not an individual partition type. (Though nesting
is possible)
>
> properties:
> compatible: true
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
> new file mode 100644
> index 000000000000..5ed7764bba69
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Seattle Image Partitions
> +
> +description: The SEAttle iMAge (SEAMA) partition is a type of partition
> + used for NAND flash devices. This type of flash image is found in some
> + D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
> + DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
> + (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
> + does not have children defined in the device tree, they need to be
> + detected by software.
> +
> +allOf:
> + - $ref: partition.yaml#
> +
> +maintainers:
> + - Linus Walleij <linus.walleij@linaro.org>
> +
> +select: false
Remove this and your example will fail. You need unevaluatedProperties.
There's a problem in partitions.yaml. It never gets applied, so this
schema never gets applied. The default 'select' is generated based on
$nodename or compatible, but it has neither. This needs some more
thought on how to fix given the variable way partitions can be combined.
Probably at a minimum, all the 'select: false' need to be removed.
> +
> +properties:
> + compatible:
> + const: seama
> +
> + '#address-cells': false
> +
> + '#size-cells': false
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + compatible = "seama";
> + reg = <0x0 0x800000>;
> + label = "firmware";
> + };
> + };
>
> --
> 2.34.1
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: Add SEAMA partition bindings
Date: Wed, 5 Jul 2023 13:51:54 -0600 [thread overview]
Message-ID: <20230705195154.GA1702900-robh@kernel.org> (raw)
In-Reply-To: <20230705-seama-partitions-v2-1-9d349f0d5ab7@linaro.org>
On Wed, Jul 05, 2023 at 12:17:46PM +0200, Linus Walleij wrote:
> This types of NAND partitions appear in OpenWrt and
> U-Boot.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Fix up the binding to be childless
> ---
> .../bindings/mtd/partitions/partitions.yaml | 1 +
> .../devicetree/bindings/mtd/partitions/seama.yaml | 50 ++++++++++++++++++++++
> 2 files changed, 51 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> index 2edc65e0e361..9bd0a8d800da 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> @@ -21,6 +21,7 @@ oneOf:
> - $ref: linksys,ns-partitions.yaml
> - $ref: qcom,smem-part.yaml
> - $ref: redboot-fis.yaml
> + - $ref: seama.yaml
I think this is in the wrong place. These should be device level
partitioning schemas, not an individual partition type. (Though nesting
is possible)
>
> properties:
> compatible: true
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
> new file mode 100644
> index 000000000000..5ed7764bba69
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Seattle Image Partitions
> +
> +description: The SEAttle iMAge (SEAMA) partition is a type of partition
> + used for NAND flash devices. This type of flash image is found in some
> + D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
> + DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
> + (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
> + does not have children defined in the device tree, they need to be
> + detected by software.
> +
> +allOf:
> + - $ref: partition.yaml#
> +
> +maintainers:
> + - Linus Walleij <linus.walleij@linaro.org>
> +
> +select: false
Remove this and your example will fail. You need unevaluatedProperties.
There's a problem in partitions.yaml. It never gets applied, so this
schema never gets applied. The default 'select' is generated based on
$nodename or compatible, but it has neither. This needs some more
thought on how to fix given the variable way partitions can be combined.
Probably at a minimum, all the 'select: false' need to be removed.
> +
> +properties:
> + compatible:
> + const: seama
> +
> + '#address-cells': false
> +
> + '#size-cells': false
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + compatible = "seama";
> + reg = <0x0 0x800000>;
> + label = "firmware";
> + };
> + };
>
> --
> 2.34.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 1/2] dt-bindings: mtd: Add SEAMA partition bindings
Date: Wed, 5 Jul 2023 13:51:54 -0600 [thread overview]
Message-ID: <20230705195154.GA1702900-robh@kernel.org> (raw)
In-Reply-To: <20230705-seama-partitions-v2-1-9d349f0d5ab7@linaro.org>
On Wed, Jul 05, 2023 at 12:17:46PM +0200, Linus Walleij wrote:
> This types of NAND partitions appear in OpenWrt and
> U-Boot.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Fix up the binding to be childless
> ---
> .../bindings/mtd/partitions/partitions.yaml | 1 +
> .../devicetree/bindings/mtd/partitions/seama.yaml | 50 ++++++++++++++++++++++
> 2 files changed, 51 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> index 2edc65e0e361..9bd0a8d800da 100644
> --- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml
> @@ -21,6 +21,7 @@ oneOf:
> - $ref: linksys,ns-partitions.yaml
> - $ref: qcom,smem-part.yaml
> - $ref: redboot-fis.yaml
> + - $ref: seama.yaml
I think this is in the wrong place. These should be device level
partitioning schemas, not an individual partition type. (Though nesting
is possible)
>
> properties:
> compatible: true
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/seama.yaml b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
> new file mode 100644
> index 000000000000..5ed7764bba69
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/partitions/seama.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/partitions/seama.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Seattle Image Partitions
> +
> +description: The SEAttle iMAge (SEAMA) partition is a type of partition
> + used for NAND flash devices. This type of flash image is found in some
> + D-Link routers such as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L,
> + DIR890L and DCH-M225, as well as in WD and NEC routers on the ath79
> + (MIPS), Broadcom BCM53xx, and RAMIPS platforms. This partition type
> + does not have children defined in the device tree, they need to be
> + detected by software.
> +
> +allOf:
> + - $ref: partition.yaml#
> +
> +maintainers:
> + - Linus Walleij <linus.walleij@linaro.org>
> +
> +select: false
Remove this and your example will fail. You need unevaluatedProperties.
There's a problem in partitions.yaml. It never gets applied, so this
schema never gets applied. The default 'select' is generated based on
$nodename or compatible, but it has neither. This needs some more
thought on how to fix given the variable way partitions can be combined.
Probably at a minimum, all the 'select: false' need to be removed.
> +
> +properties:
> + compatible:
> + const: seama
> +
> + '#address-cells': false
> +
> + '#size-cells': false
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + partition@0 {
> + compatible = "seama";
> + reg = <0x0 0x800000>;
> + label = "firmware";
> + };
> + };
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-07-05 19:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 10:17 [PATCH v2 0/2] Add SEAMA partition types Linus Walleij
2023-07-05 10:17 ` Linus Walleij
2023-07-05 10:17 ` Linus Walleij
2023-07-05 10:17 ` [PATCH v2 1/2] dt-bindings: mtd: Add SEAMA partition bindings Linus Walleij
2023-07-05 10:17 ` Linus Walleij
2023-07-05 10:17 ` Linus Walleij
2023-07-05 19:51 ` Rob Herring [this message]
2023-07-05 19:51 ` Rob Herring
2023-07-05 19:51 ` Rob Herring
2023-07-07 17:34 ` Linus Walleij
2023-07-07 17:34 ` Linus Walleij
2023-07-07 17:34 ` Linus Walleij
2023-07-05 10:17 ` [PATCH v2 2/2] ARM: dts: bcm5301x: Add SEAMA compatibles Linus Walleij
2023-07-05 10:17 ` Linus Walleij
2023-07-05 10:17 ` Linus Walleij
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=20230705195154.GA1702900-robh@kernel.org \
--to=robh@kernel.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hauke@hauke-m.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=zajec5@gmail.com \
/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.