From: Marek Vasut <marek.vasut@gmail.com>
To: "Cédric Le Goater" <clg@kaod.org>, "Joel Stanley" <joel@jms.id.au>
Cc: linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Richard Weinberger <richard@nod.at>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v2] mtd/spi-nor: Add SPI memory controllers for Aspeed SoCs
Date: Mon, 28 Nov 2016 19:21:19 +0100 [thread overview]
Message-ID: <b5aabac4-ddd2-38c3-a5a7-d1b56274230d@gmail.com> (raw)
In-Reply-To: <9ad102a7-8d78-efef-8adb-62cad75f0034@kaod.org>
On 11/28/2016 07:09 PM, Cédric Le Goater wrote:
> Hello,
>
>>> Aspeed SoC AST2400 has a set of SMC (Static Memory Controller)
>>> controllers in which you find :
>>>
>>> - Legacy Static Memory Controller (called SMC in the spec)
>>> . base address at 0x16000000
>>> . BMC firmware
>>> . old register set
>>> . supports NOR flash, NAND flash and SPI flash memory. All bootable.
>>> . 1 chip select pin (CE0)
>>>
>>> - New Static Memory Controller (called FMC in the spec)
>>> . base address at 0x16200000
>>> . BMC firmware
>>> . new register set
>>> . supports NOR flash, NAND flash and SPI flash memory.
>>> . 5 chip select pins (CE0 ∼ CE4)
>>>
>>> - SPI Flash Controller (called SPI in the spec)
>>> . base address at 0x16300000
>>> . host Firmware
>>> . exotic register set, between old and new ...
>>> . supports SPI flash memory
>>> . 1 chip select pin (CE0)
>>
>> This should be (except for the base address) be in some documentation,
>> it helps.
>
> Sure. I will add that.
>
>>> Aspeed SoC AST2500 defines has a similar set of SMC (Static Memory
>>> Controller) controllers, more in the vein of the AST2400 FMC :
>>>
>>> - Legacy Static Memory Controller is gone, NOR and NAND support also
>>>
>>> - Firmware SPI Memory Controller (called FMC in the spec)
>>> . base address at 0x16200000
>>> . BMC firmware
>>> . new register set
>>> . supports SPI flash memory.
>>> . 3 chip select pins (CE0 ~ CE2)
>>>
>>> - SPI Flash Controller (called SPI1 in the spec) first
>>> . base address at 0x16300000
>>> . host firmware
>>> . new register set
>>> . supports SPI flash memory.
>>> . 2 chip select pins (CE0 ~ CE1)
>>>
>>> - SPI Flash Controller (called SPI2 in the spec) second
>>> . base address at 0x16310000
>>> . host firmware
>>> . new register set
>>> . supports SPI flash memory.
>>> . 2 chip select pins (CE0 ~ CE1)
>>>
>>>
>>> So, these are the reasons behind the naming mess. Added to that the
>>> driver considers the acronym SMC to stand for SPI Memory Controller,
>>> which is wrong. I tried to reduce the confusion with some comments but
>>> that was a failure :)
>>
>> The explanation above is awesome though.
>>
>>> In qemu, we have used FMC (Firmware ...) and SPI to name the controllers
>>> and we just dropped the legacy SMC. I think using the same naming scheme
>>> is a good idea. We don't support anything else than SPI either so we can
>>> drop the other types for the moment.
>>
>> One thing which I still ponder about is how do you support those
>> controllers which support NOR and NAND flash and SPI, do you tap
>> into all subsystems ?
>
> Aspeed dropped support for NAND and NOR flash in the AST2500 SoC,
> all controllers are SPI only and the AST2400 boards we have also
> only use SPI. So we did not consider the other flash flavors for
> the driver even though some board might use it, but I don't know
> that.
So we cross that bridge when we come to it ? Hm, that could work.
Please be sure to explicitly state you only support the SPI mode
of operation in documentation.
Thanks!
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-11-28 18:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 10:42 [PATCH v2] mtd/spi-nor: Add SPI memory controllers for Aspeed SoCs Cédric Le Goater
2016-11-11 4:42 ` Joel Stanley
2016-11-14 18:42 ` Marek Vasut
2016-11-14 17:27 ` Rob Herring
2016-11-20 21:43 ` Marek Vasut
2016-11-21 4:45 ` Joel Stanley
2016-11-25 13:57 ` Marek Vasut
2016-11-25 15:01 ` Cédric Le Goater
2016-11-25 15:12 ` Marek Vasut
2016-11-28 18:09 ` Cédric Le Goater
2016-11-28 18:21 ` Marek Vasut [this message]
2016-12-08 16:36 ` Cédric Le Goater
2016-12-09 2:29 ` Marek Vasut
2016-12-09 10:42 ` Cédric Le Goater
2016-12-09 13:37 ` Cyrille Pitchen
2016-12-09 14:03 ` Marek Vasut
2016-12-09 14:13 ` Cyrille Pitchen
2016-12-09 15:46 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5aabac4-ddd2-38c3-a5a7-d1b56274230d@gmail.com \
--to=marek.vasut@gmail.com \
--cc=boris.brezillon@free-electrons.com \
--cc=clg@kaod.org \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=joel@jms.id.au \
--cc=linux-mtd@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox