From d9f37d9e6af8a6477e36f2686a1a9a09d9b3cacf Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 28 May 2013 15:55:56 +0200 Subject: ARM: nomadik: register VMMC regulator This adds the STw481x VMMC regulator to the Nomadik device tree. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index 9169d3025f39..0e543e09beea 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi @@ -707,8 +707,14 @@ pinctrl-0 = <&i2c0_default_mux>, <&i2c0_default_mode>; stw4811@2d { - compatible = "st,stw4811"; - reg = <0x2d>; + compatible = "st,stw4811"; + reg = <0x2d>; + vmmc_regulator: vmmc { + compatible = "st,stw481x-vmmc"; + regulator-name = "VMMC"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; }; }; @@ -839,6 +845,7 @@ cd-inverted; pinctrl-names = "default"; pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>; + vmmc-supply = <&vmmc_regulator>; }; }; }; -- cgit v1.2.3 From 4c6d92b3cd05e08452ecb2480c49dd9109ba788a Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 7 Aug 2013 10:41:16 +0200 Subject: ARM: nomadik: delete MMCI platform data Now that we have a proper regulator set up for the MMCI driver and managed through the device tree, we no longer need the platform data providing the OCR voltages for the MMCI block. Signed-off-by: Linus Walleij --- arch/arm/mach-nomadik/cpu-8815.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 13e0df9c11ce..7a00506dc9e1 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -189,15 +188,6 @@ static int __init cpu8815_eth_init(void) } device_initcall(cpu8815_eth_init); -/* - * TODO: - * cannot be set from device tree, convert to a proper DT - * binding. - */ -static struct mmci_platform_data mmcsd_plat_data = { - .ocr_mask = MMC_VDD_29_30, -}; - /* * This GPIO pin turns on a line that is used to detect card insertion * on this board. @@ -232,13 +222,10 @@ static int __init cpu8815_mmcsd_init(void) } device_initcall(cpu8815_mmcsd_init); - -/* These are mostly to get the right device names for the clock lookups */ +/* This still waits for a device tree enablement patch */ static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, NULL, &cpu8815_nand_data), - OF_DEV_AUXDATA("arm,primecell", NOMADIK_SDI_BASE, - NULL, &mmcsd_plat_data), { /* sentinel */ }, }; -- cgit v1.2.3 From 2c5a7424dae5e34b977716f9f0ab8a99d00cc7bc Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 13 Sep 2013 21:15:14 +0200 Subject: ARM: nomadik: delete FSMC platform data We now have device tree support for setting the NAND timings for FSMC from the device tree, so delete the last piece of platform data and auxdata. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-nomadik-stn8815.dtsi | 1 + arch/arm/mach-nomadik/cpu-8815.c | 22 +--------------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi index 0e543e09beea..79425e3836ce 100644 --- a/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi +++ b/arch/arm/boot/dts/ste-nomadik-stn8815.dtsi @@ -653,6 +653,7 @@ reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd"; clocks = <&hclksmc>; status = "okay"; + timings = /bits/ 8 <0 0 0 0x10 0x0a 0>; partition@0 { label = "X-Loader(NAND)"; diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 7a00506dc9e1..c6c156e5570e 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -145,17 +144,6 @@ static void __init cpu8815_timer_init_of(void) clocksource_of_init(); } -static struct fsmc_nand_timings cpu8815_nand_timings = { - .thiz = 0, - .thold = 0x10, - .twait = 0x0A, - .tset = 0, -}; - -static struct fsmc_nand_platform_data cpu8815_nand_data = { - .nand_timings = &cpu8815_nand_timings, -}; - /* * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects * to simply request an IRQ passed as a resource. So the GPIO pin needs @@ -222,21 +210,13 @@ static int __init cpu8815_mmcsd_init(void) } device_initcall(cpu8815_mmcsd_init); -/* This still waits for a device tree enablement patch */ -static struct of_dev_auxdata cpu8815_auxdata_lookup[] __initdata = { - OF_DEV_AUXDATA("stericsson,fsmc-nand", NOMADIK_FSMC_BASE, - NULL, &cpu8815_nand_data), - { /* sentinel */ }, -}; - static void __init cpu8815_init_of(void) { #ifdef CONFIG_CACHE_L2X0 /* At full speed latency must be >=2, so 0x249 in low bits */ l2x0_of_init(0x00730249, 0xfe000fff); #endif - of_platform_populate(NULL, of_default_bus_match_table, - cpu8815_auxdata_lookup, NULL); + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } static const char * cpu8815_board_compat[] = { -- cgit v1.2.3