I've been working at enabling the kernel (linux-3.10) for using an ENC28J60 board http://www.industrialberry.com/ethernetberry-v-1-1/
I have set up the build environment for building the boot.img and have successfully replaced and booted an image I built.
Secondly, I enabled the enc28j60 driver, cleaned, and re-ran the config and rebuilt and was able to generate an enc28j60.ko kernel module.
Finally, I also configured (thought unsure if correctly), the spi busses in the /lichee/tools/pack/chips/sun50iw1p1/configs/nanopi_a64/sys_config.fex file.
I changed the configuration as follows:
Basically the only change was to change spi0_used and spi1_used to 1 to enable spi. There's another section in the .fex file that is the SPI device configuration:
I didn't change any of it, so I assume it will default to some reasonable value.
I can:
and can see it listed:
I think I'm close, but I'm still not seeing any signs the ports were recognized. I don't see any SPI messages in the message log, etc.
Does anyone have a recommendation for what to try next? I think the issue may be in enabling SPI because I don't see anything resembling SPI devices in /dev/ or in the logs.
I have set up the build environment for building the boot.img and have successfully replaced and booted an image I built.
Secondly, I enabled the enc28j60 driver, cleaned, and re-ran the config and rebuilt and was able to generate an enc28j60.ko kernel module.
Finally, I also configured (thought unsure if correctly), the spi busses in the /lichee/tools/pack/chips/sun50iw1p1/configs/nanopi_a64/sys_config.fex file.
I changed the configuration as follows:
Code: Select all
;----------------------------------------------------------------------------------
;SPI controller configuration
;----------------------------------------------------------------------------------
[spi0]
; spi0_used = 0
; XXX 5D change to enable SPI
spi0_used = 1
spi0_cs_number = 1
spi0_cs_bitmap = 1
spi0_cs0 = port:PC3<4><1><default><default>
spi0_sclk = port:PC2<4><default><default><default>
spi0_mosi = port:PC0<4><default><default><default>
spi0_miso = port:PC1<4><default><default><default>
[spi1]
; spi1_used = 0
; XXX 5D change to enable SPI
spi1_used = 1
spi1_cs_number = 1
spi1_cs_bitmap = 1
spi1_cs0 = port:PD0<4><1><default><default>
spi1_sclk = port:PD1<4><default><default><default>
spi1_mosi = port:PD2<4><default><default><default>
spi1_miso = port:PD3<4><default><default><default>
Basically the only change was to change spi0_used and spi1_used to 1 to enable spi. There's another section in the .fex file that is the SPI device configuration:
Code: Select all
;----------------------------------------------------------------------------------
;SPI device configuration
;compatible --- device name
;spi-max-frequency --- work frequency
;reg --- chip select
;optional properties: spi-cpha, spi-cpol, spi-cs-high
;----------------------------------------------------------------------------------
;[spi0/spi_board0]
;compatible =
;spi-max-frequency =
;reg =
;spi-cpha
;spi-cpol
;spi-cs-high
I didn't change any of it, so I assume it will default to some reasonable value.
I can:
Code: Select all
sudo insmod enc28j60.ko
and can see it listed:
Code: Select all
Module Size Used by
enc28j60 18648 0
mali 213077 0
8189es 1032333 0
I think I'm close, but I'm still not seeing any signs the ports were recognized. I don't see any SPI messages in the message log, etc.
Does anyone have a recommendation for what to try next? I think the issue may be in enabling SPI because I don't see anything resembling SPI devices in /dev/ or in the logs.