From: "linshunquan (A)" <linshunquan1@hisilicon.com>
To: Rob Herring <robh@kernel.org>, <robh+dt@kernel.org>,
<mark.rutland@arm.com>
Cc: Lee Jones <lee.jones@linaro.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"howell.yang@hisilicon.com" <howell.yang@hisilicon.com>,
Jiancheng Xue <xuejiancheng@hisilicon.com>,
"jalen.hsu@hisilicon.com" <jalen.hsu@hisilicon.com>,
lvkuanliang 00222834 <lvkuanliang@hisilicon.com>,
"suwenping@hisilicon.com" <suwenping@hisilicon.com>,
"raojun@hisilicon.com" <raojun@hisilicon.com>,
"kevin.lixu@hisilicon.com" <kevin.lixu@hisilicon.com>,
<quqi@hisilicon.com>
Subject: Re: [PATCH] mfd: Add HiSilicon Flash Memory Controller(FMC) driver
Date: Mon, 17 Oct 2016 16:03:17 +0800 [thread overview]
Message-ID: <95d79627-11a2-3236-3cff-7c294772cc51@hisilicon.com> (raw)
In-Reply-To: <6108fbb9-e82b-f56e-cf41-18d8859fbdfd@hisilicon.com>
On 2016/10/10 11:19, linshunquan (A) wrote:
>
>
> On 2016/9/15 5:56, Rob Herring wrote:
>> On Wed, Sep 14, 2016 at 4:12 AM, linshunquan (A)
>> <linshunquan1@hisilicon.com> wrote:
>>>
>>>
>>> On 2016/9/13 22:56, Rob Herring wrote:
>>>> On Tue, Sep 06, 2016 at 10:57:22AM +0800, linshunquan 00354166 wrote:
>>>>> From: Shunquan Lin <linshunquan1@hisilicon.com>
>>>>>
>>>>> This patch adds driver support for HiSilicon Flash Memory
>>>>> Controller(FMC). HiSilicon FMC is a multi-functions device which
>>>>> supports SPI Nor flash controller, SPI nand Flash controller and
>>>>> parallel nand flash controller.
>>>>>
>>>>> Signed-off-by: Shunquan Lin <linshunquan1@hisilicon.com>
>>>>> + - spi-nor:
>>>>> + Required properties:
>>>>> + - compatible : "hisilicon,fmc-spi-nor"
>>>>> + see "Documentation/devicetree/bindings/mtd/hisilicon,fmc-spi-nor.txt
>>>>> +
>>>>> + - spi-nand:
>>>>> + Required properties:
>>>>> + - compatible : "hisilicon,fmc-spi-nand"
>>>>> + - reg : The chipselect for spi-nand devices
>>>>> + - address-cells : Should be 1.
>>>>> + - size-cells : Should be 0.
>>>>> +
>>>>> + - nand:
>>>>> + Required properties:
>>>>> + - compatible : "hisilicon,fmc-nand"
>>>>> + - reg : The chipselect for nand devices
>>>>> + - address-cells : Should be 1.
>>>>> + - size-cells : Should be 0.
>>>>> +
>>>>> +Example:
>>>>> +fmc: spi-nor-controller@10000000 {
>>>>> + compatible = "hisilicon,hisi-fmc";
>>>>> + reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
>>>>> + reg-names = "control", "memory";
>>>>> + clocks = <&crg FMC_CLK>;
>>>>> + #address-cells = <1>;
>>>>> + #size-cells = <0>;
>>>>> +
>>>>> + hisfc:spi-nor@0 {
>>>>> + compatible = "hisilicon,fmc-spi-nor";
>>>>
>>>> Is this an actual h/w sub-block? If not remove this node and make the
>>>> spi-nor the immediate child.
>>>>
>>>
>>> Hi Herring,
>>> Thanks for your reply. Firstly I must correct a mistake here:
>>> fmc: spi-nor-controller@10000000 {
>>> compatible = "hisilicon,hisi-fmc";
>>> ...
>>> correct to:
>>> fmc: flash-memory-controller@10000000 {
>>> compatible = "hisilicon,hisi-fmc";
>>> ...
>>>
>>> Spi-nor is a sub block of HiSilicon Flash Memory Controller(FMC), HiSilicon FMC
>>> is a multi-functions device, besides it also supports SPI Nand and Parallel Nand.
>>
>> I understand that, but then were are the registers for the sub-blocks?
>> If there is only a single set of chipselects for all devices (i.e. 0
>> to N) and no separate register blocks for the sub-blocks, then you
>> don't need this intermediate node.
>>
>
> Hi Rob,
> I'm sorry it's taken me so long to get back to you.
>
> To the HiSilicon FMC, different devices have different chipselect, and you are right,
> the register blocks are no separate, but spi nor, spi nand and nand may require
> different initial configuration of default sublock clocks and clock frequencies, so
> I think this node is necessary.
>
> Here is a sample about the soc Hi3519:
>
> in arch/arm/boot/dts/hi3519.dtsi defined:
>
> fmc: flash-memory-controller@10000000 {
> compatible = "hisilicon,hisi-fmc";
> reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
> reg-names = "control", "memory";
> clocks = <&crg HI3519_FMC_CLK>;
> #address-cells = <1>;
> #size-cells = <0>;
>
> hisfc:spi-nor {
> compatible = "hisilicon,hisi-sfc";
> assigned-clocks = <&crg HI3519_FMC_CLK>;
> assigned-clock-rates = <24000000>;
> #address-cells = <1>;
> #size-cells = <0>;
> };
>
> hisnfc:spi-nand {
> compatible = "hisilicon,fmc-spi-nand";
> assigned-clocks = <&crg HI3519_FMC_CLK>;
> assigned-clock-rates = <3000000>;
> #address-cells = <1>;
> #size-cells = <0>;
> };
> };
>
> in arch/arm/boot/dts/hi3519-demb.dts, which include hi3519.disi, defined:
>
> &hisfc {
> hi_sfc@0 {
> compatible = "jedec,spi-nor";
> reg = <0>;
> spi-max-frequency = <160000000>;
> m25p,fast-read;
> };
> };
>
> &hisnfc {
> hinand@0 {
> compatible = "jedec,spi-nand";
> reg = <0>;
> spi-max-frequency = <200000000>;
> };
> };
>
> Maybe I have not well understood on DTS, I hope I can get some suggestions from Rob.
>
> Best regards
> /Shunquan Lin
>
Hi Rob,
I think seriously about your question again.
It is really not necessary to set so many nodes, I have a new solution as blew:
fmc: flash-memory-controller@10000000 {
compatible = "hisilicon,hisi-fmc";
reg = <0x10000000 0x1000>, <0x14000000 0x1000000>;
reg-names = "control", "memory";
clocks = <&crg FMC_CLK>;
#address-cells = <1>;
#size-cells = <0>;
spi-nor@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <160000000>;
};
Perhaps, if there are some sub-block to add, we can define:
spi-nor@1{
compatible = "jedec,spi-nor";
reg = <1>;
spi-max-frequency = <160000000>;
}
spi-nand@0{
compatible = "jedec,spi-nand";
reg = <2>;
spi-max-frequency = <200000000>;
}
...
}
It is so nice to get any reply and suggestion from you.
Best regards
/Shunquan Lin
prev parent reply other threads:[~2016-10-17 8:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 2:57 linshunquan 00354166
2016-09-13 12:08 ` Lee Jones
2016-09-13 14:56 ` Rob Herring
[not found] ` <6b522be0-dcec-a84b-f161-69b8805bef62@hisilicon.com>
[not found] ` <CAL_Jsq+8qPYfiA_bojPP2vm6PGPr9B=ntct=OyhoJTervMZMuA@mail.gmail.com>
2016-10-10 3:19 ` linshunquan (A)
2016-10-17 8:03 ` linshunquan (A) [this message]
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=95d79627-11a2-3236-3cff-7c294772cc51@hisilicon.com \
--to=linshunquan1@hisilicon.com \
--cc=devicetree@vger.kernel.org \
--cc=howell.yang@hisilicon.com \
--cc=jalen.hsu@hisilicon.com \
--cc=kevin.lixu@hisilicon.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvkuanliang@hisilicon.com \
--cc=mark.rutland@arm.com \
--cc=quqi@hisilicon.com \
--cc=raojun@hisilicon.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=suwenping@hisilicon.com \
--cc=xuejiancheng@hisilicon.com \
/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
all inboxes | Powered by JetHome®