From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from down.free-electrons.com ([37.187.137.238] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b2M69-0003E2-Vl for linux-mtd@lists.infradead.org; Mon, 16 May 2016 17:14:30 +0000 Date: Mon, 16 May 2016 19:14:07 +0200 From: Boris Brezillon To: Moritz Fischer Cc: David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, Linux Kernel Mailing List , moritz.fischer.private@gmail.com Subject: Re: [PATCH] mtd: Adding of_mtd_info_get to get mtd_info from devicetree Message-ID: <20160516191407.1dbb3028@bbrezillon> In-Reply-To: References: <1462988859-32240-1-git-send-email-moritz.fischer@ettus.com> <20160516095534.727fcac6@bbrezillon> <20160516100511.360c89c9@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 16 May 2016 09:30:10 -0700 Moritz Fischer wrote: > Hi Boris, > > On Mon, May 16, 2016 at 1:05 AM, Boris Brezillon > wrote: > > >> Here are a few questions (I'm assuming the netdev + MAC address case): > >> - how would you link the net/PHY device to the MTD partition storing > >> the MAC address > > Well in my case I actually planned to use it with the OTP partition of my QSPI > device using spi_nor_read_usr_prot_reg and friends and I just needed a way > to get to the struct mtd_info from a child of my network device. > > Right now the OTP 'partitions' are not really exposed to device tree afaik. > Maybe that would be worthwhile to further look into? Maybe exposing > (wrapping) that as nvmem > would be the way to go? I think so. Now that MTD partitions are defined in a 'partitions' subnode (see MTD binding doc), we can define an 'otp-partitions' subnode and define nvmem cells in there. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com