Friday, 2022-11-18

*** tpb <[email protected]> has joined #litex00:00
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)02:30
*** TMM_ <[email protected]> has joined #litex02:30
*** Degi_ <[email protected]> has joined #litex03:33
*** Degi <[email protected]> has quit IRC (Ping timeout: 268 seconds)03:34
*** Degi_ is now known as Degi03:34
*** lambda <[email protected]> has quit IRC (Ping timeout: 260 seconds)05:51
*** lambda <[email protected]> has joined #litex06:10
*** lexano <[email protected]> has quit IRC (Ping timeout: 248 seconds)07:26
*** lexano <[email protected]> has joined #litex07:39
_florent_I just update the Discord invitation link to make it permanent: https://discord.gg/PkJwjDbxeG (but I don't think the previous one was expired)08:03
tpbTitle: LiteX (at discord.gg)08:03
cr1901Will there be a bridge to IRC?08:10
cr1901The discord-irc node package works fine IME, but I don't have a server to put it on08:10
_florent_cr1901: I need to setup a server yes, probably on a Rapsberry Pi first, it would be fun to try to run it on Linux-on-LiteX-VexRiscv after :)08:20
*** Brinx <[email protected]> has quit IRC (Remote host closed the connection)08:36
*** Brinx <[email protected]> has joined #litex09:39
*** Brinx <[email protected]> has quit IRC (Ping timeout: 260 seconds)09:43
MoeIcenowysomlo: okay I switched back to STLV7325 and SDCard with Rocket seems to work09:45
*** nelgau_ <[email protected]> has joined #litex10:47
*** nelgau <[email protected]> has quit IRC (Ping timeout: 256 seconds)10:47
somlo_florent_: you could always run it on Fedora ;)11:45
*** Brinx <[email protected]> has joined #litex13:16
*** Brinx <[email protected]> has quit IRC (Remote host closed the connection)13:16
*** Brinx <[email protected]> has joined #litex13:16
*** FabM <FabM!~FabM@2a03:d604:103:600:2e60:8c7c:e8fb:7990> has joined #litex14:03
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:6591:5274:e33a:a94> has quit IRC (Remote host closed the connection)14:55
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:5d94:7816:e1ff:91b9> has joined #litex14:56
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:5d94:7816:e1ff:91b9> has quit IRC (Remote host closed the connection)14:58
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:5d94:7816:e1ff:91b9> has joined #litex14:58
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:5d94:7816:e1ff:91b9> has quit IRC (Remote host closed the connection)15:01
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:5d94:7816:e1ff:91b9> has joined #litex15:01
*** Brinx <[email protected]> has quit IRC (Remote host closed the connection)16:44
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 256 seconds)17:06
geertusomlo: Current litex-rebase hangs when starting userspace on my OrangeCrab, litex-rebase^ boots into userspace18:24
geertusomlo: overriding the return value of platform_get_irq_optional() to zero to force polling makes it work again18:42
geertusomlo: Always doing the timer setup in liteuart_startup() also makes it work18:55
geertuLooks like the liteuart interrupt never fires:18:56
geertu# cat /proc/interrupts 18:56
geertu           CPU0       18:56
geertu  2:          0  SiFive PLIC   0 Edge      liteuart18:56
geertu  3:          0  litex-gpio   2 Edge      C18:56
geertu  4:          0  litex-gpio   1 Edge      B18:56
geertu  5:      42670  RISC-V INTC   5 Edge      riscv-timer18:56
geertu  6:          0  litex-gpio   0 Edge      A18:56
geertuA, B, and C are the GPIO switches on the Adafruit OLED Featherwing (https://www.adafruit.com/product/3045), which I also never got to work.18:57
somlogeertu: so maybe the way the liteuart irq line is wired into the rest of the SoC is buggy in some way ?18:57
geertuPerhaps there's an interrupt routing problem on OrangeCrab?18:57
somloyeah... so if you omit the liteuart irq from DT it should default to polling -- as a first-pass band aid18:58
somlohaving an irq number in DT wasn't doing anything before, anyway :)18:58
somlobut LMK if you end up thinking it's a regression in the linux driver updates I'm working on...18:59
somloalso (low likelihood, but since we're brainstorming) -- on Rocket I have to add 1 to each irq number generated by litex_json2dts_linux.py19:01
somloso maybe the actual irq number you have is off-by-one?19:02
somlolike I said, grasping at straws, but might be worth ruling out :)19:02
geertusomlo: You mean the interrupts to the PLIC?19:06
geertu(thinking about adding the 1 inside Linux instead of flashing a new dtb)19:06
geertusomlo: Do you know why Rocket has that issue? And why it wasn't fixed properly?19:08
somloso the "raw" litex IRQs are what they are, but I think inside the Rocket "box" (it also calls itself SoC :) there's a PLIC, and it reserves zero for itself or something (I am fuzzy on the actual details)19:11
somloand e.g. vexriscv takes raw litex interrupts, so for that the json2dts script is correct19:11
somloon rocket, due to the PLIC, the numbers have to be incremented by 1 -- and that's something I'll have to figure out once I add Rocket support to json2dts (which is vaguely on my to-do list, but is definitely not something that's supported ATM)19:12
somloso what Linux sees when running on rocket aren't the raw LiteX IRQ numbers19:13
somloLiteX assigns (on the boards I've been using) IRQ 0 to the uart19:14
somlobut when building  LiteX with Rocket, and loading linux, in my DTS I have19:15
somloliteuart0: serial@12009000 {19:15
somlocompatible = "litex,liteuart";19:15
somloreg = <0x12009000 0x100>;19:15
somlointerrupt-parent = <&L1>;19:15
somlointerrupts = <1>;19:15
somlo};19:15
somloand I *think* that's because there's also:19:16
somloL1: interrupt-controller@c000000 {19:16
somlo#interrupt-cells = <1>;19:16
somlocompatible = "riscv,plic0";19:16
somlointerrupt-controller;19:16
somlointerrupts-extended = <&L4 11 &L4 9 &L14 11 &L14 9 &L24 11 &L24 9 &L34 11 &L34 9>;19:16
somloreg = <0xc000000 0x4000000>;19:16
somloreg-names = "control";19:16
somloriscv,max-priority = <7>;19:16
somloriscv,ndev = <8>;19:16
somlo};19:16
somlo(which comes from rocket's chisel-elaborated dts, generated alongside the verilog code)19:17
somloand which I've got to somehow cut'n'paste from when adding json2dts support to litex :)19:18
geertusomlo: Tried oirq.args[0]++ in of_irq_get(), but it doesn't help19:30
*** mewt <[email protected]> has quit IRC (Read error: Connection reset by peer)19:40
*** jevinskie[m] <jevinskie[m]!~jevinskie@2001:470:69fc:105::bb3> has joined #litex19:41
somlogeertu: then it's probably in the gateware, somewhere...20:17
jersey99_florent_ .. this is the example I am talking about FYI. https://pastebin.com/SrSPeibF20:39
tpbTitle: test sim litex - Pastebin.com (at pastebin.com)20:39
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)21:23
*** TMM_ <[email protected]> has joined #litex21:23
*** nelgau_ <[email protected]> has quit IRC ()21:33
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:5d94:7816:e1ff:91b9> has quit IRC (Read error: Connection reset by peer)23:30
*** cr1901 <cr1901!~cr1901@2601:8d:8600:911:8183:a9ad:d34c:4a36> has joined #litex23:30

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!