I have the following TDS configuration and I expect to see /dev/can0, but it is not there.
dmesg reports
PHY 4a101000.mdio:00 not found.
when I “dmesg | grep can” all I see is last dmesg line:
CAN device driver interface
uname -a reports:
Linux beaglebone 4.4.30-ti-r64 #1 SMP Fri Nov 4 2016 armv71 GNU/Linux
I have never worked with canbus, so I am not sure if it is my DTS file incorrect or I am missing something at Linux level.
`
/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
/* identification */
part-number = “BB-MIKROBUS-01”;
version = “00A1”;
/* state the resources this cape uses /
exclusive-use =
/ the pin header uses /
“P8.10”, / gpio2_4 /
“P8.11”, / gpio1_13 /
“P8.12”, / gpio1_12 /
“P8.13”, / ehrpwm2B /
“P8.14”, / gpio0_26 /
“P8.15”, / gpio1_15 /
“P8.16”, / gpio1_14 /
“P8.17”, / gpio0_27 /
“P8.18”, / gpio2_1 /
“P8.19”, / ehrpwm2A /
“P8.26”, / gpio1_29 /
“P9.11”, / uart4_rxd_mux2 /
“P9.12”, / gpio1_28 /
“P9.13”, / uart4_txd_mux2 /
“P9.14”, / ehrpwm1A_mux1 /
“P9.15”, / gpio1_16 /
“P9.16”, / ehrpwm1B_mux1 /
“P9.17”, / spi0_cs0 /
“P9.18”, / spi0_d1 /
“P9.19”, / i2c2_scl /
“P9.20”, / i2c2_sda /
“P9.21”, / uart2_txd or spi0_d0*/
“P9.22”, /* uart2_rxd or spi0_sclk*/
“P9.23”, /* gpio1_17 /
“P9.24”, / uart1_txd /
“P9.26”, / uart1_rxd /
“P9.28”, / spi1_cs0 /
“P9.29”, / spi1_d0 /
“P9.30”, / spi1_d1 /
“P9.31”, / spi1_sclk /
“P9.33”, / AIN4 /
“P9.35”, / AIN6 /
“P9.36”, / AIN5 /
“P9.37”, / AIN2 /
“P9.38”, / AIN3 /
“P9.39”, / AIN0 /
“P9.40”, / AIN1 /
“P9.41”, / gpio0_20 /
“P9.42”, / spi1_cs1 */
/* the hardware ip uses */
“gpio2_4”,
“gpio1_13”,
“gpio1_12”,
“ehrpwm2B”,
“gpio0_26”,
“gpio1_15”,
“gpio1_14”,
“gpio0_27”,
“gpio2_1”,
“ehrpwm2A”,
“gpio1_29”,
“uart4”,
“ehrpwm1A”,
“gpio1_16”,
“ehrpwm1B”,
“i2c2”,
“spi0”,
“gpio1_17”,
“uart1”,
“spi1”,
“gpio0_20”,
“tscadc”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
/* avoid stupid warning */
#address-cells = <1>;
#size-cells = <1>;
bb_spi1_pins: pinmux_bb_spi1_pins {
pinctrl-single,pins = <
0x190 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 /
0x194 0x33 / mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 /
0x198 0x13 / mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 /
0x19c 0x13 / mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 /
0x164 0x12 / eCAP0_in_PWM0_out.spi1_cs1 OUTPUT_PULLUP | MODE2 /
0x098 0x17 / gpio2_4, OUTPUT_PULLUP | MODE7 */
;
};
bb_spi0_pins: pinmux_bb_spi0_pins {
pinctrl-single,pins = <
0x150 0x30 /* spi0_sclk, INPUT_PULLUP | MODE0 /
0x154 0x30 / spi0_d0, INPUT_PULLUP | MODE0 /
0x158 0x10 / spi0_d1, OUTPUT_PULLUP | MODE0 /
0x15c 0x10 / spi0_cs0, OUTPUT_PULLUP | MODE0 */
;
};
mcp251x_clk24m: mcp251x_can_clock {
compatible = “fixed-clock”;
#clock-cells = <0>;
clock-frequency = <10000000>;
};
};
};
fragment@1 {
target = <&spi1>; /* spi1 is numbered correctly */
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_spi1_pins>;
#address-cells = <1>;
#size-cells = <0>;
cs-gpios = <0>, <0>, <&gpio2 4 0>;
num-cs = <3>;
/* add any spi devices connected here /
/ note that you can do direct SPI via spidev now */
can0: can@1 {
compatible = “microchip,mcp2515”;
reg = <0>;
clocks = <&mcp251x_clk24m>;
spi-max-frequency = <20000000>;
interrupt-parent = <&gpio1>;
interrupts = <16 0x2>;
};
spi1_1{
#address-cells = <1>;
#size-cells = <0>;
compatible = “spidev”;
reg = <1>;
spi-max-frequency = <20000000>;
spi-cpol;
spi-cpha;
};
spi1_2{
#address-cells = <1>;
#size-cells = <0>;
compatible = “spidev”;
reg = <2>;
spi-max-frequency = <20000000>;
spi-cpol;
spi-cpha;
};
};
};
fragment@11 {
target = <&spi0>; /* spi0 is spi2 on mikrobus */
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_spi0_pins>;
#address-cells = <1>;
#size-cells = <0>;
/* add any spi devices connected here /
/ note that you can do direct SPI via spidev now */
spi0_0{
#address-cells = <1>;
#size-cells = <0>;
compatible = “spidev”;
reg = <0>;
spi-max-frequency = <20000000>;
spi-cpol;
spi-cpha;
};
};
};
};
`