diff options
-rw-r--r-- | firmware/export/mc13783.h | 16 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/firmware/export/mc13783.h b/firmware/export/mc13783.h index 32b788544e..d8b719be03 100644 --- a/firmware/export/mc13783.h +++ b/firmware/export/mc13783.h | |||
@@ -107,9 +107,7 @@ enum mc13783_regs_enum | |||
107 | #define MC13783_LOBATLI (0x1 << 13) | 107 | #define MC13783_LOBATLI (0x1 << 13) |
108 | #define MC13783_LOBATHI (0x1 << 14) | 108 | #define MC13783_LOBATHI (0x1 << 14) |
109 | #define MC13783_UDPI (0x1 << 15) | 109 | #define MC13783_UDPI (0x1 << 15) |
110 | #define MC13783_USB4V4I (0x1 << 16) | 110 | #define MC13783_USBI (0x1 << 16) |
111 | #define MC13783_USB2V0I (0x1 << 17) | ||
112 | #define MC13783_USB0V8I (0x1 << 18) | ||
113 | #define MC13783_IDFLOATI (0x1 << 19) | 111 | #define MC13783_IDFLOATI (0x1 << 19) |
114 | #define MC13783_SE1I (0x1 << 21) | 112 | #define MC13783_SE1I (0x1 << 21) |
115 | #define MC13783_CKDETI (0x1 << 22) | 113 | #define MC13783_CKDETI (0x1 << 22) |
@@ -131,9 +129,7 @@ enum mc13783_regs_enum | |||
131 | #define MC13783_LOBATLM (0x1 << 13) | 129 | #define MC13783_LOBATLM (0x1 << 13) |
132 | #define MC13783_LOBATHM (0x1 << 14) | 130 | #define MC13783_LOBATHM (0x1 << 14) |
133 | #define MC13783_UDPM (0x1 << 15) | 131 | #define MC13783_UDPM (0x1 << 15) |
134 | #define MC13783_USB4V4M (0x1 << 16) | 132 | #define MC13783_USBM (0x1 << 16) |
135 | #define MC13783_USB2V0M (0x1 << 17) | ||
136 | #define MC13783_USB0V8M (0x1 << 18) | ||
137 | #define MC13783_IDFLOATM (0x1 << 19) | 133 | #define MC13783_IDFLOATM (0x1 << 19) |
138 | #define MC13783_SE1M (0x1 << 21) | 134 | #define MC13783_SE1M (0x1 << 21) |
139 | #define MC13783_CKDETM (0x1 << 22) | 135 | #define MC13783_CKDETM (0x1 << 22) |
@@ -1040,6 +1036,8 @@ enum mc13783_regs_enum | |||
1040 | #define MC13783_VCHRG_3_800V (0x6 << 0) | 1036 | #define MC13783_VCHRG_3_800V (0x6 << 0) |
1041 | #define MC13783_VCHRG_4_500V (0x7 << 0) | 1037 | #define MC13783_VCHRG_4_500V (0x7 << 0) |
1042 | #define MC13783_ICHRG (0xf << 3) /* Min Nom Max */ | 1038 | #define MC13783_ICHRG (0xf << 3) /* Min Nom Max */ |
1039 | #define MC13783_ICHRGw(x) (((x) << 3) & MC13783_ICHRG) | ||
1040 | #define MC13783_ICHRGr(x) (((x) & MC13783_ICHRG) >> 3) | ||
1043 | #define MC13783_ICHRG_0MA (0x0 << 3) /* 0 0 0 */ | 1041 | #define MC13783_ICHRG_0MA (0x0 << 3) /* 0 0 0 */ |
1044 | #define MC13783_ICHRG_70MA (0x1 << 3) /* 55 70 85 */ | 1042 | #define MC13783_ICHRG_70MA (0x1 << 3) /* 55 70 85 */ |
1045 | #define MC13783_ICHRG_177MA (0x2 << 3) /* 161 177 195 */ | 1043 | #define MC13783_ICHRG_177MA (0x2 << 3) /* 161 177 195 */ |
@@ -1057,6 +1055,8 @@ enum mc13783_regs_enum | |||
1057 | #define MC13783_ICHRG_1596MA (0xe << 3) /* 1450 1596 1755 */ | 1055 | #define MC13783_ICHRG_1596MA (0xe << 3) /* 1450 1596 1755 */ |
1058 | #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */ | 1056 | #define MC13783_ICHRG_FULLY_ON (0xf << 3) /* Disallow HW FET turn on */ |
1059 | #define MC13783_ICHRGTR (0x7 << 7) /* Min Nom Max */ | 1057 | #define MC13783_ICHRGTR (0x7 << 7) /* Min Nom Max */ |
1058 | #define MC13783_ICHRGTRw(x) (((x) << 7) & MC13783_ICHRGTR) | ||
1059 | #define MC13783_ICHRGTRr(x) (((x) & MC13783_ICHRGTR) >> 7) | ||
1060 | #define MC13783_ICHRGTR_0MA (0x0 << 7) /* 0 0 0 */ | 1060 | #define MC13783_ICHRGTR_0MA (0x0 << 7) /* 0 0 0 */ |
1061 | #define MC13783_ICHRGTR_9MA (0x1 << 7) /* 6 9 12 */ | 1061 | #define MC13783_ICHRGTR_9MA (0x1 << 7) /* 6 9 12 */ |
1062 | #define MC13783_ICHRGTR_20MA (0x2 << 7) /* 14 20 26 */ | 1062 | #define MC13783_ICHRGTR_20MA (0x2 << 7) /* 14 20 26 */ |
@@ -1290,8 +1290,8 @@ int mc13783_read_regset(const unsigned char *regs, uint32_t *buffer, int count); | |||
1290 | /* Statically-registered event enable/disable */ | 1290 | /* Statically-registered event enable/disable */ |
1291 | enum mc13783_event_sets | 1291 | enum mc13783_event_sets |
1292 | { | 1292 | { |
1293 | MC13783_EVENT_SET0 = 0, | 1293 | MC13783_EVENT_SET0 = 0, /* *STATUS0/MASK0/SENSE0 */ |
1294 | MC13783_EVENT_SET1 = 1, | 1294 | MC13783_EVENT_SET1 = 1, /* *STATUS1/MASK1/SENSE1 */ |
1295 | }; | 1295 | }; |
1296 | 1296 | ||
1297 | struct mc13783_event | 1297 | struct mc13783_event |
diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c index 8fcba72909..e6238112d1 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | |||
@@ -62,7 +62,7 @@ static const struct mc13783_event mc13783_events[] = | |||
62 | [MC13783_USB4V4_EVENT] = /* USB insertion */ | 62 | [MC13783_USB4V4_EVENT] = /* USB insertion */ |
63 | { | 63 | { |
64 | .set = MC13783_EVENT_SET0, | 64 | .set = MC13783_EVENT_SET0, |
65 | .mask = MC13783_USB4V4M, | 65 | .mask = MC13783_USBM, |
66 | .callback = usb_connect_event, | 66 | .callback = usb_connect_event, |
67 | }, | 67 | }, |
68 | }; | 68 | }; |