In most cases, if you just ignore the WAN port and connect the upstream router to one of the LAN port you would effectively be using the device as a switch.
You will likely want to disable DHCP on the device if you have the upstream router handling DHCP, and will of course want to set the IP address of the device's LAN side in the main router's network (e.g. 192.168.1.2 if the main router is 192.168.1.1).
To set that up, before connecting the two devices together, set your PC IP to a static IP (e.g. 192.168.1.10), connect to OpenWrt device and open http://192.168.1.1/cgi-bin/luci/admin/network/network/lan set the LAN IP of the router to 192.168.1.2 and disable DHCP.
Then you can connect the two devices together and reset your PC IP to automatic.
That should be the minimum configuration you need to have the devices connected as a switch.
When you are hapoy with the setup, you can look into disabling services and/or interfaces you don't need.