NXP T1040 and T1020 SoC have an 8-port gigabit Ethernet switch integrated on the device.
QorIQ SDK includes an L2 Switch user space driver and a small demo application that uses the API provided by the switch driver. The L2Switch demo application is useful to configure switch in T1040.
Attached document include steps modify the source code and add command to access switch registers, read or write, in SDK1.9. Before doing this, SDK1.9 needs to be installed and useable. In the SDK manual, there are description about how to install the SDK, how to prepare host environment and how to setup poky for specific target.