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>
14 #include <asm/arch-tegra/gpu.h>
16 #include "pinmux-config-jetson-tk1.h"
18 DECLARE_GLOBAL_DATA_PTR;
21 * Routine: pinmux_init
22 * Description: Do individual peripheral pinmux configs
24 void pinmux_init(void)
26 pinmux_clear_tristate_input_clamping();
28 gpio_config_table(jetson_tk1_gpio_inits,
29 ARRAY_SIZE(jetson_tk1_gpio_inits));
31 pinmux_config_pingrp_table(jetson_tk1_pingrps,
32 ARRAY_SIZE(jetson_tk1_pingrps));
34 pinmux_config_drvgrp_table(jetson_tk1_drvgrps,
35 ARRAY_SIZE(jetson_tk1_drvgrps));
38 #ifdef CONFIG_PCI_TEGRA
39 int tegra_pcie_board_init(void)
44 err = as3722_init(&pmic);
46 error("failed to initialize AS3722 PMIC: %d\n", err);
50 err = as3722_sd_enable(pmic, 4);
52 error("failed to enable SD4: %d\n", err);
56 err = as3722_sd_set_voltage(pmic, 4, 0x24);
58 error("failed to set SD4 voltage: %d\n", err);
62 err = as3722_gpio_configure(pmic, 1, AS3722_GPIO_OUTPUT_VDDH |
65 error("failed to configure GPIO#1 as output: %d\n", err);
69 err = as3722_gpio_direction_output(pmic, 2, 1);
71 error("failed to set GPIO#2 high: %d\n", err);
78 int board_eth_init(bd_t *bis)
80 return pci_eth_init(bis);
84 int ft_board_setup(void *blob, bd_t *bd)
86 gpu_enable_node(blob, "/gpu@0,57000000");