diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2012-08-30 12:12:55 -0700 |
---|---|---|
committer | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-02-12 10:46:50 -0700 |
commit | 37059a9e9b9b786cf4a620b75edcbde87e513c45 (patch) | |
tree | 47b0326c492b68b862679b47152ce05f339ba5e4 | |
parent | e3c0255dc43d26e015c751a0c525a57970747370 (diff) |
i.MX6: mx6q_sabrelite: add vwl1271 regulator
-rw-r--r-- | arch/arm/mach-mx6/board-mx6q_sabrelite.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-mx6/board-mx6q_sabrelite.c b/arch/arm/mach-mx6/board-mx6q_sabrelite.c index 2408f2f3c330..c620768541b7 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabrelite.c +++ b/arch/arm/mach-mx6/board-mx6q_sabrelite.c @@ -1084,6 +1084,37 @@ struct wl12xx_platform_data n6q_wlan_data __initdata = { .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ .set_power = wl1271_set_power, }; + +static struct regulator_consumer_supply n6q_vwl1271_consumers[] = { + REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx.1"), +}; + +static struct regulator_init_data n6q_vwl1271_init = { + .constraints = { + .name = "VDD_1.8V", + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = ARRAY_SIZE(n6q_vwl1271_consumers), + .consumer_supplies = n6q_vwl1271_consumers, +}; + +static struct fixed_voltage_config n6q_vwl1271_reg_config = { + .supply_name = "vwl1271", + .microvolts = 1800000, /* 1.80V */ + .gpio = N6_WL1271_WL_EN, + .startup_delay = 70000, /* 70ms */ + .enable_high = 1, + .enabled_at_boot = 0, + .init_data = &n6q_vwl1271_init, +}; + +static struct platform_device n6q_vwl1271_reg_devices = { + .name = "reg-fixed-voltage", + .id = 4, + .dev = { + .platform_data = &n6q_vwl1271_reg_config, + }, +}; #endif static struct regulator_consumer_supply sabrelite_vmmc_consumers[] = { @@ -1414,6 +1445,7 @@ static void __init mx6_sabrelite_board_init(void) /* WL12xx WLAN Init */ if (wl12xx_set_platform_data(&n6q_wlan_data)) pr_err("error setting wl12xx data\n"); + platform_device_register(&n6q_vwl1271_reg_devices); gpio_set_value(N6_WL1271_WL_EN, 1); /* momentarily enable */ gpio_set_value(N6_WL1271_BT_EN, 1); |