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
radxanaoki has joined #linux-sunxi
jn has joined #linux-sunxi
jnn has quit [Ping timeout: 480 seconds]
hexdump01 has joined #linux-sunxi
hexdump02 has quit [Ping timeout: 480 seconds]
hexdump02 has joined #linux-sunxi
Daanct12 has joined #linux-sunxi
MasterR3C0RD3 has quit []
MasterR3C0RD has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
<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?
<buZz> ttps://etek.com.cn/upload/files/product/20250630/17512730724343324.pdf
<buZz> first google hit
<buZz> oh, actually duckduckgo hit :)
<buZz> seems not really a usb-c controller, but just USB-PD stuff?
<buZz> still nice of course
<apritzel> buZz: ah nice, thanks, Google just turned up the Radxa schematic and some Chinese merchant, nothing else
<buZz> yw , hth :)
<apritzel> well, something that deals with the CC pins for real, for a change
<buZz> yeah seems like it, PD 3.0 even
<buZz> up to 100W
<apritzel> I am pretty sure it's limited to 5V on this board, though, so it's more like 15W, I guess (5V@3A)
<maz> it'd be interesting to compare this ET7304 to a FUSB302...
<apritzel> ah, it's the "Y" at the end that put Google off ...
dsimic is now known as Guest27156
dsimic has joined #linux-sunxi
Guest27156 has quit [Ping timeout: 480 seconds]
DuClare__ is now known as DuClare
warpme has quit []
<MoeIcenowy> Maz: I saw some claim that ET7304 "can replace RT1715"
<MoeIcenowy> buZz: and I think a fully functional PD controller is just "USB Type-C controller"
<MoeIcenowy> because PD handles every advanced parts of Type-C
<MoeIcenowy> from high-voltage Vbus to USB 3.0 reverse
<MoeIcenowy> well ET7304 even has the vendor registers defined in https://chromium.googlesource.com/chromiumos/platform/ec/+/master/driver/tcpm/rt1715.c
<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!
<jernej> thanks!
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
warpme has quit []
tlwoerner has joined #linux-sunxi
tlwoerner_ has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
warpme has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
warpme has quit []
chewitt has quit [Quit: Zzz..]
apritzel has joined #linux-sunxi
wingrime-ww has quit [Quit: WeeChat 4.7.0]
wingrime-ww has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.6 Quasar http://www.kvirc.net/]
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)