diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2017-03-30 21:29:58 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2017-04-03 11:35:38 +0900 |
commit | 5dfbd7bad8b3db6034e6bdcb449f08ec848e64fd (patch) | |
tree | 8f3e097819ece3f206cd57a53ead3c07dc187853 /board | |
parent | 1930168001895210fc6439016f89f75fba415b40 (diff) |
board: samsung: trats: remove the unnecessary codes
These codes are unnecessary, because max8997 should be initialized with
dt-file.
Remove max8997_init() function.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/samsung/trats/trats.c | 161 |
1 files changed, 1 insertions, 160 deletions
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 7200c2ee0b..fa297c3d41 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -56,13 +56,6 @@ void i2c_init_board(void) #ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */ int err; - /* I2C_5 -> PMIC */ - err = exynos_pinmux_config(PERIPH_ID_I2C5, PINMUX_FLAG_NONE); - if (err) { - debug("I2C%d not configured\n", (I2C_5)); - return; - } - /* I2C_8 -> FG */ gpio_request(EXYNOS4_GPIO_Y40, "i2c_clk"); gpio_request(EXYNOS4_GPIO_Y41, "i2c_data"); @@ -129,156 +122,6 @@ static void trats_low_power_mode(void) writel(0x0, &clk->gate_ip_image); /* IMAGE */ writel(0x0, &clk->gate_ip_gps); /* GPS */ } - -static int pmic_init_max8997(void) -{ - struct pmic *p = pmic_get("MAX8997_PMIC"); - int i = 0, ret = 0; - u32 val; - - if (pmic_probe(p)) - return -1; - - /* BUCK1 VARM: 1.2V */ - val = (1200000 - 650000) / 25000; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK1DVS1, val); - val = ENBUCK | ACTIVE_DISCHARGE; /* DVS OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_BUCK1CTRL, val); - - /* BUCK2 VINT: 1.1V */ - val = (1100000 - 650000) / 25000; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK2DVS1, val); - val = ENBUCK | ACTIVE_DISCHARGE; /* DVS OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_BUCK2CTRL, val); - - - /* BUCK3 G3D: 1.1V - OFF */ - ret |= pmic_reg_read(p, MAX8997_REG_BUCK3CTRL, &val); - val &= ~ENBUCK; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK3CTRL, val); - - val = (1100000 - 750000) / 50000; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK3DVS, val); - - /* BUCK4 CAMISP: 1.2V - OFF */ - ret |= pmic_reg_read(p, MAX8997_REG_BUCK4CTRL, &val); - val &= ~ENBUCK; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK4CTRL, val); - - val = (1200000 - 650000) / 25000; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK4DVS, val); - - /* BUCK5 VMEM: 1.2V */ - val = (1200000 - 650000) / 25000; - for (i = 0; i < 8; i++) - ret |= pmic_reg_write(p, MAX8997_REG_BUCK5DVS1 + i, val); - - val = ENBUCK | ACTIVE_DISCHARGE; /* DVS OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_BUCK5CTRL, val); - - /* BUCK6 CAM AF: 2.8V */ - /* No Voltage Setting Register */ - /* GNSLCT 3.0X */ - val = GNSLCT; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK6CTRL, val); - - /* BUCK7 VCC_SUB: 2.0V */ - val = (2000000 - 750000) / 50000; - ret |= pmic_reg_write(p, MAX8997_REG_BUCK7DVS, val); - - /* LDO1 VADC: 3.3V */ - val = max8997_reg_ldo(3300000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO1CTRL, val); - - /* LDO1 Disable active discharging */ - ret |= pmic_reg_read(p, MAX8997_REG_LDO1CONFIG, &val); - val &= ~LDO_ADE; - ret |= pmic_reg_write(p, MAX8997_REG_LDO1CONFIG, val); - - /* LDO2 VALIVE: 1.1V */ - val = max8997_reg_ldo(1100000) | EN_LDO; - ret |= pmic_reg_write(p, MAX8997_REG_LDO2CTRL, val); - - /* LDO3 VUSB/MIPI: 1.1V */ - val = max8997_reg_ldo(1100000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, val); - - /* LDO4 VMIPI: 1.8V */ - val = max8997_reg_ldo(1800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO4CTRL, val); - - /* LDO5 VHSIC: 1.2V */ - val = max8997_reg_ldo(1200000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO5CTRL, val); - - /* LDO6 VCC_1.8V_PDA: 1.8V */ - val = max8997_reg_ldo(1800000) | EN_LDO; - ret |= pmic_reg_write(p, MAX8997_REG_LDO6CTRL, val); - - /* LDO7 CAM_ISP: 1.8V */ - val = max8997_reg_ldo(1800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO7CTRL, val); - - /* LDO8 VDAC/VUSB: 3.3V */ - val = max8997_reg_ldo(3300000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, val); - - /* LDO9 VCC_2.8V_PDA: 2.8V */ - val = max8997_reg_ldo(2800000) | EN_LDO; - ret |= pmic_reg_write(p, MAX8997_REG_LDO9CTRL, val); - - /* LDO10 VPLL: 1.1V */ - val = max8997_reg_ldo(1100000) | EN_LDO; - ret |= pmic_reg_write(p, MAX8997_REG_LDO10CTRL, val); - - /* LDO11 TOUCH: 2.8V */ - val = max8997_reg_ldo(2800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO11CTRL, val); - - /* LDO12 VTCAM: 1.8V */ - val = max8997_reg_ldo(1800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO12CTRL, val); - - /* LDO13 VCC_3.0_LCD: 3.0V */ - val = max8997_reg_ldo(3000000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO13CTRL, val); - - /* LDO14 MOTOR: 3.0V */ - val = max8997_reg_ldo(3000000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO14CTRL, val); - - /* LDO15 LED_A: 2.8V */ - val = max8997_reg_ldo(2800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO15CTRL, val); - - /* LDO16 CAM_SENSOR: 1.8V */ - val = max8997_reg_ldo(1800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO16CTRL, val); - - /* LDO17 VTF: 2.8V */ - val = max8997_reg_ldo(2800000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO17CTRL, val); - - /* LDO18 TOUCH_LED 3.3V */ - val = max8997_reg_ldo(3300000) | DIS_LDO; /* OFF */ - ret |= pmic_reg_write(p, MAX8997_REG_LDO18CTRL, val); - - /* LDO21 VDDQ: 1.2V */ - val = max8997_reg_ldo(1200000) | EN_LDO; - ret |= pmic_reg_write(p, MAX8997_REG_LDO21CTRL, val); - - /* SAFEOUT for both 1 and 2: 4.9V, Active discharge, Enable */ - val = (SAFEOUT_4_90V << 0) | (SAFEOUT_4_90V << 2) | - ACTDISSAFEO1 | ACTDISSAFEO2 | ENSAFEOUT1 | ENSAFEOUT2; - ret |= pmic_reg_write(p, MAX8997_REG_SAFEOUTCTRL, val); - - if (ret) { - puts("MAX8997 PMIC setting error!\n"); - return -1; - } - - return 0; -} #endif int exynos_power_init(void) @@ -295,9 +138,7 @@ int exynos_power_init(void) * The FUEL_GAUGE is marked as I2C9 on the schematic, but connected * to logical I2C adapter 1 */ - ret = pmic_init(I2C_5); - ret |= pmic_init_max8997(); - ret |= power_fg_init(I2C_9); + ret = power_fg_init(I2C_9); ret |= power_muic_init(I2C_5); ret |= power_bat_init(0); if (ret) |