In recent years, reconfigurable intelligent surface (RIS) has emerged as an appealing technology due to its potential capability to enhance the performance of wireless networks with a low-cost and low energy-consumption. Most works often assume continuous phase-shits at the RIS elements for the transmit and passive beamforming optimization. However, practical hardware limitations often impose a reduced number of available phase shifts at the RIS elements which can lead to substantial performance loss. Therefore, to harvest the gains of RIS-assisted multi-stream multiple-input multiple-output (MIMO) communications under the constraint of discrete-valued phases shifts, this correspondence proposes an iterative algorithm that can efficiently tackle the mixed integer non-linear optimization problem associated to the maximization of the achievable rate over the transmit precoder and RIS elements. Simulation results demonstrate that the proposed design can be very effective, especially when using low-resolution phase-shifts.