From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: Ezequiel Garcia
<ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
pekon-l0cyMroinI0@public.gmane.org,
robertcnelson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org,
nsekhar-l0cyMroinI0@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [RFC PATCH 00/16] OMAP: GPMC: Restructure OMAP GPMC driver (NAND) : DT binding change proposal
Date: Thu, 22 May 2014 11:12:42 +0300 [thread overview]
Message-ID: <537DB17A.6060608@ti.com> (raw)
In-Reply-To: <20140521160818.GA1150-nAQHv47ARr+vIlHkl8J1cg@public.gmane.org>
Hi Ezequiel,
On 05/21/2014 07:08 PM, Ezequiel Garcia wrote:
> Hi Roger,
>
> On 21 May 02:20 PM, Roger Quadros wrote:
>>
>> For DT boot:
>> - The GPMC controller node should have a chip select (CS) node for each used
>> chip select. The CS node must have a child device node for each device
>> attached to that chip select. Properties for that child are GPMC agnostic.
>>
>> i.e.
>> gpmc {
>> cs0 {
>> nand0 {
>> }
>> };
>>
>> cs1 {
>> nor0 {
>> }
>> }
>> ...
>> };
>>
>
> While I agree that the GPMC driver is a bit messy, I'm not sure it's possible
> to go through such a complete devicetree binding re-design (breaking backwards
> compatibility) now that the binding is already in production.
Why not? especially if the existing bindings are poorly dones. Is anyone using these
bindings burning the DT into ROM and can't change it when they update the kernel?
I wouldn't bother much about backward compatibility but just focus on not breaking
functionality with all GPMC users while cleaning up the existing bindings.
>
> AFAIK, TI's SDK 7.0 is released, with a v3.8.x kernel which uses this GPMC
> binding. And then you have the ISEE board too, using this binding.
How does this prevent them from not using the new bindings when they update the kernel?
>
> Also, what's the problem with the current devicetree binding (not that I'm fan
> of it)?
>
The existing binding uses this format
gpmc {
ranges <cs-num 0 IO_partition_start IO_partition_size,
cs-num 0 IO_partition_start IO_partition_size,
...>
node-name0 {
compatible = "<id for device on this chip select>";
reg = <cs-num IO_offset IO_size>;
<gpmc cs properties>;
<device specific properties>;
};
node-name1 {
...
};
};
with requirements that
- chip select number (cs-num) is encoded in range id
- child's node-name is used to identify device type (NAND, Onenand, etc) and driver expects that.
All this results in the following issues
- No way to define entire GPMC I/O map (typically 1st 1GB), without assigning them to a Chip select. i.e. incomplete hardware description.
TI SoCs variants can have different GPMC I/O sizes, some can have 512MB others can have 1GB. There needs to be a way to specify that.
- No clean way to specify GPMC register map for use by child nodes. NAND controller which can be one of the children needs to use the GPMC register map.
- Tricky to define multiple devices within a single chip select region.
- Uses node name to identify device type like nand and onenand. Doesn't use compatible id for them.
- GPMC CS properties are mixed with device properties, resulting in unnecessary binding documents like
http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/gpmc-eth.txt
http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
To solve these issues, I'm proposing the following format
gpmc {
ranges <0 0 IO_start IO_size /* entire GPMC I/O space e.g. 1GB or 512MB */
1 0 Reg_start Reg_size>; /* GPMC register space */
cs0 {
ranges <0 0 IO_partition_start IO_partition_size>; /* CS0 IO partition e.g. 16MB */
gpmc,cs-num = <0>; /* pass chip select number explicitly */
<gpmc cs properties>;
dev0 {
compatible = "<id for device on this chip select>";
reg = <0 IO_offset IO_size /* Device IO region e.g. 1KB */
1 Reg_offset Reg_size>;
<device specific properties>;
};
dev1 {
...
};
};
cs1 {
...
};
};
All I'm doing is splitting up the CS node and the device node and removing the cs-num encoding from the ranges property.
This results in a much cleaner DT binding and code.
The format is similar to the one used by the ti-aemif driver.
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt
Having a unified format for all TI memory controllers will make life much easier for us.
cheers,
-roger
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-05-22 8:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 11:20 [RFC PATCH 00/16] OMAP: GPMC: Restructure OMAP GPMC driver (NAND) Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 01/16] ARM: OMAP2+: gpmc: Add platform data Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 02/16] ARM: OMAP2+: gpmc: Add gpmc timings and settings to " Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 03/16] ARM: OMAP2+: gmpc: add gpmc_generic_init() Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 04/16] ARM: OMAP2+: gpmc: use platform data to configure CS space and poplulate device Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 05/16] ARM: OMAP2+: gpmc: Use low level read/write for context save/restore Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 06/16] ARM: OMAP2+: gpmc: add NAND specific setup Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 07/16] ARM: OMAP2+: nand: Update gpmc_nand_init() to use generic_gpmc_init() Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 08/16] mtd: nand: omap: Fix build warning Roger Quadros
2014-05-22 0:54 ` Jingoo Han
2014-05-22 8:17 ` Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 09/16] mtd: nand: omap: Move IRQ handling from GPMC to NAND driver Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 10/16] mtd: nand: omap: Move gpmc_update_nand_reg to nand driver Roger Quadros
2014-05-21 11:20 ` [RFC PATCH 11/16] mtd: nand: omap: Move NAND write protect code from GPMC to NAND driver Roger Quadros
2014-05-21 11:21 ` [RFC PATCH 12/16] mtd: nand: omap: Copy platform data parameters to omap_nand_info data Roger Quadros
2014-05-21 11:21 ` [RFC PATCH 13/16] mtd: nand: omap: True device tree support Roger Quadros
2014-05-21 11:21 ` [RFC PATCH 14/16] ARM: OMAP: gpmc: Update DT binding documentation Roger Quadros
2014-05-21 11:21 ` [RFC PATCH 15/16] mtd: nand: omap: " Roger Quadros
2014-05-21 11:21 ` [RFC PATCH 16/16] ARM: dts: omap3-beagle: Add NAND device Roger Quadros
2014-05-21 16:08 ` [RFC PATCH 00/16] OMAP: GPMC: Restructure OMAP GPMC driver (NAND) Ezequiel Garcia
[not found] ` <20140521160818.GA1150-nAQHv47ARr+vIlHkl8J1cg@public.gmane.org>
2014-05-22 8:12 ` Roger Quadros [this message]
[not found] ` <537DB17A.6060608-l0cyMroinI0@public.gmane.org>
2014-05-22 11:51 ` [RFC PATCH 00/16] OMAP: GPMC: Restructure OMAP GPMC driver (NAND) : DT binding change proposal Javier Martinez Canillas
[not found] ` <CABxcv=nbgGhVN+XYO8s=mYOpoLU9-kWuEqc+FLMaSbWS7BJNyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-22 14:46 ` Ezequiel Garcia
[not found] ` <20140522144600.GA1785-nAQHv47ARr+vIlHkl8J1cg@public.gmane.org>
2014-05-23 8:16 ` Roger Quadros
2014-05-23 9:40 ` Javier Martinez Canillas
[not found] ` <CABxcv=kJA-kWpvcU0Jiy-gJYZP7W0kJjGtq3Fjr0VUBBC_znHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-26 7:23 ` Roger Quadros
2014-05-23 14:53 ` Tony Lindgren
2014-05-26 7:33 ` Roger Quadros
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=537DB17A.6060608@ti.com \
--to=rogerq-l0cymroini0@public.gmane.org \
--cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org \
--cc=jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nsekhar-l0cyMroinI0@public.gmane.org \
--cc=pekon-l0cyMroinI0@public.gmane.org \
--cc=robertcnelson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).