Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
82262970
Commit
82262970
authored
Nov 22, 2019
by
joanna.farley
Committed by
TrustedFirmware Code Review
Nov 22, 2019
Browse files
Merge "mediatek: mt8183: switch PLL/CLKSQ/ck_off/axi_26m control to SPM" into integration
parents
0ff3fb32
658cb072
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/mediatek/mt8183/drivers/spm/spm.c
View file @
82262970
...
...
@@ -12,6 +12,21 @@
DEFINE_BAKERY_LOCK
(
spm_lock
);
/* CLK_SCP_CFG_0 */
#define SPM_CK_OFF_CONTROL (0x3FF)
/* CLK_SCP_CFG_1 */
#define SPM_AXI_26M_SEL (0x1)
/* AP_PLL_CON3 */
#define SPM_PLL_CONTROL (0x7FAAAAF)
/* AP_PLL_CON4 */
#define SPM_PLL_OUT_OFF_CONTROL (0xFA0A)
/* AP_PLL_CON6 */
#define PLL_DLY (0x20000)
const
char
*
wakeup_src_str
[
32
]
=
{
[
0
]
=
"R12_PCM_TIMER"
,
[
1
]
=
"R12_SSPM_WDT_EVENT_B"
,
...
...
@@ -324,5 +339,14 @@ void spm_boot_init(void)
spm_lock_init
();
mt_spm_pmic_wrap_set_phase
(
PMIC_WRAP_PHASE_ALLINONE
);
/* switch ck_off/axi_26m control to SPM */
mmio_setbits_32
(
CLK_SCP_CFG_0
,
SPM_CK_OFF_CONTROL
);
mmio_setbits_32
(
CLK_SCP_CFG_1
,
SPM_AXI_26M_SEL
);
/* switch PLL/CLKSQ control to SPM */
mmio_clrbits_32
(
AP_PLL_CON3
,
SPM_PLL_CONTROL
);
mmio_clrbits_32
(
AP_PLL_CON4
,
SPM_PLL_OUT_OFF_CONTROL
);
mmio_clrbits_32
(
AP_PLL_CON6
,
PLL_DLY
);
NOTICE
(
"%s() end
\n
"
,
__func__
);
}
plat/mediatek/mt8183/include/platform_def.h
View file @
82262970
...
...
@@ -39,7 +39,14 @@
#define INFRACFG_AO_BASE (IO_PHYS + 0x1000)
#define TOPCKGEN_BASE (IO_PHYS + 0x0)
#define CLK_SCP_CFG_0 (TOPCKGEN_BASE + 0x200)
#define CLK_SCP_CFG_1 (TOPCKGEN_BASE + 0x204)
#define APMIXEDSYS (IO_PHYS + 0xC000)
#define AP_PLL_CON3 (APMIXEDSYS + 0xC)
#define AP_PLL_CON4 (APMIXEDSYS + 0x10)
#define AP_PLL_CON6 (APMIXEDSYS + 0x18)
#define ARMPLL_LL_CON0 (APMIXEDSYS + 0x200)
#define ARMPLL_L_CON0 (APMIXEDSYS + 0x210)
#define ARMPLL_L_PWR_CON0 (APMIXEDSYS + 0x21c)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment