mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
bpmp: Reduce freq to 589MHz
3 users had issues with 602MHz. This will probably bring the SoC binning compatibility to 100%. Additionally, make it easy to change default boost frequency. The tiny loss in perf, will be mitigated in Nyx. (It's actually even faster)
This commit is contained in:
parent
bc7dec2e61
commit
0b45a5a11a
8 changed files with 26 additions and 18 deletions
|
@ -1282,7 +1282,7 @@ void ipl_main()
|
||||||
//display_backlight_brightness(h_cfg.backlight, 1000);
|
//display_backlight_brightness(h_cfg.backlight, 1000);
|
||||||
|
|
||||||
// Overclock BPMP.
|
// Overclock BPMP.
|
||||||
bpmp_clk_rate_set(BPMP_CLK_SUPER_BOOST);
|
bpmp_clk_rate_set(BPMP_CLK_DEFAULT_BOOST);
|
||||||
|
|
||||||
// Check if we had a panic while in CFW.
|
// Check if we had a panic while in CFW.
|
||||||
secmon_exo_check_panic();
|
secmon_exo_check_panic();
|
||||||
|
|
|
@ -282,7 +282,7 @@ out:;
|
||||||
clock_disable_sor_safe();
|
clock_disable_sor_safe();
|
||||||
clock_disable_tsec();
|
clock_disable_tsec();
|
||||||
bpmp_mmu_enable();
|
bpmp_mmu_enable();
|
||||||
bpmp_clk_rate_set(BPMP_CLK_SUPER_BOOST);
|
bpmp_clk_rate_set(BPMP_CLK_DEFAULT_BOOST);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,10 +155,11 @@ void bpmp_mmu_disable()
|
||||||
|
|
||||||
const u8 pllc4_divn[] = {
|
const u8 pllc4_divn[] = {
|
||||||
0, // BPMP_CLK_NORMAL: 408MHz 0% - 136MHz APB.
|
0, // BPMP_CLK_NORMAL: 408MHz 0% - 136MHz APB.
|
||||||
85, // BPMP_CLK_LOW_BOOST: 544MHz 33% - 136MHz APB.
|
85, // BPMP_CLK_HIGH_BOOST: 544MHz 33% - 136MHz APB.
|
||||||
90, // BPMP_CLK_MID_BOOST: 576MHz 41% - 144MHz APB.
|
90, // BPMP_CLK_SUPER_BOOST: 576MHz 41% - 144MHz APB.
|
||||||
94 // BPMP_CLK_SUPER_BOOST: 602MHz 48% - 150MHz APB.
|
92 // BPMP_CLK_HYPER_BOOST: 589MHz 44% - 147MHz APB.
|
||||||
//95 // BPMP_CLK_SUPER_BOOST: 608MHz 49% - 152MHz APB.
|
// Do not use for public releases!
|
||||||
|
//95 // BPMP_CLK_DEV_BOOST: 608MHz 49% - 152MHz APB.
|
||||||
};
|
};
|
||||||
|
|
||||||
bpmp_freq_t bpmp_clock_set = BPMP_CLK_NORMAL;
|
bpmp_freq_t bpmp_clock_set = BPMP_CLK_NORMAL;
|
||||||
|
|
|
@ -36,12 +36,15 @@ typedef struct _bpmp_mmu_entry_t
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
BPMP_CLK_NORMAL, // 408MHz 0% - 136MHz APB.
|
BPMP_CLK_NORMAL, // 408MHz 0% - 136MHz APB.
|
||||||
BPMP_CLK_LOW_BOOST, // 544MHz 33% - 136MHz APB.
|
BPMP_CLK_HIGH_BOOST, // 544MHz 33% - 136MHz APB.
|
||||||
BPMP_CLK_MID_BOOST, // 576MHz 41% - 144MHz APB.
|
BPMP_CLK_SUPER_BOOST, // 576MHz 41% - 144MHz APB.
|
||||||
BPMP_CLK_SUPER_BOOST, // 608MHz 49% - 152MHz APB.
|
BPMP_CLK_HYPER_BOOST, // 589MHz 44% - 147MHz APB.
|
||||||
|
//BPMP_CLK_DEV_BOOST, // 608MHz 49% - 152MHz APB.
|
||||||
BPMP_CLK_MAX
|
BPMP_CLK_MAX
|
||||||
} bpmp_freq_t;
|
} bpmp_freq_t;
|
||||||
|
|
||||||
|
#define BPMP_CLK_DEFAULT_BOOST BPMP_CLK_HYPER_BOOST
|
||||||
|
|
||||||
void bpmp_mmu_maintenance(u32 op, bool force);
|
void bpmp_mmu_maintenance(u32 op, bool force);
|
||||||
void bpmp_mmu_set_entry(int idx, bpmp_mmu_entry_t *entry, bool apply);
|
void bpmp_mmu_set_entry(int idx, bpmp_mmu_entry_t *entry, bool apply);
|
||||||
void bpmp_mmu_enable();
|
void bpmp_mmu_enable();
|
||||||
|
|
|
@ -364,7 +364,7 @@ void load_saved_configuration()
|
||||||
void nyx_init_load_res()
|
void nyx_init_load_res()
|
||||||
{
|
{
|
||||||
bpmp_mmu_enable();
|
bpmp_mmu_enable();
|
||||||
bpmp_clk_rate_set(BPMP_CLK_SUPER_BOOST);
|
bpmp_clk_rate_set(BPMP_CLK_DEFAULT_BOOST);
|
||||||
|
|
||||||
// Set bootloader's default configuration.
|
// Set bootloader's default configuration.
|
||||||
set_default_configuration();
|
set_default_configuration();
|
||||||
|
|
|
@ -282,7 +282,7 @@ out:;
|
||||||
clock_disable_sor_safe();
|
clock_disable_sor_safe();
|
||||||
clock_disable_tsec();
|
clock_disable_tsec();
|
||||||
bpmp_mmu_enable();
|
bpmp_mmu_enable();
|
||||||
bpmp_clk_rate_set(BPMP_CLK_SUPER_BOOST);
|
bpmp_clk_rate_set(BPMP_CLK_DEFAULT_BOOST);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,10 +158,11 @@ void bpmp_mmu_disable()
|
||||||
|
|
||||||
const u8 pllc4_divn[] = {
|
const u8 pllc4_divn[] = {
|
||||||
0, // BPMP_CLK_NORMAL: 408MHz 0% - 136MHz APB.
|
0, // BPMP_CLK_NORMAL: 408MHz 0% - 136MHz APB.
|
||||||
85, // BPMP_CLK_LOW_BOOST: 544MHz 33% - 136MHz APB.
|
85, // BPMP_CLK_HIGH_BOOST: 544MHz 33% - 136MHz APB.
|
||||||
90, // BPMP_CLK_MID_BOOST: 576MHz 41% - 144MHz APB.
|
90, // BPMP_CLK_SUPER_BOOST: 576MHz 41% - 144MHz APB.
|
||||||
94 // BPMP_CLK_SUPER_BOOST: 602MHz 48% - 150MHz APB.
|
92 // BPMP_CLK_HYPER_BOOST: 589MHz 44% - 147MHz APB.
|
||||||
//95 // BPMP_CLK_SUPER_BOOST: 608MHz 49% - 152MHz APB.
|
// Do not use for public releases!
|
||||||
|
//95 // BPMP_CLK_DEV_BOOST: 608MHz 49% - 152MHz APB.
|
||||||
};
|
};
|
||||||
|
|
||||||
bpmp_freq_t bpmp_clock_set = BPMP_CLK_NORMAL;
|
bpmp_freq_t bpmp_clock_set = BPMP_CLK_NORMAL;
|
||||||
|
|
|
@ -36,12 +36,15 @@ typedef struct _bpmp_mmu_entry_t
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
BPMP_CLK_NORMAL, // 408MHz 0% - 136MHz APB.
|
BPMP_CLK_NORMAL, // 408MHz 0% - 136MHz APB.
|
||||||
BPMP_CLK_LOW_BOOST, // 544MHz 33% - 136MHz APB.
|
BPMP_CLK_HIGH_BOOST, // 544MHz 33% - 136MHz APB.
|
||||||
BPMP_CLK_MID_BOOST, // 576MHz 41% - 144MHz APB.
|
BPMP_CLK_SUPER_BOOST, // 576MHz 41% - 144MHz APB.
|
||||||
BPMP_CLK_SUPER_BOOST, // 608MHz 49% - 152MHz APB.
|
BPMP_CLK_HYPER_BOOST, // 589MHz 44% - 147MHz APB.
|
||||||
|
//BPMP_CLK_DEV_BOOST, // 608MHz 49% - 152MHz APB.
|
||||||
BPMP_CLK_MAX
|
BPMP_CLK_MAX
|
||||||
} bpmp_freq_t;
|
} bpmp_freq_t;
|
||||||
|
|
||||||
|
#define BPMP_CLK_DEFAULT_BOOST BPMP_CLK_HYPER_BOOST
|
||||||
|
|
||||||
void bpmp_mmu_maintenance(u32 op, bool force);
|
void bpmp_mmu_maintenance(u32 op, bool force);
|
||||||
void bpmp_mmu_set_entry(int idx, bpmp_mmu_entry_t *entry, bool apply);
|
void bpmp_mmu_set_entry(int idx, bpmp_mmu_entry_t *entry, bool apply);
|
||||||
void bpmp_mmu_enable();
|
void bpmp_mmu_enable();
|
||||||
|
|
Loading…
Reference in a new issue