Imagine a symbiotic relationship where each party depends on the other, but they are continually fighting and you’ll have a good picture of Apple and Samsung. The latest episode in the ultimate case of frenemies happened Tuesday as the South Korean chip giant pledged nearly $4 billion to upgrade a plant producing chips for Apple’s iPhone and iPad.

Samsung said it will plunk down around $4 billion to renovate the Austin, Texas plant in order to boost production of ARM-based chips, many used in Apple’s iPhone, iPad and other consumer technology, Reuters reports today. This after Samsung  just unveiled plans to build in South Korea a new $1.98 billion logic chip plant for Apple and other smartphone makers…

Don’t let the courtroom fight between Samsung and Apple confuse you. In the world of multinational, multi-interest tech corporations, the right hand may despise what the left hand is doing — but still profit from its competitor. Although Samsung’s Galaxy tablet and smartphone are engaged in trench warfare with the iPad and iPhone, the company’s chip division is widely believed to be Apple’s largest supplier.

There have been some hints Apple wants to extricate itself from this odd relationship. In 2011, the iPhone maker reportedly inked a pact with the Taiwan Semiconductor Manufacturing Company to supply ARM chips. Samsung’s ARM chip comprises more than 12 percent of what Apple pays to build an iPhone, according to researchers at IHS Suppli.