-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
brom-dump: payloads: add mt6580 SoC support
Besides that, disable the `DA_reset_uart_and_log` call for mt6589 piggyback payload, too.
- Loading branch information
Showing
15 changed files
with
235 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> | ||
|
||
#ifndef H_MT6580_DA_API | ||
#define H_MT6580_DA_API | ||
|
||
#include <stdint.h> | ||
|
||
void (*DA_reset_uart_and_log)() = | ||
( void (*)() ) | ||
(0x00201DC0 + 1); | ||
|
||
void (*DA_putc_wrapper_uart)(uint8_t) = | ||
( void (*)(uint8_t) ) | ||
(0x00201C14 + 1); | ||
void (*DA_print_hex_value)(uint32_t, uint32_t) = | ||
( void (*)(uint32_t, uint32_t) ) | ||
(0x00201C52 + 1); | ||
void (*DA_printf_uart)(uint8_t*, uint32_t, uint32_t, uint32_t) = | ||
( void (*)(uint8_t*, uint32_t, uint32_t, uint32_t) ) | ||
(0x00201C84 + 1); | ||
|
||
void (*DA_io_usb_write)(uint8_t*, uint32_t) = | ||
( void (*)(uint8_t*, uint32_t) ) | ||
(0x0020821C + 1); | ||
uint32_t (*DA_io_usb_readl)() = | ||
( uint32_t (*)() ) | ||
(0x0020841C + 1); | ||
void (*DA_io_usb_writel)(uint32_t) = | ||
( void (*)(uint32_t) ) | ||
(0x00208444 + 1); | ||
|
||
#endif // H_MT6580_DA_API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> | ||
|
||
#ifndef H_MT6580_HW_API | ||
#define H_MT6580_HW_API | ||
|
||
#define HW_reg_chip_id 0x08000000 | ||
#define HW_reg_uart0_base 0x11005000 | ||
#define HW_reg_uart1_base 0x11006000 | ||
// mt6580 has only 2 UARTs, lets fall back to the first one to avoid | ||
// breaking define statements which could become a nasty surprise | ||
#define HW_reg_uart2_base 0x11005000 | ||
#define HW_reg_uart3_base 0x11005000 | ||
|
||
#define MEM_brom_start 0x00000000 | ||
#define MEM_brom_length 0x10000 | ||
#define MEM_sram_start 0x100000 | ||
#define MEM_sram_length 0x12000 | ||
#define MEM_da_start 0x200000 | ||
#define MEM_da_length 0x20000 | ||
|
||
#endif // H_MT6580_HW_API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@ SPDX-License-Identifier: GPL-3.0-only | ||
@ SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> | ||
|
||
@ derived from the original mt6580 DA, see 0x00200084 | ||
.equ MEM_stack_base, 0x10FFF0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* SPDX-License-Identifier: GPL-3.0-only */ | ||
/* SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> */ | ||
|
||
MEMORY | ||
{ | ||
DA_RAM (IWX) : ORIGIN = 0x200000, LENGTH = 0x800 | ||
} | ||
|
||
INCLUDE payload.ld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.