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_2 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 0CF3AC07E96 for ; Thu, 8 Jul 2021 14:15:26 +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 69D9D61178 for ; Thu, 8 Jul 2021 14:15:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69D9D61178 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz 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 3E1CB83196; Thu, 8 Jul 2021 16:15:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="wzVdWp56"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A6A258319E; Thu, 8 Jul 2021 16:15:21 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 63E008318E for ; Thu, 8 Jul 2021 16:15:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from dellmb (unknown [IPv6:2001:1488:fffe:6:8747:7254:5571:3010]) by mail.nic.cz (Postfix) with ESMTPSA id C7C34142719; Thu, 8 Jul 2021 16:15:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1625753718; bh=I9mskTCpuvcQKdEPBogCXJzAOuz/chjPIjel5oFyiuc=; h=Date:From:To; b=wzVdWp56h9rL12DZEXbF+0ykaBJSRXxeDoJNNwUN4ETtWFWCyOUtC+nHERkevZTK2 vHkE8oK+V67SCvkyI768E0ySvI1qATqzGi+AmUZxnftqJGaRoLfklYNn2ePcq2uhCU 2RleNMS4kVqTzsMm2lezuD1L03Q4XfzSw7y8WUXc= Date: Thu, 8 Jul 2021 16:15:17 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Masami Hiramatsu , Tom Rini , Jagan Teki , Miquel Raynal Cc: U-Boot Mailing List , Priyanka Jain , Simon Glass , Heiko Schocher , Patrick Delaunay , Patrice CHOTARD , Pali =?UTF-8?B?Um9ow6Fy?= 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: <20210708161517.18ff7e56@dellmb> In-Reply-To: References: <20210526120826.8045-1-marek.behun@nic.cz> <20210526120826.8045-5-marek.behun@nic.cz> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 8 Jul 2021 08:54:51 +0900 Masami Hiramatsu wrote: > Hi Marek, > > I found that this changes the mtd device name and makes 'mtdparts' > doesn't work on my developerbox platform. > > Before this change, > ------- > => sf probe > SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB, > total 64 MiB > => mtd list > 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" > => > ------- > after this change, > ------- > => sf probe > SF: Detected mx66u51235f with page size 256 Bytes, erase size 4 KiB, > total 64 MiB > => mtd list > 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" > ------- > > 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 ?) Hi Masami, 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/synquacer-sc2a11-developerbox-u-boot.dtsi You should add something like this into the spi-flash@0 node: partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "BootStrap-BL1"; reg = <0x0 0x70000>; }; partition@70000 { label = "Flash-Writer"; reg = <0x70000 0x90000>; }; partition@100000 { label = "SCP-BL2"; reg = <0x100000 0x80000>; }; ... }; 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. Tom, Miquel, Jagan, what do you think? Marek