diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 13:39:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 13:39:26 -0500 |
commit | db5b0ae00712b5176d7405e7a1dd2bfd6e8f5070 (patch) | |
tree | 4e874d81ca9037dda1007178bbc9613649d43305 /arch/arm/mach-ux500/board-mop500.c | |
parent | 6be35c700f742e911ecedd07fcc43d4439922334 (diff) | |
parent | 64507dd7028e3e0145077e73b8374bd75aea117c (diff) |
Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC device tree conversions and enablement from Olof Johansson:
"Continued device tree conversion and enablement across a number of
platforms; Kirkwood, tegra, i.MX, Exynos, zynq and a couple of other
smaller series as well.
ux500 has seen continued conversion for platforms. Several platforms
have seen pinctrl-via-devicetree conversions for simpler
multiplatform. Tegra is adding data for new devices/drivers, and
Exynos has a bunch of new bindings and devices added as well.
So, pretty much the same progression in the right direction as the
last few releases."
Fix up conflicts as per Olof.
* tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (185 commits)
ARM: ux500: Rename dbx500 cpufreq code to be more generic
ARM: dts: add missing ux500 device trees
ARM: ux500: Stop registering the PCM driver from platform code
ARM: ux500: Move board specific GPIO info out to subordinate DTS files
ARM: ux500: Disable the MMCI gpio-regulator by default
ARM: Kirkwood: remove kirkwood_ehci_init() from new boards
ARM: Kirkwood: Add support LED of OpenBlocks A6
ARM: Kirkwood: Convert to EHCI via DT for OpenBlocks A6
ARM: kirkwood: Add NAND partiton map for OpenBlocks A6
ARM: kirkwood: Add support second I2C bus and RTC on OpenBlocks A6
ARM: kirkwood: Add support DT of second I2C bus
ARM: kirkwood: Convert mplcec4 board to pinctrl
ARM: Kirkwood: Convert km_kirkwood to pinctrl
ARM: Kirkwood: support 98DX412x kirkwoods with pinctrl
ARM: Kirkwood: Convert IX2-200 to pinctrl.
ARM: Kirkwood: Convert lsxl boards to pinctrl.
ARM: Kirkwood: Convert ib62x0 to pinctrl.
ARM: Kirkwood: Convert GoFlex Net to pinctrl.
ARM: Kirkwood: Convert dreamplug to pinctrl.
ARM: Kirkwood: Convert dockstar to pinctrl.
...
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 146 |
1 files changed, 5 insertions, 141 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index e6ad161449da..5b70212c2536 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include <linux/smsc911x.h> | 33 | #include <linux/smsc911x.h> |
34 | #include <linux/gpio_keys.h> | 34 | #include <linux/gpio_keys.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/of.h> | ||
37 | #include <linux/of_platform.h> | ||
38 | #include <linux/leds.h> | 36 | #include <linux/leds.h> |
39 | #include <linux/pinctrl/consumer.h> | 37 | #include <linux/pinctrl/consumer.h> |
40 | #include <linux/platform_data/pinctrl-nomadik.h> | 38 | #include <linux/platform_data/pinctrl-nomadik.h> |
@@ -525,7 +523,7 @@ static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { | |||
525 | }; | 523 | }; |
526 | #endif | 524 | #endif |
527 | 525 | ||
528 | static struct pl022_ssp_controller ssp0_plat = { | 526 | struct pl022_ssp_controller ssp0_plat = { |
529 | .bus_id = 0, | 527 | .bus_id = 0, |
530 | #ifdef CONFIG_STE_DMA40 | 528 | #ifdef CONFIG_STE_DMA40 |
531 | .enable_dma = 1, | 529 | .enable_dma = 1, |
@@ -602,7 +600,7 @@ static struct stedma40_chan_cfg uart2_dma_cfg_tx = { | |||
602 | }; | 600 | }; |
603 | #endif | 601 | #endif |
604 | 602 | ||
605 | static struct amba_pl011_data uart0_plat = { | 603 | struct amba_pl011_data uart0_plat = { |
606 | #ifdef CONFIG_STE_DMA40 | 604 | #ifdef CONFIG_STE_DMA40 |
607 | .dma_filter = stedma40_filter, | 605 | .dma_filter = stedma40_filter, |
608 | .dma_rx_param = &uart0_dma_cfg_rx, | 606 | .dma_rx_param = &uart0_dma_cfg_rx, |
@@ -610,7 +608,7 @@ static struct amba_pl011_data uart0_plat = { | |||
610 | #endif | 608 | #endif |
611 | }; | 609 | }; |
612 | 610 | ||
613 | static struct amba_pl011_data uart1_plat = { | 611 | struct amba_pl011_data uart1_plat = { |
614 | #ifdef CONFIG_STE_DMA40 | 612 | #ifdef CONFIG_STE_DMA40 |
615 | .dma_filter = stedma40_filter, | 613 | .dma_filter = stedma40_filter, |
616 | .dma_rx_param = &uart1_dma_cfg_rx, | 614 | .dma_rx_param = &uart1_dma_cfg_rx, |
@@ -618,7 +616,7 @@ static struct amba_pl011_data uart1_plat = { | |||
618 | #endif | 616 | #endif |
619 | }; | 617 | }; |
620 | 618 | ||
621 | static struct amba_pl011_data uart2_plat = { | 619 | struct amba_pl011_data uart2_plat = { |
622 | #ifdef CONFIG_STE_DMA40 | 620 | #ifdef CONFIG_STE_DMA40 |
623 | .dma_filter = stedma40_filter, | 621 | .dma_filter = stedma40_filter, |
624 | .dma_rx_param = &uart2_dma_cfg_rx, | 622 | .dma_rx_param = &uart2_dma_cfg_rx, |
@@ -681,8 +679,6 @@ static void __init mop500_init_machine(void) | |||
681 | 679 | ||
682 | /* This board has full regulator constraints */ | 680 | /* This board has full regulator constraints */ |
683 | regulator_has_full_constraints(); | 681 | regulator_has_full_constraints(); |
684 | |||
685 | mop500_uib_init(); | ||
686 | } | 682 | } |
687 | 683 | ||
688 | static void __init snowball_init_machine(void) | 684 | static void __init snowball_init_machine(void) |
@@ -747,8 +743,6 @@ static void __init hrefv60_init_machine(void) | |||
747 | 743 | ||
748 | /* This board has full regulator constraints */ | 744 | /* This board has full regulator constraints */ |
749 | regulator_has_full_constraints(); | 745 | regulator_has_full_constraints(); |
750 | |||
751 | mop500_uib_init(); | ||
752 | } | 746 | } |
753 | 747 | ||
754 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | 748 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |
@@ -794,135 +788,5 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") | |||
794 | .timer = &ux500_timer, | 788 | .timer = &ux500_timer, |
795 | .handle_irq = gic_handle_irq, | 789 | .handle_irq = gic_handle_irq, |
796 | .init_machine = snowball_init_machine, | 790 | .init_machine = snowball_init_machine, |
797 | .init_late = ux500_init_late, | 791 | .init_late = NULL, |
798 | MACHINE_END | ||
799 | |||
800 | #ifdef CONFIG_MACH_UX500_DT | ||
801 | |||
802 | struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { | ||
803 | /* Requires call-back bindings. */ | ||
804 | OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), | ||
805 | /* Requires DMA and call-back bindings. */ | ||
806 | OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), | ||
807 | OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), | ||
808 | OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), | ||
809 | /* Requires DMA bindings. */ | ||
810 | OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), | ||
811 | OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), | ||
812 | OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), | ||
813 | OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data), | ||
814 | OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), | ||
815 | /* Requires clock name bindings. */ | ||
816 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL), | ||
817 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL), | ||
818 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL), | ||
819 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL), | ||
820 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL), | ||
821 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL), | ||
822 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL), | ||
823 | OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL), | ||
824 | OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL), | ||
825 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL), | ||
826 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL), | ||
827 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL), | ||
828 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), | ||
829 | OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), | ||
830 | /* Requires device name bindings. */ | ||
831 | OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), | ||
832 | /* Requires clock name and DMA bindings. */ | ||
833 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, | ||
834 | "ux500-msp-i2s.0", &msp0_platform_data), | ||
835 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, | ||
836 | "ux500-msp-i2s.1", &msp1_platform_data), | ||
837 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000, | ||
838 | "ux500-msp-i2s.2", &msp2_platform_data), | ||
839 | OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, | ||
840 | "ux500-msp-i2s.3", &msp3_platform_data), | ||
841 | {}, | ||
842 | }; | ||
843 | |||
844 | static const struct of_device_id u8500_local_bus_nodes[] = { | ||
845 | /* only create devices below soc node */ | ||
846 | { .compatible = "stericsson,db8500", }, | ||
847 | { .compatible = "stericsson,db8500-prcmu", }, | ||
848 | { .compatible = "simple-bus"}, | ||
849 | { }, | ||
850 | }; | ||
851 | |||
852 | static void __init u8500_init_machine(void) | ||
853 | { | ||
854 | struct device *parent = NULL; | ||
855 | int i2c0_devs; | ||
856 | int i; | ||
857 | |||
858 | /* Pinmaps must be in place before devices register */ | ||
859 | if (of_machine_is_compatible("st-ericsson,mop500")) | ||
860 | mop500_pinmaps_init(); | ||
861 | else if (of_machine_is_compatible("calaosystems,snowball-a9500")) | ||
862 | snowball_pinmaps_init(); | ||
863 | else if (of_machine_is_compatible("st-ericsson,hrefv60+")) | ||
864 | hrefv60_pinmaps_init(); | ||
865 | |||
866 | parent = u8500_of_init_devices(); | ||
867 | |||
868 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) | ||
869 | mop500_platform_devs[i]->dev.parent = parent; | ||
870 | |||
871 | /* automatically probe child nodes of db8500 device */ | ||
872 | of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); | ||
873 | |||
874 | if (of_machine_is_compatible("st-ericsson,mop500")) { | ||
875 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | ||
876 | |||
877 | platform_add_devices(mop500_platform_devs, | ||
878 | ARRAY_SIZE(mop500_platform_devs)); | ||
879 | |||
880 | mop500_sdi_init(parent); | ||
881 | mop500_audio_init(parent); | ||
882 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); | ||
883 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
884 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
885 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
886 | |||
887 | mop500_uib_init(); | ||
888 | |||
889 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { | ||
890 | mop500_of_audio_init(parent); | ||
891 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { | ||
892 | /* | ||
893 | * The HREFv60 board removed a GPIO expander and routed | ||
894 | * all these GPIO pins to the internal GPIO controller | ||
895 | * instead. | ||
896 | */ | ||
897 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; | ||
898 | platform_add_devices(mop500_platform_devs, | ||
899 | ARRAY_SIZE(mop500_platform_devs)); | ||
900 | |||
901 | mop500_uib_init(); | ||
902 | } | ||
903 | |||
904 | /* This board has full regulator constraints */ | ||
905 | regulator_has_full_constraints(); | ||
906 | } | ||
907 | |||
908 | static const char * u8500_dt_board_compat[] = { | ||
909 | "calaosystems,snowball-a9500", | ||
910 | "st-ericsson,hrefv60+", | ||
911 | "st-ericsson,u8500", | ||
912 | "st-ericsson,mop500", | ||
913 | NULL, | ||
914 | }; | ||
915 | |||
916 | |||
917 | DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") | ||
918 | .smp = smp_ops(ux500_smp_ops), | ||
919 | .map_io = u8500_map_io, | ||
920 | .init_irq = ux500_init_irq, | ||
921 | /* we re-use nomadik timer here */ | ||
922 | .timer = &ux500_timer, | ||
923 | .handle_irq = gic_handle_irq, | ||
924 | .init_machine = u8500_init_machine, | ||
925 | .init_late = ux500_init_late, | ||
926 | .dt_compat = u8500_dt_board_compat, | ||
927 | MACHINE_END | 792 | MACHINE_END |
928 | #endif | ||