<jernej>
apritzel: difference is that you either need to write your own regmap find function like sun8i_dwmac_get_syscon_from_dev() in sun8i-dwmac or you can use helper like syscon_regmap_lookup_by_phandle()
radxanaoki has quit [Quit: radxanaoki]
warpme has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
radxanaoki has joined #linux-sunxi
tnovotny has joined #linux-sunxi
baltazar has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
<wens>
syscon API has function to explicitly register a syscon attached to a device node. We should use that instead of letting the syscon API automatically create the regmap
<wens>
the part I dislike about the syscon API is that the automatically created regmaps aren't related to any device
<wens>
and it then becomes possible for the syscon API to create one, while your other driver creates another one that it itself uses.
chewitt has joined #linux-sunxi
<wens>
and maybe rename the "syscon" property in the planes node to something more specific, like "allwinner,plane-mapping"?
apritzel has joined #linux-sunxi
warpme has quit []
warpme has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
<apritzel>
seems like the Cubie A7Z has a USB-C controller chip, named ET7304Y in the schematic, that connects to the CC pins of the USB-C connector and also to I2C
<apritzel>
does anyone have a datasheet for that one?
<wens>
apritzel: IIRC there are still issues with PD in Linux in general :(
<MoeIcenowy>
and I think SBCs cannot run solely off PD (except fully-integrated PD power controller like CH224 is used)
<MoeIcenowy>
because when switching power source capability the power will shut down for a while
<apritzel>
exactly
<apritzel>
so I guess they can negotiate a higher current, but that would be limited to 5V/3A
<apritzel>
and I think we would get at least the role setting, so can properly select between USB device and host
<wens>
looks like the gmac200 stuff is going to have to wait another cycle
<MoeIcenowy>
apritzel: I think for 5V3A PD isn't necessary
<MoeIcenowy>
fixed resistor can already erquire it
<MoeIcenowy>
s/erquire/require
<MoeIcenowy>
( well my first device that runs mainline Linux and have a TCPM-compatible Type-C port is ... Pinebook Pro
radxanaoki has quit [Quit: radxanaoki]
Daanct12 has quit [Quit: WeeChat 4.7.1]
warpme has joined #linux-sunxi
tnovotny has quit [Quit: Leaving]
<jernej>
wens: ok, I don't have strong feeling about syscon. Let's go with allwinner,plane-mapping then.
<jernej>
btw, I think every device which is referenced in syscon property, has to have syscon as compatible.
<apritzel>
I think I've been told off for naming a property syscon before, by Rob, IIRC
<apritzel>
jernej: I think it's best to post something to the list, to get the opinion of Rob and Krzysztof. At the end you need to get past them anyway ;-)
JohnDoe_71Rus has joined #linux-sunxi
<jernej>
sure, I was just looking for ideas before I delve into coding
<apritzel>
jernej: so I just skimmed over it, but apart from that minor syscon detail the rest looked nice and sane to me!
Schimsalabim has quit [Read error: Connection reset by peer]
Schimsalabim has joined #linux-sunxi
ftg has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
apritzel has joined #linux-sunxi
<baltazar>
hi! I'm trying to get sound working on a nanopi duo2. looking at device trees in images by friendlyarm, I see that the mainline dts are missing some stuff. e.g. &codec is defined but disabled in mainline, but okay in upstream's dt
<baltazar>
this is the current patch I'm testing: http://0x0.st/KmiQ.diff but for some reason, once I set &codec's status to okay, the device no longer boots, nor does it print anything on the serial console. the last thing I see is u-boot's "Starting kernel ..."
<baltazar>
any clues? how do I at least get some logs out of this?
<buZz>
maybe remove that extra mmc0 you added in the patch?
<buZz>
maybe its conflicting with something
<apritzel>
baltazar: it's either disabled because the audio signal is just on headers, or because nobody bothered to send a patch
<apritzel>
anyway it should work with that patch of yours, but hanging at this stage points to a different problem
<baltazar>
buZz: I added that alias because otherwise it would randomly order mmc0 and mmc1, causing me to miss my root device. seems to have fixed it, but I might be misunderstanding how aliases work
<apritzel>
did you change anything other than just enabling this node? are the DTs really only differing in this node?
<apritzel>
yeah, that's an old problem. You can just use the DT that U-Boot ships ($fdtcontroladdr), and skip loading any DTB at all, then you get the aliases for free
<baltazar>
apritzel: no, there are other differences, many of them unrelated to this issue (e.g. they don't define bluetooth in their dt, instead adding it from userspace) there's another relevant difference: they define a simple-audio-card that refers to these nodes, but I haven't added that yet. I assumed if it won't boot now, addin that won't help either but I might be wrong
<buZz>
well, is your kernel even outputting anything to whatever interface you are looking on?
<buZz>
it could be compiled without ttyS0 output as default msgs, and only output to hdmi?
<baltazar>
buZz: normally, yes. if I leave &codec disabled, I see the full dmesg on my serial console during boot.
<buZz>
with all the other changes you did on dts/dtb?
<apritzel>
baltazar: so are you comparing some vendor kernel&DT against mainline? Did you try to get mainline to work just as is, without any changes?
<baltazar>
mainline works and boots without changes, but it's missing the audio output I wanna get working. the patch I sent is what I'm applying to mainline right now
<apritzel>
ok, that's odd. I don't think you need i2s2, do you? That's just for digital audio
<buZz>
i2s is for running a external codec chip yeah
<baltazar>
hm, then I'm not sure what I'm missing.
<apritzel>
baltazar: do you have "earlycon" on your kernel command line? to see early output
<baltazar>
oh, I had earlyprintk. I'll try with earlycon
<baltazar>
cool, at least now I see a kernel panic :D
<buZz>
yay! :)
<baltazar>
welp, I'm not sure what to make of it :( From what I can tell, it tried to probe a driver, it failed, and it crashed during cleanup: http://0x0.st/KmiR.txt
<apritzel>
baltazar: that looks like an interesting bug in the cleanup path indeed. That's a self-compiled kernel, isn't it? Do you have the DMA controller driver compiled in? CONFIG_DMA_SUN6I
<baltazar>
apritzel: yup. (I'm using buildroot which sets up linux with the sunxi defconfig + some config changes on top of that)
<baltazar>
whois apritzel
<baltazar>
oops :P
<apritzel>
it looks like it bails out either due to some missing prerequisite (like the DMA controller), or due to a -EPROBE_DEFER, so something not yet loaded
<baltazar>
can't linux just dump core over serial or something?
<apritzel>
tricky, but it gives you quite some information already, namely the stack and code
<apritzel>
looks like component_driver->name is NULL
<baltazar>
also what's with that 8 before <--- cut here? was it about to print something else and got panick'd in the middle or is that just how that normally looks?
<apritzel>
that's scissors in ASCII art: 8<
<baltazar>
ah /o\
radxanaoki has joined #linux-sunxi
megi has quit [Read error: No route to host]
megi has joined #linux-sunxi
<apritzel>
baltazar: ah, I see the same thing as well now on my OrangePi Zero, when just enabling the codec node, same as you
<baltazar>
oh well
<baltazar>
hmm but e.g. sun8i-h3-orangepi-pc.dts has it enabled, even the same audio-routing config I'm trying to set. I wonder if that's working on that board
<apritzel>
I would be guessing that's broken everywhere. It might depend a bit on the probe order, though
<baltazar>
I assume order could make it not panic, but it still wouldn't work
<baltazar>
I guess I should find out why the probe is failing in the first place
vagrantc has quit [Quit: leaving]
<apritzel>
baltazar: so it's the call to snd_soc_register_card() at the very end of sun4i_codec_probe(), that calls snd_soc_bind_card(), which returns -EPROBE_DEFER. Then tragedy unfolds when it backs out
<apritzel>
oh wow, it's a long list of things that get called in snd_soc_bind_card() ....
<baltazar>
interesting. I tried converting those to modules, but apparently it's not just order. now it boots fine, but crashes the same way when I try to load it
<baltazar>
wait no it's still order :P I just had to load sun8i-codec-analog before sun4i-codec
<baltazar>
can't test if it's actually working atm but at least it shows up in alsamixer
Schimsalabim has quit [Ping timeout: 480 seconds]
<baltazar>
many thanks for your help, I'll try to come up with an actual solution tomorrow but I'm off to sleep now, bye!
Schimsalabim has joined #linux-sunxi
<apritzel>
baltazar: right, I don't see the print from sun8i_codec_analog_probe() before it crashes
<apritzel>
baltazar: I feel like it's an upstream that should be reported to the list (tomorrow)