From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03E84C07E9C for ; Thu, 8 Jul 2021 14:56:49 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAAAF61350 for ; Thu, 8 Jul 2021 14:56:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAAAF61350 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D2E738319E; Thu, 8 Jul 2021 16:56:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="P6GDe8zi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0C1A8319E; Thu, 8 Jul 2021 16:56:43 +0200 (CEST) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9D68A8314E for ; Thu, 8 Jul 2021 16:56:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72a.google.com with SMTP id s4so5874414qkm.13 for ; Thu, 08 Jul 2021 07:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zQ27e0miszjgi1q0lRmmYc3w4uWnkkGGKFE9fIrp4Ec=; b=P6GDe8ziodmphWN68zQxQQQzTtdtHaJaxCPwsgcg4ORYOkRzLA/tvg7uUfDaFfXEvz ipVb6AGhKG9DrJUi7s3K8wToUQTSDIP4kb6EFFcSxsbAFdLcBO1OHEMn21PdqDQ3IAwR 9nYbXi+YoGWI9DSFsUKs6DdiAFXOMLvl5Q0+I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zQ27e0miszjgi1q0lRmmYc3w4uWnkkGGKFE9fIrp4Ec=; b=TZNnB0OZ/6CqavIjGgJ153OZrmIoKPCH1r2qgS0RuxorMlmomRQ7Sjy5NwAA+P5qRa SIP5z3qHoci5CpzCDVx7li6e42jnoFkpTSd9FXRMUscmwAv1ZwDNyV65UbM8T5+R5lkM EmFJApYt8XciTZRa+JxTM6dhf7uMSZc2kmCWUG/bQJm0pDjgTePOIPfzjBnPoVshnL7K VZ7Vghr2tLo13GKP0O0EKnCSOuLw7sKGIIBsGOd0EOHmmfHIB77rTSysWLN78H3XGMcG IAH5AZCt4fovp9+ymNYgj66BOnlB0A+ivEj5iA7CMSRp7E/v+7+ozb8PcJ4J20Slo0JZ rEaQ== X-Gm-Message-State: AOAM533sBEile0SWqYP/vN6OB94YJXkt5vuJTgPzRvFSLY7kmhBJPF6k CTfS5GUcU5C93pdjVp+cVrf/wA== X-Google-Smtp-Source: ABdhPJzDTAKU44mcvjQv6ACR++NO4DivbTAS0POTd3JqRaXl1slJSXymv6zoWFz1MKk2W24nGZ1ZzQ== X-Received: by 2002:a37:59c7:: with SMTP id n190mr31735998qkb.146.1625756199288; Thu, 08 Jul 2021 07:56:39 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-24ca-1bbe-7b3c-6375.res6.spectrum.com. [2603:6081:7b01:cbda:24ca:1bbe:7b3c:6375]) by smtp.gmail.com with ESMTPSA id t74sm1092289qka.56.2021.07.08.07.56.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jul 2021 07:56:38 -0700 (PDT) Date: Thu, 8 Jul 2021 10:56:36 -0400 From: Tom Rini To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Masami Hiramatsu , Jagan Teki , Miquel Raynal , U-Boot Mailing List , Priyanka Jain , Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Pali =?iso-8859-1?Q?Roh=E1r?= Subject: Re: [PATCH u-boot-dm + u-boot-spi v4 04/10] mtd: spi-nor: allow registering multiple MTDs when DM is enabled Message-ID: <20210708145636.GC9516@bill-the-cat> References: <20210526120826.8045-1-marek.behun@nic.cz> <20210526120826.8045-5-marek.behun@nic.cz> <20210708161517.18ff7e56@dellmb> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TddO3lwdG2tcRGyc" Content-Disposition: inline In-Reply-To: <20210708161517.18ff7e56@dellmb> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --TddO3lwdG2tcRGyc Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 08, 2021 at 04:15:17PM +0200, Marek Beh=FAn wrote: > On Thu, 8 Jul 2021 08:54:51 +0900 > Masami Hiramatsu wrote: >=20 > > Hi Marek, > >=20 > > I found that this changes the mtd device name and makes 'mtdparts' > > doesn't work on my developerbox platform. > >=20 > > Before this change, > > ------- > > =3D> sf probe =20 > > SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB, > > total 64 MiB > > =3D> mtd list =20 > > List of MTD devices: > > * nor1 > > - type: NOR flash > > - block size: 0x1000 bytes > > - min I/O: 0x1 bytes > > - 0x000000000000-0x000004000000 : "nor1" > > - 0x000000000000-0x000000070000 : "BootStrap-BL1" > > - 0x000000070000-0x000000100000 : "Flash-Writer" > > - 0x000000100000-0x000000180000 : "SCP-BL2" > > - 0x000000180000-0x0000001f8000 : "FIP-TFA" > > - 0x0000001f8000-0x000000200000 : "Stg2-Tables" > > - 0x000000200000-0x000000400000 : "EDK2" > > - 0x000000400000-0x000000500000 : "UEFI-Vars" > > - 0x000000500000-0x000000700000 : "OPTEE" > > - 0x000000700000-0x000000800000 : "UBoot-Env" > > - 0x000000800000-0x000000900000 : "U-Boot" > > - 0x000000900000-0x000004000000 : "Free" > > =3D> =20 > > ------- > > after this change, > > ------- > > =3D> sf probe =20 > > SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB, > > total 64 MiB > > =3D> mtd list =20 > > Could not find a valid device for nor1 > > List of MTD devices: > > * mx66u51235f > > - device: spi-flash@0 > > - parent: spi@54800000 > > - driver: jedec_spi_nor > > - path: /spi@54800000/spi-flash@0 > > - type: NOR flash > > - block size: 0x1000 bytes > > - min I/O: 0x1 bytes > > - 0x000000000000-0x000004000000 : "mx66u51235f" > > ------- > >=20 > > I think I should update CONFIG_MTDIDS_DEFAULT and > > CONFIG_MTDPARTS_DEFAULT. But before that, I would like to confirm > > that this is an intended change, and what should I do. (replace nor1 > > with mx66u51235f ?) >=20 > Hi Masami, >=20 > no. The intended solution here for you is to remove MTDIDS / MTDPARTS > completely and instead define the partitions in your device tree: > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/synquac= er-sc2a11-developerbox-u-boot.dtsi >=20 > You should add something like this into the spi-flash@0 node: >=20 > partitions { > compatible =3D "fixed-partitions"; > #address-cells =3D <1>; > #size-cells =3D <1>; >=20 > partition@0 { > label =3D "BootStrap-BL1"; > reg =3D <0x0 0x70000>; > }; >=20 > partition@70000 { > label =3D "Flash-Writer"; > reg =3D <0x70000 0x90000>; > }; >=20 > partition@100000 { > label =3D "SCP-BL2"; > reg =3D <0x100000 0x80000>; > }; >=20 > ... > }; >=20 > I wonder though now whether we should force other boards to do this or > whether we should fix the code to be backwards compatible with the old > names. >=20 > Tom, Miquel, Jagan, what do you think? I think we need for passing mtdparts/mtdids via the kernel command line to continue to work like they used it. And some checkpatch magic to catch people introducing new ones? It certainly would be best for people to define them in dts as allowed, but there's a good size existing base that doesn't. Thanks! --=20 Tom --TddO3lwdG2tcRGyc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmDnEiAACgkQFHw5/5Y0 tyyGyAv9EKUnCKnJ9lq1KeP6VFUeCyoEYr8td4xPqWC7blFHaXM1+nJntO7DW80i H0tXdZbo/mvlbJuYZVOWj6gzhG464cbCJaEK917keSGYJyzxM8KnHtKq+uc2KtJo QC8ptSSzqiXcW2MlIlsQiUBtmjHzjpozMGT1USkXhNvhkVlyoF6+8rMCmEd9ixF/ Sr58Y2wKm4B2wjOkX2hEnHBp3ZhzRM5jPK8a9bNT5rbgVjbeh+DlMUS9p3amb8kc KiEiBZhUAKtUCRBrv4eWc5YTN3pilCDqoUm/y7d/fhiglAWG9hKAEtG8FpVvPgL5 2XnXxkzYfpjVPDOH5EWaagjUYTMNzt1sIw7sQIClFV4rkgZlIJC1qvt1MBCGLg/g sGP09WqqxkD7yvLc4AnK182EBj/WSuejdjpDYQRVWYpvtPTWie4MCqjiGnFS/rw8 KvBo4AmlHTCknbu1SoPF9bG1yLapUVfSEUug90WoLMd/zv+c6grlqqOLiRXrg/Il EsoZkbyh =H7n6 -----END PGP SIGNATURE----- --TddO3lwdG2tcRGyc--