VLANs are already possible on Layer 2 switches. And it's a good idea to use separate VLANs, one for phones and another one for computers, because of
Here's a small example like it might be done for instance on a good old 2650 switch with, let's say, IOS 12.1.
Enter global configuration mode:
If you add a VLAN to a switch, ensure that it's in server or transparent mode:
vtp mode transparent
Now create a VLAN:
And the phone VLAN:
Now you may assign VLANs to ports, for example:
interface range fastEthernet 0/16 - 22
switchport access vlan 5
Check your VLAN configuration:
It should show:
5 VOIP active Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22
On various switches and IOS versions it might be different, but this may give a start.