34efca8f3409ce42c5db27720eb527dca5e2201f
[kernel/u-boot.git] / drivers / misc / max77686.c
1 /*
2  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * See file CREDITS for list of people who contributed to this
5  * project.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; either version 2 of
10  * the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20  * MA 02111-1307 USA
21  */
22
23 #include <common.h>
24 #include <i2c.h>
25 #include <max77686.h>
26
27 /*
28  * MAX77686 PMIC Registers
29  */
30 #define MAX77686_DEVICE_ID      0x00
31 #define MAX77686_INTSRC         0x01
32 #define MAX77686_INT1           0x02
33 #define MAX77686_INT2           0x03
34 #define MAX77686_INT1MSK        0x04
35 #define MAX77686_INT2MSK        0x05
36 #define MAX77686_STATUS1        0x06
37 #define MAX77686_STATUS2        0x07
38 #define MAX77686_PWRON          0x08
39 #define MAX77686_ONOFF_DELAY    0x09
40 #define MAX77686_MRSTB          0x0A
41
42 /* INT1 Bit Map */
43 #define MAX77686_INT1_MRSTB     (1 << 7)
44 #define MAX77686_INT1_ONKEY1S   (1 << 6)
45 #define MAX77686_INT1_ACOKBR    (1 << 5)
46 #define MAX77686_INT1_ACOKBF    (1 << 4)
47 #define MAX77686_INT1_PWRONR    (1 << 1)
48 #define MAX77686_INT1_PWRONF    (1 << 0)
49 /* PWRON Bit Map */
50 #define MAX77686_PWRON_WTSRON   (1 << 7)
51 #define MAX77686_PWRON_SMPLON   (1 << 6)
52 #define MAX77686_PWRON_RTCA2    (1 << 5)
53 #define MAX77686_PWRON_RTCA1    (1 << 4)
54 #define MAX77686_PWRON_MRSTB    (1 << 3)
55 #define MAX77686_PWRON_ACOKB    (1 << 2)
56 #define MAX77686_PWRON_JIGONB   (1 << 1)
57 #define MAX77686_PWRON_PWRON    (1 << 0)
58
59
60 /*
61  * MAX77686 RTC Registers
62  */
63 #define MAX77686_RTC_INT        0x00
64 #define MAX77686_RTC_UPDATE0    0x04
65 #define MAX77686_RTC_WTSR_SMPL  0x06
66
67 struct pmic_opmode {
68         /* not supported mode has '0xff' */
69         unsigned char off;
70         unsigned char standby;
71         unsigned char lpm;
72         unsigned char on;
73         unsigned char mask;
74 };
75
76 struct max77686_data {
77         unsigned char reg;
78         union opmode {
79                 struct pmic_opmode opmode;
80                 unsigned char opmodes[5];
81         } u;
82 };
83
84 static const char *opmode_str[] = { "OFF", "STANDBY", "LPM", "ON" };
85
86 static const struct max77686_data bucks[] = {
87         {.reg = 0xff,.u.opmode = {0xff, 0xff, 0xff, 0xff, 0xff},},      /* dummy */
88         {.reg = 0x10,.u.opmode = {0x00, 0x01, 0xff, 0x03, 0x03},},      /* BUCK1 */
89         {.reg = 0x12,.u.opmode = {0x00, 0x10, 0x20, 0x30, 0x30},},      /* BUCK2 */
90         {.reg = 0x1c,.u.opmode = {0x00, 0x10, 0x20, 0x30, 0x30},},      /* BUCK3 */
91         {.reg = 0x26,.u.opmode = {0x00, 0x10, 0x20, 0x30, 0x30},},      /* BUCK4 */
92         {.reg = 0x30,.u.opmode = {0x00, 0xff, 0xff, 0x03, 0x03},},      /* BUCK5 */
93         {.reg = 0x32,.u.opmode = {0x00, 0xff, 0xff, 0x03, 0x03},},      /* BUCK6 */
94         {.reg = 0x34,.u.opmode = {0x00, 0xff, 0xff, 0x03, 0x03},},      /* BUCK7 */
95         {.reg = 0x36,.u.opmode = {0x00, 0xff, 0xff, 0x03, 0x03},},      /* BUCK8 */
96         {.reg = 0x38,.u.opmode = {0x00, 0xff, 0xff, 0x03, 0x03},},      /* BUCK9 */
97 };
98
99 static const struct max77686_data ldos[] = {
100         {.reg = 0xff,.u.opmode = {0xff, 0xff, 0xff, 0xff, 0xff},},      /* dummy */
101         {.reg = 0x40,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO1 */
102         {.reg = 0x41,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO2 */
103         {.reg = 0x42,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO3 */
104         {.reg = 0x43,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO4 */
105         {.reg = 0x44,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO5 */
106         {.reg = 0x45,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO6 */
107         {.reg = 0x46,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO7 */
108         {.reg = 0x47,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO8 */
109         {.reg = 0x48,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO9 */
110         {.reg = 0x49,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO10 */
111         {.reg = 0x4a,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO11 */
112         {.reg = 0x4b,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO12 */
113         {.reg = 0x4c,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO13 */
114         {.reg = 0x4d,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO14 */
115         {.reg = 0x4e,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO15 */
116         {.reg = 0x4f,.u.opmode = {0x00, 0x40, 0x80, 0xc0, 0xc0},},      /* LDO16 */
117         {.reg = 0x50,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO17 */
118         {.reg = 0x51,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO18 */
119         {.reg = 0x52,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO19 */
120         {.reg = 0x53,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO20 */
121         {.reg = 0x54,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO21 */
122         {.reg = 0x55,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO22 */
123         {.reg = 0x56,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO23 */
124         {.reg = 0x57,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO24 */
125         {.reg = 0x58,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO25 */
126         {.reg = 0x59,.u.opmode = {0x00, 0xff, 0x80, 0xc0, 0xc0},},      /* LDO26 */
127 };
128
129 static const char * pwron_source[] = {
130         "PWRON",
131         "JIGONB",
132         "ACOKB",
133         "MRSTB",
134         "RTCA1",
135         "RTCA2",
136         "SMPLON",
137         "WTSRON"
138 };
139
140 static unsigned int pmic_bus = -1;
141
142 static unsigned char reg_int1 = -1;
143 static unsigned char reg_pwron = -1;
144
145 static ulong max77686_hex_to_voltage(int buck, int ldo, int hex);
146
147 void max77686_bus_init(int bus_num)
148 {
149         pmic_bus = bus_num;
150 }
151
152 void show_pwron_source(char *buf)
153 {
154         int i;
155         unsigned char addr = MAX77686_PMIC_ADDR;
156         unsigned char val;
157
158         i2c_read(addr, MAX77686_PWRON, 1, &val, 1);
159         for (i = 0; i < 8; i++) {
160                 if (val & (0x1 << i)) {
161                         printf("PWRON:\t%s (0x%02x)\n", pwron_source[i], val);
162                         if (buf)
163                                 sprintf(buf, "PWRON: %s (0x%02x)", pwron_source[i], val);
164                 }
165         }
166 }
167
168 /*
169  * RTC
170  */
171 static int max77686_rtc_probe(void)
172 {
173         unsigned char addr = MAX77686_RTC_ADDR;
174
175         i2c_set_bus_num(pmic_bus);
176
177         if (i2c_probe(addr)) {
178                 puts("Can't found max77686-rtc\n");
179                 return -1;
180         }
181
182         return 0;
183 }
184
185 static void max77686_rtc_read_update()
186 {
187         unsigned char addr = MAX77686_RTC_ADDR;
188         unsigned char val;
189
190         if (max77686_rtc_probe())
191                 return;
192
193         val = 0x10;
194         i2c_write(addr, MAX77686_RTC_UPDATE0, 1, &val, 1);
195         udelay(16000);
196 }
197
198 static void max77686_rtc_write_update()
199 {
200         unsigned char addr = MAX77686_RTC_ADDR;
201         unsigned char val;
202
203         if (max77686_rtc_probe())
204                 return;
205
206         val = 0x01;
207         i2c_write(addr, MAX77686_RTC_UPDATE0, 1, &val, 1);
208         udelay(16000);
209 }
210
211 void max77686_rtc_disable_wtsr_smpl(void)
212 {
213         unsigned char addr = MAX77686_RTC_ADDR;
214         unsigned char val;
215
216         if (max77686_rtc_probe())
217                 return;
218
219         val = 0;
220         i2c_write(addr, MAX77686_RTC_WTSR_SMPL, 1, &val, 1);
221         max77686_rtc_write_update();
222 }
223
224 int max77686_rtc_init(void)
225 {
226         unsigned char addr = MAX77686_RTC_ADDR;
227         unsigned char val;
228
229         if (max77686_rtc_probe())
230                 return -1;
231
232         /* clear int flag */
233         i2c_read(addr, MAX77686_RTC_INT, 1, &val, 1);
234
235         return 0;
236 }
237
238 /*
239  * PMIC
240  */
241 static int max77686_probe(void)
242 {
243         unsigned char addr = MAX77686_PMIC_ADDR;
244
245         i2c_set_bus_num(pmic_bus);
246
247         if (i2c_probe(addr)) {
248                 puts("Can't found max77686\n");
249                 return -1;
250         }
251
252         return 0;
253 }
254
255 int max77686_init(void)
256 {
257         unsigned char addr = MAX77686_PMIC_ADDR;
258
259         reg_int1 = 0;
260         reg_pwron = 0;
261
262         if (max77686_probe())
263                 return -1;
264
265         i2c_read(addr, MAX77686_INT1, 1, &reg_int1, 1);
266         i2c_read(addr, MAX77686_PWRON, 1, &reg_pwron, 1);
267
268         return 0;
269 }
270
271 int max77686_check_pwron_pwrkey(void)
272 {
273         /* check int1, not pwron */
274         return !!(reg_int1 & MAX77686_INT1_PWRONR);
275 }
276
277 int max77686_check_pwron_wtsr(void)
278 {
279         return !!(reg_pwron & MAX77686_PWRON_WTSRON);
280 }
281
282 int max77686_check_pwron_smpl(void)
283 {
284         return !!(reg_pwron & MAX77686_PWRON_SMPLON);
285 }
286
287 unsigned char max77686_get_reg_pwron(void)
288 {
289         return reg_pwron;
290 }
291
292 int max77686_check_acokb_pwron(void)
293 {
294         unsigned char addr = MAX77686_PMIC_ADDR;
295         unsigned char val;
296
297         if (max77686_probe())
298                 return -1;
299
300         i2c_read(addr, MAX77686_PWRON, 1, &val, 1);
301
302         return !!(val & MAX77686_PWRON_ACOKB);
303 }
304
305 int max77686_check_pwrkey(void)
306 {
307         unsigned char addr = MAX77686_PMIC_ADDR;
308         unsigned char val;
309
310         if (max77686_probe())
311                 return -1;
312
313         i2c_read(addr, MAX77686_INT1, 1, &val, 1);
314
315         return !!(val & MAX77686_INT1_PWRONR);
316 }
317
318 int max77686_clear_irq(void)
319 {
320         unsigned char addr = MAX77686_PMIC_ADDR;
321         unsigned char val[2];
322
323         if (max77686_probe())
324                 return -1;
325
326         i2c_read(addr, MAX77686_INT1, 1, val, 2);
327
328         return 0;
329 }
330
331 static int max77686_status(void)
332 {
333         unsigned char addr = MAX77686_PMIC_ADDR;
334         unsigned char val[2];
335         unsigned char opmode;
336         int i;
337
338         if (max77686_probe())
339                 return -1;
340
341         for (i = 1; i <= 9; i++) {
342                 printf("BUCK%d\t: ", i);
343
344                 if (2 <= i && i <= 4)
345                         i2c_read(addr, bucks[i].reg + 2, 1, val, 1);
346                 else
347                         i2c_read(addr, bucks[i].reg + 1, 1, val, 1);
348
349                 printf("%7uuV, ", max77686_hex_to_voltage(i, 0, val[0]));
350
351                 i2c_read(addr, bucks[i].reg, 1, val, 1);
352
353                 opmode = val[0] & bucks[i].u.opmode.mask;
354                 if (opmode == bucks[i].u.opmode.off)
355                         puts("OFF\n");
356                 else if (opmode == bucks[i].u.opmode.standby)
357                         puts("STANDBY (ON/OFF by PWRREQ)\n");
358                 else if (opmode == bucks[i].u.opmode.lpm)
359                         puts("LP\n");
360                 else if (opmode == bucks[i].u.opmode.on)
361                         puts("ON\n");
362                 else
363                         printf("unknown (0x%x)\n", val[0]);
364         }
365
366         for (i = 1; i <= 26; i++) {
367                 printf("LDO%d\t: ", i);
368
369                 i2c_read(addr, ldos[i].reg, 1, val, 1);
370
371                 printf("%7uuV, ", max77686_hex_to_voltage(0, i, val[0] & ~ldos[i].u.opmode.mask));
372
373                 opmode = val[0] & ldos[i].u.opmode.mask;
374                 if (opmode == ldos[i].u.opmode.off)
375                         puts("OFF\n");
376                 else if (opmode == ldos[i].u.opmode.standby)
377                         puts("STANDBY (ON/OFF by PWRREQ)\n");
378                 else if (opmode == ldos[i].u.opmode.lpm)
379                         puts("LP (ON with LPM by PWRREQ)\n");
380                 else if (opmode == ldos[i].u.opmode.on)
381                         puts("ON\n");
382                 else
383                         printf("unknown (0x%x)\n", val[0]);
384         }
385
386         return 0;
387 }
388
389 static ulong max77686_hex_to_voltage(int buck, int ldo, int hex)
390 {
391         ulong uV;
392
393         if (ldo) {
394                 switch (ldo) {
395                 case 1:
396                 case 2:
397                 case 6:
398                 case 7:
399                 case 8:
400                 case 15:
401                         /* 0x00..0x3f: 0.800V ~ 2.375V */
402                         if (hex > 0x3f) {
403                                 printf("warn: out of range (0x%x<0x3f)\n", hex);
404                                 hex = 0x3f;
405                         }
406
407                         uV = 800000 + hex * 25000;
408                         break;
409                 default:
410                         /* 0x00..0x3f: 0.800V ~ 3.950V*/
411                         if (hex > 0x3f) {
412                                 printf("warn: out of range (0x%x<0x3f)\n", hex);
413                                 hex = 0x3f;
414                         }
415
416                         uV = 800000 + hex * 50000;
417                         break;
418                 }
419
420                 return uV;
421         }
422
423         if (buck) {
424                 switch (buck) {
425                 case 2:
426                 case 3:
427                 case 4:
428                         /* 0x00..0xff: 0.600V ~ 3.7875V */
429                         if (hex > 0xff) {
430                                 printf("warn: out of range (0x%x<0xff)\n", hex);
431                                 hex = 0xff;
432                         }
433
434                         uV = 600000 + hex * 12500;
435                         break;
436                 default:
437                         /* 0x00..0x3f: 0.750V ~ 3.900V*/
438                         if (hex > 0x3f) {
439                                 printf("warn: out of range (0x%x<0x3f)\n", hex);
440                                 hex = 0x3f;
441                         }
442
443                         uV = 750000 + hex * 50000;
444                         break;
445                 }
446
447                 return uV;
448         }
449 }
450
451 static int max77686_voltage_to_hex(int buck, int ldo, ulong uV)
452 {
453         unsigned int set = 0;
454
455         if (ldo) {
456                 switch (ldo) {
457                 case 1:
458                 case 2:
459                 case 6:
460                 case 7:
461                 case 8:
462                 case 15:
463                         if (uV < 800000)
464                                 set = 0x0;
465                         else if (uV > 2375000)
466                                 set = 0x3f;
467                         else
468                                 set = (uV - 800000) / 25000;
469                         break;
470                 default:
471                         if (uV < 800000)
472                                 set = 0x0;
473                         else if (uV > 3950000)
474                                 set = 0x3f;
475                         else
476                                 set = (uV - 800000) / 50000;
477                 }
478
479                 return set;
480         }
481
482         if (buck) {
483                 switch (buck) {
484                 case 2:
485                 case 3:
486                 case 4:
487                         if (uV < 600000)
488                                 set = 0;
489                         else if (uV > 3787500)
490                                 set = 0xff;
491                         else
492                                 set = (uV - 600000) / 12500;
493                         break;
494                 default:
495                         if (uV < 750000)
496                                 set = 0;
497                         else if (uV > 3900000)
498                                 set = 0x3f;
499                         else
500                                 set = (uV - 750000) / 50000;
501                 }
502
503                 return set;
504         }
505 }
506
507 static int max77686_set_voltage(int buck, int ldo, ulong uV)
508 {
509         unsigned char addr = MAX77686_PMIC_ADDR;
510         unsigned char val[2];
511         unsigned int reg = 0, set = 0, mask = 0;
512
513         if (ldo) {
514                 if (ldo < 1 || ldo > 26)
515                         return -1;
516
517                 reg = ldos[ldo].reg;
518                 mask = 0x3f;
519         } else if (buck) {
520                 if (buck < 1 || buck > 9)
521                         return -1;
522
523                 switch (buck) {
524                 case 2:
525                 case 3:
526                 case 4:
527                         reg = bucks[buck].reg + 2;
528                         mask = 0xff;
529                         break;
530                 default:
531                         reg = bucks[buck].reg + 1;
532                         mask = 0x3f;
533                 }
534         } else
535                 return -1;
536
537         set = max77686_voltage_to_hex(buck, ldo, uV) & mask;
538
539         if (max77686_probe())
540                 return -1;
541
542         i2c_read(addr, reg, 1, val, 1);
543         val[0] &= ~mask;
544         val[0] |= set;
545         i2c_write(addr, reg, 1, val, 1);
546         i2c_read(addr, reg, 1, val, 1);
547         debug("MAX77686 REG %2.2xh has %2.2xh\n",
548                         reg, val[0]);
549
550         return 0;
551 }
552
553 int max77686_set_ldo_voltage(int ldo, ulong uV)
554 {
555         return max77686_set_voltage(0, ldo, uV);
556 }
557
558 int max77686_set_buck_voltage(int buck, ulong uV)
559 {
560         return max77686_set_voltage(buck, 0, uV);
561 }
562
563 static int max77686_set_output(int buck, int ldo, opmode_type mode)
564 {
565         unsigned char addr = MAX77686_PMIC_ADDR;
566         unsigned char val[2];
567         unsigned int reg, set, mask;
568
569         if (ldo) {
570                 if (ldo < 1 || ldo > 26)
571                         return -1;
572                 reg = ldos[ldo].reg;
573                 mask = ldos[ldo].u.opmode.mask;
574                 set = ldos[ldo].u.opmodes[mode];
575         } else if (buck) {
576                 if (buck < 1 || buck > 9)
577                         return -1;
578                 reg = bucks[buck].reg;
579                 mask = bucks[buck].u.opmode.mask;
580                 set = bucks[buck].u.opmodes[mode];
581         } else
582                 return -1;
583
584         if (max77686_probe())
585                 return -1;
586
587         if (set == 0xff) {
588                 printf("%s is not supported on LDO%d\n", opmode_str[mode], ldo);
589                 return -1;
590         }
591
592         i2c_read(addr, reg, 1, val, 1);
593         val[0] &= ~mask;
594         val[0] |= set;
595         i2c_write(addr, reg, 1, val, 1);
596         i2c_read(addr, reg, 1, val, 1);
597
598         return 0;
599 }
600
601 int max77686_set_ldo_mode(int ldo, opmode_type mode)
602 {
603         return max77686_set_output(0, ldo, mode);
604 }
605
606 int max77686_set_buck_mode(int buck, opmode_type mode)
607 {
608         return max77686_set_output(buck, 0, mode);
609 }
610
611 int max77686_set_32khz(unsigned char mode)
612 {
613         unsigned char addr = MAX77686_PMIC_ADDR;
614         unsigned char val[2];
615
616         if (max77686_probe())
617                 return -1;
618
619         val[0] = mode;
620         i2c_write(addr, 0x7f, 1, val, 1);
621
622         return 0;
623 }
624
625 static int do_max77686(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
626 {
627         int buck = 0, ldo = 0, on = -1;
628         int ret = 0;
629
630         switch (argc) {
631         case 2:
632                 if (strncmp(argv[1], "status", 6) == 0)
633                         return max77686_status();
634                 break;
635                 return ret;
636         case 4:
637                 if (argv[1][0] == 'l')
638                         ldo = simple_strtoul(argv[2], NULL, 10);
639                 else if (argv[1][0] == 'b')
640                         buck = simple_strtoul(argv[2], NULL, 10);
641                 else {
642                         printf("Option = \"%s\" ? \n", argv[1]);
643                         break;
644                 }
645
646                 if (!strncmp(argv[3], "on", 2))
647                         ret = max77686_set_output(buck, ldo, OPMODE_ON);
648                 else if (!strncmp(argv[3], "lpm", 3))
649                         ret = max77686_set_output(buck, ldo, OPMODE_LPM);
650                 else if (!strncmp(argv[3], "standby", 3))
651                         ret = max77686_set_output(buck, ldo, OPMODE_STANDBY);
652                 else if (!strncmp(argv[3], "off", 3))
653                         ret = max77686_set_output(buck, ldo, OPMODE_OFF);
654                 else {
655                         ulong volt = simple_strtoul(argv[3], NULL, 10);
656                         printf("volt = %uuV\n", volt);
657                         if (volt <= 0)
658                                 ret = -1;
659                         else
660                                 ret = max77686_set_voltage(buck, ldo, volt);
661                 }
662
663                 if (!ret)
664                         printf("%s %s %s\n", argv[1], argv[2], argv[3]);
665                 if (ret < 0)
666                         printf("Error.\n");
667                 return ret;
668         default:
669                 break;
670         }
671
672         cmd_usage(cmdtp);
673         return 1;
674 }
675
676 U_BOOT_CMD(
677         max77686, 4, 1, do_max77686,
678         "PMIC LDO & BUCK control for MAX77686",
679         "status - Display PMIC LDO & BUCK status\n"
680         "max77686 ldo num volt - Set LDO voltage\n"
681         "max77686 ldo num on/lpm/standby/off - Set LDO output mode\n"
682         "max77686 buck num volt - Set BUCK voltage\n"
683         "max77686 buck num on/lpm/standby/off - Set BUCK output mode\n"
684         "       volt is voltage in uV\n"
685 );