Skip to content

Commit

Permalink
Merge pull request zephyrproject-rtos#17 from ec-platform-sw/ddr_mapping
Browse files Browse the repository at this point in the history
[BUG zephyrproject-rtos#3289]: Map entire 8GB DDR memory
  • Loading branch information
psawargaonkar-edgeq authored Dec 17, 2021
2 parents 4ecb143 + 30c5746 commit cbf71f8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
4 changes: 3 additions & 1 deletion boards/arm64/raptor2/raptor2_a0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@
<0x00 0x64110000 0x0 0x10000>, /* CRSS0 CMU */
<0x00 0x65110000 0x0 0x10000>, /* CRSS1 CMU */
<0x00 0x66110000 0x0 0x10000>, /* CRSS2 CMU */
<0x00 0x67110000 0x0 0x10000>; /* CRSS3 CMU */
<0x00 0x67110000 0x0 0x10000>, /* CRSS3 CMU */
<0x04 0x00000000 0x0 0xC0000000>, /* DDR_1 */
<0x05 0x00000000 0x1 0x00000000>; /* DDR_2 */

status = "okay";
label = "RAPTOR2_MMIO";
Expand Down
4 changes: 3 additions & 1 deletion boards/arm64/raptor2/raptor2_a0_ppu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@
<0x00 0x64110000 0x0 0x10000>, /* CRSS0 CMU */
<0x00 0x65110000 0x0 0x10000>, /* CRSS1 CMU */
<0x00 0x66110000 0x0 0x10000>, /* CRSS2 CMU */
<0x00 0x67110000 0x0 0x10000>; /* CRSS3 CMU */
<0x00 0x67110000 0x0 0x10000>, /* CRSS3 CMU */
<0x04 0x00000000 0x0 0xC0000000>, /* DDR_1 */
<0x05 0x00000000 0x1 0x00000000>; /* DDR_2 */

status = "okay";
label = "RAPTOR2_MMIO";
Expand Down
4 changes: 3 additions & 1 deletion boards/arm64/raptor2/raptor2_protium.dts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@
<0x00 0x64110000 0x0 0x10000>, /* CRSS0 CMU */
<0x00 0x65110000 0x0 0x10000>, /* CRSS1 CMU */
<0x00 0x66110000 0x0 0x10000>, /* CRSS2 CMU */
<0x00 0x67110000 0x0 0x10000>; /* CRSS3 CMU */
<0x00 0x67110000 0x0 0x10000>, /* CRSS3 CMU */
<0x04 0x00000000 0x0 0xC0000000>, /* DDR_1 */
<0x05 0x00000000 0x1 0x00000000>; /* DDR_2 */

status = "okay";
label = "RAPTOR2_MMIO";
Expand Down
4 changes: 3 additions & 1 deletion boards/arm64/raptor2/raptor2_protium_single_ppu.dts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@
<0x00 0x64110000 0x0 0x10000>, /* CRSS0 CMU */
<0x00 0x65110000 0x0 0x10000>, /* CRSS1 CMU */
<0x00 0x66110000 0x0 0x10000>, /* CRSS2 CMU */
<0x00 0x67110000 0x0 0x10000>; /* CRSS3 CMU */
<0x00 0x67110000 0x0 0x10000>, /* CRSS3 CMU */
<0x04 0x00000000 0x0 0xC0000000>, /* DDR_1 */
<0x05 0x00000000 0x1 0x00000000>; /* DDR_2 */

status = "okay";
label = "RAPTOR2_MMIO";
Expand Down
10 changes: 10 additions & 0 deletions soc/arm64/raptor2/mmu_regions.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ static const struct arm_mmu_region mmu_regions[] = {
DT_REG_SIZE_BY_IDX(DT_INST(0, raptor2_mmio), 25),
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),

MMU_REGION_FLAT_ENTRY("DDR_1",
DT_REG_ADDR_BY_IDX(DT_INST(0, raptor2_mmio), 26),
DT_REG_SIZE_BY_IDX(DT_INST(0, raptor2_mmio), 26),
MT_NORMAL | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE),

MMU_REGION_FLAT_ENTRY("DDR_2",
DT_REG_ADDR_BY_IDX(DT_INST(0, raptor2_mmio), 27),
DT_REG_SIZE_BY_IDX(DT_INST(0, raptor2_mmio), 27),
MT_NORMAL | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE),

#else
#error "Please define UART MMU region mapping"
#endif
Expand Down

0 comments on commit cbf71f8

Please sign in to comment.