aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2011-07-20 11:31:27 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-07-20 12:45:26 -0400
commit29dee863d5626a35354bb23d652011e457c935a4 (patch)
tree2e4cebf1e88bdd0d8b897eed53423c0ea1158965 /arch/arm/mach-exynos4
parent03614be3edb8bccf3b169630604d35c2d191194e (diff)
ARM: EXYNOS4: configure regulators and PMIC(MAX8997) on NURI
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> [kgene.kim@samsung.com: Fix build - inclusion of max8997-private.h] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos4')
-rw-r--r--arch/arm/mach-exynos4/mach-nuri.c626
1 files changed, 625 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c
index 642702bb5b12..53a667dee647 100644
--- a/arch/arm/mach-exynos4/mach-nuri.c
+++ b/arch/arm/mach-exynos4/mach-nuri.c
@@ -17,6 +17,8 @@
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/regulator/machine.h> 18#include <linux/regulator/machine.h>
19#include <linux/regulator/fixed.h> 19#include <linux/regulator/fixed.h>
20#include <linux/mfd/max8997.h>
21#include <linux/mfd/max8997-private.h>
20#include <linux/mmc/host.h> 22#include <linux/mmc/host.h>
21#include <linux/fb.h> 23#include <linux/fb.h>
22#include <linux/pwm_backlight.h> 24#include <linux/pwm_backlight.h>
@@ -344,11 +346,629 @@ static void __init nuri_tsp_init(void)
344 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); 346 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
345} 347}
346 348
349static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
350 REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */
351};
352static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
353 REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
354};
355static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
356 REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
357};
358static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
359 REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
360};
361static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
362 REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
363};
364static struct regulator_consumer_supply __initdata max8997_ldo8_[] = {
365 REGULATOR_SUPPLY("vusb_d", NULL), /* Used by CPU */
366 REGULATOR_SUPPLY("vdac", NULL), /* Used by CPU */
367};
368static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
369 REGULATOR_SUPPLY("vcc", "platform-lcd"), /* U804 LVDS */
370};
371static struct regulator_consumer_supply __initdata max8997_ldo12_[] = {
372 REGULATOR_SUPPLY("vddio", "6-003c"), /* HDC802 */
373};
374static struct regulator_consumer_supply __initdata max8997_ldo13_[] = {
375 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), /* TFLASH */
376};
377static struct regulator_consumer_supply __initdata max8997_ldo14_[] = {
378 REGULATOR_SUPPLY("inmotor", "max8997-haptic"),
379};
380static struct regulator_consumer_supply __initdata max8997_ldo15_[] = {
381 REGULATOR_SUPPLY("avdd", "3-004a"), /* Touch Screen */
382};
383static struct regulator_consumer_supply __initdata max8997_ldo16_[] = {
384 REGULATOR_SUPPLY("d_sensor", "0-001f"), /* HDC803 */
385};
386static struct regulator_consumer_supply __initdata max8997_ldo18_[] = {
387 REGULATOR_SUPPLY("vdd", "3-004a"), /* Touch Screen */
388};
389static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
390 REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
391};
392static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
393 REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */
394};
395static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
396 REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
397};
398static struct regulator_consumer_supply __initdata max8997_buck4_[] = {
399 REGULATOR_SUPPLY("core", "0-001f"), /* HDC803 */
400};
401static struct regulator_consumer_supply __initdata max8997_buck6_[] = {
402 REGULATOR_SUPPLY("dig_28", "0-001f"), /* pin "7" of HDC803 */
403};
404static struct regulator_consumer_supply __initdata max8997_esafeout1_[] = {
405 REGULATOR_SUPPLY("usb_vbus", NULL), /* CPU's USB OTG */
406};
407static struct regulator_consumer_supply __initdata max8997_esafeout2_[] = {
408 REGULATOR_SUPPLY("usb_vbus", "modemctl"), /* VBUS of Modem */
409};
410
411static struct regulator_consumer_supply __initdata max8997_charger_[] = {
412 REGULATOR_SUPPLY("vinchg1", "charger-manager.0"),
413};
414static struct regulator_consumer_supply __initdata max8997_chg_toff_[] = {
415 REGULATOR_SUPPLY("vinchg_stop", NULL), /* for jack interrupt handlers */
416};
417
418static struct regulator_consumer_supply __initdata max8997_32khz_ap_[] = {
419 REGULATOR_SUPPLY("gps_clk", "bcm4751"),
420 REGULATOR_SUPPLY("bt_clk", "bcm4330-b1"),
421 REGULATOR_SUPPLY("wifi_clk", "bcm433-b1"),
422};
423
424static struct regulator_init_data __initdata max8997_ldo1_data = {
425 .constraints = {
426 .name = "VADC_3.3V_C210",
427 .min_uV = 3300000,
428 .max_uV = 3300000,
429 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
430 .apply_uV = 1,
431 .state_mem = {
432 .disabled = 1,
433 },
434 },
435 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo1_),
436 .consumer_supplies = max8997_ldo1_,
437};
438
439static struct regulator_init_data __initdata max8997_ldo2_data = {
440 .constraints = {
441 .name = "VALIVE_1.1V_C210",
442 .min_uV = 1100000,
443 .max_uV = 1100000,
444 .apply_uV = 1,
445 .always_on = 1,
446 .state_mem = {
447 .enabled = 1,
448 },
449 },
450};
451
452static struct regulator_init_data __initdata max8997_ldo3_data = {
453 .constraints = {
454 .name = "VUSB_1.1V_C210",
455 .min_uV = 1100000,
456 .max_uV = 1100000,
457 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
458 .apply_uV = 1,
459 .state_mem = {
460 .disabled = 1,
461 },
462 },
463 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo3_),
464 .consumer_supplies = max8997_ldo3_,
465};
466
467static struct regulator_init_data __initdata max8997_ldo4_data = {
468 .constraints = {
469 .name = "VMIPI_1.8V",
470 .min_uV = 1800000,
471 .max_uV = 1800000,
472 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
473 .apply_uV = 1,
474 .state_mem = {
475 .disabled = 1,
476 },
477 },
478 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo4_),
479 .consumer_supplies = max8997_ldo4_,
480};
481
482static struct regulator_init_data __initdata max8997_ldo5_data = {
483 .constraints = {
484 .name = "VHSIC_1.2V_C210",
485 .min_uV = 1200000,
486 .max_uV = 1200000,
487 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
488 .apply_uV = 1,
489 .state_mem = {
490 .disabled = 1,
491 },
492 },
493 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo5_),
494 .consumer_supplies = max8997_ldo5_,
495};
496
497static struct regulator_init_data __initdata max8997_ldo6_data = {
498 .constraints = {
499 .name = "VCC_1.8V_PDA",
500 .min_uV = 1800000,
501 .max_uV = 1800000,
502 .apply_uV = 1,
503 .always_on = 1,
504 .state_mem = {
505 .enabled = 1,
506 },
507 },
508};
509
510static struct regulator_init_data __initdata max8997_ldo7_data = {
511 .constraints = {
512 .name = "CAM_ISP_1.8V",
513 .min_uV = 1800000,
514 .max_uV = 1800000,
515 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
516 .apply_uV = 1,
517 .state_mem = {
518 .disabled = 1,
519 },
520 },
521 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo7_),
522 .consumer_supplies = max8997_ldo7_,
523};
524
525static struct regulator_init_data __initdata max8997_ldo8_data = {
526 .constraints = {
527 .name = "VUSB/VDAC_3.3V_C210",
528 .min_uV = 3300000,
529 .max_uV = 3300000,
530 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
531 .apply_uV = 1,
532 .state_mem = {
533 .disabled = 1,
534 },
535 },
536 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo8_),
537 .consumer_supplies = max8997_ldo8_,
538};
539
540static struct regulator_init_data __initdata max8997_ldo9_data = {
541 .constraints = {
542 .name = "VCC_2.8V_PDA",
543 .min_uV = 2800000,
544 .max_uV = 2800000,
545 .apply_uV = 1,
546 .always_on = 1,
547 .state_mem = {
548 .enabled = 1,
549 },
550 },
551};
552
553static struct regulator_init_data __initdata max8997_ldo10_data = {
554 .constraints = {
555 .name = "VPLL_1.1V_C210",
556 .min_uV = 1100000,
557 .max_uV = 1100000,
558 .apply_uV = 1,
559 .always_on = 1,
560 .state_mem = {
561 .disabled = 1,
562 },
563 },
564};
565
566static struct regulator_init_data __initdata max8997_ldo11_data = {
567 .constraints = {
568 .name = "LVDS_VDD3.3V",
569 .min_uV = 3300000,
570 .max_uV = 3300000,
571 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
572 .apply_uV = 1,
573 .boot_on = 1,
574 .state_mem = {
575 .disabled = 1,
576 },
577 },
578 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo11_),
579 .consumer_supplies = max8997_ldo11_,
580};
581
582static struct regulator_init_data __initdata max8997_ldo12_data = {
583 .constraints = {
584 .name = "VT_CAM_1.8V",
585 .min_uV = 1800000,
586 .max_uV = 1800000,
587 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
588 .apply_uV = 1,
589 .state_mem = {
590 .disabled = 1,
591 },
592 },
593 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo12_),
594 .consumer_supplies = max8997_ldo12_,
595};
596
597static struct regulator_init_data __initdata max8997_ldo13_data = {
598 .constraints = {
599 .name = "VTF_2.8V",
600 .min_uV = 2800000,
601 .max_uV = 2800000,
602 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
603 .apply_uV = 1,
604 .state_mem = {
605 .disabled = 1,
606 },
607 },
608 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo13_),
609 .consumer_supplies = max8997_ldo13_,
610};
611
612static struct regulator_init_data __initdata max8997_ldo14_data = {
613 .constraints = {
614 .name = "VCC_3.0V_MOTOR",
615 .min_uV = 3000000,
616 .max_uV = 3000000,
617 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
618 .apply_uV = 1,
619 .state_mem = {
620 .disabled = 1,
621 },
622 },
623 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo14_),
624 .consumer_supplies = max8997_ldo14_,
625};
626
627static struct regulator_init_data __initdata max8997_ldo15_data = {
628 .constraints = {
629 .name = "VTOUCH_ADVV2.8V",
630 .min_uV = 2800000,
631 .max_uV = 2800000,
632 .apply_uV = 1,
633 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
634 .state_mem = {
635 .disabled = 1,
636 },
637 },
638 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo15_),
639 .consumer_supplies = max8997_ldo15_,
640};
641
642static struct regulator_init_data __initdata max8997_ldo16_data = {
643 .constraints = {
644 .name = "CAM_SENSOR_IO_1.8V",
645 .min_uV = 1800000,
646 .max_uV = 1800000,
647 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
648 .apply_uV = 1,
649 .state_mem = {
650 .disabled = 1,
651 },
652 },
653 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo16_),
654 .consumer_supplies = max8997_ldo16_,
655};
656
657static struct regulator_init_data __initdata max8997_ldo18_data = {
658 .constraints = {
659 .name = "VTOUCH_VDD2.8V",
660 .min_uV = 2800000,
661 .max_uV = 2800000,
662 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
663 .apply_uV = 1,
664 .state_mem = {
665 .disabled = 1,
666 },
667 },
668 .num_consumer_supplies = ARRAY_SIZE(max8997_ldo18_),
669 .consumer_supplies = max8997_ldo18_,
670};
671
672static struct regulator_init_data __initdata max8997_ldo21_data = {
673 .constraints = {
674 .name = "VDDQ_M1M2_1.2V",
675 .min_uV = 1200000,
676 .max_uV = 1200000,
677 .apply_uV = 1,
678 .always_on = 1,
679 .state_mem = {
680 .disabled = 1,
681 },
682 },
683};
684
685static struct regulator_init_data __initdata max8997_buck1_data = {
686 .constraints = {
687 .name = "VARM_1.2V_C210",
688 .min_uV = 900000,
689 .max_uV = 1350000,
690 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
691 .always_on = 1,
692 .state_mem = {
693 .disabled = 1,
694 },
695 },
696 .num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
697 .consumer_supplies = max8997_buck1_,
698};
699
700static struct regulator_init_data __initdata max8997_buck2_data = {
701 .constraints = {
702 .name = "VINT_1.1V_C210",
703 .min_uV = 900000,
704 .max_uV = 1100000,
705 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
706 .always_on = 1,
707 .state_mem = {
708 .disabled = 1,
709 },
710 },
711 .num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
712 .consumer_supplies = max8997_buck2_,
713};
714
715static struct regulator_init_data __initdata max8997_buck3_data = {
716 .constraints = {
717 .name = "VG3D_1.1V_C210",
718 .min_uV = 900000,
719 .max_uV = 1100000,
720 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
721 REGULATOR_CHANGE_STATUS,
722 .state_mem = {
723 .disabled = 1,
724 },
725 },
726 .num_consumer_supplies = ARRAY_SIZE(max8997_buck3_),
727 .consumer_supplies = max8997_buck3_,
728};
729
730static struct regulator_init_data __initdata max8997_buck4_data = {
731 .constraints = {
732 .name = "CAM_ISP_CORE_1.2V",
733 .min_uV = 1200000,
734 .max_uV = 1200000,
735 .apply_uV = 1,
736 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
737 .state_mem = {
738 .disabled = 1,
739 },
740 },
741 .num_consumer_supplies = ARRAY_SIZE(max8997_buck4_),
742 .consumer_supplies = max8997_buck4_,
743};
744
745static struct regulator_init_data __initdata max8997_buck5_data = {
746 .constraints = {
747 .name = "VMEM_1.2V_C210",
748 .min_uV = 1200000,
749 .max_uV = 1200000,
750 .apply_uV = 1,
751 .always_on = 1,
752 .state_mem = {
753 .enabled = 1,
754 },
755 },
756};
757
758static struct regulator_init_data __initdata max8997_buck6_data = {
759 .constraints = {
760 .name = "CAM_AF_2.8V",
761 .min_uV = 2800000,
762 .max_uV = 2800000,
763 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
764 .state_mem = {
765 .disabled = 1,
766 },
767 },
768 .num_consumer_supplies = ARRAY_SIZE(max8997_buck6_),
769 .consumer_supplies = max8997_buck6_,
770};
771
772static struct regulator_init_data __initdata max8997_buck7_data = {
773 .constraints = {
774 .name = "VCC_SUB_2.0V",
775 .min_uV = 2000000,
776 .max_uV = 2000000,
777 .apply_uV = 1,
778 .always_on = 1,
779 .state_mem = {
780 .enabled = 1,
781 },
782 },
783};
784
785static struct regulator_init_data __initdata max8997_32khz_ap_data = {
786 .constraints = {
787 .name = "32KHz AP",
788 .always_on = 1,
789 .state_mem = {
790 .enabled = 1,
791 },
792 },
793 .num_consumer_supplies = ARRAY_SIZE(max8997_32khz_ap_),
794 .consumer_supplies = max8997_32khz_ap_,
795};
796
797static struct regulator_init_data __initdata max8997_32khz_cp_data = {
798 .constraints = {
799 .name = "32KHz CP",
800 .state_mem = {
801 .disabled = 1,
802 },
803 },
804};
805
806static struct regulator_init_data __initdata max8997_vichg_data = {
807 .constraints = {
808 .name = "VICHG",
809 .state_mem = {
810 .disabled = 1,
811 },
812 },
813};
814
815static struct regulator_init_data __initdata max8997_esafeout1_data = {
816 .constraints = {
817 .name = "SAFEOUT1",
818 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
819 .state_mem = {
820 .disabled = 1,
821 },
822 },
823 .num_consumer_supplies = ARRAY_SIZE(max8997_esafeout1_),
824 .consumer_supplies = max8997_esafeout1_,
825};
826
827static struct regulator_init_data __initdata max8997_esafeout2_data = {
828 .constraints = {
829 .name = "SAFEOUT2",
830 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
831 .state_mem = {
832 .disabled = 1,
833 },
834 },
835 .num_consumer_supplies = ARRAY_SIZE(max8997_esafeout2_),
836 .consumer_supplies = max8997_esafeout2_,
837};
838
839static struct regulator_init_data __initdata max8997_charger_cv_data = {
840 .constraints = {
841 .name = "CHARGER_CV",
842 .min_uV = 4200000,
843 .max_uV = 4200000,
844 .apply_uV = 1,
845 },
846};
847
848static struct regulator_init_data __initdata max8997_charger_data = {
849 .constraints = {
850 .name = "CHARGER",
851 .min_uA = 200000,
852 .max_uA = 950000,
853 .boot_on = 1,
854 .valid_ops_mask = REGULATOR_CHANGE_STATUS |
855 REGULATOR_CHANGE_CURRENT,
856 },
857 .num_consumer_supplies = ARRAY_SIZE(max8997_charger_),
858 .consumer_supplies = max8997_charger_,
859};
860
861static struct regulator_init_data __initdata max8997_charger_topoff_data = {
862 .constraints = {
863 .name = "CHARGER TOPOFF",
864 .min_uA = 50000,
865 .max_uA = 200000,
866 .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
867 },
868 .num_consumer_supplies = ARRAY_SIZE(max8997_chg_toff_),
869 .consumer_supplies = max8997_chg_toff_,
870};
871
872static struct max8997_regulator_data __initdata nuri_max8997_regulators[] = {
873 { MAX8997_LDO1, &max8997_ldo1_data },
874 { MAX8997_LDO2, &max8997_ldo2_data },
875 { MAX8997_LDO3, &max8997_ldo3_data },
876 { MAX8997_LDO4, &max8997_ldo4_data },
877 { MAX8997_LDO5, &max8997_ldo5_data },
878 { MAX8997_LDO6, &max8997_ldo6_data },
879 { MAX8997_LDO7, &max8997_ldo7_data },
880 { MAX8997_LDO8, &max8997_ldo8_data },
881 { MAX8997_LDO9, &max8997_ldo9_data },
882 { MAX8997_LDO10, &max8997_ldo10_data },
883 { MAX8997_LDO11, &max8997_ldo11_data },
884 { MAX8997_LDO12, &max8997_ldo12_data },
885 { MAX8997_LDO13, &max8997_ldo13_data },
886 { MAX8997_LDO14, &max8997_ldo14_data },
887 { MAX8997_LDO15, &max8997_ldo15_data },
888 { MAX8997_LDO16, &max8997_ldo16_data },
889
890 { MAX8997_LDO18, &max8997_ldo18_data },
891 { MAX8997_LDO21, &max8997_ldo21_data },
892
893 { MAX8997_BUCK1, &max8997_buck1_data },
894 { MAX8997_BUCK2, &max8997_buck2_data },
895 { MAX8997_BUCK3, &max8997_buck3_data },
896 { MAX8997_BUCK4, &max8997_buck4_data },
897 { MAX8997_BUCK5, &max8997_buck5_data },
898 { MAX8997_BUCK6, &max8997_buck6_data },
899 { MAX8997_BUCK7, &max8997_buck7_data },
900
901 { MAX8997_EN32KHZ_AP, &max8997_32khz_ap_data },
902 { MAX8997_EN32KHZ_CP, &max8997_32khz_cp_data },
903
904 { MAX8997_ENVICHG, &max8997_vichg_data },
905 { MAX8997_ESAFEOUT1, &max8997_esafeout1_data },
906 { MAX8997_ESAFEOUT2, &max8997_esafeout2_data },
907 { MAX8997_CHARGER_CV, &max8997_charger_cv_data },
908 { MAX8997_CHARGER, &max8997_charger_data },
909 { MAX8997_CHARGER_TOPOFF, &max8997_charger_topoff_data },
910};
911
912static struct max8997_platform_data __initdata nuri_max8997_pdata = {
913 .wakeup = 1,
914
915 .num_regulators = ARRAY_SIZE(nuri_max8997_regulators),
916 .regulators = nuri_max8997_regulators,
917
918 .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
919 .buck2_gpiodvs = true,
920
921 .buck1_voltage[0] = 1350000, /* 1.35V */
922 .buck1_voltage[1] = 1300000, /* 1.3V */
923 .buck1_voltage[2] = 1250000, /* 1.25V */
924 .buck1_voltage[3] = 1200000, /* 1.2V */
925 .buck1_voltage[4] = 1150000, /* 1.15V */
926 .buck1_voltage[5] = 1100000, /* 1.1V */
927 .buck1_voltage[6] = 1000000, /* 1.0V */
928 .buck1_voltage[7] = 950000, /* 0.95V */
929
930 .buck2_voltage[0] = 1100000, /* 1.1V */
931 .buck2_voltage[1] = 1000000, /* 1.0V */
932 .buck2_voltage[2] = 950000, /* 0.95V */
933 .buck2_voltage[3] = 900000, /* 0.9V */
934 .buck2_voltage[4] = 1100000, /* 1.1V */
935 .buck2_voltage[5] = 1000000, /* 1.0V */
936 .buck2_voltage[6] = 950000, /* 0.95V */
937 .buck2_voltage[7] = 900000, /* 0.9V */
938
939 .buck5_voltage[0] = 1200000, /* 1.2V */
940 .buck5_voltage[1] = 1200000, /* 1.2V */
941 .buck5_voltage[2] = 1200000, /* 1.2V */
942 .buck5_voltage[3] = 1200000, /* 1.2V */
943 .buck5_voltage[4] = 1200000, /* 1.2V */
944 .buck5_voltage[5] = 1200000, /* 1.2V */
945 .buck5_voltage[6] = 1200000, /* 1.2V */
946 .buck5_voltage[7] = 1200000, /* 1.2V */
947};
948
347/* GPIO I2C 5 (PMIC) */ 949/* GPIO I2C 5 (PMIC) */
950enum { I2C5_MAX8997 };
348static struct i2c_board_info i2c5_devs[] __initdata = { 951static struct i2c_board_info i2c5_devs[] __initdata = {
349 /* max8997, To be updated */ 952 [I2C5_MAX8997] = {
953 I2C_BOARD_INFO("max8997", 0xCC >> 1),
954 .platform_data = &nuri_max8997_pdata,
955 },
350}; 956};
351 957
958static void __init nuri_power_init(void)
959{
960 int gpio;
961 int irq_base = IRQ_GPIO_END + 1;
962
963 nuri_max8997_pdata.irq_base = irq_base;
964 irq_base += MAX8997_IRQ_NR;
965
966 gpio = EXYNOS4_GPX0(7);
967 gpio_request(gpio, "AP_PMIC_IRQ");
968 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
969 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
970}
971
352/* USB EHCI */ 972/* USB EHCI */
353static struct s5p_ehci_platdata nuri_ehci_pdata; 973static struct s5p_ehci_platdata nuri_ehci_pdata;
354 974
@@ -361,6 +981,7 @@ static void __init nuri_ehci_init(void)
361 981
362static struct platform_device *nuri_devices[] __initdata = { 982static struct platform_device *nuri_devices[] __initdata = {
363 /* Samsung Platform Devices */ 983 /* Samsung Platform Devices */
984 &s3c_device_i2c5, /* PMIC should initialize first */
364 &emmc_fixed_voltage, 985 &emmc_fixed_voltage,
365 &s3c_device_hsmmc0, 986 &s3c_device_hsmmc0,
366 &s3c_device_hsmmc2, 987 &s3c_device_hsmmc2,
@@ -387,10 +1008,13 @@ static void __init nuri_machine_init(void)
387{ 1008{
388 nuri_sdhci_init(); 1009 nuri_sdhci_init();
389 nuri_tsp_init(); 1010 nuri_tsp_init();
1011 nuri_power_init();
390 1012
391 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs)); 1013 i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
392 s3c_i2c3_set_platdata(&i2c3_data); 1014 s3c_i2c3_set_platdata(&i2c3_data);
393 i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs)); 1015 i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
1016 s3c_i2c5_set_platdata(NULL);
1017 i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
394 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); 1018 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
395 1019
396 nuri_ehci_init(); 1020 nuri_ehci_init();