c0rnelius | tuxd3v: Well thats why you would create service to load it during the boot process. | 00:55 |
---|---|---|
c0rnelius | Sounds like the same problem the rpi and pine64 has. Needs a service to give it that extra kick to make it work. | 00:56 |
tuxd3v | c0rnelius, it could be .. the BananaPi M64, also has the same problem.. | 01:09 |
c0rnelius | Seems like a lot of boards with onboard bluetooth have this issue. | 01:10 |
c0rnelius | I 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 |
c0rnelius | But I believe in that case its ignoring uart altogether and inserting the names of the sdio into it. | 01:13 |
c0rnelius | Which is kinda what the foundation does on a wifi level. | 01:13 |
c0rnelius | With the Pi's of course | 01:14 |
c0rnelius | example: https://github.com/pyavitz/debian-image-builder/blob/feature/patches/rockchip/3399/general-btsdio-ignore-uart-devs.patch | 01:16 |
c0rnelius | patch even explains why :) | 01:16 |
tuxd3v | c0rnelius, we could have something there, I am compiling a kernel wich will print soem strings about the device and interface :) | 03:06 |
tuxd3v | some* | 03:06 |
tuxd3v | I put some printfs there to see if that function is called.. | 03:49 |
tuxd3v | with my config it doesn't call sdio bluetooth driver probes: https://paste.debian.net/hidden/3a74e404/ | 03:53 |
tuxd3v | but it was good call :) | 03:56 |
tuxd3v | it will only makes sense if you have 2 bluetooth devices 1 uart based and the other sdio based.. | 04:27 |
c0rnelius | Well sounds like ur back to either finding away to create a helper script for it or... Not caring about BT :) | 04:49 |
c0rnelius | Which is what I decided to do with the NEO plus2 | 04:49 |
c0rnelius | Also the wifi and BT are probs working off the same frequency which doesn't help. | 04:50 |
tuxd3v | c0rnelius, indeed, I was trying to persue the problem until a solution found, but seems very complex indeed.. | 05:06 |
tuxd3v | no one knows what the problem really is .. in linux-sunxi they also don't have a clue | 05:06 |
c0rnelius | Hence my reasoning for... stopped caring about it :) | 05:07 |
tuxd3v | they are also testing and doing crazy tests, but no smoke on the horizon.. | 05:07 |
tuxd3v | c0rnelius, you right | 05:07 |
tuxd3v | :) | 05:07 |
mirda | Hi | 11:28 |
agneli_ | :D | 20:37 |
agneli_ | crap... | 20:38 |
tuxd3v | maybe we found a way form bluetooth, apritzel found a commit from january 2020... to eliminate the delay of probing for serial ports | 20:47 |
tuxd3v | the commit is: dc56ecb81a0a | 20:47 |
tuxd3v | CONFIG_SERIAL_8250_16550A_VARIANTS=y | 20:49 |
tuxd3v | I am compiling a kernel right now to test :) | 20:49 |
tuxd3v | c0rnelius, ^^ | 20:49 |
tuxd3v | c0rnelius, please test the Atomic Option on your boards ASAP | 21:18 |
tuxd3v | there seeems to be good news :) | 21:18 |
tuxd3v | i mean bluetooth | 21:18 |
tuxd3v | :) | 21:18 |
tuxd3v | c0rnelius, apritzel unlocked the Holy grail!! :) | 21:20 |
tuxd3v | at this time there are 5 guys fussing around for the bluetooth problem :) | 21:21 |
tuxd3v | and apritzel bissected the kernel , and found the holly grail :) | 21:21 |
tuxd3v | please test in your nanopi and pine64 boards please we should report back | 21:22 |
tuxd3v | it works every single time!! | 21:37 |
tuxd3v | :) | 21:37 |
tuxd3v | it was the excessive amount of time probing for the uart time... | 21:37 |
Tenkawa | tuxd3v: if what I see is right.. thats onlg going to affect Altera 16550 uarts | 21:47 |
Tenkawa | er only | 21:47 |
Tenkawa | so those boards you are testing might be fine but only Altera uarts | 21:48 |
tuxd3v | I 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 |
Tenkawa | no.. line 2249. https://github.com/torvalds/linux/blob/master/drivers/tty/serial/8250/8250_port.c#L2249 | 21:48 |
Tenkawa | thats the code thats doing it | 21:49 |
Tenkawa | CONFIG_SERIAL_8250_16550A_VARIANTS=y | 21:49 |
tuxd3v | this discovery is even being tested successfully in tablets and working fine.. | 21:49 |
Tenkawa | that uses this | 21:49 |
Tenkawa | yes and those tablets use alterras | 21:49 |
Tenkawa | its a very common chip | 21:49 |
tuxd3v | yes that line prevents the probing from going on, and so uart becomes available a lot faster at least 20ms faster :) | 21:49 |
tuxd3v | its a great discovery believe me | 21:50 |
Tenkawa | but SoC's for non-tablets like pi's and other vendors wont be using it | 21:50 |
tuxd3v | there are tons of devices afected by this.. | 21:50 |
tuxd3v | yeah the good thing is that all work now :) | 21:50 |
Tenkawa | until they take 16550 out completely | 21:51 |
tuxd3v | pine64, nanopi nei air, neo2( c0rnelius need to check, but almost for sure it works ) | 21:51 |
tuxd3v | NEO plus2,BananaPi M64, etc | 21:51 |
tuxd3v | its a great discovery and this patch was introduced in january of 2020 :/ | 21:52 |
Tenkawa | I expect support for those wont be in the kernel past 5.14 | 21:52 |
Tenkawa | the FriendlyElecs are already losing support | 21:53 |
Tenkawa | hard to get anything fixed on them | 21:53 |
Tenkawa | we csn hope though | 21:54 |
tuxd3v | in relation to bluetooth is can be configured automatically via this: https://paste.debian.net/hidden/7a6e9501/ | 21:54 |
tuxd3v | in that case uart3 is the one conected to bluetooth, you just need to check the schematics to see what uart is conected and adjust | 21:54 |
tuxd3v | it will work for any device out there :) | 21:54 |
tuxd3v | the driver is automatically loaded when device tree parses the DTb :) | 21:55 |
tuxd3v | in this case this triggers the load of the driver: compatible = "brcm,bcm43438-bt"; | 21:55 |
tuxd3v | you just need to have the firmware in /lib/firmware/brcm | 21:56 |
tuxd3v | and that's it | 21:56 |
tuxd3v | automatic, with no helpers script nothing :) | 21:56 |
tuxd3v | beautiful :) | 21:56 |
tuxd3v | c0rnelius, please can you test in your boards? | 22:24 |
tuxd3v | :) | 22:24 |
tuxd3v | Tenkawa, in theory this could also work on raspberrypi, even tought that rpy has its foundation kernel with things working.. | 22:29 |
Tenkawa | no. that piece of code works for 16550 uarts | 22:35 |
Tenkawa | the rpi does not have a 16550 | 22:35 |
Tenkawa | dmesg | grep -i 16550 | 22:35 |
Tenkawa | na@rpi4-2:~$ | 22:35 |
Tenkawa | its compatible but its a PL011 | 22:37 |
Tenkawa | that config parameter without more investigation would likely do nothing | 22:38 |
Tenkawa | its already set on rpi kernels by default now | 22:40 |
Tenkawa | zcat /proc/config.gz | grep CONFIG_SERIAL_8250_16550A_VARIANTS | 22:41 |
Tenkawa | CONFIG_SERIAL_8250_16550A_VARIANTS=y | 22:41 |
c0rnelius | What's going on? | 22:41 |
tuxd3v | man you are loosing the great discovery of the holly grail | 22:42 |
c0rnelius | I was napping | 22:42 |
tuxd3v | bluetooth working every single time :) | 22:43 |
Tenkawa | tuxd3v: we've had it set in the kernels we build the whole time | 22:43 |
tuxd3v | yeah for what not set in nanopi's , bananapi's, etc | 22:43 |
tuxd3v | :) | 22:43 |
tuxd3v | for -> but | 22:43 |
c0rnelius | what option in the defconfig am I looking for? | 22:48 |
c0rnelius | this - CONFIG_SERIAL_8250_16550A_VARIANTS=y | 22:48 |
tuxd3v | yes, that options unveils the holly grail itself :) | 22:49 |
Tenkawa | no it doesn't | 22:49 |
Tenkawa | it fixes one bug for one controller | 22:49 |
tuxd3v | Tenkawa, I am telling you, believe me, we are 5 or six guys working on this sh*tt for more than a month | 22:50 |
tuxd3v | apritzel took a diferent path, a very conservative one | 22:50 |
tuxd3v | wens, and megi, were the ones doing crazy stuff like adding a timer here, reducing a timer there, and so on.. | 22:50 |
tuxd3v | I messed up with the btsdio.c, and other functions, and workarounds, but apritzel said no workarounds valid.. | 22:51 |
tuxd3v | to be honest I was very demotivated, and almost giving up | 22:51 |
tuxd3v | apritzel saved the day :) | 22:52 |
c0rnelius | I'll try | 22:52 |
tuxd3v | he was like gandalf the white riding blazing fast in his white unicorn horse | 22:52 |
tuxd3v | c0rnelius, many thanks :) | 22:53 |
tuxd3v | that option will reduce a lot the time needed to probbe uarts, and that will mean no more timeouts on the bluetooth :) | 22:53 |
tuxd3v | it works on emmc it works on sdcard, it works on reboot and on cold boot too | 22:55 |
tuxd3v | works always now :) | 22:55 |
tuxd3v | root | 22:55 |
tuxd3v | ups | 22:56 |
tuxd3v | well devuan has 1 more image preping to come out :) | 22:58 |
c0rnelius | tuxd3v: This is already in my allwinner defconfig | 23:00 |
tuxd3v | activated? | 23:01 |
c0rnelius | yeah its all enabled | 23:01 |
tuxd3v | can you share your dtb? | 23:01 |
tuxd3v | sorry dts | 23:02 |
c0rnelius | I see an extended option for it thats not enabled? | 23:03 |
tuxd3v | CONFIG_SERIAL_8250_16550A_VARIANTS=y | 23:04 |
c0rnelius | Yes, thats already enabled | 23:04 |
tuxd3v | use this bluetooth def_config: https://paste.debian.net/hidden/a05d8786/ | 23:05 |
tuxd3v | you are testing in the NEO plus2? | 23:06 |
c0rnelius | Well currently loading the defconfig which I use for both boards and yes I gots that enabled and all that and more :) | 23:07 |
c0rnelius | I'm pretty sure on the NEO side I'm missing something in the DTS. | 23:08 |
tuxd3v | show me the dts on the NEO, maybe I can help :) | 23:08 |
c0rnelius | this is the default | 23:11 |
c0rnelius | https://pastebin.com/Sqne936w | 23:12 |
c0rnelius | this 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.patch | 23:12 |
c0rnelius | I stopped adding the bluetooth patch I was messing with cuz it made the board unstable | 23:12 |
tuxd3v | what is the uart you are using for bluetooth on NEO? | 23:13 |
tuxd3v | uart3? | 23:13 |
c0rnelius | According to the old vendor kernel its suppose to be 3 | 23:14 |
c0rnelius | But when I used the patch and enabled it the board would hang during boot sometimes. | 23:15 |
c0rnelius | and considering I use to run weechat, that wasn't gonna work for me :) | 23:15 |
c0rnelius | use it* | 23:16 |
tuxd3v | ok, I got the datasheet its uart3 indeed, I will prepare that section :) | 23:18 |
c0rnelius | this was pulled out of the vendor kernel - https://github.com/pyavitz/debian-image-builder/blob/feature/patches/allwinner/nanopi/nano_pi_neo_plus2_bluetooth.disable | 23:19 |
c0rnelius | Unfortunately it only kind of works. As I was saying... In mainline anyway. | 23:20 |
tuxd3v | something like this: https://paste.debian.net/hidden/99a14d88/ | 23:32 |
tuxd3v | I added aliases for the mmc devices | 23:33 |
tuxd3v | aliases for uart3 | 23:33 |
tuxd3v | added uart3, which seems to be the same has neo Air, about pinouts configurations | 23:33 |
tuxd3v | added rfkill | 23:34 |
tuxd3v | and improved the wifi poer sequence.. | 23:34 |
tuxd3v | power | 23:34 |
tuxd3v | you can add other things.. | 23:34 |
c0rnelius | I 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 |
tuxd3v | but with that uart3 config, rfkill, and such you should now get bluetooth out of the box | 23:34 |
c0rnelius | Thanx | 23:34 |
tuxd3v | you welcome | 23:35 |
tuxd3v | that way to configure bluetooth doesn't need any script to help configure it on the rootfs side, it just works | 23:35 |
tuxd3v | :) | 23:35 |
tuxd3v | but for that to just work, CONFIG_SERIAL_8250_16550A_VARIANTS=y was needed :) | 23:36 |
c0rnelius | Well we shall find out :) When I wake up a bit more I'll give it the old college try. | 23:36 |
tuxd3v | I 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 |
c0rnelius | they should be the same | 23:37 |
tuxd3v | yup | 23:37 |
c0rnelius | all those older neos are the same i thinks | 23:37 |
c0rnelius | h3/h5 | 23:37 |
tuxd3v | I 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 |
tuxd3v | you just need to have the firmware patch in /lib/firmware/brcm, and that's it :) | 23:39 |
c0rnelius | k, koool. | 23:40 |
tuxd3v | basically its the same armbian have done in that patch that you sent me :) | 23:43 |
tuxd3v | but 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/!