Johnny Depp is to donate $1 million of his settlement from his defamation case against Amber Heard to charity.