Chinese tech firm Xiaomi to invest $6.9B to develop homegrown chips