aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPraneeth Bajjuri2016-12-12 17:52:11 -0600
committerPraneeth Bajjuri2016-12-12 17:52:11 -0600
commit6270f1033ea854fb7eee56518e130112a6f394fe (patch)
treeffd8bf0b48e022aa061ba25f261ec6135561b878
parent5492abf5f69384519f678dbeb1621e8a07ce4c4e (diff)
parent89316b56926863db799e8df6d8f2290aac2d1826 (diff)
downloadu-boot-6270f1033ea854fb7eee56518e130112a6f394fe.tar.gz
u-boot-6270f1033ea854fb7eee56518e130112a6f394fe.tar.xz
u-boot-6270f1033ea854fb7eee56518e130112a6f394fe.zip
Merge branch 'ti-u-boot-2016.05' of git://git.ti.com/ti-u-boot/ti-u-boot into p-ti-u-boot-2016.05
* 'ti-u-boot-2016.05' of git://git.ti.com/ti-u-boot/ti-u-boot: regulator: fixed: Add support to handle enable-active-high DT property mmc: disable the mmc clock during power off mmc: Enable mmc clock before sending init stream ti_armv7_common: env: Add NFS loading support for PMMC and MON Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
-rw-r--r--doc/device-tree-bindings/regulator/fixed.txt4
-rw-r--r--drivers/mmc/mmc.c3
-rw-r--r--drivers/power/regulator/fixed.c7
-rw-r--r--include/configs/ti_armv7_keystone2.h3
4 files changed, 15 insertions, 2 deletions
diff --git a/doc/device-tree-bindings/regulator/fixed.txt b/doc/device-tree-bindings/regulator/fixed.txt
index 4ff39b8f51..ef010eace6 100644
--- a/doc/device-tree-bindings/regulator/fixed.txt
+++ b/doc/device-tree-bindings/regulator/fixed.txt
@@ -11,6 +11,9 @@ Required properties:
11Optional properties: 11Optional properties:
12- gpio: GPIO to use for enable control 12- gpio: GPIO to use for enable control
13- regulator constraints (binding info: regulator.txt) 13- regulator constraints (binding info: regulator.txt)
14- enable-active-high: Polarity of GPIO is Active high. If this property
15 is missing, the default assumed is Active low.
16
14 17
15Other kernel-style properties, are currently not used. 18Other kernel-style properties, are currently not used.
16 19
@@ -35,4 +38,5 @@ fixed_regulator@0 {
35 regulator-max-microamp = <15000>; 38 regulator-max-microamp = <15000>;
36 regulator-always-on; 39 regulator-always-on;
37 regulator-boot-on; 40 regulator-boot-on;
41 enable-active-high;
38}; 42};
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 1255abcf78..85e231b898 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2049,14 +2049,15 @@ static void mmc_set_initial_state(struct mmc *mmc)
2049 2049
2050static void mmc_power_up(struct mmc *mmc) 2050static void mmc_power_up(struct mmc *mmc)
2051{ 2051{
2052 mmc_set_vdd(mmc, true);
2053 mmc_set_initial_state(mmc); 2052 mmc_set_initial_state(mmc);
2053 mmc_set_vdd(mmc, true);
2054 udelay(10000); 2054 udelay(10000);
2055} 2055}
2056 2056
2057static void mmc_power_off(struct mmc *mmc) 2057static void mmc_power_off(struct mmc *mmc)
2058{ 2058{
2059 mmc_set_vdd(mmc, false); 2059 mmc_set_vdd(mmc, false);
2060 mmc_set_clock(mmc, 1, true);
2060} 2061}
2061 2062
2062static void mmc_power_cycle(struct mmc *mmc) 2063static void mmc_power_cycle(struct mmc *mmc)
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index d053817fc2..dbd532d89d 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -26,6 +26,8 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
26 struct dm_regulator_uclass_platdata *uc_pdata; 26 struct dm_regulator_uclass_platdata *uc_pdata;
27 struct fixed_regulator_platdata *dev_pdata; 27 struct fixed_regulator_platdata *dev_pdata;
28 struct gpio_desc *gpio; 28 struct gpio_desc *gpio;
29 const void *blob = gd->fdt_blob;
30 int node = dev->of_offset, flags = GPIOD_IS_OUT;
29 int ret; 31 int ret;
30 32
31 dev_pdata = dev_get_platdata(dev); 33 dev_pdata = dev_get_platdata(dev);
@@ -36,9 +38,12 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
36 /* Set type to fixed */ 38 /* Set type to fixed */
37 uc_pdata->type = REGULATOR_TYPE_FIXED; 39 uc_pdata->type = REGULATOR_TYPE_FIXED;
38 40
41 if (fdtdec_get_bool(blob, node, "enable-active-high"))
42 flags |= GPIOD_IS_OUT_ACTIVE;
43
39 /* Get fixed regulator gpio desc */ 44 /* Get fixed regulator gpio desc */
40 gpio = &dev_pdata->gpio; 45 gpio = &dev_pdata->gpio;
41 ret = gpio_request_by_name(dev, "gpio", 0, gpio, GPIOD_IS_OUT); 46 ret = gpio_request_by_name(dev, "gpio", 0, gpio, flags);
42 if (ret) 47 if (ret)
43 debug("Fixed regulator gpio - not found! Error: %d", ret); 48 debug("Fixed regulator gpio - not found! Error: %d", ret);
44 49
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 97ff26360b..5a90930f38 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -273,6 +273,8 @@
273 "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \ 273 "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \
274 "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \ 274 "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \
275 "run set_rd_spec\0" \ 275 "run set_rd_spec\0" \
276 "init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; " \
277 "run set_rd_spec\0" \
276 "init_fw_rd_ramfs=setenv rd_spec -\0" \ 278 "init_fw_rd_ramfs=setenv rd_spec -\0" \
277 "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \ 279 "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \
278 "run set_rd_spec\0" \ 280 "run set_rd_spec\0" \
@@ -281,6 +283,7 @@
281 "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \ 283 "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \
282 "dev_pmmc=0\0" \ 284 "dev_pmmc=0\0" \
283 "get_pmmc_net=dhcp ${loadaddr} ${tftp_root}/${name_pmmc}\0" \ 285 "get_pmmc_net=dhcp ${loadaddr} ${tftp_root}/${name_pmmc}\0" \
286 "get_pmmc_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_pmmc}\0" \
284 "get_pmmc_ramfs=run get_pmmc_net\0" \ 287 "get_pmmc_ramfs=run get_pmmc_net\0" \
285 "get_pmmc_mmc=load mmc ${bootpart} ${loadaddr} " \ 288 "get_pmmc_mmc=load mmc ${bootpart} ${loadaddr} " \
286 "${bootdir}/${name_pmmc}\0" \ 289 "${bootdir}/${name_pmmc}\0" \