tegra132: output chip information and MTS version
It's helpful to be able to track this information. Therefore dump it in to the console log. BRANCH=None BUG=chrome-os-partner:31126 TEST=Built and ran on rush. Revision information is put out on the console. Change-Id: I22e7d222259c1179b90edda6d7807559357f6725 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 18d318331b696a6a32e0a45b8f903eb740896b02 Original-Change-Id: Ic95382126a6b8929d0998d1c9adfcbd10e90663f Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/210903 Original-Reviewed-by: Tom Warren <twarren@nvidia.com> Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/8905 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
8c6d34c1f8
commit
bf53418099
@@ -33,3 +33,16 @@ void clamp_tristate_inputs(void)
|
|||||||
{
|
{
|
||||||
write32(PP_PINMUX_CLAMP_INPUTS, &misc->pp_pinmux_global);
|
write32(PP_PINMUX_CLAMP_INPUTS, &misc->pp_pinmux_global);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tegra_revision_info(struct tegra_revision *id)
|
||||||
|
{
|
||||||
|
uintptr_t gp_hidrev= (uintptr_t)TEGRA_APB_MISC_BASE + MISC_GP_HIDREV;
|
||||||
|
uint32_t reg;
|
||||||
|
|
||||||
|
reg = read32((void *)(gp_hidrev));
|
||||||
|
|
||||||
|
id->hid_fam = (reg >> 0) & 0x0f;
|
||||||
|
id->chip_id = (reg >> 8) & 0xff;
|
||||||
|
id->major = (reg >> 4) & 0x0f;
|
||||||
|
id->minor = (reg >> 16) & 0x07;
|
||||||
|
}
|
||||||
|
@@ -34,8 +34,19 @@ struct apbmisc {
|
|||||||
|
|
||||||
#define PP_PINMUX_CLAMP_INPUTS (1 << 0)
|
#define PP_PINMUX_CLAMP_INPUTS (1 << 0)
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MISC_GP_HIDREV = 0x804
|
||||||
|
};
|
||||||
|
|
||||||
|
struct tegra_revision {
|
||||||
|
int hid_fam;
|
||||||
|
int chip_id;
|
||||||
|
int major;
|
||||||
|
int minor;
|
||||||
|
};
|
||||||
|
|
||||||
void enable_jtag(void);
|
void enable_jtag(void);
|
||||||
void clamp_tristate_inputs(void);
|
void clamp_tristate_inputs(void);
|
||||||
|
void tegra_revision_info(struct tegra_revision *id);
|
||||||
|
|
||||||
#endif /* __SOC_NVIDIA_TEGRA_APBMISC_H__ */
|
#endif /* __SOC_NVIDIA_TEGRA_APBMISC_H__ */
|
||||||
|
@@ -49,6 +49,7 @@ ramstage-y += i2c.c
|
|||||||
ramstage-y += dma.c
|
ramstage-y += dma.c
|
||||||
ramstage-y += monotonic_timer.c
|
ramstage-y += monotonic_timer.c
|
||||||
ramstage-y += padconfig.c
|
ramstage-y += padconfig.c
|
||||||
|
ramstage-y += ../tegra/apbmisc.c
|
||||||
ramstage-y += ../tegra/gpio.c
|
ramstage-y += ../tegra/gpio.c
|
||||||
ramstage-y += ../tegra/i2c.c
|
ramstage-y += ../tegra/i2c.c
|
||||||
ramstage-y += ../tegra/pinmux.c
|
ramstage-y += ../tegra/pinmux.c
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <vendorcode/google/chromeos/chromeos.h>
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
#include <soc/addressmap.h>
|
#include <soc/addressmap.h>
|
||||||
|
#include <soc/nvidia/tegra/apbmisc.h>
|
||||||
|
|
||||||
static void soc_read_resources(device_t dev)
|
static void soc_read_resources(device_t dev)
|
||||||
{
|
{
|
||||||
@@ -79,7 +80,20 @@ static void enable_tegra132_dev(device_t dev)
|
|||||||
dev->ops = &soc_ops;
|
dev->ops = &soc_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void tegra132_init(void *chip_info)
|
||||||
|
{
|
||||||
|
struct tegra_revision rev;
|
||||||
|
|
||||||
|
tegra_revision_info(&rev);
|
||||||
|
|
||||||
|
printk(BIOS_INFO, "chip %x rev %02x.%x\n",
|
||||||
|
rev.chip_id, rev.major, rev.minor);
|
||||||
|
|
||||||
|
printk(BIOS_INFO, "MTS build %08x\n", raw_read_aidr_el1());
|
||||||
|
}
|
||||||
|
|
||||||
struct chip_operations soc_nvidia_tegra132_ops = {
|
struct chip_operations soc_nvidia_tegra132_ops = {
|
||||||
CHIP_NAME("SOC Nvidia Tegra132")
|
CHIP_NAME("SOC Nvidia Tegra132")
|
||||||
|
.init = tegra132_init,
|
||||||
.enable_dev = enable_tegra132_dev,
|
.enable_dev = enable_tegra132_dev,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user