ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
<smaeul> apritzel: good question. it could be put in either the ccu driver directly, or in the rtc driver with of_clk_get_from_provider()
<smaeul> I'm not sure how we decide which parent to use for rtc-32k
<bauen1> jakllsch: it's a board from https://letstrust.de/
<smaeul> what is the problem you are seeing on H616? are there really no other osc32k consumers and iosc gets gated?
<bauen1> anarsoul: that's interesting, but i would have expected to at least be able to issue commands, however it seems that i can't even read the registers over SPI correctly, and i'm not even talking about requesting a locality
<anarsoul> yeah, maybe you fried it :)
<bauen1> anarsoul: now my breadboard setup with some jumpers probably isn't helping, but at this time i'm still suspecting a timing error in the spi, as the chip seems to respond with roughly the right structure, but is most times returning very wrong values (as in 0xff 0xff 0xff 0xff for a register that must exist)
<bauen1> anarsoul: yes, and i did talk to it with a broken sunxi-spi driver so it wouldn't even surprise me if that caused some 5v levels to reacht the poor chip, it might be time to dump another 25€ for another one
<bauen1> or perhaps write a few mails to infineon and letstrust.de
<smaeul> have you tried playing with it in Linux with spidev?
<bauen1> smaeul: because the board is flashed to secure boot, it's not exactly trivial to boot linux and the few times i tried i failed to load the kernel / initrd / fdt correctly, but i'll try exactly that again tomorrow
<bauen1> and really, i should setup buildroot or something because most kernels e.g. debian don't build the sunxi spi driver, or maybe there is some gpio bit bang implementation in the kernel i haven't found yet, i definietly need to look into it
<bauen1> somebody else supposedly made soft-spi work on an rpi4 (https://github.com/joholl/rpi4-uboot-tpm)
<smaeul> yes, there's spi-gpio in Linux
<apritzel> smaeul: so the RTC gets stuck when trying to set it, and doesn't make progress, which looks like the RTC input clock is not ticking
<apritzel> when I do hwlock -w, it times out with "Failed to set rtc time.", after writing SUN6I_LOSC_CTRL_RTC_HMS_ACC
<smaeul> what is in clk_summary?
<apritzel> then I see the h:m:s part being set, but the date is still the old one. And the time does not move
<apritzel> bit 8 in reg 0x00 is set, which is why it times out
<apritzel> clk_summary looked sane on the first glance, I saw the ccu-sun6i-rtc driver clocks there
<apritzel> but I was wondering that the actual RTC clock is not really referenced anywhere
<apritzel> smaeul: the RTC driver patch is really simple, literally: https://github.com/apritzel/linux/commit/6dbe675b8be
<smaeul> Maxime suggested leaving the RTC-internal clocks out of the clock provider, because they aren't useful to anything else
<apritzel> the DT part is this: https://github.com/apritzel/linux/commit/c665f1230c7b, line 492
<apritzel> makes some sense, because they would need to be self-referenced inside the RTC node, I guess
<smaeul> and because the RTC driver can just writel directly without going through the common clock framework
<apritzel> As far as I can tell the bus block is fine, because I could access the RTC registers just fine via /dev/mem
<smaeul> but what about iosc and osc32k?
<smaeul> I'm interested in clk_summary so I could see those enable counts
<apritzel> yeah, need to fire that TV box up ...
<apritzel> (my OPi Zero2 seems busted, so it's all a bit more tedious)
<smaeul> ah
<smaeul> in any case I think we need a consumer (or a flag) for CLK_RTC_32K so it doesn't get disabled, but I don't know where to put that, or what parent it should have
<apritzel> right, I was thinking in the same direction
<apritzel> hwclock is stuck at "Fri Jan 2 00:01:36 1970 0.000000 seconds", so I guess it was running, but then Linux turned it off
<apritzel> but the RTC driver has no shortcut into the clock driver anymore, right? So we just can't reach into that and turn it on
<apritzel> yeah, clk_ignore_unused fixes it
<apritzel> the difference is clk_summary seems to be the very first clock: "iosc": hardware enable is "Y" with clk_ignore_unused, but "N" without it
cnxsoft has joined #linux-sunxi
<bauen1> i may have been able to "request the 0 locality" from the tpm by writing the a bit offset by one, and then release it again, by doing the same, and the bit indicating that the locality was "active" was also offset by one, this is a timing issue isn't it :(
rajkosto has quit [Read error: Connection reset by peer]
apritzel has quit [Ping timeout: 480 seconds]
<smaeul> apritzel: thanks for confirming this. I think I will put CLK_IS_CRITICAL on CLK_RTC_32K, since the RTC should always be running.
sauce has quit [Server closed connection]
sauce has joined #linux-sunxi
Esmil has quit [Server closed connection]
Esmil has joined #linux-sunxi
NekoMay has quit [Server closed connection]
NekoMay has joined #linux-sunxi
kmaincent has quit [Server closed connection]
kmaincent has joined #linux-sunxi
arti has quit [Server closed connection]
arti has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
kmaincent has quit [charon.oftc.net kinetic.oftc.net]
JohnDoe_71Rus has quit [charon.oftc.net kinetic.oftc.net]
JohnDoe_71Rus has joined #linux-sunxi
kmaincent has joined #linux-sunxi
arnd has quit [Server closed connection]
evgeny_boger has joined #linux-sunxi
arnd has joined #linux-sunxi
apritzel has joined #linux-sunxi
sunshavi has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
evgeny_boger has quit [Quit: evgeny_boger]
evgeny_boger has joined #linux-sunxi
sunshavi has quit [Remote host closed the connection]
sunshavi has joined #linux-sunxi
t4h4[m] has quit [Server closed connection]
t4h4[m] has joined #linux-sunxi
cnxsoft has quit []
gnarface has quit [Quit: Leaving]
apritzel has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
bauen1 has joined #linux-sunxi
gnarface has joined #linux-sunxi
kilobyte2 has quit []
kilobyte_ch has joined #linux-sunxi
<NekoMay> dl.linux-sunxi.org has a (very) expired SSL certificate
<NekoMay> Oops, wrong channel, sorry
<NekoMay> That's for Sipeed's Lichee RV stuff
<NekoMay> Meant to send it to someone else
evgeny_boger has quit [Remote host closed the connection]
evgeny_boger has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
rm_ has quit [Server closed connection]
rm has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
evgeny_boger has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has quit []
apritzel has joined #linux-sunxi
apritzel has quit [Quit: Leaving]
<swiftgeek> how do I access PL11 on mainline linux?
<swiftgeek> err nvm
<swiftgeek> typed in 364 which doesn't exist
<swiftgeek> 363 works fine
JohnDoe_71Rus has joined #linux-sunxi
megi2 has joined #linux-sunxi
megi1 has quit [Ping timeout: 480 seconds]
gnarface has quit [Quit: Leaving]
gnarface has joined #linux-sunxi
gnarface has quit [Quit: Leaving]
gnarface has joined #linux-sunxi
cnxsoft has quit []
evgeny_boger has joined #linux-sunxi
vagrantc has joined #linux-sunxi
z3ntu has quit [Server closed connection]
z3ntu has joined #linux-sunxi
gnarface has quit [Quit: Leaving]
gnarface has joined #linux-sunxi
igraltist has quit [Server closed connection]
igraltist has joined #linux-sunxi
gnarface has quit [Remote host closed the connection]
gnarface has joined #linux-sunxi
ignne has joined #linux-sunxi
<ignne> Hi, does anyone here run an A20 and can tell me what current it usually idles at? I'm also interested in standby (s2idle) and everything power-saving related. Thanks!
<ignne> I had alread asked this a couple of days ago, maybe someone now knows something :)
bantu has quit [Server closed connection]
bantu has joined #linux-sunxi
evgeny_boger has quit [Ping timeout: 480 seconds]
swiftgeek has quit [Remote host closed the connection]
swiftgeek has joined #linux-sunxi
JuniorJPDJ has quit [Quit: Reconnecting]
JuniorJPDJ has joined #linux-sunxi
JohnDoe_71Rus has quit []
rm has left #linux-sunxi [#linux-sunxi]
rm_ has joined #linux-sunxi
rm_ has quit [Quit: ZNC - http://znc.sourceforge.net]
rm_ has joined #linux-sunxi
prefixcactus has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
montjoie has quit [Server closed connection]
montjoie has joined #linux-sunxi
cmeerw[m] has quit [Server closed connection]
cmeerw[m] has joined #linux-sunxi