How do you know it has oil pressure?
If your scanner reads psi than the problem is the harness or the stepper
I swapped the gauge cluster with another truck I have here doing a motor in and I have the same results no oil pressure readingI was thinking gauge cluster also...
I had a pack rat take a nap in my engine bay last year and bit through my harness which in turn threw p0522, so I had to solder it back together. Never found the rat though