To reply to myself: After looking at it again and reading through other 
people's pages, I managed to get the CAN device working with this DTS 
(after cloning the `BeagleBoard-DeviceTrees` repo):

#include "am5729-beagleboneai.dts"

/ {
chosen {
base_dtb = "am5729-beagleboneai-kitepower.dts";
base_dtb_timestamp = __TIMESTAMP__;
};
};

// The second name (pinmux_dcan2_pins) seems not used
&dra7_pmx_core {
dcan2_pins: pinmux_dcan2_pins {
pinctrl-single,pins = <
/* P9_24: uart1_txd.d_can2_rx */
DRA7XX_CORE_IOPAD(0x368C, PIN_INPUT_PULLUP | MUX_MODE2)
/* P9_26: uart1_rxd.d_can2_tx */
DRA7XX_CORE_IOPAD(0x3688, PIN_OUTPUT_PULLUP | MUX_MODE2)
>;
};
};

// Initially defined in dra7 (which is included through multiple layers) as 
disabled
&dcan2 {
pinctrl-names = "default"; // Not sure what this is used for
pinctrl-0 = <&dcan2_pins>;
status = "okay";
};


This muxes the 2 pins with the CAN peripheral to CAN.

After compiling this into a DTB, putting it on the beagle and setting it up 
in the `uEnv.txt`, I only need to bring up the CAN device:

sudo ip link set can0 up type can bitrate ${bitrate}

and CAN works (I use a bit rate of 125000).

Thanks for the people who took time to document their efforts and I hope 
this helps others.

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/b8b22226-590a-4237-8dec-5b6f27bffb6f%40googlegroups.com.

Reply via email to