User:Knuxify/FSA9485
This is a work-in-progress rough list of differences between the FSA9485 and FSA9480 drivers.
Currently the only difference between the two seems to be the addition of support for Samsung's proprietary docks, plus loads of weirdly verbose related code which makes the file go from the original ~500 lines from the fsa9480 to a whopping ~2500.
TODO: Seems like the FSA9485 may actually be a completely different chip. |
Device types
The FSA9485 adds support for a few device types:
#if defined(CONFIG_USB_OTG_AUDIODOCK)
#define DEV_AUDIODOCK (1 << 8)
#endif
#define DEV_SMARTDOCK (1 << 7)
The smart dock and audio dock are accessories from Samsung. (Sidenote: it probably makes no sense to mainline these.)
/* Manual Switch */
#define SW_VAUDIO ((4 << 5) | (4 << 2) | (1 << 1) | (1 << 0))
#define SW_UART ((3 << 5) | (3 << 2)) /* same as fsa9480 */
#define SW_AUDIO ((2 << 5) | (2 << 2) | (1 << 1) | (1 << 0))
#define SW_DHOST ((1 << 5) | (1 << 2) | (1 << 1) | (1 << 0))
#define SW_AUTO ((0 << 5) | (0 << 2)) /* same as fsa9480 */
#define SW_USB_OPEN (1 << 0)
#define SW_ALL_OPEN (0)
Extra ADC stuff
Mostly seems to be related to the audio dock.
#define ADC_GND 0x00
#define ADC_MHL 0x01
#define ADC_DOCK_PREV_KEY 0x04
#define ADC_DOCK_NEXT_KEY 0x07
#define ADC_DOCK_VOL_DN 0x0a
#define ADC_DOCK_VOL_UP 0x0b
#define ADC_DOCK_PLAY_PAUSE_KEY 0x0d
#define ADC_AUDIO_DOCK 0x12
#define ADC_CEA936ATYPE1_CHG 0x17
#define ADC_JIG_USB_OFF 0x18
#define ADC_JIG_USB_ON 0x19
#define ADC_DESKDOCK 0x1a
#define ADC_CEA936ATYPE2_CHG 0x1b
#define ADC_JIG_UART_OFF 0x1c
#define ADC_JIG_UART_ON 0x1d
#define ADC_CARDOCK 0x1d
#define ADC_OPEN 0x1f
vbus
TODO: What is it exactly? |
The following can be found under Device Type 2:
#define VBUS_VALID (1 << 1)
I2C registers
The FSA9485 driver adds two new registers:
#define FSA9485_REG_RESERVED_1D 0x1D
#define FSA9485_REG_RESERVED_20 0x20
FSA9485_REG_RESERVED_1D
is used for some kind of vbus, while FSA9485_REG_RESERVED_20
is used for the desk dock.