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