mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-19 03:08:31 +00:00
7fb82986be
The PMIC is configured such that its GPIOs have the correct configuration
at power-up, so no programming is required.
In fact, the current programming is actively wrong, since:
(a) the AS3722 driver configures the GPIO to be an output before setting
its output value, which causes a 0v glitch on the output.
(b) the AS3722 driver configures the GPIO to drive a high voltage from its
VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the pin
drives 5V not 1.8V as desired.
Solve these problems by removing the code which configures the PMIC GPIOs.
Note that this patch was tested directly on top of v2016.01; since then,
commit 96350f729c
"dm: tegra: net: Convert tegra boards to driver model
for Ethernet" prevents PCIe from being initialized. Alternatively, simply
revert that commit to get PCIe Ethernet working again, then apply this
patch to test.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
62 lines
1.1 KiB
C
62 lines
1.1 KiB
C
/*
|
|
* (C) Copyright 2014
|
|
* NVIDIA Corporation <www.nvidia.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <power/as3722.h>
|
|
|
|
#include <asm/arch/gpio.h>
|
|
#include <asm/arch/pinmux.h>
|
|
|
|
#include "pinmux-config-jetson-tk1.h"
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
/*
|
|
* Routine: pinmux_init
|
|
* Description: Do individual peripheral pinmux configs
|
|
*/
|
|
void pinmux_init(void)
|
|
{
|
|
pinmux_clear_tristate_input_clamping();
|
|
|
|
gpio_config_table(jetson_tk1_gpio_inits,
|
|
ARRAY_SIZE(jetson_tk1_gpio_inits));
|
|
|
|
pinmux_config_pingrp_table(jetson_tk1_pingrps,
|
|
ARRAY_SIZE(jetson_tk1_pingrps));
|
|
|
|
pinmux_config_drvgrp_table(jetson_tk1_drvgrps,
|
|
ARRAY_SIZE(jetson_tk1_drvgrps));
|
|
}
|
|
|
|
#ifdef CONFIG_PCI_TEGRA
|
|
int tegra_pcie_board_init(void)
|
|
{
|
|
struct udevice *pmic;
|
|
int err;
|
|
|
|
err = as3722_init(&pmic);
|
|
if (err) {
|
|
error("failed to initialize AS3722 PMIC: %d\n", err);
|
|
return err;
|
|
}
|
|
|
|
err = as3722_sd_enable(pmic, 4);
|
|
if (err < 0) {
|
|
error("failed to enable SD4: %d\n", err);
|
|
return err;
|
|
}
|
|
|
|
err = as3722_sd_set_voltage(pmic, 4, 0x24);
|
|
if (err < 0) {
|
|
error("failed to set SD4 voltage: %d\n", err);
|
|
return err;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
#endif /* PCI */
|