warpme has quit [Remote host closed the connection]
warpme has joined #linux-sunxi
bauen1 has joined #linux-sunxi
warpme has quit []
IlikeTech has joined #linux-sunxi
<ad__>
hi, is it correct H2 (bananapi m2 zero) has only 1 PWM pin available ?
hazardchem has quit [Read error: Connection reset by peer]
hazardchem has joined #linux-sunxi
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
<apritzel>
ad__: the H3 SoC itself has one PWM pin on PA5, but a second one (controlled by S_PWM) on PL10. Don't know which of those the BPi M2 Zero exposes ...
<apritzel>
ad__: according to the schematics, PA5 is UART0-RX, and PL10 is connected to the power LED. So you can make the LED change brightness, but it's probably not easily available if you need a second external PWM signal
gsz has quit [Ping timeout: 480 seconds]
warpme has quit []
veremitz is now known as veremootz
<IlikeTech>
Hi, I'm trying to get the F1C100s USB working correctly, and I have it successfully acting as a host (enabling it's own regulator to provide vbus and being able to attach devices) if I set it's role specifically to "host" in the device tree. However, I'm having no luck getting it to work in otg mode. This is with mainline Linux 6.10.5. Does
<IlikeTech>
anyone have any experience as to what's needed to be configured in the kernel and / or in the device tree to make this work?
<IlikeTech>
I can't seem to get peripheral / gadget mode to work at all, even
<apritzel>
IlikeTech: so OTG (as in: determined at runtime via the ID pin) is known to have issue (on AW in mainline Linux in general), but dedicating to peripheral via the DT should work
<IlikeTech>
okay, at the moment neither seem to be working, but the latter may be an issue on my part. I know there's an older, working tree for this chip so I'm going to try building that and see if it works
<IlikeTech>
good to know that it has issues though
<apritzel>
IlikeTech: look at the suniv-f1c200s-lctech-pi.dts in mainline, that should have peripheral mode working
<IlikeTech>
interestingly with the mode set to OTG, it seems to default to host mode but also doesn't turn on the supply, so it doesn't work
<IlikeTech>
should the matching defconfig actually present as a peripheral, or do I need to enable a gadget option?
<IlikeTech>
(other then just gadget support)
<apritzel>
for a mainline kernel?
<IlikeTech>
yeah
<apritzel>
I'd go with the modern way of dynamic configuation via configfs
<IlikeTech>
alright
<apritzel>
that looks somewhat more complicated at first, but gives you much more flexibility, and you can put the commands in a script once and be done
<IlikeTech>
makes sense, thanks for the help
<IlikeTech>
I'll try that and report back
<apritzel>
and that would be generic, for Linux in general, so follow anything that Google turns up out there
<IlikeTech>
yeah
<apritzel>
the F1C100s is a bit different, since there seems to be no HCI controller, which means OTG might actually work, but I forgot all the details about this SoC
<IlikeTech>
I designed a PCB around one and jumped in head first, the hardware was the easy part lol :/
<IlikeTech>
giving myself a crash course in working on u-boot and the kernel
vagrantc has quit [Quit: leaving]
<apritzel>
IlikeTech: since the SoC is somewhat supported in both mainlines, it should really just be a matter of providing a .dts file and the U-Boot defconfig
<apritzel>
both of which you can copy from some existing files
<IlikeTech>
yeah, that's what I've been doing
<IlikeTech>
it's very possible this is a misunderstanding on my part about how device trees / config options lol
<apritzel>
and just to be clear: the .dts files for both U-Boot and the kernel are identical
<IlikeTech>
oh, that could definitely be the issue
<IlikeTech>
u-boot is using the in-tree config for the lichee pi nano
<IlikeTech>
the kernel is using the config I based off of that one that I'm providing via the out-of-tree dts option in buildroot
<IlikeTech>
at least, afaik? I'm assuming u-boot integrates a dts into it's "u-boot-with-spl.bin"
<apritzel>
config & DT are independent: for the kernel just use multi_v5_defconfig, and the DT describes the hardware, so there is nothing to really *configure* there
<apritzel>
similar with the U-Boot defconfig: just copy one, and adjust at least the DT name
<apritzel>
I should actually check whether we can switch the F1C100s in U-Boot to OF_UPSTREAM, which means it literally uses the very same DT files, imported from the kernel repo
<IlikeTech>
hmm, alright, that makes sense
<IlikeTech>
is there a reason to use multi_v5_defconfig over sunxi_defconfig?
<apritzel>
sunxi_defconfig configures a ARMv6/ARMv7 kernel, which does not run on the ARM9 core in the F1C100s - ARM9 is ARMv5
<apritzel>
most of sunxi, starting with the venerable A10, is ARMv7, or ARMv8 for the "newer" Cortex-A53 based SoCs
<IlikeTech>
interesting, I've been using the sunxi_defconfig and I haven't had any issues with it booting
<IlikeTech>
sounds like that's surprising lol
<apritzel>
interesting, haven't checked, but I was under the impression the kernel would use ARMv6+ instructions pretty quickly
<IlikeTech>
I'll try the other config
<IlikeTech>
gonna go eat something, back in a little bit, thanks for the help!
ftg has quit [Read error: Connection reset by peer]