xref: /openbmc/u-boot/doc/README.VSC3316-3308 (revision 3e4d27b06d7484040355e22eec2cbce7335d6dab)
1*aa42cb71SShaveta LeekhaThis file contains API information of the initialization code written for
2*aa42cb71SShaveta LeekhaVitesse cross-point devices, VSC3316 and VSC3308 for board B4860QDS
3*aa42cb71SShaveta Leekha
4*aa42cb71SShaveta LeekhaAuthor: Shaveta Leekha <shaveta@freescale.com>
5*aa42cb71SShaveta Leekha
6*aa42cb71SShaveta LeekhaAbout Device:
7*aa42cb71SShaveta Leekha=============
8*aa42cb71SShaveta LeekhaVSC 3316/3308 is a low-power, low-cost asynchronous crosspoint switch capable of data rates upto 11.5Gbps.
9*aa42cb71SShaveta Leekha
10*aa42cb71SShaveta LeekhaVSC3316 has 16 input and 16 output ports whereas VSC3308 has 8 input and 8 output ports. Programming of these devices are performed by two-wire or four-wire serial interface.
11*aa42cb71SShaveta Leekha
12*aa42cb71SShaveta LeekhaInitialization:
13*aa42cb71SShaveta Leekha===============
14*aa42cb71SShaveta LeekhaOn reset, VSC devices are in low-power state with all inputs, outputs and connections in an off state.
15*aa42cb71SShaveta LeekhaFirst thing required is to program it to interface with either two-wire or four-wire interface.
16*aa42cb71SShaveta LeekhaIn our case the interface is two-wire I2C serial interface. So the value in Interface mode register at address 79.h to be written is 0x02 for two-wire interface. Also for crosspoint connections to be activated, 01.h value need to be written in 75.h (core configuration register).
17*aa42cb71SShaveta Leekha
18*aa42cb71SShaveta LeekhaAPI Overview:
19*aa42cb71SShaveta Leekha=============
20*aa42cb71SShaveta Leekha
21*aa42cb71SShaveta Leekha	vsc_if_enable(u8 vsc_addr):
22*aa42cb71SShaveta Leekha	--------------------------
23*aa42cb71SShaveta Leekha		This API programs VSC to interface with either two-wire or four-wire interface. In our case the interface is two-wire I2C serial interface. So the value in Interface mode register at address 79.h to be written is 0x02 for two-wire interface.
24*aa42cb71SShaveta Leekha	Parameters:
25*aa42cb71SShaveta Leekha		vsc_addr - Address of the VSC device on board.
26*aa42cb71SShaveta Leekha
27*aa42cb71SShaveta Leekha
28*aa42cb71SShaveta Leekha	vsc3316_config(u8 vsc_addr, int con_arr[][2], u8 num_con):
29*aa42cb71SShaveta Leekha	---------------------------------------------------------
30*aa42cb71SShaveta Leekha	This API configures the VSC3316 device for required connections. Connection through the VSC device requires the inputs and outputs to be properly configured.
31*aa42cb71SShaveta Leekha	Connection registers are on page 00. It Configures the selected input and output correctly and join them to make a connection. It also program Input state register, Global input ISE, Global input LOS, Global core control, Output mode register and core control registers etc.
32*aa42cb71SShaveta Leekha	vsc3308_config(u8 vsc_addr, int con_arr[][2], u8 num_con) does the essential configurations for VSC3308.
33*aa42cb71SShaveta Leekha
34*aa42cb71SShaveta Leekha	Parameters:
35*aa42cb71SShaveta Leekha		vsc_addr - Address of the VSC device on board.
36*aa42cb71SShaveta Leekha		con_arr - connection array
37*aa42cb71SShaveta Leekha		num_con - number of connections to be configured
38*aa42cb71SShaveta Leekha
39*aa42cb71SShaveta Leekha	vsc_wp_config(u8 vsc_addr):
40*aa42cb71SShaveta Leekha	--------------------------
41*aa42cb71SShaveta Leekha		For crosspoint connections to be activated, 01.h value need to be written in 75.h (core configuration register), which is done by this API.
42*aa42cb71SShaveta Leekha	Parameters:
43*aa42cb71SShaveta Leekha		vsc_addr - Address of the VSC device on board.
44