xref: /linux/include/soc/qcom/qcom-spmi-pmic.h (revision 8a922b7728a93d837954315c98b84f6b78de0c4f)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (c) 2022 Linaro. All rights reserved.
3  * Author: Caleb Connolly <caleb.connolly@linaro.org>
4  */
5 
6 #ifndef __QCOM_SPMI_PMIC_H__
7 #define __QCOM_SPMI_PMIC_H__
8 
9 #include <linux/device.h>
10 
11 #define COMMON_SUBTYPE		0x00
12 #define PM8941_SUBTYPE		0x01
13 #define PM8841_SUBTYPE		0x02
14 #define PM8019_SUBTYPE		0x03
15 #define PM8226_SUBTYPE		0x04
16 #define PM8110_SUBTYPE		0x05
17 #define PMA8084_SUBTYPE		0x06
18 #define PMI8962_SUBTYPE		0x07
19 #define PMD9635_SUBTYPE		0x08
20 #define PM8994_SUBTYPE		0x09
21 #define PMI8994_SUBTYPE		0x0a
22 #define PM8916_SUBTYPE		0x0b
23 #define PM8004_SUBTYPE		0x0c
24 #define PM8909_SUBTYPE		0x0d
25 #define PM8028_SUBTYPE		0x0e
26 #define PM8901_SUBTYPE		0x0f
27 #define PM8950_SUBTYPE		0x10
28 #define PMI8950_SUBTYPE		0x11
29 #define PMK8001_SUBTYPE		0x12
30 #define PMI8996_SUBTYPE		0x13
31 #define PM8998_SUBTYPE		0x14
32 #define PMI8998_SUBTYPE		0x15
33 #define PM8005_SUBTYPE		0x18
34 #define PM660L_SUBTYPE		0x1a
35 #define PM660_SUBTYPE		0x1b
36 #define PM8150_SUBTYPE		0x1e
37 #define PM8150L_SUBTYPE		0x1f
38 #define PM8150B_SUBTYPE		0x20
39 #define PMK8002_SUBTYPE		0x21
40 #define PM8009_SUBTYPE		0x24
41 #define PMI632_SUBTYPE		0x25
42 #define PM8150C_SUBTYPE		0x26
43 #define PM6150_SUBTYPE		0x28
44 #define SMB2351_SUBTYPE		0x29
45 #define PM8008_SUBTYPE		0x2c
46 #define PM6125_SUBTYPE		0x2d
47 #define PM7250B_SUBTYPE		0x2e
48 #define PMK8350_SUBTYPE		0x2f
49 #define PMR735B_SUBTYPE		0x34
50 #define PM6350_SUBTYPE		0x36
51 #define PM2250_SUBTYPE		0x37
52 
53 #define PMI8998_FAB_ID_SMIC	0x11
54 #define PMI8998_FAB_ID_GF	0x30
55 
56 #define PM660_FAB_ID_GF		0x0
57 #define PM660_FAB_ID_TSMC	0x2
58 #define PM660_FAB_ID_MX		0x3
59 
60 struct qcom_spmi_pmic {
61 	unsigned int type;
62 	unsigned int subtype;
63 	unsigned int major;
64 	unsigned int minor;
65 	unsigned int rev2;
66 	unsigned int fab_id;
67 	const char *name;
68 };
69 
70 const struct qcom_spmi_pmic *qcom_pmic_get(struct device *dev);
71 
72 #endif /* __QCOM_SPMI_PMIC_H__ */
73