162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Driver for the Auvitek USB bridge 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2008 Steven Toth <stoth@linuxtv.org> 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci/* We'll start to rename these registers once we have a better 962306a36Sopenharmony_ci * understanding of their meaning. 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci#define REG_000 0x000 1262306a36Sopenharmony_ci#define REG_001 0x001 1362306a36Sopenharmony_ci#define REG_002 0x002 1462306a36Sopenharmony_ci#define REG_003 0x003 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define AU0828_SENSORCTRL_100 0x100 1762306a36Sopenharmony_ci#define AU0828_SENSORCTRL_VBI_103 0x103 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* I2C registers */ 2062306a36Sopenharmony_ci#define AU0828_I2C_TRIGGER_200 0x200 2162306a36Sopenharmony_ci#define AU0828_I2C_STATUS_201 0x201 2262306a36Sopenharmony_ci#define AU0828_I2C_CLK_DIVIDER_202 0x202 2362306a36Sopenharmony_ci#define AU0828_I2C_DEST_ADDR_203 0x203 2462306a36Sopenharmony_ci#define AU0828_I2C_WRITE_FIFO_205 0x205 2562306a36Sopenharmony_ci#define AU0828_I2C_READ_FIFO_209 0x209 2662306a36Sopenharmony_ci#define AU0828_I2C_MULTIBYTE_MODE_2FF 0x2ff 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* Audio registers */ 2962306a36Sopenharmony_ci#define AU0828_AUDIOCTRL_50C 0x50C 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#define REG_600 0x600 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci/*********************************************************************/ 3462306a36Sopenharmony_ci/* Here are constants for values associated with the above registers */ 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci/* I2C Trigger (Reg 0x200) */ 3762306a36Sopenharmony_ci#define AU0828_I2C_TRIGGER_WRITE 0x01 3862306a36Sopenharmony_ci#define AU0828_I2C_TRIGGER_READ 0x20 3962306a36Sopenharmony_ci#define AU0828_I2C_TRIGGER_HOLD 0x40 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/* I2C Status (Reg 0x201) */ 4262306a36Sopenharmony_ci#define AU0828_I2C_STATUS_READ_DONE 0x01 4362306a36Sopenharmony_ci#define AU0828_I2C_STATUS_NO_READ_ACK 0x02 4462306a36Sopenharmony_ci#define AU0828_I2C_STATUS_WRITE_DONE 0x04 4562306a36Sopenharmony_ci#define AU0828_I2C_STATUS_NO_WRITE_ACK 0x08 4662306a36Sopenharmony_ci#define AU0828_I2C_STATUS_BUSY 0x10 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci/* I2C Clock Divider (Reg 0x202) */ 4962306a36Sopenharmony_ci#define AU0828_I2C_CLK_250KHZ 0x07 5062306a36Sopenharmony_ci#define AU0828_I2C_CLK_100KHZ 0x14 5162306a36Sopenharmony_ci#define AU0828_I2C_CLK_30KHZ 0x40 5262306a36Sopenharmony_ci#define AU0828_I2C_CLK_20KHZ 0x60 53