On the weight distribution of some minimal codes