#include "board-enterprise.h" #include "pm.h" #include "wakeups-t3.h" #include "tegra3_tsensor.h" #define PMC_CTRL 0x0 #define PMC_CTRL_INTR_LOW (1 << 17) #define PMC_DPD_PADS_ORIDE 0x01c #define PMC_DPD_PADS_ORIDE_BLINK (1 << 20) static bool is_enterprise_machine = false; /************************ TPS80031 based regulator ****************/ static struct regulator_consumer_supply tps80031_vio_supply_a02[] = { REGULATOR_SUPPLY("vio_1v8", NULL), REGULATOR_SUPPLY("avdd_osc", NULL), REGULATOR_SUPPLY("vddio_sys", NULL), REGULATOR_SUPPLY("vddio_uart", NULL), REGULATOR_SUPPLY("pwrdet_uart", NULL), REGULATOR_SUPPLY("vddio_lcd", NULL), REGULATOR_SUPPLY("pwrdet_lcd", NULL), REGULATOR_SUPPLY("vddio_audio", NULL), REGULATOR_SUPPLY("pwrdet_audio", NULL), REGULATOR_SUPPLY("vddio_bb", NULL), REGULATOR_SUPPLY("pwrdet_bb", NULL), REGULATOR_SUPPLY("vddio_gmi", NULL), REGULATOR_SUPPLY("avdd_usb_pll", NULL), REGULATOR_SUPPLY("vddio_cam", NULL), REGULATOR_SUPPLY("pwrdet_cam", NULL), REGULATOR_SUPPLY("vddio_sdmmc1", NULL),
/* F*****g Power Key... */ #include <linux/interrupt.h> #include <linux/input.h> static struct input_dev *max77663_pwrkey; // F*****g Power Key #endif #define PMC_CTRL 0x0 #define PMC_CTRL_INTR_LOW (1 << 17) /************************ TPS80031 based regulator ****************/ #if defined(CONFIG_REGULATOR_TPS80031) static struct regulator_consumer_supply tps80031_vio_supply[] = { REGULATOR_SUPPLY("avdd_osc", NULL), REGULATOR_SUPPLY("avdd_usb_pll", NULL), REGULATOR_SUPPLY("avdd_hdmi_pll", NULL), REGULATOR_SUPPLY("vddio_audio", NULL), REGULATOR_SUPPLY("vddio_lcd", NULL), REGULATOR_SUPPLY("vddio_cam", NULL), REGULATOR_SUPPLY("vddio_uart", NULL), REGULATOR_SUPPLY("vddio_bb", NULL), REGULATOR_SUPPLY("vddio_sdmmc1", NULL), REGULATOR_SUPPLY("vddio_sdmmc4", NULL), REGULATOR_SUPPLY("vddio_sys", NULL), REGULATOR_SUPPLY("vddio_gmi", NULL), REGULATOR_SUPPLY("vddio_sd_slot", NULL), };
static int __init omap_ethernet_init(void) { int status; /* Request of GPIO lines */ status = gpio_request_array(sdp4430_eth_gpios, ARRAY_SIZE(sdp4430_eth_gpios)); if (status) pr_err("Cannot request ETH GPIOs\n"); return status; } static struct regulator_consumer_supply sdp4430_vbat_supply[] = { REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), }; static struct regulator_init_data sdp4430_vbat_data = { .constraints = { .always_on = 1, }, .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), .consumer_supplies = sdp4430_vbat_supply, }; static struct fixed_voltage_config sdp4430_vbat_pdata = { .supply_name = "VBAT", .microvolts = 3750000, .init_data = &sdp4430_vbat_data,
.num_resources = 0, .dev = { .platform_data = &sabrelite_button_data, } }; static void __init sabrelite_add_device_buttons(void) { platform_device_register(&sabrelite_button_device); } #else static void __init sabrelite_add_device_buttons(void) {} #endif static struct regulator_consumer_supply sabrelite_vmmc_consumers[] = { REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx.2"), REGULATOR_SUPPLY("vmmc", "sdhci-esdhc-imx.3"), }; static struct regulator_init_data sabrelite_vmmc_init = { .num_consumer_supplies = ARRAY_SIZE(sabrelite_vmmc_consumers), .consumer_supplies = sabrelite_vmmc_consumers, }; static struct fixed_voltage_config sabrelite_vmmc_reg_config = { .supply_name = "vmmc", .microvolts = 3300000, .gpio = -1, .init_data = &sabrelite_vmmc_init, };
#define PCOM_VREG_LDO PCOM_VREG_SMP #define PCOM_VREG_NCP(_name, _id, _supply, _min_uV, _max_uV, _rise_time, \ _always_on, _boot_on, _apply_uV, _supply_uV) \ { \ .init_data = PCOM_VREG_INIT_DATA(_name, _supply, -(_min_uV), \ -(_max_uV), _always_on, _boot_on, _apply_uV, _supply_uV), \ .id = _id, \ .rise_time = _rise_time, \ .pulldown = -1, \ .negative = 1, \ } PCOM_VREG_CONSUMERS(smps1) = { REGULATOR_SUPPLY("smps1", NULL), REGULATOR_SUPPLY("msmc1", NULL), }; PCOM_VREG_CONSUMERS(smps2) = { REGULATOR_SUPPLY("smps2", NULL), REGULATOR_SUPPLY("msmc2", NULL), }; PCOM_VREG_CONSUMERS(smps3) = { REGULATOR_SUPPLY("smps3", NULL), REGULATOR_SUPPLY("msme1", NULL), REGULATOR_SUPPLY("vcc_i2c", "1-004a"), REGULATOR_SUPPLY("vcc_i2c", "1-0038"), };
#include "board-8960.h" #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM #define NOVATEC_CMDPANEL #endif #define VREG_CONSUMERS(_id) \ static struct regulator_consumer_supply vreg_consumers_##_id[] /* * Consumer specific regulator names: * regulator name consumer dev_name */ VREG_CONSUMERS(L1) = { REGULATOR_SUPPLY("8921_l1", NULL), }; VREG_CONSUMERS(L2) = { REGULATOR_SUPPLY("8921_l2", NULL), REGULATOR_SUPPLY("dsi_vdda", "mipi_dsi.1"), REGULATOR_SUPPLY("dsi_pll_vdda", "mdp.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"), REGULATOR_SUPPLY("mipi_csi_vdd", "3-0034"), }; VREG_CONSUMERS(L3) = { REGULATOR_SUPPLY("8921_l3", NULL), REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), }; VREG_CONSUMERS(L4) = {
gpio_export(gpio, 0); gpio = S5PV210_GPJ0(5); /* XMSMADDR_5 */ gpio_request(gpio, "TSP_INT"); s5p_register_gpio_interrupt(gpio); s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf)); s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP); i2c2_devs[0].irq = gpio_to_irq(gpio); } /* MAX8998 regulators */ #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) static struct regulator_consumer_supply goni_ldo3_consumers[] = { REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), }; static struct regulator_consumer_supply goni_ldo5_consumers[] = { REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), }; static struct regulator_consumer_supply goni_ldo8_consumers[] = { REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), }; static struct regulator_consumer_supply goni_ldo11_consumers[] = { REGULATOR_SUPPLY("vddio", "0-0030"), /* "CAM_IO_2.8V" */ }; static struct regulator_consumer_supply goni_ldo13_consumers[] = {
#define OVERO_GPIO_PENDOWN 114 #define OVERO_GPIO_BT_NRESET 164 #define OVERO_GPIO_USBH_CPEN 168 #define OVERO_GPIO_USBH_NRESET 183 #define OVERO_SMSC911X_CS 5 #define OVERO_SMSC911X_GPIO 176 #define OVERO_SMSC911X2_CS 4 #define OVERO_SMSC911X2_GPIO 65 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) /* fixed regulator for ads7846 */ static struct regulator_consumer_supply ads7846_supply[] = { REGULATOR_SUPPLY("vcc", "spi1.0"), }; static struct regulator_init_data vads7846_regulator = { .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = ARRAY_SIZE(ads7846_supply), .consumer_supplies = ads7846_supply, }; static struct fixed_voltage_config vads7846 = { .supply_name = "vads7846", .microvolts = 3300000, /* 3.3V */ .gpio = -EINVAL, .startup_delay = 0,
int pcf8575_cir_enable(void) { int ret = 0; struct i2c_msg msg = { .addr = pcf8575_cir_client->addr, .flags = 1, .len = 2, }; msg.buf = pcf8575_cir_port; ret = i2c_transfer(pcf8575_cir_client->adapter, &msg, 1); msg.flags = 0; if (ret < 0) printk(KERN_ERR "I2C: Read failed at %s %d with error code: %d\n", __func__, __LINE__, ret); pcf8575_cir_port[0] = msg.buf[0]; pcf8575_cir_port[1] = (msg.buf[1] & ~(pcf8575_IR_REMOTE_OFF)); ret = i2c_transfer(pcf8575_cir_client->adapter, &msg, 1); cir_pin_mux(); if (ret < 0) printk(KERN_ERR "I2C: Transfer failed at %s %d with error code: %d\n", __func__, __LINE__, ret); return ret; } int vps_ti814x_select_video_decoder(int vid_decoder_id) { int ret = 0; struct i2c_msg msg = { .addr = pcf8575_client->addr, .flags = 0, .len = 2, }; msg.buf = pcf8575_port; if (VPS_SEL_TVP7002_DECODER == vid_decoder_id) pcf8575_port[1] &= ~VPS_VC_IO_EXP_SEL_VIN0_S1_MASK; else pcf8575_port[1] |= VPS_VC_IO_EXP_SEL_VIN0_S1_MASK; ret = (i2c_transfer(pcf8575_client->adapter, &msg, 1)); if (ret < 0) printk(KERN_ERR "I2C: Transfer failed at %s %d with error code: %d\n", __func__, __LINE__, ret); return ret; } EXPORT_SYMBOL(vps_ti814x_select_video_decoder); #define I2C_RETRY_COUNT 10u int vps_ti814x_set_tvp7002_filter(enum fvid2_standard standard) { int filter_sel; int ret; struct i2c_msg msg = { .addr = pcf8575_client->addr, .flags = 0, .len = 2, }; pcf8575_port[0] &= ~(VPS_VC_IO_EXP_THS7368_DISABLE_MASK | VPS_VC_IO_EXP_THS7368_BYPASS_MASK | VPS_VC_IO_EXP_THS7368_FILTER1_MASK | VPS_VC_IO_EXP_THS7368_FILTER2_MASK); switch (standard) { case FVID2_STD_1080P_60: case FVID2_STD_1080P_50: case FVID2_STD_SXGA_60: case FVID2_STD_SXGA_75: case FVID2_STD_SXGAP_60: case FVID2_STD_SXGAP_75: case FVID2_STD_UXGA_60: filter_sel = 0x03u; /* Filter2: 1, Filter1: 1 */ break; case FVID2_STD_1080I_60: case FVID2_STD_1080I_50: case FVID2_STD_1080P_24: case FVID2_STD_1080P_30: case FVID2_STD_720P_60: case FVID2_STD_720P_50: case FVID2_STD_SVGA_60: case FVID2_STD_SVGA_72: case FVID2_STD_SVGA_75: case FVID2_STD_SVGA_85: case FVID2_STD_XGA_60: case FVID2_STD_XGA_70: case FVID2_STD_XGA_75: case FVID2_STD_XGA_85: case FVID2_STD_WXGA_60: case FVID2_STD_WXGA_75: case FVID2_STD_WXGA_85: filter_sel = 0x01u; /* Filter2: 0, Filter1: 1 */ break; case FVID2_STD_480P: case FVID2_STD_576P: case FVID2_STD_VGA_60: case FVID2_STD_VGA_72: case FVID2_STD_VGA_75: case FVID2_STD_VGA_85: filter_sel = 0x02u; /* Filter2: 1, Filter1: 0 */ break; case FVID2_STD_NTSC: case FVID2_STD_PAL: case FVID2_STD_480I: case FVID2_STD_576I: case FVID2_STD_D1: filter_sel = 0x00u; /* Filter2: 0, Filter1: 0 */ break; default: filter_sel = 0x01u; /* Filter2: 0, Filter1: 1 */ break; } pcf8575_port[0] |= (filter_sel << VPS_VC_IO_EXP_THS7368_FILTER_SHIFT); msg.buf = pcf8575_port; ret = (i2c_transfer(pcf8575_client->adapter, &msg, 1)); if (ret < 0) { printk(KERN_ERR "I2C: Transfer failed at %s %d with error code: %d\n", __func__, __LINE__, ret); return ret; } return 0; } EXPORT_SYMBOL(vps_ti814x_set_tvp7002_filter); /* Touchscreen platform data */ static struct qt602240_platform_data ts_platform_data = { .x_line = 18, .y_line = 12, .x_size = 800, .y_size = 480, .blen = 0x01, .threshold = 30, .voltage = 2800000, .orient = QT602240_HORIZONTAL_FLIP, }; static struct at24_platform_data eeprom_info = { .byte_len = (256*1024) / 8, .page_size = 64, .flags = AT24_FLAG_ADDR16, }; static struct regulator_consumer_supply ti8148evm_mpu_supply = REGULATOR_SUPPLY("mpu", NULL); /* * DM814x/AM387x (TI814x) devices have restriction that none of the supply to * the device should be turned of. * * NOTE: To prevent turning off regulators not explicitly consumed by drivers * depending on it, ensure following: * 1) Set always_on = 1 for them OR * 2) Avoid calling regulator_has_full_constraints() * * With just (2), there will be a warning about incomplete constraints. * E.g., "regulator_init_complete: incomplete constraints, leaving LDO8 on" * * In either cases, the supply won't be disabled. * * We are taking approach (1). */ static struct regulator_init_data tps65911_reg_data[] = { /* VRTC */ { .constraints = { .min_uV = 1800000, .max_uV = 1800000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, .always_on = 1, }, }, /* VIO -VDDA 1.8V */ { .constraints = { .min_uV = 1500000, .max_uV = 1500000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, .always_on = 1, }, }, /* VDD1 - MPU */ { .constraints = { .min_uV = 600000, .max_uV = 1500000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, .always_on = 1, }, .num_consumer_supplies = 1, .consumer_supplies = &ti8148evm_mpu_supply, },
static struct gpio_keys_button gpio_buttons[] = { GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"), GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"), GPIO_KEY(KEY_1, RCAR_GP_PIN(1, 14), "SW2-pin1"), }; static const struct gpio_keys_platform_data lager_keys_pdata __initconst = { .buttons = gpio_buttons, .nbuttons = ARRAY_SIZE(gpio_buttons), }; /* Fixed 3.3V regulator to be used by MMCIF */ static struct regulator_consumer_supply fixed3v3_power_consumers[] = { REGULATOR_SUPPLY("vmmc", "sh_mmcif.1"), }; /* * SDHI regulator macro * ** FIXME** * Lager board vqmmc is provided via DA9063 PMIC chip, * and we should use ${LINK}/drivers/mfd/da9063-* driver for it. * but, it doesn't have regulator support at this point. * It uses gpio-regulator for vqmmc as quick-hack. */ #define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \ static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \ REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \ \
.buttons = gpio_buttons, .nbuttons = ARRAY_SIZE(gpio_buttons), }; static struct platform_device gpio_keys_device = { .name = "gpio-keys", .id = -1, .dev = { .platform_data = &gpio_key_info, }, }; /* Fixed 3.3V regulator to be used by SDHI0, SDHI1, MMCIF */ static struct regulator_consumer_supply fixed3v3_power_consumers[] = { REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"), REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"), REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"), REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"), REGULATOR_SUPPLY("vmmc", "sh_mmcif"), REGULATOR_SUPPLY("vqmmc", "sh_mmcif"), }; /* SDHI0 */ /* * FIXME * * It use polling mode here, since * CD (= Card Detect) pin is not connected to SDHI0_CD. * We can use IRQ31 as card detect irq, * but it needs chattering removal operation
static void __init ek_add_device_buttons(void) {} #endif /* * ADCs */ static struct at91_adc_data ek_adc_data = { .channels_used = BIT(0) | BIT(1) | BIT(2) | BIT(3), .use_external_triggers = true, .vref = 3300, }; #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE) static struct regulator_consumer_supply ek_audio_consumer_supplies[] = { REGULATOR_SUPPLY("AVDD", "0-001b"), REGULATOR_SUPPLY("HPVDD", "0-001b"), REGULATOR_SUPPLY("DBVDD", "0-001b"), REGULATOR_SUPPLY("DCVDD", "0-001b"), }; static struct regulator_init_data ek_avdd_reg_init_data = { .constraints = { .name = "3V3", .valid_ops_mask = REGULATOR_CHANGE_STATUS, }, .consumer_supplies = ek_audio_consumer_supplies, .num_consumer_supplies = ARRAY_SIZE(ek_audio_consumer_supplies), }; static struct fixed_voltage_config ek_vdd_pdata = {
*/ #include <linux/regulator/pm8xxx-regulator.h> #include "board-awifi.h" #define VREG_CONSUMERS(_id) \ static struct regulator_consumer_supply vreg_consumers_##_id[] /* Regulators that are present when using either PM8921 or PM8917 */ /* * Consumer specific regulator names: * regulator name consumer dev_name */ VREG_CONSUMERS(L1) = { REGULATOR_SUPPLY("8921_l1", NULL), }; VREG_CONSUMERS(L2) = { REGULATOR_SUPPLY("8921_l2", NULL), REGULATOR_SUPPLY("dsi_vdda", "mipi_dsi.1"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"), REGULATOR_SUPPLY("lvds_pll_vdda", "lvds.0"), REGULATOR_SUPPLY("dsi1_pll_vdda", "mipi_dsi.1"), REGULATOR_SUPPLY("HRD_VDDD_CDC_D", "tabla2x-slim"), REGULATOR_SUPPLY("HRD_CDC_VDDA_A_1P2V", "tabla2x-slim"), REGULATOR_SUPPLY("dsi_pll_vdda", "mdp.0"), }; VREG_CONSUMERS(L3) = { REGULATOR_SUPPLY("8921_l3", NULL),
#include <plat/gpmc.h> #include "common.h" #include <plat/onenand.h> #include <plat/display.h> #include <plat/panel-nokia-dsi.h> #include <plat/vram.h> #include "mux.h" #include "hsmmc.h" #include "sdram-nokia.h" #include "common-board-devices.h" #include "dss.h" static struct regulator_consumer_supply rm680_vemmc_consumers[] = { REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), }; /* Fixed regulator for internal eMMC */ static struct regulator_init_data rm680_vemmc = { .constraints = { .name = "rm680_vemmc", .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE, }, .num_consumer_supplies = ARRAY_SIZE(rm680_vemmc_consumers), .consumer_supplies = rm680_vemmc_consumers, };
#include <plat/gpio-cfg.h> #include <mach/irqs.h> #include <mach/hs-iic.h> #if defined(CONFIG_MFD_MAX77802) #include <linux/mfd/max77802.h> #endif #include "board-universal5410.h" #if defined(CONFIG_REGULATOR_MAX77802) /* max77802 */ static struct regulator_consumer_supply max77802_buck1 = REGULATOR_SUPPLY("vdd_mif", NULL); static struct regulator_consumer_supply max77802_buck2 = REGULATOR_SUPPLY("vdd_arm", NULL); static struct regulator_consumer_supply max77802_buck3 = REGULATOR_SUPPLY("vdd_int", NULL); static struct regulator_consumer_supply max77802_buck4 = REGULATOR_SUPPLY("vdd_g3d", NULL); static struct regulator_consumer_supply max77802_buck6 = REGULATOR_SUPPLY("vdd_kfc", NULL); static struct regulator_consumer_supply ldo2_supply[] = { REGULATOR_SUPPLY("vmem2_1.2v_ap", NULL),
#include "board-8064.h" #ifdef CONFIG_REGULATOR_MAX77693 #include <linux/mfd/max77693.h> #endif #define VREG_CONSUMERS(_id) \ static struct regulator_consumer_supply vreg_consumers_##_id[] /* Regulators that are present when using either PM8921 or PM8917 */ /* * Consumer specific regulator names: * regulator name consumer dev_name */ VREG_CONSUMERS(L1) = { REGULATOR_SUPPLY("8921_l1", NULL), }; VREG_CONSUMERS(L2) = { REGULATOR_SUPPLY("8921_l2", NULL), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"), REGULATOR_SUPPLY("lvds_pll_vdda", "lvds.0"), REGULATOR_SUPPLY("dsi1_pll_vdda", "mipi_dsi.1"), REGULATOR_SUPPLY("HRD_VDDD_CDC_D", "tabla2x-slim"), REGULATOR_SUPPLY("HRD_CDC_VDDA_A_1P2V", "tabla2x-slim"), }; VREG_CONSUMERS(L3) = { REGULATOR_SUPPLY("8921_l3", NULL), REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.0"),
static struct sht15_platform_data platform_data_sht15 = { .gpio_data = 100, .gpio_sck = 98, }; static struct platform_device sht15 = { .name = "sht15", .id = -1, .dev = { .platform_data = &platform_data_sht15, }, }; static struct regulator_consumer_supply stargate2_sensor_3_con[] = { REGULATOR_SUPPLY("vcc", "sht15"), }; enum stargate2_ldos{ vcc_vref, vcc_cc2420, /* a mote connector? */ vcc_mica, /* the CSR bluecore chip */ vcc_bt, /* The two voltages available to sensor boards */ vcc_sensor_1_8, vcc_sensor_3, /* directly connected to the pxa27x */ vcc_sram_ext, vcc_pxa_pll,
}, \ .num_consumer_supplies = \ ARRAY_SIZE(vreg_consumers_##_id), \ .consumer_supplies = vreg_consumers_##_id, \ }, \ .regulator_name = _reg_name, \ .active_low = _active_low, \ .gpio_label = _gpio_label, \ .gpio = _gpio, \ } #define GPIO_VREG_ID_EXT_2P85V 0 #define GPIO_VREG_ID_EXT_1P8V 1 static struct regulator_consumer_supply vreg_consumers_EXT_2P85V[] = { REGULATOR_SUPPLY("cam_ov5647_avdd", "0-006c"), REGULATOR_SUPPLY("cam_ov5647_truly_cm6868_avdd", "0-006c"), REGULATOR_SUPPLY("cam_ov7692_avdd", "0-0078"), REGULATOR_SUPPLY("cam_ov8825_avdd", "0-000d"), REGULATOR_SUPPLY("lcd_vdd", "mipi_dsi.1"), #ifdef CONFIG_AR0543 REGULATOR_SUPPLY("cam_ar0543_avdd", "0-0064"), #endif }; static struct regulator_consumer_supply vreg_consumers_EXT_1P8V[] = { REGULATOR_SUPPLY("cam_ov5647_vdd", "0-006c"), REGULATOR_SUPPLY("cam_ov5647_truly_cm6868_vdd", "0-006c"), REGULATOR_SUPPLY("cam_ov7692_vdd", "0-0078"), REGULATOR_SUPPLY("cam_ov8825_vdd", "0-000d"), REGULATOR_SUPPLY("lcd_vddi", "mipi_dsi.1"),
.type2 = -1 }, { .resource = RES_VDD1, .devgroup = DEV_GRP_P1, .type = -1, .type2 = -1 }, { .resource = RES_VDD2, .devgroup = DEV_GRP_P1, .type = -1, .type2 = -1 }, { 0, 0}, }; static struct twl4030_power_data omap3_power_pdata = { .scripts = omap3_power_scripts, .num = ARRAY_SIZE(omap3_power_scripts), .resource_config = omap3_rconfig, }; static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = { REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"), }; static struct regulator_init_data omap3_vdac_idata = { .constraints = { .min_uV = 1800000, .max_uV = 1800000, .valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY, .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies), .consumer_supplies = omap3_vdda_dac_supplies, };
static struct regulator_init_data pwgtx_init = { .constraints = { .boot_on = 1, .always_on = 1, }, }; static struct regulator_init_data gpo_init = { .constraints = { .boot_on = 1, .always_on = 1, } }; static struct regulator_consumer_supply vmmc2_consumers[] = { REGULATOR_SUPPLY("vmmc", "imx31-mmc.0"), }; static struct regulator_init_data vmmc2_init = { .constraints = { .min_uV = 3000000, .max_uV = 3000000, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, }, .num_consumer_supplies = ARRAY_SIZE(vmmc2_consumers), .consumer_supplies = vmmc2_consumers, }; static struct regulator_consumer_supply vmmc1_consumers[] = { REGULATOR_SUPPLY("vcore", "spi0.0"),
#include <mach/iomap.h> #include <mach/irqs.h> #include <mach/pinmux.h> #include <mach/edp.h> #include "gpio-names.h" #include "board.h" #include "board-cardhu.h" #include "wakeups-t3.h" #define PMC_CTRL 0x0 #define PMC_CTRL_INTR_LOW (1 << 17) static struct regulator_consumer_supply ricoh583_dc1_supply_skubit0_0[] = { REGULATOR_SUPPLY("vdd_core", NULL), REGULATOR_SUPPLY("en_vddio_ddr_1v2", NULL), }; static struct regulator_consumer_supply ricoh583_dc1_supply_skubit0_1[] = { REGULATOR_SUPPLY("en_vddio_ddr_1v2", NULL), }; static struct regulator_consumer_supply ricoh583_dc3_supply_0[] = { REGULATOR_SUPPLY("vdd_gen1v5", NULL), REGULATOR_SUPPLY("vcore_lcd", NULL), REGULATOR_SUPPLY("track_ldo1", NULL), REGULATOR_SUPPLY("external_ldo_1v2", NULL), REGULATOR_SUPPLY("vcore_cam1", NULL), REGULATOR_SUPPLY("vcore_cam2", NULL), };
*/ #include <linux/i2c.h> #include <linux/regulator/machine.h> #include <plat/gpio-cfg.h> #include <mach/gpio-midas.h> #include <mach/irqs.h> #include <linux/mfd/max77686.h> #if defined(CONFIG_REGULATOR_MAX77686) /* max77686 */ #ifdef CONFIG_SND_SOC_WM8994 static struct regulator_consumer_supply ldo3_supply[] = { REGULATOR_SUPPLY("AVDD2", NULL), REGULATOR_SUPPLY("CPVDD", NULL), REGULATOR_SUPPLY("DBVDD1", NULL), REGULATOR_SUPPLY("DBVDD2", NULL), REGULATOR_SUPPLY("DBVDD3", NULL), }; #else static struct regulator_consumer_supply ldo3_supply[] = {}; #endif static struct regulator_consumer_supply ldo5_supply[] = { REGULATOR_SUPPLY("vcc_1.8v", NULL), REGULATOR_SUPPLY("touchkey", NULL), /*touchkey*/ }; static struct regulator_consumer_supply ldo8_supply[] = {
#include <linux/platform_device.h> #include <linux/regulator/pm8xxx-regulator.h> #include <linux/regulator/gpio-regulator.h> #include <mach/rpm-regulator.h> #include "board-ville.h" #define VREG_CONSUMERS(_id) \ static struct regulator_consumer_supply vreg_consumers_##_id[] /* * Consumer specific regulator names: * regulator name consumer dev_name */ VREG_CONSUMERS(L1) = { REGULATOR_SUPPLY("8921_l1", NULL), }; VREG_CONSUMERS(L2) = { REGULATOR_SUPPLY("8921_l2", NULL), REGULATOR_SUPPLY("dsi_vdda", "mipi_dsi.1"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_camera_imx074.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_camera_ov2720.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_camera_qs_mt9p017.0"), }; VREG_CONSUMERS(L3) = { REGULATOR_SUPPLY("8921_l3", NULL), REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), }; VREG_CONSUMERS(L4) = { REGULATOR_SUPPLY("8921_l4", NULL), REGULATOR_SUPPLY("HSUSB_1p8", "msm_otg"),
.name = "pmem_gpu1", .bank = 0, /* OneDRAM */ .memsize = S5PV210_ANDROID_PMEM_MEMSIZE_PMEM_GPU1, .paddr = 0, }, [9] = { .id = S5P_MDEV_G2D, .name = "g2d", .bank = 0, .memsize = S5PV210_VIDEO_SAMSUNG_MEMSIZE_G2D, .paddr = 0, }, }; static struct regulator_consumer_supply ldo3_consumer[] = { REGULATOR_SUPPLY("pd_io", "s3c-usbgadget") }; static struct regulator_consumer_supply ldo4_consumer[] = { { .supply = "vddmipi", }, }; static struct regulator_consumer_supply ldo6_consumer[] = { { .supply = "vddlcd", }, }; static struct regulator_consumer_supply ldo7_consumer[] = { { .supply = "vddmodem", }, }; static struct regulator_consumer_supply ldo8_consumer[] = {
void __init palm27x_power_init(int ac, int usb) { palm_ac_state = ac; palm_usb_state = usb; platform_device_register(&palm27x_power_supply); } #endif /****************************************************************************** * Core power regulator ******************************************************************************/ #if defined(CONFIG_REGULATOR_MAX1586) || \ defined(CONFIG_REGULATOR_MAX1586_MODULE) static struct regulator_consumer_supply palm27x_max1587a_consumers[] = { REGULATOR_SUPPLY("vcc_core", NULL), }; static struct regulator_init_data palm27x_max1587a_v3_info = { .constraints = { .name = "vcc_core range", .min_uV = 900000, .max_uV = 1705000, .always_on = 1, .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, }, .consumer_supplies = palm27x_max1587a_consumers, .num_consumer_supplies = ARRAY_SIZE(palm27x_max1587a_consumers), }; static struct max1586_subdev_data palm27x_max1587a_subdevs[] = {
#include <linux/gpio.h> #include <linux/io.h> #include <mach/iomap.h> #include <mach/irqs.h> #include "gpio-names.h" #include "wakeups-t2.h" #include "board.h" #include "pm.h" #define PMC_CTRL 0x0 #define PMC_CTRL_INTR_LOW (1 << 17) static struct regulator_consumer_supply tps658621_sm0_supply[] = { REGULATOR_SUPPLY("vdd_core", NULL), }; static struct regulator_consumer_supply tps658621_sm1_supply[] = { REGULATOR_SUPPLY("vdd_cpu", NULL), }; static struct regulator_consumer_supply tps658621_sm2_supply[] = { REGULATOR_SUPPLY("vdd_sm2", NULL), }; static struct regulator_consumer_supply tps658621_ldo0_supply[] = { REGULATOR_SUPPLY("p_cam_avdd", NULL), }; static struct regulator_consumer_supply tps658621_ldo1_supply[] = { REGULATOR_SUPPLY("avdd_pll", NULL), }; static struct regulator_consumer_supply tps658621_ldo2_supply[] = { REGULATOR_SUPPLY("vdd_rtc", NULL),
#define PCOM_VREG_LDO PCOM_VREG_SMP #define PCOM_VREG_NCP(_name, _id, _supply, _min_uV, _max_uV, _rise_time, \ _always_on, _boot_on, _apply_uV, _supply_uV) \ { \ .init_data = PCOM_VREG_INIT_DATA(_name, _supply, -(_min_uV), \ -(_max_uV), _always_on, _boot_on, _apply_uV, _supply_uV), \ .id = _id, \ .rise_time = _rise_time, \ .pulldown = -1, \ .negative = 1, \ } PCOM_VREG_CONSUMERS(smps1) = { REGULATOR_SUPPLY("smps1", NULL), REGULATOR_SUPPLY("msmc1", NULL), REGULATOR_SUPPLY("vreg_msmc1", NULL), }; PCOM_VREG_CONSUMERS(smps2) = { REGULATOR_SUPPLY("smps2", NULL), REGULATOR_SUPPLY("msmc2", NULL), REGULATOR_SUPPLY("vreg_msmc2", NULL), }; PCOM_VREG_CONSUMERS(smps3) = { REGULATOR_SUPPLY("smps3", NULL), REGULATOR_SUPPLY("msme1", NULL), REGULATOR_SUPPLY("vreg_msme", NULL), };
* GNU General Public License for more details. */ #include <linux/regulator/pm8xxx-regulator.h> #include "board-m7wl.h" #define VREG_CONSUMERS(_id) \ static struct regulator_consumer_supply vreg_consumers_##_id[] /* * Consumer specific regulator names: * regulator name consumer dev_name */ VREG_CONSUMERS(L1) = { REGULATOR_SUPPLY("8921_l1", NULL), }; VREG_CONSUMERS(L2) = { REGULATOR_SUPPLY("8921_l2", NULL), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csiphy.0"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csiphy.1"), REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csiphy.2"), REGULATOR_SUPPLY("lvds_pll_vdda", "lvds.0"), REGULATOR_SUPPLY("dsi1_pll_vdda", "mipi_dsi.1"), }; VREG_CONSUMERS(L3) = { REGULATOR_SUPPLY("8921_l3", NULL), REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.0"), REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.1"), };
}; /* * Set up static virtual mappings. */ void __init mx31lite_map_io(void) { mx31_map_io(); iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc)); } static int mx31lite_baseboard; core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444); static struct regulator_consumer_supply dummy_supplies[] = { REGULATOR_SUPPLY("vdd33a", "smsc911x"), REGULATOR_SUPPLY("vddvario", "smsc911x"), }; static void __init mx31lite_init(void) { imx31_soc_init(); mxc_iomux_setup_multiple_pins(mx31lite_pins, ARRAY_SIZE(mx31lite_pins), "mx31lite"); imx31_add_imx_uart0(&uart_pdata); imx31_add_spi_imx0(&spi0_pdata); /* NOR and NAND flash */ platform_device_register(&physmap_flash_device);
}; static struct mfd_cell touch_devs[] = { {"88pm860x-touch", -1,}, }; static struct mfd_cell onkey_devs[] = { {"88pm860x-onkey", -1,}, }; static struct mfd_cell codec_devs[] = { {"88pm860x-codec", -1,}, }; static struct regulator_consumer_supply preg_supply[] = { REGULATOR_SUPPLY("preg", "charger-manager"), }; static struct regulator_init_data preg_init_data = { .num_consumer_supplies = ARRAY_SIZE(preg_supply), .consumer_supplies = &preg_supply[0], }; static struct charger_regulator chg_desc_regulator_data[] = { { .regulator_name = "preg", }, }; static struct mfd_cell power_devs[] = { {"88pm860x-battery", -1,}, {"88pm860x-charger", -1,}, {"88pm860x-preg", -1,},