blob: c2e27b7b675a8e773e24909417608b51aa179071 [file] [log] [blame]
Peter Chubb441f2382016-08-30 22:54:46 +00001/*
2 * (C) Copyright 2014
3 * NVIDIA Corporation <www.nvidia.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#include <common.h>
9#include <power/as3722.h>
10
11#include <asm/arch/gpio.h>
12#include <asm/arch/pinmux.h>
13
14#include "pinmux-config-cei-tk1-som.h"
15
Peter Chubb441f2382016-08-30 22:54:46 +000016/*
17 * Routine: pinmux_init
18 * Description: Do individual peripheral pinmux configs
19 */
20void pinmux_init(void)
21{
22 pinmux_clear_tristate_input_clamping();
23
24 gpio_config_table(cei_tk1_som_gpio_inits,
25 ARRAY_SIZE(cei_tk1_som_gpio_inits));
26
27 pinmux_config_pingrp_table(cei_tk1_som_pingrps,
28 ARRAY_SIZE(cei_tk1_som_pingrps));
29
30 pinmux_config_drvgrp_table(cei_tk1_som_drvgrps,
31 ARRAY_SIZE(cei_tk1_som_drvgrps));
32
33 pinmux_config_mipipadctrlgrp_table(cei_tk1_som_mipipadctrlgrps,
34 ARRAY_SIZE(cei_tk1_som_mipipadctrlgrps));
35}
36
37#ifdef CONFIG_PCI_TEGRA
38int tegra_pcie_board_init(void)
39{
Simon Glassb3d2ed32017-07-25 08:30:12 -060040/* TODO: Convert to driver model
Peter Chubb441f2382016-08-30 22:54:46 +000041 struct udevice *pmic;
42 int err;
43
44 err = as3722_init(&pmic);
45 if (err) {
46 error("failed to initialize AS3722 PMIC: %d\n", err);
47 return err;
48 }
49
50 err = as3722_sd_enable(pmic, 4);
51 if (err < 0) {
52 error("failed to enable SD4: %d\n", err);
53 return err;
54 }
55
56 err = as3722_sd_set_voltage(pmic, 4, 0x24);
57 if (err < 0) {
58 error("failed to set SD4 voltage: %d\n", err);
59 return err;
60 }
Simon Glassb3d2ed32017-07-25 08:30:12 -060061*/
Peter Chubb441f2382016-08-30 22:54:46 +000062
63 return 0;
64}
65#endif /* PCI */