TOKYO (Reuters) - Toshiba Corp and Western Digital Corp have agreed in principle to settle a dispute over the Japanese firm's plans to sell its $18 billion chip unit and aim to have a final agreement in place next week, sources familiar with the matter said.