Is SPI Working?
#15
(07-17-2016, 10:28 AM)martinayotte Wrote: You don't need CONFIG_SPI_SUN4I/CONFIG_SPI_SUN6I, but you need CONFIG_SPI_SUNXI=y

EDIT : BTW, the CONFIG_SPI_SPIDEV can also be done as modules, ie. : CONFIG_SPI_SPIDEV=m





Quote:martinayotte
   Unfortunately, both SPI0 and SPI1 are currently disabled, see at line 1838 :
   https://github.com/longsleep/build-pine6....dts#L1838
   Few weeks ago, I've tried to enable them, but unfortunately, they have some thing wrong in their definitions, since as soon they are enabled, the kernel boots and their some crash in vfe and other stuff and end up with root login in serial debug and I could see that ethernet is not working, even doing "ifconfig" completely hangs.


(quoting myself Tongue )

Ok ! I've spent more time on the case, and I've finally figured out !!! Rolleyes

In the AllWinner specs, the EMAC is mapped at address 0x1c30000 and supposed to use 64K of memory, but in the DTS, the register mapping is mapping 256K, which overlap many other peripherals such as the GPU, the HighSpeed Timer, the DRAM Controller and the SPIs.
When I've enabled with "okay" the SPIs, they were grabbing their respective memory spaces, and then when Networking was turned on, I was getting this message in dmesg :

sunxi-gmac 1c30000.eth: can't request region for resource [mem 0x01c30000-0x01c6ffff]

This gave me the clue !!! why "eth" is trying to map such addresses so big where it is clearly overlaps the SPIs ?

Looking at DTS, and even in the AllWinner original one, we can see :

               eth@01c30000 {
                       compatible = "allwinner,sunxi-gmac";
                       reg = <0x0 0x1c30000 0x0 0x40000 0x0 0x1c00000 0x0 0x30>;

Changing that with the following solve the issue, I've now both networking and SPIs running :

               eth@01c30000 {
                       compatible = "allwinner,sunxi-gmac";
                       reg = <0x0 0x1c30000 0x0 0x10000 0x0 0x1c00000 0x0 0x30>;

Do you guys know if this will make it back into a kernel update, or do you have instructions on how to implement this? I need both Ethernet and SPI working for a project. Any help/advice would be greatly appreciated!

Eric
  Reply


Messages In This Thread
Is SPI Working? - by User 3332 - 06-08-2016, 09:54 AM
RE: Is SPI Working? - by longsleep - 06-08-2016, 01:49 PM
RE: Is SPI Working? - by User 3332 - 06-08-2016, 02:40 PM
RE: Is SPI Working? - by alevecchio - 07-16-2016, 03:01 PM
RE: Is SPI Working? - by martinayotte - 06-08-2016, 02:51 PM
RE: Is SPI Working? - by User 3332 - 06-09-2016, 07:21 AM
RE: Is SPI Working? - by alevecchio - 07-16-2016, 08:51 PM
RE: Is SPI Working? - by martinayotte - 07-17-2016, 07:38 AM
RE: Is SPI Working? - by alevecchio - 07-17-2016, 09:50 AM
RE: Is SPI Working? - by martinayotte - 07-17-2016, 10:28 AM
RE: Is SPI Working? - by User 3332 - 07-18-2016, 07:23 AM
RE: Is SPI Working? - by longsleep - 07-17-2016, 12:05 PM
RE: Is SPI Working? - by martinayotte - 07-17-2016, 02:34 PM
RE: Is SPI Working? - by martinayotte - 07-18-2016, 08:44 PM
RE: Is SPI Working? - by xalius - 07-17-2016, 12:30 PM
RE: Is SPI Working? - by longsleep - 07-17-2016, 01:04 PM
RE: Is SPI Working? - by martinayotte - 07-18-2016, 07:36 AM
RE: Is SPI Working? - by User 3332 - 07-18-2016, 07:54 AM
RE: Is SPI Working? - by alevecchio - 07-18-2016, 09:35 PM
RE: Is SPI Working? - by adamw - 07-19-2016, 06:37 AM
RE: Is SPI Working? - by martinayotte - 07-19-2016, 08:15 AM
RE: Is SPI Working? - by alevecchio - 07-19-2016, 09:55 AM
RE: Is SPI Working? - by martinayotte - 07-19-2016, 11:51 AM
RE: Is SPI Working? - by User 3332 - 07-19-2016, 01:15 PM
RE: Is SPI Working? - by martinayotte - 07-19-2016, 01:56 PM
RE: Is SPI Working? - by alevecchio - 07-19-2016, 06:42 PM
RE: Is SPI Working? - by martinayotte - 07-19-2016, 07:48 PM
RE: Is SPI Working? - by alevecchio - 07-20-2016, 07:13 PM
RE: Is SPI Working? - by martinayotte - 07-21-2016, 08:46 AM
RE: Is SPI Working? - by alevecchio - 07-21-2016, 11:59 AM
RE: Is SPI Working? - by martinayotte - 07-22-2016, 08:49 AM
RE: Is SPI Working? - by alevecchio - 07-30-2016, 08:04 PM
RE: Is SPI Working? - by alevecchio - 08-01-2016, 01:46 PM
RE: Is SPI Working? - by martinayotte - 08-01-2016, 03:26 PM
RE: Is SPI Working? - by alevecchio - 08-01-2016, 06:18 PM
RE: Is SPI Working? - by martinayotte - 08-02-2016, 10:11 AM
RE: Is SPI Working? - by longsleep - 08-02-2016, 12:13 PM
RE: Is SPI Working? - by MarkHaysHarris777 - 08-02-2016, 12:52 PM
RE: Is SPI Working? - by User 3332 - 10-19-2016, 01:18 PM
RE: Is SPI Working? - by milekium - 02-23-2017, 03:36 PM
RE: Is SPI Working? - by MarkHaysHarris777 - 02-23-2017, 04:08 PM
RE: Is SPI Working? - by milekium - 02-24-2017, 06:25 AM
RE: Is SPI Working? - by martinayotte - 02-24-2017, 09:08 AM
RE: Is SPI Working? - by milekium - 02-24-2017, 09:42 AM
RE: Is SPI Working? - by xalius - 02-24-2017, 10:19 AM
RE: Is SPI Working? - by x893 - 04-05-2017, 02:52 PM
RE: Is SPI Working? - by xalius - 04-05-2017, 03:13 PM
RE: Is SPI Working? - by x893 - 04-05-2017, 03:24 PM
RE: Is SPI Working? - by xalius - 04-05-2017, 04:37 PM
RE: Is SPI Working? - by x893 - 04-05-2017, 04:45 PM
RE: Is SPI Working? - by xalius - 04-05-2017, 04:51 PM
RE: Is SPI Working? - by x893 - 04-05-2017, 07:46 PM
RE: Is SPI Working? - by martinayotte - 04-06-2017, 08:04 AM
RE: Is SPI Working? - by x893 - 04-06-2017, 12:36 PM
RE: Is SPI Working? - by martinayotte - 04-06-2017, 03:46 PM
RE: Is SPI Working? - by x893 - 04-10-2017, 02:45 AM
RE: Is SPI Working? - by x893 - 04-10-2017, 02:23 PM
RE: Is SPI Working? - by martinayotte - 04-12-2017, 10:06 AM
RE: Is SPI Working? - by x893 - 04-14-2017, 03:03 PM
RE: Is SPI Working? - by louwie17 - 07-28-2017, 09:46 PM
RE: Is SPI Working? - by pfeerick - 07-29-2017, 08:39 PM
RE: Is SPI Working? - by louwie17 - 07-30-2017, 05:56 AM
RE: Is SPI Working? - by pfeerick - 07-30-2017, 06:26 PM
RE: Is SPI Working? - by louwie17 - 07-31-2017, 07:39 AM
RE: Is SPI Working? - by louwie17 - 08-12-2017, 03:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  touch screen not working mike280z 1 4,006 12-22-2016, 12:46 PM
Last Post: Bluphire
  RaZberry Module (z-wave) need support to get it working! Luxus 13 21,113 11-03-2016, 02:04 AM
Last Post: Luxus

Forum Jump:


Users browsing this thread: 1 Guest(s)