tps65217pmicreg.h revision 1.6.4.2 1 1.6.4.2 yamt /* $NetBSD: tps65217pmicreg.h,v 1.6.4.2 2014/05/22 11:40:21 yamt Exp $ */
2 1.6.4.2 yamt
3 1.6.4.2 yamt /*-
4 1.6.4.2 yamt * Copyright (c) 2013 The NetBSD Foundation, Inc.
5 1.6.4.2 yamt * All rights reserved.
6 1.6.4.2 yamt *
7 1.6.4.2 yamt * This code is derived from software contributed to The NetBSD Foundation
8 1.6.4.2 yamt * by Radoslaw Kujawa.
9 1.6.4.2 yamt *
10 1.6.4.2 yamt * Redistribution and use in source and binary forms, with or without
11 1.6.4.2 yamt * modification, are permitted provided that the following conditions
12 1.6.4.2 yamt * are met:
13 1.6.4.2 yamt * 1. Redistributions of source code must retain the above copyright
14 1.6.4.2 yamt * notice, this list of conditions and the following disclaimer.
15 1.6.4.2 yamt * 2. Redistributions in binary form must reproduce the above copyright
16 1.6.4.2 yamt * notice, this list of conditions and the following disclaimer in the
17 1.6.4.2 yamt * documentation and/or other materials provided with the distribution.
18 1.6.4.2 yamt *
19 1.6.4.2 yamt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 1.6.4.2 yamt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.6.4.2 yamt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.6.4.2 yamt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 1.6.4.2 yamt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.6.4.2 yamt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.6.4.2 yamt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.6.4.2 yamt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.6.4.2 yamt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.6.4.2 yamt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.6.4.2 yamt * POSSIBILITY OF SUCH DAMAGE.
30 1.6.4.2 yamt */
31 1.6.4.2 yamt
32 1.6.4.2 yamt /*#include <sys/cdefs.h>*/
33 1.6.4.2 yamt
34 1.6.4.2 yamt #ifndef _TPS65217PMICREG_H_
35 1.6.4.2 yamt #define _TPS65217PMICREG_H_
36 1.6.4.2 yamt
37 1.6.4.2 yamt #define TPS65217PMIC_ADDR 0x24
38 1.6.4.2 yamt
39 1.6.4.2 yamt #define TPS65217PMIC_CHIPID 0x00
40 1.6.4.2 yamt #define TPS65217PMIC_CHIPID_VER_MASK 0xF0
41 1.6.4.2 yamt #define TPS65217PMIC_CHIPID_REV_MASK 0x0F
42 1.6.4.2 yamt #define TPS65217PMIC_CHIPID_VER_A 0x70
43 1.6.4.2 yamt #define TPS65217PMIC_CHIPID_VER_B 0xF0
44 1.6.4.2 yamt #define TPS65217PMIC_CHIPID_VER_C 0xE0
45 1.6.4.2 yamt #define TPS65217PMIC_CHIPID_VER_D 0x60
46 1.6.4.2 yamt
47 1.6.4.2 yamt #define TPS65217PMIC_PPATH 0x01
48 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IUSB __BITS(0,1)
49 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IUSB_100MA 0
50 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IUSB_500MA 1
51 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IUSB_1300MA 2
52 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IUSB_1800MA 3
53 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IAC __BITS(2,3)
54 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IAC_RSHFIT 2
55 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IAC_100MA 0
56 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IAC_500MA 1
57 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IAC_1300MA 2
58 1.6.4.2 yamt #define TPS65217PMIC_PPATH_IAC_2500MA 3
59 1.6.4.2 yamt #define TPS65217PMIC_PPATH_USB_EN __BIT(4)
60 1.6.4.2 yamt #define TPS65217PMIC_PPATH_AC_EN __BIT(5)
61 1.6.4.2 yamt
62 1.6.4.2 yamt #define TPS65217PMIC_INT 0x02
63 1.6.4.2 yamt #define TPS65217PMIC_INT_USBI __BIT(0)
64 1.6.4.2 yamt #define TPS65217PMIC_INT_ACI __BIT(1)
65 1.6.4.2 yamt #define TPS65217PMIC_INT_PBI __BIT(2)
66 1.6.4.2 yamt #define TPS65217PMIC_INT_USBM __BIT(4)
67 1.6.4.2 yamt #define TPS65217PMIC_INT_ACM __BIT(5)
68 1.6.4.2 yamt #define TPS65217PMIC_INT_PBM __BIT(6)
69 1.6.4.2 yamt
70 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1 0x07
71 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_FDIM __BITS(1,0)
72 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_FDIM_100Hz 0
73 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_FDIM_200Hz 1
74 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_FDIM_500Hz 2
75 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_FDIM_1000Hz 3
76 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_ISEL __BIT(2)
77 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL1_ISINK_EN __BIT(3)
78 1.6.4.2 yamt
79 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL2 0x08
80 1.6.4.2 yamt #define TPS65217PMIC_WLEDCTRL2_DUTY __BITS(6,0)
81 1.6.4.2 yamt
82 1.6.4.2 yamt #define TPS65217PMIC_STATUS 0x0A
83 1.6.4.2 yamt #define TPS65217PMIC_STATUS_USBPWR __BIT(2)
84 1.6.4.2 yamt #define TPS65217PMIC_STATUS_ACPWR __BIT(3)
85 1.6.4.2 yamt
86 1.6.4.2 yamt #define TPS65217PMIC_PGOOD 0x0C
87 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_LDO3PG __BIT(0)
88 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_LDO4PG __BIT(1)
89 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_DC1PG __BIT(2)
90 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_DC2PG __BIT(3)
91 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_DC3PG __BIT(4)
92 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_LDO1PG __BIT(5)
93 1.6.4.2 yamt #define TPS65217PMIC_PGOOD_LDO2PG __BIT(6)
94 1.6.4.2 yamt
95 1.6.4.2 yamt #define TPS65217PMIC_DEFLDO1 0x12
96 1.6.4.2 yamt #define TPS65217PMIC_DEFLDO2 0x13
97 1.6.4.2 yamt #define TPS65217PMIC_DEFLDO3 0x14
98 1.6.4.2 yamt #define TPS65217PMIC_DEFLDO4 0x15
99 1.6.4.2 yamt #define TPS65217PMIC_DEFDCDC1 0x0E
100 1.6.4.2 yamt #define TPS65217PMIC_DEFDCDC2 0x0F
101 1.6.4.2 yamt #define TPS65217PMIC_DEFDCDC3 0x10
102 1.6.4.2 yamt
103 1.6.4.2 yamt #define TPS65217PMIC_DEFX_VOLTAGE_16 __BITS(0,3)
104 1.6.4.2 yamt #define TPS65217PMIC_DEFX_VOLTAGE_32 __BITS(0,4)
105 1.6.4.2 yamt #define TPS65217PMIC_DEFX_VOLTAGE_64 __BITS(0,5)
106 1.6.4.2 yamt #define TPS65217PMIC_DEFX_TRACKING __BIT(6)
107 1.6.4.2 yamt #define TPS65217PMIC_DEFX_XADJ __BIT(7)
108 1.6.4.2 yamt #define TPS65217PMIC_DEFX_LS __BIT(5)
109 1.6.4.2 yamt
110 1.6.4.2 yamt #define TPS65217PMIC_ENABLE 0x16
111 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_LDO2 __BIT(0)
112 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_LDO1 __BIT(1)
113 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_DCDC3 __BIT(2)
114 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_DCDC2 __BIT(3)
115 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_DCDC1 __BIT(4)
116 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_LDO4 __BIT(5)
117 1.6.4.2 yamt #define TPS65217PMIC_ENABLE_LDO3 __BIT(6)
118 1.6.4.2 yamt
119 1.6.4.2 yamt #endif /* _TPS65217PMICREG_H_ */
120