aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c85
1 files changed, 42 insertions, 43 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a534d8880de1..416d436111f2 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -23,6 +23,7 @@
23#include <linux/spi/spi.h> 23#include <linux/spi/spi.h>
24#include <linux/mfd/abx500/ab8500.h> 24#include <linux/mfd/abx500/ab8500.h>
25#include <linux/regulator/ab8500.h> 25#include <linux/regulator/ab8500.h>
26#include <linux/regulator/fixed.h>
26#include <linux/mfd/tc3589x.h> 27#include <linux/mfd/tc3589x.h>
27#include <linux/mfd/tps6105x.h> 28#include <linux/mfd/tps6105x.h>
28#include <linux/mfd/abx500/ab8500-gpio.h> 29#include <linux/mfd/abx500/ab8500-gpio.h>
@@ -48,13 +49,12 @@
48#include <mach/setup.h> 49#include <mach/setup.h>
49#include <mach/devices.h> 50#include <mach/devices.h>
50#include <mach/irqs.h> 51#include <mach/irqs.h>
51#include <mach/crypto-ux500.h> 52#include <linux/platform_data/crypto-ux500.h>
52 53
53#include "ste-dma40-db8500.h" 54#include "ste-dma40-db8500.h"
54#include "devices-db8500.h" 55#include "devices-db8500.h"
55#include "board-mop500.h" 56#include "board-mop500.h"
56#include "board-mop500-regulators.h" 57#include "board-mop500-regulators.h"
57#include "board-mop500-msp.h"
58 58
59static struct gpio_led snowball_led_array[] = { 59static struct gpio_led snowball_led_array[] = {
60 { 60 {
@@ -76,6 +76,23 @@ static struct platform_device snowball_led_dev = {
76 }, 76 },
77}; 77};
78 78
79static struct fixed_voltage_config snowball_gpio_en_3v3_data = {
80 .supply_name = "EN-3V3",
81 .gpio = SNOWBALL_EN_3V3_ETH_GPIO,
82 .microvolts = 3300000,
83 .enable_high = 1,
84 .init_data = &gpio_en_3v3_regulator,
85 .startup_delay = 5000, /* 1200us */
86};
87
88static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
89 .name = "reg-fixed-voltage",
90 .id = 1,
91 .dev = {
92 .platform_data = &snowball_gpio_en_3v3_data,
93 },
94};
95
79static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { 96static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
80 .gpio_base = MOP500_AB8500_PIN_GPIO(1), 97 .gpio_base = MOP500_AB8500_PIN_GPIO(1),
81 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, 98 .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
@@ -524,33 +541,12 @@ static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
524}; 541};
525#endif 542#endif
526 543
527#define PRCC_K_SOFTRST_SET 0x18
528#define PRCC_K_SOFTRST_CLEAR 0x1C
529static void ux500_uart0_reset(void)
530{
531 void __iomem *prcc_rst_set, *prcc_rst_clr;
532
533 prcc_rst_set = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE +
534 PRCC_K_SOFTRST_SET);
535 prcc_rst_clr = (void __iomem *)IO_ADDRESS(U8500_CLKRST1_BASE +
536 PRCC_K_SOFTRST_CLEAR);
537
538 /* Activate soft reset PRCC_K_SOFTRST_CLEAR */
539 writel((readl(prcc_rst_clr) | 0x1), prcc_rst_clr);
540 udelay(1);
541
542 /* Release soft reset PRCC_K_SOFTRST_SET */
543 writel((readl(prcc_rst_set) | 0x1), prcc_rst_set);
544 udelay(1);
545}
546
547static struct amba_pl011_data uart0_plat = { 544static struct amba_pl011_data uart0_plat = {
548#ifdef CONFIG_STE_DMA40 545#ifdef CONFIG_STE_DMA40
549 .dma_filter = stedma40_filter, 546 .dma_filter = stedma40_filter,
550 .dma_rx_param = &uart0_dma_cfg_rx, 547 .dma_rx_param = &uart0_dma_cfg_rx,
551 .dma_tx_param = &uart0_dma_cfg_tx, 548 .dma_tx_param = &uart0_dma_cfg_tx,
552#endif 549#endif
553 .reset = ux500_uart0_reset,
554}; 550};
555 551
556static struct amba_pl011_data uart1_plat = { 552static struct amba_pl011_data uart1_plat = {
@@ -586,6 +582,7 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
586 &snowball_led_dev, 582 &snowball_led_dev,
587 &snowball_key_dev, 583 &snowball_key_dev,
588 &snowball_sbnet_dev, 584 &snowball_sbnet_dev,
585 &snowball_gpio_en_3v3_regulator_dev,
589}; 586};
590 587
591static void __init mop500_init_machine(void) 588static void __init mop500_init_machine(void)
@@ -608,7 +605,7 @@ static void __init mop500_init_machine(void)
608 mop500_i2c_init(parent); 605 mop500_i2c_init(parent);
609 mop500_sdi_init(parent); 606 mop500_sdi_init(parent);
610 mop500_spi_init(parent); 607 mop500_spi_init(parent);
611 mop500_msp_init(parent); 608 mop500_audio_init(parent);
612 mop500_uart_init(parent); 609 mop500_uart_init(parent);
613 610
614 u8500_cryp1_hash1_init(parent); 611 u8500_cryp1_hash1_init(parent);
@@ -642,7 +639,7 @@ static void __init snowball_init_machine(void)
642 mop500_i2c_init(parent); 639 mop500_i2c_init(parent);
643 snowball_sdi_init(parent); 640 snowball_sdi_init(parent);
644 mop500_spi_init(parent); 641 mop500_spi_init(parent);
645 mop500_msp_init(parent); 642 mop500_audio_init(parent);
646 mop500_uart_init(parent); 643 mop500_uart_init(parent);
647 644
648 /* This board has full regulator constraints */ 645 /* This board has full regulator constraints */
@@ -674,7 +671,7 @@ static void __init hrefv60_init_machine(void)
674 mop500_i2c_init(parent); 671 mop500_i2c_init(parent);
675 hrefv60_sdi_init(parent); 672 hrefv60_sdi_init(parent);
676 mop500_spi_init(parent); 673 mop500_spi_init(parent);
677 mop500_msp_init(parent); 674 mop500_audio_init(parent);
678 mop500_uart_init(parent); 675 mop500_uart_init(parent);
679 676
680 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 677 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
@@ -694,6 +691,7 @@ static void __init hrefv60_init_machine(void)
694MACHINE_START(U8500, "ST-Ericsson MOP500 platform") 691MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
695 /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */ 692 /* Maintainer: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> */
696 .atag_offset = 0x100, 693 .atag_offset = 0x100,
694 .smp = smp_ops(ux500_smp_ops),
697 .map_io = u8500_map_io, 695 .map_io = u8500_map_io,
698 .init_irq = ux500_init_irq, 696 .init_irq = ux500_init_irq,
699 /* we re-use nomadik timer here */ 697 /* we re-use nomadik timer here */
@@ -705,6 +703,7 @@ MACHINE_END
705 703
706MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+") 704MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
707 .atag_offset = 0x100, 705 .atag_offset = 0x100,
706 .smp = smp_ops(ux500_smp_ops),
708 .map_io = u8500_map_io, 707 .map_io = u8500_map_io,
709 .init_irq = ux500_init_irq, 708 .init_irq = ux500_init_irq,
710 .timer = &ux500_timer, 709 .timer = &ux500_timer,
@@ -715,6 +714,7 @@ MACHINE_END
715 714
716MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") 715MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
717 .atag_offset = 0x100, 716 .atag_offset = 0x100,
717 .smp = smp_ops(ux500_smp_ops),
718 .map_io = u8500_map_io, 718 .map_io = u8500_map_io,
719 .init_irq = ux500_init_irq, 719 .init_irq = ux500_init_irq,
720 /* we re-use nomadik timer here */ 720 /* we re-use nomadik timer here */
@@ -726,12 +726,9 @@ MACHINE_END
726 726
727#ifdef CONFIG_MACH_UX500_DT 727#ifdef CONFIG_MACH_UX500_DT
728 728
729static struct platform_device *snowball_of_platform_devs[] __initdata = {
730 &snowball_led_dev,
731 &snowball_key_dev,
732};
733
734struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { 729struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
730 /* Requires call-back bindings. */
731 OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
735 /* Requires DMA and call-back bindings. */ 732 /* Requires DMA and call-back bindings. */
736 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), 733 OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
737 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), 734 OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
@@ -739,6 +736,8 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
739 /* Requires DMA bindings. */ 736 /* Requires DMA bindings. */
740 OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), 737 OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat),
741 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), 738 OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data),
739 OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data),
740 OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data),
742 OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), 741 OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data),
743 /* Requires clock name bindings. */ 742 /* Requires clock name bindings. */
744 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL), 743 OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
@@ -757,6 +756,15 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
757 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 756 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
758 /* Requires device name bindings. */ 757 /* Requires device name bindings. */
759 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), 758 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
759 /* Requires clock name and DMA bindings. */
760 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
761 "ux500-msp-i2s.0", &msp0_platform_data),
762 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
763 "ux500-msp-i2s.1", &msp1_platform_data),
764 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
765 "ux500-msp-i2s.2", &msp2_platform_data),
766 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
767 "ux500-msp-i2s.3", &msp3_platform_data),
760 {}, 768 {},
761}; 769};
762 770
@@ -797,7 +805,7 @@ static void __init u8500_init_machine(void)
797 ARRAY_SIZE(mop500_platform_devs)); 805 ARRAY_SIZE(mop500_platform_devs));
798 806
799 mop500_sdi_init(parent); 807 mop500_sdi_init(parent);
800 mop500_msp_init(parent); 808 mop500_audio_init(parent);
801 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); 809 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
802 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); 810 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
803 i2c_register_board_info(2, mop500_i2c2_devices, 811 i2c_register_board_info(2, mop500_i2c2_devices,
@@ -806,7 +814,7 @@ static void __init u8500_init_machine(void)
806 mop500_uib_init(); 814 mop500_uib_init();
807 815
808 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { 816 } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
809 mop500_msp_init(parent); 817 mop500_of_audio_init(parent);
810 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { 818 } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
811 /* 819 /*
812 * The HREFv60 board removed a GPIO expander and routed 820 * The HREFv60 board removed a GPIO expander and routed
@@ -817,16 +825,6 @@ static void __init u8500_init_machine(void)
817 platform_add_devices(mop500_platform_devs, 825 platform_add_devices(mop500_platform_devs,
818 ARRAY_SIZE(mop500_platform_devs)); 826 ARRAY_SIZE(mop500_platform_devs));
819 827
820 hrefv60_sdi_init(parent);
821 mop500_msp_init(parent);
822
823 i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
824 i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
825
826 i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
827 i2c_register_board_info(2, mop500_i2c2_devices,
828 ARRAY_SIZE(mop500_i2c2_devices));
829
830 mop500_uib_init(); 828 mop500_uib_init();
831 } 829 }
832 830
@@ -844,6 +842,7 @@ static const char * u8500_dt_board_compat[] = {
844 842
845 843
846DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") 844DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)")
845 .smp = smp_ops(ux500_smp_ops),
847 .map_io = u8500_map_io, 846 .map_io = u8500_map_io,
848 .init_irq = ux500_init_irq, 847 .init_irq = ux500_init_irq,
849 /* we re-use nomadik timer here */ 848 /* we re-use nomadik timer here */