From 809efa565a83dee14ae44726a7a2766960a11b62 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 25 Sep 2012 12:04:51 +0100 Subject: ARM: ux500: Move regulator-name properties out to board DTS files Regulator supply names should be allocated by board rather than per SoC, as the same SoC could be wired differently on varying hardware. Here we push all regulator-name allocation out to the dbx5x0 subordinate board files; HREF and Snowball. Requested-by: Mark Brown Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/dbx5x0.dtsi | 31 --------- arch/arm/boot/dts/hrefv60plus.dts | 132 ++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/snowball.dts | 132 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 264 insertions(+), 31 deletions(-) diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 4b0e0ca08f40..058e682fc2da 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi @@ -209,123 +209,103 @@ // DB8500_REGULATOR_VAPE db8500_vape_reg: db8500_vape { regulator-compatible = "db8500_vape"; - regulator-name = "db8500-vape"; regulator-always-on; }; // DB8500_REGULATOR_VARM db8500_varm_reg: db8500_varm { regulator-compatible = "db8500_varm"; - regulator-name = "db8500-varm"; }; // DB8500_REGULATOR_VMODEM db8500_vmodem_reg: db8500_vmodem { regulator-compatible = "db8500_vmodem"; - regulator-name = "db8500-vmodem"; }; // DB8500_REGULATOR_VPLL db8500_vpll_reg: db8500_vpll { regulator-compatible = "db8500_vpll"; - regulator-name = "db8500-vpll"; }; // DB8500_REGULATOR_VSMPS1 db8500_vsmps1_reg: db8500_vsmps1 { regulator-compatible = "db8500_vsmps1"; - regulator-name = "db8500-vsmps1"; }; // DB8500_REGULATOR_VSMPS2 db8500_vsmps2_reg: db8500_vsmps2 { regulator-compatible = "db8500_vsmps2"; - regulator-name = "db8500-vsmps2"; }; // DB8500_REGULATOR_VSMPS3 db8500_vsmps3_reg: db8500_vsmps3 { regulator-compatible = "db8500_vsmps3"; - regulator-name = "db8500-vsmps3"; }; // DB8500_REGULATOR_VRF1 db8500_vrf1_reg: db8500_vrf1 { regulator-compatible = "db8500_vrf1"; - regulator-name = "db8500-vrf1"; }; // DB8500_REGULATOR_SWITCH_SVAMMDSP db8500_sva_mmdsp_reg: db8500_sva_mmdsp { regulator-compatible = "db8500_sva_mmdsp"; - regulator-name = "db8500-sva-mmdsp"; }; // DB8500_REGULATOR_SWITCH_SVAMMDSPRET db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret { regulator-compatible = "db8500_sva_mmdsp_ret"; - regulator-name = "db8500-sva-mmdsp-ret"; }; // DB8500_REGULATOR_SWITCH_SVAPIPE db8500_sva_pipe_reg: db8500_sva_pipe { regulator-compatible = "db8500_sva_pipe"; - regulator-name = "db8500_sva_pipe"; }; // DB8500_REGULATOR_SWITCH_SIAMMDSP db8500_sia_mmdsp_reg: db8500_sia_mmdsp { regulator-compatible = "db8500_sia_mmdsp"; - regulator-name = "db8500_sia_mmdsp"; }; // DB8500_REGULATOR_SWITCH_SIAMMDSPRET db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret { - regulator-name = "db8500-sia-mmdsp-ret"; }; // DB8500_REGULATOR_SWITCH_SIAPIPE db8500_sia_pipe_reg: db8500_sia_pipe { regulator-compatible = "db8500_sia_pipe"; - regulator-name = "db8500-sia-pipe"; }; // DB8500_REGULATOR_SWITCH_SGA db8500_sga_reg: db8500_sga { regulator-compatible = "db8500_sga"; - regulator-name = "db8500-sga"; vin-supply = <&db8500_vape_reg>; }; // DB8500_REGULATOR_SWITCH_B2R2_MCDE db8500_b2r2_mcde_reg: db8500_b2r2_mcde { regulator-compatible = "db8500_b2r2_mcde"; - regulator-name = "db8500-b2r2-mcde"; vin-supply = <&db8500_vape_reg>; }; // DB8500_REGULATOR_SWITCH_ESRAM12 db8500_esram12_reg: db8500_esram12 { regulator-compatible = "db8500_esram12"; - regulator-name = "db8500-esram12"; }; // DB8500_REGULATOR_SWITCH_ESRAM12RET db8500_esram12_ret_reg: db8500_esram12_ret { regulator-compatible = "db8500_esram12_ret"; - regulator-name = "db8500-esram12-ret"; }; // DB8500_REGULATOR_SWITCH_ESRAM34 db8500_esram34_reg: db8500_esram34 { regulator-compatible = "db8500_esram34"; - regulator-name = "db8500-esram34"; }; // DB8500_REGULATOR_SWITCH_ESRAM34RET db8500_esram34_ret_reg: db8500_esram34_ret { regulator-compatible = "db8500_esram34_ret"; - regulator-name = "db8500-esram34-ret"; }; }; @@ -404,7 +384,6 @@ // supplies to the display/camera ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { regulator-compatible = "ab8500_ldo_aux1"; - regulator-name = "V-DISPLAY"; regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2900000>; regulator-boot-on; @@ -415,7 +394,6 @@ // supplies to the on-board eMMC ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { regulator-compatible = "ab8500_ldo_aux2"; - regulator-name = "V-eMMC1"; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <3300000>; }; @@ -423,7 +401,6 @@ // supply for VAUX3; SDcard slots ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { regulator-compatible = "ab8500_ldo_aux3"; - regulator-name = "V-MMC-SD"; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <3300000>; }; @@ -431,49 +408,41 @@ // supply for v-intcore12; VINTCORE12 LDO ab8500_ldo_initcore_reg: ab8500_ldo_initcore { regulator-compatible = "ab8500_ldo_initcore"; - regulator-name = "V-INTCORE"; }; // supply for tvout; gpadc; TVOUT LDO ab8500_ldo_tvout_reg: ab8500_ldo_tvout { regulator-compatible = "ab8500_ldo_tvout"; - regulator-name = "V-TVOUT"; }; // supply for ab8500-usb; USB LDO ab8500_ldo_usb_reg: ab8500_ldo_usb { regulator-compatible = "ab8500_ldo_usb"; - regulator-name = "dummy"; }; // supply for ab8500-vaudio; VAUDIO LDO ab8500_ldo_audio_reg: ab8500_ldo_audio { regulator-compatible = "ab8500_ldo_audio"; - regulator-name = "V-AUD"; }; // supply for v-anamic1 VAMic1-LDO ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { regulator-compatible = "ab8500_ldo_anamic1"; - regulator-name = "V-AMIC1"; }; // supply for v-amic2; VAMIC2 LDO; reuse constants for AMIC1 ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { regulator-compatible = "ab8500_ldo_amamic2"; - regulator-name = "V-AMIC2"; }; // supply for v-dmic; VDMIC LDO ab8500_ldo_dmic_reg: ab8500_ldo_dmic { regulator-compatible = "ab8500_ldo_dmic"; - regulator-name = "V-DMIC"; }; // supply for U8500 CSI/DSI; VANA LDO ab8500_ldo_ana_reg: ab8500_ldo_ana { regulator-compatible = "ab8500_ldo_ana"; - regulator-name = "V-CSI/DSI"; }; }; }; diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index 2131d77dc9c9..e221320423e3 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -91,5 +91,137 @@ msp3: msp@80125000 { status = "okay"; }; + + prcmu@80157000 { + db8500-prcmu-regulators { + db8500_vape_reg: db8500_vape { + regulator-name = "db8500-vape"; + }; + + db8500_varm_reg: db8500_varm { + regulator-name = "db8500-varm"; + }; + + db8500_vmodem_reg: db8500_vmodem { + regulator-name = "db8500-vmodem"; + }; + + db8500_vpll_reg: db8500_vpll { + regulator-name = "db8500-vpll"; + }; + + db8500_vsmps1_reg: db8500_vsmps1 { + regulator-name = "db8500-vsmps1"; + }; + + db8500_vsmps2_reg: db8500_vsmps2 { + regulator-name = "db8500-vsmps2"; + }; + + db8500_vsmps3_reg: db8500_vsmps3 { + regulator-name = "db8500-vsmps3"; + }; + + db8500_vrf1_reg: db8500_vrf1 { + regulator-name = "db8500-vrf1"; + }; + + db8500_sva_mmdsp_reg: db8500_sva_mmdsp { + regulator-name = "db8500-sva-mmdsp"; + }; + + db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret { + regulator-name = "db8500-sva-mmdsp-ret"; + }; + + db8500_sva_pipe_reg: db8500_sva_pipe { + regulator-name = "db8500_sva_pipe"; + }; + + db8500_sia_mmdsp_reg: db8500_sia_mmdsp { + regulator-name = "db8500_sia_mmdsp"; + }; + + db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret { + regulator-name = "db8500-sia-mmdsp-ret"; + }; + + db8500_sia_pipe_reg: db8500_sia_pipe { + regulator-name = "db8500-sia-pipe"; + }; + + db8500_sga_reg: db8500_sga { + regulator-name = "db8500-sga"; + }; + + db8500_b2r2_mcde_reg: db8500_b2r2_mcde { + regulator-name = "db8500-b2r2-mcde"; + }; + + db8500_esram12_reg: db8500_esram12 { + regulator-name = "db8500-esram12"; + }; + + db8500_esram12_ret_reg: db8500_esram12_ret { + regulator-name = "db8500-esram12-ret"; + }; + + db8500_esram34_reg: db8500_esram34 { + regulator-name = "db8500-esram34"; + }; + + db8500_esram34_ret_reg: db8500_esram34_ret { + regulator-name = "db8500-esram34-ret"; + }; + }; + + ab8500@5 { + ab8500-regulators { + ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { + regulator-name = "V-DISPLAY"; + }; + + ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { + regulator-name = "V-eMMC1"; + }; + + ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { + regulator-name = "V-MMC-SD"; + }; + + ab8500_ldo_initcore_reg: ab8500_ldo_initcore { + regulator-name = "V-INTCORE"; + }; + + ab8500_ldo_tvout_reg: ab8500_ldo_tvout { + regulator-name = "V-TVOUT"; + }; + + ab8500_ldo_usb_reg: ab8500_ldo_usb { + regulator-name = "dummy"; + }; + + ab8500_ldo_audio_reg: ab8500_ldo_audio { + regulator-name = "V-AUD"; + }; + + ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { + regulator-name = "V-AMIC1"; + }; + + ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { + regulator-name = "V-AMIC2"; + }; + + ab8500_ldo_dmic_reg: ab8500_ldo_dmic { + regulator-name = "V-DMIC"; + }; + + ab8500_ldo_ana_reg: ab8500_ldo_ana { + regulator-name = "V-CSI/DSI"; + }; + }; + }; + }; }; }; diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 702c0baa6004..639b8e9d648f 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -183,5 +183,137 @@ reg = <0x33>; }; }; + + prcmu@80157000 { + db8500-prcmu-regulators { + db8500_vape_reg: db8500_vape { + regulator-name = "db8500-vape"; + }; + + db8500_varm_reg: db8500_varm { + regulator-name = "db8500-varm"; + }; + + db8500_vmodem_reg: db8500_vmodem { + regulator-name = "db8500-vmodem"; + }; + + db8500_vpll_reg: db8500_vpll { + regulator-name = "db8500-vpll"; + }; + + db8500_vsmps1_reg: db8500_vsmps1 { + regulator-name = "db8500-vsmps1"; + }; + + db8500_vsmps2_reg: db8500_vsmps2 { + regulator-name = "db8500-vsmps2"; + }; + + db8500_vsmps3_reg: db8500_vsmps3 { + regulator-name = "db8500-vsmps3"; + }; + + db8500_vrf1_reg: db8500_vrf1 { + regulator-name = "db8500-vrf1"; + }; + + db8500_sva_mmdsp_reg: db8500_sva_mmdsp { + regulator-name = "db8500-sva-mmdsp"; + }; + + db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret { + regulator-name = "db8500-sva-mmdsp-ret"; + }; + + db8500_sva_pipe_reg: db8500_sva_pipe { + regulator-name = "db8500_sva_pipe"; + }; + + db8500_sia_mmdsp_reg: db8500_sia_mmdsp { + regulator-name = "db8500_sia_mmdsp"; + }; + + db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret { + regulator-name = "db8500-sia-mmdsp-ret"; + }; + + db8500_sia_pipe_reg: db8500_sia_pipe { + regulator-name = "db8500-sia-pipe"; + }; + + db8500_sga_reg: db8500_sga { + regulator-name = "db8500-sga"; + }; + + db8500_b2r2_mcde_reg: db8500_b2r2_mcde { + regulator-name = "db8500-b2r2-mcde"; + }; + + db8500_esram12_reg: db8500_esram12 { + regulator-name = "db8500-esram12"; + }; + + db8500_esram12_ret_reg: db8500_esram12_ret { + regulator-name = "db8500-esram12-ret"; + }; + + db8500_esram34_reg: db8500_esram34 { + regulator-name = "db8500-esram34"; + }; + + db8500_esram34_ret_reg: db8500_esram34_ret { + regulator-name = "db8500-esram34-ret"; + }; + }; + + ab8500@5 { + ab8500-regulators { + ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { + regulator-name = "V-DISPLAY"; + }; + + ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { + regulator-name = "V-eMMC1"; + }; + + ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { + regulator-name = "V-MMC-SD"; + }; + + ab8500_ldo_initcore_reg: ab8500_ldo_initcore { + regulator-name = "V-INTCORE"; + }; + + ab8500_ldo_tvout_reg: ab8500_ldo_tvout { + regulator-name = "V-TVOUT"; + }; + + ab8500_ldo_usb_reg: ab8500_ldo_usb { + regulator-name = "dummy"; + }; + + ab8500_ldo_audio_reg: ab8500_ldo_audio { + regulator-name = "V-AUD"; + }; + + ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { + regulator-name = "V-AMIC1"; + }; + + ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { + regulator-name = "V-AMIC2"; + }; + + ab8500_ldo_dmic_reg: ab8500_ldo_dmic { + regulator-name = "V-DMIC"; + }; + + ab8500_ldo_ana_reg: ab8500_ldo_ana { + regulator-name = "V-CSI/DSI"; + }; + }; + }; + }; }; }; -- cgit 1.4.1 From 0ddf855af6162df41345ea6afabd0190d751bfb9 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Tue, 25 Sep 2012 16:03:45 +0100 Subject: ARM: ux500: Fix initialisation order for UIBs An earlier change prevented User Interface Boards (UIBs) from being initialised on boards which did not support them. This change had the undesired effect of reordering the UIB initialisation calls with I2C registration. Here we ensure UIBs are only setup after all required infrastructure is already in place. Acked-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 10 +--------- arch/arm/mach-ux500/cpu.c | 3 +++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 416d436111f2..e7dd757a79fb 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -618,8 +618,6 @@ static void __init mop500_init_machine(void) /* This board has full regulator constraints */ regulator_has_full_constraints(); - - mop500_uib_init(); } static void __init snowball_init_machine(void) @@ -684,8 +682,6 @@ static void __init hrefv60_init_machine(void) /* This board has full regulator constraints */ regulator_has_full_constraints(); - - mop500_uib_init(); } MACHINE_START(U8500, "ST-Ericsson MOP500 platform") @@ -721,7 +717,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") .timer = &ux500_timer, .handle_irq = gic_handle_irq, .init_machine = snowball_init_machine, - .init_late = ux500_init_late, + .init_late = NULL, MACHINE_END #ifdef CONFIG_MACH_UX500_DT @@ -811,8 +807,6 @@ static void __init u8500_init_machine(void) i2c_register_board_info(2, mop500_i2c2_devices, ARRAY_SIZE(mop500_i2c2_devices)); - mop500_uib_init(); - } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { mop500_of_audio_init(parent); } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { @@ -824,8 +818,6 @@ static void __init u8500_init_machine(void) mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; platform_add_devices(mop500_platform_devs, ARRAY_SIZE(mop500_platform_devs)); - - mop500_uib_init(); } /* This board has full regulator constraints */ diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 1f3fbc2bb776..721e7b4275f3 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -26,6 +26,8 @@ #include #include +#include "board-mop500.h" + void __iomem *_PRCMU_BASE; /* @@ -82,6 +84,7 @@ void __init ux500_init_irq(void) void __init ux500_init_late(void) { + mop500_uib_init(); } static const char * __init ux500_get_machine(void) -- cgit 1.4.1 From 81bf8c2e0f473c443bb067a55f55e6311adf5993 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 26 Sep 2012 12:55:56 +0100 Subject: ARM: ux500: Elaborate on SDI device node names in Device Tree In the DB8500 Reference Manual SDI devices are described as being part of peripheral blocks. This is more in line with how these devices are actually represented in hardware, so here we detail which peripheral block each of the SDI devices belong in the node name. Requested-by: Linus Walleij Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/dbx5x0.dtsi | 12 ++++++------ arch/arm/boot/dts/snowball.dts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 058e682fc2da..3b4298bc0bf9 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi @@ -546,42 +546,42 @@ status = "disabled"; }; - sdi@80126000 { + sdi0_per1@80126000 { compatible = "arm,pl18x", "arm,primecell"; reg = <0x80126000 0x1000>; interrupts = <0 60 0x4>; status = "disabled"; }; - sdi@80118000 { + sdi1_per2@80118000 { compatible = "arm,pl18x", "arm,primecell"; reg = <0x80118000 0x1000>; interrupts = <0 50 0x4>; status = "disabled"; }; - sdi@80005000 { + sdi2_per3@80005000 { compatible = "arm,pl18x", "arm,primecell"; reg = <0x80005000 0x1000>; interrupts = <0 41 0x4>; status = "disabled"; }; - sdi@80119000 { + sdi3_per2@80119000 { compatible = "arm,pl18x", "arm,primecell"; reg = <0x80119000 0x1000>; interrupts = <0 59 0x4>; status = "disabled"; }; - sdi@80114000 { + sdi4_per2@80114000 { compatible = "arm,pl18x", "arm,primecell"; reg = <0x80114000 0x1000>; interrupts = <0 99 0x4>; status = "disabled"; }; - sdi@80008000 { + sdi5_per3@80008000 { compatible = "arm,pl18x", "arm,primecell"; reg = <0x80008000 0x1000>; interrupts = <0 100 0x4>; diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 639b8e9d648f..9a37244a3cc5 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -120,7 +120,7 @@ }; // External Micro SD slot - sdi@80126000 { + sdi0_per1@80126000 { arm,primecell-periphid = <0x10480180>; max-frequency = <50000000>; bus-width = <8>; @@ -134,7 +134,7 @@ }; // On-board eMMC - sdi@80114000 { + sdi4_per2@80114000 { arm,primecell-periphid = <0x10480180>; max-frequency = <50000000>; bus-width = <8>; -- cgit 1.4.1 From 706b0a07ec3251063cca9a7912f6228ec892f44a Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 14 Sep 2012 15:27:41 +0100 Subject: ARM: ux500: Add SDI (MMC) support to the HREF Device Tree Here we add the Device Tree nodes which are required to successfully probe the MMCI driver which will enable the four cards available on ST-Ericsson's HREF hardware development platform. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/hrefv60plus.dts | 44 ++++++++++++++++++++++++++++++++++++++ arch/arm/mach-ux500/board-mop500.c | 1 - 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index e221320423e3..3fd83c695a5c 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -77,6 +77,50 @@ }; }; + // External Micro SD slot + sdi0_per1@80126000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <4>; + mmc-cap-sd-highspeed; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux3_reg>; + + cd-gpios = <&tc3589x_gpio 3 0x4>; + + status = "okay"; + }; + + // WLAN SDIO channel + sdi1_per2@80118000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <4>; + + status = "okay"; + }; + + // PoP:ed eMMC + sdi2_per3@80005000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <8>; + mmc-cap-mmc-highspeed; + + status = "okay"; + }; + + // On-board eMMC + sdi4_per2@80114000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <8>; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux2_reg>; + + status = "okay"; + }; + sound { compatible = "stericsson,snd-soc-mop500"; diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index e7dd757a79fb..d141dd03d2ea 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -800,7 +800,6 @@ static void __init u8500_init_machine(void) platform_add_devices(mop500_platform_devs, ARRAY_SIZE(mop500_platform_devs)); - mop500_sdi_init(parent); mop500_audio_init(parent); i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); -- cgit 1.4.1 From 92a0f489efc4e194385179441265b45f6271dbee Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 26 Sep 2012 11:12:48 +0100 Subject: ARM: ux500: Correct Snowball's external SD/MMC slot's bus width Snowball's external SD/MMC slot is only capable of 4 bit data transfer, not 8 bits as previously thought. This is a simple fixup moving to the correct settings. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/snowball.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 9a37244a3cc5..6a2b58b6919d 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -123,7 +123,7 @@ sdi0_per1@80126000 { arm,primecell-periphid = <0x10480180>; max-frequency = <50000000>; - bus-width = <8>; + bus-width = <4>; mmc-cap-mmc-highspeed; vmmc-supply = <&ab8500_ldo_aux3_reg>; -- cgit 1.4.1 From d1b8bfa342ca61a39d002e16ffc7f4990e4b0d1a Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 26 Sep 2012 13:29:09 +0100 Subject: ARM: ux500: Create a DTS hierarchy for ST-Ericsson's HREF boards There are two main versions of the ST-Ericsson hardware reference board, each with subtle differences. These versions are described in current platform data as 'mop500' for HREF v1.1 & v2.0 and 'hrefv60+' for latter incarnations. However, the boards have much in common, so this patch creates a .dtsi (Device Tree Source Include) file which describes the similarities between the two boards and individual 'hrefprev60' and 'hrefv60plus' .dts files which depict the differences. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/href.dtsi | 262 ++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/hrefv60plus.dts | 256 +------------------------------------ 2 files changed, 264 insertions(+), 254 deletions(-) create mode 100644 arch/arm/boot/dts/href.dtsi diff --git a/arch/arm/boot/dts/href.dtsi b/arch/arm/boot/dts/href.dtsi new file mode 100644 index 000000000000..27baa440bd00 --- /dev/null +++ b/arch/arm/boot/dts/href.dtsi @@ -0,0 +1,262 @@ +/* + * Copyright 2012 ST-Ericsson AB + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/include/ "dbx5x0.dtsi" + +/ { + memory { + reg = <0x00000000 0x20000000>; + }; + + soc-u9500 { + uart@80120000 { + status = "okay"; + }; + + uart@80121000 { + status = "okay"; + }; + + uart@80007000 { + status = "okay"; + }; + + i2c@80004000 { + tc3589x@42 { + compatible = "tc3589x"; + reg = <0x42>; + interrupt-parent = <&gpio6>; + interrupts = <25 0x1>; + + interrupt-controller; + #interrupt-cells = <2>; + + tc3589x_gpio: tc3589x_gpio { + compatible = "tc3589x-gpio"; + interrupts = <0 0x1>; + + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + }; + }; + }; + + i2c@80128000 { + lp5521@0x33 { + compatible = "lp5521"; + reg = <0x33>; + }; + + lp5521@0x34 { + compatible = "lp5521"; + reg = <0x34>; + }; + + bh1780@0x29 { + compatible = "rohm,bh1780gli"; + reg = <0x33>; + }; + }; + + // External Micro SD slot + sdi0_per1@80126000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <4>; + mmc-cap-sd-highspeed; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux3_reg>; + + cd-gpios = <&tc3589x_gpio 3 0x4>; + + status = "okay"; + }; + + // WLAN SDIO channel + sdi1_per2@80118000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <4>; + + status = "okay"; + }; + + // PoP:ed eMMC + sdi2_per3@80005000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <8>; + mmc-cap-mmc-highspeed; + + status = "okay"; + }; + + // On-board eMMC + sdi4_per2@80114000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <8>; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux2_reg>; + + status = "okay"; + }; + + sound { + compatible = "stericsson,snd-soc-mop500"; + + stericsson,cpu-dai = <&msp1 &msp3>; + stericsson,audio-codec = <&codec>; + }; + + msp1: msp@80124000 { + status = "okay"; + }; + + msp3: msp@80125000 { + status = "okay"; + }; + + prcmu@80157000 { + db8500-prcmu-regulators { + db8500_vape_reg: db8500_vape { + regulator-name = "db8500-vape"; + }; + + db8500_varm_reg: db8500_varm { + regulator-name = "db8500-varm"; + }; + + db8500_vmodem_reg: db8500_vmodem { + regulator-name = "db8500-vmodem"; + }; + + db8500_vpll_reg: db8500_vpll { + regulator-name = "db8500-vpll"; + }; + + db8500_vsmps1_reg: db8500_vsmps1 { + regulator-name = "db8500-vsmps1"; + }; + + db8500_vsmps2_reg: db8500_vsmps2 { + regulator-name = "db8500-vsmps2"; + }; + + db8500_vsmps3_reg: db8500_vsmps3 { + regulator-name = "db8500-vsmps3"; + }; + + db8500_vrf1_reg: db8500_vrf1 { + regulator-name = "db8500-vrf1"; + }; + + db8500_sva_mmdsp_reg: db8500_sva_mmdsp { + regulator-name = "db8500-sva-mmdsp"; + }; + + db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret { + regulator-name = "db8500-sva-mmdsp-ret"; + }; + + db8500_sva_pipe_reg: db8500_sva_pipe { + regulator-name = "db8500_sva_pipe"; + }; + + db8500_sia_mmdsp_reg: db8500_sia_mmdsp { + regulator-name = "db8500_sia_mmdsp"; + }; + + db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret { + regulator-name = "db8500-sia-mmdsp-ret"; + }; + + db8500_sia_pipe_reg: db8500_sia_pipe { + regulator-name = "db8500-sia-pipe"; + }; + + db8500_sga_reg: db8500_sga { + regulator-name = "db8500-sga"; + }; + + db8500_b2r2_mcde_reg: db8500_b2r2_mcde { + regulator-name = "db8500-b2r2-mcde"; + }; + + db8500_esram12_reg: db8500_esram12 { + regulator-name = "db8500-esram12"; + }; + + db8500_esram12_ret_reg: db8500_esram12_ret { + regulator-name = "db8500-esram12-ret"; + }; + + db8500_esram34_reg: db8500_esram34 { + regulator-name = "db8500-esram34"; + }; + + db8500_esram34_ret_reg: db8500_esram34_ret { + regulator-name = "db8500-esram34-ret"; + }; + }; + + ab8500@5 { + ab8500-regulators { + ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { + regulator-name = "V-DISPLAY"; + }; + + ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { + regulator-name = "V-eMMC1"; + }; + + ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { + regulator-name = "V-MMC-SD"; + }; + + ab8500_ldo_initcore_reg: ab8500_ldo_initcore { + regulator-name = "V-INTCORE"; + }; + + ab8500_ldo_tvout_reg: ab8500_ldo_tvout { + regulator-name = "V-TVOUT"; + }; + + ab8500_ldo_usb_reg: ab8500_ldo_usb { + regulator-name = "dummy"; + }; + + ab8500_ldo_audio_reg: ab8500_ldo_audio { + regulator-name = "V-AUD"; + }; + + ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { + regulator-name = "V-AMIC1"; + }; + + ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { + regulator-name = "V-AMIC2"; + }; + + ab8500_ldo_dmic_reg: ab8500_ldo_dmic { + regulator-name = "V-DMIC"; + }; + + ab8500_ldo_ana_reg: ab8500_ldo_ana { + regulator-name = "V-CSI/DSI"; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index 3fd83c695a5c..2a85893e5156 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -11,261 +11,9 @@ /dts-v1/; /include/ "dbx5x0.dtsi" +/include/ "href.dtsi" / { - model = "ST-Ericsson HREF platform with Device Tree"; + model = "ST-Ericsson HREF (v60+) platform with Device Tree"; compatible = "st-ericsson,hrefv60+"; - - memory { - reg = <0x00000000 0x20000000>; - }; - - soc-u9500 { - uart@80120000 { - status = "okay"; - }; - - uart@80121000 { - status = "okay"; - }; - - uart@80007000 { - status = "okay"; - }; - - i2c@80004000 { - tc3589x@42 { - compatible = "tc3589x"; - reg = <0x42>; - interrupt-parent = <&gpio6>; - interrupts = <25 0x1>; - - interrupt-controller; - #interrupt-cells = <2>; - - tc3589x_gpio: tc3589x_gpio { - compatible = "tc3589x-gpio"; - interrupts = <0 0x1>; - - interrupt-controller; - #interrupt-cells = <2>; - gpio-controller; - #gpio-cells = <2>; - }; - }; - - tps61052@33 { - compatible = "tps61052"; - reg = <0x33>; - }; - }; - - i2c@80128000 { - lp5521@0x33 { - compatible = "lp5521"; - reg = <0x33>; - }; - - lp5521@0x34 { - compatible = "lp5521"; - reg = <0x34>; - }; - - bh1780@0x29 { - compatible = "rohm,bh1780gli"; - reg = <0x33>; - }; - }; - - // External Micro SD slot - sdi0_per1@80126000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <50000000>; - bus-width = <4>; - mmc-cap-sd-highspeed; - mmc-cap-mmc-highspeed; - vmmc-supply = <&ab8500_ldo_aux3_reg>; - - cd-gpios = <&tc3589x_gpio 3 0x4>; - - status = "okay"; - }; - - // WLAN SDIO channel - sdi1_per2@80118000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <50000000>; - bus-width = <4>; - - status = "okay"; - }; - - // PoP:ed eMMC - sdi2_per3@80005000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <50000000>; - bus-width = <8>; - mmc-cap-mmc-highspeed; - - status = "okay"; - }; - - // On-board eMMC - sdi4_per2@80114000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <50000000>; - bus-width = <8>; - mmc-cap-mmc-highspeed; - vmmc-supply = <&ab8500_ldo_aux2_reg>; - - status = "okay"; - }; - - sound { - compatible = "stericsson,snd-soc-mop500"; - - stericsson,cpu-dai = <&msp1 &msp3>; - stericsson,audio-codec = <&codec>; - }; - - msp1: msp@80124000 { - status = "okay"; - }; - - msp3: msp@80125000 { - status = "okay"; - }; - - prcmu@80157000 { - db8500-prcmu-regulators { - db8500_vape_reg: db8500_vape { - regulator-name = "db8500-vape"; - }; - - db8500_varm_reg: db8500_varm { - regulator-name = "db8500-varm"; - }; - - db8500_vmodem_reg: db8500_vmodem { - regulator-name = "db8500-vmodem"; - }; - - db8500_vpll_reg: db8500_vpll { - regulator-name = "db8500-vpll"; - }; - - db8500_vsmps1_reg: db8500_vsmps1 { - regulator-name = "db8500-vsmps1"; - }; - - db8500_vsmps2_reg: db8500_vsmps2 { - regulator-name = "db8500-vsmps2"; - }; - - db8500_vsmps3_reg: db8500_vsmps3 { - regulator-name = "db8500-vsmps3"; - }; - - db8500_vrf1_reg: db8500_vrf1 { - regulator-name = "db8500-vrf1"; - }; - - db8500_sva_mmdsp_reg: db8500_sva_mmdsp { - regulator-name = "db8500-sva-mmdsp"; - }; - - db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret { - regulator-name = "db8500-sva-mmdsp-ret"; - }; - - db8500_sva_pipe_reg: db8500_sva_pipe { - regulator-name = "db8500_sva_pipe"; - }; - - db8500_sia_mmdsp_reg: db8500_sia_mmdsp { - regulator-name = "db8500_sia_mmdsp"; - }; - - db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret { - regulator-name = "db8500-sia-mmdsp-ret"; - }; - - db8500_sia_pipe_reg: db8500_sia_pipe { - regulator-name = "db8500-sia-pipe"; - }; - - db8500_sga_reg: db8500_sga { - regulator-name = "db8500-sga"; - }; - - db8500_b2r2_mcde_reg: db8500_b2r2_mcde { - regulator-name = "db8500-b2r2-mcde"; - }; - - db8500_esram12_reg: db8500_esram12 { - regulator-name = "db8500-esram12"; - }; - - db8500_esram12_ret_reg: db8500_esram12_ret { - regulator-name = "db8500-esram12-ret"; - }; - - db8500_esram34_reg: db8500_esram34 { - regulator-name = "db8500-esram34"; - }; - - db8500_esram34_ret_reg: db8500_esram34_ret { - regulator-name = "db8500-esram34-ret"; - }; - }; - - ab8500@5 { - ab8500-regulators { - ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { - regulator-name = "V-DISPLAY"; - }; - - ab8500_ldo_aux2_reg: ab8500_ldo_aux2 { - regulator-name = "V-eMMC1"; - }; - - ab8500_ldo_aux3_reg: ab8500_ldo_aux3 { - regulator-name = "V-MMC-SD"; - }; - - ab8500_ldo_initcore_reg: ab8500_ldo_initcore { - regulator-name = "V-INTCORE"; - }; - - ab8500_ldo_tvout_reg: ab8500_ldo_tvout { - regulator-name = "V-TVOUT"; - }; - - ab8500_ldo_usb_reg: ab8500_ldo_usb { - regulator-name = "dummy"; - }; - - ab8500_ldo_audio_reg: ab8500_ldo_audio { - regulator-name = "V-AUD"; - }; - - ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 { - regulator-name = "V-AMIC1"; - }; - - ab8500_ldo_amamic2_reg: ab8500_ldo_amamic2 { - regulator-name = "V-AMIC2"; - }; - - ab8500_ldo_dmic_reg: ab8500_ldo_dmic { - regulator-name = "V-DMIC"; - }; - - ab8500_ldo_ana_reg: ab8500_ldo_ana { - regulator-name = "V-CSI/DSI"; - }; - }; - }; - }; - }; }; -- cgit 1.4.1 From dd06fafffbd8c8267e5cf945ddc318045e7682db Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 26 Sep 2012 17:08:35 +0100 Subject: ARM: ux500: Create a Device Tree for early HREFs In ux500 platform code we currently support a number of devices. Two of these devices are fairly similar, but have key differences. Early (pre-v60) HREFs and the more up-to-date versions (v60+), and they both need to be supported by Device Tree. Here we apply a DT source file for the earlier versions. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/hrefprev60.dts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 arch/arm/boot/dts/hrefprev60.dts diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts new file mode 100644 index 000000000000..2dd28b996804 --- /dev/null +++ b/arch/arm/boot/dts/hrefprev60.dts @@ -0,0 +1,28 @@ +/* + * Copyright 2012 ST-Ericsson AB + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +/include/ "dbx5x0.dtsi" +/include/ "href.dtsi" + +/ { + model = "ST-Ericsson HREF (pre-v60) platform with Device Tree"; + compatible = "st-ericsson,mop500"; + + soc-u9500 { + i2c@80004000 { + tps61052@33 { + compatible = "tps61052"; + reg = <0x33>; + }; + }; + }; +}; -- cgit 1.4.1 From 6b8db1326a67440e23f668f0e2b258e5e4127b82 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 26 Sep 2012 17:09:17 +0100 Subject: ARM: ux500: Add support for gpio-keys and Proximity Sensor for HREF Here we ensure the SFH7741 Proximity Sensor is registered through gpio-keys when booting with Device Tree enabled. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/href.dtsi | 11 +++++++++++ arch/arm/boot/dts/hrefprev60.dts | 6 ++++++ arch/arm/boot/dts/hrefv60plus.dts | 6 ++++++ 3 files changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/href.dtsi b/arch/arm/boot/dts/href.dtsi index 27baa440bd00..592fb9dc35bd 100644 --- a/arch/arm/boot/dts/href.dtsi +++ b/arch/arm/boot/dts/href.dtsi @@ -16,6 +16,17 @@ reg = <0x00000000 0x20000000>; }; + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + button@1 { + linux,code = <11>; + label = "SFH7741 Proximity Sensor"; + }; + }; + soc-u9500 { uart@80120000 { status = "okay"; diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts index 2dd28b996804..0756f97f1ee8 100644 --- a/arch/arm/boot/dts/hrefprev60.dts +++ b/arch/arm/boot/dts/hrefprev60.dts @@ -17,6 +17,12 @@ model = "ST-Ericsson HREF (pre-v60) platform with Device Tree"; compatible = "st-ericsson,mop500"; + gpio_keys { + button@1 { + gpios = <&tc3589x_gpio 7 0x4>; + }; + }; + soc-u9500 { i2c@80004000 { tps61052@33 { diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index 2a85893e5156..4b867b25fd40 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -16,4 +16,10 @@ / { model = "ST-Ericsson HREF (v60+) platform with Device Tree"; compatible = "st-ericsson,hrefv60+"; + + gpio_keys { + button@1 { + gpios = <&gpio6 25 0x4>; + }; + }; }; -- cgit 1.4.1 From d6b22ebbbf1f71f9ebbc622c96bab93d554937e7 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 26 Sep 2012 16:02:45 +0100 Subject: ARM: ux500: Remove platform specific device registration when DT is enabled Most devices have now been successfully DT:ed and each supported platform has its own Device Tree source file. Hence the majority of the platform specific device registration calls can now be successfully removed. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index d141dd03d2ea..297bf5505e65 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -775,8 +775,6 @@ static const struct of_device_id u8500_local_bus_nodes[] = { static void __init u8500_init_machine(void) { struct device *parent = NULL; - int i2c0_devs; - int i; /* Pinmaps must be in place before devices register */ if (of_machine_is_compatible("st-ericsson,mop500")) @@ -786,39 +784,12 @@ static void __init u8500_init_machine(void) else if (of_machine_is_compatible("st-ericsson,hrefv60+")) hrefv60_pinmaps_init(); + /* TODO: Export SoC, USB, cpu-freq and DMA40 */ parent = u8500_of_init_devices(); - for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) - mop500_platform_devs[i]->dev.parent = parent; - /* automatically probe child nodes of db8500 device */ of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); - if (of_machine_is_compatible("st-ericsson,mop500")) { - mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; - - platform_add_devices(mop500_platform_devs, - ARRAY_SIZE(mop500_platform_devs)); - - mop500_audio_init(parent); - i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); - i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); - i2c_register_board_info(2, mop500_i2c2_devices, - ARRAY_SIZE(mop500_i2c2_devices)); - - } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { - mop500_of_audio_init(parent); - } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { - /* - * The HREFv60 board removed a GPIO expander and routed - * all these GPIO pins to the internal GPIO controller - * instead. - */ - mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; - platform_add_devices(mop500_platform_devs, - ARRAY_SIZE(mop500_platform_devs)); - } - /* This board has full regulator constraints */ regulator_has_full_constraints(); } -- cgit 1.4.1 From fa86a76475f498961847c0511c153620463b76bd Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 27 Sep 2012 10:17:36 +0100 Subject: ARM: ux500: Move all Device Tree booting into cpu-db8500 To aid the kernel in its effort to move to DT only booting, we're transplanting all Device Tree related code to cpu-db8500 which will remain persistent throughout the transition. This change paths the way for complete removal of board-mop500, which will be done once the all DMA settings are moved into the respective DT source files. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 106 ++---------------------------------- arch/arm/mach-ux500/board-mop500.h | 8 +-- arch/arm/mach-ux500/cpu-db8500.c | 107 +++++++++++++++++++++++++++++++++++-- 3 files changed, 111 insertions(+), 110 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 297bf5505e65..daa4237ac0dc 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -33,8 +33,6 @@ #include #include #include -#include -#include #include #include @@ -464,7 +462,7 @@ static struct stedma40_chan_cfg ssp0_dma_cfg_tx = { }; #endif -static struct pl022_ssp_controller ssp0_plat = { +struct pl022_ssp_controller ssp0_plat = { .bus_id = 0, #ifdef CONFIG_STE_DMA40 .enable_dma = 1, @@ -541,7 +539,7 @@ static struct stedma40_chan_cfg uart2_dma_cfg_tx = { }; #endif -static struct amba_pl011_data uart0_plat = { +struct amba_pl011_data uart0_plat = { #ifdef CONFIG_STE_DMA40 .dma_filter = stedma40_filter, .dma_rx_param = &uart0_dma_cfg_rx, @@ -549,7 +547,7 @@ static struct amba_pl011_data uart0_plat = { #endif }; -static struct amba_pl011_data uart1_plat = { +struct amba_pl011_data uart1_plat = { #ifdef CONFIG_STE_DMA40 .dma_filter = stedma40_filter, .dma_rx_param = &uart1_dma_cfg_rx, @@ -557,7 +555,7 @@ static struct amba_pl011_data uart1_plat = { #endif }; -static struct amba_pl011_data uart2_plat = { +struct amba_pl011_data uart2_plat = { #ifdef CONFIG_STE_DMA40 .dma_filter = stedma40_filter, .dma_rx_param = &uart2_dma_cfg_rx, @@ -719,99 +717,3 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") .init_machine = snowball_init_machine, .init_late = NULL, MACHINE_END - -#ifdef CONFIG_MACH_UX500_DT - -struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { - /* Requires call-back bindings. */ - OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), - /* Requires DMA and call-back bindings. */ - OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), - OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), - OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), - /* Requires DMA bindings. */ - OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), - OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), - OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), - OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data), - OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), - /* Requires clock name bindings. */ - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL), - OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL), - OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL), - OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL), - OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL), - OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), - OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), - /* Requires device name bindings. */ - OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), - /* Requires clock name and DMA bindings. */ - OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, - "ux500-msp-i2s.0", &msp0_platform_data), - OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, - "ux500-msp-i2s.1", &msp1_platform_data), - OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000, - "ux500-msp-i2s.2", &msp2_platform_data), - OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, - "ux500-msp-i2s.3", &msp3_platform_data), - {}, -}; - -static const struct of_device_id u8500_local_bus_nodes[] = { - /* only create devices below soc node */ - { .compatible = "stericsson,db8500", }, - { .compatible = "stericsson,db8500-prcmu", }, - { .compatible = "simple-bus"}, - { }, -}; - -static void __init u8500_init_machine(void) -{ - struct device *parent = NULL; - - /* Pinmaps must be in place before devices register */ - if (of_machine_is_compatible("st-ericsson,mop500")) - mop500_pinmaps_init(); - else if (of_machine_is_compatible("calaosystems,snowball-a9500")) - snowball_pinmaps_init(); - else if (of_machine_is_compatible("st-ericsson,hrefv60+")) - hrefv60_pinmaps_init(); - - /* TODO: Export SoC, USB, cpu-freq and DMA40 */ - parent = u8500_of_init_devices(); - - /* automatically probe child nodes of db8500 device */ - of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); - - /* This board has full regulator constraints */ - regulator_has_full_constraints(); -} - -static const char * u8500_dt_board_compat[] = { - "calaosystems,snowball-a9500", - "st-ericsson,hrefv60+", - "st-ericsson,u8500", - "st-ericsson,mop500", - NULL, -}; - - -DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") - .smp = smp_ops(ux500_smp_ops), - .map_io = u8500_map_io, - .init_irq = ux500_init_irq, - /* we re-use nomadik timer here */ - .timer = &ux500_timer, - .handle_irq = gic_handle_irq, - .init_machine = u8500_init_machine, - .init_late = ux500_init_late, - .dt_compat = u8500_dt_board_compat, -MACHINE_END -#endif diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index aca39a68712a..d77208232cbc 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -89,6 +89,10 @@ extern struct msp_i2s_platform_data msp1_platform_data; extern struct msp_i2s_platform_data msp2_platform_data; extern struct msp_i2s_platform_data msp3_platform_data; extern struct arm_pmu_platdata db8500_pmu_platdata; +extern struct amba_pl011_data uart0_plat; +extern struct amba_pl011_data uart1_plat; +extern struct amba_pl011_data uart2_plat; +extern struct pl022_ssp_controller ssp0_plat; extern void mop500_sdi_init(struct device *parent); extern void snowball_sdi_init(struct device *parent); @@ -106,8 +110,4 @@ void mop500_of_audio_init(struct device *parent); int __init mop500_uib_init(void); void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, unsigned n); - -/* TODO: Once all pieces are DT:ed, remove completely. */ -struct device * __init u8500_of_init_devices(void); - #endif diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index bcdfe6b1d453..25e1e32dbc08 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -17,9 +17,14 @@ #include #include #include +#include +#include +#include #include #include +#include +#include #include #include #include @@ -29,6 +34,7 @@ #include "devices-db8500.h" #include "ste-dma40-db8500.h" +#include "board-mop500.h" /* minimum static i/o mapping required to boot U8500 platforms */ static struct map_desc u8500_uart_io_desc[] __initdata = { @@ -227,12 +233,12 @@ struct device * __init u8500_init_devices(struct ab8500_platform_data *ab8500) return parent; } +#ifdef CONFIG_MACH_UX500_DT + /* TODO: Once all pieces are DT:ed, remove completely. */ -struct device * __init u8500_of_init_devices(void) +static struct device * __init u8500_of_init_devices(void) { - struct device *parent; - - parent = db8500_soc_device_init(); + struct device *parent = db8500_soc_device_init(); db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg); @@ -251,3 +257,96 @@ struct device * __init u8500_of_init_devices(void) return parent; } + +static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { + /* Requires call-back bindings. */ + OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata), + /* Requires DMA and call-back bindings. */ + OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat), + OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat), + OF_DEV_AUXDATA("arm,pl011", 0x80007000, "uart2", &uart2_plat), + /* Requires DMA bindings. */ + OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0", &ssp0_plat), + OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0", &mop500_sdi0_data), + OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1", &mop500_sdi1_data), + OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2", &mop500_sdi2_data), + OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4", &mop500_sdi4_data), + /* Requires clock name bindings. */ + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e080, "gpio.1", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e000, "gpio.2", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e080, "gpio.3", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e100, "gpio.4", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8000e180, "gpio.5", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e000, "gpio.6", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0x8011e080, "gpio.7", NULL), + OF_DEV_AUXDATA("st,nomadik-gpio", 0xa03fe000, "gpio.8", NULL), + OF_DEV_AUXDATA("st,nomadik-i2c", 0x80004000, "nmk-i2c.0", NULL), + OF_DEV_AUXDATA("st,nomadik-i2c", 0x80122000, "nmk-i2c.1", NULL), + OF_DEV_AUXDATA("st,nomadik-i2c", 0x80128000, "nmk-i2c.2", NULL), + OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), + OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), + /* Requires device name bindings. */ + OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), + /* Requires clock name and DMA bindings. */ + OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, + "ux500-msp-i2s.0", &msp0_platform_data), + OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000, + "ux500-msp-i2s.1", &msp1_platform_data), + OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000, + "ux500-msp-i2s.2", &msp2_platform_data), + OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000, + "ux500-msp-i2s.3", &msp3_platform_data), + {}, +}; + +static const struct of_device_id u8500_local_bus_nodes[] = { + /* only create devices below soc node */ + { .compatible = "stericsson,db8500", }, + { .compatible = "stericsson,db8500-prcmu", }, + { .compatible = "simple-bus"}, + { }, +}; + +static void __init u8500_init_machine(void) +{ + struct device *parent = NULL; + + /* Pinmaps must be in place before devices register */ + if (of_machine_is_compatible("st-ericsson,mop500")) + mop500_pinmaps_init(); + else if (of_machine_is_compatible("calaosystems,snowball-a9500")) + snowball_pinmaps_init(); + else if (of_machine_is_compatible("st-ericsson,hrefv60+")) + hrefv60_pinmaps_init(); + + /* TODO: Export SoC, USB, cpu-freq and DMA40 */ + parent = u8500_of_init_devices(); + + /* automatically probe child nodes of db8500 device */ + of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); + + /* This board has full regulator constraints */ + regulator_has_full_constraints(); +} + +static const char * u8500_dt_board_compat[] = { + "calaosystems,snowball-a9500", + "st-ericsson,hrefv60+", + "st-ericsson,u8500", + "st-ericsson,mop500", + NULL, +}; + +DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") + .map_io = u8500_map_io, + .init_irq = ux500_init_irq, + /* we re-use nomadik timer here */ + .timer = &ux500_timer, + .handle_irq = gic_handle_irq, + .init_machine = u8500_init_machine, + .init_late = ux500_init_late, + .dt_compat = u8500_dt_board_compat, +MACHINE_END + +#endif -- cgit 1.4.1 From ab196b4138fb9b3e6908c85eb4bf412d2a6753cd Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 27 Sep 2012 11:47:43 +0100 Subject: ARM: ux500: Strip out duplicate touch screen platform information We're currently carrying two 'struct bu21013_platform_device's which are identical for no apparent reason. Here we remove the extra burden and apply the same information to the two different instances of the bu21012_tp driver registration. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500-stuib.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-stuib.c b/arch/arm/mach-ux500/board-mop500-stuib.c index 8c979770d872..564f57d5d8a7 100644 --- a/arch/arm/mach-ux500/board-mop500-stuib.c +++ b/arch/arm/mach-ux500/board-mop500-stuib.c @@ -162,18 +162,6 @@ static struct bu21013_platform_device tsc_plat_device = { .y_flip = true, }; -static struct bu21013_platform_device tsc_plat2_device = { - .cs_en = bu21013_gpio_board_init, - .cs_dis = bu21013_gpio_board_exit, - .irq_read_val = bu21013_read_pin_val, - .irq = NOMADIK_GPIO_TO_IRQ(TOUCH_GPIO_PIN), - .touch_x_max = TOUCH_XMAX, - .touch_y_max = TOUCH_YMAX, - .ext_clk = false, - .x_flip = false, - .y_flip = true, -}; - static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = { { I2C_BOARD_INFO("bu21013_tp", 0x5C), @@ -181,21 +169,17 @@ static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = { }, { I2C_BOARD_INFO("bu21013_tp", 0x5D), - .platform_data = &tsc_plat2_device, + .platform_data = &tsc_plat_device, }, }; void __init mop500_stuib_init(void) { - if (machine_is_hrefv60()) { + if (machine_is_hrefv60()) tsc_plat_device.cs_pin = HREFV60_TOUCH_RST_GPIO; - tsc_plat2_device.cs_pin = HREFV60_TOUCH_RST_GPIO; - } else { + else tsc_plat_device.cs_pin = GPIO_BU21013_CS; - tsc_plat2_device.cs_pin = GPIO_BU21013_CS; - - } mop500_uib_i2c_add(0, mop500_i2c0_devices_stuib, ARRAY_SIZE(mop500_i2c0_devices_stuib)); -- cgit 1.4.1 From fb647002e4b6393a1f552b2fe48ba88c50d1d6e4 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 28 Sep 2012 15:24:40 +0100 Subject: Documentation: Detail permitted DT properties for the BU21013 Touch Screen Here we apply required documentation for the Rohm BU21013 Touch Screen driver which describe available properties and how to use them. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- .../bindings/input/touchscreen/bu21013.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/bu21013.txt diff --git a/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt new file mode 100644 index 000000000000..ca5a2c86480c --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/bu21013.txt @@ -0,0 +1,28 @@ +* Rohm BU21013 Touch Screen + +Required properties: + - compatible : "rohm,bu21013_tp" + - reg : I2C device address + +Optional properties: + - touch-gpio : GPIO pin registering a touch event + - -supply : Phandle to a regulator supply + - rohm,touch-max-x : Maximum outward permitted limit in the X axis + - rohm,touch-max-y : Maximum outward permitted limit in the Y axis + - rohm,flip-x : Flip touch coordinates on the X axis + - rohm,flip-y : Flip touch coordinates on the Y axis + +Example: + + i2c@80110000 { + bu21013_tp@0x5c { + compatible = "rohm,bu21013_tp"; + reg = <0x5c>; + touch-gpio = <&gpio2 20 0x4>; + avdd-supply = <&ab8500_ldo_aux1_reg>; + + rohm,touch-max-x = <384>; + rohm,touch-max-y = <704>; + rohm,flip-y; + }; + }; -- cgit 1.4.1 From 6934e00465b3ec1cdfe0078fd3c42d41d6b2b531 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 28 Sep 2012 14:06:29 +0100 Subject: ARM: ux500: Create a new Device Tree include file for boards supporting STUIBs This is a skeleton creation which will be populated with the devices found on one of ST-Ericsson's (UIB) User Interface Board. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/hrefprev60.dts | 1 + arch/arm/boot/dts/hrefv60plus.dts | 1 + arch/arm/boot/dts/stuib.dtsi | 15 +++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 arch/arm/boot/dts/stuib.dtsi diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts index 0756f97f1ee8..e112cce33795 100644 --- a/arch/arm/boot/dts/hrefprev60.dts +++ b/arch/arm/boot/dts/hrefprev60.dts @@ -12,6 +12,7 @@ /dts-v1/; /include/ "dbx5x0.dtsi" /include/ "href.dtsi" +/include/ "stuib.dtsi" / { model = "ST-Ericsson HREF (pre-v60) platform with Device Tree"; diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index 4b867b25fd40..b5fc355d4ffb 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -12,6 +12,7 @@ /dts-v1/; /include/ "dbx5x0.dtsi" /include/ "href.dtsi" +/include/ "stuib.dtsi" / { model = "ST-Ericsson HREF (v60+) platform with Device Tree"; diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi new file mode 100644 index 000000000000..64ac327649f3 --- /dev/null +++ b/arch/arm/boot/dts/stuib.dtsi @@ -0,0 +1,15 @@ +/* + * Copyright 2012 ST-Ericsson AB + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/ { + soc-u9500 { + }; +}; -- cgit 1.4.1 From 74a1c9ab87a98f3e2e5e62cfaf949eab012477af Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 28 Sep 2012 14:20:03 +0100 Subject: ARM: ux500: Stop calling the UIB init function when using Device Tree As there will be a Device Tree created for the UIBs, there is no need to call the UIB initiation functions. Each device will be detailed and registered from the Device Tree instead. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 25e1e32dbc08..ca792d0643cd 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -345,7 +345,7 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") .timer = &ux500_timer, .handle_irq = gic_handle_irq, .init_machine = u8500_init_machine, - .init_late = ux500_init_late, + .init_late = NULL, .dt_compat = u8500_dt_board_compat, MACHINE_END -- cgit 1.4.1 From cbebba7d8640105d9caf197c1f31d3360db4e1c7 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 28 Sep 2012 14:41:06 +0100 Subject: ARM: ux500: Add all bu21013 touch screen components to supported Device Trees It is possible to connect a BU21013 Touch Screen to all version of the HREF which support the ST-UIB. This patch applies all the necessary settings to the pre-v60 and v60+ HREF Device Trees. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/hrefprev60.dts | 6 ++++++ arch/arm/boot/dts/hrefv60plus.dts | 8 ++++++++ arch/arm/boot/dts/stuib.dtsi | 23 +++++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts index e112cce33795..cd9e53584847 100644 --- a/arch/arm/boot/dts/hrefprev60.dts +++ b/arch/arm/boot/dts/hrefprev60.dts @@ -31,5 +31,11 @@ reg = <0x33>; }; }; + + i2c@80110000 { + bu21013_tp@0x5c { + reset-gpio = <&tc3589x_gpio 13 0x4>; + }; + }; }; }; diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index b5fc355d4ffb..82103a22c600 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -23,4 +23,12 @@ gpios = <&gpio6 25 0x4>; }; }; + + soc-u9500 { + i2c@80110000 { + bu21013_tp@0x5c { + reset-gpio = <&gpio4 15 0x4>; + }; + }; + }; }; diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi index 64ac327649f3..62f3ecd336f8 100644 --- a/arch/arm/boot/dts/stuib.dtsi +++ b/arch/arm/boot/dts/stuib.dtsi @@ -11,5 +11,28 @@ / { soc-u9500 { + i2c@80110000 { + bu21013_tp@0x5c { + compatible = "rhom,bu21013_tp"; + reg = <0x5c>; + touch-gpio = <&gpio2 20 0x4>; + avdd-supply = <&ab8500_ldo_aux1_reg>; + + rhom,touch-max-x = <384>; + rhom,touch-max-y = <704>; + rhom,flip-y; + }; + + bu21013_tp@0x5d { + compatible = "rhom,bu21013_tp"; + reg = <0x5d>; + touch-gpio = <&gpio2 20 0x4>; + avdd-supply = <&ab8500_ldo_aux1_reg>; + + rhom,touch-max-x = <384>; + rhom,touch-max-y = <704>; + rhom,flip-y; + }; + }; }; }; -- cgit 1.4.1 From 65c7733bcf8c7d2660f6f4d0fef06aa636a69efe Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 28 Sep 2012 14:45:12 +0100 Subject: ARM: ux500: Stop informing the regulator subsystem that we have full constraints The regulator_has_full_constraints() call is not required if we are booting with Device Tree as it's assumed in this case. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index ca792d0643cd..776c50bebc6d 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -325,9 +325,6 @@ static void __init u8500_init_machine(void) /* automatically probe child nodes of db8500 device */ of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); - - /* This board has full regulator constraints */ - regulator_has_full_constraints(); } static const char * u8500_dt_board_compat[] = { -- cgit 1.4.1 From cb5527035d384d7fdead83adf00833d734c282ce Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 4 Oct 2012 12:41:35 +0100 Subject: ARM: ux500: Apply a Device Tree node for the STMPE MFD Here we apply the STMPE Multi-Functional Device's node to the ST User Interface Board Device Tree file. It includes all of the properties required for correct device initialsation. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/stuib.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi index 62f3ecd336f8..d6e36b5757a3 100644 --- a/arch/arm/boot/dts/stuib.dtsi +++ b/arch/arm/boot/dts/stuib.dtsi @@ -11,6 +11,19 @@ / { soc-u9500 { + i2c@80004000 { + stmpe1601: stmpe1601@40 { + compatible = "st,stmpe1601"; + reg = <0x40>; + interrupts = <26 0x4>; + interrupt-parent = <&gpio6>; + interrupt-controller; + + wakeup-source; + st,autosleep-timeout = <1024>; + }; + }; + i2c@80110000 { bu21013_tp@0x5c { compatible = "rhom,bu21013_tp"; -- cgit 1.4.1 From 092778190d693a10d2d364b5e99f5deca903fe41 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Thu, 4 Oct 2012 14:21:35 +0100 Subject: ARM: ux500: Supply the STMPE keypad Device Tree node to the STUIB DT This patch allows the STMPE keypad driver to be successfully probed and initialised during a Device Tree enabled boot sequence. It contains all of the required properties needed to setup and map each key on the 6x3 keypad located on the ST User Interface Board. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/stuib.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi index d6e36b5757a3..6c7e492f220b 100644 --- a/arch/arm/boot/dts/stuib.dtsi +++ b/arch/arm/boot/dts/stuib.dtsi @@ -21,6 +21,33 @@ wakeup-source; st,autosleep-timeout = <1024>; + + stmpe_keypad { + compatible = "st,stmpe-keypad"; + + debounce-interval = <64>; + st,scan-count = <8>; + st,no-autorepeat; + + linux,keymap = <0x205006b + 0x4010074 + 0x3050072 + 0x1030004 + 0x502006a + 0x500000a + 0x5008b + 0x706001c + 0x405000b + 0x6070003 + 0x3040067 + 0x303006c + 0x60400e7 + 0x602009e + 0x4020073 + 0x5050002 + 0x4030069 + 0x3020008>; + }; }; }; -- cgit 1.4.1 From f91243e0f086c618313dfdece1648ae4ed259a1c Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 8 Oct 2012 14:34:52 +0100 Subject: ARM: ux500: Remove unused board compatible string 'st-ericsson,u8500' is too much of a broad name to be used for any of the supported development boards supported by ST-Ericsson. As such it was never used. It has no place to remain in the board compatible list, hence why it's being removed. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 776c50bebc6d..4fd6b7c85c75 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -330,7 +330,6 @@ static void __init u8500_init_machine(void) static const char * u8500_dt_board_compat[] = { "calaosystems,snowball-a9500", "st-ericsson,hrefv60+", - "st-ericsson,u8500", "st-ericsson,mop500", NULL, }; -- cgit 1.4.1 From fd053c7dbdb412628a135c19d2c793c8e0af6c1a Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 8 Oct 2012 09:14:13 +0100 Subject: ARM: ux500: Add skeleton DTS file for the u9540 This patch sees the creation of a sparse Device Tree file for ST-Ericsson's latest development board supporting the latest dual-core Cortex-a9 u9540 SoC. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/u9540.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 arch/arm/boot/dts/u9540.dts diff --git a/arch/arm/boot/dts/u9540.dts b/arch/arm/boot/dts/u9540.dts new file mode 100644 index 000000000000..0a66f34a976f --- /dev/null +++ b/arch/arm/boot/dts/u9540.dts @@ -0,0 +1,26 @@ +/* + * Copyright 2012 ST-Ericsson AB + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +/include/ "dbx5x0.dtsi" + +/ { + model = "ST-Ericsson U9540 platform with Device Tree"; + compatible = "st-ericsson,u9540"; + + memory { + reg = <0x00000000 0x20000000>; + }; + + soc-u9500 { + }; + +}; -- cgit 1.4.1 From 661c6af0a5823870c986ab0c387b8ab8543edbd3 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 8 Oct 2012 14:20:10 +0100 Subject: ARM: ux500: Add support for ST-Ericsson's u9540 SoC First level board support for the u9540. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 4fd6b7c85c75..0b15591a087d 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -319,6 +320,8 @@ static void __init u8500_init_machine(void) snowball_pinmaps_init(); else if (of_machine_is_compatible("st-ericsson,hrefv60+")) hrefv60_pinmaps_init(); + else if (of_machine_is_compatible("st-ericsson,u9540")) {} + /* TODO: Add u9540 pinmaps. */ /* TODO: Export SoC, USB, cpu-freq and DMA40 */ parent = u8500_of_init_devices(); @@ -331,6 +334,7 @@ static const char * u8500_dt_board_compat[] = { "calaosystems,snowball-a9500", "st-ericsson,hrefv60+", "st-ericsson,mop500", + "st-ericsson,u9540", NULL, }; @@ -345,4 +349,14 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") .dt_compat = u8500_dt_board_compat, MACHINE_END +DT_MACHINE_START(U9540_DT, "ST-Ericsson 9540 platform (Device Tree Support)") + .map_io = u8500_map_io, + .init_irq = ux500_init_irq, + .timer = &ux500_timer, + .handle_irq = gic_handle_irq, + .init_machine = u8500_init_machine, + .init_late = NULL, + .dt_compat = u8500_dt_board_compat, +MACHINE_END + #endif -- cgit 1.4.1 From d6fea1e03e0531fb55d4fc590ee136c17fcd139c Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 8 Oct 2012 09:19:31 +0100 Subject: ARM: ux500: Add UART support to the u9540 Device Tree Add the 3 UART nodes required to enable serial ports on the u9540. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/u9540.dts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/u9540.dts b/arch/arm/boot/dts/u9540.dts index 0a66f34a976f..28efe2088552 100644 --- a/arch/arm/boot/dts/u9540.dts +++ b/arch/arm/boot/dts/u9540.dts @@ -21,6 +21,17 @@ }; soc-u9500 { - }; + uart@80120000 { + status = "okay"; + }; + + uart@80121000 { + status = "okay"; + }; + + uart@80007000 { + status = "okay"; + }; + }; }; -- cgit 1.4.1 From 457da8539980344355e7c2b06f4a82b33ce4a26d Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 8 Oct 2012 14:09:05 +0100 Subject: ARM: ux500: Enable SDI4 port on the u9540 when booting with Device Tree Here we add the device node for the SDI4 (MMC) port to the u9540 Device Tree source file. This will allow successful probing of the internal MMC storage device when booting with DT enabled. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/u9540.dts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/u9540.dts b/arch/arm/boot/dts/u9540.dts index 28efe2088552..2dade76321f3 100644 --- a/arch/arm/boot/dts/u9540.dts +++ b/arch/arm/boot/dts/u9540.dts @@ -21,7 +21,6 @@ }; soc-u9500 { - uart@80120000 { status = "okay"; }; @@ -33,5 +32,16 @@ uart@80007000 { status = "okay"; }; + + // On-board eMMC + sdi4_per2@80114000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <8>; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux2_reg>; + + status = "okay"; + }; }; }; -- cgit 1.4.1 From a37e84ca31f4354373fe9a930d80566d6833a877 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 10 Oct 2012 09:38:26 +0100 Subject: ARM: ux500: Enable all MMC devices on the u9540 when booting with DT The u9540 supports 3 MMC devices. This patch enables two of them and updates the configuration of the already enabled SDI4 port. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/u9540.dts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/u9540.dts b/arch/arm/boot/dts/u9540.dts index 2dade76321f3..95892ec6c342 100644 --- a/arch/arm/boot/dts/u9540.dts +++ b/arch/arm/boot/dts/u9540.dts @@ -33,10 +33,35 @@ status = "okay"; }; + // External Micro SD slot + sdi0_per1@80126000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <100000000>; + bus-width = <4>; + mmc-cap-sd-highspeed; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux3_reg>; + + cd-gpios = <&gpio7 6 0x4>; // 230 + cd-inverted; + + status = "okay"; + }; + + + // WLAN SDIO channel + sdi1_per2@80118000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <4>; + + status = "okay"; + }; + // On-board eMMC sdi4_per2@80114000 { arm,primecell-periphid = <0x10480180>; - max-frequency = <50000000>; + max-frequency = <100000000>; bus-width = <8>; mmc-cap-mmc-highspeed; vmmc-supply = <&ab8500_ldo_aux2_reg>; -- cgit 1.4.1 From 58e5b9e3d0b5e1319fd24124e79b4d4e6188bf1b Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 15 Oct 2012 08:49:33 +0100 Subject: ARM: ux500: Rename references to the ccu9540 dev board accordingly When enabling ST-Ericsson's ccu9540 development board the board's full name has not been used. This patch adapts all references of the board's short name to how it should be referenced. Reviewed-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/ccu9540.dts | 72 ++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/u9540.dts | 72 ---------------------------------------- arch/arm/mach-ux500/cpu-db8500.c | 6 ++-- 3 files changed, 75 insertions(+), 75 deletions(-) create mode 100644 arch/arm/boot/dts/ccu9540.dts delete mode 100644 arch/arm/boot/dts/u9540.dts diff --git a/arch/arm/boot/dts/ccu9540.dts b/arch/arm/boot/dts/ccu9540.dts new file mode 100644 index 000000000000..26dfe83178be --- /dev/null +++ b/arch/arm/boot/dts/ccu9540.dts @@ -0,0 +1,72 @@ +/* + * Copyright 2012 ST-Ericsson AB + * + * The code contained herein is licensed under the GNU General Public + * License. You may obtain a copy of the GNU General Public License + * Version 2 or later at the following locations: + * + * http://www.opensource.org/licenses/gpl-license.html + * http://www.gnu.org/copyleft/gpl.html + */ + +/dts-v1/; +/include/ "dbx5x0.dtsi" + +/ { + model = "ST-Ericsson CCU9540 platform with Device Tree"; + compatible = "st-ericsson,ccu9540"; + + memory { + reg = <0x00000000 0x20000000>; + }; + + soc-u9500 { + uart@80120000 { + status = "okay"; + }; + + uart@80121000 { + status = "okay"; + }; + + uart@80007000 { + status = "okay"; + }; + + // External Micro SD slot + sdi0_per1@80126000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <100000000>; + bus-width = <4>; + mmc-cap-sd-highspeed; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux3_reg>; + + cd-gpios = <&gpio7 6 0x4>; // 230 + cd-inverted; + + status = "okay"; + }; + + + // WLAN SDIO channel + sdi1_per2@80118000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <50000000>; + bus-width = <4>; + + status = "okay"; + }; + + // On-board eMMC + sdi4_per2@80114000 { + arm,primecell-periphid = <0x10480180>; + max-frequency = <100000000>; + bus-width = <8>; + mmc-cap-mmc-highspeed; + vmmc-supply = <&ab8500_ldo_aux2_reg>; + + status = "okay"; + }; + }; +}; diff --git a/arch/arm/boot/dts/u9540.dts b/arch/arm/boot/dts/u9540.dts deleted file mode 100644 index 95892ec6c342..000000000000 --- a/arch/arm/boot/dts/u9540.dts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2012 ST-Ericsson AB - * - * The code contained herein is licensed under the GNU General Public - * License. You may obtain a copy of the GNU General Public License - * Version 2 or later at the following locations: - * - * http://www.opensource.org/licenses/gpl-license.html - * http://www.gnu.org/copyleft/gpl.html - */ - -/dts-v1/; -/include/ "dbx5x0.dtsi" - -/ { - model = "ST-Ericsson U9540 platform with Device Tree"; - compatible = "st-ericsson,u9540"; - - memory { - reg = <0x00000000 0x20000000>; - }; - - soc-u9500 { - uart@80120000 { - status = "okay"; - }; - - uart@80121000 { - status = "okay"; - }; - - uart@80007000 { - status = "okay"; - }; - - // External Micro SD slot - sdi0_per1@80126000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <100000000>; - bus-width = <4>; - mmc-cap-sd-highspeed; - mmc-cap-mmc-highspeed; - vmmc-supply = <&ab8500_ldo_aux3_reg>; - - cd-gpios = <&gpio7 6 0x4>; // 230 - cd-inverted; - - status = "okay"; - }; - - - // WLAN SDIO channel - sdi1_per2@80118000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <50000000>; - bus-width = <4>; - - status = "okay"; - }; - - // On-board eMMC - sdi4_per2@80114000 { - arm,primecell-periphid = <0x10480180>; - max-frequency = <100000000>; - bus-width = <8>; - mmc-cap-mmc-highspeed; - vmmc-supply = <&ab8500_ldo_aux2_reg>; - - status = "okay"; - }; - }; -}; diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 0b15591a087d..6e9a06d693a6 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -320,8 +320,8 @@ static void __init u8500_init_machine(void) snowball_pinmaps_init(); else if (of_machine_is_compatible("st-ericsson,hrefv60+")) hrefv60_pinmaps_init(); - else if (of_machine_is_compatible("st-ericsson,u9540")) {} - /* TODO: Add u9540 pinmaps. */ + else if (of_machine_is_compatible("st-ericsson,ccu9540")) {} + /* TODO: Add pinmaps for ccu9540 board. */ /* TODO: Export SoC, USB, cpu-freq and DMA40 */ parent = u8500_of_init_devices(); @@ -334,7 +334,7 @@ static const char * u8500_dt_board_compat[] = { "calaosystems,snowball-a9500", "st-ericsson,hrefv60+", "st-ericsson,mop500", - "st-ericsson,u9540", + "st-ericsson,ccu9540", NULL, }; -- cgit 1.4.1 From 46c1bf813376654f6b75120b9c2cf3de0f67af7d Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 15 Oct 2012 08:55:17 +0100 Subject: ARM: ux500: Remove duplicate DT_MACHINE_START - make u8500 for generic The u8500 and u9540 DT_MACHINE_START calls are almost identical at the moment, referencing exactly the same function pointers. Until this changes we may as well convert the original one to be more generic and use that instead. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 6e9a06d693a6..472b49f90317 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -338,7 +338,7 @@ static const char * u8500_dt_board_compat[] = { NULL, }; -DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") +DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") .map_io = u8500_map_io, .init_irq = ux500_init_irq, /* we re-use nomadik timer here */ @@ -349,14 +349,4 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") .dt_compat = u8500_dt_board_compat, MACHINE_END -DT_MACHINE_START(U9540_DT, "ST-Ericsson 9540 platform (Device Tree Support)") - .map_io = u8500_map_io, - .init_irq = ux500_init_irq, - .timer = &ux500_timer, - .handle_irq = gic_handle_irq, - .init_machine = u8500_init_machine, - .init_late = NULL, - .dt_compat = u8500_dt_board_compat, -MACHINE_END - #endif -- cgit 1.4.1 From 79b40753a318adb3254c6d534b834c10f99cba05 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Mon, 15 Oct 2012 10:07:55 +0100 Subject: ARM: ux500: List DT compatibility using platform names rather than by board So far, each ST-Ericsson board supported by Device Tree has been similar enough to run though a single DT_MACHINE_INIT call. On the back of that it has been suggested that we should reduce the number of compatible strings in our dt_compat structure. After subsequent discussion with Arnd Bergmann the conclusion was to list entries by platform as opposed to by board. The other suggestion was to use a single string which would cover all supported platforms, but any wildcard entries would include unsupported chipsets, such as the u5500 and potential new chips which no not yet have DT functionality. Hence, the best solution which encompasses all supported platforms, but no unsupported ones was to list the currently enabled four chipsets; u8500, u8540, u9500 and u9540 instead. Acked-by: Arnd Bergmann Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/ccu9540.dts | 2 +- arch/arm/boot/dts/hrefprev60.dts | 2 +- arch/arm/boot/dts/hrefv60plus.dts | 2 +- arch/arm/boot/dts/snowball.dts | 2 +- arch/arm/mach-ux500/cpu-db8500.c | 12 ++++++------ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/ccu9540.dts b/arch/arm/boot/dts/ccu9540.dts index 26dfe83178be..04305463f00d 100644 --- a/arch/arm/boot/dts/ccu9540.dts +++ b/arch/arm/boot/dts/ccu9540.dts @@ -14,7 +14,7 @@ / { model = "ST-Ericsson CCU9540 platform with Device Tree"; - compatible = "st-ericsson,ccu9540"; + compatible = "st-ericsson,ccu9540", "st-ericsson,u9540"; memory { reg = <0x00000000 0x20000000>; diff --git a/arch/arm/boot/dts/hrefprev60.dts b/arch/arm/boot/dts/hrefprev60.dts index cd9e53584847..b398946fd64a 100644 --- a/arch/arm/boot/dts/hrefprev60.dts +++ b/arch/arm/boot/dts/hrefprev60.dts @@ -16,7 +16,7 @@ / { model = "ST-Ericsson HREF (pre-v60) platform with Device Tree"; - compatible = "st-ericsson,mop500"; + compatible = "st-ericsson,mop500", "st-ericsson,u8500"; gpio_keys { button@1 { diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts index 82103a22c600..a01ac8f000d6 100644 --- a/arch/arm/boot/dts/hrefv60plus.dts +++ b/arch/arm/boot/dts/hrefv60plus.dts @@ -16,7 +16,7 @@ / { model = "ST-Ericsson HREF (v60+) platform with Device Tree"; - compatible = "st-ericsson,hrefv60+"; + compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500"; gpio_keys { button@1 { diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 6a2b58b6919d..9e02a913eb62 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -14,7 +14,7 @@ / { model = "Calao Systems Snowball platform with device tree"; - compatible = "calaosystems,snowball-a9500"; + compatible = "calaosystems,snowball-a9500", "st-ericsson,u9500"; memory { reg = <0x00000000 0x20000000>; diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 472b49f90317..c65e7e3ce439 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -330,11 +330,11 @@ static void __init u8500_init_machine(void) of_platform_populate(NULL, u8500_local_bus_nodes, u8500_auxdata_lookup, parent); } -static const char * u8500_dt_board_compat[] = { - "calaosystems,snowball-a9500", - "st-ericsson,hrefv60+", - "st-ericsson,mop500", - "st-ericsson,ccu9540", +static const char * stericsson_dt_platform_compat[] = { + "st-ericsson,u8500", + "st-ericsson,u8540", + "st-ericsson,u9500", + "st-ericsson,u9540", NULL, }; @@ -346,7 +346,7 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") .handle_irq = gic_handle_irq, .init_machine = u8500_init_machine, .init_late = NULL, - .dt_compat = u8500_dt_board_compat, + .dt_compat = stericsson_dt_platform_compat, MACHINE_END #endif -- cgit 1.4.1 From 0563f638f052185ea45441b5e7ec06a90e4e7837 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 24 Oct 2012 11:18:14 +0100 Subject: ARM: ux500: Add node for the MMC GPIO regulator There is a very simple mechanism to change and SDI's voltage which consists of toggling some GPIOs. This scenario can be better handled if we convert it to a GPIO regulator. This patch provides one which can be read from Device Tree. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/dbx5x0.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 3b4298bc0bf9..7ce45fc461fb 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi @@ -629,5 +629,19 @@ ranges = <0 0x50000000 0x4000000>; status = "disabled"; }; + + vmmci: regulator-gpio { + compatible = "regulator-gpio"; + + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2600000>; + regulator-name = "mmci-reg"; + regulator-type = "voltage"; + + gpios = <&tc3589x_gpio 18 0x4>; + gpio-enable = <&tc3589x_gpio 17 0x4>; + states = <1800000 0x1 + 2900000 0x0>; + }; }; }; -- cgit 1.4.1 From 98c52c7c676b047e67c235616cc3fefad05c04d4 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 24 Oct 2012 11:21:35 +0100 Subject: ARM: ux500: Change the type of interrupt to something compatible On boot the Nomadik GPIO controller complains that an IRQ can't be configured as active high level-sensitive, so this patch converts it to be low-to-high edge triggered instead. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/boot/dts/stuib.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stuib.dtsi b/arch/arm/boot/dts/stuib.dtsi index 6c7e492f220b..39446a247e79 100644 --- a/arch/arm/boot/dts/stuib.dtsi +++ b/arch/arm/boot/dts/stuib.dtsi @@ -15,7 +15,7 @@ stmpe1601: stmpe1601@40 { compatible = "st,stmpe1601"; reg = <0x40>; - interrupts = <26 0x4>; + interrupts = <26 0x1>; interrupt-parent = <&gpio6>; interrupt-controller; -- cgit 1.4.1 From 5c6cfcf5542b64dbc4f224a3575e231848f40c5f Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 24 Oct 2012 12:01:41 +0100 Subject: ARM: ux500: CONFIG: Enable GPIO Regulators It is the intention to convert the MMC voltage changing from GPIO flipping to using a proper GPIO regulator interface. A prerequisite of that is to enable the GPIO regulator functionality. As this affects all ux5x0 based boards we'll do it here instead of in the Kconfigs. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/configs/u8500_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index da6845493caa..6fe7ede6f0c2 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig @@ -76,6 +76,7 @@ CONFIG_AB8500_CORE=y CONFIG_REGULATOR=y CONFIG_REGULATOR_AB8500=y CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_GPIO=y # CONFIG_HID_SUPPORT is not set CONFIG_USB_GADGET=y CONFIG_AB8500_USB=y -- cgit 1.4.1 From f44c5fd12d8152e45585905422d03427754e1907 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Wed, 24 Oct 2012 11:24:47 +0100 Subject: ARM: ux500: Convert DT_MACHINE_START to use SMP operations The Device Tree machine description for the ux5x0 was moved recently and as a consequence missed the addition of SMP operations. Without this patch SMP doesn't work and only one CPU is present after booting. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu-db8500.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index c65e7e3ce439..4a0c40abf2ab 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -339,6 +339,7 @@ static const char * stericsson_dt_platform_compat[] = { }; DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") + .smp = smp_ops(ux500_smp_ops), .map_io = u8500_map_io, .init_irq = ux500_init_irq, /* we re-use nomadik timer here */ -- cgit 1.4.1