dgilmore changed the topic of #fedora-riscv to: Fedora on RISC-V https://fedoraproject.org/wiki/Architectures/RISC-V || Logs: https://libera.irclog.whitequark.org/fedora-riscv || Alt Arch discussions are welcome in #fedora-alt-arches
somlo has quit [Ping timeout: 252 seconds]
somlo has joined #fedora-riscv
<davidlt[m]> aurel32: at some point it should land, it's already in U-boot.
<davidlt[m]> there are a bunch of other stuff that should probably go upstream.
<davidlt[m]> I have a branch somewhere with a stuff that should go to upstream.
<pierce> meanwhile i'm just day dreaming about the imaginary 0005-riscv-sifive-unmatched-add-gpio-reboot-node.patch
<davidlt[m]> pierce: There is a patchset under review (well more RFC) which kinda provides that.
<pierce> oh, i thought it was constrained by hardware limitations? (no gpio access to reboot)
<davidlt[m]> The thing is that the sequence doesn't provide true reset, but from users point of view it is.
<pierce> ah right, yep
<davidlt[m]> Not exactly as you can talk to PMIC via I2C, but you cannot assert RESET, just doesn't work.
<davidlt[m]> The way to deal with it is to use RTC tick wake up signal, but IIRC it could cause problems as discussed in the review of that patchset.
<davidlt[m]> You kinda could "miss it" if the system is rebooting at the same time as tick is happening.
<davidlt[m]> Also there are other problems too mentioned in the review.
<davidlt[m]> Like users might want to use this RTC tick wake up signal for other setups.
<davidlt[m]> Also doing this within OpenSBI is also complicated as some clearing of events needs to happen after the reboot on the Linux side IIRC.
<davidlt[m]> Thus I am not sure if you could contain as-is a proper thing within OpenSBI.
<davidlt[m]> OpenBSD went with tick wake up implementation for Unmatched.
<davidlt[m]> Basically it's a hardware quirk for Unmatched.
<davidlt[m]> There is no AUTOBOOT set in the OTP in DA chip and that's what Linux drivers expect by default.
<pierce> DA chip?
<davidlt[m]> DA9063 PMIC is what we use for Unmatched.
<pierce> ah right, yep
<davidlt[m]> The SoC itself isn't going via DA9063, there is a separate chip for SoC power IIRC.
<davidlt[m]> But IO, MEM, etc. all go via DA9063.
<davidlt[m]> You can buy a dongle with RTC for 20 USD or cheaper and use that to power down and powerup :)
<davidlt[m]> Or go with PiKVM (I want one!)
<pierce> i honestly haven't touched my unmatched for a little while now (work and things) but i'm hopeful the rough edges do get smoothed out
<davidlt[m]> or use the existing patchset that's available on the mailing list.
<pierce> davidlt[m]: oh really?! do you have a link?
<pierce> davidlt[m]: yeah, i did see this, it wasn't available to purchase last time i checked, still crowd funding
<davidlt[m]> It has watchdog, but it allows to control reset/shutdown buttons via a bash script (untested by me, but I really like this product after reading docs and exchanging some emails with them).
<davidlt[m]> You basically just echo <command> > /dev/ttyBLAHBLAH
<davidlt[m]> ~Mx Commands for controlling remote devices: 1 - Reset, 2 - Power.
<davidlt[m]> ~M1 -- trigger reset button, ~M2 -- trigger power button
<pierce> davidlt[m]: this one won't fix a likely data centre issue of when an unmatched board loses power, would it?
<davidlt[m]> IIUC
jcajka has joined #fedora-riscv
<davidlt[m]> It would
<davidlt[m]> The buttons are line on a normal PC, they are powered by ATX 5V always on line
<davidlt[m]> So if you track Unmatched (pings or something) you can now when to trigger the power button.
<pierce> davidlt[m]: of course!
<davidlt[m]> Like: If (unmatched_ping > 10 minutes) { press power_button }
<davidlt[m]> Just have a raspberry pi or something that always powers up on power.
<davidlt[m]> I have something like that for Koji farm for VMs.
<davidlt[m]> If machine is not responding for an hour it's destroyed and new one launches.
<davidlt[m]> Koji constantly records each builders last ping time.
<davidlt[m]> Sadly you cannot short power on button pins
<davidlt[m]> It has to be shorted and released to power on
<davidlt[m]> thus you need something "smart" to mimic actual button press
<pierce> yeah, it would need to be momentary
<davidlt[m]> These watchdog dongles are usually used for bitcoin miners to keep systems always online
<davidlt[m]> there are cheap ones <10 USD, but this one is so well documented, etc.
<davidlt[m]> But again, untested by me.
<davidlt[m]> I should get one to test.
<aurel32> something smart that to mimic actual button press can just be a capacitor with possibly a resistor in parallel. It usally works on PC, so it might just work on unmatched
<pierce> Would that be momentary though?
<aurel32> yes, when the board is powered, the capacitor is like a wire, than it charges and is like an open circuit
<aurel32> the resistor is for discharging it when the board is not powered anymore, otherwise it might takes dozen of seconds to discharge, so you need to wait long enough between a power-off and a power-on
<aurel32> usually 100µF / 10k works well, but I don't know if it works on the unmatched
<aurel32> and you can put that in parallel to the button, which continues to work
bkircher has quit [Quit: WeeChat 3.2]
bkircher has joined #fedora-riscv
djdelorie has quit [Ping timeout: 260 seconds]
<rwmjones> morning
<pierce> <aurel32> "yes, when the board is powered..." <- Goes to show how little I know about electronics! Very cool
jimwilson_ has quit [Ping timeout: 245 seconds]
jimwilson has joined #fedora-riscv
Esmil has quit [*.net *.split]
Esmil has joined #fedora-riscv
bkircher has quit [Quit: WeeChat 3.2]
bkircher has joined #fedora-riscv
bkircher has quit [Quit: Leaving]
bkircher has joined #fedora-riscv
somlo_ has joined #fedora-riscv
somlo has quit [*.net *.split]
zsun has joined #fedora-riscv
zsun has quit [Read error: Connection reset by peer]
zsun has joined #fedora-riscv
djdelorie has joined #fedora-riscv
zsun has quit [Remote host closed the connection]
jcajka has quit [Quit: Leaving]
bkircher has quit [Remote host closed the connection]
bkircher has joined #fedora-riscv