blob: dc1d1102c3ff7527113189e8febd224846abda90 [file] [log] [blame]
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +03001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2010-2013
4 * NVIDIA Corporation <www.nvidia.com>
5 *
6 * (C) Copyright 2021
7 * Svyatoslav Ryhel <clamor95@gmail.com>
8 */
9
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030010#include <dm.h>
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030011#include <fdt_support.h>
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030012#include <asm/arch/pinmux.h>
13#include <asm/arch/gp_padctrl.h>
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030014
Svyatoslav Ryhel193e9482023-08-26 18:46:27 +030015#include "pinmux-config-grouper.h"
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030016
17/*
18 * Routine: pinmux_init
19 * Description: Do individual peripheral pinmux configs
20 */
21void pinmux_init(void)
22{
23 pinmux_config_pingrp_table(grouper_pinmux_common,
24 ARRAY_SIZE(grouper_pinmux_common));
25
26 pinmux_config_drvgrp_table(grouper_padctrl,
27 ARRAY_SIZE(grouper_padctrl));
28}
Svyatoslav Ryhel88fd1562023-06-30 10:29:04 +030029
30#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
31int ft_board_setup(void *blob, struct bd_info *bd)
32{
33 /* Remove TrustZone nodes */
34 fdt_del_node_and_alias(blob, "/firmware");
35 fdt_del_node_and_alias(blob, "/reserved-memory/trustzone@bfe00000");
36
37 return 0;
38}
39#endif