Yes, Toyota and BMW are working together on some project, since many years ...
The first Mini (owned by BMW) diesel version had a Toyota motor, the same as the Yaris Diesel.
When the Diesel starts to fade in popularity in EU, and regulation became harder, Toyota didn't introduce new diesel engine. (exept for the Land Cruiser and Hilux)
Instead, they've picked some 2.0 and 1.6 inline 4 from BMW, 112 and 143 hp. You can find them in Avensis, Auris, RAV4 ...
Now, everybody's know that the new Supra is a BMW Z4 clone