18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * see notice in hfc_multi.c 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_FIFO 0x00010000 78c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_CRC 0x00020000 88c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_INIT 0x00040000 98c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_PLXSD 0x00080000 108c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_MODE 0x00100000 118c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_MSG 0x00200000 128c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_STATE 0x00400000 138c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_FILL 0x00800000 148c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_SYNC 0x01000000 158c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_DTMF 0x02000000 168c2ecf20Sopenharmony_ci#define DEBUG_HFCMULTI_LOCK 0x80000000 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define PCI_ENA_REGIO 0x01 198c2ecf20Sopenharmony_ci#define PCI_ENA_MEMIO 0x02 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define XHFC_IRQ 4 /* SIU_IRQ2 */ 228c2ecf20Sopenharmony_ci#define XHFC_MEMBASE 0xFE000000 238c2ecf20Sopenharmony_ci#define XHFC_MEMSIZE 0x00001000 248c2ecf20Sopenharmony_ci#define XHFC_OFFSET 0x00001000 258c2ecf20Sopenharmony_ci#define PA_XHFC_A0 0x0020 /* PA10 */ 268c2ecf20Sopenharmony_ci#define PB_XHFC_IRQ1 0x00000100 /* PB23 */ 278c2ecf20Sopenharmony_ci#define PB_XHFC_IRQ2 0x00000200 /* PB22 */ 288c2ecf20Sopenharmony_ci#define PB_XHFC_IRQ3 0x00000400 /* PB21 */ 298c2ecf20Sopenharmony_ci#define PB_XHFC_IRQ4 0x00000800 /* PB20 */ 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/* 328c2ecf20Sopenharmony_ci * NOTE: some registers are assigned multiple times due to different modes 338c2ecf20Sopenharmony_ci * also registers are assigned differen for HFC-4s/8s and HFC-E1 348c2ecf20Sopenharmony_ci */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* 378c2ecf20Sopenharmony_ci #define MAX_FRAME_SIZE 2048 388c2ecf20Sopenharmony_ci*/ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cistruct hfc_chan { 418c2ecf20Sopenharmony_ci struct dchannel *dch; /* link if channel is a D-channel */ 428c2ecf20Sopenharmony_ci struct bchannel *bch; /* link if channel is a B-channel */ 438c2ecf20Sopenharmony_ci int port; /* the interface port this */ 448c2ecf20Sopenharmony_ci /* channel is associated with */ 458c2ecf20Sopenharmony_ci int nt_timer; /* -1 if off, 0 if elapsed, >0 if running */ 468c2ecf20Sopenharmony_ci int los, ais, slip_tx, slip_rx, rdi; /* current alarms */ 478c2ecf20Sopenharmony_ci int jitter; 488c2ecf20Sopenharmony_ci u_long cfg; /* port configuration */ 498c2ecf20Sopenharmony_ci int sync; /* sync state (used by E1) */ 508c2ecf20Sopenharmony_ci u_int protocol; /* current protocol */ 518c2ecf20Sopenharmony_ci int slot_tx; /* current pcm slot */ 528c2ecf20Sopenharmony_ci int bank_tx; /* current pcm bank */ 538c2ecf20Sopenharmony_ci int slot_rx; 548c2ecf20Sopenharmony_ci int bank_rx; 558c2ecf20Sopenharmony_ci int conf; /* conference setting of TX slot */ 568c2ecf20Sopenharmony_ci int txpending; /* if there is currently data in */ 578c2ecf20Sopenharmony_ci /* the FIFO 0=no, 1=yes, 2=splloop */ 588c2ecf20Sopenharmony_ci int Zfill; /* rx-fifo level on last hfcmulti_tx */ 598c2ecf20Sopenharmony_ci int rx_off; /* set to turn fifo receive off */ 608c2ecf20Sopenharmony_ci int coeff_count; /* curren coeff block */ 618c2ecf20Sopenharmony_ci s32 *coeff; /* memory pointer to 8 coeff blocks */ 628c2ecf20Sopenharmony_ci}; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_cistruct hfcm_hw { 668c2ecf20Sopenharmony_ci u_char r_ctrl; 678c2ecf20Sopenharmony_ci u_char r_irq_ctrl; 688c2ecf20Sopenharmony_ci u_char r_cirm; 698c2ecf20Sopenharmony_ci u_char r_ram_sz; 708c2ecf20Sopenharmony_ci u_char r_pcm_md0; 718c2ecf20Sopenharmony_ci u_char r_irqmsk_misc; 728c2ecf20Sopenharmony_ci u_char r_dtmf; 738c2ecf20Sopenharmony_ci u_char r_st_sync; 748c2ecf20Sopenharmony_ci u_char r_sci_msk; 758c2ecf20Sopenharmony_ci u_char r_tx0, r_tx1; 768c2ecf20Sopenharmony_ci u_char a_st_ctrl0[8]; 778c2ecf20Sopenharmony_ci u_char r_bert_wd_md; 788c2ecf20Sopenharmony_ci timer_t timer; 798c2ecf20Sopenharmony_ci}; 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci/* for each stack these flags are used (cfg) */ 838c2ecf20Sopenharmony_ci#define HFC_CFG_NONCAP_TX 1 /* S/T TX interface has less capacity */ 848c2ecf20Sopenharmony_ci#define HFC_CFG_DIS_ECHANNEL 2 /* disable E-channel processing */ 858c2ecf20Sopenharmony_ci#define HFC_CFG_REG_ECHANNEL 3 /* register E-channel */ 868c2ecf20Sopenharmony_ci#define HFC_CFG_OPTICAL 4 /* the E1 interface is optical */ 878c2ecf20Sopenharmony_ci#define HFC_CFG_REPORT_LOS 5 /* the card should report loss of signal */ 888c2ecf20Sopenharmony_ci#define HFC_CFG_REPORT_AIS 6 /* the card should report alarm ind. sign. */ 898c2ecf20Sopenharmony_ci#define HFC_CFG_REPORT_SLIP 7 /* the card should report bit slips */ 908c2ecf20Sopenharmony_ci#define HFC_CFG_REPORT_RDI 8 /* the card should report remote alarm */ 918c2ecf20Sopenharmony_ci#define HFC_CFG_DTMF 9 /* enable DTMF-detection */ 928c2ecf20Sopenharmony_ci#define HFC_CFG_CRC4 10 /* disable CRC-4 Multiframe mode, */ 938c2ecf20Sopenharmony_ci/* use double frame instead. */ 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci#define HFC_TYPE_E1 1 /* controller is HFC-E1 */ 968c2ecf20Sopenharmony_ci#define HFC_TYPE_4S 4 /* controller is HFC-4S */ 978c2ecf20Sopenharmony_ci#define HFC_TYPE_8S 8 /* controller is HFC-8S */ 988c2ecf20Sopenharmony_ci#define HFC_TYPE_XHFC 5 /* controller is XHFC */ 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci#define HFC_CHIP_EXRAM_128 0 /* external ram 128k */ 1018c2ecf20Sopenharmony_ci#define HFC_CHIP_EXRAM_512 1 /* external ram 256k */ 1028c2ecf20Sopenharmony_ci#define HFC_CHIP_REVISION0 2 /* old fifo handling */ 1038c2ecf20Sopenharmony_ci#define HFC_CHIP_PCM_SLAVE 3 /* PCM is slave */ 1048c2ecf20Sopenharmony_ci#define HFC_CHIP_PCM_MASTER 4 /* PCM is master */ 1058c2ecf20Sopenharmony_ci#define HFC_CHIP_RX_SYNC 5 /* disable pll sync for pcm */ 1068c2ecf20Sopenharmony_ci#define HFC_CHIP_DTMF 6 /* DTMF decoding is enabled */ 1078c2ecf20Sopenharmony_ci#define HFC_CHIP_CONF 7 /* conference handling is enabled */ 1088c2ecf20Sopenharmony_ci#define HFC_CHIP_ULAW 8 /* ULAW mode */ 1098c2ecf20Sopenharmony_ci#define HFC_CHIP_CLOCK2 9 /* double clock mode */ 1108c2ecf20Sopenharmony_ci#define HFC_CHIP_E1CLOCK_GET 10 /* always get clock from E1 interface */ 1118c2ecf20Sopenharmony_ci#define HFC_CHIP_E1CLOCK_PUT 11 /* always put clock from E1 interface */ 1128c2ecf20Sopenharmony_ci#define HFC_CHIP_WATCHDOG 12 /* whether we should send signals */ 1138c2ecf20Sopenharmony_ci/* to the watchdog */ 1148c2ecf20Sopenharmony_ci#define HFC_CHIP_B410P 13 /* whether we have a b410p with echocan in */ 1158c2ecf20Sopenharmony_ci/* hw */ 1168c2ecf20Sopenharmony_ci#define HFC_CHIP_PLXSD 14 /* whether we have a Speech-Design PLX */ 1178c2ecf20Sopenharmony_ci#define HFC_CHIP_EMBSD 15 /* whether we have a SD Embedded board */ 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#define HFC_IO_MODE_PCIMEM 0x00 /* normal memory mapped IO */ 1208c2ecf20Sopenharmony_ci#define HFC_IO_MODE_REGIO 0x01 /* PCI io access */ 1218c2ecf20Sopenharmony_ci#define HFC_IO_MODE_PLXSD 0x02 /* access HFC via PLX9030 */ 1228c2ecf20Sopenharmony_ci#define HFC_IO_MODE_EMBSD 0x03 /* direct access */ 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci/* table entry in the PCI devices list */ 1258c2ecf20Sopenharmony_cistruct hm_map { 1268c2ecf20Sopenharmony_ci char *vendor_name; 1278c2ecf20Sopenharmony_ci char *card_name; 1288c2ecf20Sopenharmony_ci int type; 1298c2ecf20Sopenharmony_ci int ports; 1308c2ecf20Sopenharmony_ci int clock2; 1318c2ecf20Sopenharmony_ci int leds; 1328c2ecf20Sopenharmony_ci int opticalsupport; 1338c2ecf20Sopenharmony_ci int dip_type; 1348c2ecf20Sopenharmony_ci int io_mode; 1358c2ecf20Sopenharmony_ci int irq; 1368c2ecf20Sopenharmony_ci}; 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_cistruct hfc_multi { 1398c2ecf20Sopenharmony_ci struct list_head list; 1408c2ecf20Sopenharmony_ci struct hm_map *mtyp; 1418c2ecf20Sopenharmony_ci int id; 1428c2ecf20Sopenharmony_ci int pcm; /* id of pcm bus */ 1438c2ecf20Sopenharmony_ci int ctype; /* controller type */ 1448c2ecf20Sopenharmony_ci int ports; 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci u_int irq; /* irq used by card */ 1478c2ecf20Sopenharmony_ci u_int irqcnt; 1488c2ecf20Sopenharmony_ci struct pci_dev *pci_dev; 1498c2ecf20Sopenharmony_ci int io_mode; /* selects mode */ 1508c2ecf20Sopenharmony_ci#ifdef HFC_REGISTER_DEBUG 1518c2ecf20Sopenharmony_ci void (*HFC_outb)(struct hfc_multi *hc, u_char reg, 1528c2ecf20Sopenharmony_ci u_char val, const char *function, int line); 1538c2ecf20Sopenharmony_ci void (*HFC_outb_nodebug)(struct hfc_multi *hc, u_char reg, 1548c2ecf20Sopenharmony_ci u_char val, const char *function, int line); 1558c2ecf20Sopenharmony_ci u_char (*HFC_inb)(struct hfc_multi *hc, u_char reg, 1568c2ecf20Sopenharmony_ci const char *function, int line); 1578c2ecf20Sopenharmony_ci u_char (*HFC_inb_nodebug)(struct hfc_multi *hc, u_char reg, 1588c2ecf20Sopenharmony_ci const char *function, int line); 1598c2ecf20Sopenharmony_ci u_short (*HFC_inw)(struct hfc_multi *hc, u_char reg, 1608c2ecf20Sopenharmony_ci const char *function, int line); 1618c2ecf20Sopenharmony_ci u_short (*HFC_inw_nodebug)(struct hfc_multi *hc, u_char reg, 1628c2ecf20Sopenharmony_ci const char *function, int line); 1638c2ecf20Sopenharmony_ci void (*HFC_wait)(struct hfc_multi *hc, 1648c2ecf20Sopenharmony_ci const char *function, int line); 1658c2ecf20Sopenharmony_ci void (*HFC_wait_nodebug)(struct hfc_multi *hc, 1668c2ecf20Sopenharmony_ci const char *function, int line); 1678c2ecf20Sopenharmony_ci#else 1688c2ecf20Sopenharmony_ci void (*HFC_outb)(struct hfc_multi *hc, u_char reg, 1698c2ecf20Sopenharmony_ci u_char val); 1708c2ecf20Sopenharmony_ci void (*HFC_outb_nodebug)(struct hfc_multi *hc, u_char reg, 1718c2ecf20Sopenharmony_ci u_char val); 1728c2ecf20Sopenharmony_ci u_char (*HFC_inb)(struct hfc_multi *hc, u_char reg); 1738c2ecf20Sopenharmony_ci u_char (*HFC_inb_nodebug)(struct hfc_multi *hc, u_char reg); 1748c2ecf20Sopenharmony_ci u_short (*HFC_inw)(struct hfc_multi *hc, u_char reg); 1758c2ecf20Sopenharmony_ci u_short (*HFC_inw_nodebug)(struct hfc_multi *hc, u_char reg); 1768c2ecf20Sopenharmony_ci void (*HFC_wait)(struct hfc_multi *hc); 1778c2ecf20Sopenharmony_ci void (*HFC_wait_nodebug)(struct hfc_multi *hc); 1788c2ecf20Sopenharmony_ci#endif 1798c2ecf20Sopenharmony_ci void (*read_fifo)(struct hfc_multi *hc, u_char *data, 1808c2ecf20Sopenharmony_ci int len); 1818c2ecf20Sopenharmony_ci void (*write_fifo)(struct hfc_multi *hc, u_char *data, 1828c2ecf20Sopenharmony_ci int len); 1838c2ecf20Sopenharmony_ci u_long pci_origmembase, plx_origmembase; 1848c2ecf20Sopenharmony_ci void __iomem *pci_membase; /* PCI memory */ 1858c2ecf20Sopenharmony_ci void __iomem *plx_membase; /* PLX memory */ 1868c2ecf20Sopenharmony_ci u_long xhfc_origmembase; 1878c2ecf20Sopenharmony_ci u_char *xhfc_membase; 1888c2ecf20Sopenharmony_ci u_long *xhfc_memaddr, *xhfc_memdata; 1898c2ecf20Sopenharmony_ci#ifdef CONFIG_MISDN_HFCMULTI_8xx 1908c2ecf20Sopenharmony_ci struct immap *immap; 1918c2ecf20Sopenharmony_ci#endif 1928c2ecf20Sopenharmony_ci u_long pb_irqmsk; /* Portbit mask to check the IRQ line */ 1938c2ecf20Sopenharmony_ci u_long pci_iobase; /* PCI IO */ 1948c2ecf20Sopenharmony_ci struct hfcm_hw hw; /* remember data of write-only-registers */ 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ci u_long chip; /* chip configuration */ 1978c2ecf20Sopenharmony_ci int masterclk; /* port that provides master clock -1=off */ 1988c2ecf20Sopenharmony_ci unsigned char silence;/* silence byte */ 1998c2ecf20Sopenharmony_ci unsigned char silence_data[128];/* silence block */ 2008c2ecf20Sopenharmony_ci int dtmf; /* flag that dtmf is currently in process */ 2018c2ecf20Sopenharmony_ci int Flen; /* F-buffer size */ 2028c2ecf20Sopenharmony_ci int Zlen; /* Z-buffer size (must be int for calculation)*/ 2038c2ecf20Sopenharmony_ci int max_trans; /* maximum transparent fifo fill */ 2048c2ecf20Sopenharmony_ci int Zmin; /* Z-buffer offset */ 2058c2ecf20Sopenharmony_ci int DTMFbase; /* base address of DTMF coefficients */ 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_ci u_int slots; /* number of PCM slots */ 2088c2ecf20Sopenharmony_ci u_int leds; /* type of leds */ 2098c2ecf20Sopenharmony_ci u_long ledstate; /* save last state of leds */ 2108c2ecf20Sopenharmony_ci int opticalsupport; /* has the e1 board */ 2118c2ecf20Sopenharmony_ci /* an optical Interface */ 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ci u_int bmask[32]; /* bitmask of bchannels for port */ 2148c2ecf20Sopenharmony_ci u_char dnum[32]; /* array of used dchannel numbers for port */ 2158c2ecf20Sopenharmony_ci u_char created[32]; /* what port is created */ 2168c2ecf20Sopenharmony_ci u_int activity_tx; /* if there is data TX / RX */ 2178c2ecf20Sopenharmony_ci u_int activity_rx; /* bitmask according to port number */ 2188c2ecf20Sopenharmony_ci /* (will be cleared after */ 2198c2ecf20Sopenharmony_ci /* showing led-states) */ 2208c2ecf20Sopenharmony_ci u_int flash[8]; /* counter for flashing 8 leds on activity */ 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci u_long wdcount; /* every 500 ms we need to */ 2238c2ecf20Sopenharmony_ci /* send the watchdog a signal */ 2248c2ecf20Sopenharmony_ci u_char wdbyte; /* watchdog toggle byte */ 2258c2ecf20Sopenharmony_ci int e1_state; /* keep track of last state */ 2268c2ecf20Sopenharmony_ci int e1_getclock; /* if sync is retrieved from interface */ 2278c2ecf20Sopenharmony_ci int syncronized; /* keep track of existing sync interface */ 2288c2ecf20Sopenharmony_ci int e1_resync; /* resync jobs */ 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci spinlock_t lock; /* the lock */ 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci struct mISDNclock *iclock; /* isdn clock support */ 2338c2ecf20Sopenharmony_ci int iclock_on; 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci /* 2368c2ecf20Sopenharmony_ci * the channel index is counted from 0, regardless where the channel 2378c2ecf20Sopenharmony_ci * is located on the hfc-channel. 2388c2ecf20Sopenharmony_ci * the bch->channel is equvalent to the hfc-channel 2398c2ecf20Sopenharmony_ci */ 2408c2ecf20Sopenharmony_ci struct hfc_chan chan[32]; 2418c2ecf20Sopenharmony_ci signed char slot_owner[256]; /* owner channel of slot */ 2428c2ecf20Sopenharmony_ci}; 2438c2ecf20Sopenharmony_ci 2448c2ecf20Sopenharmony_ci/* PLX GPIOs */ 2458c2ecf20Sopenharmony_ci#define PLX_GPIO4_DIR_BIT 13 2468c2ecf20Sopenharmony_ci#define PLX_GPIO4_BIT 14 2478c2ecf20Sopenharmony_ci#define PLX_GPIO5_DIR_BIT 16 2488c2ecf20Sopenharmony_ci#define PLX_GPIO5_BIT 17 2498c2ecf20Sopenharmony_ci#define PLX_GPIO6_DIR_BIT 19 2508c2ecf20Sopenharmony_ci#define PLX_GPIO6_BIT 20 2518c2ecf20Sopenharmony_ci#define PLX_GPIO7_DIR_BIT 22 2528c2ecf20Sopenharmony_ci#define PLX_GPIO7_BIT 23 2538c2ecf20Sopenharmony_ci#define PLX_GPIO8_DIR_BIT 25 2548c2ecf20Sopenharmony_ci#define PLX_GPIO8_BIT 26 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci#define PLX_GPIO4 (1 << PLX_GPIO4_BIT) 2578c2ecf20Sopenharmony_ci#define PLX_GPIO5 (1 << PLX_GPIO5_BIT) 2588c2ecf20Sopenharmony_ci#define PLX_GPIO6 (1 << PLX_GPIO6_BIT) 2598c2ecf20Sopenharmony_ci#define PLX_GPIO7 (1 << PLX_GPIO7_BIT) 2608c2ecf20Sopenharmony_ci#define PLX_GPIO8 (1 << PLX_GPIO8_BIT) 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci#define PLX_GPIO4_DIR (1 << PLX_GPIO4_DIR_BIT) 2638c2ecf20Sopenharmony_ci#define PLX_GPIO5_DIR (1 << PLX_GPIO5_DIR_BIT) 2648c2ecf20Sopenharmony_ci#define PLX_GPIO6_DIR (1 << PLX_GPIO6_DIR_BIT) 2658c2ecf20Sopenharmony_ci#define PLX_GPIO7_DIR (1 << PLX_GPIO7_DIR_BIT) 2668c2ecf20Sopenharmony_ci#define PLX_GPIO8_DIR (1 << PLX_GPIO8_DIR_BIT) 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci#define PLX_TERM_ON PLX_GPIO7 2698c2ecf20Sopenharmony_ci#define PLX_SLAVE_EN_N PLX_GPIO5 2708c2ecf20Sopenharmony_ci#define PLX_MASTER_EN PLX_GPIO6 2718c2ecf20Sopenharmony_ci#define PLX_SYNC_O_EN PLX_GPIO4 2728c2ecf20Sopenharmony_ci#define PLX_DSP_RES_N PLX_GPIO8 2738c2ecf20Sopenharmony_ci/* GPIO4..8 Enable & Set to OUT, SLAVE_EN_N = 1 */ 2748c2ecf20Sopenharmony_ci#define PLX_GPIOC_INIT (PLX_GPIO4_DIR | PLX_GPIO5_DIR | PLX_GPIO6_DIR \ 2758c2ecf20Sopenharmony_ci | PLX_GPIO7_DIR | PLX_GPIO8_DIR | PLX_SLAVE_EN_N) 2768c2ecf20Sopenharmony_ci 2778c2ecf20Sopenharmony_ci/* PLX Interrupt Control/STATUS */ 2788c2ecf20Sopenharmony_ci#define PLX_INTCSR_LINTI1_ENABLE 0x01 2798c2ecf20Sopenharmony_ci#define PLX_INTCSR_LINTI1_STATUS 0x04 2808c2ecf20Sopenharmony_ci#define PLX_INTCSR_LINTI2_ENABLE 0x08 2818c2ecf20Sopenharmony_ci#define PLX_INTCSR_LINTI2_STATUS 0x20 2828c2ecf20Sopenharmony_ci#define PLX_INTCSR_PCIINT_ENABLE 0x40 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci/* PLX Registers */ 2858c2ecf20Sopenharmony_ci#define PLX_INTCSR 0x4c 2868c2ecf20Sopenharmony_ci#define PLX_CNTRL 0x50 2878c2ecf20Sopenharmony_ci#define PLX_GPIOC 0x54 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ci/* 2918c2ecf20Sopenharmony_ci * REGISTER SETTING FOR HFC-4S/8S AND HFC-E1 2928c2ecf20Sopenharmony_ci */ 2938c2ecf20Sopenharmony_ci 2948c2ecf20Sopenharmony_ci/* write only registers */ 2958c2ecf20Sopenharmony_ci#define R_CIRM 0x00 2968c2ecf20Sopenharmony_ci#define R_CTRL 0x01 2978c2ecf20Sopenharmony_ci#define R_BRG_PCM_CFG 0x02 2988c2ecf20Sopenharmony_ci#define R_RAM_ADDR0 0x08 2998c2ecf20Sopenharmony_ci#define R_RAM_ADDR1 0x09 3008c2ecf20Sopenharmony_ci#define R_RAM_ADDR2 0x0A 3018c2ecf20Sopenharmony_ci#define R_FIRST_FIFO 0x0B 3028c2ecf20Sopenharmony_ci#define R_RAM_SZ 0x0C 3038c2ecf20Sopenharmony_ci#define R_FIFO_MD 0x0D 3048c2ecf20Sopenharmony_ci#define R_INC_RES_FIFO 0x0E 3058c2ecf20Sopenharmony_ci#define R_FSM_IDX 0x0F 3068c2ecf20Sopenharmony_ci#define R_FIFO 0x0F 3078c2ecf20Sopenharmony_ci#define R_SLOT 0x10 3088c2ecf20Sopenharmony_ci#define R_IRQMSK_MISC 0x11 3098c2ecf20Sopenharmony_ci#define R_SCI_MSK 0x12 3108c2ecf20Sopenharmony_ci#define R_IRQ_CTRL 0x13 3118c2ecf20Sopenharmony_ci#define R_PCM_MD0 0x14 3128c2ecf20Sopenharmony_ci#define R_PCM_MD1 0x15 3138c2ecf20Sopenharmony_ci#define R_PCM_MD2 0x15 3148c2ecf20Sopenharmony_ci#define R_SH0H 0x15 3158c2ecf20Sopenharmony_ci#define R_SH1H 0x15 3168c2ecf20Sopenharmony_ci#define R_SH0L 0x15 3178c2ecf20Sopenharmony_ci#define R_SH1L 0x15 3188c2ecf20Sopenharmony_ci#define R_SL_SEL0 0x15 3198c2ecf20Sopenharmony_ci#define R_SL_SEL1 0x15 3208c2ecf20Sopenharmony_ci#define R_SL_SEL2 0x15 3218c2ecf20Sopenharmony_ci#define R_SL_SEL3 0x15 3228c2ecf20Sopenharmony_ci#define R_SL_SEL4 0x15 3238c2ecf20Sopenharmony_ci#define R_SL_SEL5 0x15 3248c2ecf20Sopenharmony_ci#define R_SL_SEL6 0x15 3258c2ecf20Sopenharmony_ci#define R_SL_SEL7 0x15 3268c2ecf20Sopenharmony_ci#define R_ST_SEL 0x16 3278c2ecf20Sopenharmony_ci#define R_ST_SYNC 0x17 3288c2ecf20Sopenharmony_ci#define R_CONF_EN 0x18 3298c2ecf20Sopenharmony_ci#define R_TI_WD 0x1A 3308c2ecf20Sopenharmony_ci#define R_BERT_WD_MD 0x1B 3318c2ecf20Sopenharmony_ci#define R_DTMF 0x1C 3328c2ecf20Sopenharmony_ci#define R_DTMF_N 0x1D 3338c2ecf20Sopenharmony_ci#define R_E1_WR_STA 0x20 3348c2ecf20Sopenharmony_ci#define R_E1_RD_STA 0x20 3358c2ecf20Sopenharmony_ci#define R_LOS0 0x22 3368c2ecf20Sopenharmony_ci#define R_LOS1 0x23 3378c2ecf20Sopenharmony_ci#define R_RX0 0x24 3388c2ecf20Sopenharmony_ci#define R_RX_FR0 0x25 3398c2ecf20Sopenharmony_ci#define R_RX_FR1 0x26 3408c2ecf20Sopenharmony_ci#define R_TX0 0x28 3418c2ecf20Sopenharmony_ci#define R_TX1 0x29 3428c2ecf20Sopenharmony_ci#define R_TX_FR0 0x2C 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_ci#define R_TX_FR1 0x2D 3458c2ecf20Sopenharmony_ci#define R_TX_FR2 0x2E 3468c2ecf20Sopenharmony_ci#define R_JATT_ATT 0x2F /* undocumented */ 3478c2ecf20Sopenharmony_ci#define A_ST_RD_STATE 0x30 3488c2ecf20Sopenharmony_ci#define A_ST_WR_STATE 0x30 3498c2ecf20Sopenharmony_ci#define R_RX_OFF 0x30 3508c2ecf20Sopenharmony_ci#define A_ST_CTRL0 0x31 3518c2ecf20Sopenharmony_ci#define R_SYNC_OUT 0x31 3528c2ecf20Sopenharmony_ci#define A_ST_CTRL1 0x32 3538c2ecf20Sopenharmony_ci#define A_ST_CTRL2 0x33 3548c2ecf20Sopenharmony_ci#define A_ST_SQ_WR 0x34 3558c2ecf20Sopenharmony_ci#define R_TX_OFF 0x34 3568c2ecf20Sopenharmony_ci#define R_SYNC_CTRL 0x35 3578c2ecf20Sopenharmony_ci#define A_ST_CLK_DLY 0x37 3588c2ecf20Sopenharmony_ci#define R_PWM0 0x38 3598c2ecf20Sopenharmony_ci#define R_PWM1 0x39 3608c2ecf20Sopenharmony_ci#define A_ST_B1_TX 0x3C 3618c2ecf20Sopenharmony_ci#define A_ST_B2_TX 0x3D 3628c2ecf20Sopenharmony_ci#define A_ST_D_TX 0x3E 3638c2ecf20Sopenharmony_ci#define R_GPIO_OUT0 0x40 3648c2ecf20Sopenharmony_ci#define R_GPIO_OUT1 0x41 3658c2ecf20Sopenharmony_ci#define R_GPIO_EN0 0x42 3668c2ecf20Sopenharmony_ci#define R_GPIO_EN1 0x43 3678c2ecf20Sopenharmony_ci#define R_GPIO_SEL 0x44 3688c2ecf20Sopenharmony_ci#define R_BRG_CTRL 0x45 3698c2ecf20Sopenharmony_ci#define R_PWM_MD 0x46 3708c2ecf20Sopenharmony_ci#define R_BRG_MD 0x47 3718c2ecf20Sopenharmony_ci#define R_BRG_TIM0 0x48 3728c2ecf20Sopenharmony_ci#define R_BRG_TIM1 0x49 3738c2ecf20Sopenharmony_ci#define R_BRG_TIM2 0x4A 3748c2ecf20Sopenharmony_ci#define R_BRG_TIM3 0x4B 3758c2ecf20Sopenharmony_ci#define R_BRG_TIM_SEL01 0x4C 3768c2ecf20Sopenharmony_ci#define R_BRG_TIM_SEL23 0x4D 3778c2ecf20Sopenharmony_ci#define R_BRG_TIM_SEL45 0x4E 3788c2ecf20Sopenharmony_ci#define R_BRG_TIM_SEL67 0x4F 3798c2ecf20Sopenharmony_ci#define A_SL_CFG 0xD0 3808c2ecf20Sopenharmony_ci#define A_CONF 0xD1 3818c2ecf20Sopenharmony_ci#define A_CH_MSK 0xF4 3828c2ecf20Sopenharmony_ci#define A_CON_HDLC 0xFA 3838c2ecf20Sopenharmony_ci#define A_SUBCH_CFG 0xFB 3848c2ecf20Sopenharmony_ci#define A_CHANNEL 0xFC 3858c2ecf20Sopenharmony_ci#define A_FIFO_SEQ 0xFD 3868c2ecf20Sopenharmony_ci#define A_IRQ_MSK 0xFF 3878c2ecf20Sopenharmony_ci 3888c2ecf20Sopenharmony_ci/* read only registers */ 3898c2ecf20Sopenharmony_ci#define A_Z12 0x04 3908c2ecf20Sopenharmony_ci#define A_Z1L 0x04 3918c2ecf20Sopenharmony_ci#define A_Z1 0x04 3928c2ecf20Sopenharmony_ci#define A_Z1H 0x05 3938c2ecf20Sopenharmony_ci#define A_Z2L 0x06 3948c2ecf20Sopenharmony_ci#define A_Z2 0x06 3958c2ecf20Sopenharmony_ci#define A_Z2H 0x07 3968c2ecf20Sopenharmony_ci#define A_F1 0x0C 3978c2ecf20Sopenharmony_ci#define A_F12 0x0C 3988c2ecf20Sopenharmony_ci#define A_F2 0x0D 3998c2ecf20Sopenharmony_ci#define R_IRQ_OVIEW 0x10 4008c2ecf20Sopenharmony_ci#define R_IRQ_MISC 0x11 4018c2ecf20Sopenharmony_ci#define R_IRQ_STATECH 0x12 4028c2ecf20Sopenharmony_ci#define R_CONF_OFLOW 0x14 4038c2ecf20Sopenharmony_ci#define R_RAM_USE 0x15 4048c2ecf20Sopenharmony_ci#define R_CHIP_ID 0x16 4058c2ecf20Sopenharmony_ci#define R_BERT_STA 0x17 4068c2ecf20Sopenharmony_ci#define R_F0_CNTL 0x18 4078c2ecf20Sopenharmony_ci#define R_F0_CNTH 0x19 4088c2ecf20Sopenharmony_ci#define R_BERT_EC 0x1A 4098c2ecf20Sopenharmony_ci#define R_BERT_ECL 0x1A 4108c2ecf20Sopenharmony_ci#define R_BERT_ECH 0x1B 4118c2ecf20Sopenharmony_ci#define R_STATUS 0x1C 4128c2ecf20Sopenharmony_ci#define R_CHIP_RV 0x1F 4138c2ecf20Sopenharmony_ci#define R_STATE 0x20 4148c2ecf20Sopenharmony_ci#define R_SYNC_STA 0x24 4158c2ecf20Sopenharmony_ci#define R_RX_SL0_0 0x25 4168c2ecf20Sopenharmony_ci#define R_RX_SL0_1 0x26 4178c2ecf20Sopenharmony_ci#define R_RX_SL0_2 0x27 4188c2ecf20Sopenharmony_ci#define R_JATT_DIR 0x2b /* undocumented */ 4198c2ecf20Sopenharmony_ci#define R_SLIP 0x2c 4208c2ecf20Sopenharmony_ci#define A_ST_RD_STA 0x30 4218c2ecf20Sopenharmony_ci#define R_FAS_EC 0x30 4228c2ecf20Sopenharmony_ci#define R_FAS_ECL 0x30 4238c2ecf20Sopenharmony_ci#define R_FAS_ECH 0x31 4248c2ecf20Sopenharmony_ci#define R_VIO_EC 0x32 4258c2ecf20Sopenharmony_ci#define R_VIO_ECL 0x32 4268c2ecf20Sopenharmony_ci#define R_VIO_ECH 0x33 4278c2ecf20Sopenharmony_ci#define A_ST_SQ_RD 0x34 4288c2ecf20Sopenharmony_ci#define R_CRC_EC 0x34 4298c2ecf20Sopenharmony_ci#define R_CRC_ECL 0x34 4308c2ecf20Sopenharmony_ci#define R_CRC_ECH 0x35 4318c2ecf20Sopenharmony_ci#define R_E_EC 0x36 4328c2ecf20Sopenharmony_ci#define R_E_ECL 0x36 4338c2ecf20Sopenharmony_ci#define R_E_ECH 0x37 4348c2ecf20Sopenharmony_ci#define R_SA6_SA13_EC 0x38 4358c2ecf20Sopenharmony_ci#define R_SA6_SA13_ECL 0x38 4368c2ecf20Sopenharmony_ci#define R_SA6_SA13_ECH 0x39 4378c2ecf20Sopenharmony_ci#define R_SA6_SA23_EC 0x3A 4388c2ecf20Sopenharmony_ci#define R_SA6_SA23_ECL 0x3A 4398c2ecf20Sopenharmony_ci#define R_SA6_SA23_ECH 0x3B 4408c2ecf20Sopenharmony_ci#define A_ST_B1_RX 0x3C 4418c2ecf20Sopenharmony_ci#define A_ST_B2_RX 0x3D 4428c2ecf20Sopenharmony_ci#define A_ST_D_RX 0x3E 4438c2ecf20Sopenharmony_ci#define A_ST_E_RX 0x3F 4448c2ecf20Sopenharmony_ci#define R_GPIO_IN0 0x40 4458c2ecf20Sopenharmony_ci#define R_GPIO_IN1 0x41 4468c2ecf20Sopenharmony_ci#define R_GPI_IN0 0x44 4478c2ecf20Sopenharmony_ci#define R_GPI_IN1 0x45 4488c2ecf20Sopenharmony_ci#define R_GPI_IN2 0x46 4498c2ecf20Sopenharmony_ci#define R_GPI_IN3 0x47 4508c2ecf20Sopenharmony_ci#define R_INT_DATA 0x88 4518c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL0 0xC8 4528c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL1 0xC9 4538c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL2 0xCA 4548c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL3 0xCB 4558c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL4 0xCC 4568c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL5 0xCD 4578c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL6 0xCE 4588c2ecf20Sopenharmony_ci#define R_IRQ_FIFO_BL7 0xCF 4598c2ecf20Sopenharmony_ci 4608c2ecf20Sopenharmony_ci/* read and write registers */ 4618c2ecf20Sopenharmony_ci#define A_FIFO_DATA0 0x80 4628c2ecf20Sopenharmony_ci#define A_FIFO_DATA1 0x80 4638c2ecf20Sopenharmony_ci#define A_FIFO_DATA2 0x80 4648c2ecf20Sopenharmony_ci#define A_FIFO_DATA0_NOINC 0x84 4658c2ecf20Sopenharmony_ci#define A_FIFO_DATA1_NOINC 0x84 4668c2ecf20Sopenharmony_ci#define A_FIFO_DATA2_NOINC 0x84 4678c2ecf20Sopenharmony_ci#define R_RAM_DATA 0xC0 4688c2ecf20Sopenharmony_ci 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_ci/* 4718c2ecf20Sopenharmony_ci * BIT SETTING FOR HFC-4S/8S AND HFC-E1 4728c2ecf20Sopenharmony_ci */ 4738c2ecf20Sopenharmony_ci 4748c2ecf20Sopenharmony_ci/* chapter 2: universal bus interface */ 4758c2ecf20Sopenharmony_ci/* R_CIRM */ 4768c2ecf20Sopenharmony_ci#define V_IRQ_SEL 0x01 4778c2ecf20Sopenharmony_ci#define V_SRES 0x08 4788c2ecf20Sopenharmony_ci#define V_HFCRES 0x10 4798c2ecf20Sopenharmony_ci#define V_PCMRES 0x20 4808c2ecf20Sopenharmony_ci#define V_STRES 0x40 4818c2ecf20Sopenharmony_ci#define V_ETRES 0x40 4828c2ecf20Sopenharmony_ci#define V_RLD_EPR 0x80 4838c2ecf20Sopenharmony_ci/* R_CTRL */ 4848c2ecf20Sopenharmony_ci#define V_FIFO_LPRIO 0x02 4858c2ecf20Sopenharmony_ci#define V_SLOW_RD 0x04 4868c2ecf20Sopenharmony_ci#define V_EXT_RAM 0x08 4878c2ecf20Sopenharmony_ci#define V_CLK_OFF 0x20 4888c2ecf20Sopenharmony_ci#define V_ST_CLK 0x40 4898c2ecf20Sopenharmony_ci/* R_RAM_ADDR0 */ 4908c2ecf20Sopenharmony_ci#define V_RAM_ADDR2 0x01 4918c2ecf20Sopenharmony_ci#define V_ADDR_RES 0x40 4928c2ecf20Sopenharmony_ci#define V_ADDR_INC 0x80 4938c2ecf20Sopenharmony_ci/* R_RAM_SZ */ 4948c2ecf20Sopenharmony_ci#define V_RAM_SZ 0x01 4958c2ecf20Sopenharmony_ci#define V_PWM0_16KHZ 0x10 4968c2ecf20Sopenharmony_ci#define V_PWM1_16KHZ 0x20 4978c2ecf20Sopenharmony_ci#define V_FZ_MD 0x80 4988c2ecf20Sopenharmony_ci/* R_CHIP_ID */ 4998c2ecf20Sopenharmony_ci#define V_PNP_IRQ 0x01 5008c2ecf20Sopenharmony_ci#define V_CHIP_ID 0x10 5018c2ecf20Sopenharmony_ci 5028c2ecf20Sopenharmony_ci/* chapter 3: data flow */ 5038c2ecf20Sopenharmony_ci/* R_FIRST_FIFO */ 5048c2ecf20Sopenharmony_ci#define V_FIRST_FIRO_DIR 0x01 5058c2ecf20Sopenharmony_ci#define V_FIRST_FIFO_NUM 0x02 5068c2ecf20Sopenharmony_ci/* R_FIFO_MD */ 5078c2ecf20Sopenharmony_ci#define V_FIFO_MD 0x01 5088c2ecf20Sopenharmony_ci#define V_CSM_MD 0x04 5098c2ecf20Sopenharmony_ci#define V_FSM_MD 0x08 5108c2ecf20Sopenharmony_ci#define V_FIFO_SZ 0x10 5118c2ecf20Sopenharmony_ci/* R_FIFO */ 5128c2ecf20Sopenharmony_ci#define V_FIFO_DIR 0x01 5138c2ecf20Sopenharmony_ci#define V_FIFO_NUM 0x02 5148c2ecf20Sopenharmony_ci#define V_REV 0x80 5158c2ecf20Sopenharmony_ci/* R_SLOT */ 5168c2ecf20Sopenharmony_ci#define V_SL_DIR 0x01 5178c2ecf20Sopenharmony_ci#define V_SL_NUM 0x02 5188c2ecf20Sopenharmony_ci/* A_SL_CFG */ 5198c2ecf20Sopenharmony_ci#define V_CH_DIR 0x01 5208c2ecf20Sopenharmony_ci#define V_CH_SEL 0x02 5218c2ecf20Sopenharmony_ci#define V_ROUTING 0x40 5228c2ecf20Sopenharmony_ci/* A_CON_HDLC */ 5238c2ecf20Sopenharmony_ci#define V_IFF 0x01 5248c2ecf20Sopenharmony_ci#define V_HDLC_TRP 0x02 5258c2ecf20Sopenharmony_ci#define V_TRP_IRQ 0x04 5268c2ecf20Sopenharmony_ci#define V_DATA_FLOW 0x20 5278c2ecf20Sopenharmony_ci/* A_SUBCH_CFG */ 5288c2ecf20Sopenharmony_ci#define V_BIT_CNT 0x01 5298c2ecf20Sopenharmony_ci#define V_START_BIT 0x08 5308c2ecf20Sopenharmony_ci#define V_LOOP_FIFO 0x40 5318c2ecf20Sopenharmony_ci#define V_INV_DATA 0x80 5328c2ecf20Sopenharmony_ci/* A_CHANNEL */ 5338c2ecf20Sopenharmony_ci#define V_CH_DIR0 0x01 5348c2ecf20Sopenharmony_ci#define V_CH_NUM0 0x02 5358c2ecf20Sopenharmony_ci/* A_FIFO_SEQ */ 5368c2ecf20Sopenharmony_ci#define V_NEXT_FIFO_DIR 0x01 5378c2ecf20Sopenharmony_ci#define V_NEXT_FIFO_NUM 0x02 5388c2ecf20Sopenharmony_ci#define V_SEQ_END 0x40 5398c2ecf20Sopenharmony_ci 5408c2ecf20Sopenharmony_ci/* chapter 4: FIFO handling and HDLC controller */ 5418c2ecf20Sopenharmony_ci/* R_INC_RES_FIFO */ 5428c2ecf20Sopenharmony_ci#define V_INC_F 0x01 5438c2ecf20Sopenharmony_ci#define V_RES_F 0x02 5448c2ecf20Sopenharmony_ci#define V_RES_LOST 0x04 5458c2ecf20Sopenharmony_ci 5468c2ecf20Sopenharmony_ci/* chapter 5: S/T interface */ 5478c2ecf20Sopenharmony_ci/* R_SCI_MSK */ 5488c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST0 0x01 5498c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST1 0x02 5508c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST2 0x04 5518c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST3 0x08 5528c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST4 0x10 5538c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST5 0x20 5548c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST6 0x40 5558c2ecf20Sopenharmony_ci#define V_SCI_MSK_ST7 0x80 5568c2ecf20Sopenharmony_ci/* R_ST_SEL */ 5578c2ecf20Sopenharmony_ci#define V_ST_SEL 0x01 5588c2ecf20Sopenharmony_ci#define V_MULT_ST 0x08 5598c2ecf20Sopenharmony_ci/* R_ST_SYNC */ 5608c2ecf20Sopenharmony_ci#define V_SYNC_SEL 0x01 5618c2ecf20Sopenharmony_ci#define V_AUTO_SYNC 0x08 5628c2ecf20Sopenharmony_ci/* A_ST_WR_STA */ 5638c2ecf20Sopenharmony_ci#define V_ST_SET_STA 0x01 5648c2ecf20Sopenharmony_ci#define V_ST_LD_STA 0x10 5658c2ecf20Sopenharmony_ci#define V_ST_ACT 0x20 5668c2ecf20Sopenharmony_ci#define V_SET_G2_G3 0x80 5678c2ecf20Sopenharmony_ci/* A_ST_CTRL0 */ 5688c2ecf20Sopenharmony_ci#define V_B1_EN 0x01 5698c2ecf20Sopenharmony_ci#define V_B2_EN 0x02 5708c2ecf20Sopenharmony_ci#define V_ST_MD 0x04 5718c2ecf20Sopenharmony_ci#define V_D_PRIO 0x08 5728c2ecf20Sopenharmony_ci#define V_SQ_EN 0x10 5738c2ecf20Sopenharmony_ci#define V_96KHZ 0x20 5748c2ecf20Sopenharmony_ci#define V_TX_LI 0x40 5758c2ecf20Sopenharmony_ci#define V_ST_STOP 0x80 5768c2ecf20Sopenharmony_ci/* A_ST_CTRL1 */ 5778c2ecf20Sopenharmony_ci#define V_G2_G3_EN 0x01 5788c2ecf20Sopenharmony_ci#define V_D_HI 0x04 5798c2ecf20Sopenharmony_ci#define V_E_IGNO 0x08 5808c2ecf20Sopenharmony_ci#define V_E_LO 0x10 5818c2ecf20Sopenharmony_ci#define V_B12_SWAP 0x80 5828c2ecf20Sopenharmony_ci/* A_ST_CTRL2 */ 5838c2ecf20Sopenharmony_ci#define V_B1_RX_EN 0x01 5848c2ecf20Sopenharmony_ci#define V_B2_RX_EN 0x02 5858c2ecf20Sopenharmony_ci#define V_ST_TRIS 0x40 5868c2ecf20Sopenharmony_ci/* A_ST_CLK_DLY */ 5878c2ecf20Sopenharmony_ci#define V_ST_CK_DLY 0x01 5888c2ecf20Sopenharmony_ci#define V_ST_SMPL 0x10 5898c2ecf20Sopenharmony_ci/* A_ST_D_TX */ 5908c2ecf20Sopenharmony_ci#define V_ST_D_TX 0x40 5918c2ecf20Sopenharmony_ci/* R_IRQ_STATECH */ 5928c2ecf20Sopenharmony_ci#define V_SCI_ST0 0x01 5938c2ecf20Sopenharmony_ci#define V_SCI_ST1 0x02 5948c2ecf20Sopenharmony_ci#define V_SCI_ST2 0x04 5958c2ecf20Sopenharmony_ci#define V_SCI_ST3 0x08 5968c2ecf20Sopenharmony_ci#define V_SCI_ST4 0x10 5978c2ecf20Sopenharmony_ci#define V_SCI_ST5 0x20 5988c2ecf20Sopenharmony_ci#define V_SCI_ST6 0x40 5998c2ecf20Sopenharmony_ci#define V_SCI_ST7 0x80 6008c2ecf20Sopenharmony_ci/* A_ST_RD_STA */ 6018c2ecf20Sopenharmony_ci#define V_ST_STA 0x01 6028c2ecf20Sopenharmony_ci#define V_FR_SYNC_ST 0x10 6038c2ecf20Sopenharmony_ci#define V_TI2_EXP 0x20 6048c2ecf20Sopenharmony_ci#define V_INFO0 0x40 6058c2ecf20Sopenharmony_ci#define V_G2_G3 0x80 6068c2ecf20Sopenharmony_ci/* A_ST_SQ_RD */ 6078c2ecf20Sopenharmony_ci#define V_ST_SQ 0x01 6088c2ecf20Sopenharmony_ci#define V_MF_RX_RDY 0x10 6098c2ecf20Sopenharmony_ci#define V_MF_TX_RDY 0x80 6108c2ecf20Sopenharmony_ci/* A_ST_D_RX */ 6118c2ecf20Sopenharmony_ci#define V_ST_D_RX 0x40 6128c2ecf20Sopenharmony_ci/* A_ST_E_RX */ 6138c2ecf20Sopenharmony_ci#define V_ST_E_RX 0x40 6148c2ecf20Sopenharmony_ci 6158c2ecf20Sopenharmony_ci/* chapter 5: E1 interface */ 6168c2ecf20Sopenharmony_ci/* R_E1_WR_STA */ 6178c2ecf20Sopenharmony_ci/* R_E1_RD_STA */ 6188c2ecf20Sopenharmony_ci#define V_E1_SET_STA 0x01 6198c2ecf20Sopenharmony_ci#define V_E1_LD_STA 0x10 6208c2ecf20Sopenharmony_ci/* R_RX0 */ 6218c2ecf20Sopenharmony_ci#define V_RX_CODE 0x01 6228c2ecf20Sopenharmony_ci#define V_RX_FBAUD 0x04 6238c2ecf20Sopenharmony_ci#define V_RX_CMI 0x08 6248c2ecf20Sopenharmony_ci#define V_RX_INV_CMI 0x10 6258c2ecf20Sopenharmony_ci#define V_RX_INV_CLK 0x20 6268c2ecf20Sopenharmony_ci#define V_RX_INV_DATA 0x40 6278c2ecf20Sopenharmony_ci#define V_AIS_ITU 0x80 6288c2ecf20Sopenharmony_ci/* R_RX_FR0 */ 6298c2ecf20Sopenharmony_ci#define V_NO_INSYNC 0x01 6308c2ecf20Sopenharmony_ci#define V_AUTO_RESYNC 0x02 6318c2ecf20Sopenharmony_ci#define V_AUTO_RECO 0x04 6328c2ecf20Sopenharmony_ci#define V_SWORD_COND 0x08 6338c2ecf20Sopenharmony_ci#define V_SYNC_LOSS 0x10 6348c2ecf20Sopenharmony_ci#define V_XCRC_SYNC 0x20 6358c2ecf20Sopenharmony_ci#define V_MF_RESYNC 0x40 6368c2ecf20Sopenharmony_ci#define V_RESYNC 0x80 6378c2ecf20Sopenharmony_ci/* R_RX_FR1 */ 6388c2ecf20Sopenharmony_ci#define V_RX_MF 0x01 6398c2ecf20Sopenharmony_ci#define V_RX_MF_SYNC 0x02 6408c2ecf20Sopenharmony_ci#define V_RX_SL0_RAM 0x04 6418c2ecf20Sopenharmony_ci#define V_ERR_SIM 0x20 6428c2ecf20Sopenharmony_ci#define V_RES_NMF 0x40 6438c2ecf20Sopenharmony_ci/* R_TX0 */ 6448c2ecf20Sopenharmony_ci#define V_TX_CODE 0x01 6458c2ecf20Sopenharmony_ci#define V_TX_FBAUD 0x04 6468c2ecf20Sopenharmony_ci#define V_TX_CMI_CODE 0x08 6478c2ecf20Sopenharmony_ci#define V_TX_INV_CMI_CODE 0x10 6488c2ecf20Sopenharmony_ci#define V_TX_INV_CLK 0x20 6498c2ecf20Sopenharmony_ci#define V_TX_INV_DATA 0x40 6508c2ecf20Sopenharmony_ci#define V_OUT_EN 0x80 6518c2ecf20Sopenharmony_ci/* R_TX1 */ 6528c2ecf20Sopenharmony_ci#define V_INV_CLK 0x01 6538c2ecf20Sopenharmony_ci#define V_EXCHG_DATA_LI 0x02 6548c2ecf20Sopenharmony_ci#define V_AIS_OUT 0x04 6558c2ecf20Sopenharmony_ci#define V_ATX 0x20 6568c2ecf20Sopenharmony_ci#define V_NTRI 0x40 6578c2ecf20Sopenharmony_ci#define V_AUTO_ERR_RES 0x80 6588c2ecf20Sopenharmony_ci/* R_TX_FR0 */ 6598c2ecf20Sopenharmony_ci#define V_TRP_FAS 0x01 6608c2ecf20Sopenharmony_ci#define V_TRP_NFAS 0x02 6618c2ecf20Sopenharmony_ci#define V_TRP_RAL 0x04 6628c2ecf20Sopenharmony_ci#define V_TRP_SA 0x08 6638c2ecf20Sopenharmony_ci/* R_TX_FR1 */ 6648c2ecf20Sopenharmony_ci#define V_TX_FAS 0x01 6658c2ecf20Sopenharmony_ci#define V_TX_NFAS 0x02 6668c2ecf20Sopenharmony_ci#define V_TX_RAL 0x04 6678c2ecf20Sopenharmony_ci#define V_TX_SA 0x08 6688c2ecf20Sopenharmony_ci/* R_TX_FR2 */ 6698c2ecf20Sopenharmony_ci#define V_TX_MF 0x01 6708c2ecf20Sopenharmony_ci#define V_TRP_SL0 0x02 6718c2ecf20Sopenharmony_ci#define V_TX_SL0_RAM 0x04 6728c2ecf20Sopenharmony_ci#define V_TX_E 0x10 6738c2ecf20Sopenharmony_ci#define V_NEG_E 0x20 6748c2ecf20Sopenharmony_ci#define V_XS12_ON 0x40 6758c2ecf20Sopenharmony_ci#define V_XS15_ON 0x80 6768c2ecf20Sopenharmony_ci/* R_RX_OFF */ 6778c2ecf20Sopenharmony_ci#define V_RX_SZ 0x01 6788c2ecf20Sopenharmony_ci#define V_RX_INIT 0x04 6798c2ecf20Sopenharmony_ci/* R_SYNC_OUT */ 6808c2ecf20Sopenharmony_ci#define V_SYNC_E1_RX 0x01 6818c2ecf20Sopenharmony_ci#define V_IPATS0 0x20 6828c2ecf20Sopenharmony_ci#define V_IPATS1 0x40 6838c2ecf20Sopenharmony_ci#define V_IPATS2 0x80 6848c2ecf20Sopenharmony_ci/* R_TX_OFF */ 6858c2ecf20Sopenharmony_ci#define V_TX_SZ 0x01 6868c2ecf20Sopenharmony_ci#define V_TX_INIT 0x04 6878c2ecf20Sopenharmony_ci/* R_SYNC_CTRL */ 6888c2ecf20Sopenharmony_ci#define V_EXT_CLK_SYNC 0x01 6898c2ecf20Sopenharmony_ci#define V_SYNC_OFFS 0x02 6908c2ecf20Sopenharmony_ci#define V_PCM_SYNC 0x04 6918c2ecf20Sopenharmony_ci#define V_NEG_CLK 0x08 6928c2ecf20Sopenharmony_ci#define V_HCLK 0x10 6938c2ecf20Sopenharmony_ci/* 6948c2ecf20Sopenharmony_ci #define V_JATT_AUTO_DEL 0x20 6958c2ecf20Sopenharmony_ci #define V_JATT_AUTO 0x40 6968c2ecf20Sopenharmony_ci*/ 6978c2ecf20Sopenharmony_ci#define V_JATT_OFF 0x80 6988c2ecf20Sopenharmony_ci/* R_STATE */ 6998c2ecf20Sopenharmony_ci#define V_E1_STA 0x01 7008c2ecf20Sopenharmony_ci#define V_ALT_FR_RX 0x40 7018c2ecf20Sopenharmony_ci#define V_ALT_FR_TX 0x80 7028c2ecf20Sopenharmony_ci/* R_SYNC_STA */ 7038c2ecf20Sopenharmony_ci#define V_RX_STA 0x01 7048c2ecf20Sopenharmony_ci#define V_FR_SYNC_E1 0x04 7058c2ecf20Sopenharmony_ci#define V_SIG_LOS 0x08 7068c2ecf20Sopenharmony_ci#define V_MFA_STA 0x10 7078c2ecf20Sopenharmony_ci#define V_AIS 0x40 7088c2ecf20Sopenharmony_ci#define V_NO_MF_SYNC 0x80 7098c2ecf20Sopenharmony_ci/* R_RX_SL0_0 */ 7108c2ecf20Sopenharmony_ci#define V_SI_FAS 0x01 7118c2ecf20Sopenharmony_ci#define V_SI_NFAS 0x02 7128c2ecf20Sopenharmony_ci#define V_A 0x04 7138c2ecf20Sopenharmony_ci#define V_CRC_OK 0x08 7148c2ecf20Sopenharmony_ci#define V_TX_E1 0x10 7158c2ecf20Sopenharmony_ci#define V_TX_E2 0x20 7168c2ecf20Sopenharmony_ci#define V_RX_E1 0x40 7178c2ecf20Sopenharmony_ci#define V_RX_E2 0x80 7188c2ecf20Sopenharmony_ci/* R_SLIP */ 7198c2ecf20Sopenharmony_ci#define V_SLIP_RX 0x01 7208c2ecf20Sopenharmony_ci#define V_FOSLIP_RX 0x08 7218c2ecf20Sopenharmony_ci#define V_SLIP_TX 0x10 7228c2ecf20Sopenharmony_ci#define V_FOSLIP_TX 0x80 7238c2ecf20Sopenharmony_ci 7248c2ecf20Sopenharmony_ci/* chapter 6: PCM interface */ 7258c2ecf20Sopenharmony_ci/* R_PCM_MD0 */ 7268c2ecf20Sopenharmony_ci#define V_PCM_MD 0x01 7278c2ecf20Sopenharmony_ci#define V_C4_POL 0x02 7288c2ecf20Sopenharmony_ci#define V_F0_NEG 0x04 7298c2ecf20Sopenharmony_ci#define V_F0_LEN 0x08 7308c2ecf20Sopenharmony_ci#define V_PCM_ADDR 0x10 7318c2ecf20Sopenharmony_ci/* R_SL_SEL0 */ 7328c2ecf20Sopenharmony_ci#define V_SL_SEL0 0x01 7338c2ecf20Sopenharmony_ci#define V_SH_SEL0 0x80 7348c2ecf20Sopenharmony_ci/* R_SL_SEL1 */ 7358c2ecf20Sopenharmony_ci#define V_SL_SEL1 0x01 7368c2ecf20Sopenharmony_ci#define V_SH_SEL1 0x80 7378c2ecf20Sopenharmony_ci/* R_SL_SEL2 */ 7388c2ecf20Sopenharmony_ci#define V_SL_SEL2 0x01 7398c2ecf20Sopenharmony_ci#define V_SH_SEL2 0x80 7408c2ecf20Sopenharmony_ci/* R_SL_SEL3 */ 7418c2ecf20Sopenharmony_ci#define V_SL_SEL3 0x01 7428c2ecf20Sopenharmony_ci#define V_SH_SEL3 0x80 7438c2ecf20Sopenharmony_ci/* R_SL_SEL4 */ 7448c2ecf20Sopenharmony_ci#define V_SL_SEL4 0x01 7458c2ecf20Sopenharmony_ci#define V_SH_SEL4 0x80 7468c2ecf20Sopenharmony_ci/* R_SL_SEL5 */ 7478c2ecf20Sopenharmony_ci#define V_SL_SEL5 0x01 7488c2ecf20Sopenharmony_ci#define V_SH_SEL5 0x80 7498c2ecf20Sopenharmony_ci/* R_SL_SEL6 */ 7508c2ecf20Sopenharmony_ci#define V_SL_SEL6 0x01 7518c2ecf20Sopenharmony_ci#define V_SH_SEL6 0x80 7528c2ecf20Sopenharmony_ci/* R_SL_SEL7 */ 7538c2ecf20Sopenharmony_ci#define V_SL_SEL7 0x01 7548c2ecf20Sopenharmony_ci#define V_SH_SEL7 0x80 7558c2ecf20Sopenharmony_ci/* R_PCM_MD1 */ 7568c2ecf20Sopenharmony_ci#define V_ODEC_CON 0x01 7578c2ecf20Sopenharmony_ci#define V_PLL_ADJ 0x04 7588c2ecf20Sopenharmony_ci#define V_PCM_DR 0x10 7598c2ecf20Sopenharmony_ci#define V_PCM_LOOP 0x40 7608c2ecf20Sopenharmony_ci/* R_PCM_MD2 */ 7618c2ecf20Sopenharmony_ci#define V_SYNC_PLL 0x02 7628c2ecf20Sopenharmony_ci#define V_SYNC_SRC 0x04 7638c2ecf20Sopenharmony_ci#define V_SYNC_OUT 0x08 7648c2ecf20Sopenharmony_ci#define V_ICR_FR_TIME 0x40 7658c2ecf20Sopenharmony_ci#define V_EN_PLL 0x80 7668c2ecf20Sopenharmony_ci 7678c2ecf20Sopenharmony_ci/* chapter 7: pulse width modulation */ 7688c2ecf20Sopenharmony_ci/* R_PWM_MD */ 7698c2ecf20Sopenharmony_ci#define V_EXT_IRQ_EN 0x08 7708c2ecf20Sopenharmony_ci#define V_PWM0_MD 0x10 7718c2ecf20Sopenharmony_ci#define V_PWM1_MD 0x40 7728c2ecf20Sopenharmony_ci 7738c2ecf20Sopenharmony_ci/* chapter 8: multiparty audio conferences */ 7748c2ecf20Sopenharmony_ci/* R_CONF_EN */ 7758c2ecf20Sopenharmony_ci#define V_CONF_EN 0x01 7768c2ecf20Sopenharmony_ci#define V_ULAW 0x80 7778c2ecf20Sopenharmony_ci/* A_CONF */ 7788c2ecf20Sopenharmony_ci#define V_CONF_NUM 0x01 7798c2ecf20Sopenharmony_ci#define V_NOISE_SUPPR 0x08 7808c2ecf20Sopenharmony_ci#define V_ATT_LEV 0x20 7818c2ecf20Sopenharmony_ci#define V_CONF_SL 0x80 7828c2ecf20Sopenharmony_ci/* R_CONF_OFLOW */ 7838c2ecf20Sopenharmony_ci#define V_CONF_OFLOW0 0x01 7848c2ecf20Sopenharmony_ci#define V_CONF_OFLOW1 0x02 7858c2ecf20Sopenharmony_ci#define V_CONF_OFLOW2 0x04 7868c2ecf20Sopenharmony_ci#define V_CONF_OFLOW3 0x08 7878c2ecf20Sopenharmony_ci#define V_CONF_OFLOW4 0x10 7888c2ecf20Sopenharmony_ci#define V_CONF_OFLOW5 0x20 7898c2ecf20Sopenharmony_ci#define V_CONF_OFLOW6 0x40 7908c2ecf20Sopenharmony_ci#define V_CONF_OFLOW7 0x80 7918c2ecf20Sopenharmony_ci 7928c2ecf20Sopenharmony_ci/* chapter 9: DTMF contoller */ 7938c2ecf20Sopenharmony_ci/* R_DTMF0 */ 7948c2ecf20Sopenharmony_ci#define V_DTMF_EN 0x01 7958c2ecf20Sopenharmony_ci#define V_HARM_SEL 0x02 7968c2ecf20Sopenharmony_ci#define V_DTMF_RX_CH 0x04 7978c2ecf20Sopenharmony_ci#define V_DTMF_STOP 0x08 7988c2ecf20Sopenharmony_ci#define V_CHBL_SEL 0x10 7998c2ecf20Sopenharmony_ci#define V_RST_DTMF 0x40 8008c2ecf20Sopenharmony_ci#define V_ULAW_SEL 0x80 8018c2ecf20Sopenharmony_ci 8028c2ecf20Sopenharmony_ci/* chapter 10: BERT */ 8038c2ecf20Sopenharmony_ci/* R_BERT_WD_MD */ 8048c2ecf20Sopenharmony_ci#define V_PAT_SEQ 0x01 8058c2ecf20Sopenharmony_ci#define V_BERT_ERR 0x08 8068c2ecf20Sopenharmony_ci#define V_AUTO_WD_RES 0x20 8078c2ecf20Sopenharmony_ci#define V_WD_RES 0x80 8088c2ecf20Sopenharmony_ci/* R_BERT_STA */ 8098c2ecf20Sopenharmony_ci#define V_BERT_SYNC_SRC 0x01 8108c2ecf20Sopenharmony_ci#define V_BERT_SYNC 0x10 8118c2ecf20Sopenharmony_ci#define V_BERT_INV_DATA 0x20 8128c2ecf20Sopenharmony_ci 8138c2ecf20Sopenharmony_ci/* chapter 11: auxiliary interface */ 8148c2ecf20Sopenharmony_ci/* R_BRG_PCM_CFG */ 8158c2ecf20Sopenharmony_ci#define V_BRG_EN 0x01 8168c2ecf20Sopenharmony_ci#define V_BRG_MD 0x02 8178c2ecf20Sopenharmony_ci#define V_PCM_CLK 0x20 8188c2ecf20Sopenharmony_ci#define V_ADDR_WRDLY 0x40 8198c2ecf20Sopenharmony_ci/* R_BRG_CTRL */ 8208c2ecf20Sopenharmony_ci#define V_BRG_CS 0x01 8218c2ecf20Sopenharmony_ci#define V_BRG_ADDR 0x08 8228c2ecf20Sopenharmony_ci#define V_BRG_CS_SRC 0x80 8238c2ecf20Sopenharmony_ci/* R_BRG_MD */ 8248c2ecf20Sopenharmony_ci#define V_BRG_MD0 0x01 8258c2ecf20Sopenharmony_ci#define V_BRG_MD1 0x02 8268c2ecf20Sopenharmony_ci#define V_BRG_MD2 0x04 8278c2ecf20Sopenharmony_ci#define V_BRG_MD3 0x08 8288c2ecf20Sopenharmony_ci#define V_BRG_MD4 0x10 8298c2ecf20Sopenharmony_ci#define V_BRG_MD5 0x20 8308c2ecf20Sopenharmony_ci#define V_BRG_MD6 0x40 8318c2ecf20Sopenharmony_ci#define V_BRG_MD7 0x80 8328c2ecf20Sopenharmony_ci/* R_BRG_TIM0 */ 8338c2ecf20Sopenharmony_ci#define V_BRG_TIM0_IDLE 0x01 8348c2ecf20Sopenharmony_ci#define V_BRG_TIM0_CLK 0x10 8358c2ecf20Sopenharmony_ci/* R_BRG_TIM1 */ 8368c2ecf20Sopenharmony_ci#define V_BRG_TIM1_IDLE 0x01 8378c2ecf20Sopenharmony_ci#define V_BRG_TIM1_CLK 0x10 8388c2ecf20Sopenharmony_ci/* R_BRG_TIM2 */ 8398c2ecf20Sopenharmony_ci#define V_BRG_TIM2_IDLE 0x01 8408c2ecf20Sopenharmony_ci#define V_BRG_TIM2_CLK 0x10 8418c2ecf20Sopenharmony_ci/* R_BRG_TIM3 */ 8428c2ecf20Sopenharmony_ci#define V_BRG_TIM3_IDLE 0x01 8438c2ecf20Sopenharmony_ci#define V_BRG_TIM3_CLK 0x10 8448c2ecf20Sopenharmony_ci/* R_BRG_TIM_SEL01 */ 8458c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL0 0x01 8468c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL0 0x04 8478c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL1 0x10 8488c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL1 0x40 8498c2ecf20Sopenharmony_ci/* R_BRG_TIM_SEL23 */ 8508c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL2 0x01 8518c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL2 0x04 8528c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL3 0x10 8538c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL3 0x40 8548c2ecf20Sopenharmony_ci/* R_BRG_TIM_SEL45 */ 8558c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL4 0x01 8568c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL4 0x04 8578c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL5 0x10 8588c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL5 0x40 8598c2ecf20Sopenharmony_ci/* R_BRG_TIM_SEL67 */ 8608c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL6 0x01 8618c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL6 0x04 8628c2ecf20Sopenharmony_ci#define V_BRG_WR_SEL7 0x10 8638c2ecf20Sopenharmony_ci#define V_BRG_RD_SEL7 0x40 8648c2ecf20Sopenharmony_ci 8658c2ecf20Sopenharmony_ci/* chapter 12: clock, reset, interrupt, timer and watchdog */ 8668c2ecf20Sopenharmony_ci/* R_IRQMSK_MISC */ 8678c2ecf20Sopenharmony_ci#define V_STA_IRQMSK 0x01 8688c2ecf20Sopenharmony_ci#define V_TI_IRQMSK 0x02 8698c2ecf20Sopenharmony_ci#define V_PROC_IRQMSK 0x04 8708c2ecf20Sopenharmony_ci#define V_DTMF_IRQMSK 0x08 8718c2ecf20Sopenharmony_ci#define V_IRQ1S_MSK 0x10 8728c2ecf20Sopenharmony_ci#define V_SA6_IRQMSK 0x20 8738c2ecf20Sopenharmony_ci#define V_RX_EOMF_MSK 0x40 8748c2ecf20Sopenharmony_ci#define V_TX_EOMF_MSK 0x80 8758c2ecf20Sopenharmony_ci/* R_IRQ_CTRL */ 8768c2ecf20Sopenharmony_ci#define V_FIFO_IRQ 0x01 8778c2ecf20Sopenharmony_ci#define V_GLOB_IRQ_EN 0x08 8788c2ecf20Sopenharmony_ci#define V_IRQ_POL 0x10 8798c2ecf20Sopenharmony_ci/* R_TI_WD */ 8808c2ecf20Sopenharmony_ci#define V_EV_TS 0x01 8818c2ecf20Sopenharmony_ci#define V_WD_TS 0x10 8828c2ecf20Sopenharmony_ci/* A_IRQ_MSK */ 8838c2ecf20Sopenharmony_ci#define V_IRQ 0x01 8848c2ecf20Sopenharmony_ci#define V_BERT_EN 0x02 8858c2ecf20Sopenharmony_ci#define V_MIX_IRQ 0x04 8868c2ecf20Sopenharmony_ci/* R_IRQ_OVIEW */ 8878c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL0 0x01 8888c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL1 0x02 8898c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL2 0x04 8908c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL3 0x08 8918c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL4 0x10 8928c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL5 0x20 8938c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL6 0x40 8948c2ecf20Sopenharmony_ci#define V_IRQ_FIFO_BL7 0x80 8958c2ecf20Sopenharmony_ci/* R_IRQ_MISC */ 8968c2ecf20Sopenharmony_ci#define V_STA_IRQ 0x01 8978c2ecf20Sopenharmony_ci#define V_TI_IRQ 0x02 8988c2ecf20Sopenharmony_ci#define V_IRQ_PROC 0x04 8998c2ecf20Sopenharmony_ci#define V_DTMF_IRQ 0x08 9008c2ecf20Sopenharmony_ci#define V_IRQ1S 0x10 9018c2ecf20Sopenharmony_ci#define V_SA6_IRQ 0x20 9028c2ecf20Sopenharmony_ci#define V_RX_EOMF 0x40 9038c2ecf20Sopenharmony_ci#define V_TX_EOMF 0x80 9048c2ecf20Sopenharmony_ci/* R_STATUS */ 9058c2ecf20Sopenharmony_ci#define V_BUSY 0x01 9068c2ecf20Sopenharmony_ci#define V_PROC 0x02 9078c2ecf20Sopenharmony_ci#define V_DTMF_STA 0x04 9088c2ecf20Sopenharmony_ci#define V_LOST_STA 0x08 9098c2ecf20Sopenharmony_ci#define V_SYNC_IN 0x10 9108c2ecf20Sopenharmony_ci#define V_EXT_IRQSTA 0x20 9118c2ecf20Sopenharmony_ci#define V_MISC_IRQSTA 0x40 9128c2ecf20Sopenharmony_ci#define V_FR_IRQSTA 0x80 9138c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL0 */ 9148c2ecf20Sopenharmony_ci#define V_IRQ_FIFO0_TX 0x01 9158c2ecf20Sopenharmony_ci#define V_IRQ_FIFO0_RX 0x02 9168c2ecf20Sopenharmony_ci#define V_IRQ_FIFO1_TX 0x04 9178c2ecf20Sopenharmony_ci#define V_IRQ_FIFO1_RX 0x08 9188c2ecf20Sopenharmony_ci#define V_IRQ_FIFO2_TX 0x10 9198c2ecf20Sopenharmony_ci#define V_IRQ_FIFO2_RX 0x20 9208c2ecf20Sopenharmony_ci#define V_IRQ_FIFO3_TX 0x40 9218c2ecf20Sopenharmony_ci#define V_IRQ_FIFO3_RX 0x80 9228c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL1 */ 9238c2ecf20Sopenharmony_ci#define V_IRQ_FIFO4_TX 0x01 9248c2ecf20Sopenharmony_ci#define V_IRQ_FIFO4_RX 0x02 9258c2ecf20Sopenharmony_ci#define V_IRQ_FIFO5_TX 0x04 9268c2ecf20Sopenharmony_ci#define V_IRQ_FIFO5_RX 0x08 9278c2ecf20Sopenharmony_ci#define V_IRQ_FIFO6_TX 0x10 9288c2ecf20Sopenharmony_ci#define V_IRQ_FIFO6_RX 0x20 9298c2ecf20Sopenharmony_ci#define V_IRQ_FIFO7_TX 0x40 9308c2ecf20Sopenharmony_ci#define V_IRQ_FIFO7_RX 0x80 9318c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL2 */ 9328c2ecf20Sopenharmony_ci#define V_IRQ_FIFO8_TX 0x01 9338c2ecf20Sopenharmony_ci#define V_IRQ_FIFO8_RX 0x02 9348c2ecf20Sopenharmony_ci#define V_IRQ_FIFO9_TX 0x04 9358c2ecf20Sopenharmony_ci#define V_IRQ_FIFO9_RX 0x08 9368c2ecf20Sopenharmony_ci#define V_IRQ_FIFO10_TX 0x10 9378c2ecf20Sopenharmony_ci#define V_IRQ_FIFO10_RX 0x20 9388c2ecf20Sopenharmony_ci#define V_IRQ_FIFO11_TX 0x40 9398c2ecf20Sopenharmony_ci#define V_IRQ_FIFO11_RX 0x80 9408c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL3 */ 9418c2ecf20Sopenharmony_ci#define V_IRQ_FIFO12_TX 0x01 9428c2ecf20Sopenharmony_ci#define V_IRQ_FIFO12_RX 0x02 9438c2ecf20Sopenharmony_ci#define V_IRQ_FIFO13_TX 0x04 9448c2ecf20Sopenharmony_ci#define V_IRQ_FIFO13_RX 0x08 9458c2ecf20Sopenharmony_ci#define V_IRQ_FIFO14_TX 0x10 9468c2ecf20Sopenharmony_ci#define V_IRQ_FIFO14_RX 0x20 9478c2ecf20Sopenharmony_ci#define V_IRQ_FIFO15_TX 0x40 9488c2ecf20Sopenharmony_ci#define V_IRQ_FIFO15_RX 0x80 9498c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL4 */ 9508c2ecf20Sopenharmony_ci#define V_IRQ_FIFO16_TX 0x01 9518c2ecf20Sopenharmony_ci#define V_IRQ_FIFO16_RX 0x02 9528c2ecf20Sopenharmony_ci#define V_IRQ_FIFO17_TX 0x04 9538c2ecf20Sopenharmony_ci#define V_IRQ_FIFO17_RX 0x08 9548c2ecf20Sopenharmony_ci#define V_IRQ_FIFO18_TX 0x10 9558c2ecf20Sopenharmony_ci#define V_IRQ_FIFO18_RX 0x20 9568c2ecf20Sopenharmony_ci#define V_IRQ_FIFO19_TX 0x40 9578c2ecf20Sopenharmony_ci#define V_IRQ_FIFO19_RX 0x80 9588c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL5 */ 9598c2ecf20Sopenharmony_ci#define V_IRQ_FIFO20_TX 0x01 9608c2ecf20Sopenharmony_ci#define V_IRQ_FIFO20_RX 0x02 9618c2ecf20Sopenharmony_ci#define V_IRQ_FIFO21_TX 0x04 9628c2ecf20Sopenharmony_ci#define V_IRQ_FIFO21_RX 0x08 9638c2ecf20Sopenharmony_ci#define V_IRQ_FIFO22_TX 0x10 9648c2ecf20Sopenharmony_ci#define V_IRQ_FIFO22_RX 0x20 9658c2ecf20Sopenharmony_ci#define V_IRQ_FIFO23_TX 0x40 9668c2ecf20Sopenharmony_ci#define V_IRQ_FIFO23_RX 0x80 9678c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL6 */ 9688c2ecf20Sopenharmony_ci#define V_IRQ_FIFO24_TX 0x01 9698c2ecf20Sopenharmony_ci#define V_IRQ_FIFO24_RX 0x02 9708c2ecf20Sopenharmony_ci#define V_IRQ_FIFO25_TX 0x04 9718c2ecf20Sopenharmony_ci#define V_IRQ_FIFO25_RX 0x08 9728c2ecf20Sopenharmony_ci#define V_IRQ_FIFO26_TX 0x10 9738c2ecf20Sopenharmony_ci#define V_IRQ_FIFO26_RX 0x20 9748c2ecf20Sopenharmony_ci#define V_IRQ_FIFO27_TX 0x40 9758c2ecf20Sopenharmony_ci#define V_IRQ_FIFO27_RX 0x80 9768c2ecf20Sopenharmony_ci/* R_IRQ_FIFO_BL7 */ 9778c2ecf20Sopenharmony_ci#define V_IRQ_FIFO28_TX 0x01 9788c2ecf20Sopenharmony_ci#define V_IRQ_FIFO28_RX 0x02 9798c2ecf20Sopenharmony_ci#define V_IRQ_FIFO29_TX 0x04 9808c2ecf20Sopenharmony_ci#define V_IRQ_FIFO29_RX 0x08 9818c2ecf20Sopenharmony_ci#define V_IRQ_FIFO30_TX 0x10 9828c2ecf20Sopenharmony_ci#define V_IRQ_FIFO30_RX 0x20 9838c2ecf20Sopenharmony_ci#define V_IRQ_FIFO31_TX 0x40 9848c2ecf20Sopenharmony_ci#define V_IRQ_FIFO31_RX 0x80 9858c2ecf20Sopenharmony_ci 9868c2ecf20Sopenharmony_ci/* chapter 13: general purpose I/O pins (GPIO) and input pins (GPI) */ 9878c2ecf20Sopenharmony_ci/* R_GPIO_OUT0 */ 9888c2ecf20Sopenharmony_ci#define V_GPIO_OUT0 0x01 9898c2ecf20Sopenharmony_ci#define V_GPIO_OUT1 0x02 9908c2ecf20Sopenharmony_ci#define V_GPIO_OUT2 0x04 9918c2ecf20Sopenharmony_ci#define V_GPIO_OUT3 0x08 9928c2ecf20Sopenharmony_ci#define V_GPIO_OUT4 0x10 9938c2ecf20Sopenharmony_ci#define V_GPIO_OUT5 0x20 9948c2ecf20Sopenharmony_ci#define V_GPIO_OUT6 0x40 9958c2ecf20Sopenharmony_ci#define V_GPIO_OUT7 0x80 9968c2ecf20Sopenharmony_ci/* R_GPIO_OUT1 */ 9978c2ecf20Sopenharmony_ci#define V_GPIO_OUT8 0x01 9988c2ecf20Sopenharmony_ci#define V_GPIO_OUT9 0x02 9998c2ecf20Sopenharmony_ci#define V_GPIO_OUT10 0x04 10008c2ecf20Sopenharmony_ci#define V_GPIO_OUT11 0x08 10018c2ecf20Sopenharmony_ci#define V_GPIO_OUT12 0x10 10028c2ecf20Sopenharmony_ci#define V_GPIO_OUT13 0x20 10038c2ecf20Sopenharmony_ci#define V_GPIO_OUT14 0x40 10048c2ecf20Sopenharmony_ci#define V_GPIO_OUT15 0x80 10058c2ecf20Sopenharmony_ci/* R_GPIO_EN0 */ 10068c2ecf20Sopenharmony_ci#define V_GPIO_EN0 0x01 10078c2ecf20Sopenharmony_ci#define V_GPIO_EN1 0x02 10088c2ecf20Sopenharmony_ci#define V_GPIO_EN2 0x04 10098c2ecf20Sopenharmony_ci#define V_GPIO_EN3 0x08 10108c2ecf20Sopenharmony_ci#define V_GPIO_EN4 0x10 10118c2ecf20Sopenharmony_ci#define V_GPIO_EN5 0x20 10128c2ecf20Sopenharmony_ci#define V_GPIO_EN6 0x40 10138c2ecf20Sopenharmony_ci#define V_GPIO_EN7 0x80 10148c2ecf20Sopenharmony_ci/* R_GPIO_EN1 */ 10158c2ecf20Sopenharmony_ci#define V_GPIO_EN8 0x01 10168c2ecf20Sopenharmony_ci#define V_GPIO_EN9 0x02 10178c2ecf20Sopenharmony_ci#define V_GPIO_EN10 0x04 10188c2ecf20Sopenharmony_ci#define V_GPIO_EN11 0x08 10198c2ecf20Sopenharmony_ci#define V_GPIO_EN12 0x10 10208c2ecf20Sopenharmony_ci#define V_GPIO_EN13 0x20 10218c2ecf20Sopenharmony_ci#define V_GPIO_EN14 0x40 10228c2ecf20Sopenharmony_ci#define V_GPIO_EN15 0x80 10238c2ecf20Sopenharmony_ci/* R_GPIO_SEL */ 10248c2ecf20Sopenharmony_ci#define V_GPIO_SEL0 0x01 10258c2ecf20Sopenharmony_ci#define V_GPIO_SEL1 0x02 10268c2ecf20Sopenharmony_ci#define V_GPIO_SEL2 0x04 10278c2ecf20Sopenharmony_ci#define V_GPIO_SEL3 0x08 10288c2ecf20Sopenharmony_ci#define V_GPIO_SEL4 0x10 10298c2ecf20Sopenharmony_ci#define V_GPIO_SEL5 0x20 10308c2ecf20Sopenharmony_ci#define V_GPIO_SEL6 0x40 10318c2ecf20Sopenharmony_ci#define V_GPIO_SEL7 0x80 10328c2ecf20Sopenharmony_ci/* R_GPIO_IN0 */ 10338c2ecf20Sopenharmony_ci#define V_GPIO_IN0 0x01 10348c2ecf20Sopenharmony_ci#define V_GPIO_IN1 0x02 10358c2ecf20Sopenharmony_ci#define V_GPIO_IN2 0x04 10368c2ecf20Sopenharmony_ci#define V_GPIO_IN3 0x08 10378c2ecf20Sopenharmony_ci#define V_GPIO_IN4 0x10 10388c2ecf20Sopenharmony_ci#define V_GPIO_IN5 0x20 10398c2ecf20Sopenharmony_ci#define V_GPIO_IN6 0x40 10408c2ecf20Sopenharmony_ci#define V_GPIO_IN7 0x80 10418c2ecf20Sopenharmony_ci/* R_GPIO_IN1 */ 10428c2ecf20Sopenharmony_ci#define V_GPIO_IN8 0x01 10438c2ecf20Sopenharmony_ci#define V_GPIO_IN9 0x02 10448c2ecf20Sopenharmony_ci#define V_GPIO_IN10 0x04 10458c2ecf20Sopenharmony_ci#define V_GPIO_IN11 0x08 10468c2ecf20Sopenharmony_ci#define V_GPIO_IN12 0x10 10478c2ecf20Sopenharmony_ci#define V_GPIO_IN13 0x20 10488c2ecf20Sopenharmony_ci#define V_GPIO_IN14 0x40 10498c2ecf20Sopenharmony_ci#define V_GPIO_IN15 0x80 10508c2ecf20Sopenharmony_ci/* R_GPI_IN0 */ 10518c2ecf20Sopenharmony_ci#define V_GPI_IN0 0x01 10528c2ecf20Sopenharmony_ci#define V_GPI_IN1 0x02 10538c2ecf20Sopenharmony_ci#define V_GPI_IN2 0x04 10548c2ecf20Sopenharmony_ci#define V_GPI_IN3 0x08 10558c2ecf20Sopenharmony_ci#define V_GPI_IN4 0x10 10568c2ecf20Sopenharmony_ci#define V_GPI_IN5 0x20 10578c2ecf20Sopenharmony_ci#define V_GPI_IN6 0x40 10588c2ecf20Sopenharmony_ci#define V_GPI_IN7 0x80 10598c2ecf20Sopenharmony_ci/* R_GPI_IN1 */ 10608c2ecf20Sopenharmony_ci#define V_GPI_IN8 0x01 10618c2ecf20Sopenharmony_ci#define V_GPI_IN9 0x02 10628c2ecf20Sopenharmony_ci#define V_GPI_IN10 0x04 10638c2ecf20Sopenharmony_ci#define V_GPI_IN11 0x08 10648c2ecf20Sopenharmony_ci#define V_GPI_IN12 0x10 10658c2ecf20Sopenharmony_ci#define V_GPI_IN13 0x20 10668c2ecf20Sopenharmony_ci#define V_GPI_IN14 0x40 10678c2ecf20Sopenharmony_ci#define V_GPI_IN15 0x80 10688c2ecf20Sopenharmony_ci/* R_GPI_IN2 */ 10698c2ecf20Sopenharmony_ci#define V_GPI_IN16 0x01 10708c2ecf20Sopenharmony_ci#define V_GPI_IN17 0x02 10718c2ecf20Sopenharmony_ci#define V_GPI_IN18 0x04 10728c2ecf20Sopenharmony_ci#define V_GPI_IN19 0x08 10738c2ecf20Sopenharmony_ci#define V_GPI_IN20 0x10 10748c2ecf20Sopenharmony_ci#define V_GPI_IN21 0x20 10758c2ecf20Sopenharmony_ci#define V_GPI_IN22 0x40 10768c2ecf20Sopenharmony_ci#define V_GPI_IN23 0x80 10778c2ecf20Sopenharmony_ci/* R_GPI_IN3 */ 10788c2ecf20Sopenharmony_ci#define V_GPI_IN24 0x01 10798c2ecf20Sopenharmony_ci#define V_GPI_IN25 0x02 10808c2ecf20Sopenharmony_ci#define V_GPI_IN26 0x04 10818c2ecf20Sopenharmony_ci#define V_GPI_IN27 0x08 10828c2ecf20Sopenharmony_ci#define V_GPI_IN28 0x10 10838c2ecf20Sopenharmony_ci#define V_GPI_IN29 0x20 10848c2ecf20Sopenharmony_ci#define V_GPI_IN30 0x40 10858c2ecf20Sopenharmony_ci#define V_GPI_IN31 0x80 10868c2ecf20Sopenharmony_ci 10878c2ecf20Sopenharmony_ci/* map of all registers, used for debugging */ 10888c2ecf20Sopenharmony_ci 10898c2ecf20Sopenharmony_ci#ifdef HFC_REGISTER_DEBUG 10908c2ecf20Sopenharmony_cistruct hfc_register_names { 10918c2ecf20Sopenharmony_ci char *name; 10928c2ecf20Sopenharmony_ci u_char reg; 10938c2ecf20Sopenharmony_ci} hfc_register_names[] = { 10948c2ecf20Sopenharmony_ci /* write registers */ 10958c2ecf20Sopenharmony_ci {"R_CIRM", 0x00}, 10968c2ecf20Sopenharmony_ci {"R_CTRL", 0x01}, 10978c2ecf20Sopenharmony_ci {"R_BRG_PCM_CFG ", 0x02}, 10988c2ecf20Sopenharmony_ci {"R_RAM_ADDR0", 0x08}, 10998c2ecf20Sopenharmony_ci {"R_RAM_ADDR1", 0x09}, 11008c2ecf20Sopenharmony_ci {"R_RAM_ADDR2", 0x0A}, 11018c2ecf20Sopenharmony_ci {"R_FIRST_FIFO", 0x0B}, 11028c2ecf20Sopenharmony_ci {"R_RAM_SZ", 0x0C}, 11038c2ecf20Sopenharmony_ci {"R_FIFO_MD", 0x0D}, 11048c2ecf20Sopenharmony_ci {"R_INC_RES_FIFO", 0x0E}, 11058c2ecf20Sopenharmony_ci {"R_FIFO / R_FSM_IDX", 0x0F}, 11068c2ecf20Sopenharmony_ci {"R_SLOT", 0x10}, 11078c2ecf20Sopenharmony_ci {"R_IRQMSK_MISC", 0x11}, 11088c2ecf20Sopenharmony_ci {"R_SCI_MSK", 0x12}, 11098c2ecf20Sopenharmony_ci {"R_IRQ_CTRL", 0x13}, 11108c2ecf20Sopenharmony_ci {"R_PCM_MD0", 0x14}, 11118c2ecf20Sopenharmony_ci {"R_0x15", 0x15}, 11128c2ecf20Sopenharmony_ci {"R_ST_SEL", 0x16}, 11138c2ecf20Sopenharmony_ci {"R_ST_SYNC", 0x17}, 11148c2ecf20Sopenharmony_ci {"R_CONF_EN", 0x18}, 11158c2ecf20Sopenharmony_ci {"R_TI_WD", 0x1A}, 11168c2ecf20Sopenharmony_ci {"R_BERT_WD_MD", 0x1B}, 11178c2ecf20Sopenharmony_ci {"R_DTMF", 0x1C}, 11188c2ecf20Sopenharmony_ci {"R_DTMF_N", 0x1D}, 11198c2ecf20Sopenharmony_ci {"R_E1_XX_STA", 0x20}, 11208c2ecf20Sopenharmony_ci {"R_LOS0", 0x22}, 11218c2ecf20Sopenharmony_ci {"R_LOS1", 0x23}, 11228c2ecf20Sopenharmony_ci {"R_RX0", 0x24}, 11238c2ecf20Sopenharmony_ci {"R_RX_FR0", 0x25}, 11248c2ecf20Sopenharmony_ci {"R_RX_FR1", 0x26}, 11258c2ecf20Sopenharmony_ci {"R_TX0", 0x28}, 11268c2ecf20Sopenharmony_ci {"R_TX1", 0x29}, 11278c2ecf20Sopenharmony_ci {"R_TX_FR0", 0x2C}, 11288c2ecf20Sopenharmony_ci {"R_TX_FR1", 0x2D}, 11298c2ecf20Sopenharmony_ci {"R_TX_FR2", 0x2E}, 11308c2ecf20Sopenharmony_ci {"R_JATT_ATT", 0x2F}, 11318c2ecf20Sopenharmony_ci {"A_ST_xx_STA/R_RX_OFF", 0x30}, 11328c2ecf20Sopenharmony_ci {"A_ST_CTRL0/R_SYNC_OUT", 0x31}, 11338c2ecf20Sopenharmony_ci {"A_ST_CTRL1", 0x32}, 11348c2ecf20Sopenharmony_ci {"A_ST_CTRL2", 0x33}, 11358c2ecf20Sopenharmony_ci {"A_ST_SQ_WR", 0x34}, 11368c2ecf20Sopenharmony_ci {"R_TX_OFF", 0x34}, 11378c2ecf20Sopenharmony_ci {"R_SYNC_CTRL", 0x35}, 11388c2ecf20Sopenharmony_ci {"A_ST_CLK_DLY", 0x37}, 11398c2ecf20Sopenharmony_ci {"R_PWM0", 0x38}, 11408c2ecf20Sopenharmony_ci {"R_PWM1", 0x39}, 11418c2ecf20Sopenharmony_ci {"A_ST_B1_TX", 0x3C}, 11428c2ecf20Sopenharmony_ci {"A_ST_B2_TX", 0x3D}, 11438c2ecf20Sopenharmony_ci {"A_ST_D_TX", 0x3E}, 11448c2ecf20Sopenharmony_ci {"R_GPIO_OUT0", 0x40}, 11458c2ecf20Sopenharmony_ci {"R_GPIO_OUT1", 0x41}, 11468c2ecf20Sopenharmony_ci {"R_GPIO_EN0", 0x42}, 11478c2ecf20Sopenharmony_ci {"R_GPIO_EN1", 0x43}, 11488c2ecf20Sopenharmony_ci {"R_GPIO_SEL", 0x44}, 11498c2ecf20Sopenharmony_ci {"R_BRG_CTRL", 0x45}, 11508c2ecf20Sopenharmony_ci {"R_PWM_MD", 0x46}, 11518c2ecf20Sopenharmony_ci {"R_BRG_MD", 0x47}, 11528c2ecf20Sopenharmony_ci {"R_BRG_TIM0", 0x48}, 11538c2ecf20Sopenharmony_ci {"R_BRG_TIM1", 0x49}, 11548c2ecf20Sopenharmony_ci {"R_BRG_TIM2", 0x4A}, 11558c2ecf20Sopenharmony_ci {"R_BRG_TIM3", 0x4B}, 11568c2ecf20Sopenharmony_ci {"R_BRG_TIM_SEL01", 0x4C}, 11578c2ecf20Sopenharmony_ci {"R_BRG_TIM_SEL23", 0x4D}, 11588c2ecf20Sopenharmony_ci {"R_BRG_TIM_SEL45", 0x4E}, 11598c2ecf20Sopenharmony_ci {"R_BRG_TIM_SEL67", 0x4F}, 11608c2ecf20Sopenharmony_ci {"A_FIFO_DATA0-2", 0x80}, 11618c2ecf20Sopenharmony_ci {"A_FIFO_DATA0-2_NOINC", 0x84}, 11628c2ecf20Sopenharmony_ci {"R_RAM_DATA", 0xC0}, 11638c2ecf20Sopenharmony_ci {"A_SL_CFG", 0xD0}, 11648c2ecf20Sopenharmony_ci {"A_CONF", 0xD1}, 11658c2ecf20Sopenharmony_ci {"A_CH_MSK", 0xF4}, 11668c2ecf20Sopenharmony_ci {"A_CON_HDLC", 0xFA}, 11678c2ecf20Sopenharmony_ci {"A_SUBCH_CFG", 0xFB}, 11688c2ecf20Sopenharmony_ci {"A_CHANNEL", 0xFC}, 11698c2ecf20Sopenharmony_ci {"A_FIFO_SEQ", 0xFD}, 11708c2ecf20Sopenharmony_ci {"A_IRQ_MSK", 0xFF}, 11718c2ecf20Sopenharmony_ci {NULL, 0}, 11728c2ecf20Sopenharmony_ci 11738c2ecf20Sopenharmony_ci /* read registers */ 11748c2ecf20Sopenharmony_ci {"A_Z1", 0x04}, 11758c2ecf20Sopenharmony_ci {"A_Z1H", 0x05}, 11768c2ecf20Sopenharmony_ci {"A_Z2", 0x06}, 11778c2ecf20Sopenharmony_ci {"A_Z2H", 0x07}, 11788c2ecf20Sopenharmony_ci {"A_F1", 0x0C}, 11798c2ecf20Sopenharmony_ci {"A_F2", 0x0D}, 11808c2ecf20Sopenharmony_ci {"R_IRQ_OVIEW", 0x10}, 11818c2ecf20Sopenharmony_ci {"R_IRQ_MISC", 0x11}, 11828c2ecf20Sopenharmony_ci {"R_IRQ_STATECH", 0x12}, 11838c2ecf20Sopenharmony_ci {"R_CONF_OFLOW", 0x14}, 11848c2ecf20Sopenharmony_ci {"R_RAM_USE", 0x15}, 11858c2ecf20Sopenharmony_ci {"R_CHIP_ID", 0x16}, 11868c2ecf20Sopenharmony_ci {"R_BERT_STA", 0x17}, 11878c2ecf20Sopenharmony_ci {"R_F0_CNTL", 0x18}, 11888c2ecf20Sopenharmony_ci {"R_F0_CNTH", 0x19}, 11898c2ecf20Sopenharmony_ci {"R_BERT_ECL", 0x1A}, 11908c2ecf20Sopenharmony_ci {"R_BERT_ECH", 0x1B}, 11918c2ecf20Sopenharmony_ci {"R_STATUS", 0x1C}, 11928c2ecf20Sopenharmony_ci {"R_CHIP_RV", 0x1F}, 11938c2ecf20Sopenharmony_ci {"R_STATE", 0x20}, 11948c2ecf20Sopenharmony_ci {"R_SYNC_STA", 0x24}, 11958c2ecf20Sopenharmony_ci {"R_RX_SL0_0", 0x25}, 11968c2ecf20Sopenharmony_ci {"R_RX_SL0_1", 0x26}, 11978c2ecf20Sopenharmony_ci {"R_RX_SL0_2", 0x27}, 11988c2ecf20Sopenharmony_ci {"R_JATT_DIR", 0x2b}, 11998c2ecf20Sopenharmony_ci {"R_SLIP", 0x2c}, 12008c2ecf20Sopenharmony_ci {"A_ST_RD_STA", 0x30}, 12018c2ecf20Sopenharmony_ci {"R_FAS_ECL", 0x30}, 12028c2ecf20Sopenharmony_ci {"R_FAS_ECH", 0x31}, 12038c2ecf20Sopenharmony_ci {"R_VIO_ECL", 0x32}, 12048c2ecf20Sopenharmony_ci {"R_VIO_ECH", 0x33}, 12058c2ecf20Sopenharmony_ci {"R_CRC_ECL / A_ST_SQ_RD", 0x34}, 12068c2ecf20Sopenharmony_ci {"R_CRC_ECH", 0x35}, 12078c2ecf20Sopenharmony_ci {"R_E_ECL", 0x36}, 12088c2ecf20Sopenharmony_ci {"R_E_ECH", 0x37}, 12098c2ecf20Sopenharmony_ci {"R_SA6_SA13_ECL", 0x38}, 12108c2ecf20Sopenharmony_ci {"R_SA6_SA13_ECH", 0x39}, 12118c2ecf20Sopenharmony_ci {"R_SA6_SA23_ECL", 0x3A}, 12128c2ecf20Sopenharmony_ci {"R_SA6_SA23_ECH", 0x3B}, 12138c2ecf20Sopenharmony_ci {"A_ST_B1_RX", 0x3C}, 12148c2ecf20Sopenharmony_ci {"A_ST_B2_RX", 0x3D}, 12158c2ecf20Sopenharmony_ci {"A_ST_D_RX", 0x3E}, 12168c2ecf20Sopenharmony_ci {"A_ST_E_RX", 0x3F}, 12178c2ecf20Sopenharmony_ci {"R_GPIO_IN0", 0x40}, 12188c2ecf20Sopenharmony_ci {"R_GPIO_IN1", 0x41}, 12198c2ecf20Sopenharmony_ci {"R_GPI_IN0", 0x44}, 12208c2ecf20Sopenharmony_ci {"R_GPI_IN1", 0x45}, 12218c2ecf20Sopenharmony_ci {"R_GPI_IN2", 0x46}, 12228c2ecf20Sopenharmony_ci {"R_GPI_IN3", 0x47}, 12238c2ecf20Sopenharmony_ci {"A_FIFO_DATA0-2", 0x80}, 12248c2ecf20Sopenharmony_ci {"A_FIFO_DATA0-2_NOINC", 0x84}, 12258c2ecf20Sopenharmony_ci {"R_INT_DATA", 0x88}, 12268c2ecf20Sopenharmony_ci {"R_RAM_DATA", 0xC0}, 12278c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL0", 0xC8}, 12288c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL1", 0xC9}, 12298c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL2", 0xCA}, 12308c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL3", 0xCB}, 12318c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL4", 0xCC}, 12328c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL5", 0xCD}, 12338c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL6", 0xCE}, 12348c2ecf20Sopenharmony_ci {"R_IRQ_FIFO_BL7", 0xCF}, 12358c2ecf20Sopenharmony_ci}; 12368c2ecf20Sopenharmony_ci#endif /* HFC_REGISTER_DEBUG */ 1237