sh1 has quit [Quit: I'm just going offline and may be some time.]
apritzel has quit [Ping timeout: 480 seconds]
sh1 has joined #linux-sunxi
ftg has quit [Read error: Connection reset by peer]
faruk has joined #linux-sunxi
hlauer has joined #linux-sunxi
cmeerw has joined #linux-sunxi
cmeerw has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
Danct12 has quit [Quit: Quitting]
apritzel has quit [Ping timeout: 480 seconds]
Danct12 has joined #linux-sunxi
apritzel has joined #linux-sunxi
diego71 has quit [Remote host closed the connection]
diego71 has joined #linux-sunxi
choozy has joined #linux-sunxi
choozy has quit [Remote host closed the connection]
<arnd>
apritzel, plaes: linusw mentioned to me that he may be able to get the cw1200 datasheet, but he just went on his extended summer vacation
<jernej>
arnd: I managed to load FW with cw1200 driver and I get encouraging init done message, but then FW on chip crashes - presumably because XR819 API is slightly different (only few messages).
<jernej>
cw1200 driver is from pre-OF time, it needs some improvements in this regard
<jernej>
warpme_: DPLL value depends on source clock frequency for XR819
<jernej>
on all AW boards that is 24 MHz
<jernej>
maybe you have wrong config file?
<arnd>
jernej: I think it's less a matter of "pre-OF times" and more of being intended as a standalone SDIO device that can be discovered without DT data
<arnd>
but that is probably also the difference between testing a prototype device, and using the driver for integration into an actual machine where you end up needing additional data for whatever reason
<arnd>
there is even a comment saying "this cannot possibly work"
<jernej>
there is a ton of options, most of which are imo not needed
<jernej>
but clock frequency is important
<arnd>
linusw also mentioned that the chip is on some of his mach-ux500 (an original st-ericsson SoC) boards, and he never got it to work there
<arnd>
at the time that the driver was mainlined, you could not even pass DT data to an SDIO device at all, but that generally works fine these days
<jernej>
actually config file is read later in the process and it compares if clock frequency match that of platform data, which is wrong imo
<arnd>
jernej: is that config file the '.sdd_file = "sdd_sagrad_1091_1098.bin"' reference?
<jernej>
yes
<arnd>
ok, I see
<jernej>
but only 2 or 3 things are checked from ~800 byte file
<jernej>
so I would rather put that in DT, because it's board specific anyway
<jernej>
and I don't like file parsing in kernel
<arnd>
the other things (ref_clk, have_5ghz, reset, powerup, gpio) translate easily into DT properties, presumably in exactly the way that the xradio driver already does
<arnd>
is there another file that gets loaded for the executable firmware, or is this the only file?
<jernej>
no, there is also bootloader (only some chip variants need it) and FW
<arnd>
ok
<arnd>
I agree on the file parsing, though I'm not sure what regulatory requirements there might be, I've seen similar things in the ath9k driver
<arnd>
firmware loading is hard, as the files you load may be specific to the board, the driver version or both
<arnd>
because of the driver version issue, you can't just hardcode a firmware file name in the dt
<arnd>
and because of the board requirement, you can't just hardcode it in the driver either
<arnd>
so usually you'd end up with the driver constructing a file name based on some data it gets from the device (either register information, or DT) and things it knows about, and then attempts to load a file for that combinations, with possible fallbacks to a more generic binary
<jernej>
yeah, like it's done for BRCM wifi
<jernej>
but I don't think XR819 FW and bootloader are board specific
<jernej>
as soon as I manage to make it work, I'll test it with two FW versions I have
<jernej>
(extracted from Android images for different boards)
<jernej>
bootloaders are even exactly the same for both boards and I think SDD files too (they use same clock frequency)
<arnd>
I looked at the sdd parsing now, and agree with your conclusion, this code is completely bonkers
<arnd>
it's just an extremely elaborate way to set a "listen_interval" setting. A lot of other drivers have a per-device setting with the same name, not sure where they get it from, or how one would determine the correct value for it otherwise
<arnd>
I do see that cw1200_tx_h_bt() overrides the listen_interval again with a value from a management frame if that is smaller
<jernej>
yeah, and all that if BT is even supported
<arnd>
ah wait, the management frame gets the value from the SDD, not the other way round
<arnd>
I suspect this value should actually come from user space through nl80211_set_station()
<warpme_>
jernej: just fyi: if this might be helpful in _any way_ (i.e. registers compare, etc): i have preliminary working xr819 on 5.13 with karabek code
<jernej>
warpme_: it would be helpful if you can change XRADIO_DBG_LEV_WSM and XRADIO_DBG_LEV_XR to 0xff in debug.h and provide dmesg after that
<jernej>
note, it may be pretty big
<jernej>
but some simple operation like ifconfig wlan0 up should be enough already, since this already fails in my case
cmeerw has joined #linux-sunxi
<warpme_>
jernej: as you wish: https://pastebin.com/gUFuVf0i (log from connecting to AP with XRADIO_DBG_LEV_WSM and XRADIO_DBG_LEV_XR to 0xff in debug.h)
<jernej>
warpme_: thanks! that is a good reference
jakllsch has quit [Read error: Connection reset by peer]