Merge Offcial Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
e8c6664a26
@ -231,6 +231,27 @@ define Build/buffalo-tag-dhp
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/buffalo-trx
|
||||
$(eval magic=$(word 1,$(1)))
|
||||
$(eval kern_bin=$(if $(1),$(IMAGE_KERNEL),$@))
|
||||
$(eval rtfs_bin=$(word 2,$(1)))
|
||||
$(eval apnd_bin=$(word 3,$(1)))
|
||||
$(eval kern_size=$(if $(KERNEL_SIZE),$(KERNEL_SIZE),0x400000))
|
||||
|
||||
$(if $(rtfs_bin),touch $(rtfs_bin))
|
||||
$(STAGING_DIR_HOST)/bin/otrx create $@.new \
|
||||
$(if $(magic),-M $(magic),) \
|
||||
-f $(kern_bin) \
|
||||
$(if $(rtfs_bin),\
|
||||
-a 0x20000 \
|
||||
-b $$(( $(call exp_units,$(kern_size)) )) \
|
||||
-f $(rtfs_bin),) \
|
||||
$(if $(apnd_bin),\
|
||||
-A $(apnd_bin) \
|
||||
-a 0x20000)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/check-size
|
||||
@imagesize="$$(stat -c%s $@)"; \
|
||||
limitsize="$$(($(call exp_units,$(if $(1),$(1),$(IMAGE_SIZE)))))"; \
|
||||
@ -430,12 +451,18 @@ define Build/jffs2
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/kernel2minor
|
||||
$(eval temp_file := $(shell mktemp))
|
||||
cp $@ $(temp_file)
|
||||
kernel2minor -k $(temp_file) -r $(temp_file).new $(1)
|
||||
mv $(temp_file).new $@
|
||||
rm -f $(temp_file)
|
||||
define Build/yaffs-filesystem
|
||||
let \
|
||||
kernel_size="$$(stat -c%s $@)" \
|
||||
kernel_chunks="(kernel_size / 1024) + 1" \
|
||||
filesystem_chunks="kernel_chunks + 3" \
|
||||
filesystem_blocks="(filesystem_chunks / 63) + 1" \
|
||||
filesystem_size="filesystem_blocks * 64 * 1024" \
|
||||
filesystem_size_with_reserve="(filesystem_blocks + 2) * 64 * 1024"; \
|
||||
head -c $$filesystem_size_with_reserve /dev/zero | tr "\000" "\377" > $@.img \
|
||||
&& yafut -d $@.img -w -i $@ -o kernel -C 1040 -B 64k -E -P -S $(1) \
|
||||
&& truncate -s $$filesystem_size $@.img \
|
||||
&& mv $@.img $@
|
||||
endef
|
||||
|
||||
define Build/kernel-bin
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=arm-trusted-firmware-mediatek
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
|
||||
PKG_SOURCE_DATE:=2023-10-13
|
||||
PKG_SOURCE_VERSION:=0ea67d76ae8be127c91caa3fcdf449b1fe533175
|
||||
PKG_MIRROR_HASH:=22579fae08de942e0d5a420cfaa0b1d310dc9431e85b7e28a3c3ef08331a199d
|
||||
PKG_SOURCE_DATE:=2024-01-17
|
||||
PKG_SOURCE_VERSION:=bacca82a8cac369470df052a9d801a0ceb9b74ca
|
||||
PKG_MIRROR_HASH:=1138649f64ac3982330925c38c795ca6860289adbd95755991f80afa30ebdea7
|
||||
|
||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
From fb2a2b669ec9bbf5c448d4b56499bc83de075c93 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
---
|
||||
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),
|
||||
@ -0,0 +1,99 @@
|
||||
From 6470986f037880ce76960c369d6e5a5270e7ce32 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
---
|
||||
.../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;
|
||||
|
||||
@ -0,0 +1,135 @@
|
||||
From 40a3661bebb3d738ab95b7de66e9d8382d5b9ab1 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Golle <daniel@makrotopia.org>
|
||||
Date: Sun, 10 Mar 2024 17:48:09 +0000
|
||||
Subject: [PATCH 3/3] mediatek: snfi: adjust drive strength to 12mA like old
|
||||
loader does
|
||||
|
||||
In addition to FM35X1GA, also change the driver strength to 12mA for
|
||||
all chips where this is done by the old/legacy U-Boot:
|
||||
* Winbond 512Mb
|
||||
* Winbond 1Gb
|
||||
* Winbond 2Gb
|
||||
* GD5F4GQ4UBYIG
|
||||
* GD5F4GQ4UAYIG
|
||||
* GD5F1GQ4UX
|
||||
* GD5F1GQ4UE
|
||||
* GD5F2GQ4UX
|
||||
* GD5F2GQ4UE
|
||||
|
||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
---
|
||||
.../apsoc_common/drivers/snfi/mtk-snand-ids.c | 59 ++++++++++++++-----
|
||||
1 file changed, 44 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
|
||||
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
|
||||
@@ -80,65 +80,94 @@ static const struct snand_flash_info sna
|
||||
SNAND_INFO("W25N512GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x20),
|
||||
SNAND_MEMORG_512M_2K_64,
|
||||
&snand_cap_read_from_cache_quad,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("W25N01GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x21),
|
||||
SNAND_MEMORG_1G_2K_64,
|
||||
&snand_cap_read_from_cache_quad,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("W25M02GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xab, 0x21),
|
||||
SNAND_MEMORG_2G_2K_64_2D,
|
||||
&snand_cap_read_from_cache_quad,
|
||||
&snand_cap_program_load_x4,
|
||||
- mtk_snand_winbond_select_die),
|
||||
+ mtk_snand_winbond_select_die,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("W25N02KV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x22),
|
||||
SNAND_MEMORG_2G_2K_128,
|
||||
&snand_cap_read_from_cache_quad,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
|
||||
SNAND_INFO("GD5F1GQ4UAWxx", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0x10),
|
||||
SNAND_MEMORG_1G_2K_64,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F1GQ4UExIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd1),
|
||||
SNAND_MEMORG_1G_2K_128,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F1GQ4UExxH", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd9),
|
||||
SNAND_MEMORG_1G_2K_64,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F1GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf1),
|
||||
SNAND_MEMORG_1G_2K_64,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F2GQ4UExIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd2),
|
||||
SNAND_MEMORG_2G_2K_128,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F2GQ5UExxH", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0x32),
|
||||
SNAND_MEMORG_2G_2K_64,
|
||||
&snand_cap_read_from_cache_quad_a8d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F2GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf2),
|
||||
SNAND_MEMORG_2G_2K_64,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F4GQ4UBxIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd4),
|
||||
SNAND_MEMORG_4G_4K_256,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F4GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf4),
|
||||
SNAND_MEMORG_4G_2K_64,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F2GQ5UExxG", SNAND_ID(SNAND_ID_DYMMY, 0xc8, 0x52),
|
||||
SNAND_MEMORG_2G_2K_128,
|
||||
&snand_cap_read_from_cache_quad_a8d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
SNAND_INFO("GD5F4GQ4UCxIG", SNAND_ID(SNAND_ID_DYMMY, 0xc8, 0xb4),
|
||||
SNAND_MEMORG_4G_4K_256,
|
||||
&snand_cap_read_from_cache_quad_q2d,
|
||||
- &snand_cap_program_load_x4),
|
||||
+ &snand_cap_program_load_x4,
|
||||
+ NULL,
|
||||
+ SNAND_DRV_12mA),
|
||||
|
||||
SNAND_INFO("MX35LF1GE4AB", SNAND_ID(SNAND_ID_DYMMY, 0xc2, 0x12),
|
||||
SNAND_MEMORG_1G_2K_64,
|
||||
@ -1217,7 +1217,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
|
||||
+
|
||||
+ 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),
|
||||
|
||||
@ -3844,9 +3844,9 @@
|
||||
+bootcmd=run check_button ; run led_start ; mtd read recovery ${loadaddr} ; bootm ; run led_loop_error
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-openwrt_one-initramfs.itb
|
||||
+bootfile_bl2_nor=openwrt-mediatek-filogic-openwrt_one-nor-preloader.bin
|
||||
+bootfile_fip_nor=openwrt-mediatek-filogic-openwrt_one-nor-bl31-uboot.fip
|
||||
+bootfile=immortalwrt-mediatek-filogic-openwrt_one-initramfs.itb
|
||||
+bootfile_bl2_nor=immortalwrt-mediatek-filogic-openwrt_one-nor-preloader.bin
|
||||
+bootfile_fip_nor=immortalwrt-mediatek-filogic-openwrt_one-nor-bl31-uboot.fip
|
||||
+bootmenu_0=Initialize environment.=run _firstboot
|
||||
+bootmenu_0d=Run default boot command.=run bootcmd
|
||||
+bootmenu_1=Boot system via TFTP.=run tftp_boot ; run bootmenu_confirm_return
|
||||
@ -3871,8 +3871,8 @@
|
||||
+led_start=led green off ; led red off; led white on
|
||||
+loadaddr=0x46000000
|
||||
+preboot=run led_boot
|
||||
+recoverfile_bl2=openwrt-mediatek-filogic-openwrt_one-snand-preloader.bin
|
||||
+recoverfile_ubi=openwrt-mediatek-filogic-openwrt_one-factory.ubi
|
||||
+recoverfile_bl2=immortalwrt-mediatek-filogic-openwrt_one-snand-preloader.bin
|
||||
+recoverfile_ubi=immortalwrt-mediatek-filogic-openwrt_one-factory.ubi
|
||||
+recovery_write_bl2=mtd erase bl2 && for offset in 0x0 0x40000 0x80000; do mtd write bl2 $loadaddr $offset 0x40000 ; done
|
||||
+recovery_write_ubi=mtd erase ubi && mtd write ubi $loadaddr 0 ${filesize}
|
||||
+serverip=192.168.11.23
|
||||
@ -3895,10 +3895,10 @@
|
||||
+bootcmd=run check_buttons ; run led_start ; run boot_calibration ; run boot_production ; run boot_recovery
|
||||
+bootconf=config-1
|
||||
+bootdelay=0
|
||||
+bootfile=openwrt-mediatek-filogic-openwrt_one-initramfs.itb
|
||||
+bootfile_bl2=openwrt-mediatek-filogic-openwrt_one-snand-preloader.bin
|
||||
+bootfile_fip=openwrt-mediatek-filogic-openwrt_one-snand-bl31-uboot.fip
|
||||
+bootfile_upg=openwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb
|
||||
+bootfile=immortalwrt-mediatek-filogic-openwrt_one-initramfs.itb
|
||||
+bootfile_bl2=immortalwrt-mediatek-filogic-openwrt_one-snand-preloader.bin
|
||||
+bootfile_fip=immortalwrt-mediatek-filogic-openwrt_one-snand-bl31-uboot.fip
|
||||
+bootfile_upg=immortalwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb
|
||||
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; run led_boot ; bootmenu 60
|
||||
+bootmenu_default=0
|
||||
+bootmenu_delay=0
|
||||
|
||||
@ -572,253 +572,6 @@ endef
|
||||
$(eval $(call KernelPackage,bcma))
|
||||
|
||||
|
||||
define KernelPackage/rtc-ds1307
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c +kmod-hwmon-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_DS1307 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1307.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-ds1307)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-ds1307/description
|
||||
Kernel module for Dallas/Maxim DS1307/DS1337/DS1338/DS1340/DS1388/DS3231,
|
||||
Epson RX-8025 and various other compatible RTC chips connected via I2C.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-ds1307))
|
||||
|
||||
|
||||
define KernelPackage/rtc-ds1374
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Dallas/Maxim DS1374 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_DS1374 \
|
||||
CONFIG_RTC_DRV_DS1374_WDT=n \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1374.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-ds1374)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-ds1374/description
|
||||
Kernel module for Dallas/Maxim DS1374.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-ds1374))
|
||||
|
||||
|
||||
define KernelPackage/rtc-ds1672
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Dallas/Maxim DS1672 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_DS1672 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1672.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-ds1672)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-ds1672/description
|
||||
Kernel module for Dallas/Maxim DS1672 RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-ds1672))
|
||||
|
||||
|
||||
define KernelPackage/rtc-em3027
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Microelectronic EM3027 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_EM3027 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-em3027.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-em3027)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-em3027/description
|
||||
Kernel module for Microelectronic EM3027 RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-em3027))
|
||||
|
||||
|
||||
define KernelPackage/rtc-isl1208
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Intersil ISL1208 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_ISL1208 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-isl1208.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-isl1208)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-isl1208/description
|
||||
Kernel module for Intersil ISL1208 RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-isl1208))
|
||||
|
||||
|
||||
define KernelPackage/rtc-mv
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Marvell SoC RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
KCONFIG:=CONFIG_RTC_DRV_MV \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-mv.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-mv)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-mv/description
|
||||
Kernel module for Marvell SoC RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-mv))
|
||||
|
||||
|
||||
define KernelPackage/rtc-pcf8563
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Philips PCF8563/Epson RTC8564 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_PCF8563 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf8563.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pcf8563)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pcf8563/description
|
||||
Kernel module for Philips PCF8563 RTC chip.
|
||||
The Epson RTC8564 should work as well.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf8563))
|
||||
|
||||
|
||||
define KernelPackage/rtc-pcf2123
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Philips PCF2123 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_RTC_DRV_PCF2123 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2123.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pcf2123)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pcf2123/description
|
||||
Kernel module for Philips PCF2123 RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf2123))
|
||||
|
||||
define KernelPackage/rtc-pcf2127
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=NXP PCF2127 and PCF2129 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core +kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_RTC_DRV_PCF2127 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2127.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pcf2127)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pcf2127/description
|
||||
Kernel module for NXP PCF2127 and PCF2129 RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf2127))
|
||||
|
||||
define KernelPackage/rtc-r7301
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Epson RTC7301 support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-regmap-mmio
|
||||
KCONFIG:=CONFIG_RTC_DRV_R7301 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-r7301.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-r7301)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-r7301/description
|
||||
Kernel module for Epson RTC7301 RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-r7301))
|
||||
|
||||
define KernelPackage/rtc-rs5c372a
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_RS5C372 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rs5c372.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-rs5c372,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-rs5c372a/description
|
||||
Kernel module for Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A RTC on chip module
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-rs5c372a))
|
||||
|
||||
define KernelPackage/rtc-rx8025
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Epson RX-8025 / RX-8035
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_RX8025 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rx8025.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-rx8025,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-rx8025/description
|
||||
Kernel module for Epson RX-8025 and RX-8035 I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-rx8025))
|
||||
|
||||
define KernelPackage/rtc-s35390a
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Seico S-35390A
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_S35390A \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-s35390a.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-s35390a,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-s35390a/description
|
||||
Kernel module for Seiko Instruments S-35390A I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-s35390a))
|
||||
|
||||
define KernelPackage/rtc-x1205
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=Xicor Intersil X1205
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_X1205 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-x1205.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-x1205)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-x1205/description
|
||||
Kernel module for Xicor Intersil X1205 I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-x1205))
|
||||
|
||||
define KernelPackage/mtdtests
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=MTD subsystem tests
|
||||
|
||||
255
package/kernel/linux/modules/rtc.mk
Normal file
255
package/kernel/linux/modules/rtc.mk
Normal file
@ -0,0 +1,255 @@
|
||||
#
|
||||
# Copyright (C) 2006-2024 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
RTC_MENU:=RTC Real-Time Clock Support
|
||||
|
||||
define KernelPackage/rtc-ds1307
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c +kmod-hwmon-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_DS1307 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1307.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-ds1307)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-ds1307/description
|
||||
Kernel module for Dallas/Maxim DS1307/DS1337/DS1338/DS1340/DS1388/DS3231,
|
||||
Epson RX-8025 and various other compatible RTC chips connected via I2C.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-ds1307))
|
||||
|
||||
|
||||
define KernelPackage/rtc-ds1374
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Dallas/Maxim DS1374 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_DS1374 \
|
||||
CONFIG_RTC_DRV_DS1374_WDT=n \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1374.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-ds1374)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-ds1374/description
|
||||
Kernel module for Dallas/Maxim DS1374.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-ds1374))
|
||||
|
||||
|
||||
define KernelPackage/rtc-ds1672
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Dallas/Maxim DS1672 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_DS1672 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1672.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-ds1672)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-ds1672/description
|
||||
Kernel module for Dallas/Maxim DS1672 RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-ds1672))
|
||||
|
||||
|
||||
define KernelPackage/rtc-em3027
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Microelectronic EM3027 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_EM3027 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-em3027.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-em3027)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-em3027/description
|
||||
Kernel module for Microelectronic EM3027 RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-em3027))
|
||||
|
||||
|
||||
define KernelPackage/rtc-isl1208
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Intersil ISL1208 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_ISL1208 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-isl1208.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-isl1208)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-isl1208/description
|
||||
Kernel module for Intersil ISL1208 RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-isl1208))
|
||||
|
||||
|
||||
define KernelPackage/rtc-mv
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Marvell SoC RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
KCONFIG:=CONFIG_RTC_DRV_MV \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-mv.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-mv)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-mv/description
|
||||
Kernel module for Marvell SoC RTC.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-mv))
|
||||
|
||||
|
||||
define KernelPackage/rtc-pcf8563
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Philips PCF8563/Epson RTC8564 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_PCF8563 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf8563.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pcf8563)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pcf8563/description
|
||||
Kernel module for Philips PCF8563 RTC chip.
|
||||
The Epson RTC8564 should work as well.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf8563))
|
||||
|
||||
|
||||
define KernelPackage/rtc-pcf2123
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Philips PCF2123 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_RTC_DRV_PCF2123 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2123.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pcf2123)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pcf2123/description
|
||||
Kernel module for Philips PCF2123 RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf2123))
|
||||
|
||||
define KernelPackage/rtc-pcf2127
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=NXP PCF2127 and PCF2129 RTC support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core +kmod-regmap-spi
|
||||
KCONFIG:=CONFIG_RTC_DRV_PCF2127 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2127.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-pcf2127)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-pcf2127/description
|
||||
Kernel module for NXP PCF2127 and PCF2129 RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-pcf2127))
|
||||
|
||||
define KernelPackage/rtc-r7301
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Epson RTC7301 support
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-regmap-mmio
|
||||
KCONFIG:=CONFIG_RTC_DRV_R7301 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-r7301.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-r7301)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-r7301/description
|
||||
Kernel module for Epson RTC7301 RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-r7301))
|
||||
|
||||
define KernelPackage/rtc-rs5c372a
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_RS5C372 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rs5c372.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-rs5c372,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-rs5c372a/description
|
||||
Kernel module for Ricoh R2025S/D, RS5C372A/B, RV5C386, RV5C387A RTC on chip module
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-rs5c372a))
|
||||
|
||||
define KernelPackage/rtc-rx8025
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Epson RX-8025 / RX-8035
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_RX8025 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rx8025.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-rx8025,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-rx8025/description
|
||||
Kernel module for Epson RX-8025 and RX-8035 I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-rx8025))
|
||||
|
||||
define KernelPackage/rtc-s35390a
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Seico S-35390A
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_S35390A \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-s35390a.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,rtc-s35390a,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-s35390a/description
|
||||
Kernel module for Seiko Instruments S-35390A I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-s35390a))
|
||||
|
||||
define KernelPackage/rtc-x1205
|
||||
SUBMENU:=$(RTC_MENU)
|
||||
TITLE:=Xicor Intersil X1205
|
||||
DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
KCONFIG:=CONFIG_RTC_DRV_X1205 \
|
||||
CONFIG_RTC_CLASS=y
|
||||
FILES:=$(LINUX_DIR)/drivers/rtc/rtc-x1205.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtc-x1205)
|
||||
endef
|
||||
|
||||
define KernelPackage/rtc-x1205/description
|
||||
Kernel module for Xicor Intersil X1205 I2C RTC chip
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,rtc-x1205))
|
||||
@ -459,7 +459,8 @@ define KernelPackage/drm-imx
|
||||
CONFIG_DRM_IMX_LDB=n \
|
||||
CONFIG_DRM_IMX_HDMI=n
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/imxdrm.ko@lt6.6 \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/ipuv3/imxdrm.ko@ge6.6 \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_dma_helper.ko@ge6.1 \
|
||||
$(LINUX_DIR)/drivers/gpu/ipu-v3/imx-ipu-v3.ko
|
||||
AUTOLOAD:=$(call AutoLoad,08,imxdrm imx-ipu-v3 imx-ipuv3-crtc)
|
||||
@ -474,14 +475,15 @@ $(eval $(call KernelPackage,drm-imx))
|
||||
define KernelPackage/drm-imx-hdmi
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=Freescale i.MX HDMI DRM support
|
||||
DEPENDS:=+kmod-sound-core kmod-drm-imx +LINUX_6_1:kmod-drm-display-helper
|
||||
DEPENDS:=+kmod-sound-core kmod-drm-imx kmod-drm-display-helper
|
||||
KCONFIG:=CONFIG_DRM_IMX_HDMI \
|
||||
CONFIG_DRM_DW_HDMI_AHB_AUDIO \
|
||||
CONFIG_DRM_DW_HDMI_I2S_AUDIO
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/bridge/synopsys/dw-hdmi.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/dw_hdmi-imx.ko
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/dw_hdmi-imx.ko@lt6.6 \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.ko@ge6.6
|
||||
AUTOLOAD:=$(call AutoLoad,08,dw-hdmi dw-hdmi-ahb-audio.ko dw_hdmi-imx)
|
||||
endef
|
||||
|
||||
@ -494,7 +496,7 @@ $(eval $(call KernelPackage,drm-imx-hdmi))
|
||||
define KernelPackage/drm-imx-ldb
|
||||
SUBMENU:=$(VIDEO_MENU)
|
||||
TITLE:=Freescale i.MX LVDS DRM support
|
||||
DEPENDS:=@(TARGET_imx&&!TARGET_imx_cortexa53) +kmod-backlight kmod-drm-imx
|
||||
DEPENDS:=@(TARGET_imx&&TARGET_imx_cortexa9) +kmod-backlight kmod-drm-imx
|
||||
KCONFIG:=CONFIG_DRM_IMX_LDB \
|
||||
CONFIG_DRM_PANEL_SIMPLE \
|
||||
CONFIG_DRM_PANEL=y \
|
||||
@ -505,7 +507,8 @@ define KernelPackage/drm-imx-ldb
|
||||
CONFIG_DRM_PANEL_LVDS=n \
|
||||
CONFIG_DRM_PANEL_S6E8AA0=n \
|
||||
CONFIG_DRM_PANEL_SITRONIX_ST7789V=n
|
||||
FILES:=$(LINUX_DIR)/drivers/gpu/drm/imx/imx-ldb.ko \
|
||||
FILES:=$(LINUX_DIR)/drivers/gpu/drm/imx/imx-ldb.ko@lt6.6 \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/imx/ipuv3/imx-ldb.ko@ge6.6 \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/panel/panel-simple.ko \
|
||||
$(LINUX_DIR)/drivers/gpu/drm/drm_dp_aux_bus.ko@lt6.1
|
||||
AUTOLOAD:=$(call AutoLoad,08,imx-ldb)
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
|
||||
Date: Tue, 26 Mar 2024 08:30:36 +0800
|
||||
Subject: [PATCH] wifi: mac80211: extend IEEE80211_KEY_FLAG_GENERATE_MMIE to
|
||||
other ciphers
|
||||
|
||||
Extend the flag IEEE80211_KEY_FLAG_GENERATE_MMIE to BIP-CMAC-256,
|
||||
BIP-GMAC-128 and BIP-GMAC-256 for the same reason and in the same
|
||||
way that the flag was added originally in commit a0b4496a4368
|
||||
("mac80211: add IEEE80211_KEY_FLAG_GENERATE_MMIE to ieee80211_key_flags").
|
||||
|
||||
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
|
||||
Link: https://msgid.link/20240326003036.15215-1-michael-cy.lee@mediatek.com
|
||||
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
||||
---
|
||||
|
||||
--- a/include/net/mac80211.h
|
||||
+++ b/include/net/mac80211.h
|
||||
@@ -2032,8 +2032,8 @@ static inline bool lockdep_vif_mutex_hel
|
||||
* @IEEE80211_KEY_FLAG_GENERATE_MMIC on the same key.
|
||||
* @IEEE80211_KEY_FLAG_NO_AUTO_TX: Key needs explicit Tx activation.
|
||||
* @IEEE80211_KEY_FLAG_GENERATE_MMIE: This flag should be set by the driver
|
||||
- * for a AES_CMAC key to indicate that it requires sequence number
|
||||
- * generation only
|
||||
+ * for a AES_CMAC or a AES_GMAC key to indicate that it requires sequence
|
||||
+ * number generation only
|
||||
*/
|
||||
enum ieee80211_key_flags {
|
||||
IEEE80211_KEY_FLAG_GENERATE_IV_MGMT = BIT(0),
|
||||
--- a/net/mac80211/wpa.c
|
||||
+++ b/net/mac80211/wpa.c
|
||||
@@ -882,7 +882,8 @@ ieee80211_crypto_aes_cmac_256_encrypt(st
|
||||
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
|
||||
- if (info->control.hw_key)
|
||||
+ if (info->control.hw_key &&
|
||||
+ !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIE))
|
||||
return TX_CONTINUE;
|
||||
|
||||
if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
|
||||
@@ -898,6 +899,9 @@ ieee80211_crypto_aes_cmac_256_encrypt(st
|
||||
|
||||
bip_ipn_set64(mmie->sequence_number, pn64);
|
||||
|
||||
+ if (info->control.hw_key)
|
||||
+ return TX_CONTINUE;
|
||||
+
|
||||
bip_aad(skb, aad);
|
||||
|
||||
/* MIC = AES-256-CMAC(IGTK, AAD || Management Frame Body || MMIE, 128)
|
||||
@@ -1027,7 +1031,8 @@ ieee80211_crypto_aes_gmac_encrypt(struct
|
||||
|
||||
info = IEEE80211_SKB_CB(skb);
|
||||
|
||||
- if (info->control.hw_key)
|
||||
+ if (info->control.hw_key &&
|
||||
+ !(key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIE))
|
||||
return TX_CONTINUE;
|
||||
|
||||
if (WARN_ON(skb_tailroom(skb) < sizeof(*mmie)))
|
||||
@@ -1043,6 +1048,9 @@ ieee80211_crypto_aes_gmac_encrypt(struct
|
||||
|
||||
bip_ipn_set64(mmie->sequence_number, pn64);
|
||||
|
||||
+ if (info->control.hw_key)
|
||||
+ return TX_CONTINUE;
|
||||
+
|
||||
bip_aad(skb, aad);
|
||||
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2024-05-19
|
||||
PKG_SOURCE_VERSION:=825681118d05ca5801c6b3852a70a42499e57def
|
||||
PKG_MIRROR_HASH:=adc07e3320e8d780bbbd3d95d3c6c6ce259f3dbf97ab0a4ff9dc4853af21e04f
|
||||
PKG_SOURCE_DATE:=2024-05-23
|
||||
PKG_SOURCE_VERSION:=6052bfef57a81d82451b4cad86f78a2d01959767
|
||||
PKG_MIRROR_HASH:=bf14da82cc363ee32a956dd880343018361079018a48701dc2b05cb88c18010e
|
||||
|
||||
PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ obj.bcm53xx = $(obj.brcm) $(obj.seama)
|
||||
obj.mediatek = $(obj.brcm)
|
||||
obj.bcm63xx = imagetag.o
|
||||
obj.bmips = imagetag.o
|
||||
obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg) linksys_bootcount.o
|
||||
obj.ramips = $(obj.brcm) $(obj.seama) $(obj.tpl) $(obj.wrg) linksys_bootcount.o
|
||||
obj.mvebu = linksys_bootcount.o
|
||||
obj.kirkwood = linksys_bootcount.o
|
||||
obj.ipq806x = linksys_bootcount.o
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mdadm
|
||||
PKG_VERSION:=4.2
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=4.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm
|
||||
PKG_HASH:=461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d
|
||||
PKG_HASH:=416727ae1f1080ea6e3090cea36dd076826fc369151e36ab736557ba92196f9f
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_CPE_ID:=cpe:/a:mdadm_project:mdadm
|
||||
|
||||
36
package/utils/mdadm/patches/010-falloc.patch
Normal file
36
package/utils/mdadm/patches/010-falloc.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 52bead95d2957437c691891fcdc49bd6afccdd49 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 12 Apr 2024 18:45:13 +0200
|
||||
Subject: Create.c: fix uclibc build
|
||||
|
||||
Define FALLOC_FL_ZERO_RANGE if needed as FALLOC_FL_ZERO_RANGE is only
|
||||
defined for aarch64 on uclibc-ng resulting in the following or1k build
|
||||
failure since commit 577fd10486d8d1472a6b559066f344ac30a3a391:
|
||||
|
||||
Create.c: In function 'write_zeroes_fork':
|
||||
Create.c:155:35: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
|
||||
155 | if (fallocate(fd, FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE,
|
||||
| ^~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/0e04bcdb591ca5642053e1f7e31384f06581e989
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||
---
|
||||
Create.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/Create.c
|
||||
+++ b/Create.c
|
||||
@@ -32,6 +32,10 @@
|
||||
#include <sys/signalfd.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
+#ifndef FALLOC_FL_ZERO_RANGE
|
||||
+#define FALLOC_FL_ZERO_RANGE 16
|
||||
+#endif
|
||||
+
|
||||
static int round_size_and_verify(unsigned long long *size, int chunk)
|
||||
{
|
||||
if (*size == 0)
|
||||
30
package/utils/mdadm/patches/020-basename.patch
Normal file
30
package/utils/mdadm/patches/020-basename.patch
Normal file
@ -0,0 +1,30 @@
|
||||
--- a/Monitor.c
|
||||
+++ b/Monitor.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "md_p.h"
|
||||
#include "md_u.h"
|
||||
#include <sys/wait.h>
|
||||
+#include <libgen.h>
|
||||
#include <limits.h>
|
||||
#include <syslog.h>
|
||||
|
||||
--- a/platform-intel.c
|
||||
+++ b/platform-intel.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <libgen.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define NVME_SUBSYS_PATH "/sys/devices/virtual/nvme-subsystem/"
|
||||
--- a/super-intel.c
|
||||
+++ b/super-intel.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <scsi/sg.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
+#include <libgen.h>
|
||||
|
||||
/* MPB == Metadata Parameter Block */
|
||||
#define MPB_SIGNATURE "Intel Raid ISM Cfg Sig. "
|
||||
14
package/utils/mdadm/patches/030-fix-monitor-tv_sec.patch
Normal file
14
package/utils/mdadm/patches/030-fix-monitor-tv_sec.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/monitor.c
|
||||
+++ b/monitor.c
|
||||
@@ -449,9 +449,9 @@ static int read_and_act(struct active_ar
|
||||
}
|
||||
|
||||
gettimeofday(&tv, NULL);
|
||||
- dprintf("(%d): %ld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
|
||||
+ dprintf("(%d): %lld.%06ld state:%s prev:%s action:%s prev: %s start:%llu\n",
|
||||
a->info.container_member,
|
||||
- tv.tv_sec, tv.tv_usec,
|
||||
+ (long long)tv.tv_sec, (long)tv.tv_usec,
|
||||
array_states[a->curr_state],
|
||||
array_states[a->prev_state],
|
||||
sync_actions[a->curr_action],
|
||||
26
package/utils/mdadm/patches/040-udev.patch
Normal file
26
package/utils/mdadm/patches/040-udev.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 1750758c7ff526e3560433f6235e5cfa35cf646a Mon Sep 17 00:00:00 2001
|
||||
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||
Date: Wed, 6 Mar 2024 15:50:55 +0100
|
||||
Subject: udev.c: Do not require libudev.h if DNO_LIBUDEV
|
||||
|
||||
libudev may not be presented at all, do not require it.
|
||||
|
||||
Reported-by: Boian Bonev <bbonev@ipacct.com>
|
||||
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||
---
|
||||
udev.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
--- a/udev.c
|
||||
+++ b/udev.c
|
||||
@@ -26,7 +26,10 @@
|
||||
#include <signal.h>
|
||||
#include <limits.h>
|
||||
#include <syslog.h>
|
||||
+
|
||||
+#ifndef NO_LIBUDEV
|
||||
#include <libudev.h>
|
||||
+#endif
|
||||
|
||||
static char *unblock_path;
|
||||
|
||||
33
package/utils/mdadm/patches/050-pie.patch
Normal file
33
package/utils/mdadm/patches/050-pie.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 893a55831e5abbcd15b171db66fa1f389fb61506 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Tue, 7 May 2024 19:32:16 +0200
|
||||
Subject: Makefile: Move -pie to LDFLAGS
|
||||
|
||||
Move -pie from LDLIBS to LDFLAGS and make LDFLAGS configurable to allow
|
||||
the user to drop it by setting their own LDFLAGS (e.g. PIE could be
|
||||
enabled or disabled by the buildsystem such as buildroot).
|
||||
|
||||
Suggested-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -132,12 +132,12 @@ CFLAGS += -DUSE_PTHREADS
|
||||
MON_LDFLAGS += -pthread
|
||||
endif
|
||||
|
||||
-LDFLAGS = -Wl,-z,now,-z,noexecstack
|
||||
+LDFLAGS ?= -pie -Wl,-z,now,-z,noexecstack
|
||||
|
||||
# If you want a static binary, you might uncomment these
|
||||
# LDFLAGS += -static
|
||||
# STRIP = -s
|
||||
-LDLIBS = -ldl -pie
|
||||
+LDLIBS = -ldl
|
||||
|
||||
# To explicitly disable libudev, set -DNO_LIBUDEV in CXFLAGS
|
||||
ifeq (, $(findstring -DNO_LIBUDEV, $(CXFLAGS)))
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -99,7 +99,7 @@ DLM:=$(shell [ -f /usr/include/libdlm.h
|
||||
@@ -115,7 +115,7 @@ DLM:=$(shell [ -f /usr/include/libdlm.h
|
||||
DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
|
||||
DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
|
||||
DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/Incremental.c
|
||||
+++ b/Incremental.c
|
||||
@@ -983,6 +983,10 @@ static int array_try_spare(char *devname
|
||||
@@ -985,6 +985,10 @@ static int array_try_spare(char *devname
|
||||
goto next;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
/* domain test fails */
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -1147,7 +1147,9 @@ void wait_for(char *dev, int fd)
|
||||
@@ -1192,7 +1192,9 @@ void wait_for(char *dev, int fd)
|
||||
struct superswitch *superlist[] =
|
||||
{
|
||||
&super0, &super1,
|
||||
|
||||
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/kempniu/yafut.git
|
||||
PKG_MIRROR_HASH:=591eb3ffa334aaebf9f8155ade90b674896223bcabc1039deda57c2aeafb0525
|
||||
PKG_SOURCE_DATE:=2023-03-31
|
||||
PKG_SOURCE_VERSION:=16435e89d449f953712983315e1a89cdb678620d
|
||||
PKG_MIRROR_HASH:=9cc6b4c485ce16d44b67ebf79e8bee1e07aecde112da739cf33e8714ac3842e7
|
||||
PKG_SOURCE_DATE:=2024-05-13
|
||||
PKG_SOURCE_VERSION:=2b45baaf1cced47af8f22dd3acbf1df2f04c7510
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@ -6,8 +6,7 @@ BOARDNAME:=Airoha ARM
|
||||
CPU_TYPE:=cortex-a7
|
||||
FEATURES:=dt squashfs nand ramdisk gpio source-only
|
||||
|
||||
KERNEL_PATCHVER:=6.1
|
||||
KERNEL_TESTING_PATCHVER:=6.6
|
||||
KERNEL_PATCHVER:=6.6
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
||||
@ -1,294 +0,0 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_AIROHA=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GIC_V3=y
|
||||
CONFIG_ARM_GIC_V3_ITS=y
|
||||
CONFIG_ARM_GIC_V3_ITS_PCI=y
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_PSCI=y
|
||||
CONFIG_ARM_PSCI_FW=y
|
||||
# CONFIG_ARM_SMMU is not set
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
|
||||
CONFIG_CMDLINE_FROM_BOOTLOADER=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_EN7523=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DEBUG_MISC=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MIGRATION=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_EN7523=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
# CONFIG_HARDEN_BRANCH_HISTORY is not set
|
||||
# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_IOMMU_DEBUGFS is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
|
||||
# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
|
||||
CONFIG_IOMMU_SUPPORT=y
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_FIRMWARE=y
|
||||
CONFIG_MTD_SPLIT_FIT_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEAER=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCIE_MEDIATEK=y
|
||||
CONFIG_PCIE_PME=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PCI_MSI=y
|
||||
CONFIG_PCI_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PREEMPT_NONE_BUILD=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_AIROHA_EN7523=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
# CONFIG_USB_XHCI_PLATFORM is not set
|
||||
CONFIG_USE_OF=y
|
||||
# CONFIG_VFP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMMON=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -1,341 +0,0 @@
|
||||
--- a/drivers/spi/Kconfig
|
||||
+++ b/drivers/spi/Kconfig
|
||||
@@ -330,6 +330,12 @@ config SPI_DLN2
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called spi-dln2.
|
||||
|
||||
+config SPI_AIROHA_EN7523
|
||||
+ bool "Airoha EN7523 SPI controller support"
|
||||
+ depends on ARCH_AIROHA
|
||||
+ help
|
||||
+ This enables SPI controller support for the Airoha EN7523 SoC.
|
||||
+
|
||||
config SPI_EP93XX
|
||||
tristate "Cirrus Logic EP93xx SPI controller"
|
||||
depends on ARCH_EP93XX || COMPILE_TEST
|
||||
--- a/drivers/spi/Makefile
|
||||
+++ b/drivers/spi/Makefile
|
||||
@@ -47,6 +47,7 @@ obj-$(CONFIG_SPI_DW_BT1) += spi-dw-bt1.
|
||||
obj-$(CONFIG_SPI_DW_MMIO) += spi-dw-mmio.o
|
||||
obj-$(CONFIG_SPI_DW_PCI) += spi-dw-pci.o
|
||||
obj-$(CONFIG_SPI_EP93XX) += spi-ep93xx.o
|
||||
+obj-$(CONFIG_SPI_AIROHA_EN7523) += spi-en7523.o
|
||||
obj-$(CONFIG_SPI_FALCON) += spi-falcon.o
|
||||
obj-$(CONFIG_SPI_FSI) += spi-fsi.o
|
||||
obj-$(CONFIG_SPI_FSL_CPM) += spi-fsl-cpm.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/spi/spi-en7523.c
|
||||
@@ -0,0 +1,313 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+
|
||||
+#define ENSPI_READ_IDLE_EN 0x0004
|
||||
+#define ENSPI_MTX_MODE_TOG 0x0014
|
||||
+#define ENSPI_RDCTL_FSM 0x0018
|
||||
+#define ENSPI_MANUAL_EN 0x0020
|
||||
+#define ENSPI_MANUAL_OPFIFO_EMPTY 0x0024
|
||||
+#define ENSPI_MANUAL_OPFIFO_WDATA 0x0028
|
||||
+#define ENSPI_MANUAL_OPFIFO_FULL 0x002C
|
||||
+#define ENSPI_MANUAL_OPFIFO_WR 0x0030
|
||||
+#define ENSPI_MANUAL_DFIFO_FULL 0x0034
|
||||
+#define ENSPI_MANUAL_DFIFO_WDATA 0x0038
|
||||
+#define ENSPI_MANUAL_DFIFO_EMPTY 0x003C
|
||||
+#define ENSPI_MANUAL_DFIFO_RD 0x0040
|
||||
+#define ENSPI_MANUAL_DFIFO_RDATA 0x0044
|
||||
+#define ENSPI_IER 0x0090
|
||||
+#define ENSPI_NFI2SPI_EN 0x0130
|
||||
+
|
||||
+// TODO not in spi block
|
||||
+#define ENSPI_CLOCK_DIVIDER ((void __iomem *)0x1fa201c4)
|
||||
+
|
||||
+#define OP_CSH 0x00
|
||||
+#define OP_CSL 0x01
|
||||
+#define OP_CK 0x02
|
||||
+#define OP_OUTS 0x08
|
||||
+#define OP_OUTD 0x09
|
||||
+#define OP_OUTQ 0x0A
|
||||
+#define OP_INS 0x0C
|
||||
+#define OP_INS0 0x0D
|
||||
+#define OP_IND 0x0E
|
||||
+#define OP_INQ 0x0F
|
||||
+#define OP_OS2IS 0x10
|
||||
+#define OP_OS2ID 0x11
|
||||
+#define OP_OS2IQ 0x12
|
||||
+#define OP_OD2IS 0x13
|
||||
+#define OP_OD2ID 0x14
|
||||
+#define OP_OD2IQ 0x15
|
||||
+#define OP_OQ2IS 0x16
|
||||
+#define OP_OQ2ID 0x17
|
||||
+#define OP_OQ2IQ 0x18
|
||||
+#define OP_OSNIS 0x19
|
||||
+#define OP_ODNID 0x1A
|
||||
+
|
||||
+#define MATRIX_MODE_AUTO 1
|
||||
+#define CONF_MTX_MODE_AUTO 0
|
||||
+#define MANUALEN_AUTO 0
|
||||
+#define MATRIX_MODE_MANUAL 0
|
||||
+#define CONF_MTX_MODE_MANUAL 9
|
||||
+#define MANUALEN_MANUAL 1
|
||||
+
|
||||
+#define _ENSPI_MAX_XFER 0x1ff
|
||||
+
|
||||
+#define REG(x) (iobase + x)
|
||||
+
|
||||
+
|
||||
+static void __iomem *iobase;
|
||||
+
|
||||
+
|
||||
+static void opfifo_write(u32 cmd, u32 len)
|
||||
+{
|
||||
+ u32 tmp = ((cmd & 0x1f) << 9) | (len & 0x1ff);
|
||||
+
|
||||
+ writel(tmp, REG(ENSPI_MANUAL_OPFIFO_WDATA));
|
||||
+
|
||||
+ /* Wait for room in OPFIFO */
|
||||
+ while (readl(REG(ENSPI_MANUAL_OPFIFO_FULL)))
|
||||
+ ;
|
||||
+
|
||||
+ /* Shift command into OPFIFO */
|
||||
+ writel(1, REG(ENSPI_MANUAL_OPFIFO_WR));
|
||||
+
|
||||
+ /* Wait for command to finish */
|
||||
+ while (!readl(REG(ENSPI_MANUAL_OPFIFO_EMPTY)))
|
||||
+ ;
|
||||
+}
|
||||
+
|
||||
+static void set_cs(int state)
|
||||
+{
|
||||
+ if (state)
|
||||
+ opfifo_write(OP_CSH, 1);
|
||||
+ else
|
||||
+ opfifo_write(OP_CSL, 1);
|
||||
+}
|
||||
+
|
||||
+static void manual_begin_cmd(void)
|
||||
+{
|
||||
+ /* Disable read idle state */
|
||||
+ writel(0, REG(ENSPI_READ_IDLE_EN));
|
||||
+
|
||||
+ /* Wait for FSM to reach idle state */
|
||||
+ while (readl(REG(ENSPI_RDCTL_FSM)))
|
||||
+ ;
|
||||
+
|
||||
+ /* Set SPI core to manual mode */
|
||||
+ writel(CONF_MTX_MODE_MANUAL, REG(ENSPI_MTX_MODE_TOG));
|
||||
+ writel(MANUALEN_MANUAL, REG(ENSPI_MANUAL_EN));
|
||||
+}
|
||||
+
|
||||
+static void manual_end_cmd(void)
|
||||
+{
|
||||
+ /* Set SPI core to auto mode */
|
||||
+ writel(CONF_MTX_MODE_AUTO, REG(ENSPI_MTX_MODE_TOG));
|
||||
+ writel(MANUALEN_AUTO, REG(ENSPI_MANUAL_EN));
|
||||
+
|
||||
+ /* Enable read idle state */
|
||||
+ writel(1, REG(ENSPI_READ_IDLE_EN));
|
||||
+}
|
||||
+
|
||||
+static void dfifo_read(u8 *buf, int len)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < len; i++) {
|
||||
+ /* Wait for requested data to show up in DFIFO */
|
||||
+ while (readl(REG(ENSPI_MANUAL_DFIFO_EMPTY)))
|
||||
+ ;
|
||||
+ buf[i] = readl(REG(ENSPI_MANUAL_DFIFO_RDATA));
|
||||
+ /* Queue up next byte */
|
||||
+ writel(1, REG(ENSPI_MANUAL_DFIFO_RD));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void dfifo_write(const u8 *buf, int len)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < len; i++) {
|
||||
+ /* Wait for room in DFIFO */
|
||||
+ while (readl(REG(ENSPI_MANUAL_DFIFO_FULL)))
|
||||
+ ;
|
||||
+ writel(buf[i], REG(ENSPI_MANUAL_DFIFO_WDATA));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#if 0
|
||||
+static void set_spi_clock_speed(int freq_mhz)
|
||||
+{
|
||||
+ u32 tmp, val;
|
||||
+
|
||||
+ tmp = readl(ENSPI_CLOCK_DIVIDER);
|
||||
+ tmp &= 0xffff0000;
|
||||
+ writel(tmp, ENSPI_CLOCK_DIVIDER);
|
||||
+
|
||||
+ val = (400 / (freq_mhz * 2));
|
||||
+ tmp |= (val << 8) | 1;
|
||||
+ writel(tmp, ENSPI_CLOCK_DIVIDER);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static void init_hw(void)
|
||||
+{
|
||||
+ /* Disable manual/auto mode clash interrupt */
|
||||
+ writel(0, REG(ENSPI_IER));
|
||||
+
|
||||
+ // TODO via clk framework
|
||||
+ // set_spi_clock_speed(50);
|
||||
+
|
||||
+ /* Disable DMA */
|
||||
+ writel(0, REG(ENSPI_NFI2SPI_EN));
|
||||
+}
|
||||
+
|
||||
+static int xfer_read(struct spi_transfer *xfer)
|
||||
+{
|
||||
+ int opcode;
|
||||
+ uint8_t *buf = xfer->rx_buf;
|
||||
+
|
||||
+ switch (xfer->rx_nbits) {
|
||||
+ case SPI_NBITS_SINGLE:
|
||||
+ opcode = OP_INS;
|
||||
+ break;
|
||||
+ case SPI_NBITS_DUAL:
|
||||
+ opcode = OP_IND;
|
||||
+ break;
|
||||
+ case SPI_NBITS_QUAD:
|
||||
+ opcode = OP_INQ;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ opfifo_write(opcode, xfer->len);
|
||||
+ dfifo_read(buf, xfer->len);
|
||||
+
|
||||
+ return xfer->len;
|
||||
+}
|
||||
+
|
||||
+static int xfer_write(struct spi_transfer *xfer, int next_xfer_is_rx)
|
||||
+{
|
||||
+ int opcode;
|
||||
+ const uint8_t *buf = xfer->tx_buf;
|
||||
+
|
||||
+ if (next_xfer_is_rx) {
|
||||
+ /* need to use Ox2Ix opcode to set the core to input afterwards */
|
||||
+ switch (xfer->tx_nbits) {
|
||||
+ case SPI_NBITS_SINGLE:
|
||||
+ opcode = OP_OS2IS;
|
||||
+ break;
|
||||
+ case SPI_NBITS_DUAL:
|
||||
+ opcode = OP_OS2ID;
|
||||
+ break;
|
||||
+ case SPI_NBITS_QUAD:
|
||||
+ opcode = OP_OS2IQ;
|
||||
+ break;
|
||||
+ }
|
||||
+ } else {
|
||||
+ switch (xfer->tx_nbits) {
|
||||
+ case SPI_NBITS_SINGLE:
|
||||
+ opcode = OP_OUTS;
|
||||
+ break;
|
||||
+ case SPI_NBITS_DUAL:
|
||||
+ opcode = OP_OUTD;
|
||||
+ break;
|
||||
+ case SPI_NBITS_QUAD:
|
||||
+ opcode = OP_OUTQ;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ opfifo_write(opcode, xfer->len);
|
||||
+ dfifo_write(buf, xfer->len);
|
||||
+
|
||||
+ return xfer->len;
|
||||
+}
|
||||
+
|
||||
+size_t max_transfer_size(struct spi_device *spi)
|
||||
+{
|
||||
+ return _ENSPI_MAX_XFER;
|
||||
+}
|
||||
+
|
||||
+int transfer_one_message(struct spi_controller *ctrl, struct spi_message *msg)
|
||||
+{
|
||||
+ struct spi_transfer *xfer;
|
||||
+ int next_xfer_is_rx = 0;
|
||||
+
|
||||
+ manual_begin_cmd();
|
||||
+ set_cs(0);
|
||||
+ list_for_each_entry(xfer, &msg->transfers, transfer_list) {
|
||||
+ if (xfer->tx_buf) {
|
||||
+ if (!list_is_last(&xfer->transfer_list, &msg->transfers)
|
||||
+ && list_next_entry(xfer, transfer_list)->rx_buf != NULL)
|
||||
+ next_xfer_is_rx = 1;
|
||||
+ else
|
||||
+ next_xfer_is_rx = 0;
|
||||
+ msg->actual_length += xfer_write(xfer, next_xfer_is_rx);
|
||||
+ } else if (xfer->rx_buf) {
|
||||
+ msg->actual_length += xfer_read(xfer);
|
||||
+ }
|
||||
+ }
|
||||
+ set_cs(1);
|
||||
+ manual_end_cmd();
|
||||
+
|
||||
+ msg->status = 0;
|
||||
+ spi_finalize_current_message(ctrl);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int spi_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct spi_controller *ctrl;
|
||||
+ int err;
|
||||
+
|
||||
+ ctrl = devm_spi_alloc_master(&pdev->dev, 0);
|
||||
+ if (!ctrl) {
|
||||
+ dev_err(&pdev->dev, "Error allocating SPI controller\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ iobase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
|
||||
+ if (IS_ERR(iobase)) {
|
||||
+ dev_err(&pdev->dev, "Could not map SPI register address");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ init_hw();
|
||||
+
|
||||
+ ctrl->dev.of_node = pdev->dev.of_node;
|
||||
+ ctrl->flags = SPI_CONTROLLER_HALF_DUPLEX;
|
||||
+ ctrl->mode_bits = SPI_RX_DUAL | SPI_TX_DUAL;
|
||||
+ ctrl->max_transfer_size = max_transfer_size;
|
||||
+ ctrl->transfer_one_message = transfer_one_message;
|
||||
+ err = devm_spi_register_controller(&pdev->dev, ctrl);
|
||||
+ if (err) {
|
||||
+ dev_err(&pdev->dev, "Could not register SPI controller\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id spi_of_ids[] = {
|
||||
+ { .compatible = "airoha,en7523-spi" },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, spi_of_ids);
|
||||
+
|
||||
+static struct platform_driver spi_driver = {
|
||||
+ .probe = spi_probe,
|
||||
+ .driver = {
|
||||
+ .name = "airoha-en7523-spi",
|
||||
+ .of_match_table = spi_of_ids,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(spi_driver);
|
||||
+
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
+MODULE_AUTHOR("Bert Vermeulen <bert@biot.com>");
|
||||
+MODULE_DESCRIPTION("Airoha EN7523 SPI driver");
|
||||
@ -10,7 +10,7 @@ endef
|
||||
define Device/mikrotik_nor
|
||||
$(Device/mikrotik)
|
||||
DEVICE_PACKAGES := -yafut
|
||||
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \
|
||||
IMAGE/sysupgrade.bin := append-kernel | yaffs-filesystem -M | \
|
||||
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \
|
||||
check-size | append-metadata
|
||||
endef
|
||||
|
||||
@ -10,8 +10,8 @@ BOARDNAME:=Broadcom BCM47xx/53xx (MIPS)
|
||||
FEATURES:=squashfs usb
|
||||
SUBTARGETS:=generic mips74k legacy
|
||||
|
||||
KERNEL_PATCHVER:=5.15
|
||||
KERNEL_TESTING_PATCHVER:=6.1
|
||||
KERNEL_PATCHVER:=6.1
|
||||
KERNEL_TESTING_PATCHVER:=6.6
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for Broadcom based BCM47xx/53xx routers with MIPS CPU, *not* ARM.
|
||||
|
||||
@ -18,6 +18,7 @@ CONFIG_BCMA_DRIVER_GPIO=y
|
||||
CONFIG_BCMA_DRIVER_MIPS=y
|
||||
CONFIG_BCMA_DRIVER_PCI=y
|
||||
CONFIG_BCMA_DRIVER_PCI_HOSTMODE=y
|
||||
CONFIG_BCMA_FALLBACK_SPROM=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
CONFIG_BCMA_HOST_SOC=y
|
||||
@ -26,12 +27,15 @@ CONFIG_BCMA_PFLASH=y
|
||||
CONFIG_BCMA_SFLASH=y
|
||||
# CONFIG_BGMAC_BCMA is not set
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CMDLINE="noinitrd console=ttyS0,115200"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
# CONFIG_COMMON_CLK is not set
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
# CONFIG_CPU_BMIPS is not set
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
@ -48,22 +52,30 @@ CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_EARLY_PRINTK is not set
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
@ -77,10 +89,10 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_WDT=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
@ -94,7 +106,6 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
@ -102,9 +113,8 @@ CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
|
||||
CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_BCM47XXSFLASH=y
|
||||
CONFIG_MTD_BCM47XX_PARTS=y
|
||||
@ -118,10 +128,16 @@ CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NO_EXCEPT_FILL=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
# CONFIG_OF is not set
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
@ -129,11 +145,13 @@ CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PREEMPT_NONE_BUILD=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_SSB=y
|
||||
CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||
CONFIG_SSB_BLOCKIO=y
|
||||
@ -144,6 +162,7 @@ CONFIG_SSB_DRIVER_MIPS=y
|
||||
CONFIG_SSB_DRIVER_PCICORE=y
|
||||
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
|
||||
CONFIG_SSB_EMBEDDED=y
|
||||
CONFIG_SSB_FALLBACK_SPROM=y
|
||||
CONFIG_SSB_HOST_SOC=y
|
||||
CONFIG_SSB_PCICORE_HOSTMODE=y
|
||||
CONFIG_SSB_PCIHOST=y
|
||||
@ -174,3 +193,4 @@ CONFIG_TINY_SRCU=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_ZBOOT_LOAD_ADDRESS=0xffffffff80400000
|
||||
@ -1,40 +0,0 @@
|
||||
From eea175eedf3e2f71b9538d21e643e7a1be4923df Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:37 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Define Linksys WRT310N V2 buttons
|
||||
|
||||
Update the buttons registration code to register the two buttons (WPS,
|
||||
system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board
|
||||
entry.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -277,6 +277,12 @@ bcm47xx_buttons_linksys_wrt310nv1[] __in
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt310n_v2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -608,6 +614,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT310NV2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
@ -1,89 +0,0 @@
|
||||
From 3829e4f10a232964cc728c0479c8097922e5e073 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:38 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add board entry for Linksys WRT320N v1
|
||||
|
||||
This router is based on a Broadcom BCM4717A1 chipset and supports
|
||||
802.11n Wi-Fi. Add a board entry for that router and register LEDs and
|
||||
buttons accordingly.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 1 +
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/bcm47xx/leds.c | 10 ++++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
4 files changed, 21 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -141,6 +141,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT300NV11, "Linksys WRT300N V1.1"}, "WRT300N", "1.1"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV1, "Linksys WRT310N V1"}, "WRT310N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT310NV2, "Linksys WRT310N V2"}, "WRT310N", "2.0"},
|
||||
+ {{BCM47XX_BOARD_LINKSYS_WRT320N_V1, "Linksys WRT320N V1"}, "WRT320N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G3GV2, "Linksys WRT54G3GV2-VF"}, "WRT54G3GV2-VF", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV1, "Linksys WRT610N V1"}, "WRT610N", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT610NV2, "Linksys WRT610N V2"}, "WRT610N", "2.0"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -283,6 +283,12 @@ bcm47xx_buttons_linksys_wrt310n_v2[] __i
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(5, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_wrt54g3gv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(5, KEY_WIMAX),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt310n_v2);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_wrt54g3gv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -314,6 +314,13 @@ bcm47xx_leds_linksys_wrt310nv1[] __initc
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_linksys_wrt320n_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(1, "blue", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(2, "blue", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(4, "amber", "wps", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_linksys_wrt54g_generic[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
|
||||
BCM47XX_GPIO_LED(1, "unk", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
@@ -689,6 +696,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_LINKSYS_WRT310NV1:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt310nv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_WRT320N_V1:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt320n_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_WRT54G3GV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_linksys_wrt54g3gv2);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -72,6 +72,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_LINKSYS_WRT300NV11,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT310NV2,
|
||||
+ BCM47XX_BOARD_LINKSYS_WRT320N_V1,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G3GV2,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101,
|
||||
BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467,
|
||||
@ -1,67 +0,0 @@
|
||||
From aecf89f2f8e8a604c33085c230a1f04ea325de64 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:39 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10U
|
||||
|
||||
Add the definitions for the buttons and LEDs used on the Asus RTN-10U
|
||||
router.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/bcm47xx/leds.c | 11 +++++++++++
|
||||
2 files changed, 20 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -27,6 +27,12 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(20, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(21, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(0, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(1, KEY_RESTART),
|
||||
@@ -490,6 +496,9 @@ int __init bcm47xx_buttons_register(void
|
||||
int err;
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_asus_rtn12);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -30,6 +30,14 @@
|
||||
/* Asus */
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_asus_rtn10u[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(5, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(6, "green", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(8, "green", "usb", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_asus_rtn12[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "unk", "power", 1, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(7, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -563,6 +571,9 @@ void __init bcm47xx_leds_register(void)
|
||||
enum bcm47xx_board board = bcm47xx_board_get();
|
||||
|
||||
switch (board) {
|
||||
+ case BCM47XX_BOARD_ASUS_RTN10U:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_asus_rtn10u);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_ASUS_RTN12:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_asus_rtn12);
|
||||
break;
|
||||
@ -1,60 +0,0 @@
|
||||
From 15e690af5cc3cd8f5d14ee2aa3a093f80196110e Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:40 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear R6300 v1
|
||||
|
||||
Add support for the Netgear R6300 v1 Wi-Fi router using a Broadcom
|
||||
BCM4706 chipset and supporting 802.11n and 802.11ac.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 1 +
|
||||
arch/mips/bcm47xx/buttons.c | 8 ++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -162,6 +162,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_600_V1, "Luxul XWR-600 V1"}, "luxul_xwr600_v1"},
|
||||
{{BCM47XX_BOARD_LUXUL_XWR_1750_V1, "Luxul XWR-1750 V1"}, "luxul_xwr1750_v1"},
|
||||
{{BCM47XX_BOARD_NETGEAR_R6200_V1, "Netgear R6200 V1"}, "U12H192T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_R6300_V1, "Netgear R6300 V1"}, "U12H218T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -410,6 +410,11 @@ bcm47xx_buttons_netgear_r6200_v1[] __ini
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_r6300_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -701,6 +706,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_R6200_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6200_v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -100,6 +100,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_MOTOROLA_WR850GV2V3,
|
||||
|
||||
BCM47XX_BOARD_NETGEAR_R6200_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_R6300_V1,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
||||
@ -1,63 +0,0 @@
|
||||
From 4da27b6d550427a0560a15df36de99cb17629216 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 6 Jan 2022 19:51:41 -0800
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2
|
||||
|
||||
Add support for the Netgear WN2500 RP v1 and v2 Wi-Fi range extenders
|
||||
based on the BCM5357 chipset and supporting 802.11n and 802.11ac.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 2 ++
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 2 ++
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -166,6 +166,8 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V1, "Netgear WN2500RP V1"}, "U12H197T00_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WN2500RP_V2, "Netgear WN2500RP V2"}, "U12H294T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -415,6 +415,12 @@ bcm47xx_buttons_netgear_r6300_v1[] __ini
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wn2500rp_v1[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(12, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(31, KEY_WPS_BUTTON),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wndr3400v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
@@ -709,6 +715,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_R6300_V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_r6300_v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WN2500RP_V1:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wn2500rp_v1);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wndr3400v1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -104,6 +104,8 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V8,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614V9,
|
||||
BCM47XX_BOARD_NETGEAR_WGR614_V10,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V1,
|
||||
+ BCM47XX_BOARD_NETGEAR_WN2500RP_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3300,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V1,
|
||||
BCM47XX_BOARD_NETGEAR_WNDR3400V2,
|
||||
@ -1,109 +0,0 @@
|
||||
From c022e87162219d67d687df22c977d1c2fc95fb42 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Thu, 14 Jul 2022 14:13:01 -0700
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Netgear WNR3500L v2
|
||||
|
||||
Add support for the Netgear WNR3500L v2 router based on the BCM47186
|
||||
chipset and supporting 802.11n Wi-Fi.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 2 ++
|
||||
arch/mips/bcm47xx/buttons.c | 10 ++++++++++
|
||||
arch/mips/bcm47xx/leds.c | 11 +++++++++++
|
||||
arch/mips/bcm47xx/workarounds.c | 1 +
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
5 files changed, 25 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -181,6 +181,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR1000_V3, "Netgear WNR1000 V3"}, "U12H139T50_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "U12H172T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500 V2"}, "U12H127T00_NETGEAR"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500 V2vc"}, "U12H127T70_NETGEAR"},
|
||||
@@ -195,6 +196,7 @@ struct bcm47xx_board_type_list3 bcm47xx_
|
||||
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
|
||||
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
|
||||
{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "0x04CF", "3500", "02"},
|
||||
+ {{BCM47XX_BOARD_NETGEAR_WNR3500L_V2, "Netgear WNR3500L V2"}, "0x052b", "3500L", "02"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0101, "Linksys WRT54G/GS/GL"}, "0x0101", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0467, "Linksys WRT54G/GS/GL"}, "0x0467", "42", "0x10"},
|
||||
{{BCM47XX_BOARD_LINKSYS_WRT54G_TYPE_0708, "Linksys WRT54G/GS/GL"}, "0x0708", "42", "0x10"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -460,6 +460,13 @@ bcm47xx_buttons_netgear_wnr3500lv1[] __i
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_netgear_wnr3500lv2[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(4, KEY_RESTART),
|
||||
+ BCM47XX_GPIO_KEY(6, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(8, KEY_RFKILL),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
};
|
||||
@@ -736,6 +743,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr3500lv2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_netgear_wnr834bv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -528,6 +528,14 @@ bcm47xx_leds_netgear_wnr3500lv1[] __init
|
||||
};
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_netgear_wnr3500lv2[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(0, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(1, "green", "wps", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+ BCM47XX_GPIO_LED(3, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
+ BCM47XX_GPIO_LED(7, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_netgear_wnr834bv2[] __initconst = {
|
||||
BCM47XX_GPIO_LED(2, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
|
||||
BCM47XX_GPIO_LED(3, "amber", "power", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
@@ -791,6 +799,9 @@ void __init bcm47xx_leds_register(void)
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr3500lv2);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNR834BV2:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_netgear_wnr834bv2);
|
||||
break;
|
||||
--- a/arch/mips/bcm47xx/workarounds.c
|
||||
+++ b/arch/mips/bcm47xx/workarounds.c
|
||||
@@ -22,6 +22,7 @@ void __init bcm47xx_workarounds(void)
|
||||
|
||||
switch (board) {
|
||||
case BCM47XX_BOARD_NETGEAR_WNR3500L:
|
||||
+ case BCM47XX_BOARD_NETGEAR_WNR3500L_V2:
|
||||
bcm47xx_workarounds_enable_usb_power(12);
|
||||
break;
|
||||
case BCM47XX_BOARD_NETGEAR_WNDR3400V2:
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -118,6 +118,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_NETGEAR_WNR1000_V3,
|
||||
BCM47XX_BOARD_NETGEAR_WNR2000,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500L,
|
||||
+ BCM47XX_BOARD_NETGEAR_WNR3500L_V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500U,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500V2,
|
||||
BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
|
||||
@ -1,65 +0,0 @@
|
||||
From fc605b914167de75432c3b5aae239fb191e84a31 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 8 Feb 2023 08:03:01 +0100
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Linksys E2500 V3
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's a BCM5358 based home WiFi router. 16 MiB flash, 64 MiB RAM, BCM5325
|
||||
switch, on-SoC 802.11n radio.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 1 +
|
||||
arch/mips/bcm47xx/buttons.c | 9 +++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
3 files changed, 11 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -130,6 +130,7 @@ struct bcm47xx_board_type_list2 bcm47xx_
|
||||
{{BCM47XX_BOARD_LINKSYS_E1000V21, "Linksys E1000 V2.1"}, "E1000", "2.1"},
|
||||
{{BCM47XX_BOARD_LINKSYS_E1200V2, "Linksys E1200 V2"}, "E1200", "2.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_E2000V1, "Linksys E2000 V1"}, "Linksys E2000", "1.0"},
|
||||
+ {{BCM47XX_BOARD_LINKSYS_E2500V3, "Linksys E2500 V3"}, "E2500", "1.0"},
|
||||
/* like WRT610N v2.0 */
|
||||
{{BCM47XX_BOARD_LINKSYS_E3000V1, "Linksys E3000 V1"}, "E300", "1.0"},
|
||||
{{BCM47XX_BOARD_LINKSYS_E3200V1, "Linksys E3200 V1"}, "E3200", "1.0"},
|
||||
--- a/arch/mips/bcm47xx/buttons.c
|
||||
+++ b/arch/mips/bcm47xx/buttons.c
|
||||
@@ -223,6 +223,12 @@ bcm47xx_buttons_linksys_e2000v1[] __init
|
||||
};
|
||||
|
||||
static const struct gpio_keys_button
|
||||
+bcm47xx_buttons_linksys_e2500v3[] __initconst = {
|
||||
+ BCM47XX_GPIO_KEY(9, KEY_WPS_BUTTON),
|
||||
+ BCM47XX_GPIO_KEY(10, KEY_RESTART),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_keys_button
|
||||
bcm47xx_buttons_linksys_e3000v1[] __initconst = {
|
||||
BCM47XX_GPIO_KEY(4, KEY_WPS_BUTTON),
|
||||
BCM47XX_GPIO_KEY(6, KEY_RESTART),
|
||||
@@ -617,6 +623,9 @@ int __init bcm47xx_buttons_register(void
|
||||
case BCM47XX_BOARD_LINKSYS_E2000V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2000v1);
|
||||
break;
|
||||
+ case BCM47XX_BOARD_LINKSYS_E2500V3:
|
||||
+ err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e2500v3);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_LINKSYS_E3000V1:
|
||||
err = bcm47xx_copy_bdata(bcm47xx_buttons_linksys_e3000v1);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -61,6 +61,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_LINKSYS_E1000V21,
|
||||
BCM47XX_BOARD_LINKSYS_E1200V2,
|
||||
BCM47XX_BOARD_LINKSYS_E2000V1,
|
||||
+ BCM47XX_BOARD_LINKSYS_E2500V3,
|
||||
BCM47XX_BOARD_LINKSYS_E3000V1,
|
||||
BCM47XX_BOARD_LINKSYS_E3200V1,
|
||||
BCM47XX_BOARD_LINKSYS_E4200V1,
|
||||
@ -1,33 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 1/9] mtd: rawnand: brcmnand: Assign soc as early as possible
|
||||
Date: Fri, 07 Jan 2022 10:46:06 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
In order to key off the brcmnand_probe() code in subsequent changes
|
||||
depending upon ctrl->soc, assign that variable as early as possible,
|
||||
instead of much later when we have checked that it is non-NULL.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -3059,6 +3059,7 @@ int brcmnand_probe(struct platform_devic
|
||||
|
||||
dev_set_drvdata(dev, ctrl);
|
||||
ctrl->dev = dev;
|
||||
+ ctrl->soc = soc;
|
||||
|
||||
/* Enable the static key if the soc provides I/O operations indicating
|
||||
* that a non-memory mapped IO access path must be used
|
||||
@@ -3209,8 +3210,6 @@ int brcmnand_probe(struct platform_devic
|
||||
* interesting ways
|
||||
*/
|
||||
if (soc) {
|
||||
- ctrl->soc = soc;
|
||||
-
|
||||
ret = devm_request_irq(dev, ctrl->irq, brcmnand_irq, 0,
|
||||
DRV_NAME, ctrl);
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 3/9] mtd: rawnand: brcmnand: Avoid pdev in brcmnand_init_cs()
|
||||
Date: Fri, 07 Jan 2022 10:46:08 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
In preparation for encapsulating more of what the loop calling
|
||||
brcmnand_init_cs() does, avoid using platform_device when it is the
|
||||
device behind platform_device that we are using for printing errors.
|
||||
|
||||
No functional changes introduced.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -2814,7 +2814,7 @@ static const struct nand_controller_ops
|
||||
static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
|
||||
{
|
||||
struct brcmnand_controller *ctrl = host->ctrl;
|
||||
- struct platform_device *pdev = host->pdev;
|
||||
+ struct device *dev = ctrl->dev;
|
||||
struct mtd_info *mtd;
|
||||
struct nand_chip *chip;
|
||||
int ret;
|
||||
@@ -2822,7 +2822,7 @@ static int brcmnand_init_cs(struct brcmn
|
||||
|
||||
ret = of_property_read_u32(dn, "reg", &host->cs);
|
||||
if (ret) {
|
||||
- dev_err(&pdev->dev, "can't get chip-select\n");
|
||||
+ dev_err(dev, "can't get chip-select\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
@@ -2831,13 +2831,13 @@ static int brcmnand_init_cs(struct brcmn
|
||||
|
||||
nand_set_flash_node(chip, dn);
|
||||
nand_set_controller_data(chip, host);
|
||||
- mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d",
|
||||
+ mtd->name = devm_kasprintf(dev, GFP_KERNEL, "brcmnand.%d",
|
||||
host->cs);
|
||||
if (!mtd->name)
|
||||
return -ENOMEM;
|
||||
|
||||
mtd->owner = THIS_MODULE;
|
||||
- mtd->dev.parent = &pdev->dev;
|
||||
+ mtd->dev.parent = dev;
|
||||
|
||||
chip->legacy.cmd_ctrl = brcmnand_cmd_ctrl;
|
||||
chip->legacy.cmdfunc = brcmnand_cmdfunc;
|
||||
@ -1,63 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 4/9] mtd: rawnand: brcmnand: Move OF operations out of brcmnand_init_cs()
|
||||
Date: Fri, 07 Jan 2022 10:46:09 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
In order to initialize a given chip select object for use by the
|
||||
brcmnand driver, move all of the Device Tree specific routines outside
|
||||
of brcmnand_init_cs() in order to make it usable in a platform data
|
||||
configuration which will be necessary for supporting BCMA chips.
|
||||
|
||||
No functional changes introduced.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 20 +++++++++++---------
|
||||
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -2811,7 +2811,7 @@ static const struct nand_controller_ops
|
||||
.attach_chip = brcmnand_attach_chip,
|
||||
};
|
||||
|
||||
-static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
|
||||
+static int brcmnand_init_cs(struct brcmnand_host *host)
|
||||
{
|
||||
struct brcmnand_controller *ctrl = host->ctrl;
|
||||
struct device *dev = ctrl->dev;
|
||||
@@ -2820,16 +2820,9 @@ static int brcmnand_init_cs(struct brcmn
|
||||
int ret;
|
||||
u16 cfg_offs;
|
||||
|
||||
- ret = of_property_read_u32(dn, "reg", &host->cs);
|
||||
- if (ret) {
|
||||
- dev_err(dev, "can't get chip-select\n");
|
||||
- return -ENXIO;
|
||||
- }
|
||||
-
|
||||
mtd = nand_to_mtd(&host->chip);
|
||||
chip = &host->chip;
|
||||
|
||||
- nand_set_flash_node(chip, dn);
|
||||
nand_set_controller_data(chip, host);
|
||||
mtd->name = devm_kasprintf(dev, GFP_KERNEL, "brcmnand.%d",
|
||||
host->cs);
|
||||
@@ -3240,7 +3233,16 @@ int brcmnand_probe(struct platform_devic
|
||||
host->pdev = pdev;
|
||||
host->ctrl = ctrl;
|
||||
|
||||
- ret = brcmnand_init_cs(host, child);
|
||||
+ ret = of_property_read_u32(child, "reg", &host->cs);
|
||||
+ if (ret) {
|
||||
+ dev_err(dev, "can't get chip-select\n");
|
||||
+ devm_kfree(dev, host);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ nand_set_flash_node(&host->chip, child);
|
||||
+
|
||||
+ ret = brcmnand_init_cs(host);
|
||||
if (ret) {
|
||||
devm_kfree(dev, host);
|
||||
continue; /* Try all chip-selects */
|
||||
@ -1,91 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 5/9] mtd: rawnand: brcmnand: Allow working without interrupts
|
||||
Date: Fri, 07 Jan 2022 10:46:10 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
The BCMA devices include the brcmnand controller but they do not wire up
|
||||
any interrupt line, allow the main interrupt to be optional and update
|
||||
the completion path to also check for the lack of an interrupt line.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 52 +++++++++++-------------
|
||||
1 file changed, 24 insertions(+), 28 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -216,7 +216,7 @@ struct brcmnand_controller {
|
||||
void __iomem *nand_base;
|
||||
void __iomem *nand_fc; /* flash cache */
|
||||
void __iomem *flash_dma_base;
|
||||
- unsigned int irq;
|
||||
+ int irq;
|
||||
unsigned int dma_irq;
|
||||
int nand_version;
|
||||
|
||||
@@ -1650,7 +1650,7 @@ static bool brcmstb_nand_wait_for_comple
|
||||
bool err = false;
|
||||
int sts;
|
||||
|
||||
- if (mtd->oops_panic_write) {
|
||||
+ if (mtd->oops_panic_write || ctrl->irq < 0) {
|
||||
/* switch to interrupt polling and PIO mode */
|
||||
disable_ctrl_irqs(ctrl);
|
||||
sts = bcmnand_ctrl_poll_status(ctrl, NAND_CTRL_RDY,
|
||||
@@ -3191,33 +3191,29 @@ int brcmnand_probe(struct platform_devic
|
||||
}
|
||||
|
||||
/* IRQ */
|
||||
- ctrl->irq = platform_get_irq(pdev, 0);
|
||||
- if ((int)ctrl->irq < 0) {
|
||||
- dev_err(dev, "no IRQ defined\n");
|
||||
- ret = -ENODEV;
|
||||
- goto err;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Some SoCs integrate this controller (e.g., its interrupt bits) in
|
||||
- * interesting ways
|
||||
- */
|
||||
- if (soc) {
|
||||
- ret = devm_request_irq(dev, ctrl->irq, brcmnand_irq, 0,
|
||||
- DRV_NAME, ctrl);
|
||||
-
|
||||
- /* Enable interrupt */
|
||||
- ctrl->soc->ctlrdy_ack(ctrl->soc);
|
||||
- ctrl->soc->ctlrdy_set_enabled(ctrl->soc, true);
|
||||
- } else {
|
||||
- /* Use standard interrupt infrastructure */
|
||||
- ret = devm_request_irq(dev, ctrl->irq, brcmnand_ctlrdy_irq, 0,
|
||||
- DRV_NAME, ctrl);
|
||||
- }
|
||||
- if (ret < 0) {
|
||||
- dev_err(dev, "can't allocate IRQ %d: error %d\n",
|
||||
- ctrl->irq, ret);
|
||||
- goto err;
|
||||
+ ctrl->irq = platform_get_irq_optional(pdev, 0);
|
||||
+ if (ctrl->irq > 0) {
|
||||
+ /*
|
||||
+ * Some SoCs integrate this controller (e.g., its interrupt bits) in
|
||||
+ * interesting ways
|
||||
+ */
|
||||
+ if (soc) {
|
||||
+ ret = devm_request_irq(dev, ctrl->irq, brcmnand_irq, 0,
|
||||
+ DRV_NAME, ctrl);
|
||||
+
|
||||
+ /* Enable interrupt */
|
||||
+ ctrl->soc->ctlrdy_ack(ctrl->soc);
|
||||
+ ctrl->soc->ctlrdy_set_enabled(ctrl->soc, true);
|
||||
+ } else {
|
||||
+ /* Use standard interrupt infrastructure */
|
||||
+ ret = devm_request_irq(dev, ctrl->irq, brcmnand_ctlrdy_irq, 0,
|
||||
+ DRV_NAME, ctrl);
|
||||
+ }
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(dev, "can't allocate IRQ %d: error %d\n",
|
||||
+ ctrl->irq, ret);
|
||||
+ goto err;
|
||||
+ }
|
||||
}
|
||||
|
||||
for_each_available_child_of_node(dn, child) {
|
||||
@ -1,115 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 6/9] mtd: rawnand: brcmnand: Add platform data structure for BCMA
|
||||
Date: Fri, 07 Jan 2022 10:46:11 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
Update the BCMA's chipcommon nand flash driver to detect which
|
||||
chip-select is used and pass that information via platform data to the
|
||||
brcmnand driver. Make sure that the brcmnand platform data structure is
|
||||
always at the beginning of the platform data of the "nflash" device
|
||||
created by BCMA to allow brcmnand to safely de-reference it.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
MAINTAINERS | 1 +
|
||||
drivers/bcma/driver_chipcommon_nflash.c | 20 +++++++++++++++++++-
|
||||
include/linux/bcma/bcma_driver_chipcommon.h | 5 +++++
|
||||
include/linux/platform_data/brcmnand.h | 12 ++++++++++++
|
||||
4 files changed, 37 insertions(+), 1 deletion(-)
|
||||
create mode 100644 include/linux/platform_data/brcmnand.h
|
||||
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -3901,6 +3901,7 @@ L: linux-mtd@lists.infradead.org
|
||||
L: bcm-kernel-feedback-list@broadcom.com
|
||||
S: Maintained
|
||||
F: drivers/mtd/nand/raw/brcmnand/
|
||||
+F: include/linux/platform_data/brcmnand.h
|
||||
|
||||
BROADCOM STB PCIE DRIVER
|
||||
M: Jim Quinlan <jim2101024@gmail.com>
|
||||
--- a/drivers/bcma/driver_chipcommon_nflash.c
|
||||
+++ b/drivers/bcma/driver_chipcommon_nflash.c
|
||||
@@ -7,18 +7,28 @@
|
||||
|
||||
#include "bcma_private.h"
|
||||
|
||||
+#include <linux/bitops.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/platform_data/brcmnand.h>
|
||||
#include <linux/bcma/bcma.h>
|
||||
|
||||
+/* Alternate NAND controller driver name in order to allow both bcm47xxnflash
|
||||
+ * and bcma_brcmnand to be built into the same kernel image.
|
||||
+ */
|
||||
+static const char *bcma_nflash_alt_name = "bcma_brcmnand";
|
||||
+
|
||||
struct platform_device bcma_nflash_dev = {
|
||||
.name = "bcma_nflash",
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
+static const char *probes[] = { "bcm47xxpart", NULL };
|
||||
+
|
||||
/* Initialize NAND flash access */
|
||||
int bcma_nflash_init(struct bcma_drv_cc *cc)
|
||||
{
|
||||
struct bcma_bus *bus = cc->core->bus;
|
||||
+ u32 reg;
|
||||
|
||||
if (bus->chipinfo.id != BCMA_CHIP_ID_BCM4706 &&
|
||||
cc->core->id.rev != 38) {
|
||||
@@ -33,8 +43,16 @@ int bcma_nflash_init(struct bcma_drv_cc
|
||||
|
||||
cc->nflash.present = true;
|
||||
if (cc->core->id.rev == 38 &&
|
||||
- (cc->status & BCMA_CC_CHIPST_5357_NAND_BOOT))
|
||||
+ (cc->status & BCMA_CC_CHIPST_5357_NAND_BOOT)) {
|
||||
cc->nflash.boot = true;
|
||||
+ /* Determine the chip select that is being used */
|
||||
+ reg = bcma_cc_read32(cc, BCMA_CC_NAND_CS_NAND_SELECT) & 0xff;
|
||||
+ cc->nflash.brcmnand_info.chip_select = ffs(reg) - 1;
|
||||
+ cc->nflash.brcmnand_info.part_probe_types = probes;
|
||||
+ cc->nflash.brcmnand_info.ecc_stepsize = 512;
|
||||
+ cc->nflash.brcmnand_info.ecc_strength = 1;
|
||||
+ bcma_nflash_dev.name = bcma_nflash_alt_name;
|
||||
+ }
|
||||
|
||||
/* Prepare platform device, but don't register it yet. It's too early,
|
||||
* malloc (required by device_private_init) is not available yet. */
|
||||
--- a/include/linux/bcma/bcma_driver_chipcommon.h
|
||||
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
|
||||
@@ -3,6 +3,7 @@
|
||||
#define LINUX_BCMA_DRIVER_CC_H_
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/platform_data/brcmnand.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
/** ChipCommon core registers. **/
|
||||
@@ -599,6 +600,10 @@ struct bcma_sflash {
|
||||
|
||||
#ifdef CONFIG_BCMA_NFLASH
|
||||
struct bcma_nflash {
|
||||
+ /* Must be the fist member for the brcmnand driver to
|
||||
+ * de-reference that structure.
|
||||
+ */
|
||||
+ struct brcmnand_platform_data brcmnand_info;
|
||||
bool present;
|
||||
bool boot; /* This is the flash the SoC boots from */
|
||||
};
|
||||
--- /dev/null
|
||||
+++ b/include/linux/platform_data/brcmnand.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
+#ifndef BRCMNAND_PLAT_DATA_H
|
||||
+#define BRCMNAND_PLAT_DATA_H
|
||||
+
|
||||
+struct brcmnand_platform_data {
|
||||
+ int chip_select;
|
||||
+ const char * const *part_probe_types;
|
||||
+ unsigned int ecc_stepsize;
|
||||
+ unsigned int ecc_strength;
|
||||
+};
|
||||
+
|
||||
+#endif /* BRCMNAND_PLAT_DATA_H */
|
||||
@ -1,124 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 7/9] mtd: rawnand: brcmnand: Allow platform data instantation
|
||||
Date: Fri, 07 Jan 2022 10:46:12 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
Make use of the recently refactored code in brcmnand_init_cs() and
|
||||
derive the chip-select from the platform data that is supplied. Update
|
||||
the various code paths to avoid relying on possibly non-existent
|
||||
resources, too.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 45 ++++++++++++++++++------
|
||||
1 file changed, 35 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
+#include <linux/platform_data/brcmnand.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -2811,7 +2812,8 @@ static const struct nand_controller_ops
|
||||
.attach_chip = brcmnand_attach_chip,
|
||||
};
|
||||
|
||||
-static int brcmnand_init_cs(struct brcmnand_host *host)
|
||||
+static int brcmnand_init_cs(struct brcmnand_host *host,
|
||||
+ const char * const *part_probe_types)
|
||||
{
|
||||
struct brcmnand_controller *ctrl = host->ctrl;
|
||||
struct device *dev = ctrl->dev;
|
||||
@@ -2864,7 +2866,7 @@ static int brcmnand_init_cs(struct brcmn
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = mtd_device_register(mtd, NULL, 0);
|
||||
+ ret = mtd_device_parse_register(mtd, part_probe_types, NULL, NULL, 0);
|
||||
if (ret)
|
||||
nand_cleanup(chip);
|
||||
|
||||
@@ -3033,17 +3035,15 @@ static int brcmnand_edu_setup(struct pla
|
||||
|
||||
int brcmnand_probe(struct platform_device *pdev, struct brcmnand_soc *soc)
|
||||
{
|
||||
+ struct brcmnand_platform_data *pd = dev_get_platdata(&pdev->dev);
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *dn = dev->of_node, *child;
|
||||
struct brcmnand_controller *ctrl;
|
||||
+ struct brcmnand_host *host;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
- /* We only support device-tree instantiation */
|
||||
- if (!dn)
|
||||
- return -ENODEV;
|
||||
-
|
||||
- if (!of_match_node(brcmnand_of_match, dn))
|
||||
+ if (dn && !of_match_node(brcmnand_of_match, dn))
|
||||
return -ENODEV;
|
||||
|
||||
ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL);
|
||||
@@ -3070,7 +3070,7 @@ int brcmnand_probe(struct platform_devic
|
||||
/* NAND register range */
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
ctrl->nand_base = devm_ioremap_resource(dev, res);
|
||||
- if (IS_ERR(ctrl->nand_base))
|
||||
+ if (IS_ERR(ctrl->nand_base) && !brcmnand_soc_has_ops(soc))
|
||||
return PTR_ERR(ctrl->nand_base);
|
||||
|
||||
/* Enable clock before using NAND registers */
|
||||
@@ -3218,7 +3218,6 @@ int brcmnand_probe(struct platform_devic
|
||||
|
||||
for_each_available_child_of_node(dn, child) {
|
||||
if (of_device_is_compatible(child, "brcm,nandcs")) {
|
||||
- struct brcmnand_host *host;
|
||||
|
||||
host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL);
|
||||
if (!host) {
|
||||
@@ -3238,7 +3237,7 @@ int brcmnand_probe(struct platform_devic
|
||||
|
||||
nand_set_flash_node(&host->chip, child);
|
||||
|
||||
- ret = brcmnand_init_cs(host);
|
||||
+ ret = brcmnand_init_cs(host, NULL);
|
||||
if (ret) {
|
||||
devm_kfree(dev, host);
|
||||
continue; /* Try all chip-selects */
|
||||
@@ -3248,6 +3247,32 @@ int brcmnand_probe(struct platform_devic
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!list_empty(&ctrl->host_list))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (!pd) {
|
||||
+ ret = -ENODEV;
|
||||
+ goto err;
|
||||
+ }
|
||||
+
|
||||
+ /* If we got there we must have been probing via platform data */
|
||||
+ host = devm_kzalloc(dev, sizeof(*host), GFP_KERNEL);
|
||||
+ if (!host) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto err;
|
||||
+ }
|
||||
+ host->pdev = pdev;
|
||||
+ host->ctrl = ctrl;
|
||||
+ host->cs = pd->chip_select;
|
||||
+ host->chip.ecc.size = pd->ecc_stepsize;
|
||||
+ host->chip.ecc.strength = pd->ecc_strength;
|
||||
+
|
||||
+ ret = brcmnand_init_cs(host, pd->part_probe_types);
|
||||
+ if (ret)
|
||||
+ goto err;
|
||||
+
|
||||
+ list_add_tail(&host->node, &ctrl->host_list);
|
||||
+
|
||||
/* No chip-selects could initialize properly */
|
||||
if (list_empty(&ctrl->host_list)) {
|
||||
ret = -ENODEV;
|
||||
@ -1,29 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 8/9] mtd: rawnand: brcmnand: BCMA controller uses command shift of 0
|
||||
Date: Fri, 07 Jan 2022 10:46:13 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
For some odd and unexplained reason the BCMA NAND controller, albeit
|
||||
revision 3.4 uses a command shift of 0 instead of 24 as it should be,
|
||||
quirk that.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -951,6 +951,12 @@ static void brcmnand_wr_corr_thresh(stru
|
||||
|
||||
static inline int brcmnand_cmd_shift(struct brcmnand_controller *ctrl)
|
||||
{
|
||||
+ /* Kludge for the BCMA-based NAND controller which does not actually
|
||||
+ * shift the command
|
||||
+ */
|
||||
+ if (ctrl->nand_version == 0x0304 && brcmnand_non_mmio_ops(ctrl))
|
||||
+ return 0;
|
||||
+
|
||||
if (ctrl->nand_version < 0x0602)
|
||||
return 24;
|
||||
return 0;
|
||||
@ -1,201 +0,0 @@
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Subject: [PATCH v3 9/9] mtd: rawnand: brcmnand: Add BCMA shim
|
||||
Date: Fri, 07 Jan 2022 10:46:14 -0800
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
Add a BCMA shim to allow us to register the brcmnand driver using the
|
||||
BCMA bus which provides indirect memory mapped access to SoC registers.
|
||||
|
||||
There are a number of registers that need to be byte swapped because
|
||||
they are natively big endian, coming directly from the NAND chip, and
|
||||
there is no bus interface unlike the iProc or STB platforms that
|
||||
performs the byte swapping for us.
|
||||
|
||||
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/mtd/nand/raw/Kconfig | 13 +++
|
||||
drivers/mtd/nand/raw/brcmnand/Makefile | 2 +
|
||||
drivers/mtd/nand/raw/brcmnand/bcma_nand.c | 132 ++++++++++++++++++++++
|
||||
drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 +
|
||||
4 files changed, 151 insertions(+)
|
||||
create mode 100644 drivers/mtd/nand/raw/brcmnand/bcma_nand.c
|
||||
|
||||
--- a/drivers/mtd/nand/raw/Kconfig
|
||||
+++ b/drivers/mtd/nand/raw/Kconfig
|
||||
@@ -208,6 +208,19 @@ config MTD_NAND_BRCMNAND
|
||||
originally designed for Set-Top Box but is used on various BCM7xxx,
|
||||
BCM3xxx, BCM63xxx, iProc/Cygnus and more.
|
||||
|
||||
+if MTD_NAND_BRCMNAND
|
||||
+
|
||||
+config MTD_NAND_BRCMNAND_BCMA
|
||||
+ tristate "Broadcom BCMA NAND controller"
|
||||
+ depends on BCMA_NFLASH
|
||||
+ depends on BCMA
|
||||
+ help
|
||||
+ Enables the BRCMNAND controller over BCMA on BCM47186/BCM5358 SoCs.
|
||||
+ The glue driver will take care of performing the low-level I/O
|
||||
+ operations to interface the BRCMNAND controller over the BCMA bus.
|
||||
+
|
||||
+endif # MTD_NAND_BRCMNAND
|
||||
+
|
||||
config MTD_NAND_BCM47XXNFLASH
|
||||
tristate "BCM4706 BCMA NAND controller"
|
||||
depends on BCMA_NFLASH
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/Makefile
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/Makefile
|
||||
@@ -6,3 +6,5 @@ obj-$(CONFIG_MTD_NAND_BRCMNAND) += bcm6
|
||||
obj-$(CONFIG_MTD_NAND_BRCMNAND) += bcm6368_nand.o
|
||||
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmstb_nand.o
|
||||
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand.o
|
||||
+
|
||||
+obj-$(CONFIG_MTD_NAND_BRCMNAND_BCMA) += bcma_nand.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/bcma_nand.c
|
||||
@@ -0,0 +1,132 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+/*
|
||||
+ * Copyright © 2021 Broadcom
|
||||
+ */
|
||||
+#include <linux/bcma/bcma.h>
|
||||
+#include <linux/bcma/bcma_driver_chipcommon.h>
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+
|
||||
+#include "brcmnand.h"
|
||||
+
|
||||
+struct brcmnand_bcma_soc {
|
||||
+ struct brcmnand_soc soc;
|
||||
+ struct bcma_drv_cc *cc;
|
||||
+};
|
||||
+
|
||||
+static inline bool brcmnand_bcma_needs_swapping(u32 offset)
|
||||
+{
|
||||
+ switch (offset) {
|
||||
+ case BCMA_CC_NAND_SPARE_RD0:
|
||||
+ case BCMA_CC_NAND_SPARE_RD4:
|
||||
+ case BCMA_CC_NAND_SPARE_RD8:
|
||||
+ case BCMA_CC_NAND_SPARE_RD12:
|
||||
+ case BCMA_CC_NAND_SPARE_WR0:
|
||||
+ case BCMA_CC_NAND_SPARE_WR4:
|
||||
+ case BCMA_CC_NAND_SPARE_WR8:
|
||||
+ case BCMA_CC_NAND_SPARE_WR12:
|
||||
+ case BCMA_CC_NAND_DEVID:
|
||||
+ case BCMA_CC_NAND_DEVID_X:
|
||||
+ case BCMA_CC_NAND_SPARE_RD16:
|
||||
+ case BCMA_CC_NAND_SPARE_RD20:
|
||||
+ case BCMA_CC_NAND_SPARE_RD24:
|
||||
+ case BCMA_CC_NAND_SPARE_RD28:
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+static inline struct brcmnand_bcma_soc *to_bcma_soc(struct brcmnand_soc *soc)
|
||||
+{
|
||||
+ return container_of(soc, struct brcmnand_bcma_soc, soc);
|
||||
+}
|
||||
+
|
||||
+static u32 brcmnand_bcma_read_reg(struct brcmnand_soc *soc, u32 offset)
|
||||
+{
|
||||
+ struct brcmnand_bcma_soc *sc = to_bcma_soc(soc);
|
||||
+ u32 val;
|
||||
+
|
||||
+ /* Offset into the NAND block and deal with the flash cache separately */
|
||||
+ if (offset == BRCMNAND_NON_MMIO_FC_ADDR)
|
||||
+ offset = BCMA_CC_NAND_CACHE_DATA;
|
||||
+ else
|
||||
+ offset += BCMA_CC_NAND_REVISION;
|
||||
+
|
||||
+ val = bcma_cc_read32(sc->cc, offset);
|
||||
+
|
||||
+ /* Swap if necessary */
|
||||
+ if (brcmnand_bcma_needs_swapping(offset))
|
||||
+ val = be32_to_cpu(val);
|
||||
+ return val;
|
||||
+}
|
||||
+
|
||||
+static void brcmnand_bcma_write_reg(struct brcmnand_soc *soc, u32 val,
|
||||
+ u32 offset)
|
||||
+{
|
||||
+ struct brcmnand_bcma_soc *sc = to_bcma_soc(soc);
|
||||
+
|
||||
+ /* Offset into the NAND block */
|
||||
+ if (offset == BRCMNAND_NON_MMIO_FC_ADDR)
|
||||
+ offset = BCMA_CC_NAND_CACHE_DATA;
|
||||
+ else
|
||||
+ offset += BCMA_CC_NAND_REVISION;
|
||||
+
|
||||
+ /* Swap if necessary */
|
||||
+ if (brcmnand_bcma_needs_swapping(offset))
|
||||
+ val = cpu_to_be32(val);
|
||||
+
|
||||
+ bcma_cc_write32(sc->cc, offset, val);
|
||||
+}
|
||||
+
|
||||
+static struct brcmnand_io_ops brcmnand_bcma_io_ops = {
|
||||
+ .read_reg = brcmnand_bcma_read_reg,
|
||||
+ .write_reg = brcmnand_bcma_write_reg,
|
||||
+};
|
||||
+
|
||||
+static void brcmnand_bcma_prepare_data_bus(struct brcmnand_soc *soc, bool prepare,
|
||||
+ bool is_param)
|
||||
+{
|
||||
+ struct brcmnand_bcma_soc *sc = to_bcma_soc(soc);
|
||||
+
|
||||
+ /* Reset the cache address to ensure we are already accessing the
|
||||
+ * beginning of a sub-page.
|
||||
+ */
|
||||
+ bcma_cc_write32(sc->cc, BCMA_CC_NAND_CACHE_ADDR, 0);
|
||||
+}
|
||||
+
|
||||
+static int brcmnand_bcma_nand_probe(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct bcma_nflash *nflash = dev_get_platdata(&pdev->dev);
|
||||
+ struct brcmnand_bcma_soc *soc;
|
||||
+
|
||||
+ soc = devm_kzalloc(&pdev->dev, sizeof(*soc), GFP_KERNEL);
|
||||
+ if (!soc)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ soc->cc = container_of(nflash, struct bcma_drv_cc, nflash);
|
||||
+ soc->soc.prepare_data_bus = brcmnand_bcma_prepare_data_bus;
|
||||
+ soc->soc.ops = &brcmnand_bcma_io_ops;
|
||||
+
|
||||
+ if (soc->cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
|
||||
+ dev_err(&pdev->dev, "Use bcm47xxnflash for 4706!\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ return brcmnand_probe(pdev, &soc->soc);
|
||||
+}
|
||||
+
|
||||
+static struct platform_driver brcmnand_bcma_nand_driver = {
|
||||
+ .probe = brcmnand_bcma_nand_probe,
|
||||
+ .remove = brcmnand_remove,
|
||||
+ .driver = {
|
||||
+ .name = "bcma_brcmnand",
|
||||
+ .pm = &brcmnand_pm_ops,
|
||||
+ }
|
||||
+};
|
||||
+module_platform_driver(brcmnand_bcma_nand_driver);
|
||||
+
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
+MODULE_AUTHOR("Broadcom");
|
||||
+MODULE_DESCRIPTION("NAND controller driver glue for BCMA chips");
|
||||
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
|
||||
@@ -627,7 +627,11 @@ enum {
|
||||
|
||||
static inline bool brcmnand_non_mmio_ops(struct brcmnand_controller *ctrl)
|
||||
{
|
||||
+#if IS_ENABLED(CONFIG_MTD_NAND_BRCMNAND_BCMA)
|
||||
return static_branch_unlikely(&brcmnand_soc_has_ops_key);
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static inline u32 nand_readreg(struct brcmnand_controller *ctrl, u32 offs)
|
||||
@ -1,61 +0,0 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Mon, 27 Feb 2023 07:44:38 +0100
|
||||
Subject: [PATCH] MIPS: BCM47XX: Add support for Huawei B593u-12
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
It's a BCM5358 based home router. One of very few bcm47xx devices with
|
||||
cellular modems (here: LTE).
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
arch/mips/bcm47xx/board.c | 1 +
|
||||
arch/mips/bcm47xx/leds.c | 8 ++++++++
|
||||
arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h | 1 +
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/mips/bcm47xx/board.c
|
||||
+++ b/arch/mips/bcm47xx/board.c
|
||||
@@ -193,6 +193,7 @@ struct bcm47xx_board_type_list1 bcm47xx_
|
||||
/* boardtype, boardnum, boardrev */
|
||||
static const
|
||||
struct bcm47xx_board_type_list3 bcm47xx_board_list_board[] __initconst = {
|
||||
+ {{BCM47XX_BOARD_HUAWEI_B593U_12, "Huawei B593u-12"}, "0x053d", "1234", "0x1301"},
|
||||
{{BCM47XX_BOARD_HUAWEI_E970, "Huawei E970"}, "0x048e", "0x5347", "0x11"},
|
||||
{{BCM47XX_BOARD_PHICOMM_M1, "Phicomm M1"}, "0x0590", "80", "0x1104"},
|
||||
{{BCM47XX_BOARD_ZTE_H218N, "ZTE H218N"}, "0x053d", "1234", "0x1305"},
|
||||
--- a/arch/mips/bcm47xx/leds.c
|
||||
+++ b/arch/mips/bcm47xx/leds.c
|
||||
@@ -223,6 +223,11 @@ bcm47xx_leds_dlink_dir330[] __initconst
|
||||
/* Huawei */
|
||||
|
||||
static const struct gpio_led
|
||||
+bcm47xx_leds_huawei_b593u_12[] __initconst = {
|
||||
+ BCM47XX_GPIO_LED(5, "blue", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
+};
|
||||
+
|
||||
+static const struct gpio_led
|
||||
bcm47xx_leds_huawei_e970[] __initconst = {
|
||||
BCM47XX_GPIO_LED(0, "unk", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
|
||||
};
|
||||
@@ -672,6 +677,9 @@ void __init bcm47xx_leds_register(void)
|
||||
bcm47xx_set_pdata(bcm47xx_leds_dlink_dir330);
|
||||
break;
|
||||
|
||||
+ case BCM47XX_BOARD_HUAWEI_B593U_12:
|
||||
+ bcm47xx_set_pdata(bcm47xx_leds_huawei_b593u_12);
|
||||
+ break;
|
||||
case BCM47XX_BOARD_HUAWEI_E970:
|
||||
bcm47xx_set_pdata(bcm47xx_leds_huawei_e970);
|
||||
break;
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
|
||||
@@ -53,6 +53,7 @@ enum bcm47xx_board {
|
||||
BCM47XX_BOARD_DLINK_DIR130,
|
||||
BCM47XX_BOARD_DLINK_DIR330,
|
||||
|
||||
+ BCM47XX_BOARD_HUAWEI_B593U_12,
|
||||
BCM47XX_BOARD_HUAWEI_E970,
|
||||
|
||||
BCM47XX_BOARD_LINKSYS_E900V1,
|
||||
@ -298,8 +298,8 @@
|
||||
#endif
|
||||
--- a/arch/mips/kernel/genex.S
|
||||
+++ b/arch/mips/kernel/genex.S
|
||||
@@ -22,6 +22,19 @@
|
||||
#include <asm/war.h>
|
||||
@@ -21,6 +21,19 @@
|
||||
#include <asm/sync.h>
|
||||
#include <asm/thread_info.h>
|
||||
|
||||
+#ifdef CONFIG_BCM47XX
|
||||
@ -318,7 +318,7 @@
|
||||
__INIT
|
||||
|
||||
/*
|
||||
@@ -33,6 +46,9 @@
|
||||
@@ -32,6 +45,9 @@
|
||||
NESTED(except_vec3_generic, 0, sp)
|
||||
.set push
|
||||
.set noat
|
||||
@ -328,7 +328,7 @@
|
||||
mfc0 k1, CP0_CAUSE
|
||||
andi k1, k1, 0x7c
|
||||
#ifdef CONFIG_64BIT
|
||||
@@ -53,6 +69,9 @@ NESTED(except_vec3_r4000, 0, sp)
|
||||
@@ -52,6 +68,9 @@ NESTED(except_vec3_r4000, 0, sp)
|
||||
.set push
|
||||
.set arch=r4000
|
||||
.set noat
|
||||
@ -340,7 +340,7 @@
|
||||
andi k1, k1, 0x7c
|
||||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -38,6 +38,9 @@
|
||||
@@ -37,6 +37,9 @@
|
||||
#include <asm/traps.h>
|
||||
#include <asm/mips-cps.h>
|
||||
|
||||
@ -350,27 +350,27 @@
|
||||
/*
|
||||
* Bits describing what cache ops an SMP callback function may perform.
|
||||
*
|
||||
@@ -190,6 +193,9 @@ static void r4k_blast_dcache_user_page_s
|
||||
@@ -144,6 +147,9 @@ static void r4k_blast_dcache_page_setup(
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page = blast_dcache_page;
|
||||
+ else
|
||||
switch (dc_lsize) {
|
||||
case 0:
|
||||
r4k_blast_dcache_page = (void *)cache_noop;
|
||||
@@ -175,6 +181,9 @@ static void r4k_blast_dcache_user_page_s
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_user_page = blast_dcache_user_page;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_user_page = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -208,6 +214,9 @@ static void r4k_blast_dcache_page_indexe
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_page_indexed = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -227,6 +236,9 @@ static void r4k_blast_dcache_setup(void)
|
||||
@@ -194,6 +203,9 @@ static void r4k_blast_dcache_setup(void)
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
@ -380,7 +380,7 @@
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -1826,6 +1838,17 @@ static void coherency_setup(void)
|
||||
@@ -1669,6 +1681,17 @@ static void coherency_setup(void)
|
||||
* silly idea of putting something else there ...
|
||||
*/
|
||||
switch (current_cpu_type()) {
|
||||
@ -398,7 +398,7 @@
|
||||
case CPU_R4000PC:
|
||||
case CPU_R4000SC:
|
||||
case CPU_R4000MC:
|
||||
@@ -1872,6 +1895,15 @@ void r4k_cache_init(void)
|
||||
@@ -1715,6 +1738,15 @@ void r4k_cache_init(void)
|
||||
extern void build_copy_page(void);
|
||||
struct cpuinfo_mips *c = ¤t_cpu_data;
|
||||
|
||||
@ -414,7 +414,7 @@
|
||||
probe_pcache();
|
||||
probe_vcache();
|
||||
setup_scache();
|
||||
@@ -1944,7 +1976,15 @@ void r4k_cache_init(void)
|
||||
@@ -1777,7 +1809,15 @@ void r4k_cache_init(void)
|
||||
*/
|
||||
local_r4k___flush_cache_all(NULL);
|
||||
|
||||
@ -432,7 +432,7 @@
|
||||
/*
|
||||
--- a/arch/mips/mm/tlbex.c
|
||||
+++ b/arch/mips/mm/tlbex.c
|
||||
@@ -985,6 +985,9 @@ void build_get_pgde32(u32 **p, unsigned
|
||||
@@ -958,6 +958,9 @@ void build_get_pgde32(u32 **p, unsigned
|
||||
uasm_i_srl(p, ptr, ptr, SMP_CPUID_PTRSHIFT);
|
||||
uasm_i_addu(p, ptr, tmp, ptr);
|
||||
#else
|
||||
@ -442,7 +442,7 @@
|
||||
UASM_i_LA_mostly(p, ptr, pgdc);
|
||||
#endif
|
||||
uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
|
||||
@@ -1347,6 +1350,9 @@ static void build_r4000_tlb_refill_handl
|
||||
@@ -1304,6 +1307,9 @@ static void build_r4000_tlb_refill_handl
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */
|
||||
#else
|
||||
@ -452,7 +452,7 @@
|
||||
build_get_pgde32(&p, K0, K1); /* get pgd in K1 */
|
||||
#endif
|
||||
|
||||
@@ -1358,6 +1364,9 @@ static void build_r4000_tlb_refill_handl
|
||||
@@ -1315,6 +1321,9 @@ static void build_r4000_tlb_refill_handl
|
||||
build_update_entries(&p, K0, K1);
|
||||
build_tlb_write_entry(&p, &l, &r, tlb_random);
|
||||
uasm_l_leave(&l, p);
|
||||
@ -462,7 +462,7 @@
|
||||
uasm_i_eret(&p); /* return from trap */
|
||||
}
|
||||
#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
|
||||
@@ -2059,6 +2068,9 @@ build_r4000_tlbchange_handler_head(u32 *
|
||||
@@ -2016,6 +2025,9 @@ build_r4000_tlbchange_handler_head(u32 *
|
||||
#ifdef CONFIG_64BIT
|
||||
build_get_pmde64(p, l, r, wr.r1, wr.r2); /* get pmd in ptr */
|
||||
#else
|
||||
@ -472,7 +472,7 @@
|
||||
build_get_pgde32(p, wr.r1, wr.r2); /* get pgd in ptr */
|
||||
#endif
|
||||
|
||||
@@ -2105,6 +2117,9 @@ build_r4000_tlbchange_handler_tail(u32 *
|
||||
@@ -2062,6 +2074,9 @@ build_r4000_tlbchange_handler_tail(u32 *
|
||||
build_tlb_write_entry(p, l, r, tlb_indexed);
|
||||
uasm_l_leave(l, *p);
|
||||
build_restore_work_registers(p);
|
||||
@ -20,7 +20,7 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485
|
||||
* I-Cache snoops remote store. This only matters on SMP. Some multiprocessors
|
||||
--- a/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm47xx/cpu-feature-overrides.h
|
||||
@@ -80,4 +80,6 @@
|
||||
@@ -79,4 +79,6 @@
|
||||
#define cpu_scache_line_size() 0
|
||||
#define cpu_has_vz 0
|
||||
|
||||
@ -29,16 +29,7 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485
|
||||
#endif /* __ASM_MACH_BCM47XX_CPU_FEATURE_OVERRIDES_H */
|
||||
--- a/arch/mips/mm/c-r4k.c
|
||||
+++ b/arch/mips/mm/c-r4k.c
|
||||
@@ -702,7 +702,7 @@ static inline void local_r4k_flush_cache
|
||||
map_coherent = (cpu_has_dc_aliases &&
|
||||
page_mapcount(page) &&
|
||||
!Page_dcache_dirty(page));
|
||||
- if (map_coherent)
|
||||
+ if (map_coherent && cpu_use_kmap_coherent)
|
||||
vaddr = kmap_coherent(page, addr);
|
||||
else
|
||||
vaddr = kmap_atomic(page);
|
||||
@@ -729,7 +729,7 @@ static inline void local_r4k_flush_cache
|
||||
@@ -618,7 +618,7 @@ static inline void local_r4k_flush_cache
|
||||
}
|
||||
|
||||
if (vaddr) {
|
||||
@ -49,30 +40,30 @@ This fixes OpenWrt ticket #1485: https://dev.openwrt.org/ticket/1485
|
||||
kunmap_atomic(vaddr);
|
||||
--- a/arch/mips/mm/init.c
|
||||
+++ b/arch/mips/mm/init.c
|
||||
@@ -172,7 +172,7 @@ void copy_user_highpage(struct page *to,
|
||||
@@ -173,7 +173,7 @@ void copy_user_highpage(struct page *to,
|
||||
void *vfrom, *vto;
|
||||
|
||||
vto = kmap_atomic(to);
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapcount(from) && !Page_dcache_dirty(from)) {
|
||||
folio_mapped(src) && !folio_test_dcache_dirty(src)) {
|
||||
vfrom = kmap_coherent(from, vaddr);
|
||||
copy_page(vto, vfrom);
|
||||
@@ -194,7 +194,7 @@ void copy_to_user_page(struct vm_area_st
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
@@ -197,7 +197,7 @@ void copy_to_user_page(struct vm_area_st
|
||||
{
|
||||
struct folio *folio = page_folio(page);
|
||||
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapcount(page) && !Page_dcache_dirty(page)) {
|
||||
folio_mapped(folio) && !folio_test_dcache_dirty(folio)) {
|
||||
void *vto = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(vto, src, len);
|
||||
@@ -212,7 +212,7 @@ void copy_from_user_page(struct vm_area_
|
||||
struct page *page, unsigned long vaddr, void *dst, const void *src,
|
||||
unsigned long len)
|
||||
@@ -217,7 +217,7 @@ void copy_from_user_page(struct vm_area_
|
||||
{
|
||||
struct folio *folio = page_folio(page);
|
||||
|
||||
- if (cpu_has_dc_aliases &&
|
||||
+ if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
page_mapcount(page) && !Page_dcache_dirty(page)) {
|
||||
folio_mapped(folio) && !folio_test_dcache_dirty(folio)) {
|
||||
void *vfrom = kmap_coherent(page, vaddr) + (vaddr & ~PAGE_MASK);
|
||||
memcpy(dst, vfrom, len);
|
||||
@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
||||
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
@@ -2247,6 +2249,69 @@ static void b44_adjust_link(struct net_d
|
||||
@@ -2227,6 +2229,69 @@ static void b44_adjust_link(struct net_d
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
||||
static int b44_register_phy_one(struct b44 *bp)
|
||||
{
|
||||
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
|
||||
@@ -2283,6 +2348,9 @@ static int b44_register_phy_one(struct b
|
||||
@@ -2263,6 +2328,9 @@ static int b44_register_phy_one(struct b
|
||||
if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
|
||||
(sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
|
||||
|
||||
@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch
|
||||
dev_info(sdev->dev,
|
||||
"could not find PHY at %i, use fixed one\n",
|
||||
bp->phy_addr);
|
||||
@@ -2477,6 +2545,7 @@ static void b44_remove_one(struct ssb_de
|
||||
@@ -2457,6 +2525,7 @@ static void b44_remove_one(struct ssb_de
|
||||
unregister_netdev(dev);
|
||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||
b44_unregister_phy_one(bp);
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/ethernet/broadcom/b44.c
|
||||
+++ b/drivers/net/ethernet/broadcom/b44.c
|
||||
@@ -430,10 +430,34 @@ static void b44_wap54g10_workaround(stru
|
||||
@@ -408,10 +408,34 @@ static void b44_wap54g10_workaround(stru
|
||||
error:
|
||||
pr_warn("PHY: cannot reset MII transceiver isolate bit\n");
|
||||
}
|
||||
@ -35,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
static int b44_setup_phy(struct b44 *bp)
|
||||
@@ -442,6 +466,7 @@ static int b44_setup_phy(struct b44 *bp)
|
||||
@@ -420,6 +444,7 @@ static int b44_setup_phy(struct b44 *bp)
|
||||
int err;
|
||||
|
||||
b44_wap54g10_workaround(bp);
|
||||
@ -43,12 +43,12 @@
|
||||
|
||||
if (bp->flags & B44_FLAG_EXTERNAL_PHY)
|
||||
return 0;
|
||||
@@ -2177,6 +2202,8 @@ static int b44_get_invariants(struct b44
|
||||
@@ -2157,6 +2182,8 @@ static int b44_get_invariants(struct b44
|
||||
* valid PHY address. */
|
||||
bp->phy_addr &= 0x1F;
|
||||
|
||||
+ b44_bcm47xx_workarounds(bp);
|
||||
+
|
||||
memcpy(bp->dev->dev_addr, addr, ETH_ALEN);
|
||||
eth_hw_addr_set(bp->dev, addr);
|
||||
|
||||
if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
|
||||
@ -41,18 +41,19 @@ For details see OpenWrt ticket #2035 https://dev.openwrt.org/ticket/2035
|
||||
* These are used to make use of C type-checking..
|
||||
--- a/arch/mips/mm/init.c
|
||||
+++ b/arch/mips/mm/init.c
|
||||
@@ -166,30 +166,6 @@ void kunmap_coherent(void)
|
||||
@@ -166,31 +166,6 @@ void kunmap_coherent(void)
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
-void copy_user_highpage(struct page *to, struct page *from,
|
||||
- unsigned long vaddr, struct vm_area_struct *vma)
|
||||
-{
|
||||
- struct folio *src = page_folio(from);
|
||||
- void *vfrom, *vto;
|
||||
-
|
||||
- vto = kmap_atomic(to);
|
||||
- if (cpu_has_dc_aliases && cpu_use_kmap_coherent &&
|
||||
- page_mapcount(from) && !Page_dcache_dirty(from)) {
|
||||
- folio_mapped(src) && !folio_test_dcache_dirty(src)) {
|
||||
- vfrom = kmap_coherent(from, vaddr);
|
||||
- copy_page(vto, vfrom);
|
||||
- kunmap_coherent();
|
||||
@ -5,7 +5,7 @@ when a switch driver is in use.
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/tg3.c
|
||||
+++ b/drivers/net/ethernet/broadcom/tg3.c
|
||||
@@ -4268,7 +4268,8 @@ static int tg3_power_down_prepare(struct
|
||||
@@ -4269,7 +4269,8 @@ static int tg3_power_down_prepare(struct
|
||||
static void tg3_power_down(struct tg3 *tp)
|
||||
{
|
||||
pci_wake_from_d3(tp->pdev, tg3_flag(tp, WOL_ENABLE));
|
||||
@ -52,7 +52,7 @@
|
||||
device_initcall(bcm47xx_register_bus_complete);
|
||||
--- a/arch/mips/configs/bcm47xx_defconfig
|
||||
+++ b/arch/mips/configs/bcm47xx_defconfig
|
||||
@@ -63,6 +63,7 @@ CONFIG_HW_RANDOM=y
|
||||
@@ -62,6 +62,7 @@ CONFIG_HW_RANDOM=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
@ -4,7 +4,7 @@ Signed-off-by: Mathias Adam <m.adam--openwrt@adamis.de>
|
||||
|
||||
--- a/drivers/watchdog/Kconfig
|
||||
+++ b/drivers/watchdog/Kconfig
|
||||
@@ -1664,6 +1664,15 @@ config WDT_MTX1
|
||||
@@ -1755,6 +1755,15 @@ config WDT_MTX1
|
||||
Hardware driver for the MTX-1 boards. This is a watchdog timer that
|
||||
will reboot the machine after a 100 seconds timer expired.
|
||||
|
||||
@ -22,7 +22,7 @@ Signed-off-by: Mathias Adam <m.adam--openwrt@adamis.de>
|
||||
depends on CPU_SB1
|
||||
--- a/drivers/watchdog/Makefile
|
||||
+++ b/drivers/watchdog/Makefile
|
||||
@@ -159,6 +159,7 @@ obj-$(CONFIG_RC32434_WDT) += rc32434_wdt
|
||||
@@ -167,6 +167,7 @@ obj-$(CONFIG_RC32434_WDT) += rc32434_wdt
|
||||
obj-$(CONFIG_INDYDOG) += indydog.o
|
||||
obj-$(CONFIG_JZ4740_WDT) += jz4740_wdt.o
|
||||
obj-$(CONFIG_WDT_MTX1) += mtx-1_wdt.o
|
||||
@ -1,6 +1,6 @@
|
||||
--- a/drivers/pcmcia/yenta_socket.c
|
||||
+++ b/drivers/pcmcia/yenta_socket.c
|
||||
@@ -923,6 +923,8 @@ static struct cardbus_type cardbus_type[
|
||||
@@ -925,6 +925,8 @@ static struct cardbus_type cardbus_type[
|
||||
|
||||
static unsigned int yenta_probe_irq(struct yenta_socket *socket, u32 isa_irq_mask)
|
||||
{
|
||||
@ -9,7 +9,7 @@
|
||||
int i;
|
||||
unsigned long val;
|
||||
u32 mask;
|
||||
@@ -951,6 +953,9 @@ static unsigned int yenta_probe_irq(stru
|
||||
@@ -953,6 +955,9 @@ static unsigned int yenta_probe_irq(stru
|
||||
mask = probe_irq_mask(val) & 0xffff;
|
||||
|
||||
return mask;
|
||||
@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -1031,6 +1036,10 @@ static void yenta_get_socket_capabilitie
|
||||
@@ -1033,6 +1038,10 @@ static void yenta_get_socket_capabilitie
|
||||
else
|
||||
socket->socket.irq_mask = 0;
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
dev_info(&socket->dev->dev, "ISA IRQ mask 0x%04x, PCI irq %d\n",
|
||||
socket->socket.irq_mask, socket->cb_irq);
|
||||
}
|
||||
@@ -1262,6 +1271,15 @@ static int yenta_probe(struct pci_dev *d
|
||||
@@ -1264,6 +1273,15 @@ static int yenta_probe(struct pci_dev *d
|
||||
dev_info(&dev->dev, "Socket status: %08x\n",
|
||||
cb_readl(socket, CB_SOCKET_STATE));
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
static int cfe_env;
|
||||
--- a/arch/mips/mm/cache.c
|
||||
+++ b/arch/mips/mm/cache.c
|
||||
@@ -63,6 +63,9 @@ void (*_dma_cache_wback_inv)(unsigned lo
|
||||
@@ -80,6 +80,9 @@ void (*_dma_cache_wback_inv)(unsigned lo
|
||||
void (*_dma_cache_wback)(unsigned long start, unsigned long size);
|
||||
void (*_dma_cache_inv)(unsigned long start, unsigned long size);
|
||||
|
||||
@ -167,7 +167,7 @@ static void routerboot_find_dynparts(struct mtd_info *master)
|
||||
while (offset < master->size) {
|
||||
err = mtd_read(master, offset, sizeof(buf), &bytes_read, (u8 *)&buf);
|
||||
if (err) {
|
||||
pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",
|
||||
pr_err("%s: mtd_read error while parsing (offset: 0x%zX): %d\n",
|
||||
master->name, offset, err);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Mon, 20 May 2024 14:29:58 +0200
|
||||
Subject: [PATCH] net: ethernet: mtk_eth_soc: use napi_build_skb()
|
||||
|
||||
The napi_build_skb() can reuse the skb in skb cache per CPU or
|
||||
can allocate skbs in bulk, which helps improve the performance.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -2123,7 +2123,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
if (ret != XDP_PASS)
|
||||
goto skip_rx;
|
||||
|
||||
- skb = build_skb(data, PAGE_SIZE);
|
||||
+ skb = napi_build_skb(data, PAGE_SIZE);
|
||||
if (unlikely(!skb)) {
|
||||
page_pool_put_full_page(ring->page_pool,
|
||||
page, true);
|
||||
@@ -2161,7 +2161,7 @@ static int mtk_poll_rx(struct napi_struc
|
||||
dma_unmap_single(eth->dma_dev, ((u64)trxd.rxd1 | addr64),
|
||||
ring->buf_size, DMA_FROM_DEVICE);
|
||||
|
||||
- skb = build_skb(data, ring->frag_size);
|
||||
+ skb = napi_build_skb(data, ring->frag_size);
|
||||
if (unlikely(!skb)) {
|
||||
netdev->stats.rx_dropped++;
|
||||
skb_free_frag(data);
|
||||
@ -10,6 +10,7 @@ FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubif
|
||||
SUBTARGETS:=cortexa7 cortexa9 cortexa53
|
||||
|
||||
KERNEL_PATCHVER:=6.1
|
||||
KERNEL_TESTING_PATCHVER:=6.6
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
||||
497
target/linux/imx/config-6.6
Normal file
497
target/linux/imx/config-6.6
Normal file
@ -0,0 +1,497 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_MXC=y
|
||||
CONFIG_ARCH_NR_GPIO=0
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_ARM_ERRATA_754322=y
|
||||
CONFIG_ARM_ERRATA_764369=y
|
||||
CONFIG_ARM_ERRATA_775420=y
|
||||
CONFIG_ARM_ERRATA_814220=y
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
# CONFIG_ARM_IMX6Q_CPUFREQ is not set
|
||||
# CONFIG_ARM_IMX_CPUFREQ_DT is not set
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ASN1=y
|
||||
CONFIG_ASSOCIATIVE_ARRAY=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_ATAGS=y
|
||||
# CONFIG_ATA_SFF is not set
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_PM=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CLKSRC_IMX_GPT=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
# CONFIG_CLK_IMX8MM is not set
|
||||
# CONFIG_CLK_IMX8MN is not set
|
||||
# CONFIG_CLK_IMX8MP is not set
|
||||
# CONFIG_CLK_IMX8MQ is not set
|
||||
# CONFIG_CLK_IMX8ULP is not set
|
||||
# CONFIG_CLK_IMX93 is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_CLZ_TAB=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
|
||||
CONFIG_CPU_FREQ_GOV_COMMON=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_THERMAL=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_AES_ARM=y
|
||||
CONFIG_CRYPTO_AES_ARM_BS=y
|
||||
CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y
|
||||
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
|
||||
CONFIG_CRYPTO_AUTHENC=y
|
||||
CONFIG_CRYPTO_BLAKE2S_ARM=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CHACHA20=y
|
||||
CONFIG_CRYPTO_CHACHA20_NEON=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_CRC32_ARM_CE=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_CTS=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
|
||||
# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
|
||||
# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
|
||||
# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_PRNG_API=y
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
|
||||
CONFIG_CRYPTO_DRBG=y
|
||||
CONFIG_CRYPTO_DRBG_HMAC=y
|
||||
CONFIG_CRYPTO_DRBG_MENU=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_ECDH=y
|
||||
CONFIG_CRYPTO_ENGINE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
CONFIG_CRYPTO_HW=y
|
||||
CONFIG_CRYPTO_JITTERENTROPY=y
|
||||
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_DES=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_RNG_DEFAULT=y
|
||||
CONFIG_CRYPTO_RSA=y
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA1_ARM=y
|
||||
CONFIG_CRYPTO_SHA1_ARM_NEON=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA256_ARM=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_SHA512_ARM=y
|
||||
CONFIG_CRYPTO_SIMD=y
|
||||
CONFIG_CRYPTO_XTS=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
|
||||
CONFIG_DEBUG_MISC=y
|
||||
CONFIG_DECOMPRESS_BZIP2=y
|
||||
CONFIG_DECOMPRESS_GZIP=y
|
||||
CONFIG_DECOMPRESS_LZO=y
|
||||
CONFIG_DECOMPRESS_XZ=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
# CONFIG_DRM_FSL_LDB is not set
|
||||
# CONFIG_DRM_IMX8QM_LDB is not set
|
||||
# CONFIG_DRM_IMX8QXP_LDB is not set
|
||||
# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set
|
||||
# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set
|
||||
# CONFIG_DRM_IMX_LCDC is not set
|
||||
# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set
|
||||
# CONFIG_VIDEO_IMX_MIPI_CSIS is not set
|
||||
# CONFIG_VIDEO_IMX8_ISI is not set
|
||||
# CONFIG_VIDEO_IMX8MQ_MIPI_CSI2 is not set
|
||||
# CONFIG_VIDEO_DW100 is not set
|
||||
# CONFIG_VIDEO_ROCKCHIP_ISP1 is not set
|
||||
# CONFIG_VIDEO_HANTRO is not set
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_ENCRYPTED_KEYS=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_FEC=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
# CONFIG_FSL_DPAA2_SWITCH is not set
|
||||
CONFIG_FSL_GUTS=y
|
||||
CONFIG_FS_ENCRYPTION=y
|
||||
CONFIG_FS_ENCRYPTION_ALGS=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_MSI_IRQ=y
|
||||
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
# CONFIG_GIANFAR is not set
|
||||
CONFIG_GLOB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GPIO_MXC=y
|
||||
CONFIG_GPIO_VF610=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HWMON=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_IMX=y
|
||||
# CONFIG_I2C_IMX_LPI2C is not set
|
||||
CONFIG_I2C_SLAVE=y
|
||||
# CONFIG_I2C_SLAVE_TESTUNIT is not set
|
||||
CONFIG_IMX2_WDT=y
|
||||
# CONFIG_IMX7ULP_WDT is not set
|
||||
# CONFIG_IMX8MM_THERMAL is not set
|
||||
# CONFIG_IMX93_ADC is not set
|
||||
CONFIG_IMX_DMA=y
|
||||
# CONFIG_IMX_GPCV2_PM_DOMAINS is not set
|
||||
CONFIG_IMX_INTMUX=y
|
||||
CONFIG_IMX_IRQSTEER=y
|
||||
CONFIG_IMX_MU_MSI=m
|
||||
CONFIG_IMX_SDMA=y
|
||||
CONFIG_IMX_THERMAL=y
|
||||
# CONFIG_IMX_WEIM is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
# CONFIG_INPUT_BBNSM_PWRKEY is not set
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
# CONFIG_JFFS2_FS is not set
|
||||
CONFIG_KEYS=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_CQHCI=y
|
||||
# CONFIG_MMC_MXC is not set
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_ESDHC_IMX=y
|
||||
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
|
||||
CONFIG_MMC_SDHCI_OF_ESDHC=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MPILIB=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_NAND_GPMI_NAND=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
# CONFIG_MX3_IPU is not set
|
||||
CONFIG_MXC_CLK=y
|
||||
CONFIG_MXS_DMA=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ_PTP is not set
|
||||
CONFIG_NET_DSA_TAG_DSA=y
|
||||
CONFIG_NET_DSA_TAG_DSA_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_EDSA=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NVMEM=y
|
||||
# CONFIG_NVMEM_IMX_IIM is not set
|
||||
CONFIG_NVMEM_IMX_OCOTP=y
|
||||
# CONFIG_NVMEM_IMX_OCOTP_ELE is not set
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
# CONFIG_NVMEM_SNVS_LPGPR is not set
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0x80000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PINCTRL=y
|
||||
# CONFIG_PINCTRL_IMX8ULP is not set
|
||||
# CONFIG_PINCTRL_IMX93 is not set
|
||||
# CONFIG_PINCTRL_IMXRT1050 is not set
|
||||
# CONFIG_PINCTRL_IMXRT1170 is not set
|
||||
CONFIG_PCI_IMX6_HOST=y
|
||||
CONFIG_PL310_ERRATA_769419=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_CLK=y
|
||||
CONFIG_PM_OPP=y
|
||||
CONFIG_PPS=y
|
||||
CONFIG_PREEMPT_NONE_BUILD=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
# CONFIG_PWM_IMX1 is not set
|
||||
CONFIG_PWM_IMX27=y
|
||||
# CONFIG_PWM_IMX_TPM is not set
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RAS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_RD_BZIP2=y
|
||||
CONFIG_RD_GZIP=y
|
||||
CONFIG_RD_LZO=y
|
||||
CONFIG_RD_XZ=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_ANATOP=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_PFUZE100=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
# CONFIG_RTC_DRV_CMOS is not set
|
||||
# CONFIG_RTC_DRV_BBNSM is not set
|
||||
# CONFIG_RTC_DRV_IMXDI is not set
|
||||
# CONFIG_RTC_DRV_MXC is not set
|
||||
# CONFIG_RTC_DRV_MXC_V2 is not set
|
||||
CONFIG_RTC_I2C_AND_SPI=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SCHED_THERMAL_PRESSURE=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_COMMON=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_IMX=y
|
||||
CONFIG_SERIAL_IMX_CONSOLE=y
|
||||
CONFIG_SERIAL_IMX_EARLYCON=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOC_BUS=y
|
||||
# CONFIG_SOC_IMX50 is not set
|
||||
# CONFIG_SOC_IMX51 is not set
|
||||
# CONFIG_SOC_IMX53 is not set
|
||||
# CONFIG_SOC_IMX6Q is not set
|
||||
# CONFIG_SOC_IMX6SL is not set
|
||||
# CONFIG_SOC_IMX6SLL is not set
|
||||
# CONFIG_SOC_IMX6SX is not set
|
||||
# CONFIG_SOC_IMX6UL is not set
|
||||
# CONFIG_SOC_IMX7D is not set
|
||||
# CONFIG_SOC_IMX7ULP is not set
|
||||
# CONFIG_SOC_IMX8M is not set
|
||||
# CONFIG_SOC_IMX9 is not set
|
||||
# CONFIG_SOC_LS1021A is not set
|
||||
# CONFIG_SOC_VF610 is not set
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
# CONFIG_SPI_FSL_LPSPI is not set
|
||||
# CONFIG_SPI_FSL_QUADSPI is not set
|
||||
CONFIG_SPI_IMX=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_SRAM_EXEC=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STMP_DEVICE=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
# CONFIG_UCLAMP_TASK is not set
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_CHIPIDEA_IMX=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_MXS_PHY=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_PHY=y
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_USE_OF=y
|
||||
# CONFIG_VIDEO_IMX7_CSI is not set
|
||||
CONFIG_VFP=y
|
||||
CONFIG_VFPv3=y
|
||||
CONFIG_VMSPLIT_2G=y
|
||||
# CONFIG_VMSPLIT_3G is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_ARMTHUMB=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMMON=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -10,6 +10,9 @@ define Device/Default
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | uImage none
|
||||
KERNEL_LOADADDR := 0x80008000
|
||||
ifdef CONFIG_LINUX_6_6
|
||||
DTS_DIR := $(DTS_DIR)/nxp/imx
|
||||
endif
|
||||
IMAGES :=
|
||||
endef
|
||||
|
||||
|
||||
@ -84,6 +84,9 @@ define Device/Default
|
||||
KERNEL_NAME := zImage
|
||||
KERNEL := kernel-bin | uImage none
|
||||
KERNEL_LOADADDR := 0x10008000
|
||||
ifdef CONFIG_LINUX_6_6
|
||||
DTS_DIR := $(DTS_DIR)/nxp/imx
|
||||
endif
|
||||
IMAGES :=
|
||||
endef
|
||||
|
||||
|
||||
11
target/linux/imx/patches-6.6/100-bootargs.patch
Normal file
11
target/linux/imx/patches-6.6/100-bootargs.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx6dl-wandboard.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx6dl-wandboard.dts
|
||||
@@ -16,4 +16,8 @@
|
||||
device_type = "memory";
|
||||
reg = <0x10000000 0x40000000>;
|
||||
};
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttymxc0,115200";
|
||||
+ };
|
||||
};
|
||||
@ -0,0 +1,96 @@
|
||||
From 68604e89335ccb3e893b5a05b2c0d5cd2eaaf6ec Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||
Date: Tue, 3 Mar 2020 15:14:40 +0100
|
||||
Subject: [PATCH] ARM: dts: imx6q-apalis: ixora: add status LEDs aliases
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||
---
|
||||
arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora-v1.1.dts | 16 ++++++++++------
|
||||
arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora.dts | 12 ++++++++----
|
||||
2 files changed, 18 insertions(+), 10 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora.dts
|
||||
@@ -24,6 +24,10 @@
|
||||
i2c2 = &i2c2;
|
||||
rtc0 = &rtc_i2c;
|
||||
rtc1 = &snvs_rtc;
|
||||
+ led-boot = &led_boot;
|
||||
+ led-failsafe = &led_failsafe;
|
||||
+ led-running = &led_running;
|
||||
+ led-upgrade = &led_upgrade;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -35,22 +39,22 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_leds_ixora>;
|
||||
|
||||
- led4-green {
|
||||
+ led_running: led4-green {
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_4_GREEN";
|
||||
};
|
||||
|
||||
- led4-red {
|
||||
+ led_upgrade: led4-red {
|
||||
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_4_RED";
|
||||
};
|
||||
|
||||
- led5-green {
|
||||
+ led_boot: led5-green {
|
||||
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_5_GREEN";
|
||||
};
|
||||
|
||||
- led5-red {
|
||||
+ led_failsafe: led5-red {
|
||||
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_5_RED";
|
||||
};
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora-v1.2.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora-v1.2.dts
|
||||
@@ -24,6 +24,10 @@
|
||||
i2c2 = &i2c2;
|
||||
rtc0 = &rtc_i2c;
|
||||
rtc1 = &snvs_rtc;
|
||||
+ led-boot = &led_boot;
|
||||
+ led-failsafe = &led_failsafe;
|
||||
+ led-running = &led_running;
|
||||
+ led-upgrade = &led_upgrade;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -36,22 +40,22 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_leds_ixora>;
|
||||
|
||||
- led4-green {
|
||||
- gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
|
||||
+ led_running: led4-green {
|
||||
+ gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_4_GREEN";
|
||||
};
|
||||
|
||||
- led4-red {
|
||||
- gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
|
||||
+ led_upgrade: led4-red {
|
||||
+ gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_4_RED";
|
||||
};
|
||||
|
||||
- led5-green {
|
||||
+ led_boot: led5-green {
|
||||
gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_5_GREEN";
|
||||
};
|
||||
|
||||
- led5-red {
|
||||
+ led_failsafe: led5-red {
|
||||
gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
|
||||
label = "LED_5_RED";
|
||||
};
|
||||
@ -0,0 +1,78 @@
|
||||
From b6764bb27c819cdcf854371db485a43d71f579f3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
|
||||
Date: Tue, 3 Mar 2020 15:15:57 +0100
|
||||
Subject: [PATCH] ARM: dts: imx6q-apalis: ixora: make switch3 reset button
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Petr Štetiar <ynezz@true.cz>
|
||||
---
|
||||
arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora-v1.1.dts | 15 ++++++++++++++-
|
||||
arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora.dts | 15 ++++++++++++++-
|
||||
2 files changed, 28 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora.dts
|
||||
@@ -59,6 +59,17 @@
|
||||
label = "LED_5_RED";
|
||||
};
|
||||
};
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ pinctrl-0 = <&pinctrl_gpio_keys &pinctrl_switch3_ixora>;
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ debounce-interval = <10>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&can1 {
|
||||
@@ -183,4 +194,10 @@
|
||||
MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0
|
||||
>;
|
||||
};
|
||||
+
|
||||
+ pinctrl_switch3_ixora: switch3ixora {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
};
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora-v1.2.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ixora-v1.2.dts
|
||||
@@ -61,6 +61,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ gpio-keys {
|
||||
+ pinctrl-0 = <&pinctrl_gpio_keys &pinctrl_switch3_ixora>;
|
||||
+
|
||||
+ reset {
|
||||
+ label = "reset";
|
||||
+ gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ debounce-interval = <10>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
reg_3v3_vmmc: regulator-3v3-vmmc {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
@@ -264,6 +275,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_switch3_ixora: switch3ixora {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_mmc_cd_sleep: mmccdslpgrp {
|
||||
fsl,pins = <
|
||||
/* MMC1 CD */
|
||||
@ -0,0 +1,24 @@
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx7d-pico-pi.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx7d-pico-pi.dts
|
||||
@@ -8,12 +8,20 @@
|
||||
model = "TechNexion PICO-IMX7D Board and PI baseboard";
|
||||
compatible = "technexion,imx7d-pico-pi", "fsl,imx7d";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &led_system;
|
||||
+ led-failsafe = &led_system;
|
||||
+ led-running = &led_system;
|
||||
+ led-upgrade = &led_system;
|
||||
+ label-mac-device = &fec1;
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_gpio_leds>;
|
||||
|
||||
- led {
|
||||
+ led_system: led {
|
||||
label = "gpio-led";
|
||||
gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@ -0,0 +1,23 @@
|
||||
From 6e8e5ccfbee7a531b035ffce3f95f3901946fa9d Mon Sep 17 00:00:00 2001
|
||||
From: Robert Nelson <robertcnelson@gmail.com>
|
||||
Date: Wed, 9 Jan 2019 14:33:24 -0600
|
||||
Subject: [PATCH] ARM: imx7d-pico-pi.dts: add default stdout-path
|
||||
|
||||
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/nxp/imx/imx7d-pico-pi.dts | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/nxp/imx/imx7d-pico-pi.dts
|
||||
+++ b/arch/arm/boot/dts/nxp/imx/imx7d-pico-pi.dts
|
||||
@@ -16,6 +16,10 @@
|
||||
label-mac-device = &fec1;
|
||||
};
|
||||
|
||||
+ chosen {
|
||||
+ stdout-path = "serial4:115200n8";
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
@ -170,11 +170,6 @@ ipq40xx_setup_macs()
|
||||
asus,rt-ac42u)
|
||||
label_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
||||
;;
|
||||
asus,rt-ac58u)
|
||||
wan_mac=$(mtd_get_mac_binary_ubi Factory 0x1006)
|
||||
lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
avm,fritzbox-7530)
|
||||
local tffsdev=$(find_mtd_chardev "nand-tffs")
|
||||
wan_mac=$(/usr/bin/fritz_tffs_nand -b -d $tffsdev -n macdsl)
|
||||
|
||||
@ -58,8 +58,7 @@ case "$FIRMWARE" in
|
||||
"ath10k/pre-cal-ahb-a000000.wifi.bin")
|
||||
case "$board" in
|
||||
asus,map-ac2200|\
|
||||
asus,rt-ac42u|\
|
||||
asus,rt-ac58u)
|
||||
asus,rt-ac42u)
|
||||
caldata_extract_ubi "Factory" 0x1000 0x2f20
|
||||
;;
|
||||
avm,fritzbox-4040)
|
||||
@ -158,8 +157,7 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
"ath10k/pre-cal-ahb-a800000.wifi.bin")
|
||||
case "$board" in
|
||||
asus,map-ac2200|\
|
||||
asus,rt-ac58u)
|
||||
asus,map-ac2200)
|
||||
caldata_extract_ubi "Factory" 0x5000 0x2f20
|
||||
;;
|
||||
avm,fritzbox-4040)
|
||||
|
||||
@ -309,6 +309,7 @@ CONFIG_MTD_SPLIT_WRGG_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_NVMEM=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
label-mac-device = &swport5;
|
||||
};
|
||||
|
||||
soc {
|
||||
@ -247,13 +248,44 @@
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "ubi";
|
||||
compatible = "linux,ubi";
|
||||
reg = <0x00000000 0x08000000>;
|
||||
label = "ubi";
|
||||
|
||||
volumes {
|
||||
ubi_factory: ubi-volume-factory {
|
||||
volname = "Factory";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ubi_factory {
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
precal_factory_1000: precal@1000 {
|
||||
reg = <0x1000 0x2f20>;
|
||||
};
|
||||
|
||||
macaddr_factory_1006: macaddr@1006 {
|
||||
reg = <0x1006 0x6>;
|
||||
};
|
||||
|
||||
precal_factory_5000: precal@5000 {
|
||||
reg = <0x5000 0x2f20>;
|
||||
};
|
||||
|
||||
macaddr_factory_5006: macaddr@5006 {
|
||||
reg = <0x5006 0x6>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
pinctrl-0 = <&serial_pins>;
|
||||
pinctrl-names = "default";
|
||||
@ -293,6 +325,8 @@
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_factory_5006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&switch {
|
||||
@ -317,14 +351,20 @@
|
||||
|
||||
&swport5 {
|
||||
status = "okay";
|
||||
nvmem-cells = <&macaddr_factory_1006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wifi0 {
|
||||
status = "okay";
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
nvmem-cells = <&precal_factory_1000>;
|
||||
qcom,ath10k-calibration-variant = "RT-AC58U";
|
||||
};
|
||||
|
||||
&wifi1 {
|
||||
status = "okay";
|
||||
nvmem-cell-names = "pre-calibration";
|
||||
nvmem-cells = <&precal_factory_5000>;
|
||||
qcom,ath10k-calibration-variant = "RT-AC58U";
|
||||
};
|
||||
|
||||
@ -5,7 +5,7 @@ define Device/mikrotik_nor
|
||||
KERNEL_NAME := vmlinux
|
||||
KERNEL := kernel-bin | append-dtb-elf
|
||||
IMAGES = sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
|
||||
IMAGE/sysupgrade.bin := append-kernel | yaffs-filesystem -L | \
|
||||
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \
|
||||
check-size | append-metadata
|
||||
endef
|
||||
|
||||
280
target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
Normal file
280
target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
Normal file
@ -0,0 +1,280 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
#include "mt7986a.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "ruijie,rg-x60-pro", "mediatek,mt7986a";
|
||||
model = "Ruijie RG-X60 Pro";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
led-boot = &led_system;
|
||||
led-failsafe = &led_alarm;
|
||||
led-running = &led_system;
|
||||
led-upgrade = &led_alarm;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x11002000";
|
||||
};
|
||||
|
||||
memory@40000000 {
|
||||
reg = <0 0x40000000 0 0x20000000>;
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-0 {
|
||||
label = "reset";
|
||||
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
button-1 {
|
||||
label = "mesh";
|
||||
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <BTN_MISC>;
|
||||
};
|
||||
};
|
||||
|
||||
leds-gpio {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_system: led-0 {
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&pio 22 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_alarm: led-1 {
|
||||
color = <LED_COLOR_ID_PURPLE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ð {
|
||||
status = "okay";
|
||||
|
||||
gmac0: mac@0 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <0>;
|
||||
phy-mode = "2500base-x";
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
|
||||
gmac1: mac@1 {
|
||||
compatible = "mediatek,eth-mac";
|
||||
reg = <1>;
|
||||
phy-handle = <&phy7>;
|
||||
phy-mode = "2500base-x";
|
||||
};
|
||||
|
||||
mdio: mdio-bus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
switch: switch@1f {
|
||||
compatible = "mediatek,mt7531";
|
||||
reg = <31>;
|
||||
reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <66 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
phy7: phy@7 {
|
||||
compatible = "ethernet-phy-ieee802.3-c45";
|
||||
reg = <7>;
|
||||
reset-assert-us = <100000>;
|
||||
reset-deassert-us = <100000>;
|
||||
reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>;
|
||||
realtek,aldps-enable;
|
||||
};
|
||||
};
|
||||
|
||||
&pio {
|
||||
spi_flash_pins: spi-flash-pins-33-to-38 {
|
||||
mux {
|
||||
function = "spi";
|
||||
groups = "spi0", "spi0_wp_hold";
|
||||
};
|
||||
conf-pu {
|
||||
pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
|
||||
drive-strength = <8>;
|
||||
mediatek,pull-up-adv = <0>; /* bias-disable */
|
||||
};
|
||||
conf-pd {
|
||||
pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
|
||||
drive-strength = <8>;
|
||||
mediatek,pull-down-adv = <0>; /* bias-disable */
|
||||
};
|
||||
};
|
||||
|
||||
wf_2g_5g_pins: wf_2g_5g-pins {
|
||||
mux {
|
||||
function = "wifi";
|
||||
groups = "wf_2g", "wf_5g";
|
||||
};
|
||||
conf {
|
||||
pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
|
||||
"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
|
||||
"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
|
||||
"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
|
||||
"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
|
||||
"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
|
||||
"WF1_TOP_CLK", "WF1_TOP_DATA";
|
||||
drive-strength = <4>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi_flash_pins>;
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "spi-nand";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0>;
|
||||
|
||||
spi-max-frequency = <20000000>;
|
||||
spi-tx-bus-width = <4>;
|
||||
spi-rx-bus-width = <4>;
|
||||
|
||||
mediatek,nmbm;
|
||||
mediatek,bmt-max-ratio = <1>;
|
||||
mediatek,bmt-max-reserved-blocks = <64>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "BL2";
|
||||
reg = <0x000000 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x100000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
label = "Factory";
|
||||
reg = <0x180000 0x200000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x1000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@380000 {
|
||||
label = "FIP";
|
||||
reg = <0x380000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@580000 {
|
||||
label = "product_info";
|
||||
reg = <0x580000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@600000 {
|
||||
label = "kdump";
|
||||
reg = <0x600000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@680000 {
|
||||
label = "ubi";
|
||||
reg = <0x680000 0x3f00000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&switch {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@6 {
|
||||
reg = <6>;
|
||||
label = "cpu";
|
||||
ethernet = <&gmac0>;
|
||||
phy-mode = "2500base-x";
|
||||
|
||||
fixed-link {
|
||||
speed = <2500>;
|
||||
full-duplex;
|
||||
pause;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wf_2g_5g_pins>;
|
||||
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&watchdog {
|
||||
status = "okay";
|
||||
};
|
||||
@ -40,6 +40,7 @@ mediatek_setup_interfaces()
|
||||
jdcloud,re-cp-03|\
|
||||
mediatek,mt7981-rfb|\
|
||||
netcore,n60|\
|
||||
ruijie,rg-x60-pro|\
|
||||
unielec,u7981-01*|\
|
||||
zbtlink,zbt-z8102ax|\
|
||||
zyxel,ex5601-t0-stock|\
|
||||
@ -176,6 +177,11 @@ mediatek_setup_macs()
|
||||
wan_mac=$(macaddr_add "$lan_mac" 1)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
ruijie,rg-x60-pro)
|
||||
label_mac=$(mtd_get_mac_ascii product_info ethaddr)
|
||||
wan_mac=$label_mac
|
||||
lan_mac=$(macaddr_add "$label_mac" 1)
|
||||
;;
|
||||
smartrg,sdg-8612|\
|
||||
smartrg,sdg-8614|\
|
||||
smartrg,sdg-8622|\
|
||||
|
||||
@ -144,6 +144,11 @@ case "$board" in
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
ruijie,rg-x60-pro)
|
||||
addr=$(mtd_get_mac_ascii product_info ethaddr)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
smartrg,sdg-8612|\
|
||||
smartrg,sdg-8614|\
|
||||
smartrg,sdg-8622|\
|
||||
|
||||
@ -1234,6 +1234,16 @@ define Device/routerich_ax3000
|
||||
endef
|
||||
TARGET_DEVICES += routerich_ax3000
|
||||
|
||||
define Device/ruijie_rg-x60-pro
|
||||
DEVICE_VENDOR := Ruijie
|
||||
DEVICE_MODEL := RG-X60 Pro
|
||||
DEVICE_DTS := mt7986a-ruijie-rg-x60-pro
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += ruijie_rg-x60-pro
|
||||
|
||||
define Device/tplink_tl-xdr-common
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_DTS_DIR := ../dts
|
||||
|
||||
@ -8,27 +8,6 @@ define Image/Prepare
|
||||
echo -ne '\xde\xad\xc0\xde' > $(KDIR)/ubi_mark
|
||||
endef
|
||||
|
||||
define Build/buffalo-trx
|
||||
$(eval magic=$(word 1,$(1)))
|
||||
$(eval kern_bin=$(if $(1),$(IMAGE_KERNEL),$@))
|
||||
$(eval rtfs_bin=$(word 2,$(1)))
|
||||
$(eval apnd_bin=$(word 3,$(1)))
|
||||
$(eval kern_size=$(if $(KERNEL_SIZE),$(KERNEL_SIZE),0x400000))
|
||||
|
||||
$(if $(rtfs_bin),touch $(rtfs_bin))
|
||||
$(STAGING_DIR_HOST)/bin/otrx create $@.new \
|
||||
$(if $(magic),-M $(magic),) \
|
||||
-f $(kern_bin) \
|
||||
$(if $(rtfs_bin),\
|
||||
-a 0x20000 \
|
||||
-b $$(( $(call exp_units,$(kern_size)) )) \
|
||||
-f $(rtfs_bin),) \
|
||||
$(if $(apnd_bin),\
|
||||
-A $(apnd_bin) \
|
||||
-a 0x20000)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/bl2
|
||||
cat $(STAGING_DIR_IMAGE)/mt7622-$1-bl2.img >> $@
|
||||
endef
|
||||
|
||||
@ -57,8 +57,8 @@ Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
|
||||
+ SPINAND_PROG_LOAD(true, 0, NULL, 0));
|
||||
+
|
||||
+static SPINAND_OP_VARIANTS(update_cache_variants,
|
||||
+ SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
|
||||
+ SPINAND_PROG_LOAD(false, 0, NULL, 0));
|
||||
+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
|
||||
+ SPINAND_PROG_LOAD(true, 0, NULL, 0));
|
||||
+
|
||||
+static int fm35x1ga_ooblayout_ecc(struct mtd_info *mtd, int section,
|
||||
+ struct mtd_oob_region *region)
|
||||
|
||||
@ -29,7 +29,6 @@ case "$FIRMWARE" in
|
||||
xiaomi,ax3600-stock|\
|
||||
xiaomi,ax9000|\
|
||||
yuncore,ax880|\
|
||||
zbtlink,zbt-z800ax|\
|
||||
zte,mf269)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
;;
|
||||
@ -58,6 +57,13 @@ case "$FIRMWARE" in
|
||||
spectrum,sax1v1k)
|
||||
caldata_extract_mmc "0:ART" 0x1000 0x20000
|
||||
;;
|
||||
zbtlink,zbt-z800ax)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
ath11k_patch_mac $(macaddr_add $label_mac -1) 0
|
||||
ath11k_patch_mac $(macaddr_add $label_mac -2) 1
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
zyxel,nbg7815)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
|
||||
@ -30,10 +30,6 @@ case "$board" in
|
||||
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(get_mac_label) > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "2" ] && mtd_get_mac_binary boarddata1 0x12 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zbtlink,zbt-z800ax)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) -1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) -2 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zte,mf269-stock)
|
||||
mac_addr="$(mtd_get_mac_binary mac 0x0)"
|
||||
[ "$mac_addr" != "00:00:00:00:00:00" ] || mac_addr="$(get_mac_binary "$(find_mtd_chardev mac)" 0x20000)"
|
||||
|
||||
@ -155,7 +155,7 @@
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "openwrt,trx";
|
||||
compatible = "brcm,trx";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xf90000>;
|
||||
};
|
||||
|
||||
@ -159,7 +159,7 @@
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "openwrt,trx";
|
||||
compatible = "brcm,trx";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0x7c0000>;
|
||||
};
|
||||
|
||||
70
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl2.dts
Normal file
70
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl2.dts
Normal file
@ -0,0 +1,70 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621_buffalo_wsr-2533dhplx.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "buffalo,wsr-2533dhpl2", "mediatek,mt7621-soc";
|
||||
model = "Buffalo WSR-2533DHPL2";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,57600n8 ubi.block=0,rootfs root=/dev/ubiblock0_0";
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
mediatek,bbt;
|
||||
/*
|
||||
* - u-boot - (kernel (6MiB, in "firmware"))
|
||||
* - Kernel2 - board_data
|
||||
*/
|
||||
mediatek,bmt-remap-range = <0x0 0x740000>,
|
||||
<0x3e60000 0x4120000>;
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@100000 {
|
||||
label = "factory";
|
||||
reg = <0x100000 0x40000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x4da8>;
|
||||
};
|
||||
|
||||
eeprom_factory_8000: eeprom@8000 {
|
||||
reg = <0x8000 0x4da8>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@140000 {
|
||||
compatible = "brcm,trx";
|
||||
brcm,trx-magic = <0x324c4850>;
|
||||
label = "firmware";
|
||||
reg = <0x140000 0x3d20000>;
|
||||
};
|
||||
|
||||
partition@3e60000 {
|
||||
label = "Kernel2";
|
||||
reg = <0x3e60000 0x3d20000>;
|
||||
};
|
||||
|
||||
partition@7b80000 {
|
||||
label = "glbcfg";
|
||||
reg = <0x7b80000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@7d80000 {
|
||||
label = "board_data";
|
||||
reg = <0x7d80000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
82
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpls.dts
Normal file
82
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpls.dts
Normal file
@ -0,0 +1,82 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621_buffalo_wsr-2533dhplx.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "buffalo,wsr-2533dhpls", "mediatek,mt7621-soc";
|
||||
model = "Buffalo WSR-2533DHPLS";
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8 ubi.block=0,rootfs root=/dev/ubiblock0_0";
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
mediatek,nmbm;
|
||||
/*
|
||||
* - u-boot - (kernel (6MiB, in "firmware"))
|
||||
* - Kernel2 - WTB
|
||||
*/
|
||||
mediatek,bmt-remap-range = <0x0 0x780000>,
|
||||
<0x1980000 0x5b00000>;
|
||||
};
|
||||
|
||||
&partitions {
|
||||
partition@100000 {
|
||||
label = "factory";
|
||||
reg = <0x100000 0x80000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x4da8>;
|
||||
};
|
||||
|
||||
eeprom_factory_8000: eeprom@8000 {
|
||||
reg = <0x8000 0x4da8>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
compatible = "brcm,trx";
|
||||
brcm,trx-magic = <0x534c4844>;
|
||||
label = "firmware";
|
||||
reg = <0x180000 0x1800000>;
|
||||
};
|
||||
|
||||
partition@1980000 {
|
||||
label = "Kernel2";
|
||||
reg = <0x1980000 0x1800000>;
|
||||
};
|
||||
|
||||
partition@3180000 {
|
||||
label = "glbcfg";
|
||||
reg = <0x3180000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@3380000 {
|
||||
label = "board_data";
|
||||
reg = <0x3380000 0x200000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@3580000 {
|
||||
label = "debug_log";
|
||||
reg = <0x3580000 0x900000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@3e80000 {
|
||||
label = "WTB";
|
||||
reg = <0x3e80000 0x3600000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
175
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhplx.dtsi
Normal file
175
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhplx.dtsi
Normal file
@ -0,0 +1,175 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_amber;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = "router";
|
||||
};
|
||||
|
||||
led-1 {
|
||||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_WLAN;
|
||||
};
|
||||
|
||||
led-2 {
|
||||
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_WAN_ONLINE;
|
||||
};
|
||||
|
||||
led-3 {
|
||||
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WAN_ONLINE;
|
||||
};
|
||||
|
||||
led_power_green: led-4 {
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
};
|
||||
|
||||
led_power_amber: led-5 {
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
};
|
||||
|
||||
led-6 {
|
||||
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_WLAN;
|
||||
};
|
||||
|
||||
led-7 {
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = "router";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
button-reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
button-aoss {
|
||||
label = "aoss";
|
||||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
switch-router {
|
||||
label = "router";
|
||||
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <BTN_0>;
|
||||
linux,input-type = <EV_SW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
};
|
||||
|
||||
ðphy0 {
|
||||
/delete-property/ interrupts;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
partitions: partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0x01>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x00 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x80000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_8000>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "uart2", "uart3";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&xhci {
|
||||
status = "disabled";
|
||||
};
|
||||
198
target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts
Normal file
198
target/linux/ramips/dts/mt7628an_cudy_tr1200-v1.dts
Normal file
@ -0,0 +1,198 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7628an.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
compatible = "cudy,tr1200", "mediatek,mt7628an-soc";
|
||||
model = "Cudy TR1200";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status;
|
||||
led-running = &led_status;
|
||||
led-failsafe = &led_status;
|
||||
led-upgrade = &led_status;
|
||||
label-mac-device = ðernet;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
gpio-keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
mode {
|
||||
label = "mode";
|
||||
linux,input-type = <EV_SW>;
|
||||
linux,code = <BTN_0>;
|
||||
gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status: led_0 {
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_1 {
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_export {
|
||||
compatible = "gpio-export";
|
||||
|
||||
usb {
|
||||
gpio-export,name = "usb";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <40000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x400>;
|
||||
};
|
||||
|
||||
eeprom_factory_8000: eeprom@8000 {
|
||||
reg = <0x8000 0x4da8>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xf80000>;
|
||||
};
|
||||
|
||||
partition@fd0000 {
|
||||
label = "debug";
|
||||
reg = <0xfd0000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@fe0000 {
|
||||
label = "backup";
|
||||
reg = <0xfe000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@ff0000 {
|
||||
label = "bdinfo";
|
||||
reg = <0xff0000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_bdinfo_de00: macaddr@de00 {
|
||||
compatible = "mac-base";
|
||||
reg = <0xde00 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "gpio", "wdt", "p0led_an", "wled_an";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_bdinfo_de00 2>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&eeprom_factory_0>, <&macaddr_bdinfo_de00 0>;
|
||||
nvmem-cell-names = "eeprom", "mac-address";
|
||||
};
|
||||
|
||||
ðernet {
|
||||
nvmem-cells = <&macaddr_bdinfo_de00 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&esw {
|
||||
mediatek,portmap = <0x3d>;
|
||||
mediatek,portdisable = <0x3c>;
|
||||
};
|
||||
@ -7,7 +7,13 @@ include ./common-tp-link.mk
|
||||
|
||||
DEFAULT_SOC := mt7621
|
||||
|
||||
DEVICE_VARS += ELECOM_HWNAME LINKSYS_HWNAME DLINK_HWID
|
||||
DEVICE_VARS += BUFFALO_TRX_MAGIC ELECOM_HWNAME LINKSYS_HWNAME DLINK_HWID
|
||||
|
||||
define Image/Prepare
|
||||
# For UBI we want only one extra block
|
||||
rm -f $(KDIR)/ubi_mark
|
||||
echo -ne '\xde\xad\xc0\xde' > $(KDIR)/ubi_mark
|
||||
endef
|
||||
|
||||
define Build/append-dlink-covr-metadata
|
||||
echo -ne '{"supported_devices": "$(1)", "firmware": "' > $@metadata.tmp
|
||||
@ -534,6 +540,46 @@ define Device/buffalo_wsr-2533dhpl
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wsr-2533dhpl
|
||||
|
||||
define Device/buffalo_wsr-2533dhplx
|
||||
$(Device/dsa-migration)
|
||||
DEVICE_VENDOR := Buffalo
|
||||
DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools
|
||||
BUFFALO_TAG_PLATFORM := MTK
|
||||
BUFFALO_TAG_VERSION := 9.99
|
||||
BUFFALO_TAG_MINOR := 9.99
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
UBINIZE_OPTS := -E 5
|
||||
KERNEL_SIZE := 6144k
|
||||
IMAGES += factory.bin factory-uboot.bin
|
||||
IMAGE/factory.bin = append-ubi | \
|
||||
buffalo-trx $$$$(BUFFALO_TRX_MAGIC) $$$$@ $(KDIR)/ubi_mark |\
|
||||
buffalo-enc $$(DEVICE_MODEL) 9.99 -l | \
|
||||
buffalo-tag-dhp $$(DEVICE_MODEL) JP JP | buffalo-enc-tag -l | \
|
||||
buffalo-dhp-image
|
||||
IMAGE/factory-uboot.bin := append-ubi | \
|
||||
buffalo-trx $$$$(BUFFALO_TRX_MAGIC) $$$$@ $(KDIR)/ubi_mark | append-metadata
|
||||
IMAGE/sysupgrade.bin := \
|
||||
buffalo-trx $$$$(BUFFALO_TRX_MAGIC) $(KDIR)/tmp/$$(DEVICE_NAME).null | \
|
||||
sysupgrade-tar kernel=$$$$@ | append-metadata
|
||||
endef
|
||||
|
||||
define Device/buffalo_wsr-2533dhpl2
|
||||
$(Device/buffalo_wsr-2533dhplx)
|
||||
DEVICE_MODEL := WSR-2533DHPL2
|
||||
BUFFALO_TRX_MAGIC := 0x324c4850
|
||||
IMAGE_SIZE := 62592k
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wsr-2533dhpl2
|
||||
|
||||
define Device/buffalo_wsr-2533dhpls
|
||||
$(Device/buffalo_wsr-2533dhplx)
|
||||
DEVICE_MODEL := WSR-2533DHPLS
|
||||
BUFFALO_TRX_MAGIC := 0x534c4844
|
||||
IMAGE_SIZE := 24576k
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wsr-2533dhpls
|
||||
|
||||
define Device/buffalo_wsr-600dhp
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
@ -1783,7 +1829,7 @@ define Device/MikroTik
|
||||
DEVICE_PACKAGES := kmod-usb3 -uboot-envtools
|
||||
KERNEL_NAME := vmlinuz
|
||||
KERNEL := kernel-bin | append-dtb-elf
|
||||
IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
|
||||
IMAGE/sysupgrade.bin := append-kernel | yaffs-filesystem -L | \
|
||||
pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | \
|
||||
append-metadata
|
||||
endef
|
||||
|
||||
@ -147,6 +147,17 @@ define Device/comfast_cf-wr758ac-v2
|
||||
endef
|
||||
TARGET_DEVICES += comfast_cf-wr758ac-v2
|
||||
|
||||
define Device/cudy_tr1200-v1
|
||||
IMAGE_SIZE := 15872k
|
||||
DEVICE_VENDOR := Cudy
|
||||
DEVICE_MODEL := TR1200
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \
|
||||
kmod-mt7615e kmod-mt7663-firmware-ap
|
||||
SUPPORTED_DEVICES += R46
|
||||
endef
|
||||
TARGET_DEVICES += cudy_tr1200-v1
|
||||
|
||||
define Device/cudy_wr1000
|
||||
IMAGE_SIZE := 7872k
|
||||
IMAGES += factory.bin
|
||||
|
||||
@ -11,6 +11,8 @@ ramips_setup_interfaces()
|
||||
alfa-network,ax1800rm|\
|
||||
ampedwireless,ally-r1900k|\
|
||||
asus,rt-ax53u|\
|
||||
buffalo,wsr-2533dhpl2|\
|
||||
buffalo,wsr-2533dhpls|\
|
||||
gehua,ghl-r-001|\
|
||||
h3c,tx1800-plus|\
|
||||
h3c,tx1801-plus|\
|
||||
@ -217,7 +219,9 @@ ramips_setup_macs()
|
||||
label_mac=$(macaddr_add "$wan_mac" 3)
|
||||
lan_mac=$label_mac
|
||||
;;
|
||||
buffalo,wsr-1166dhp)
|
||||
buffalo,wsr-1166dhp|\
|
||||
buffalo,wsr-2533dhpl2|\
|
||||
buffalo,wsr-2533dhpls)
|
||||
wan_mac=$(mtd_get_mac_ascii board_data "mac")
|
||||
lan_mac=$wan_mac
|
||||
label_mac=$wan_mac
|
||||
|
||||
@ -27,6 +27,13 @@ case "$board" in
|
||||
hw_mac_addr=$(macaddr_unsetbit $hw_mac_addr 28)
|
||||
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $hw_mac_addr > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
buffalo,wsr-2533dhpls)
|
||||
lan_mac_addr=$(mtd_get_mac_ascii board_data "mac")
|
||||
[ "$PHYNBR" = "0" ] && \
|
||||
macaddr_add $lan_mac_addr 1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && \
|
||||
macaddr_add $lan_mac_addr 8 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
comfast,cf-e390ax)
|
||||
[ "$PHYNBR" = "0" ] && echo -n "$(mtd_get_mac_binary factory 0x0004)" > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && echo -n "$(mtd_get_mac_binary factory 0x8004)" > /sys${DEVPATH}/macaddress
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
# don't modify FW data when booting with initramfs image
|
||||
fstype="$(/bin/mount | awk '($3 ~ /^\/$/) && ($5 !~ /rootfs/) { print $5 }')"
|
||||
[ "$fstype" = "tmpfs" ] && \
|
||||
exit 0
|
||||
|
||||
fixup_trx_crc() {
|
||||
local trx_magic="$1"
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
|
||||
|
||||
mtd -M $trx_magic ${kernel_size:+-c 0x$kernel_size} fixtrx firmware
|
||||
}
|
||||
|
||||
case "$(board_name)" in
|
||||
buffalo,wsr-2533dhpl2)
|
||||
fixup_trx_crc 0x50484c32
|
||||
;;
|
||||
buffalo,wsr-2533dhpls)
|
||||
fixup_trx_crc 0x44484C53
|
||||
;;
|
||||
esac
|
||||
112
target/linux/ramips/mt7621/base-files/lib/upgrade/buffalo.sh
Normal file
112
target/linux/ramips/mt7621/base-files/lib/upgrade/buffalo.sh
Normal file
@ -0,0 +1,112 @@
|
||||
# The mtd partitions "firmware" and "Kernel2" on NAND flash are os-image
|
||||
# partitions. These partitions are called as "Image1/Image2" in U-Boot
|
||||
# on WSR-2533DHPLx devices, and they are checked conditions when booting.
|
||||
# "Image1" is always used for booting.
|
||||
#
|
||||
# == U-Boot Behaviors ==
|
||||
#
|
||||
# - "Image1"/"Image2" images are good, images are different or
|
||||
# "Image2" image is broken
|
||||
# -> copy os-image to "Image2" from "Image1"
|
||||
#
|
||||
# - "Image1" image is broken
|
||||
# -> copy os-image to "Image1" from "Image2"
|
||||
#
|
||||
# - "Image1"/"Image2" images are broken
|
||||
# -> fall to U-Boot command line
|
||||
|
||||
# TRX magic numbers of each model
|
||||
case "$(board_name)" in
|
||||
buffalo,wsr-2533dhpl2)
|
||||
BUFFALO_TRX_MAGIC="50484c32" # "PHL2"
|
||||
;;
|
||||
buffalo,wsr-2533dhpls)
|
||||
BUFFALO_TRX_MAGIC="44484c53" # "DHLS"
|
||||
;;
|
||||
esac
|
||||
|
||||
buffalo_check_image() {
|
||||
local board="$1"
|
||||
local boardname="$(echo $board | tr ',' '_')"
|
||||
local magic="$2"
|
||||
local fw_image="$3"
|
||||
|
||||
# return error state if TRX + UBI formatted image specified
|
||||
# to notify about configurations
|
||||
if [ "$magic" = "$BUFFALO_TRX_MAGIC" ]; then
|
||||
echo "Your configurations won't be saved if factory-uboot.bin image specified."
|
||||
echo "But if you want to upgrade, please execute sysupgrade with \"-F\" option."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# check if valid tar file specifed
|
||||
if ! tar tf "$fw_image" &>/dev/null; then
|
||||
echo "Specified file is not a tar archive: $fw_image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local control_len=$( (tar xf $fw_image sysupgrade-$boardname/CONTROL -O | wc -c) 2> /dev/null)
|
||||
|
||||
# check if valid sysupgrade tar archive
|
||||
if [ "$control_len" = "0" ]; then
|
||||
echo "Invalid sysupgrade file: $fw_image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local kern_part_len=$(grep "\"linux\"" /proc/mtd | sed "s/mtd[0-9]*:[ \t]*\([^ \t]*\).*/\1/")
|
||||
[ -z "$kern_part_len" ] && {
|
||||
echo "Unable to get \"linux\" partition size"
|
||||
return 1
|
||||
}
|
||||
kern_part_len=$((0x$kern_part_len))
|
||||
|
||||
# this also checks if the sysupgrade image is for correct models
|
||||
local kern_bin_len=$( (tar xf $fw_image sysupgrade-${boardname}/kernel -O | wc -c) 2> /dev/null)
|
||||
if [ -z "$kern_bin_len" ]; then
|
||||
echo "Failed to get new kernel size, is valid sysupgrade image specified for the device?"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# kernel binary has a trx header (len: 28 (0x1c))
|
||||
kern_bin_len=$((kern_bin_len - 28))
|
||||
|
||||
if [ "$kern_bin_len" != "$kern_part_len" ]; then
|
||||
echo -n "The length of new kernel is invalid for current "
|
||||
echo "\"linux\" partition, please use factory-uboot.bin image."
|
||||
echo "\"linux\" partition: $kern_part_len, new kernel: $kern_bin_len"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# for TRX + UBI formatted image
|
||||
buffalo_upgrade_ubinized() {
|
||||
sync
|
||||
echo 3 > /proc/sys/vm/drop_caches
|
||||
|
||||
local mtdnum="$( find_mtd_index "ubi" )"
|
||||
# if no "ubi", don't return error for the purpose of recovery
|
||||
# ex: recovery after accidental erasing "firmware" partition
|
||||
if [ ! "$mtdnum" ]; then
|
||||
echo "cannot find ubi mtd partition \"ubi\", skip detachment"
|
||||
else
|
||||
ubidetach -m "$mtdnum"
|
||||
fi
|
||||
|
||||
# erase all data in "firmware"
|
||||
mtd erase "${PART_NAME}"
|
||||
# write TRX + UBI formatted image to "firmware"
|
||||
get_image "$1" | mtd $MTD_ARGS write - "${PART_NAME:-firmware}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to write the specified image."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
buffalo_do_upgrade() {
|
||||
if [ "$(get_magic_long "$1")" = "$BUFFALO_TRX_MAGIC" ]; then
|
||||
buffalo_upgrade_ubinized "$1"
|
||||
else
|
||||
CI_KERNPART="firmware"
|
||||
nand_do_upgrade "$1"
|
||||
fi
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user