Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Tim Harvey | 5e2f017 | 2014-04-22 21:53:58 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2014 Gateworks Corporation |
| 4 | * Tim Harvey <tharvey@gateworks.com> |
Tim Harvey | 5e2f017 | 2014-04-22 21:53:58 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __LTC3676_PMIC_H_ |
| 8 | #define __LTC3676_PMIC_H_ |
| 9 | |
| 10 | /* LTC3676 registers */ |
| 11 | enum { |
| 12 | LTC3676_BUCK1 = 0x01, |
| 13 | LTC3676_BUCK2 = 0x02, |
| 14 | LTC3676_BUCK3 = 0x03, |
| 15 | LTC3676_BUCK4 = 0x04, |
| 16 | LTC3676_LDOA = 0x05, |
| 17 | LTC3676_LDOB = 0x06, |
| 18 | LTC3676_SQD1 = 0x07, |
| 19 | LTC3676_SQD2 = 0x08, |
| 20 | LTC3676_CNTRL = 0x09, |
| 21 | LTC3676_DVB1A = 0x0A, |
| 22 | LTC3676_DVB1B = 0x0B, |
| 23 | LTC3676_DVB2A = 0x0C, |
| 24 | LTC3676_DVB2B = 0x0D, |
| 25 | LTC3676_DVB3A = 0x0E, |
| 26 | LTC3676_DVB3B = 0x0F, |
| 27 | LTC3676_DVB4A = 0x10, |
| 28 | LTC3676_DVB4B = 0x11, |
| 29 | LTC3676_MSKIRQ = 0x12, |
| 30 | LTC3676_MSKPG = 0x13, |
| 31 | LTC3676_USER = 0x14, |
| 32 | LTC3676_HRST = 0x1E, |
| 33 | LTC3676_CLIRQ = 0x1F, |
| 34 | LTC3676_IRQSTAT = 0x15, |
| 35 | LTC3676_PGSTATL = 0x16, |
| 36 | LTC3676_PGSTATR = 0x17, |
| 37 | LTC3676_NUM_OF_REGS = 0x20, |
| 38 | }; |
| 39 | |
| 40 | /* |
| 41 | * SW Configuration |
| 42 | */ |
| 43 | |
| 44 | #define LTC3676_DVB_MASK 0x1f |
| 45 | #define LTC3676_PGOOD_MASK (1<<5) |
| 46 | #define LTC3676_REF_SELA (0<<5) |
| 47 | #define LTC3676_REF_SELB (1<<5) |
| 48 | |
| 49 | int power_ltc3676_init(unsigned char bus); |
| 50 | #endif |