Ip phone directly connect to switch and pc connected to ip phone but i want to different ip address both device how to configure?

ip phone directly connect to switch and pc connected to ip phone but i want to different ip address both device how to configure ?

Create two vlans
Data vlan like with subnet like 172.16.x.x and Voice vlan with 172.17.x.x

i create two vlan in access switch and dhcp pool done on router for vlan voice and data but not to pass traffic pls share me in details.