3 * NVIDIA Corporation <www.nvidia.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <power/as3722.h>
12 #include <asm/arch/gpio.h>
13 #include <asm/arch/pinmux.h>
15 #include "pinmux-config-jetson-tk1.h"
17 DECLARE_GLOBAL_DATA_PTR;
20 * Routine: pinmux_init
21 * Description: Do individual peripheral pinmux configs
23 void pinmux_init(void)
25 pinmux_set_tristate_input_clamping();
27 gpio_config_table(jetson_tk1_gpio_inits,
28 ARRAY_SIZE(jetson_tk1_gpio_inits));
30 pinmux_config_pingrp_table(jetson_tk1_pingrps,
31 ARRAY_SIZE(jetson_tk1_pingrps));
33 pinmux_config_drvgrp_table(jetson_tk1_drvgrps,
34 ARRAY_SIZE(jetson_tk1_drvgrps));
37 #ifdef CONFIG_PCI_TEGRA
38 int tegra_pcie_board_init(void)
43 err = as3722_init(&pmic);
45 error("failed to initialize AS3722 PMIC: %d\n", err);
49 err = as3722_sd_enable(pmic, 4);
51 error("failed to enable SD4: %d\n", err);
55 err = as3722_sd_set_voltage(pmic, 4, 0x24);
57 error("failed to set SD4 voltage: %d\n", err);
61 err = as3722_gpio_configure(pmic, 1, AS3722_GPIO_OUTPUT_VDDH |
64 error("failed to configure GPIO#1 as output: %d\n", err);
68 err = as3722_gpio_direction_output(pmic, 2, 1);
70 error("failed to set GPIO#2 high: %d\n", err);
77 int board_eth_init(bd_t *bis)
79 return pci_eth_init(bis);