Chile's state-owned Codelco and SQM are close to reaching a final agreement on the joint development of lithium mines.