-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,343 changed files
with
86,304 additions
and
149,532 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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LINUX_VERSION-5.10 = .213 | ||
LINUX_KERNEL_HASH-5.10.213 = 84cf30223239ec3333a5f7b2a7fba2042bba70d1582a139f7543956af871ad80 | ||
LINUX_VERSION-5.10 = .220 | ||
LINUX_KERNEL_HASH-5.10.220 = 7cc3aff924e9707a5dbf1200c79a7f01617e097b9b175d02bda8ca762aeee19b |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LINUX_VERSION-5.15 = .156 | ||
LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778 | ||
LINUX_VERSION-5.15 = .161 | ||
LINUX_KERNEL_HASH-5.15.161 = d629f78680dc4b65e3d78b61406fb7757b960c83c206e63ad8c2606b3e3c474c |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
LINUX_VERSION-5.4 = .272 | ||
LINUX_KERNEL_HASH-5.4.272 = 3599d5959a403e64be407d7f05e56cb270d6ddd154e89a596609919ab1e2e366 | ||
LINUX_VERSION-5.4 = .278 | ||
LINUX_KERNEL_HASH-5.4.278 = e5a00606115545f444ef2766af5652f5539e3c96f46a9778bede89b98ffb8588 |
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
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 |
---|---|---|
|
@@ -13,9 +13,9 @@ PKG_RELEASE:=2 | |
|
||
PKG_SOURCE_PROTO:=git | ||
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git | ||
PKG_SOURCE_DATE:=2023-07-24 | ||
PKG_SOURCE_VERSION:=00ac6db375b76e57e1f5e9e9bffa033e907c3581 | ||
PKG_MIRROR_HASH:=74fc18395532c4292f530da8d00fa1873ada4e05e600c0077a7b7f85ace0d913 | ||
PKG_SOURCE_DATE:=2024-01-17 | ||
PKG_SOURCE_VERSION:=bacca82a8cac369470df052a9d801a0ceb9b74ca | ||
PKG_MIRROR_HASH:=d035c1b63a9bd71d752c90540361b66d290e7cf42dcca73259d0950af3569c79 | ||
|
||
PKG_MAINTAINER:=Daniel Golle <[email protected]> | ||
|
||
|
@@ -94,6 +94,30 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr | |
DDR3_FLYBY:=1 | ||
endef | ||
|
||
define Trusted-Firmware-A/mt7981-nor-ddr4 | ||
NAME:=MediaTek MT7981 (SPI-NOR, DDR4) | ||
BOOT_DEVICE:=nor | ||
BUILD_SUBTARGET:=filogic | ||
PLAT:=mt7981 | ||
DDR_TYPE:=ddr4 | ||
endef | ||
|
||
define Trusted-Firmware-A/mt7981-emmc-ddr4 | ||
NAME:=MediaTek MT7981 (eMMC, DDR4) | ||
BOOT_DEVICE:=emmc | ||
BUILD_SUBTARGET:=filogic | ||
PLAT:=mt7981 | ||
DDR_TYPE:=ddr4 | ||
endef | ||
|
||
define Trusted-Firmware-A/mt7981-spim-nand-ddr4 | ||
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4) | ||
BOOT_DEVICE:=spim-nand | ||
BUILD_SUBTARGET:=filogic | ||
PLAT:=mt7981 | ||
DDR_TYPE:=ddr4 | ||
endef | ||
|
||
define Trusted-Firmware-A/mt7981-nor-ddr3 | ||
NAME:=MediaTek MT7981 (SPI-NOR, DDR3) | ||
BOOT_DEVICE:=nor | ||
|
@@ -349,6 +373,9 @@ TFA_TARGETS:= \ | |
mt7981-sdmmc-ddr3 \ | ||
mt7981-snand-ddr3 \ | ||
mt7981-spim-nand-ddr3 \ | ||
mt7981-emmc-ddr4 \ | ||
mt7981-nor-ddr4 \ | ||
mt7981-spim-nand-ddr4 \ | ||
mt7986-emmc-ddr3 \ | ||
mt7986-nor-ddr3 \ | ||
mt7986-sdmmc-ddr3 \ | ||
|
23 changes: 23 additions & 0 deletions
23
...e/boot/arm-trusted-firmware-mediatek/patches/0001-mediatek-snfi-FM35Q1GA-is-x4-only.patch
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,23 @@ | ||
From fb2a2b669ec9bbf5c448d4b56499bc83de075c93 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Golle <[email protected]> | ||
Date: Thu, 29 Feb 2024 18:01:08 +0000 | ||
Subject: [PATCH 1/3] mediatek: snfi: FM35Q1GA is x4-only | ||
|
||
Dont allow x2 read and cache read operations on FM35Q1GA. | ||
|
||
Signed-off-by: Daniel Golle <[email protected]> | ||
--- | ||
plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c | ||
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c | ||
@@ -423,7 +423,7 @@ static const struct snand_flash_info sna | ||
|
||
SNAND_INFO("FM35Q1GA", SNAND_ID(SNAND_ID_DYMMY, 0xe5, 0x71), | ||
SNAND_MEMORG_1G_2K_64, | ||
- &snand_cap_read_from_cache_x4, | ||
+ &snand_cap_read_from_cache_x4_only, | ||
&snand_cap_program_load_x4), | ||
|
||
SNAND_INFO("PN26G01A", SNAND_ID(SNAND_ID_DYMMY, 0xa1, 0xe1), |
99 changes: 99 additions & 0 deletions
99
...firmware-mediatek/patches/0002-mediatek-snfi-adjust-pin-drive-strength-for-Fidelix-.patch
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,99 @@ | ||
From 6470986f037880ce76960c369d6e5a5270e7ce32 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Golle <[email protected]> | ||
Date: Sun, 10 Mar 2024 15:39:07 +0000 | ||
Subject: [PATCH 2/3] mediatek: snfi: adjust pin drive strength for Fidelix | ||
SPI-NAND | ||
|
||
It seems like we might need to adjust the pin driver strength to 12mA | ||
for Fidelix SPI-NAND chip on MT7622 to avoid SPI data corruption on | ||
some devices. | ||
|
||
Signed-off-by: Daniel Golle <[email protected]> | ||
--- | ||
.../apsoc_common/drivers/snfi/mtk-snand-def.h | 7 +++++ | ||
.../apsoc_common/drivers/snfi/mtk-snand-ids.c | 4 ++- | ||
.../apsoc_common/drivers/snfi/mtk-snand.c | 30 +++++++++++++++++++ | ||
3 files changed, 40 insertions(+), 1 deletion(-) | ||
|
||
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h | ||
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h | ||
@@ -86,6 +86,12 @@ struct snand_mem_org { | ||
|
||
typedef int (*snand_select_die_t)(struct mtk_snand *snf, uint32_t dieidx); | ||
|
||
+enum snand_drv { | ||
+ SNAND_DRV_NO_CHANGE = 0, | ||
+ SNAND_DRV_8mA = 8, | ||
+ SNAND_DRV_12mA = 12, | ||
+}; | ||
+ | ||
struct snand_flash_info { | ||
const char *model; | ||
struct snand_id id; | ||
@@ -93,6 +99,7 @@ struct snand_flash_info { | ||
const struct snand_io_cap *cap_rd; | ||
const struct snand_io_cap *cap_pl; | ||
snand_select_die_t select_die; | ||
+ enum snand_drv drv; | ||
}; | ||
|
||
#define SNAND_INFO(_model, _id, _memorg, _cap_rd, _cap_pl, ...) \ | ||
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c | ||
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c | ||
@@ -424,7 +424,9 @@ static const struct snand_flash_info sna | ||
SNAND_INFO("FM35Q1GA", SNAND_ID(SNAND_ID_DYMMY, 0xe5, 0x71), | ||
SNAND_MEMORG_1G_2K_64, | ||
&snand_cap_read_from_cache_x4_only, | ||
- &snand_cap_program_load_x4), | ||
+ &snand_cap_program_load_x4, | ||
+ NULL, | ||
+ SNAND_DRV_12mA), | ||
|
||
SNAND_INFO("PN26G01A", SNAND_ID(SNAND_ID_DYMMY, 0xa1, 0xe1), | ||
SNAND_MEMORG_1G_2K_128, | ||
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c | ||
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c | ||
@@ -1845,6 +1845,33 @@ static int mtk_snand_id_probe(struct mtk | ||
return -EINVAL; | ||
} | ||
|
||
+#define MT7622_GPIO_BASE (void *)0x10211000 | ||
+#define MT7622_GPIO_DRIV(x) (MT7622_GPIO_BASE + 0x900 + 0x10 * x) | ||
+ | ||
+void mtk_mt7622_snand_adjust_drive(void *dev, enum snand_drv drv) | ||
+{ | ||
+ uint32_t e4, e8; | ||
+ | ||
+ e4 = readl(MT7622_GPIO_DRIV(6)) & ~(0x3f00); | ||
+ e8 = readl(MT7622_GPIO_DRIV(7)) & ~(0x3f00); | ||
+ | ||
+ switch (drv) { | ||
+ case SNAND_DRV_8mA: | ||
+ e4 |= 0x3f00; | ||
+ break; | ||
+ case SNAND_DRV_12mA: | ||
+ e8 |= 0x3f00; | ||
+ break; | ||
+ default: | ||
+ return; | ||
+ } | ||
+ | ||
+ snand_log_chip(dev, "adjusting SPI-NAND pin drive strength to %umA\n", drv); | ||
+ | ||
+ writel(e4, MT7622_GPIO_DRIV(6)); | ||
+ writel(e8, MT7622_GPIO_DRIV(7)); | ||
+} | ||
+ | ||
int mtk_snand_init(void *dev, const struct mtk_snand_platdata *pdata, | ||
struct mtk_snand **psnf) | ||
{ | ||
@@ -1888,6 +1915,9 @@ int mtk_snand_init(void *dev, const stru | ||
if (ret) | ||
return ret; | ||
|
||
+ if (pdata->soc == SNAND_SOC_MT7622 && snand_info->drv) | ||
+ mtk_mt7622_snand_adjust_drive(dev, snand_info->drv); | ||
+ | ||
rawpage_size = snand_info->memorg.pagesize + | ||
snand_info->memorg.sparesize; | ||
|
Oops, something went wrong.