1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/mmio.h>
4 #include <soc/addressmap.h>
8 static struct apbmisc
*misc
= (struct apbmisc
*)TEGRA_APB_MISC_BASE
;
10 void enable_jtag(void)
12 write32(&misc
->pp_config_ctl
, PP_CONFIG_CTL_JTAG
);
15 void clamp_tristate_inputs(void)
17 write32(&misc
->pp_pinmux_global
, PP_PINMUX_CLAMP_INPUTS
);
20 void tegra_revision_info(struct tegra_revision
*id
)
22 uintptr_t gp_hidrev
= (uintptr_t)TEGRA_APB_MISC_BASE
+ MISC_GP_HIDREV
;
25 reg
= read32((void *)(gp_hidrev
));
27 id
->hid_fam
= (reg
>> 0) & 0x0f;
28 id
->chip_id
= (reg
>> 8) & 0xff;
29 id
->major
= (reg
>> 4) & 0x0f;
30 id
->minor
= (reg
>> 16) & 0x07;