I have same ssid on both 2.4ghz and 5ghz and I see all client prefer 2.4ghz. I have the asus rt-ac51u. On newer routers Asus have an option to make the 5ghz network preferred.
Does OpenWrt have this function?
No, it does not. If you really want this then you can either use two dedicated SSID’s or use MAC filter to block some devices from connecting to 2.4GHz.
Having said that, I switched back to using a single SSID for both bands a few years ago, because all clients now themselves prefer 5GHz if the signal is strong enough. I find it way easier to manage things his way.
I am sitting 2m away from the router and all devices uses 2.4ghz. So strange.
What happens when you disconnect the device and reconnect? If a device was far away and connected to the AP at 2GHz it will NOT automatically reconnect to 5GHz on its own. It does go from 5 to 2 if moving away though, but not the other way around.
Digging through the forum, I saw a post mentioning that it could be done, if one wanted.
Here are two working solutions to optimize client steering...
If using the same SSID the client will decide whether it uses the 2.4 or 5 GHz band. There are bad clients there, but most laptops / phones will prefer the client with the best signal strength. I suspect you played with the transmission power but that's just an educated guess. It's a general misconception that a high transmission power equals to better coverage or throughput speeds. It will hurt performance instead, especially when we talk about the 2.4 GHz band.
So if your client always prefer 2.4 over 5 that means you haven't optimized your WiFi settings correctly. I always recommend a high transmission power for 5 GHz and a low to medium transmission power for 2.4 GHz. What works best is dependent on your situation. See this post I posted some weeks ago.
// I accidentally quoted Juppin but this reply was for OP. Anyway, proper optimization preceeds using 802.11v imho.