Despite the age of this post, I Dealing with the same issue After replacing All the timing components in my 04 4Runner V6(1GRFE). So far, I have already Pulled the VVT-I solenoid and bench tested it with my multimeter as well as a 12 V battery pack to make sure the valve was opening and closing and it was, The resistance reading checked out. I have also checked the filter screen for the solenoid and it was clean.
So my next step now is to take off the valve cover And recheck the timing, which I know for a fact is correct After Triple checking everything before re-assembly.
I was doing some research on the cam Actuator itself , And From what I’ve read, there is a lock pin inside of the actuator that Can sometimes lock either in the Wrong position(Retarded or advanced) And if that happens, the VVT-I System will not function properly, causing a misfire and a check engine light. So that’s where I am at with this P0012 code and will update this post if I fix the issue!