Added my own flag for full_duplex mode in the driver (enc28j60,duplex_mode) as the driver starts in half_duplex and there is no way to configure this (wierd?).
I however had troubles with the boot configuration of the reset pin. It should be set to output high but at boot it was set low which made the enc28j60 be in constant reset. I think i have it configured now to boot as output high, but I needed to configure it with at+wiocfg=8,4,1,1 i think. I don’t understand this, maybe the at configuration overrides DTS config at boot or something?
The gpio numberings are the qualcomm pin numbers which don’t corresponds to wp7607 pin numbers. found it in this forum post GPIO Interrupts on WP7702 Module
This should at least be documented somewhere more clearly.
the device tree incompatibility you mentioned does not seem to matter.
You’re right, the documentation for Linux customization (especially MDM kernel/BSP details) is quite poor.
For GPIO numbers matching (Sierra WP7xxx versus Qualcomm MDM9xxx), you can extract the structure from source code by using this command line at the root of your “yocto” folder:
As encx24j600 driver is not provided with kernel 3.18 then you need first to backport it from a newer kernel version (e.g. 4.14 or newer).
Regarding platform settings in device tree, it should be very similar to what has been done here for ENC28J60.
Just replace the word “enc28j60” by “encx24j600”.
Example: compatible = "microchip,encx24j600";
Hi Jay ,
We have built the driver and flashed to WP 7702. Now we are able to see eth0 under when ifconfig issued, but it is always down.
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.290863] encx24j600 spi1.0 (unnamed net_device) (uninitialized): link down
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.309781] encx24j600: Hw is initialized
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.309956] encx24j600 ECON1: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.310719] encx24j600 ECON2: CB00
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.310736] encx24j600 ERXFCON: 0049
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.310908] encx24j600 ESTAT: 5A00
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311075] encx24j600 EIR: 0700
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311086] encx24j600 EIDLED: CB21
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311096] encx24j600 MACON1: 0009
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311105] encx24j600 MACON2: 40B2
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311114] encx24j600 MAIPG: 0C12
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311375] encx24j600 MACLCON: 370F
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311540] encx24j600 MABBIPG: 0012
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.311552] encx24j600 PHCON1: 1200
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.314624] encx24j600 PHCON2: 0002
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.314637] encx24j600 PHANA: 05E1
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.315964] encx24j600 PHANLPA: 0001
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.317277] encx24j600 PHANE: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.318588] encx24j600 PHSTAT1: 7809
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.319902] encx24j600 PHSTAT2: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.322651] encx24j600 PHSTAT3: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.324594] encx24j600 spi1.0 eth0: Silicon rev ID: 0x01
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.324612] encx24j600 spi1.0 eth0: MAC address 00:00:ec:c7:aa:a2
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.427889] encx24j600 spi1.0 eth0: link down
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.433488] encx24j600: Hw is initialized
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.433671] encx24j600 ECON1: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.433931] encx24j600 ECON2: CB00
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.433942] encx24j600 ERXFCON: 0049
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434106] encx24j600 ESTAT: 5A00
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434270] encx24j600 EIR: 0700
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434281] encx24j600 EIDLED: CB21
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434291] encx24j600 MACON1: 0009
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434300] encx24j600 MACON2: 40B2
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434308] encx24j600 MAIPG: 0C12
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434317] encx24j600 MACLCON: 370F
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434326] encx24j600 MABBIPG: 0012
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.434337] encx24j600 PHCON1: 1200
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.441426] encx24j600 PHCON2: 0002
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.441446] encx24j600 PHANA: 05E1
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.442879] encx24j600 PHANLPA: 0001
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.444271] encx24j600 PHANE: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.445600] encx24j600 PHSTAT1: 7809
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.451750] encx24j600 PHSTAT2: 0000
Jan 6 06:42:13 swi-mdm9x28-wp user.info kernel: [ 52.453159] encx24j600 PHSTAT3: 0040
What has to be done next to make it alive and start the communication?
root@swi-mdm9x28-wp:~# /sbin/udhcpc -R -b -i eth0
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, forking to background
Which GPIO pin on WP7702 module is connected to the interrupt pin of encx24j600 chip? How the reset pin of encx24j600 chip is controlled? (update: there is no reset pin on encx24j600 )
Also, could you show us your devicetree node for encx24j600?