[PATCH] ARM: dts: nuvoton: Fix flash layout
Tomer Maimon
tmaimon77 at gmail.com
Tue Mar 2 00:36:58 AEDT 2021
Hi Anton,
The reason the u-boot Env is at 0x100000 address is that some
costumers have:
one copy of Bootblock and U-boot at 0x0 - 0x80000
second copy of Bootblock and U-boot at 0x80000 - 0x100000.
we have two options;
1. Modify the OpenBMC device tree flash layout u-boot Env address to
0x100000.
2. Add a patch to OpnBMC platform that using openbmc flash layout to
modify CONFIG_ENV_OFFSET
in the u-boot.
Thanks,
Tomer
On Fri, 26 Feb 2021 at 22:10, Anton Kachalov <gmouse at google.com> wrote:
> Hello, Tomer.
>
> Seems like Nuvoton's u-boot expects the uboot-env at different address
> comparing to openbmc-flash-layout.dtsi:
>
>
> https://github.com/Nuvoton-Israel/u-boot/blob/npcm7xx-v2019.01/include/configs/poleg.h#L30
>
> Vs.
>
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/openbmc-flash-layout.dtsi#n13
>
> The change is more about making partitions naming the same as expected by
> OpenBMC.
>
> On Sun, 21 Feb 2021 at 17:40, Tomer Maimon <tmaimon77 at gmail.com> wrote:
>
>> Hi Benjamin and Anton,
>>
>> Sorry for the late reply,
>>
>> The EVB FIU0-CS0 partitioning is used for testing the EVB and this is why
>> it is different than the OpenBMC flash layout.
>>
>>
>>
>> Are you using the NPCM7XX EVB for OpenBMC? if yes we can consider to
>> modify the flash partition to OpenBMC use.
>>
>> On Thu, 18 Feb 2021 at 19:11, Benjamin Fair <benjaminfair at google.com>
>> wrote:
>>
>>> On Thu, 18 Feb 2021 at 04:42, <gmouse at google.com> wrote:
>>> >
>>> > From: "Anton D. Kachalov" <gmouse at google.com>
>>> >
>>> > This change satisfy OpenBMC requirements for flash layout.
>>> >
>>> > Signed-off-by: Anton D. Kachalov <gmouse at google.com>
>>> > ---
>>> > arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 28 +++++++----------------
>>> > 1 file changed, 8 insertions(+), 20 deletions(-)
>>> >
>>> > diff --git a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
>>> b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
>>> > index bd1eb6ee380f..741c1fee8552 100644
>>> > --- a/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
>>> > +++ b/arch/arm/boot/dts/nuvoton-npcm750-evb.dts
>>> > @@ -182,8 +182,8 @@ bbuboot2 at 80000 {
>>> > reg = <0x0080000 0x80000>;
>>> > read-only;
>>> > };
>>> > - envparam at 100000 {
>>> > - label = "env-param";
>>> > + ubootenv at 100000 {
>>> > + label = "u-boot-env";
>>> > reg = <0x0100000 0x40000>;
>>> > read-only;
>>> > };
>>> > @@ -195,25 +195,13 @@ kernel at 200000 {
>>> > label = "kernel";
>>> > reg = <0x0200000 0x400000>;
>>> > };
>>> > - rootfs at 600000 {
>>> > - label = "rootfs";
>>> > - reg = <0x0600000 0x700000>;
>>> > + rofs at 780000 {
>>> > + label = "rofs";
>>> > + reg = <0x0780000 0x1680000>;
>>> > };
>>> > - spare1 at D00000 {
>>> > - label = "spare1";
>>> > - reg = <0x0D00000 0x200000>;
>>> > - };
>>> > - spare2 at 0F00000 {
>>> > - label = "spare2";
>>> > - reg = <0x0F00000 0x200000>;
>>> > - };
>>> > - spare3 at 1100000 {
>>> > - label = "spare3";
>>> > - reg = <0x1100000 0x200000>;
>>> > - };
>>> > - spare4 at 1300000 {
>>> > - label = "spare4";
>>> > - reg = <0x1300000 0x0>;
>>> > + rwfs at 1e00000 {
>>> > + label = "rwfs";
>>> > + reg = <0x1e00000 0x200000>;
>>> > };
>>>
>>> I recommend just including the openbmc-flash-layout.dtsi file here
>>> instead since that contains the common flash layout for most OpenBMC
>>> systems.
>>>
>>> Good solution,
>> Do you mean nuvoton-openbmc-flash-layout?
>>
>>> > };
>>> > };
>>> > --
>>> > 2.30.0.478.g8a0d178c01-goog
>>> >
>>>
>>
>> Thanks,
>>
>> Tomer
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210301/2acb247a/attachment.htm>
More information about the openbmc
mailing list