*** tpb has joined #litex | 00:00 | |
*** lf has quit IRC | 00:26 | |
*** lf has joined #litex | 00:26 | |
*** Dolu has quit IRC | 01:05 | |
*** Degi_ has joined #litex | 04:46 | |
*** Degi has quit IRC | 04:46 | |
*** Degi_ is now known as Degi | 04:46 | |
*** Bertl_oO is now known as Bertl_zZ | 06:52 | |
*** esden has quit IRC | 07:45 | |
*** tannewt has quit IRC | 07:45 | |
*** tannewt has joined #litex | 07:47 | |
*** esden has joined #litex | 07:48 | |
*** martinraison has joined #litex | 08:32 | |
*** martinraison has quit IRC | 08:59 | |
*** _franck_6 has joined #litex | 08:59 | |
*** _franck_ has quit IRC | 09:00 | |
*** _franck_6 is now known as _franck_ | 09:00 | |
*** martinraison has joined #litex | 09:00 | |
*** martinraison has joined #litex | 09:01 | |
*** shenki has quit IRC | 09:13 | |
*** shenki has joined #litex | 09:24 | |
*** martinraison has quit IRC | 09:49 | |
*** martinraison has joined #litex | 09:58 | |
*** martinraison has quit IRC | 10:53 | |
*** martinraison has joined #litex | 11:14 | |
*** Dolu has joined #litex | 11:40 | |
*** martinraison has quit IRC | 11:49 | |
*** martinraison has joined #litex | 11:50 | |
*** martinraison has quit IRC | 11:55 | |
*** martinraison has joined #litex | 11:57 | |
shorne | somlo: fixing up the drivers should not be too hard | 13:14 |
---|---|---|
*** feldim2425_ has joined #litex | 13:19 | |
*** feldim2425 has quit IRC | 13:19 | |
*** feldim2425_ is now known as feldim2425 | 13:19 | |
somlo | shorne: I took a first pass at doing that in litex-hub/linux (litex-rebase branch); for now they SHOULD compile on 8-bit CSR and 32-bit CPU (as that's the target they were written for originally); | 13:37 |
somlo | I have (some hacked version of) shenki's liteETH driver and (spi-)sdcard drivers tested on my setup (64-bit rocket, 32-bit csr data width) | 13:39 |
*** Bertl_zZ is now known as Bertl | 14:49 | |
*** feldim2425 has quit IRC | 15:42 | |
*** feldim2425 has joined #litex | 15:50 | |
*** andrewb1999 has joined #litex | 15:50 | |
_florent_ | Hi somlo, I just did some tests with Linux-on-LiteX-VexRiscv and the https://github.com/litex-hub/linux/tree/litex-rebase branch | 15:58 |
_florent_ | unfortunately it's stalling during the boot: https://github.com/litex-hub/linux-on-litex-vexriscv/commit/78cc2fc25fa086c7d7c276edc849410ef09ed693 | 16:00 |
_florent_ | the behavior is similar with 32-bit CSRs | 16:01 |
_florent_ | with just the serial enable in the .dts it's also similar. I'll try to have a closer look later | 16:07 |
_florent_ | just for info, with your previous litex-rocket-rebase things are working correctly | 16:08 |
_florent_ | litex-rocket-rebase/litex-rocket-rebase branch | 16:08 |
*** martinraison has quit IRC | 16:10 | |
*** martinraison has joined #litex | 16:20 | |
*** FFY00 has quit IRC | 17:09 | |
*** FFY00 has joined #litex | 17:09 | |
*** martinraison has quit IRC | 17:09 | |
*** martinraison has joined #litex | 17:10 | |
*** FFY00 has quit IRC | 17:13 | |
*** FFY00 has joined #litex | 17:14 | |
*** FFY00 has quit IRC | 17:16 | |
*** FFY00 has joined #litex | 17:16 | |
*** martinraison has quit IRC | 17:19 | |
*** feldim2425 has quit IRC | 17:23 | |
*** feldim2425 has joined #litex | 17:23 | |
*** FFY00 has quit IRC | 17:28 | |
*** FFY00 has joined #litex | 17:28 | |
somlo | _florent_: do you have (nexys4ddr) bitstream and a kernel (def)config file you could send me to debug this? | 17:31 |
somlo | must be some really stupid and small/subtle change in the include/linux/litex.h accessors | 17:32 |
somlo | one thing I could do is try 8-bit csr data width with rocket (I know how to build the bitstream for that :) | 17:35 |
somlo | I'll try that and see what happens, BRB | 17:35 |
somlo | the other thing is that I dropped the liteUART version I had in litex-rocket-rebase in favor of the one that went upstream | 17:41 |
somlo | not sure that has anything to do with it, but it's the only other change I can think of that might be related | 17:42 |
_florent_ | somlo: yes I can test and prepare things on the nexys4ddr to help working together on this | 17:42 |
_florent_ | somlo: I did a test with only the UART in the .dts and the issue was also there, that's indeed possible it's related to it | 17:44 |
*** _franck_ has quit IRC | 17:44 | |
somlo | _florent_: so, can you copy the drivers/tty/serial/liteuart.c from litex-rocket-rebase over the one upstream (in litex-rebase) and see if that works? | 17:44 |
*** _franck_ has joined #litex | 17:44 | |
somlo | If yes, we can diff them and see what broke | 17:44 |
somlo | hopefully the Kconfig options are the same... | 17:45 |
somlo | *option names, I mean | 17:45 |
somlo | so if the litex.h accessors work for 8-bit csr-data-width on rocket, I'd presume they're fine on vexriscv as well, which would leave the liteUART driver. I'm waiting for both the bitstream and kernel for 8-bit CSR rocket to build, will report back once I know if it works | 17:47 |
somlo | (might have to take a 40-minute car trip that overlaps with it all, so it might be an hour before I get back with any results) | 17:48 |
*** martinraison has joined #litex | 17:48 | |
*** martinraison has quit IRC | 17:48 | |
*** FFY00 has quit IRC | 17:48 | |
*** martinraison has joined #litex | 17:48 | |
*** FFY00 has joined #litex | 17:48 | |
somlo | _florent_: also, ignoring the 'rocket-rebase' branch, proper-upstream should have 8-bit CSR support and liteUART | 17:49 |
somlo | so I wonder if *that* works (before any of my changes are applied at all) | 17:50 |
_florent_ | somlo: ok thanks. I try to the test with upstream and also liteuart before leaving the office | 17:51 |
somlo | it'd have to be a simplified design with no ethernet/sdcard/etc | 17:51 |
somlo | _florent_: oh yeah, sorry, forgot it's much later where you are ;) | 17:51 |
_florent_ | the features can be present in the bitstream, just that it will not be used by Linux | 17:52 |
somlo | oh, that's good then | 17:52 |
somlo | _florent_: I don't use liteUART directly from linux -- I use sbi, which traps into machine-mode and causes bbl to handle console i/o | 18:00 |
somlo | that said, with 8-bit CSRs linux boots, but ethernet doesn't work | 18:01 |
somlo | so I might have screwed up the accessors. I'll do some debugging and post a v6 of the patch to lkml later today (hopefully) after I figure it out | 18:01 |
somlo | assume it's the accessors and that i messed it up, until further notice :) | 18:01 |
*** FFY00 has quit IRC | 18:03 | |
somlo | and, btw, thanks for catching that! | 18:04 |
*** FFY00 has joined #litex | 18:04 | |
*** Bertl is now known as Bertl_oO | 18:11 | |
*** FFY00 has quit IRC | 18:11 | |
*** FFY00 has joined #litex | 18:11 | |
*** FFY00 has quit IRC | 18:13 | |
*** FFY00 has joined #litex | 18:13 | |
*** martinraison has quit IRC | 18:24 | |
_florent_ | somlo: in fact the behavior is similar with upstream Linux 5.11-rc1, I'll try to understand tomorrow | 18:43 |
*** FFY00 has quit IRC | 18:45 | |
*** FFY00 has joined #litex | 18:45 | |
*** lkcl has quit IRC | 19:21 | |
*** lkcl has joined #litex | 19:34 | |
somlo | _florent_: then we have *two* problems ;) I broke 8-bit CSR accessors between litex-rocket-rebase -> litex-rebase, AND upstream LiteUART is being weird... | 19:52 |
somlo | _florent_: so, it turns out I did *not* break accessors for 8-bit CSRs. In my previous test, I accidentally kept using the 32-bit-CSR kernel on my 8-bit-CSR bitstream :D | 20:05 |
somlo | with the actual 8-bit-CSR kernel on the 8-bit-CSR bitstream (nexys4ddr, rocket+litex) I can get LiteETH working fine in linux (which means the accessors are OK) | 20:05 |
_florent_ | somlo: ah ok, good | 20:06 |
somlo | I'm getting cmd-51 dma timeouts, cmd-1 command timeouts, and subsequent cmd-51 data xfer timeouts with liteSDCard, but I don't think that's specifically related to CSRs | 20:07 |
_florent_ | somlo: for now I kept 8-bit CSR to only change one thing at a time, but I'll probably switch Linux-on-LiteX-Vexriscv to 32-bit once the other issues are solved | 20:08 |
somlo | so liteSDCard (the linux driver) works on 32-bit CSRs, and not so well on 8-bit (bios is fine on either) | 20:09 |
_florent_ | somlo: interesting, I think that's the issue I had | 20:09 |
somlo | hmmm, need to troubleshoot the linux driver on the 8-bit CSR setup, see if I can find the problem | 20:09 |
somlo | but the good news is that the for-upstream CSR patches are OK; we need to find why the LiteSDCard driver hates us on 8-bit subregisters, and why upstream liteUART hates us on vexriscv | 20:11 |
somlo | I think per shorne it seems OK on mor1k | 20:11 |
_florent_ | somlo: exactly, not sure it's worth spending too much time on the 8-bit CSR support for LiteSDCard | 20:16 |
_florent_ | I'll investigate on upstream linux/Vexriscv | 20:16 |
_florent_ | regarding LiteEth, are you using the polling or IRQ mode? | 20:18 |
somlo | _florent_: IRQ mode | 21:24 |
somlo | looking at the liteuart driver in upstream vs. litex-rocket-rebase, the .c file has quite a few changes. From the outside (Kconfig), it's only that LITEUART_NR_PORTS was renamed to LITEUART_MAX_PORTS | 21:39 |
somlo | and `port->type` is hardcoded to '1' rather than adding a special PORT_LITEUART value to serial_core.h | 21:41 |
somlo | but I'm not set up to test it on this end (litex+rocket doesn't use it) | 21:41 |
somlo | the litex-rocket-rebase version has its own accessors defined internally (using iowrite32/ioread32) | 21:44 |
somlo | and since each CSR is 8 bit, and alignment is 4 bytes regardless of subregister size, the register offsets don't change across the 8-vs-32-bit csr data width | 21:45 |
somlo | so this one should work the same on both 8- and 32-bit CSRs | 21:45 |
somlo | I don't think the breakage is in the CSR accessors, rather something else in the changes since the old version we still have in litex-rocket-rebase | 21:50 |
*** SpaceCoaster has quit IRC | 23:09 | |
*** SpaceCoaster has joined #litex | 23:10 | |
*** martinraison has joined #litex | 23:30 | |
*** martinraison has quit IRC | 23:35 | |
somlo | _florent_: final conclusion for today: on nexys4ddr / litex+rocket, both litex-rocket-rebase ("old" kernel) and litex-rebase ("new" kernel) behave the same: working liteeth, litesdcard works on 32-bit CSR width, breaks on 8-bit CSR width | 23:42 |
somlo | liteUART driver accessors appear to have the same behavior in both kernels (I'm not set up to test easily) -- so the breakage must be elswhere in the diff between the litex-rocket and current upstream | 23:43 |
somlo | more digging into litesdcard tomorrow :) | 23:44 |
somlo | I *am* getting data xfer timeouts even on 32-bit CSRs, but it generally works and high-level data integrity is preserved after xfers are retried | 23:45 |
somlo | hoping to find an actual bug by troubleshooting on 8-bit CSRs, one that would help fix behavior on 32-bit CSRs as well (one can dream, right?) :) | 23:45 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!