Toeplitz matrices commuting with tridiagonal matrices