I have been trying to setup OpenWRT (using the ext4-factory image) on a Pi 4B with an additional RS-485 HAT https://www.waveshare.com/wiki/RS485_CAN_HAT_(B)#RS485 but the RS-485 serial devices never show up. ttySC0 & ttySC1.
Adding the following (as per Waveshare) to the '/boot/config.txt' it never loads the overlays on boot.
dtparam=spi=on
dtoverlay=sc16is752-spi1,int_pin=24
I have confirmed that the overlay file is on the system, but looking at dmesg it never loads.
I have confirmed the RS-485 card works by also loading Raspbian OS and following the same modification to the '/boot/config.txt' it loads properly.
I am at a loss as to why its not working.
As it works on the Raspbian OS i am guessing its something in OpenWRT that is missing, but i am stumped as to why as the driver is in the overlay folder.
This alone won't do anything... you need the driver for the RS485 chip itself. But I don't see any packages for the SC16IS752 device family in the OpenWrt repo. You'll probably have to build it yourself. Or, use a different device entirely.
You may find it easier to get a USB-to-RS485 system running. They're quite common, and you can even use many USB-to-DMX adapters (the lighting standard) since DMX is simply a protocol on top of the RS485 signaling standard.