mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-19 17:53:08 +00:00
bdf9dead86
The HTC One X is a touchscreen-based, slate-sized smartphone designed and manufactured by HTC that runs the Android operating system. The One X features a 4.7" display, an Nvidia Tegra 3 quad-core chip, 1 GB of RAM and non-extendable 32 GB of internal storage. UART-A is default debug port. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> Tested-by: Ion Agorria <ion@agorria.com> Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
47 lines
1.4 KiB
C
47 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* T30 HTC Endeavoru SPL stage configuration
|
|
*
|
|
* (C) Copyright 2010-2013
|
|
* NVIDIA Corporation <www.nvidia.com>
|
|
*
|
|
* (C) Copyright 2022
|
|
* Svyatoslav Ryhel <clamor95@gmail.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/arch-tegra/tegra_i2c.h>
|
|
#include <linux/delay.h>
|
|
|
|
/*
|
|
* Endeavoru uses TPS80032 PMIC with SMPS1 and SMPS2 in strandard
|
|
* mode with zero offset.
|
|
*/
|
|
|
|
#define TPS80032_DVS_I2C_ADDR (0x12 << 1)
|
|
#define TPS80032_SMPS1_CFG_VOLTAGE_REG 0x56
|
|
#define TPS80032_SMPS2_CFG_VOLTAGE_REG 0x5C
|
|
#define TPS80032_SMPS1_CFG_VOLTAGE_DATA (0x2100 | TPS80032_SMPS1_CFG_VOLTAGE_REG)
|
|
#define TPS80032_SMPS2_CFG_VOLTAGE_DATA (0x3000 | TPS80032_SMPS2_CFG_VOLTAGE_REG)
|
|
|
|
#define TPS80032_CTL1_I2C_ADDR (0x48 << 1)
|
|
#define TPS80032_SMPS1_CFG_STATE_REG 0x54
|
|
#define TPS80032_SMPS2_CFG_STATE_REG 0x5A
|
|
#define TPS80032_SMPS1_CFG_STATE_DATA (0x0100 | TPS80032_SMPS1_CFG_STATE_REG)
|
|
#define TPS80032_SMPS2_CFG_STATE_DATA (0x0100 | TPS80032_SMPS2_CFG_STATE_REG)
|
|
|
|
void pmic_enable_cpu_vdd(void)
|
|
{
|
|
/* Set VDD_CORE to 1.200V. */
|
|
tegra_i2c_ll_write(TPS80032_DVS_I2C_ADDR, TPS80032_SMPS2_CFG_VOLTAGE_DATA);
|
|
udelay(1000);
|
|
tegra_i2c_ll_write(TPS80032_CTL1_I2C_ADDR, TPS80032_SMPS2_CFG_STATE_DATA);
|
|
|
|
udelay(1000);
|
|
|
|
/* Bring up VDD_CPU to 1.0125V. */
|
|
tegra_i2c_ll_write(TPS80032_DVS_I2C_ADDR, TPS80032_SMPS1_CFG_VOLTAGE_DATA);
|
|
udelay(1000);
|
|
tegra_i2c_ll_write(TPS80032_CTL1_I2C_ADDR, TPS80032_SMPS1_CFG_STATE_DATA);
|
|
udelay(10 * 1000);
|
|
}
|