From 4a24956f3a5d750e4038a317596023478789b692 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Thu, 27 Nov 2025 12:04:12 +0200 Subject: [PATCH] bdk: fuse: allow overriding dram id fuses This should be set before running sdram init. fuse_read_dramid(true) will still return the real id. --- bdk/soc/fuse.c | 14 ++++++++++++++ bdk/soc/fuse.h | 1 + 2 files changed, 15 insertions(+) diff --git a/bdk/soc/fuse.c b/bdk/soc/fuse.c index 60d5355b..5fb2bec1 100644 --- a/bdk/soc/fuse.c +++ b/bdk/soc/fuse.c @@ -89,6 +89,14 @@ u32 fuse_read_odm_keygen_rev() return 0; } +static bool _dramid_8gb = false; + +void fuse_force_8gb_dramid() +{ + // Override fuse DRAM ID with a 8GB ID. + _dramid_8gb = true; +} + u32 fuse_read_dramid(bool raw_id) { bool tegra_t210 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210; @@ -107,11 +115,17 @@ u32 fuse_read_dramid(bool raw_id) { if (dramid > 7) dramid = 0; + + if (_dramid_8gb) + dramid = 7; } else { if (dramid > 34) dramid = 8; + + if (_dramid_8gb) + dramid = 28; } return dramid; diff --git a/bdk/soc/fuse.h b/bdk/soc/fuse.h index 9dc4f6d0..2e5d1c2f 100644 --- a/bdk/soc/fuse.h +++ b/bdk/soc/fuse.h @@ -311,6 +311,7 @@ enum void fuse_disable_program(); u32 fuse_read_odm(u32 idx); u32 fuse_read_odm_keygen_rev(); +void fuse_force_8gb_dramid(); u32 fuse_read_dramid(bool raw_id); u32 fuse_read_hw_state(); u32 fuse_read_hw_type();