
Hi Stephen,
On Mon, Jan 9, 2012 at 3:24 PM, Stephen Warren swarren@nvidia.com wrote:
On 12/26/2011 12:32 PM, Simon Glass wrote:
We want to know which type of chip we are running on - the Tegra family has several SKUs. This can be determined by reading a fuse register, so add this function to ap20.
...
diff --git a/arch/arm/cpu/armv7/tegra2/ap20.c b/arch/arm/cpu/armv7/tegra2/ap20.c
...
+int tegra_get_chip_type(void) +{
- struct fuse_regs *fuse = (struct fuse_regs *)TEGRA2_FUSE_BASE;
- uint tegra_sku_id;
- tegra_sku_id = readl(&fuse->sku_info) & 0xff;
- switch (tegra_sku_id) {
I think this should read/validate/switch-on the SoC ID field too; I assume the SKU IDs can only be interpreted relative to some specific SoC ID.
Chip ID is bits 15:8 of the register APB_MISC + 0x804, and has value 0x20 for Tegra20, 0x30 for Tegra30.
My TRM doesn't mention those values. What version are you referring to? I have v06.
Regards, Simon
-- nvpublic