[RFC 3/6] dt/bindings: Add bindings for Tegra20/30 NOR bus driver
From: Mirza Krak <hidden>
Date: 2016-07-28 09:29:03
Also in:
linux-clk, linux-devicetree, linux-tegra
2016-07-25 16:15 GMT+02:00 Thierry Reding [off-list ref]:
On Mon, Jul 25, 2016 at 03:16:28PM +0200, Mirza Krak wrote:quoted
2016-07-25 13:30 GMT+02:00 Thierry Reding [off-list ref]:Yes, that clarifies many things. The presence of an external, address- based chip-select is essential information in order to describe this setup properly. Given that the external chip select is entirely invisible to software, I think a more accurate description of your setup would be: gmi at 70090000 { ... /* for the chip select */ #address-cells = <1>; #size-cells = <0>; /* * Technically this could be used to translate the range from * 0x48000000 to 0x4fffffff into a different range, but that * no longer works because of the #address-cells. Does this * matter? */ ranges; bus at 0 { compatible = "simple-bus"; reg = <0>; #address-cells = <1>; #size-cells = <1>; can at 48000000 { reg = <0x48000000 0x100>; ... }; can at 48040000 { reg = <0x48040000 0x100>; ... }; }; };
Finally got around to test this. Above example had some issues, or I
am doing something wrong.
First of, the address parser does not seem to like that #size-cells =
<0> when ranges are empty. Got following warning from device tree
compiler:
Warning (ranges_format): /nor at 70009000 has empty "ranges" property but
its #size-cells (0) differs from / (1)
and on boot:
[ 0.399357] prom_parse: Bad cell count for /nor at 70009000/bus at 0
Got it to work if I changed to (also had to add an empty ranges prop
in bus node):
gmi at 70009000 {
#address-cells = <1>;
#size-cells = <1>;
ranges;
bus at 0,0 {
compatible = "simple-bus";
reg = <0 0>;
ranges;
#address-cells = <1>;
#size-cells = <1>;
can at 48000000 {
reg = <0x48000000 0x100>;
...
};
can at 48040000 {
reg = <0x48040000 0x100>;
...
};
}
But I wonder is there something wrong with below example (which does
work), that is omitting the bus node:
gmi at 70009000 {
#address-cells = <1>;
#size-cells = <1>;
ranges;
can at 48000000 {
reg = <0x48000000 0x100>;
...
};
can at 48040000 {
reg = <0x48040000 0x100>;
...
};
}
Just feel that I need to duplicate information if add an bus node.
Best Regards,
Mirza