From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] at91: dt: sam9261: Added DM9000 in the device tree
Date: Tue, 31 Dec 2013 20:19:51 +0100 [thread overview]
Message-ID: <4526077.qASk8HSHKP@wuerfel> (raw)
In-Reply-To: <1388507534-10570-7-git-send-email-jjhiblot@traphandler.com>
On Tuesday 31 December 2013 17:32:14 jjhiblot at traphandler.com wrote:
>
> + ethernet at 30000000 {
> + compatible = "davicom,dm9000";
> + reg = <0x30000000 0x2 0x30000004 0x2>;
> + interrupt-parent = <&pioC>;
> + interrupts = <11 IRQ_TYPE_EDGE_BOTH>;
> + local-mac-address = [00 00 de ad be ef];
> + davicom,no-eeprom;
> +
> + smc,cs = <2>;
> + smc,ncs_read_setup = <0>;
> + smc,nrd_setup = <2>;
> + smc,ncs_write_setup = <0>;
> + smc,nwe_setup = <2>;
> + smc,ncs_read_pulse = <8>;
> + smc,nrd_pulse = <4>;
> + smc,ncs_write_pulse = <8>;
> + smc,nwe_pulse = <4>;
> + smc,read_cycle = <16>;
> + smc,write_cycle = <16>;
> + smc,tdf_cycles = <1>;
> + smc,tdf_optimized = <0>;
> + smc,page_size = <0>;
> + smc,byte_access_type = <1>;
> + smc,bus_width = <1>;
> + smc,nwait_mode = <0>;
> + smc,read_mode = <1>;
> + smc,write_mode = <1>;
> + };
I don't like how this forces you to mix the properties
of the ethernet device with the properties of the smc
port. I would also like to see the address translation
reflected in the DT nodes. This should probably just work
out if you restructure the DT representation, and won't need
changes in the driver.
How about this:
smc: smc at ffffec00 {
#address-cells = <2>; /* cs, address */
#size-cells = <1>;
ranges = <2 0 0x30000000 0x10000000>
<3 0 0x40000000 0x10000000>;
extbus at 2.0 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 2 0 0x10000000>;
smc,ncs_read_setup = <0>;
smc,nrd_setup = <2>;
smc,...
ethernet at 0 {
compatible = "davicom,dm9000";
reg = <0x0 0x2> <0x4 0x2>;
};
};
};
If each bus interface has a fixed range of registers, you can actually
collapse the upper two nodes again and just have one device per
chipselect.
Arnd
next prev parent reply other threads:[~2013-12-31 19:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 16:32 [PATCH 0/6] Device Tree support for the at91sam9261ek jjhiblot at traphandler.com
2013-12-31 16:32 ` [PATCH 1/6] Basic Device Tree support for the at91sam9261 jjhiblot at traphandler.com
2014-01-02 23:30 ` boris brezillon
2014-01-03 9:52 ` Jean-Jacques Hiblot
2013-12-31 16:32 ` [PATCH 2/6] at91: dt: sam9261: Added support for the lcd display jjhiblot at traphandler.com
2013-12-31 16:32 ` [PATCH 3/6] At91: dt: Added smc bus driver jjhiblot at traphandler.com
2013-12-31 18:03 ` boris brezillon
2014-01-03 0:24 ` boris brezillon
2014-01-03 9:42 ` Jean-Jacques Hiblot
2014-01-03 10:19 ` boris brezillon
2013-12-31 16:32 ` [PATCH 4/6] at91: dt: sam9261: Pinmux DT entries for the SMC/EBI interface jjhiblot at traphandler.com
2013-12-31 16:32 ` [PATCH 5/6] at91: dt: sam9261: Add an entry in the DT for the SMC/EBI bus driver jjhiblot at traphandler.com
2013-12-31 16:32 ` [PATCH 6/6] at91: dt: sam9261: Added DM9000 in the device tree jjhiblot at traphandler.com
2013-12-31 19:19 ` Arnd Bergmann [this message]
2014-01-02 19:31 ` Jean-Jacques Hiblot
2014-01-02 20:00 ` Arnd Bergmann
2014-01-06 18:13 ` Jean-Jacques Hiblot
2013-12-31 17:48 ` [PATCH 0/6] Device Tree support for the at91sam9261ek boris brezillon
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=4526077.qASk8HSHKP@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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