Hi,

I'm trying to connect a CAN SPI controller (MCP2515) to my BBB and i'm 
experiencing some problems when i enable the SPI interface with device 
tree. It is being correctly initiated and the device is also recognized but 
I get the following messages on dmesg after enabling the dtbo file:

[   76.488938] mcp251x spi1.0: mode 0, irq 261, awake 1, clkout 1, 
oscillator freq 16000000
[   77.490240] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset
[   77.501439] mcp251x spi1.0: hw probe failed
[   77.501488] mcp251x spi1.0: probe failed

*My dts file:*

fragment@0 {
     target = <&am33xx_pinmux>;
     __overlay__ {
 
       bone_spi1_pins: pinmux_bone_spi1_pins {
         pinctrl-single,pins = <
           0x190 0x33      /* mcasp0_aclkx.spi1_sclk, RX_ENABLED | PULLUP | 
MODE3 */
           0x194 0x33      /* mcasp0_fsx.spi1_d0, RX_ENABLED | PULLUP | 
MODE3 */
           0x198 0x13      /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
           0x19c 0x13      /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 
*/
         >;
       };
       
       bone_mcp2515_0_pins: pinmux_bone_0_mcp2515_pins {
         pinctrl-single,pins = <
           0x1AC 0x37         /* mcasp0_ahclkx.gpio3_21, RX_ENABLED | 
PULLUP | MODE7 */
         >;
       };
       
        mcp251x_clock: mcp2515 {
            compatible = "fixed-clock";
            #clock-cells = <0>;
            clock-frequency = <16000000>;
        };
       
     };
   };
 
   fragment@1 {
         target = <&spi1>;
 
     __overlay__ {
       #address-cells = <1>;
       #size-cells = <0>;
 
       status    = "okay";
       pinctrl-names   = "default";
       pinctrl-0       = <&bone_spi1_pins>;
 
       cs-gpios = <&gpio4 17 0>, <&gpio1 7 0>;
 
       mcp2515@0 {
 
         compatible = "microchip,mcp2515";
         reg = <0>; /* cs0 */
         mode = <0>;
 
         spi-max-frequency = <10000000>;
         clocks = <&mcp251x_clock>; 
         
         pinctrl-names = "default";
         pinctrl-0 = <&bone_mcp2515_0_pins>;
 
         interrupt-parent = <&gpio4>;
         interrupts = <21>;
 
         mcp251x,oscillator-frequency = <16000000>;
         mcp251x,irq-gpios = <&gpio4 21 0>;
         mcp251x,stay-awake = <1>;
         mcp251x,enable-clkout = <1>;
         
       };       
     };
   };   


Can anyone help me finding what is missing?

Thank you.

Regards,
Duarte

-- 
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/d/optout.

Reply via email to