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