Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2408063pxb; Tue, 23 Feb 2021 06:29:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzV0oKrAElQ3Z7FxP+sOiuMXuiR94Yt7KQKYC3wY0noMgcAPYBKdyzvrVAo5LPx+D+CFp0V X-Received: by 2002:a17:906:254e:: with SMTP id j14mr10352995ejb.452.1614090582877; Tue, 23 Feb 2021 06:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614090582; cv=none; d=google.com; s=arc-20160816; b=yauxGLx6VUE9tV+bPokznrBprQH78hZztDdTYijhxukQaH9pLgNL1hZoJUmH2AcoQ3 y0VaviAF0bm7PBWQn4jOTAP29/l4c7DPth78/SaxyhtgA4ynDZu/5YyFC4bN5jkyjE/g r5TH+S9FMAXeI1j3qWpEO3epT3cMLOCp9V8mIIzmdyq9Y1m9hLcFQlZJ47M9xFZeDahc n7ZwKdd19XbYlO/jenEWNXXnIALJUu6kp4jJFrMVWZG6r+VcL7dHLjgTXdnVHiLZSSa7 UtKnEZ0iOfTRJW94MbOhZCTsRSDbRZgvxzxOn3jIGzWPK0yJOl5jTTjDVloZypSLD2Cs tdmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a49cPfQ6OU4LG8CF96Hqvxni48z/Zab/m/tPpyPYbDg=; b=yD4KuMYGFTn+UdN3PaVUxjZ2XyPH3jaKmkq55krOaMkxb0Qc4aAJzYHHRb8pEfUEkE ulyjsLe0oBb1vGyrtNvty5PF73njtbLYSa8U+rfmr6xso39GGqsHrgynAmAyguR9CJsT hff/tmnx5PR8nO87I3lxiHmsxVysix5vfa2bdBnXiPl6iGOiR0Fx8d38LLExNT3Gjp7K uiAqv/hq1lCl4l2VMC3O+Az6JUJKV3bPVu4H9OrGu9ptMLLVbEHP7DYkrzrT9Ex/Peby +XMLO4l5y/62lqe8woXOumYJkpYT2P/G2kprAMJ8EYQVFLd0UpPSMR4q082A+tDmqbN3 uKUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pYs6unvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si14702044eda.107.2021.02.23.06.29.17; Tue, 23 Feb 2021 06:29:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pYs6unvS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232767AbhBWNPZ (ORCPT + 99 others); Tue, 23 Feb 2021 08:15:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232529AbhBWNPV (ORCPT ); Tue, 23 Feb 2021 08:15:21 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D91FDC06174A; Tue, 23 Feb 2021 05:14:40 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id w36so11152768lfu.4; Tue, 23 Feb 2021 05:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a49cPfQ6OU4LG8CF96Hqvxni48z/Zab/m/tPpyPYbDg=; b=pYs6unvSm6CdRKPGFo1+KI2cxwmIAiq1BP2xNexRmr7RzViTWOCXeOhZch7bgKjWJ4 BeWoQ62/D3w75p6x5OuI8ylFfUxUypdtbHfMgNYPXtkM1gRp8EuYrug+cyYw2RMW2OOI nEAthwUP0gH3H3OpfnHX42bdkdbpIT6VICz7X7OVcTdMRfVJag6pFDF2C2Pw22zK8Oj/ uUzH4+RzuSsT3hv4OQ4qWtBnOlIapwjXnxpinAImAtxidj5OItmQHqdWIxGV20ToCzmf K3bhjjbA1fe0KeKzN1pxEjKlh3WTQThWrhhDjt0SC7DfpvWHBFqMmlQk1LLzi24GBieo Bsdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a49cPfQ6OU4LG8CF96Hqvxni48z/Zab/m/tPpyPYbDg=; b=RPUEd5kvnPemJPgo5GrAhqJ4T2u3fv8OGDwodeVoHFC4lXkskGFkvvZsy4A4Id6KRD ePfTaCoPI+Sm2W7at2f4gIxml8Aii0HY0EwVkUum8Zo3l6VtUoHWK/OKEam5AlpnZDvI 1qjCPl/t4YNEzUUr0gOSUdcO1TmG3mglBhA5005JiocUAU6RO5HH88wQSn9ID1tJ1h4z Q+SyRpBSMe62Ifa3QSXn8zHDeANTLC7gR+4T4Xrbh2/lCkzBP68RhlCqVUk5UTEpuCTR LVw9Qj7L9CNcUKR5T71jCqQOnGErReuAG+dg9/sxQvneQXJvAwZotArzwdB5Q5HvPcm+ PPsg== X-Gm-Message-State: AOAM533mCRmUjEk5ckovs18wh7Qs8LKpKpCaF40kKEkbxutM+/H6VA4c bYaZ/tDE3sgUS5UChwtDJpUxMveBhNqeGyn4WA== X-Received: by 2002:a05:6512:39c3:: with SMTP id k3mr16220706lfu.501.1614086077401; Tue, 23 Feb 2021 05:14:37 -0800 (PST) MIME-Version: 1.0 References: <20210218122546.3546582-1-gmouse@google.com> In-Reply-To: From: Avi Fishman Date: Tue, 23 Feb 2021 15:14:13 +0200 Message-ID: Subject: Re: [PATCH] ARM: dts: nuvoton: Fix flash layout To: Anton Kachalov Cc: IS20 Ofer Eilon , Tomer Maimon , Benjamin Fair , Tali Perry , Patrick Venture , Nancy Yuen , Rob Herring , OpenBMC Maillist , devicetree , Linux Kernel Mailing List Content-Type: multipart/mixed; boundary="00000000000047de3605bc00b359" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000047de3605bc00b359 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Anton, At runtime do you get into the code inside npcmx50_sdhci.c, but it doesn't work well or not access at all? Can you check those registers (BootBlock should set them for you): sd1irv1 at address 0xf0800054 value =3D 0xf5c80f80 sd1irv2 at address 0xf0800058 value =3D 0x52001132 sd2irv1 at address 0xf08000b4 value =3D 0xfdc80f80 sd2irv2 at address 0xf08000b8 value =3D 0x52003132 Also try to use attached file. Thanks, Avi On Mon, Feb 22, 2021 at 4:25 PM Anton Kachalov wrote: > > Ofer, > > The oldest version from igps doesn't work as well as the latest > version from u-boot github. > > The only version that works for me is in software deliverables: > > https://github.com/Nuvoton-Israel/nuvoton-info/tree/master/npcm7xx-poleg/= evaluation-board/sw_deliverables/npcm7xx_v2.3 > > On Mon, 22 Feb 2021 at 15:10, IS20 Ofer Eilon wr= ote: > > > > Hi Avi, > > > > It seems an old version of uboot u-boot_2019.01.7.5.bin from igps bel= ow: > > > > > https://apc01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fg= ithub.com%2FNuvoton-Israel%2Figps%2Ftree%2Fmaster%2FImageGeneration%2Fversi= ons&data=3D04%7C01%7Cofer.eilon%40nuvoton.com%7Ce56881b8491d42e5ee4c08d= 8d71bacd4%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637495861162860437%7= CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwi= LCJXVCI6Mn0%3D%7C1000&sdata=3D0%2BNzEv%2FSX9QTg0XumchRrU61uGbZ3CZXrtspX= u2560I%3D&reserved=3D0 > > > > Please use latest from uboot.bin github. > > > > Regards, > > Ofer > > > > > > -----Original Message----- > > From: Avi Fishman > > Sent: Monday, February 22, 2021 12:21 PM > > To: Anton Kachalov > > Cc: Tomer Maimon ; Benjamin Fair ; Tali Perry ; Patrick Venture ; Nancy Yuen ; Rob Herring ; O= penBMC Maillist ; devicetree ; Linux Kernel Mailing List ; IS20 Of= er Eilon > > Subject: Re: [PATCH] ARM: dts: nuvoton: Fix flash layout > > > > Ofer, > > > > Can you check why u-boot doesn't work with SD cards? > > > > On Mon, Feb 22, 2021 at 11:27 AM Anton Kachalov wro= te: > > > > > > Hi, Tom. > > > > > > Yes, I'm using it for testing on real hardware. > > > > > > BTW. Recent u-boot doesn't work with SD cards. The card doesn't > > > detect. The last working version was this one: > > > > > > https://apc01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fg= ith > > > ub.com%2FNuvoton-Israel%2Fnuvoton-info%2Ftree%2Fmaster%2Fnpcm7xx-pole= g > > > %2Fevaluation-board%2Fsw_deliverables%2Fnpcm7xx_v2.3&data=3D04%7C= 01% > > > 7Cofer.eilon%40nuvoton.com%7Ce56881b8491d42e5ee4c08d8d71bacd4%7Ca3f24= 9 > > > 31d4034b4a94f17d83ac638e07%7C0%7C0%7C637495861162860437%7CUnknown%7CT= W > > > FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI= 6 > > > Mn0%3D%7C1000&sdata=3Df4t41g3CQaFTQNfwwNVBrIwQScndIGcfRTms0yrTn5o= %3D > > > &reserved=3D0 > > > > > > However, u-boot from igps repo: > > > > > > https://apc01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fg= ith > > > ub.com%2FNuvoton-Israel%2Figps%2Ftree%2Fmaster%2FImageGeneration%2Fve= r > > > sions&data=3D04%7C01%7Cofer.eilon%40nuvoton.com%7Ce56881b8491d42e= 5ee > > > 4c08d8d71bacd4%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637495861= 1 > > > 62860437%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIi= L > > > CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3D0%2BNzEv%2FSX9QTg0Xu= mch > > > RrU61uGbZ3CZXrtspXu2560I%3D&reserved=3D0 > > > > > > Has issues too. It doesn't allow me to read more than 4k bytes once a= t > > > a time. Thus, to flash the stuff I have manually read chunks from the > > > SD-card: fat load doesn't work at all and I write that data in raw > > > partition. > > > > > > On Sun, 21 Feb 2021 at 17:40, Tomer Maimon wrot= e: > > > > > > > > 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 t= o modify the flash partition to OpenBMC use. > > > > > > > > > > > > On Thu, 18 Feb 2021 at 19:11, Benjamin Fair wrote: > > > >> > > > >> On Thu, 18 Feb 2021 at 04:42, wrote: > > > >> > > > > >> > From: "Anton D. Kachalov" > > > >> > > > > >> > This change satisfy OpenBMC requirements for flash layout. > > > >> > > > > >> > Signed-off-by: Anton D. Kachalov > > > >> > --- > > > >> > 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@80000 { > > > >> > reg =3D <0x0080000 0x80000>; > > > >> > read-only; > > > >> > }; > > > >> > - envparam@100000 { > > > >> > - label =3D "env-param"; > > > >> > + ubootenv@100000 { > > > >> > + label =3D "u-boot-env"; > > > >> > reg =3D <0x0100000 0x40000>; > > > >> > read-only; > > > >> > }; @@ -195,25 +195,13 @@ > > > >> > kernel@200000 { > > > >> > label =3D "kernel"; > > > >> > reg =3D <0x0200000 0x400000>; > > > >> > }; > > > >> > - rootfs@600000 { > > > >> > - label =3D "rootfs"; > > > >> > - reg =3D <0x0600000 0x700000>; > > > >> > + rofs@780000 { > > > >> > + label =3D "rofs"; > > > >> > + reg =3D <0x0780000 0x1680000>; > > > >> > }; > > > >> > - spare1@D00000 { > > > >> > - label =3D "spare1"; > > > >> > - reg =3D <0x0D00000 0x200000>; > > > >> > - }; > > > >> > - spare2@0F00000 { > > > >> > - label =3D "spare2"; > > > >> > - reg =3D <0x0F00000 0x200000>; > > > >> > - }; > > > >> > - spare3@1100000 { > > > >> > - label =3D "spare3"; > > > >> > - reg =3D <0x1100000 0x200000>; > > > >> > - }; > > > >> > - spare4@1300000 { > > > >> > - label =3D "spare4"; > > > >> > - reg =3D <0x1300000 0x0>; > > > >> > + rwfs@1e00000 { > > > >> > + label =3D "rwfs"; > > > >> > + reg =3D <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 > > > > > > > > -- > > Regards, > > Avi > > ________________________________ > > ________________________________ > > The privileged confidential information contained in this email is int= ended for use only by the addressees as indicated by the original sender of= this email. If you are not the addressee indicated in this email or are no= t responsible for delivery of the email to such a person, please kindly rep= ly to the sender indicating this fact and delete all copies of it from your= computer and network server immediately. Your cooperation is highly apprec= iated. It is advised that any unauthorized use of confidential information = of Nuvoton is strictly prohibited; and any information in this email irrele= vant to the official business of Nuvoton shall be deemed as neither given n= or endorsed by Nuvoton. --=20 Regards, Avi --00000000000047de3605bc00b359 Content-Type: application/octet-stream; name="npcmx50_sdhci.c" Content-Disposition: attachment; filename="npcmx50_sdhci.c" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kli13jx10 LyoKICpjb3B5cmlnaHQgKGMpIDIwMTcgTnV2b3RvbiBUZWNobm9sb2d5IENvcnAuCiAqCiAqIFNl ZSBmaWxlIENSRURJVFMgZm9yIGxpc3Qgb2YgcGVvcGxlIHdobyBjb250cmlidXRlZCB0byB0aGlz CiAqIHByb2plY3QuCiAqCiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2Fu IHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKICogbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0 aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMKICogcHVibGlzaGVkIGJ5IHRoZSBGcmVl IFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YKICogdGhlIExpY2Vuc2Us IG9yIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uCiAqCiAqIFRoaXMgcHJvZ3Jh bSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLAogKiBi dXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50 eSBvZgogKiBNRVJDSEFO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