I've found this PR for RPi - > https://github.com/raspberrypi/linux/pull/4832 <- and i may attempt to port it to kernel 5.15.y, but i wonder if anything else is required on LibreELEC to "just work" or it may require some other userland stuff (considering that LibreELEC is a slimmed down OS).
Am asking mostly because i merged that on LE10 (5.10.y)and did a quick test, but unfortunately it didn't worked out of the box, meaning that fstrim only worked after tinkering with udev rules.