Has anyone gotten the enc28j60 driver working in the 
drivers/net/ethernet/microchip directory?

I'm looking for any device tree structures that can help bring this up. 
Everything I've found on the internet doesn't seem to work for Beaglebone. 
I'm also aware of how woefully old enc28j60.c is and have updated it for 
the device tree (adding 'compatible', etc.)

Here's my current DT for this device:

/* */
/dts-v1/;

/plugin/; 

/ {

compatible = "ti,beaglebone", "ti,beaglebone-black"; 

    /* identification */                                                        
                                                
    part-number = "BB-ENC28J60-01";                                             
                                                
    version = "00A0";                                                           
                                                

    /* state the resources this cape uses */                                    
                                                
    exclusive-use =                                                             
                                                
            /* the pin header uses */                                           
                                                
            "P9.17",        /* spi0_cs0 */                                      
                                                
            "P9.18",        /* spi0_d1 */                                       
                                                
            "P9.21",        /* spi0_d0 */                                       
                                                
            "P9.22",        /* spi0_sclk */                                     
                                                
            /* the hardware ip uses */                                          
                                                
            "spi0";                                                             
                                                

    fragment@0 {                                                                
                                                
            target = <&am33xx_pinmux>;                                          
             
           __overlay__ {                                                        
                                               
                    /* default state has all gpios released and mode set to 
uart1 */                                            
                    bb_spi0_pins: pinmux_bb_spi0_pins {                         
                                                
                            pinctrl-single,pins = <                             
                                                
                                    0x150 0x30      /* spi0_sclk.spi0_sclk, 
INPUT_PULLUP | MODE0 */                             
                                    0x154 0x30      /* spi0_d0.spi0_d0, 
INPUT_PULLUP | MODE0 */                                 
                                    0x158 0x10      /* spi0_d1.spi0_d1, 
OUTPUT_PULLUP | MODE0 */                                
                                    0x15c 0x10      /* spi0_cs0.spi0_cs0, 
OUTPUT_PULLUP | MODE0 */                              
                            >;                                                  
                                                
                    };                                                          
                                                
            };                                                                  
                                                
    };                                                                          
                                                

    fragment@1 {                                                                
                                                
            target = <&spi0>;       /* spi0 is numbered correctly */            
                                                
            __overlay__ {                                                       
                                                
                    #address-cells = <1>;                                       
                                                
                    #size-cells = <0>;                                          
                                                

                    status = "okay";                                            
                                                
                    pinctrl-names = "default";                                  
                                                
                    pinctrl-0 = <&bb_spi0_pins>;                                
                                                

                    channel@0 {                                                 
                                                
                            #address-cells = <1>;                               
                                                
                            #size-cells = <0>;                                  
                                                

                            compatible = "spidev";                              
                                                

                            reg = <0>;    
                                                       spi-max-frequency = 
<16000000>;                                                                     
                            spi-cpha;                                           
                                                

                            //reg = < 0x00002160 0x00000020 >;                  
                                                
                            interrupt-parent = < &cpu >;                        
                                                
                            interrupts = < 2 >;                                 
                                                
                            clock-frequency = < 100000000 >;                    
                                                
                            baud-width = < 8 >;     /* BAUD_WIDTH type NUMBER 
*/                                                
                            gpios = < &spi1_cs 0 0 >;                           
                                                
                            ethernet: enc28j60@0 {                              
                                                
                                    compatible = "microchip,enc28j60";          
                                                
                                    spi-max-frequency = < 20000000 >;           
                                                
                                    reg = < 0 >;                                
                                                
                                    interrupts = < 4 >;                         
                                                
                                    interrupt_deassert_reg = < 0x00003000 >;    
                                                
                            };                                                  
                                                
                    };                                                          
                                                

                    channel@1 {                                                 
                                                
                            #address-cells = <1>;                               
                                                
                            #size-cells = <0>;                                  
                                                

                            compatible = "spidev";                              
                                                

                            reg = <1>;                                          
                                                
                            spi-max-frequency = <16000000>;                     
                                                
                    };                                                          
                                                
            };                                                                  
                                                
    };                                                                          
    

-- 
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