Check out also the Spanish expedition to Borneo, South-East Asian muslim states supported by the Ottoman Empire (including soldiers from India and East Africa) vs the Spanish (which also included soldiers from Mexico and South East Asia)
This would be really cool if it happened.
Unfortunately, it didn’t.
To elaborate, Cayagan was a pirate outpost at the farthest north of the Philippines that the Spanish decided was a thorn on their side for their colonial endeavours, so what they did was send local militias to deal with the problem and these were the “battles”.
They weren’t glorious battles between the unbeatable Tercios of Spain vs the Honourable Samurai of Japan, there weren’t any Daimyos involved, it was mostly Wokou Pirates (you know, like the treasure guardians) plus the odd outlaw from China, the Philippines themselves, etc.
They were conflicts between local filipino militias + the odd spanish officer against, well, pirates. Of course no native americans were involved here.
Storeyed Plate brought up the Castilian war, and that’s where most of the misconceptions about this conflict come from. The Castilian war was an actual honest to goodness war, as the Spanish were trying to play crusader in Southeast Asia, so they came in conflict with the Sultanate of Brunei which, in turn, asked and got help from the Ottoman Empire, seeing as the war was escalating, the Spanish did request reinforcements from the Americas, namely, this is where Tlaxcalan (Inca too) soldiers were brought to the Philippines and eventually Brunei to aid in the war effort. But this is a completely different situation and no japanese were involved (except for the odd mercenary that very well might have been involved, there was a window of time between Tokugawa unifying Japan and the start of the Country in Chains where there were Japanese mercenaries all over Southeast Asi.)