> On 19 Jul 2018, at 19:46, Mathias Kresin <d...@kresin.me> wrote:
> 
> 
> To get the dt compiler accepting the overlapping partitions without a
> warning, a style was chosen completely different from all other dts
> files in the target [maintenance reason]. Furthermore, nodes sharing
> the same reg are usually (always?) expressed as child nodes in the
> devicetree similar to [technical reason]:
> 
> partitions {
>    compatible = "fixed-partitions";
> 
>    partition@0 {
>        reg = <0 0x3000>;
> 
>        subpartition@0 {
>            reg = <0 0x1000>;
>        };
> 
>        subpartition@1000 {
>            reg = <0x1000 0x2000>;
>        };
>    };
> 
>    partition@3000 {
>        reg = <0x3000 0x10000>;
>    };
> };
> 
> To my knowledge, the above isn't possible with fixed-partitions.

I don’t see why. AIUI DTS syntax is respected, all nodes have a unique name and 
all nodes refer to their top boundary as the unit address.

> Which
> either means fixed-partitions misses a feature or someone tries to use
> it in a way not intended.

The above is in line with the canonical way to define partitions in DTS, as 
documented in Documentation/devicetree/bindings/mtd/partition.txt

This method is apparently used in all bcm targets, as well as ath79, ipq and 
lantiq. I’d suggest that _not_ using this method is a bug, and not the correct 
way to go, as evidenced by the aforementioned documentation. Quoting:

        For backwards compatibility partitions as direct subnodes of the flash 
device are
        supported. This use is discouraged.

T.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to