mirror of
https://github.com/CTCaer/hekate
synced 2024-11-13 23:36:33 +00:00
bdk: display: remove max77620 gpio 7 enable
It is actually not used at all. So do not configure it to save power.
This commit is contained in:
parent
8d49bc3c33
commit
14c482ddce
2 changed files with 7 additions and 13 deletions
|
@ -373,13 +373,10 @@ void display_init()
|
||||||
// Get Chip ID.
|
// Get Chip ID.
|
||||||
bool tegra_t210 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210;
|
bool tegra_t210 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210;
|
||||||
|
|
||||||
// Enable LCD DVDD.
|
// Enable DSI AVDD.
|
||||||
max7762x_regulator_set_voltage(REGULATOR_LDO0, 1200000);
|
max7762x_regulator_set_voltage(REGULATOR_LDO0, 1200000);
|
||||||
max7762x_regulator_enable(REGULATOR_LDO0, true);
|
max7762x_regulator_enable(REGULATOR_LDO0, true);
|
||||||
|
|
||||||
if (tegra_t210)
|
|
||||||
max77620_config_gpio(7, MAX77620_GPIO_OUTPUT_ENABLE); // T210: LD0 -> GPIO7 -> LCD.
|
|
||||||
|
|
||||||
// Enable Display Interface specific clocks.
|
// Enable Display Interface specific clocks.
|
||||||
CLOCK(CLK_RST_CONTROLLER_RST_DEV_H_CLR) = BIT(CLK_H_MIPI_CAL) | BIT(CLK_H_DSI);
|
CLOCK(CLK_RST_CONTROLLER_RST_DEV_H_CLR) = BIT(CLK_H_MIPI_CAL) | BIT(CLK_H_DSI);
|
||||||
CLOCK(CLK_RST_CONTROLLER_CLK_ENB_H_SET) = BIT(CLK_H_MIPI_CAL) | BIT(CLK_H_DSI);
|
CLOCK(CLK_RST_CONTROLLER_CLK_ENB_H_SET) = BIT(CLK_H_MIPI_CAL) | BIT(CLK_H_DSI);
|
||||||
|
@ -791,6 +788,10 @@ skip_panel_deinit:
|
||||||
{
|
{
|
||||||
gpio_write(GPIO_PORT_I, GPIO_PIN_1, GPIO_LOW); // LCD AVDD -5.4V disable.
|
gpio_write(GPIO_PORT_I, GPIO_PIN_1, GPIO_LOW); // LCD AVDD -5.4V disable.
|
||||||
gpio_write(GPIO_PORT_I, GPIO_PIN_0, GPIO_LOW); // LCD AVDD +5.4V disable.
|
gpio_write(GPIO_PORT_I, GPIO_PIN_0, GPIO_LOW); // LCD AVDD +5.4V disable.
|
||||||
|
|
||||||
|
// Make sure LCD PWM backlight pin is in PWM0 mode.
|
||||||
|
gpio_config(GPIO_PORT_V, GPIO_PIN_0, GPIO_MODE_SPIO); // Backlight PWM.
|
||||||
|
PINMUX_AUX(PINMUX_AUX_LCD_BL_PWM) = PINMUX_TRISTATE | PINMUX_PULL_DOWN | 1; // Set PWM0 mode.
|
||||||
}
|
}
|
||||||
usleep(10000);
|
usleep(10000);
|
||||||
|
|
||||||
|
@ -805,14 +806,7 @@ skip_panel_deinit:
|
||||||
DSI_PAD_CONTROL_VS1_PDIO_CLK | DSI_PAD_CONTROL_VS1_PDIO(0xF);
|
DSI_PAD_CONTROL_VS1_PDIO_CLK | DSI_PAD_CONTROL_VS1_PDIO(0xF);
|
||||||
DSI(_DSIREG(DSI_POWER_CONTROL)) = 0;
|
DSI(_DSIREG(DSI_POWER_CONTROL)) = 0;
|
||||||
|
|
||||||
// Switch LCD PWM backlight pin to special function mode and enable PWM0 mode.
|
// Disable DSI AVDD.
|
||||||
if (!_nx_aula)
|
|
||||||
{
|
|
||||||
gpio_config(GPIO_PORT_V, GPIO_PIN_0, GPIO_MODE_SPIO); // Backlight PWM.
|
|
||||||
PINMUX_AUX(PINMUX_AUX_LCD_BL_PWM) = PINMUX_TRISTATE | PINMUX_PULL_DOWN | 1; // Set PWM0 mode.
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable LCD DVDD.
|
|
||||||
max7762x_regulator_enable(REGULATOR_LDO0, false);
|
max7762x_regulator_enable(REGULATOR_LDO0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -300,7 +300,7 @@ static void _config_regulators(bool tegra_t210, bool nx_hoag)
|
||||||
gpio_write(GPIO_PORT_E, GPIO_PIN_4, GPIO_LOW);
|
gpio_write(GPIO_PORT_E, GPIO_PIN_4, GPIO_LOW);
|
||||||
sd_power_cycle_time_start = get_tmr_ms();
|
sd_power_cycle_time_start = get_tmr_ms();
|
||||||
|
|
||||||
// Disable LCD DVDD to make sure it's in a reset state.
|
// Disable DSI AVDD to make sure it's in a reset state.
|
||||||
max7762x_regulator_enable(REGULATOR_LDO0, false);
|
max7762x_regulator_enable(REGULATOR_LDO0, false);
|
||||||
|
|
||||||
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_CNFGBBC, MAX77620_CNFGBBC_RESISTOR_1K);
|
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_CNFGBBC, MAX77620_CNFGBBC_RESISTOR_1K);
|
||||||
|
|
Loading…
Reference in a new issue