_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://freenode.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
rozpruwacz has quit [Quit: Leaving.]
really2 has joined #litex
really2 has quit [Remote host closed the connection]
lf_ has quit [Ping timeout: 260 seconds]
lf has joined #litex
really21 has joined #litex
Bertl is now known as Bertl_zZ
Degi_ has joined #litex
Degi has quit [Ping timeout: 245 seconds]
Degi_ is now known as Degi
peeps[zen] has joined #litex
captain_morgan0 has joined #litex
flammit_ has joined #litex
rektide_ has joined #litex
keesj_ has joined #litex
vup2 has joined #litex
acathlaway has joined #litex
rektide has quit [*.net *.split]
really21 has quit [*.net *.split]
peepsalot has quit [*.net *.split]
acathla has quit [*.net *.split]
keesj has quit [*.net *.split]
geertu has quit [*.net *.split]
vup has quit [*.net *.split]
flammit has quit [*.net *.split]
captain_morgan has quit [*.net *.split]
captain_morgan0 is now known as captain_morgan
flammit_ is now known as flammit
geertu has joined #litex
really2 has joined #litex
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #litex
<st-gourichon-fid> _florent_, thank you for your answer.
rozpruwacz has joined #litex
lkcl_ has quit [Ping timeout: 260 seconds]
rozpruwacz has quit [Ping timeout: 264 seconds]
rozpruwacz has joined #litex
lkcl_ has joined #litex
really2 has quit [Ping timeout: 260 seconds]
proteusguy has quit [Ping timeout: 272 seconds]
proteusguy has joined #litex
<_florent_> st-gourichon-fid: This should fix your issue: https://github.com/enjoy-digital/litex/commit/ece90059493f820b0a3a6693d1df9e7b869f4a8d
<_florent_> st-gourichon-fid: Also with FPGA designs, it's generally better to keep a bit of margin on resources to avoid too much troubles while maintaining a project and allow adding features (even small ones) or integrating bug fixes (that can sometimes use resources)
<_florent_> st-gourichon-fid: This is also useful to be able to integrate some debug probes.
<_florent_> st-gourichon-fid: I would not recommend using more than 75% on a project that will continue to evolve
<_florent_> st-gourichon-fid: Also saying that since it relaxes things for open source project maintainers: We generally try to do the best, but sometimes there can be variations dues to bug fixes, portability, etc... and having some margin is always nice :)
<geertu> rozpruwacz: 8d885998822bb625aa854b52e6627ab42f03bfb9 looks good to me
<rozpruwacz> geertu: thanks, and what about https://github.com/mczerski/litex (commit c234d1b54ce73950614e270b26e29b5e84f4c7cf) ? changes in kernel driver depend on it.
<geertu> rozpruwacz: For 444d3dae2e78f8e89ed9c1788f30d2cf574aebe3, do you need litex_irq_domain_translate() and the chained_irq_*() stuff?
<geertu> (I'm comparing with drivers/gpio/gpio-rcar.c as a reference)
<geertu> rozpruwacz: Sorry, I have to defer to the experts for the litex change
<rozpruwacz> my opinion. If GPIOIn would allow to controll the IRQ_TYPE then litex_irq_domain_translate would be not needed
<rozpruwacz> geertu: I think that litex_irq_domain_translate is required because if it is not supplied then it defaults to litex_irq_domain_tranirq_domain_translate_twocellslate which in turn call irq_domain_translate_twocell which requires two cells in device tree part that describes gpio interrupt pin (pin number and IRQ_TYPE). In litex-gpio the IRQ_TYPE is fixed by the gpio controller (GPIOIn) so allowing to specify IRQ_TYPE would be misleading in
<rozpruwacz> typo: litex_irq_domain_tranirq_domain_translate_twocellslate -> irq_domain_translate_twocellslate
<rozpruwacz> ehh, litex_irq_domain_tranirq_domain_translate_twocellslate -> gpiochip_hierarchy_irq_domain_translate
<rozpruwacz> and I based my implementation on gpio/gpio-tegra186.c
<geertu> rozpruwacz: So you cannot specify the interrupt polarity when using the GPIOs as IRQs?
<rozpruwacz> Geertu: the polarity is defined at HDL level look at: litex/soc/cores/gpio.py. And I just remembered one other thing. The driver works only with falling edge, because rising edge causes the GPIOIn interrupt lines works as level trigger instead of edge trigger.
<rozpruwacz> So with rising edge trigger adter gpio goes high the interrupt is called over and over until gpio line goes low.
rozpruwacz has left #litex [#litex]
rozpruwacz has joined #litex
<rozpruwacz> geertu: and regarding the chained_irq_enter/chained_irq_exit. As mentioned, I based my changes on gpio/gpio-tegra186.c, and to my understanding litex_gpio_irq is attached as chained interrupt in gpio/gpiolib.c using irq_set_chained_handler_and_data call. So to my understanding if it is chained interrupt it mus use chained_irq_* - but I'm not an expert in linux drivers :) I wrote only few in my life.
<geertu> rozpruwacz: OK, let's see what the other reviewers will say when you submit it or upstream inclusion
<rozpruwacz> geertu: is https://github.com/litex-hub/linux the correct place to do pull request ?
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #litex
<st-gourichon-fid> _florent_, oh yes I fully agree with you. We often include only part of the design, to have a quick and easy build cycle. Sometimes, we have to test the whole design, though. We also strive to help reduce unnecessary weight (I've heard there's some room for improvement in the UART implementation in LiteX, we used to have 6 of them and they appear to consume much more resources than expected.)
<_florent_> rozpruwacz: We should fix the rising edge IRQ generation, I could look at that
<geertu> rozpruwacz: rozpruwacz: I think the correct process is documented in Documentation/process/submitting-patches.rst
<geertu> unless litex-hub wants to accept PRs? But who'll be in charge to get them upstream?
<geertu> _florent_: ^
<_florent_> rozpruwacz: We could also make the polarity configurable by a register, but in this case we should probably remove the polarity parameter at the SoC level
<_florent_> rozpruwacz: And maybe just have a with_irq parameter to GPIOIn that would add IRQ capability to all the Input pins of this GPIO + a register to configure the level
<geertu> _florent_: That sounds like the better option. You don't always know what will be the use case for the GPIO.
<_florent_> geertu: Indeed, I just merged rozpruwacz's initial IRQ support, but this is indeed maybe not generic enough
<geertu> In particular, I'm thinking about adding support for plugging in random FeatherWings on the OrangeCrab.
<_florent_> And this would in fact simplify the code in the SoC
<geertu> (which is what I'm working on)
<rozpruwacz> _florent_: Agree to all. I did not wanted to change the HDL behaviour so I match the driver to suite the HDL. But I think that Your suggestions for HDL changes are perfectly reasonable.
<_florent_> rozpruwacz: Good, I was going to ask you if it was OK that I do the changes to go in this direction
<geertu> Adafruit 0.54" Quad Alphanumeric FeatherWing Display (https://www.adafruit.com/product/3130) is working fine, scrolling messages. need to clean up the rather large code changes before submitting them upstream.
<tpb> Title: Adafruit 0.54 Quad Alphanumeric FeatherWing Display - Red ID: 3130 - $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits (at www.adafruit.com)
<_florent_> Otherwise for the Linux drivers, this can probably be discussed here, somlo is maintaining a branch in https://github.com/litex-hub/linux (litex-rebase) with all the recent work
<geertu> tpb: yep, that one ;-)
<_florent_> This allow us to test the drivers with the different Linux projects (VexRiscv, Rocket, Mor1kx mostly)
<geertu> For Adafruit FeatherWing OLED - 128x32 OLED (https://www.adafruit.com/product/2900), the display works, but I'll have to look into GPIOs for the buttons.
<tpb> Title: Adafruit FeatherWing OLED - 128x32 OLED Add-on For Feather ID: 2900 - $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits (at www.adafruit.com)
<_florent_> And when the drivers are validated, Antmicro/shorne/shenki try to push the drivers upstream through the mor1kx port
<_florent_> geertu, rozpruwacz: https://github.com/enjoy-digital/litex/issues/842, I'll try to look at this today
<geertu> _florent_: thx
<_florent_> geertu: For you case where various featherwing are plugged, this indeed makes sense to be able to configure interrupt polarity dynamically
<_florent_> geertu: this would also make sense to add it to GPIOTristate, this way you could just create a GPIOTristate on all featherwing IO and dynamically reconfigure them as Input/Output and use IRQs on Inputs
<geertu> _florent_: And the next step will be adding pinmuxing, as some wings may want to use e.g. the RX/TX pins as GPIOs ;-)
Bertl_zZ is now known as Bertl
Bertl is now known as Bertl_oO
keesj_ has quit [Quit: leaving]
keesj has joined #litex
<rozpruwacz> _florent_: ok, I test it when I have time (not so much lately ... :()
<geertu> _franck_: thx, that was quick
vup2 is now known as vup
<_florent_> rozpruwacz: ok no problem, just took the time to did it while waiting for a design to compile :) (I think it should be ok, but I only verified the compilation and produced .h/.v, haven't tested it on sim or hardware)
<somlo> _florent_, rozpruwacz: let me know when the dust settles on the gpio irq linux driver updates, and we can certainly add a few extra patches to the litex-rebase branch for testing. (I haven't had a chance yet to come up to speed on Linux IRQ handling in general, although I'll probably have to do that once we figure out the current litesdcard bug -- I think adding IRQ support *there* could be one way to make it faster)
rj has joined #litex
lkcl_ has quit [Ping timeout: 264 seconds]
rj has quit [Ping timeout: 268 seconds]
lkcl_ has joined #litex
rj has joined #litex
lkcl_ has quit [Ping timeout: 264 seconds]
rozpruwacz has quit [Ping timeout: 264 seconds]
lkcl_ has joined #litex
rozpruwacz has joined #litex
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
rj has quit [Ping timeout: 268 seconds]
rozpruwacz has quit [Quit: Leaving.]
rj has joined #litex
rozpruwacz has joined #litex
rj has quit [Remote host closed the connection]
rj has joined #litex
rj has quit [Ping timeout: 268 seconds]
rozpruwacz has quit [Quit: Leaving.]
rj has joined #litex
rj has quit [Ping timeout: 268 seconds]
rozpruwacz has joined #litex
rj has joined #litex
<nats`> Finally I have time to send the code that doesn't generate clock constraint in UCF, Spoiler Alert: I certainly do something stupid
<tpb> Title: LiteX no clock constraint - Pastebin.com (at pastebin.com)
<nats`> And second link is the resulting UCF
<tpb> Title: LiteX generated constraint - Pastebin.com (at pastebin.com)
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
Stary is now known as stary-but-differ
stary-but-differ is now known as Stary
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #litex
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
rozpruwacz has quit [Quit: Leaving.]
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
rozpruwacz has joined #litex
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
rj has quit [Ping timeout: 268 seconds]
pftbest has quit [Remote host closed the connection]
rj has joined #litex
pftbest has joined #litex
pftbest has quit [Remote host closed the connection]
pftbest has joined #litex
rj has quit [Ping timeout: 268 seconds]
rj has joined #litex
pftbest has quit [Ping timeout: 264 seconds]
rozpruwacz has quit [Quit: Leaving.]