libera/#devuan-arm/ Friday, 2021-05-28

c0rneliustuxd3v: Well thats why you would create service to load it during the boot process.00:55
c0rneliusSounds like the same problem the rpi and pine64 has. Needs a service to give it that extra kick to make it work.00:56
tuxd3vc0rnelius, it could be .. the BananaPi M64, also has the same problem..01:09
c0rneliusSeems like a lot of boards with onboard bluetooth have this issue.01:10
c0rneliusI think the only one I have that doesn't is the NanoPC-T4 which just seems to work, although kernel patching is required still.01:11
c0rneliusBut I believe in that case its ignoring uart altogether and inserting the names of the sdio into it.01:13
c0rneliusWhich is kinda what the foundation does on a wifi level.01:13
c0rneliusWith the Pi's of course01:14
c0rneliusexample: https://github.com/pyavitz/debian-image-builder/blob/feature/patches/rockchip/3399/general-btsdio-ignore-uart-devs.patch01:16
c0rneliuspatch even explains why :)01:16
tuxd3vc0rnelius, we could have something there, I am compiling a kernel wich will print soem strings about the device and interface :)03:06
tuxd3vsome*03:06
tuxd3vI put some printfs there to see if that function is called..03:49
tuxd3vwith my config it doesn't call sdio bluetooth driver probes: https://paste.debian.net/hidden/3a74e404/03:53
tuxd3vbut it was good call :)03:56
tuxd3vit will only makes sense if you have 2 bluetooth devices 1 uart based and the other sdio based..04:27
c0rneliusWell sounds like ur back to either finding away to create a helper script for it or... Not caring about BT :)04:49
c0rneliusWhich is what I decided to do with the NEO plus204:49
c0rneliusAlso the wifi and BT are probs working off the same frequency which doesn't help.04:50
tuxd3vc0rnelius, indeed, I was trying to persue the problem until a solution found, but seems very complex indeed..05:06
tuxd3vno one knows what the problem really is .. in linux-sunxi they also don't have a clue05:06
c0rneliusHence my reasoning for... stopped caring about it :)05:07
tuxd3vthey are also testing and doing crazy tests, but no smoke on the horizon..05:07
tuxd3vc0rnelius, you right05:07
tuxd3v:)05:07
mirdaHi11:28
agneli_:D20:37
agneli_crap...20:38
tuxd3vmaybe we found a way form bluetooth, apritzel found  a commit from january 2020... to eliminate the delay of probing for serial ports20:47
tuxd3vthe commit is: dc56ecb81a0a20:47
tuxd3vCONFIG_SERIAL_8250_16550A_VARIANTS=y20:49
tuxd3vI am compiling a kernel right now to test :)20:49
tuxd3vc0rnelius, ^^20:49
tuxd3vc0rnelius, please test the Atomic Option on your boards ASAP21:18
tuxd3vthere seeems to be good news :)21:18
tuxd3vi mean bluetooth21:18
tuxd3v:)21:18
tuxd3vc0rnelius,  apritzel unlocked the Holy grail!! :)21:20
tuxd3vat this time there are 5 guys fussing around for the bluetooth problem :)21:21
tuxd3vand apritzel bissected the kernel , and found the holly grail :)21:21
tuxd3vplease test in your nanopi and pine64 boards please we should report back21:22
tuxd3vit works every single time!!21:37
tuxd3v:)21:37
tuxd3vit was the excessive amount of time probing for the uart time...21:37
Tenkawatuxd3v: if what I see is right.. thats onlg going to affect Altera 16550 uarts21:47
Tenkawaer only21:47
Tenkawaso those boards you are testing might be fine but only Altera uarts21:48
tuxd3vI believe is afects a lot of devices, its the way probing for device tyupe is done... it takes a lot of time, and bluetooth device timesout :/21:48
Tenkawano.. line 2249. https://github.com/torvalds/linux/blob/master/drivers/tty/serial/8250/8250_port.c#L224921:48
Tenkawathats the code thats doing it21:49
TenkawaCONFIG_SERIAL_8250_16550A_VARIANTS=y21:49
tuxd3vthis discovery is even being tested successfully in tablets and working fine..21:49
Tenkawathat uses this21:49
Tenkawayes and those tablets use alterras21:49
Tenkawaits a very common chip21:49
tuxd3vyes that line prevents the probing from going on, and so uart becomes available a lot faster at least 20ms faster :)21:49
tuxd3vits a great discovery believe me21:50
Tenkawabut SoC's for non-tablets like pi's and other vendors wont be using it21:50
tuxd3vthere are tons of devices afected by this..21:50
tuxd3vyeah the good thing is that all work now :)21:50
Tenkawauntil they take 16550 out completely21:51
tuxd3vpine64, nanopi nei air, neo2( c0rnelius need to check, but almost for sure it works )21:51
tuxd3vNEO plus2,BananaPi M64, etc21:51
tuxd3vits a great discovery and this patch was introduced in january of 2020 :/21:52
TenkawaI expect support for those wont be in the kernel past 5.1421:52
Tenkawathe FriendlyElecs are already losing support21:53
Tenkawahard to get anything fixed on them21:53
Tenkawawe csn hope though21:54
tuxd3vin relation to bluetooth is can be configured automatically via this: https://paste.debian.net/hidden/7a6e9501/21:54
tuxd3vin that case uart3 is the one conected to bluetooth, you just need to check the schematics to see what uart is conected and adjust21:54
tuxd3vit will work for any device out there :)21:54
tuxd3vthe driver is automatically loaded when device tree parses the DTb :)21:55
tuxd3vin this case this triggers the load of the driver: compatible = "brcm,bcm43438-bt";21:55
tuxd3vyou just need to have the firmware in /lib/firmware/brcm21:56
tuxd3vand that's it21:56
tuxd3vautomatic, with no helpers script nothing :)21:56
tuxd3vbeautiful :)21:56
tuxd3vc0rnelius, please can you test in your boards?22:24
tuxd3v:)22:24
tuxd3vTenkawa, in theory this could also work on raspberrypi, even tought that rpy has its foundation kernel with things working..22:29
Tenkawano. that piece of code works for 16550 uarts22:35
Tenkawathe rpi does not have a 1655022:35
Tenkawadmesg | grep -i 1655022:35
Tenkawana@rpi4-2:~$22:35
Tenkawaits compatible but its a PL01122:37
Tenkawathat config parameter without more investigation would likely do nothing22:38
Tenkawaits already set on rpi kernels by default now22:40
Tenkawazcat /proc/config.gz | grep CONFIG_SERIAL_8250_16550A_VARIANTS22:41
TenkawaCONFIG_SERIAL_8250_16550A_VARIANTS=y22:41
c0rneliusWhat's going on?22:41
tuxd3vman you are loosing the great discovery of the holly grail22:42
c0rneliusI was napping22:42
tuxd3vbluetooth working every single time :)22:43
Tenkawatuxd3v: we've had it set in the kernels we build the whole time22:43
tuxd3vyeah for what not set in nanopi's , bananapi's, etc22:43
tuxd3v:)22:43
tuxd3vfor -> but22:43
c0rneliuswhat option in the defconfig am I looking for?22:48
c0rneliusthis - CONFIG_SERIAL_8250_16550A_VARIANTS=y22:48
tuxd3vyes, that options unveils the holly grail itself :)22:49
Tenkawano it doesn't22:49
Tenkawait fixes one bug for one controller22:49
tuxd3vTenkawa, I am telling you, believe me, we are 5 or six guys working on this sh*tt for more than a month22:50
tuxd3vapritzel took a diferent path, a very conservative one22:50
tuxd3vwens, and megi, were the ones doing crazy stuff like adding a timer here, reducing a timer there, and so on..22:50
tuxd3vI messed up with the btsdio.c, and other functions, and workarounds, but apritzel said no workarounds valid..22:51
tuxd3vto be honest I was very demotivated, and almost giving up22:51
tuxd3vapritzel saved the day :)22:52
c0rneliusI'll try22:52
tuxd3vhe was like gandalf the white riding blazing fast in his white unicorn horse22:52
tuxd3vc0rnelius,  many thanks :)22:53
tuxd3vthat option will reduce a lot the time needed to probbe uarts, and that will mean no more timeouts on the bluetooth :)22:53
tuxd3vit works on emmc it works on sdcard, it works on reboot and on cold boot too22:55
tuxd3vworks always now :)22:55
tuxd3vroot22:55
tuxd3vups22:56
tuxd3vwell devuan has 1 more image preping to come out :)22:58
c0rneliustuxd3v: This is already in my allwinner defconfig23:00
tuxd3vactivated?23:01
c0rneliusyeah its all enabled23:01
tuxd3vcan you share your dtb?23:01
tuxd3vsorry dts23:02
c0rneliusI see an extended option for it thats not enabled?23:03
tuxd3vCONFIG_SERIAL_8250_16550A_VARIANTS=y23:04
c0rneliusYes, thats already enabled23:04
tuxd3vuse this bluetooth def_config: https://paste.debian.net/hidden/a05d8786/23:05
tuxd3vyou are testing in the NEO plus2?23:06
c0rneliusWell currently loading the defconfig which I use for both boards and yes I gots that enabled and all that and more :)23:07
c0rneliusI'm pretty sure on the NEO side I'm missing something in the DTS.23:08
tuxd3vshow me the dts on the NEO, maybe I can help :)23:08
c0rneliusthis is the default23:11
c0rneliushttps://pastebin.com/Sqne936w23:12
c0rneliusthis is the only edits I make - https://github.com/pyavitz/debian-image-builder/blob/feature/patches/allwinner/nanopi/sun50i-h5-nanopi-neo-plus2-cpu-opp-include-and-enable-regulator-fix-leds.patch23:12
c0rneliusI stopped adding the bluetooth patch I was messing with cuz it made the board unstable23:12
tuxd3vwhat is the uart you are using for bluetooth on NEO?23:13
tuxd3vuart3?23:13
c0rneliusAccording to the old vendor kernel its suppose to be 323:14
c0rneliusBut when I used the patch and enabled it the board would hang during boot sometimes.23:15
c0rneliusand considering I use to run weechat, that wasn't gonna work for me :)23:15
c0rneliususe it*23:16
tuxd3vok, I got the datasheet its uart3 indeed, I will prepare that section :)23:18
c0rneliusthis was pulled out of the vendor kernel - https://github.com/pyavitz/debian-image-builder/blob/feature/patches/allwinner/nanopi/nano_pi_neo_plus2_bluetooth.disable23:19
c0rneliusUnfortunately it only kind of works. As I was saying... In mainline anyway.23:20
tuxd3vsomething like this: https://paste.debian.net/hidden/99a14d88/23:32
tuxd3vI added aliases for the mmc devices23:33
tuxd3valiases for uart323:33
tuxd3vadded uart3, which seems to be the same has neo Air, about pinouts configurations23:33
tuxd3vadded rfkill23:34
tuxd3vand improved the wifi poer sequence..23:34
tuxd3vpower23:34
tuxd3vyou can add other things..23:34
c0rneliusI downloaded it, I'll run a diff against the original and create a patch out if it and let you know what happens.23:34
tuxd3vbut with that uart3 config, rfkill, and such you should now get bluetooth out of the box23:34
c0rneliusThanx23:34
tuxd3vyou welcome23:35
tuxd3vthat way to configure bluetooth doesn't need any script to help configure it on the rootfs side, it just works23:35
tuxd3v:)23:35
tuxd3vbut for that to just work, CONFIG_SERIAL_8250_16550A_VARIANTS=y was needed :)23:36
c0rneliusWell we shall find out :) When I wake up a bit more I'll give it the old college try.23:36
tuxd3vI was looking at the datasheet and it seems to me that the pinouts are the same as for neo Air for bluetooth, and even some wifi ones..23:37
tuxd3v:)23:37
c0rneliusthey should be the same23:37
tuxd3vyup23:37
c0rneliusall those older neos are the same i thinks23:37
c0rneliush3/h523:37
tuxd3vI got amazed how well bluetooth works, man is just crazy, it just works out of the box, on reboot on could boot, booting from emmc, from sdcard, you will see :)23:38
tuxd3vyou just need to have the firmware patch in /lib/firmware/brcm, and that's it :)23:39
c0rneliusk, koool.23:40
tuxd3vbasically its the same armbian have done in that patch that you sent me :)23:43
tuxd3vbut they have done more on the patch, you can replicate that :)23:44

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!