1+ /* Copyright (c) 2024 Victor Chavez
2+ SPDX-License-Identifier: GPL-3.0-or-later
3+ */
4+ #define CQCFG_CQFILTEREN BIT(0)
5+ #define CQCFG_DRVDIS BIT(1)
6+ #define CQCFG_PUSHPUL BIT(2)
7+ #define CQCFG_NPN BIT(3)
8+ #define CQCFG_SINKSEL (x ) (((x) & 0x03) << 4)
9+ #define CQCFG_SINKSEL_MASK CQCFG_SINKSEL (0x3)
10+ #define CQCFG_SOURCESINK BIT(6)
11+ #define CQCFG_IEC3TH BIT(7)
12+
13+ #define CLOCK_XTALEN BIT (0)
14+ #define CLOCK_EXTCLKEN BIT (1)
15+ #define CLOCK_CLKDIV (x ) (((x) & 0x03) << 2)
16+ #define CLOCK_CLKDIV_MASK CLOCK_CLKDIV (0x03)
17+ #define CLOCK_CLKOEN BIT (4)
18+ #define CLOCK_EXTCLKMIS BIT (5)
19+ #define CLOCK_TXTXENDIS BIT (6)
20+ #define CLOCK_VCCWARNEN BIT (7)
21+
22+ #define IOSTCFG_DICSINK BIT (0)
23+ #define IOSTCFG_DICSOURCE BIT (1)
24+ #define IOSTCFG_DIEC3TH BIT (2)
25+ #define IOSTCFG_DIFILTEREN BIT (3)
26+ #define IOSTCFG_TX BIT (4)
27+ #define IOSTCFG_TXEN BIT (5)
28+ #define IOSTCFG_CQLEVEL BIT (6)
29+ #define IOSTCFG_DILEVEL BIT (7)
30+
31+ #define LPCNFG_LPEN BIT (0)
32+ #define LPCNFG_LPCLIMDIS BIT (1)
33+ #define LPCNFG_LPCL2X BIT (2)
34+ #define LPCNFG_LPBL (x ) (((x) & 0x03) << 3)
35+ #define LPCNFG_LPBL_MASK LPCNFG_BLA (0x03)
36+ #define LPCNFG_LPDYNBL BIT (5)
37+ #define LPCNFG_LPRT (x ) (((x) & 0x03) << 6)
38+ #define LPCNFG_LPRT_MASK LPCNFG_BLA (0x03)
39+
40+ #define CURR_100MA 0x00
41+ #define CURR_200MA 0x01
42+ #define CURR_300MA 0x02
43+ #define CURR_500MA 0x03
44+ #define DRVRCURRLIM_CLDIS BIT(5)
45+
46+ #define CURR_OFF 0x06
47+
48+ #define CL_CONF (x ) ((x) << CURR_OFF)
0 commit comments