diff options
| author | mattis fjallstrom <mattis@acm.org> | 2015-10-30 16:03:32 -0700 |
|---|---|---|
| committer | mattis fjallstrom <mattis@acm.org> | 2015-11-20 14:25:58 -0800 |
| commit | 1263594ac4592804a8f49e73b42ed9c2f41644db (patch) | |
| tree | 04f5f84e90e5a6f72d1e0dddc29885d6bf6d4836 | |
| parent | 4f911e64b91df9adde8137cfa408639167cf250a (diff) | |
| download | olio-linux-3.10-1263594ac4592804a8f49e73b42ed9c2f41644db.tar.xz olio-linux-3.10-1263594ac4592804a8f49e73b42ed9c2f41644db.zip | |
Power changes: Removed dummy regulators, added cpufreq table initialization and makes sure that cpufreq gets initialized properly.
Change-Id: I679d86c150e4acee098e4a5cfe1855d46fac872a
| -rw-r--r-- | arch/arm/boot/dts/omap3.dtsi | 4 | ||||
| -rw-r--r-- | arch/arm/boot/dts/omap3_h1.dts | 38 | ||||
| -rw-r--r-- | arch/arm/configs/omap3_h1_defconfig | 21 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/opp.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/opp3xxx_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm.c | 15 | ||||
| -rw-r--r-- | drivers/cpufreq/omap-cpufreq.c | 7 | ||||
| -rw-r--r-- | drivers/leds/leds-lm3530.c | 6 |
8 files changed, 67 insertions, 28 deletions
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 9973c97bc09..36a93cc41c0 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -267,7 +267,7 @@ dma-names = "tx0", "rx0", "tx1", "rx1", "tx2", "rx2", "tx3", "rx3"; }; - /* + mcspi2: spi@4809a000 { compatible = "ti,omap2-mcspi"; #address-cells = <1>; @@ -303,7 +303,7 @@ dmas = <&sdma 70>, <&sdma 71>; dma-names = "tx0", "rx0"; }; - */ + mmc1: mmc@4809c000 { compatible = "ti,omap3-hsmmc"; ti,hwmods = "mmc1"; diff --git a/arch/arm/boot/dts/omap3_h1.dts b/arch/arm/boot/dts/omap3_h1.dts index fbf8796599d..40964563a1e 100644 --- a/arch/arm/boot/dts/omap3_h1.dts +++ b/arch/arm/boot/dts/omap3_h1.dts @@ -20,12 +20,12 @@ cpu@0 { device_type = "cpu"; operating-points = < - /* kHz uV */ - 300000 975000 - 600000 1150000 - 800000 1275000 + /* kHz uV (from opp3xxx_data.c) */ + 300000 1012500 + 600000 1200000 + 800000 1325000 >; - cpu0-supply = <&vdd1_reg>; + cpu0-supply = <&omap_tps65910>; /* OPP tolerance in percentage */ voltage-tolerance = <0>; reset-voltage = <1275000>; @@ -40,7 +40,13 @@ regulator-boot-on; }; - /* + /* omap_pimic is used by the omap-pmic-regulator driver - a + * generic framework for omap interfacing with i2c drivers, based + * on the TWL framework. + * + * This is the two regulators needed by the AM3603. + */ + omap_pimic { omap_tps65910: omap_vdd1 { compatible = "ti,omap-tps65910-vdd1"; @@ -54,7 +60,6 @@ ti,vp = <&vp_core>; }; }; - */ pad-wkup { /* on omap, the irqs are calculated as follows: @@ -94,13 +99,15 @@ &vc { ti,i2c-high-speed; ti,i2c-pad-load = <3>; - vc_mpu{ + + vc_mpu { ti,master-channel; }; - vc_core{ + vc_core { ti,use-master-slave-addr; }; + }; &glbl_prm { @@ -302,7 +309,9 @@ /* This is from GL's suspend branch */ /* crystal oscillator is installed on the board */ + ti,en-ck32k-xtal; + /* set SR_CTL_I2C_SEL - access to smartreflex registers by control i2c */ /* ti,system-power-controller; */ @@ -321,7 +330,7 @@ ti,regulator-ext-sleep-control = <8>; }; - /* DSS is on this one */ + /* DSS is on this one (and much else) */ vio_reg: regulator@1 { regulator-name = "vdds_dsi"; regulator-min-microvolt = <1800000>; @@ -330,7 +339,6 @@ }; /* Leave one and two on for reliable wake-up */ - vdd1_reg: regulator@2 { /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ /* @@ -339,9 +347,9 @@ */ /* external sleep control by means of SYS_OFF_MODE signal */ /* regulator-name = "vdd_mpu_iva"; */ - regulator-name = "cpu0"; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1350000>; + regulator-name = "vdd_mpu_iva"; + regulator-min-microvolt = <975000>; + regulator-max-microvolt = <1275000>; ti,regulator-ext-sleep-control = <8>; }; @@ -426,7 +434,7 @@ * specify two consumers in DT? (vdd for dss, avdd for touch). */ vmmc_reg: regulator@12 { - regulator-name = "vdds_dsi"; + regulator-name = "avdd"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; diff --git a/arch/arm/configs/omap3_h1_defconfig b/arch/arm/configs/omap3_h1_defconfig index 49c06ba4cec..a71a3d77132 100644 --- a/arch/arm/configs/omap3_h1_defconfig +++ b/arch/arm/configs/omap3_h1_defconfig @@ -481,7 +481,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_INTERACTIVE is not set +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set CONFIG_GENERIC_CPUFREQ_CPU0=y @@ -1719,7 +1719,7 @@ CONFIG_MFD_TPS65910=y # CONFIG_MFD_WM8994 is not set CONFIG_REGULATOR=y CONFIG_REGULATOR_DEBUG=y -CONFIG_REGULATOR_DUMMY=y +# CONFIG_REGULATOR_DUMMY is not set CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set @@ -1816,6 +1816,8 @@ CONFIG_PANEL_ILI_9342=y # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # CONFIG_ADF is not set CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y # CONFIG_FB_SSD1307 is not set CONFIG_SOUND=y @@ -2765,6 +2767,21 @@ CONFIG_HAVE_ARCH_KGDB=y # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_RODATA is not set # CONFIG_DEBUG_LL is not set +# CONFIG_DEBUG_OMAP2PLUS_UART is not set +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_DEBUG_SEMIHOSTING is not set +# CONFIG_DEBUG_OMAP2UART1 is not set +# CONFIG_DEBUG_OMAP2UART2 is not set +# CONFIG_DEBUG_OMAP2UART3 is not set +# CONFIG_DEBUG_OMAP3UART3 is not set +# CONFIG_DEBUG_OMAP4UART3 is not set +# CONFIG_DEBUG_OMAP3UART4 is not set +# CONFIG_DEBUG_OMAP4UART4 is not set +# CONFIG_DEBUG_TI81XXUART1 is not set +# CONFIG_DEBUG_TI81XXUART2 is not set +# CONFIG_DEBUG_TI81XXUART3 is not set +# CONFIG_DEBUG_AM33XXUART1 is not set +# CONFIG_DEBUG_ZOOM_UART is not set CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" # CONFIG_PID_IN_CONTEXTIDR is not set diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index 82fd8c72f75..56e5ad35b17 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c @@ -41,8 +41,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, { int i, r; +#ifndef CONFIG_MACH_OMAP3_H1 /* olio has a partial DT */ if (of_have_populated_dt()) return -EINVAL; +#endif if (!opp_def || !opp_def_size) { pr_err("%s: invalid params!\n", __func__); diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c index f715f6ffd1d..fcede945353 100644 --- a/arch/arm/mach-omap2/opp3xxx_data.c +++ b/arch/arm/mach-omap2/opp3xxx_data.c @@ -196,7 +196,7 @@ int __init omap3_opp_init(void) return r; if (cpu_is_omap3630()) -#ifdef CONFIG_MACH_OMAP3_H1_DVT2 +#ifdef CONFIG_MACH_OMAP3_H1 r = omap_init_opp_table(omap36xx_olioh1_opp_def_list, ARRAY_SIZE(omap36xx_olioh1_opp_def_list)); #else diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 04ccc127e75..a6c441842cc 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c @@ -276,13 +276,20 @@ static inline void omap_init_cpufreq(void) devinfo.name = "omap-cpufreq"; else devinfo.name = "cpufreq-cpu0"; + + /* OLIO test - we want to use the omap driver. + * Will hardcoding this work? - YES, it does. + */ + devinfo.name = "omap-cpufreq"; + platform_device_register_full(&devinfo); } static int __init omap2_common_pm_init(void) { - if (!of_have_populated_dt()) - omap2_init_processor_devices(); + /* if (!of_have_populated_dt()) OLIO TEST */ + omap2_init_processor_devices(); + omap_pm_if_init(); return 0; @@ -296,6 +303,7 @@ int __init omap2_common_pm_late_init(void) * a completely different mechanism. * Disable this part if a DT blob is available. */ + if (!of_have_populated_dt()) { /* Init the voltage layer */ @@ -308,8 +316,6 @@ int __init omap2_common_pm_late_init(void) /* Smartreflex device init */ omap_devinit_smartreflex(); - -#ifdef OLIO_TEST_GL_SUSPEND } else { struct device_node *np; np = of_find_node_by_name(NULL, "omap_pimic"); @@ -317,7 +323,6 @@ int __init omap2_common_pm_late_init(void) of_platform_populate(np, NULL, NULL, NULL); of_node_put(np); } -#endif /* OLIO_TEST_GL_SUSPEND */ } /* cpufreq dummy device instantiation */ diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 0279d18a57f..3bdb1d9c786 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -246,16 +246,19 @@ static struct cpufreq_driver omap_driver = { static int omap_cpufreq_probe(struct platform_device *pdev) { + printk ("%s: OLIO: Entered\n", __FUNCTION__); + mpu_dev = get_cpu_device(0); if (!mpu_dev) { pr_warning("%s: unable to get the mpu device\n", __func__); return -EINVAL; } - mpu_reg = regulator_get(mpu_dev, "vcc"); + mpu_reg = regulator_get(mpu_dev, "vdd_mpu_iva"); /* OLIO: Orig "vcc" */ if (IS_ERR(mpu_reg)) { - pr_warning("%s: unable to get MPU regulator\n", __func__); + pr_warning("%s: unable to get MPU regulator, will try again in a bit\n", __func__); mpu_reg = NULL; + return -EPROBE_DEFER; } else { /* * Ensure physical regulator is present. diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index fda0efb4f88..89499d369ea 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -449,7 +449,11 @@ static int lm3530_probe(struct i2c_client *client, i2c_set_clientdata(client, drvdata); - drvdata->regulator = devm_regulator_get(&client->dev, "vin"); + /* OLIO: The regulator name should be passed through the platform_data + * structure. Fixme. + */ + + drvdata->regulator = devm_regulator_get(&client->dev, "vdds_dsi"); if (IS_ERR(drvdata->regulator)) { dev_err(&client->dev, "regulator get failed\n"); err = PTR_ERR(drvdata->regulator); |