It looks that you are getting too much air in if both banks are lean.
Bank 1 is cylinders 1 to 3 and bank 2 is cylinders 4 to 6 on M54 engines.
Look for vacuum leaks.
There are capped off vacuum ports at the back of the manifold. One of the caps had fallen off on my 530 and this caused lean codes to come up.
It could also be cracked vacuum hoses or intake boots.

I found it by removing maf and cable tied a rubber glove over intake boot. Then I disconnected one of the vacuum hoses going to F connector on the intake boot and got friend of mine who smokes to blow smoke in from the F connector.
Smoke was coming out at the back of the manifold.
After replacing the cap, he was able to inflate the rubber glove by blowing in the F connector.
Proper ghetto method of finding vacuum leak, but it worked.