Using the new 3.12 mainline kernel and Robert C Nelson's Ubuntu rootfs I've 
managed to get both CAN devices working. However, it get a warning when the 
device boots:

c_can_platform 481d0000.d_can: can't request region for resource [mem 
0x44e10644-0x44e10647]

What this is referring to is the fact that in the device tree definitions 
for each of the two can devices, the same register address is being 
requested. They are defined in 
'am33xx.dtsi<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am33xx.dtsi?id=refs/tags/v3.12>'
 
as follows:

        dcan0: d_can@481cc000 {
            compatible = "bosch,d_can";
            ti,hwmods = "d_can0";
            reg = <0x481cc000 0x2000
                0x44e10644 0x4>;
            interrupts = <52>;
            status = "disabled";
        };

        dcan1: d_can@481d0000 {
            compatible = "bosch,d_can";
            ti,hwmods = "d_can1";
            reg = <0x481d0000 0x2000
                0x44e10644 0x4>;
            interrupts = <55>;
            status = "disabled";
        };

For both items the address '0x44e10644 0x4', referring to the register 
'dcan_raminit' 
(Pg 793 of spruh73h.pdf <http://www.ti.com/lit/ug/spruh73h/spruh73h.pdf>), 
is being reserved for use. The new devicetree interpreter considers any 
overlap between device register memory mappings as a problem, hence the 
message seen on boot.

The register 'dcan_raminit' is in fact used by both can devices, so it does 
make sense for both to have access to it. It appears however, that this 
register is only used in the d_can driver which does not appear to be in 
use with this latest kernel release. In any case, both device work 
flawlessly (as far as I can tell) regardless of the error message.

I thought I'd have a go at tidying this part of the 
'am33xx.dtsi<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am33xx.dtsi?id=refs/tags/v3.12>'
 
devicetree file up a bit to get rid of this message - and this is where my 
question comes in. I thought I could make a single parent node for d_can 
with this shared register defined at the top level, and then add the two 
can devices to it as child nodes. I came up with something like this:

        dcan {
            #address-cells = <1>;
            #size-cells = <1>;
            reg = <0x44e10644 0x4>;

            dcan0: d_can@481cc000 {
                compatible = "bosch,d_can";
                ti,hwmods = "d_can0";
                reg = <0x481cc000 0x2000>;
                interrupts = <52>;
                status = "disabled";
            };

            dcan1: d_can@481d0000 {
                compatible = "bosch,d_can";
                ti,hwmods = "d_can1";
                reg = <0x481d0000 0x2000>;
                interrupts = <55>;
                status = "disabled";
            };
        };

I tried various iterations along this line (and modified the 
am335x-boneblack.dts<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am335x-boneblack.dts?id=refs/tags/v3.12>
 file 
with the corresponding 'status = 'okay' entries for these devices), all of 
which would compile fine, and the dvice would boot with no error messages, 
but for whatever reason the devices would never show up as they had 
previously.

I was wonder if anyone with a better understanding of devicetree syntax 
could suggest the correct structure for the parent/child nodes I am trying 
to create.

Any help or suggestions would be greatly appreciated.


Regards,
Andrew Glen.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to