3 * Marcel Ziswiler <marcel@ziswiler.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/gp_padctrl.h>
11 #include <asm/arch/pinmux.h>
16 #include "pinmux-config-apalis_t30.h"
18 #define PMU_I2C_ADDRESS 0x2D
19 #define MAX_I2C_RETRY 3
22 * Routine: pinmux_init
23 * Description: Do individual peripheral pinmux configs
25 void pinmux_init(void)
27 pinmux_config_pingrp_table(tegra3_pinmux_common,
28 ARRAY_SIZE(tegra3_pinmux_common));
30 pinmux_config_pingrp_table(unused_pins_lowpower,
31 ARRAY_SIZE(unused_pins_lowpower));
33 /* Initialize any non-default pad configs (APB_MISC_GP regs) */
34 pinmux_config_drvgrp_table(apalis_t30_padctrl,
35 ARRAY_SIZE(apalis_t30_padctrl));
38 #ifdef CONFIG_PCI_TEGRA
39 int tegra_pcie_board_init(void)
45 old_bus = i2c_get_bus_num();
47 err = i2c_set_bus_num(0);
49 debug("failed to set I2C bus\n");
53 /* TPS659110: VDD2_OP_REG = 1.05V */
57 err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
59 debug("failed to set VDD supply\n");
63 /* TPS659110: VDD2_REG 7.5 mV/us, ACTIVE */
67 err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
69 debug("failed to enable VDD supply\n");
73 /* TPS659110: LDO6_REG = 1.1V, ACTIVE */
77 err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
79 debug("failed to set AVDD supply\n");
83 i2c_set_bus_num(old_bus);
88 int board_eth_init(bd_t *bis)
90 return pci_eth_init(bis);
92 #endif /* CONFIG_PCI_TEGRA */