[OpenWrt-Devel] [PATCH 1/2] kernel: when enable HIGHMEM use long jump
Signed-off-by: wengbj fl.serv...@t-firefly.com --- ...ing-long-jump-when-memory-more-then-256mb.patch | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 target/linux/ramips/patches-3.18/0112-using-long-jump-when-memory-more-then-256mb.patch diff --git a/target/linux/ramips/patches-3.18/0112-using-long-jump-when-memory-more-then-256mb.patch b/target/linux/ramips/patches-3.18/0112-using-long-jump-when-memory-more-then-256mb.patch new file mode 100644 index 000..5029356 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0112-using-long-jump-when-memory-more-then-256mb.patch @@ -0,0 +1,19 @@ +Index: linux-3.18.14/arch/mips/Makefile +=== +--- linux-3.18.14.orig/arch/mips/Makefile 2015-06-05 09:52:08.144682065 +0800 linux-3.18.14/arch/mips/Makefile 2015-06-05 09:58:40.472673911 +0800 +@@ -94,9 +94,14 @@ + KBUILD_AFLAGS_MODULE += -mlong-calls + KBUILD_CFLAGS_MODULE += -mlong-calls + else ++ifdef CONFIG_HIGHMEM ++KBUILD_AFLAGS_MODULE += -mlong-calls ++KBUILD_CFLAGS_MODULE += -mlong-calls ++else + KBUILD_AFLAGS_MODULE += -mno-long-calls + KBUILD_CFLAGS_MODULE += -mno-long-calls + endif ++endif + + ifndef CONFIG_FUNCTION_TRACER + KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ramips: fix the memory map on FireWRT
MT7621 support 512MB memory. According to MT7621_ProgrammingGuide_Preliminary_Platform.pdf 0x0~0x1c00448MB 0x2000~0x400 64MB total 512MB Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 8ffb5ea..bd23406 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -8,7 +8,7 @@ memory@0 { device_type = memory; - reg = 0x0 0x1000, 0x3000 0x1000; + reg = 0x0 0x1c00,0x2000 0x400; }; chosen { -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/4] kernel: mips jump only works with memory less then 256mb. when enable HIGHMEM use long jump
Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../patches-3.18/305-mips_module_reloc.patch |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/linux/generic/patches-3.18/305-mips_module_reloc.patch b/target/linux/generic/patches-3.18/305-mips_module_reloc.patch index 41cf806..fd31f9f 100644 --- a/target/linux/generic/patches-3.18/305-mips_module_reloc.patch +++ b/target/linux/generic/patches-3.18/305-mips_module_reloc.patch @@ -1,6 +1,6 @@ --- a/arch/mips/Makefile +++ b/arch/mips/Makefile -@@ -90,8 +90,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin +@@ -90,8 +90,18 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely cflags-y += -msoft-float LDFLAGS_vmlinux += -G 0 -static -n -nostdlib --gc-sections @@ -8,9 +8,14 @@ KBUILD_AFLAGS_MODULE += -mlong-calls KBUILD_CFLAGS_MODULE += -mlong-calls +else ++ifdef CONFIG_HIGHMEM ++KBUILD_AFLAGS_MODULE += -mlong-calls ++KBUILD_CFLAGS_MODULE += -mlong-calls ++else +KBUILD_AFLAGS_MODULE += -mno-long-calls +KBUILD_CFLAGS_MODULE += -mno-long-calls +endif ++endif ifndef CONFIG_FUNCTION_TRACER KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/4] ralink: add mt7621 support automatic recognition memory size(32M-512M)
From: daixj fl.serv...@t-firefly.com Signed-off-by: daixj fl.serv...@t-firefly.com --- ...support-automatic-recognition-memory-size.patch | 50 1 file changed, 50 insertions(+) create mode 100644 target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch diff --git a/target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch b/target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch new file mode 100644 index 000..f3906b8 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch @@ -0,0 +1,50 @@ +Index: linux-3.18.11/arch/mips/include/asm/mach-ralink/mt7621.h +=== +--- linux-3.18.11.orig/arch/mips/include/asm/mach-ralink/mt7621.h 2015-05-06 17:46:36.606144740 +0800 linux-3.18.11/arch/mips/include/asm/mach-ralink/mt7621.h 2015-05-06 17:50:16.362151259 +0800 +@@ -29,7 +29,7 @@ + + #define MT7621_DRAM_BASE0x0 + #define MT7621_DDR2_SIZE_MIN 32 +-#define MT7621_DDR2_SIZE_MAX 256 ++#define MT7621_DDR2_SIZE_MAX 512 + + #define MT7621_CHIP_NAME0 0x3637544D + #define MT7621_CHIP_NAME1 0x20203132 +Index: linux-3.18.11/arch/mips/kernel/setup.c +=== +--- linux-3.18.11.orig/arch/mips/kernel/setup.c2015-04-04 10:46:37.0 +0800 linux-3.18.11/arch/mips/kernel/setup.c 2015-05-07 09:30:27.138152614 +0800 +@@ -131,8 +131,12 @@ + { + void *dm = detect_magic; + phys_t size; +- +- for (size = sz_min; size sz_max; size = 1) { ++#if defined(CONFIG_SOC_MT7621) ++ phys_t low_mem_size = 0x1c00; ++ phys_t high_mem_start = 0x2000; ++ phys_t high_mem_size = 0; ++#endif ++ for (size = sz_min; size sz_max; size = 1) { + if (!memcmp(dm, dm + size, sizeof(detect_magic))) + break; + } +@@ -142,8 +146,15 @@ + (unsigned long long) start, + ((unsigned long long) sz_min) / SZ_1M, + ((unsigned long long) sz_max) / SZ_1M); +- +- add_memory_region(start, size, BOOT_MEM_RAM); ++#if defined(CONFIG_SOC_MT7621) ++ low_mem_size = (size low_mem_size)?low_mem_size:size; ++ high_mem_size = size - low_mem_size; ++ add_memory_region(start,low_mem_size, BOOT_MEM_RAM); ++ if(high_mem_size 0) ++ add_memory_region(high_mem_start,high_mem_size, BOOT_MEM_RAM); ++#else ++ add_memory_region(start, size, BOOT_MEM_RAM); ++#endif + } + + static void __init print_memory_map(void) -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: add mt7621 support automatic recognition memory size(32M-512M)
Signed-off-by: wengbj fl.serv...@t-firefly.com --- ...support-automatic-recognition-memory-size.patch | 50 1 file changed, 50 insertions(+) create mode 100644 target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch diff --git a/target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch b/target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch new file mode 100644 index 000..802d682 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0113-add-mt7621-support-automatic-recognition-memory-size.patch @@ -0,0 +1,50 @@ +Index: linux-3.18.11/arch/mips/include/asm/mach-ralink/mt7621.h +=== +--- linux-3.18.11.orig/arch/mips/include/asm/mach-ralink/mt7621.h 2015-05-06 17:46:36.606144740 +0800 linux-3.18.11/arch/mips/include/asm/mach-ralink/mt7621.h 2015-05-06 17:50:16.362151259 +0800 +@@ -29,7 +29,7 @@ + + #define MT7621_DRAM_BASE0x0 + #define MT7621_DDR2_SIZE_MIN 32 +-#define MT7621_DDR2_SIZE_MAX 256 ++#define MT7621_DDR2_SIZE_MAX 512 + + #define MT7621_CHIP_NAME0 0x3637544D + #define MT7621_CHIP_NAME1 0x20203132 +Index: linux-3.18.11/arch/mips/kernel/setup.c +=== +--- linux-3.18.11.orig/arch/mips/kernel/setup.c2015-04-04 10:46:37.0 +0800 linux-3.18.11/arch/mips/kernel/setup.c 2015-05-07 09:30:27.138152614 +0800 +@@ -131,8 +131,12 @@ + { + void *dm = detect_magic; + phys_t size; +- +- for (size = sz_min; size sz_max; size = 1) { ++#if defined(CONFIG_SOC_MT7621) ++ phys_t low_mem_size = 0x1c00; ++ phys_t high_mem_start = 0x2000; ++ phys_t high_mem_size = 0; ++#endif ++ for (size = sz_min; size sz_max; size = 1) { + if (!memcmp(dm, dm + size, sizeof(detect_magic))) + break; + } +@@ -142,8 +146,15 @@ + (unsigned long long) start, + ((unsigned long long) sz_min) / SZ_1M, + ((unsigned long long) sz_max) / SZ_1M); +- +- add_memory_region(start, size, BOOT_MEM_RAM); ++#if defined(CONFIG_SOC_MT7621) ++ low_mem_size = (size low_mem_size)?low_mem_size:size; ++ high_mem_size = size - low_mem_size; ++ add_memory_region(start,low_mem_size, BOOT_MEM_RAM); ++ if(high_mem_size 0) ++ add_memory_region(high_mem_start,high_mem_size, BOOT_MEM_RAM); ++#else ++ add_memory_region(start, size, BOOT_MEM_RAM); ++#endif + } + + static void __init print_memory_map(void) -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/4] ralink: firewrt support memory detect
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |5 - 1 file changed, 5 deletions(-) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 2b018e6..d0decd5 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -6,11 +6,6 @@ compatible = mediatek,mt7621-eval-board, mediatek,mt7621-soc; model = Firefly FireWRT; - memory@0 { - device_type = memory; - reg = 0x0 0x1000; - }; - chosen { bootargs = console=ttyS0,57600; }; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/4] ralink: add HIGHMEM support for mt7621
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/mt7621/config-3.18 |1 + .../0112-add-mt7621-support-high-memory.patch | 13 + 2 files changed, 14 insertions(+) create mode 100644 target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch diff --git a/target/linux/ramips/mt7621/config-3.18 b/target/linux/ramips/mt7621/config-3.18 index 11d372b..dcc7b5a 100644 --- a/target/linux/ramips/mt7621/config-3.18 +++ b/target/linux/ramips/mt7621/config-3.18 @@ -217,3 +217,4 @@ CONFIG_WATCHDOG_CORE=y CONFIG_WEAK_ORDERING=y CONFIG_XPS=y CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y diff --git a/target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch b/target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch new file mode 100644 index 000..b3df1c5 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch @@ -0,0 +1,13 @@ +Index: linux-3.18.11/arch/mips/ralink/Kconfig +=== +--- linux-3.18.11.orig/arch/mips/ralink/Kconfig2015-04-28 17:30:50.631568808 +0800 linux-3.18.11/arch/mips/ralink/Kconfig 2015-04-28 17:32:10.167567161 +0800 +@@ -46,6 +46,8 @@ + select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_SMP + select SYS_SUPPORTS_MIPS_CMP ++ select SYS_SUPPORTS_HIGHMEM ++ select HIGHMEM + select IRQ_GIC + select HW_HAS_PCI + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/4] ralink: change FireWRT memory to 448MB
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 2b018e6..7d90157 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -8,7 +8,7 @@ memory@0 { device_type = memory; - reg = 0x0 0x1000; + reg = 0x0 0x1c00; }; chosen { -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/4] kernel: mips jump only works with memory less then 256mb. when enable HIGHMEM use long jump
Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../patches-3.18/305-mips_module_reloc.patch |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/linux/generic/patches-3.18/305-mips_module_reloc.patch b/target/linux/generic/patches-3.18/305-mips_module_reloc.patch index 41cf806..fd31f9f 100644 --- a/target/linux/generic/patches-3.18/305-mips_module_reloc.patch +++ b/target/linux/generic/patches-3.18/305-mips_module_reloc.patch @@ -1,6 +1,6 @@ --- a/arch/mips/Makefile +++ b/arch/mips/Makefile -@@ -90,8 +90,13 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin +@@ -90,8 +90,18 @@ all-$(CONFIG_SYS_SUPPORTS_ZBOOT)+= vmlin cflags-y += -G 0 -mno-abicalls -fno-pic -pipe -mno-branch-likely cflags-y += -msoft-float LDFLAGS_vmlinux += -G 0 -static -n -nostdlib --gc-sections @@ -8,9 +8,14 @@ KBUILD_AFLAGS_MODULE += -mlong-calls KBUILD_CFLAGS_MODULE += -mlong-calls +else ++ifdef CONFIG_HIGHMEM ++KBUILD_AFLAGS_MODULE += -mlong-calls ++KBUILD_CFLAGS_MODULE += -mlong-calls ++else +KBUILD_AFLAGS_MODULE += -mno-long-calls +KBUILD_CFLAGS_MODULE += -mno-long-calls +endif ++endif ifndef CONFIG_FUNCTION_TRACER KBUILD_CFLAGS_KERNEL += -ffunction-sections -fdata-sections -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/4] ralink: add HIGHMEM support for mt7621
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/mt7621/config-3.18 |1 + .../0112-add-mt7621-support-high-memory.patch | 13 + 2 files changed, 14 insertions(+) create mode 100644 target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch diff --git a/target/linux/ramips/mt7621/config-3.18 b/target/linux/ramips/mt7621/config-3.18 index 11d372b..dcc7b5a 100644 --- a/target/linux/ramips/mt7621/config-3.18 +++ b/target/linux/ramips/mt7621/config-3.18 @@ -217,3 +217,4 @@ CONFIG_WATCHDOG_CORE=y CONFIG_WEAK_ORDERING=y CONFIG_XPS=y CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y diff --git a/target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch b/target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch new file mode 100644 index 000..b3df1c5 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0112-add-mt7621-support-high-memory.patch @@ -0,0 +1,13 @@ +Index: linux-3.18.11/arch/mips/ralink/Kconfig +=== +--- linux-3.18.11.orig/arch/mips/ralink/Kconfig2015-04-28 17:30:50.631568808 +0800 linux-3.18.11/arch/mips/ralink/Kconfig 2015-04-28 17:32:10.167567161 +0800 +@@ -46,6 +46,8 @@ + select SYS_SUPPORTS_MULTITHREADING + select SYS_SUPPORTS_SMP + select SYS_SUPPORTS_MIPS_CMP ++ select SYS_SUPPORTS_HIGHMEM ++ select HIGHMEM + select IRQ_GIC + select HW_HAS_PCI + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: MT7621 add i2c controller driver
ralink i2c driver is not working on MT7621 platform. Porting a new drivers from MTK's source code. Signed-off-by: Jay Weng fl.serv...@t-firefly.com --- package/kernel/linux/modules/fs.mk |4 +- package/kernel/linux/modules/usb.mk| 13 +- target/linux/ramips/dts/FIREWRT.dts|2 +- target/linux/ramips/image/Makefile |2 +- target/linux/ramips/mt7621/config-3.18 | 16 +- .../0111-i2c-MIPS-add-mt7621-I2C-driver.patch | 335 6 files changed, 359 insertions(+), 13 deletions(-) create mode 100755 target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index 64182e6..e3e8c57 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -156,8 +156,8 @@ define KernelPackage/fs-ext4 SUBMENU:=$(FS_MENU) TITLE:=EXT4 filesystem support KCONFIG:= \ - CONFIG_EXT4_FS \ - CONFIG_JBD2 + CONFIG_EXT4_FS=y \ + CONFIG_JBD2=y FILES:= \ $(LINUX_DIR)/fs/ext4/ext4.ko \ $(LINUX_DIR)/fs/jbd2/jbd2.ko \ diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index be1553a..fa01a65 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -15,7 +15,7 @@ define KernelPackage/usb-core SUBMENU:=$(USB_MENU) TITLE:=Support for USB DEPENDS:=@USB_SUPPORT - KCONFIG:=CONFIG_USB CONFIG_XPS_USB_HCD_XILINX=n CONFIG_USB_FHCI_HCD=n + KCONFIG:=CONFIG_USB=y CONFIG_XPS_USB_HCD_XILINX=n CONFIG_USB_FHCI_HCD=n FILES:= \ $(LINUX_DIR)/drivers/usb/core/usbcore.ko \ $(LINUX_DIR)/drivers/usb/usb-common.ko@lt3.16 \ @@ -168,7 +168,7 @@ $(eval $(call KernelPackage,usb-phy-omap-usb2)) define KernelPackage/usb-phy-omap-usb3 TITLE:=Support for OMAP USB3 PHY - KCONFIG:=CONFIG_OMAP_USB3 + KCONFIG:=CONFIG_OMAP_USB3=y DEPENDS:=@TARGET_omap +kmod-usb-phy-omap-usb2 FILES:=$(LINUX_DIR)/drivers/usb/phy/phy-omap-usb3.ko AUTOLOAD:=$(call AutoLoad,45,phy-omap-usb3) @@ -873,8 +873,7 @@ $(eval $(call KernelPackage,usb-serial-qualcomm)) define KernelPackage/usb-storage TITLE:=USB Storage support DEPENDS:= +kmod-scsi-core - KCONFIG:=CONFIG_USB_STORAGE - FILES:=$(LINUX_DIR)/drivers/usb/storage/usb-storage.ko + KCONFIG:= CONFIG_USB_STORAGE=y AUTOLOAD:=$(call AutoProbe,usb-storage,1) $(call AddDepends/usb) endef @@ -1477,9 +1476,9 @@ define KernelPackage/usb3 TITLE:=Support for USB3 controllers DEPENDS:=+TARGET_omap:kmod-usb-phy-omap-usb3 KCONFIG:= \ - CONFIG_USB_XHCI_HCD \ - CONFIG_USB_XHCI_PCI \ - CONFIG_USB_XHCI_PLATFORM \ + CONFIG_USB_XHCI_HCD=y \ + CONFIG_USB_XHCI_PCI=y \ + CONFIG_USB_XHCI_PLATFORM=y \ CONFIG_USB_XHCI_HCD_DEBUGGING=n FILES:= \ $(XHCI_FILES) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 54f0e55..e25a035 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -12,7 +12,7 @@ }; chosen { - bootargs = console=ttyS0,57600; + bootargs = console=ttyS0,57600 root=/dev/sda1 rw rootwait init=/bin/bash; }; sdhci@1013 { diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 45ae3a5..13fac3b 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -901,7 +901,7 @@ endif # ifeq ($(SUBTARGET),mt7621) - TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt + TARGET_DEVICES += firewrt endif define Device/mt7621 diff --git a/target/linux/ramips/mt7621/config-3.18 b/target/linux/ramips/mt7621/config-3.18 index 11d372b..2b7bea1 100644 --- a/target/linux/ramips/mt7621/config-3.18 +++ b/target/linux/ramips/mt7621/config-3.18 @@ -34,6 +34,10 @@ CONFIG_CPU_RMAP=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_HIGHMEM=y CONFIG_CPU_SUPPORTS_MSA=y +CONFIG_CRC16=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y CONFIG_CSRC_R4K=y CONFIG_DEBUG_PINCTRL=y CONFIG_DMA_NONCOHERENT=y @@ -41,6 +45,8 @@ CONFIG_DMA_NONCOHERENT=y CONFIG_DTB_RT_NONE=y CONFIG_DTC=y CONFIG_EARLY_PRINTK=y +CONFIG_EXT4_FS=y +CONFIG_FS_MBCACHE=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y @@ -99,6 +105,7 @@ CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_GIC=y CONFIG_IRQ_WORK=y +CONFIG_JBD2=y CONFIG_LIBFDT=y CONFIG_MDIO_BOARDINFO=y CONFIG_MIPS=y @@ -126,13 +133,13 @@ CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_SPLIT_TRX_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y -# CONFIG_MTK_MTD_NAND is not set CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NET_FLOW_LIMIT=y CONFIG_NET_RALINK=y CONFIG_NET_RALINK_GSW_MT7620=y CONFIG_NET_RALINK_MDIO=y CONFIG_NET_RALINK_MT7620=y
[OpenWrt-Devel] [PATCH] ralink: MT7621 add i2c controller driver
ralink i2c driver is not working on MT7621 platform. Porting a new drivers from MTK's source code. Last time i got some mess . This is new version. Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../0111-i2c-MIPS-add-mt7621-I2C-driver.patch | 335 1 file changed, 335 insertions(+) create mode 100755 target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch diff --git a/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch b/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch new file mode 100755 index 000..5df95f4 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch @@ -0,0 +1,335 @@ +Index: linux-3.18.9/drivers/i2c/busses/Kconfig +=== +--- linux-3.18.9.orig/drivers/i2c/busses/Kconfig 2015-03-23 15:00:11.730403938 +0800 linux-3.18.9/drivers/i2c/busses/Kconfig2015-03-23 15:00:11.982403926 +0800 +@@ -714,6 +714,10 @@ + tristate Ralink I2C Controller + select OF_I2C + ++config I2C_MT7621 ++ tristate MT7621 I2C Controller ++ select OF_I2C ++ + config HAVE_S3C2410_I2C + bool + help +Index: linux-3.18.9/drivers/i2c/busses/Makefile +=== +--- linux-3.18.9.orig/drivers/i2c/busses/Makefile 2015-03-23 15:00:11.730403938 +0800 linux-3.18.9/drivers/i2c/busses/Makefile 2015-03-23 15:00:11.982403926 +0800 +@@ -67,6 +67,7 @@ + obj-$(CONFIG_I2C_PXA) += i2c-pxa.o + obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o + obj-$(CONFIG_I2C_RALINK) += i2c-ralink.o ++obj-$(CONFIG_I2C_MT7621) += i2c-mt7621.o + obj-$(CONFIG_I2C_QUP) += i2c-qup.o + obj-$(CONFIG_I2C_RIIC)+= i2c-riic.o + obj-$(CONFIG_I2C_RK3X)+= i2c-rk3x.o +Index: linux-3.18.9/drivers/i2c/busses/i2c-mt7621.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.18.9/drivers/i2c/busses/i2c-mt7621.c 2015-03-23 16:31:42.684747034 +0800 +@@ -0,0 +1,303 @@ ++/* ++ * drivers/i2c/busses/i2c-mt7621.c ++ * ++ * Copyright (C) 2013 Steven Liu steven_...@mediatek.com ++ * ++ * Improve driver for i2cdetect from i2c-tools to detect i2c devices on the bus. ++ * (C) 2014 Sittisak sittis...@hotmail.com ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#include linux/interrupt.h ++#include linux/kernel.h ++#include linux/module.h ++#include linux/reset.h ++#include linux/delay.h ++#include linux/slab.h ++#include linux/init.h ++#include linux/errno.h ++#include linux/platform_device.h ++#include linux/i2c.h ++#include linux/io.h ++#include linux/err.h ++ ++#include asm/mach-ralink/ralink_regs.h ++ ++#define REG_CONFIG_REG 0x00 ++#define REG_CLKDIV_REG 0x04 ++#define REG_DEVADDR_REG 0x08 ++#define REG_ADDR_REG 0x0C ++#define REG_DATAOUT_REG 0x10 ++#define REG_DATAIN_REG 0x14 ++#define REG_STATUS_REG 0x18 ++#define REG_STARTXFR_REG 0x1C ++#define REG_BYTECNT_REG 0x20 ++#define REG_SM0_IS_AUTOMODE 0x28 ++#define REG_SM0CTL0 0x40 ++ ++ ++#define I2C_STARTERR 0x10 ++#define I2C_ACKERR 0x08 ++#define I2C_DATARDY 0x04 ++#define I2C_SDOEMPTY 0x02 ++#define I2C_BUSY 0x01 ++ ++/* I2C_CFG register bit field */ ++#define I2C_CFG_ADDRLEN_8(75) /* 8 bits */ ++#define I2C_CFG_DEVADLEN_7 (62) ++#define I2C_CFG_ADDRDIS BIT(1) ++#define I2C_CFG_DEVADDIS BIT(0) ++ ++#define I2C_CFG_DEFAULT (I2C_CFG_ADDRLEN_8 | \ ++ I2C_CFG_DEVADLEN_7 | \ ++ I2C_CFG_ADDRDIS) ++ ++#define I2C_RETRY0x1000 ++ ++#define CLKDIV_VALUE 333 ++#define i2c_busy_loop(CLKDIV_VALUE*30) ++ ++#define READ_CMD 0x01 ++#define WRITE_CMD0x00 ++#define READ_BLOCK 16 ++ ++#define SM0_ODRAIN BIT(31) ++#define SM0_VSYNC_MODE BIT(28) ++#define SM0_CLK_DIV
[OpenWrt-Devel] [PATCH 2/2] ralink: MT7621 add i2c controller driver
ralink i2c driver is not working on MT7621 platform. Porting a new drivers from MTK's source code. Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../0111-i2c-MIPS-add-mt7621-I2C-driver.patch | 335 1 file changed, 335 insertions(+) create mode 100755 target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch diff --git a/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch b/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch new file mode 100755 index 000..5df95f4 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch @@ -0,0 +1,335 @@ +Index: linux-3.18.9/drivers/i2c/busses/Kconfig +=== +--- linux-3.18.9.orig/drivers/i2c/busses/Kconfig 2015-03-23 15:00:11.730403938 +0800 linux-3.18.9/drivers/i2c/busses/Kconfig2015-03-23 15:00:11.982403926 +0800 +@@ -714,6 +714,10 @@ + tristate Ralink I2C Controller + select OF_I2C + ++config I2C_MT7621 ++ tristate MT7621 I2C Controller ++ select OF_I2C ++ + config HAVE_S3C2410_I2C + bool + help +Index: linux-3.18.9/drivers/i2c/busses/Makefile +=== +--- linux-3.18.9.orig/drivers/i2c/busses/Makefile 2015-03-23 15:00:11.730403938 +0800 linux-3.18.9/drivers/i2c/busses/Makefile 2015-03-23 15:00:11.982403926 +0800 +@@ -67,6 +67,7 @@ + obj-$(CONFIG_I2C_PXA) += i2c-pxa.o + obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o + obj-$(CONFIG_I2C_RALINK) += i2c-ralink.o ++obj-$(CONFIG_I2C_MT7621) += i2c-mt7621.o + obj-$(CONFIG_I2C_QUP) += i2c-qup.o + obj-$(CONFIG_I2C_RIIC)+= i2c-riic.o + obj-$(CONFIG_I2C_RK3X)+= i2c-rk3x.o +Index: linux-3.18.9/drivers/i2c/busses/i2c-mt7621.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.18.9/drivers/i2c/busses/i2c-mt7621.c 2015-03-23 16:31:42.684747034 +0800 +@@ -0,0 +1,303 @@ ++/* ++ * drivers/i2c/busses/i2c-mt7621.c ++ * ++ * Copyright (C) 2013 Steven Liu steven_...@mediatek.com ++ * ++ * Improve driver for i2cdetect from i2c-tools to detect i2c devices on the bus. ++ * (C) 2014 Sittisak sittis...@hotmail.com ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#include linux/interrupt.h ++#include linux/kernel.h ++#include linux/module.h ++#include linux/reset.h ++#include linux/delay.h ++#include linux/slab.h ++#include linux/init.h ++#include linux/errno.h ++#include linux/platform_device.h ++#include linux/i2c.h ++#include linux/io.h ++#include linux/err.h ++ ++#include asm/mach-ralink/ralink_regs.h ++ ++#define REG_CONFIG_REG 0x00 ++#define REG_CLKDIV_REG 0x04 ++#define REG_DEVADDR_REG 0x08 ++#define REG_ADDR_REG 0x0C ++#define REG_DATAOUT_REG 0x10 ++#define REG_DATAIN_REG 0x14 ++#define REG_STATUS_REG 0x18 ++#define REG_STARTXFR_REG 0x1C ++#define REG_BYTECNT_REG 0x20 ++#define REG_SM0_IS_AUTOMODE 0x28 ++#define REG_SM0CTL0 0x40 ++ ++ ++#define I2C_STARTERR 0x10 ++#define I2C_ACKERR 0x08 ++#define I2C_DATARDY 0x04 ++#define I2C_SDOEMPTY 0x02 ++#define I2C_BUSY 0x01 ++ ++/* I2C_CFG register bit field */ ++#define I2C_CFG_ADDRLEN_8(75) /* 8 bits */ ++#define I2C_CFG_DEVADLEN_7 (62) ++#define I2C_CFG_ADDRDIS BIT(1) ++#define I2C_CFG_DEVADDIS BIT(0) ++ ++#define I2C_CFG_DEFAULT (I2C_CFG_ADDRLEN_8 | \ ++ I2C_CFG_DEVADLEN_7 | \ ++ I2C_CFG_ADDRDIS) ++ ++#define I2C_RETRY0x1000 ++ ++#define CLKDIV_VALUE 333 ++#define i2c_busy_loop(CLKDIV_VALUE*30) ++ ++#define READ_CMD 0x01 ++#define WRITE_CMD0x00 ++#define READ_BLOCK 16 ++ ++#define SM0_ODRAIN BIT(31) ++#define SM0_VSYNC_MODE BIT(28) ++#define SM0_CLK_DIV (CLKDIV_VALUE 16) ++#define
[OpenWrt-Devel] [PATCH] kernel: fix usb kernel package Makefile
From: zouxf fl.serv...@t-firefly.com Signed-off-by: zouxf fl.serv...@t-firefly.com --- package/kernel/linux/modules/usb.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index e87a857..be1553a 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1470,7 +1470,7 @@ endef $(eval $(call KernelPackage,usbmon)) -XHCI_FILES := $(wildcard $(patsubst %,$(LINUX_DIR)/drivers/usb/host/%.ko,xhci-hcd xhci-pci xhci-plat)) +XHCI_FILES := $(wildcard $(patsubst %,$(LINUX_DIR)/drivers/usb/host/%.ko,xhci-hcd xhci-pci xhci-plat-hcd)) XHCI_AUTOLOAD := $(patsubst $(LINUX_DIR)/drivers/usb/host/%.ko,%,$(XHCI_FILES)) define KernelPackage/usb3 -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] ralink: add FireWRT power button
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |5 + 1 file changed, 5 insertions(+) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 54f0e55..2b018e6 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -103,6 +103,11 @@ gpios = gpio0 18 1; linux,code = 0x211; }; + power { + label = power; + gpios = gpio0 23 1; + linux,code = 116; + }; }; pinctrl { -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ralink: MT7621 add i2c controller driver on linux kernel 3.18
ralink i2c driver is not working on MT7621 platform. Porting a new drivers from MTK's source code. Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../0111-i2c-MIPS-add-mt7621-I2C-driver.patch | 390 1 file changed, 390 insertions(+) create mode 100755 target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch diff --git a/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch b/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch new file mode 100755 index 000..ec897ee --- /dev/null +++ b/target/linux/ramips/patches-3.18/0111-i2c-MIPS-add-mt7621-I2C-driver.patch @@ -0,0 +1,390 @@ +Index: linux-3.18.9/drivers/i2c/busses/Kconfig +=== +--- linux-3.18.9.orig/drivers/i2c/busses/Kconfig 2015-03-21 11:47:27.387652879 +0800 linux-3.18.9/drivers/i2c/busses/Kconfig2015-03-21 11:47:27.587652870 +0800 +@@ -714,6 +714,10 @@ + tristate Ralink I2C Controller + select OF_I2C + ++config I2C_MT7621 ++tristate Mt7621 I2C Controller ++select OF_I2C ++ + config HAVE_S3C2410_I2C + bool + help +Index: linux-3.18.9/drivers/i2c/busses/Makefile +=== +--- linux-3.18.9.orig/drivers/i2c/busses/Makefile 2015-03-21 11:47:27.387652879 +0800 linux-3.18.9/drivers/i2c/busses/Makefile 2015-03-21 11:47:27.587652870 +0800 +@@ -67,6 +67,7 @@ + obj-$(CONFIG_I2C_PXA) += i2c-pxa.o + obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o + obj-$(CONFIG_I2C_RALINK) += i2c-ralink.o ++obj-$(CONFIG_I2C_MT7621) += i2c-mt7621.o + obj-$(CONFIG_I2C_QUP) += i2c-qup.o + obj-$(CONFIG_I2C_RIIC)+= i2c-riic.o + obj-$(CONFIG_I2C_RK3X)+= i2c-rk3x.o +Index: linux-3.18.9/drivers/i2c/busses/i2c-mt7621.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.18.9/drivers/i2c/busses/i2c-mt7621.c 2015-03-21 11:48:58.883648615 +0800 +@@ -0,0 +1,358 @@ ++/* ++ * drivers/i2c/busses/i2c-mt7621.c ++ * ++ * Copyright (C) 2013 Steven Liu steven_...@mediatek.com ++ * ++ * Improve driver for i2cdetect from i2c-tools to detect i2c devices on the bus. ++ * (C) 2014 Sittisak sittis...@hotmail.com ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#include linux/interrupt.h ++#include linux/kernel.h ++#include linux/module.h ++#include linux/reset.h ++#include linux/delay.h ++#include linux/slab.h ++#include linux/init.h ++#include linux/errno.h ++#include linux/platform_device.h ++#include linux/i2c.h ++#include linux/io.h ++#include linux/err.h ++ ++#include asm/mach-ralink/ralink_regs.h ++ ++#define REG_CONFIG_REG 0x00 ++#define REG_CLKDIV_REG 0x04 ++#define REG_DEVADDR_REG 0x08 ++#define REG_ADDR_REG 0x0C ++#define REG_DATAOUT_REG 0x10 ++#define REG_DATAIN_REG 0x14 ++#define REG_STATUS_REG 0x18 ++#define REG_STARTXFR_REG 0x1C ++#define REG_BYTECNT_REG 0x20 ++#define REG_SM0_IS_AUTOMODE 0x28 ++#define REG_SM0CTL0 0x40 ++ ++ ++#define I2C_STARTERR 0x10 ++#define I2C_ACKERR 0x08 ++#define I2C_DATARDY 0x04 ++#define I2C_SDOEMPTY 0x02 ++#define I2C_BUSY 0x01 ++ ++/* I2C_CFG register bit field */ ++#define I2C_CFG_ADDRLEN_8(75) /* 8 bits */ ++#define I2C_CFG_DEVADLEN_7 (62) ++#define I2C_CFG_ADDRDIS (11) ++#define I2C_CFG_DEVADDIS (10) ++ ++#define I2C_CFG_DEFAULT (I2C_CFG_ADDRLEN_8 | \ ++ I2C_CFG_DEVADLEN_7 | \ ++ I2C_CFG_ADDRDIS) ++ ++#define I2C_RETRY0x1000 ++ ++#define CLKDIV_VALUE 333 ++#define i2c_busy_loop(CLKDIV_VALUE*30) ++ ++#define READ_CMD 0x01 ++#define WRITE_CMD0x00 ++#define READ_BLOCK 16 ++ ++#define I2C_OFFSET 0x900 ++#define RSTCTRL_OFFSET 0x34 ++ ++#define MT7621_REG(x)(*((volatile u32 *)(x))) ++ ++struct
[OpenWrt-Devel] [PATCH] ralink: mt7621 fix pinctrl config
From: zouxf fl.serv...@t-firefly.com Signed-off-by: zouxf fl.serv...@t-firefly.com --- target/linux/ramips/dts/mt7621.dtsi| 18 +++--- .../patches-3.18/0062-mt7621-fix-pinctrl.patch | 58 2 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 50cd144..f09ec3e 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -123,38 +123,38 @@ }; i2c_pins: i2c { i2c { - lantiq,group = i2c; - lantiq,function = i2c; + ralink,group = i2c; + ralink,function = i2c; }; }; uart1_pins: uart1 { uart1 { ralink,group = uart1; - ralink,function = uart; + ralink,function = uart1; }; }; uart2_pins: uart2 { uart2 { ralink,group = uart2; - ralink,function = uart; + ralink,function = uart2; }; }; uart3_pins: uart3 { uart3 { ralink,group = uart3; - ralink,function = uart; + ralink,function = uart3; }; }; rgmii1_pins: rgmii1 { rgmii1 { ralink,group = rgmii1; - ralink,function = rgmii; + ralink,function = rgmii1; }; }; rgmii2_pins: rgmii2 { rgmii2 { ralink,group = rgmii2; - ralink,function = rgmii; + ralink,function = rgmii2; }; }; mdio_pins: mdio { @@ -172,11 +172,11 @@ nand_pins: nand { spi-nand { ralink,group = spi; - ralink,function = nand; + ralink,function = nand1; }; sdhci-nand { ralink,group = sdhci; - ralink,function = nand; + ralink,function = nand2; }; }; sdhci_pins: sdhci { diff --git a/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch b/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch new file mode 100644 index 000..a963e5f --- /dev/null +++ b/target/linux/ramips/patches-3.18/0062-mt7621-fix-pinctrl.patch @@ -0,0 +1,58 @@ +Index: linux-3.18.8/arch/mips/ralink/mt7621.c +=== +--- linux-3.18.8.orig/arch/mips/ralink/mt7621.c2015-03-17 10:46:49.290956084 +0800 linux-3.18.8/arch/mips/ralink/mt7621.c 2015-03-17 14:54:21.823186689 +0800 +@@ -32,8 +32,8 @@ + + #define MT7621_GPIO_MODE_UART11 + #define MT7621_GPIO_MODE_I2C 2 +-#define MT7621_GPIO_MODE_UART23 +-#define MT7621_GPIO_MODE_UART35 ++#define MT7621_GPIO_MODE_UART25 ++#define MT7621_GPIO_MODE_UART33 + #define MT7621_GPIO_MODE_JTAG 7 + #define MT7621_GPIO_MODE_WDT_MASK 0x3 + #define MT7621_GPIO_MODE_WDT_SHIFT8 +@@ -53,10 +53,10 @@ + #define MT7621_GPIO_MODE_SDHCI_SHIFT 18 + #define MT7621_GPIO_MODE_SDHCI_GPIO 1 + +-static struct rt2880_pmx_func uart1_grp[] = { FUNC(uart, 0, 1, 2) }; ++static struct rt2880_pmx_func uart1_grp[] = { FUNC(uart1, 0, 1, 2) }; + static struct rt2880_pmx_func i2c_grp[] = { FUNC(i2c, 0, 3, 2) }; +-static struct rt2880_pmx_func uart3_grp[] = { FUNC(uart, 0, 5, 4) }; +-static struct rt2880_pmx_func uart2_grp[] = { FUNC(uart, 0, 9, 4) }; ++static struct rt2880_pmx_func uart3_grp[] = { FUNC(uart2, 0, 5, 4) }; ++static struct rt2880_pmx_func uart2_grp[] = { FUNC(uart3, 0, 9, 4) }; + static struct rt2880_pmx_func jtag_grp[] = { FUNC(jtag, 0, 13, 5) }; + static struct rt2880_pmx_func wdt_grp[] = { + FUNC(wdt rst, 0, 18, 1), +@@ -67,22 +67,22 @@ + FUNC(pcie refclk, MT7621_GPIO_MODE_PCIE_REF, 19, 1) + }; + static struct rt2880_pmx_func mdio_grp[] = { FUNC(mdio, 0, 20, 2) }; +-static struct rt2880_pmx_func rgmii2_grp[] = { FUNC(rgmii, 0, 22, 12) }; ++static struct
[OpenWrt-Devel] [PATCH] ralink: fix mt7621 i2c name
From: zouxf fl.serv...@t-firefly.com Signed-off-by: zouxf fl.serv...@t-firefly.com --- target/linux/ramips/dts/mt7621.dtsi |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 50cd144..53b215f 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -123,8 +123,8 @@ }; i2c_pins: i2c { i2c { - lantiq,group = i2c; - lantiq,function = i2c; + ralink,group = i2c; + ralink,function = i2c; }; }; uart1_pins: uart1 { -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: MT7621 add i2c controller driver
ralink i2c driver is not working on MT7621 platform. Porting a new drivers from MTK's source code. Signed-off-by: daixj fl.serv...@t-firefly.com --- target/linux/ramips/modules.mk | 20 +- .../0111-i2c-MIPS-add-mt7621-I2C-driver.patch | 390 2 files changed, 409 insertions(+), 1 deletion(-) create mode 100644 target/linux/ramips/patches-3.14/0111-i2c-MIPS-add-mt7621-I2C-driver.patch diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk index 550a8c2..d72e0aa 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -27,7 +27,7 @@ I2C_RALINK_MODULES:= \ define KernelPackage/i2c-ralink $(call i2c_defaults,$(I2C_RALINK_MODULES),59) TITLE:=Ralink I2C Controller - DEPENDS:=@TARGET_ramips kmod-i2c-core + DEPENDS:=@TARGET_ramips @(!TARGET_ramips_mt7621) kmod-i2c-core endef define KernelPackage/i2c-ralink/description @@ -36,6 +36,24 @@ endef $(eval $(call KernelPackage,i2c-ralink)) + +I2C_MT7621_MODULES:= \ + CONFIG_I2C_MT7621:drivers/i2c/busses/i2c-mt7621 + +define KernelPackage/i2c-mt7621 + $(call i2c_defaults,$(I2C_MT7621_MODULES),59) + TITLE:=MT7621 I2C Controller + DEPENDS:=@TARGET_ramips @TARGET_ramips_mt7621 kmod-i2c-core +endef + +define KernelPackage/i2c-mt7621/description + Kernel modules for enable mt7621 i2c controller. +endef + +$(eval $(call KernelPackage,i2c-mt7621)) + + + define KernelPackage/sound-mt7620 TITLE:=MT7620 PCM/I2S Alsa Driver DEPENDS:=@TARGET_ramips_mt7620 +kmod-sound-soc-core +kmod-regmap diff --git a/target/linux/ramips/patches-3.14/0111-i2c-MIPS-add-mt7621-I2C-driver.patch b/target/linux/ramips/patches-3.14/0111-i2c-MIPS-add-mt7621-I2C-driver.patch new file mode 100644 index 000..5f10a80 --- /dev/null +++ b/target/linux/ramips/patches-3.14/0111-i2c-MIPS-add-mt7621-I2C-driver.patch @@ -0,0 +1,390 @@ +Index: linux-3.14.30/drivers/i2c/busses/Kconfig +=== +--- linux-3.14.30.orig/drivers/i2c/busses/Kconfig 2015-03-11 16:46:46.963996212 +0800 linux-3.14.30/drivers/i2c/busses/Kconfig 2015-03-12 10:40:34.849574512 +0800 +@@ -663,6 +663,10 @@ + tristate Ralink I2C Controller + select OF_I2C + ++config I2C_MT7621 ++ tristate Mt7621 I2C Controller ++ select OF_I2C ++ + config HAVE_S3C2410_I2C + bool + help +Index: linux-3.14.30/drivers/i2c/busses/Makefile +=== +--- linux-3.14.30.orig/drivers/i2c/busses/Makefile 2015-03-11 16:46:46.967996212 +0800 linux-3.14.30/drivers/i2c/busses/Makefile 2015-03-11 17:52:43.008121712 +0800 +@@ -64,6 +64,7 @@ + obj-$(CONFIG_I2C_PXA) += i2c-pxa.o + obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o + obj-$(CONFIG_I2C_RALINK) += i2c-ralink.o ++obj-$(CONFIG_I2C_MT7621) += i2c-mt7621.o + obj-$(CONFIG_I2C_RIIC)+= i2c-riic.o + obj-$(CONFIG_I2C_S3C2410) += i2c-s3c2410.o + obj-$(CONFIG_I2C_S6000) += i2c-s6000.o +Index: linux-3.14.30/drivers/i2c/busses/i2c-mt7621.c +=== +--- /dev/null 1970-01-01 00:00:00.0 + linux-3.14.30/drivers/i2c/busses/i2c-mt7621.c 2015-03-12 11:45:00.449759139 +0800 +@@ -0,0 +1,358 @@ ++/* ++ * drivers/i2c/busses/i2c-mt7621.c ++ * ++ * Copyright (C) 2013 Steven Liu steven_...@mediatek.com ++ * ++ * Improve driver for i2cdetect from i2c-tools to detect i2c devices on the bus. ++ * (C) 2014 Sittisak sittis...@hotmail.com ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#include linux/interrupt.h ++#include linux/kernel.h ++#include linux/module.h ++#include linux/reset.h ++#include linux/delay.h ++#include linux/slab.h ++#include linux/init.h ++#include linux/errno.h ++#include linux/platform_device.h ++#include linux/i2c.h ++#include linux/io.h ++#include linux/err.h ++ ++#include asm/mach-ralink/ralink_regs.h ++ ++#define REG_CONFIG_REG 0x00 ++#define REG_CLKDIV_REG 0x04 ++#define REG_DEVADDR_REG 0x08 ++#define REG_ADDR_REG 0x0C ++#define REG_DATAOUT_REG 0x10 ++#define REG_DATAIN_REG 0x14 ++#define REG_STATUS_REG 0x18 ++#define REG_STARTXFR_REG 0x1C ++#define REG_BYTECNT_REG 0x20 ++#define REG_SM0_IS_AUTOMODE 0x28 ++#define REG_SM0CTL0
[OpenWrt-Devel] [PATCH 1/2] ralink: add FireWRT IO multiplexing
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |8 1 file changed, 8 insertions(+) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 8790f7b..a6318d0 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -105,4 +105,12 @@ }; }; + pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = wdt, rgmii2; + ralink,function = gpio; + }; + }; + }; }; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] ralink: FireWRT flash size is up to 16M.
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/image/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 6e6b10b..45ae3a5 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -935,7 +935,7 @@ endef define Device/firewrt DTS := FIREWRT - IMAGE_SIZE := $(ralink_default_fw_size_8M) + IMAGE_SIZE := $(ralink_default_fw_size_16M) endef # -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: resize the flash partition for FireWRT
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index a6318d0..54f0e55 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -26,7 +26,7 @@ m25p80@0 { #address-cells = 1; #size-cells = 1; - compatible = mx25l12805d; + compatible = w25q128; reg = 0 0; linux,modalias = m25p80; spi-max-frequency = 1000; @@ -51,7 +51,7 @@ partition@5 { label = firmware; - reg = 0x5 0x7b; + reg = 0x5 0xfb; }; }; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: remove VHT capabilities when not using 802.11ac
The mt76 driver might have some problem working with MT7602. MT7602 should not have VHT capabilities . But the driver not identity properly. Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../0001-mt7602-remove-vht-capabilities.patch | 46 1 file changed, 46 insertions(+) create mode 100644 package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch diff --git a/package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch b/package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch new file mode 100644 index 000..0a1f9c9 --- /dev/null +++ b/package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch @@ -0,0 +1,46 @@ +--- a/init.c b/init.c +@@ -682,24 +682,27 @@ mt76_init_sband(struct mt76_dev *dev, st + ht_cap-ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; + ht_cap-ampdu_density = IEEE80211_HT_MPDU_DENSITY_4; + +- vht_cap = sband-vht_cap; +- vht_cap-vht_supported = true; ++ if (dev-cap.has_5ghz) ++ { ++ vht_cap = sband-vht_cap; ++ vht_cap-vht_supported = true; + +- mcs_map = (IEEE80211_VHT_MCS_SUPPORT_0_9 (0 * 2)) | +-(IEEE80211_VHT_MCS_SUPPORT_0_9 (1 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (2 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (3 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (4 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (5 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (6 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (7 * 2)); ++ mcs_map = (IEEE80211_VHT_MCS_SUPPORT_0_9 (0 * 2)) | ++(IEEE80211_VHT_MCS_SUPPORT_0_9 (1 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (2 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (3 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (4 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (5 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (6 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (7 * 2)); + +- vht_cap-vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); +- vht_cap-vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); +- vht_cap-cap = IEEE80211_VHT_CAP_RXLDPC | +- IEEE80211_VHT_CAP_TXSTBC | +- IEEE80211_VHT_CAP_RXSTBC_1 | +- IEEE80211_VHT_CAP_SHORT_GI_80; ++ vht_cap-vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); ++ vht_cap-vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); ++ vht_cap-cap = IEEE80211_VHT_CAP_RXLDPC | ++ IEEE80211_VHT_CAP_TXSTBC | ++ IEEE80211_VHT_CAP_RXSTBC_1 | ++ IEEE80211_VHT_CAP_SHORT_GI_80; ++ } + + dev-chandef.chan = sband-channels[0]; + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: remove VHT capabilities when not using 802.11ac
The mt76 driver might have some problem working with MT7602. MT7602 should not have VHT capabilities . But the driver not identity properly. Signed-off-by: wengbj fl.serv...@t-firefly.com --- .../0001-mt7602-remove-vht-capabilities.patch | 46 1 file changed, 46 insertions(+) create mode 100644 package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch diff --git a/package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch b/package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch new file mode 100644 index 000..397fbbf --- /dev/null +++ b/package/kernel/mt76/patches/0001-mt7602-remove-vht-capabilities.patch @@ -0,0 +1,46 @@ +--- a/init.c b/init.c +@@ -682,24 +682,27 @@ mt76_init_sband(struct mt76_dev *dev, st + ht_cap-ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; + ht_cap-ampdu_density = IEEE80211_HT_MPDU_DENSITY_4; + +- vht_cap = sband-vht_cap; +- vht_cap-vht_supported = true; ++if (dev-cap.has_5ghz) ++{ ++ vht_cap = sband-vht_cap; ++ vht_cap-vht_supported = true; + +- mcs_map = (IEEE80211_VHT_MCS_SUPPORT_0_9 (0 * 2)) | +-(IEEE80211_VHT_MCS_SUPPORT_0_9 (1 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (2 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (3 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (4 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (5 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (6 * 2)) | +-(IEEE80211_VHT_MCS_NOT_SUPPORTED (7 * 2)); ++ mcs_map = (IEEE80211_VHT_MCS_SUPPORT_0_9 (0 * 2)) | ++(IEEE80211_VHT_MCS_SUPPORT_0_9 (1 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (2 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (3 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (4 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (5 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (6 * 2)) | ++(IEEE80211_VHT_MCS_NOT_SUPPORTED (7 * 2)); + +- vht_cap-vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); +- vht_cap-vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); +- vht_cap-cap = IEEE80211_VHT_CAP_RXLDPC | +- IEEE80211_VHT_CAP_TXSTBC | +- IEEE80211_VHT_CAP_RXSTBC_1 | +- IEEE80211_VHT_CAP_SHORT_GI_80; ++ vht_cap-vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); ++ vht_cap-vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); ++ vht_cap-cap = IEEE80211_VHT_CAP_RXLDPC | ++ IEEE80211_VHT_CAP_TXSTBC | ++ IEEE80211_VHT_CAP_RXSTBC_1 | ++ IEEE80211_VHT_CAP_SHORT_GI_80; ++} + + dev-chandef.chan = sband-channels[0]; + -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts| 12 target/linux/ramips/mt7621/profiles/firefly.mk |2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index faebe2f..f22c885 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -92,4 +92,16 @@ }; }; + gpio-keys-polled { + compatible = gpio-keys-polled; + #address-cells = 1; + #size-cells = 0; + poll-interval = 20; + wps { + label = wps; + gpios = gpio0 18 1; + linux,code = 0x211; + }; + }; + }; diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk index c8292b0..b095979 100644 --- a/target/linux/ramips/mt7621/profiles/firefly.mk +++ b/target/linux/ramips/mt7621/profiles/firefly.mk @@ -8,7 +8,7 @@ define Profile/Firefly NAME:=Firefly Device PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid kmod-usb-storage mount-utils usbutils \ + kmod-usb-core kmod-usb3 kmod-usb-hid kmod-usb-storage mount-utils usbutils hostapd-utils \ kmod-sdhci-mt7620 \ kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \ kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \ -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |9 + 1 file changed, 9 insertions(+) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 4e9e28b..faebe2f 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -83,4 +83,13 @@ mtd-mac-address = factory 0xe000; }; + gpio-leds { + compatible = gpio-leds; + + power { + label = firewrt:green:power; + gpios = gpio0 22 1; + }; + }; + }; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Signed-off-by: wengbj fl.serv...@t-firefly.com --- target/linux/ramips/dts/FIREWRT.dts |5 + 1 file changed, 5 insertions(+) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 2e5d26b..4e9e28b 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -78,4 +78,9 @@ }; }; }; + + ethernet@1e10 { + mtd-mac-address = factory 0xe000; + }; + }; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail
--- target/linux/ramips/dts/FIREWRT.dts |9 + 1 file changed, 9 insertions(+) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 4e9e28b..ddad8bf 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -83,4 +83,13 @@ mtd-mac-address = factory 0xe000; }; + gpio-leds { + compatible = gpio-leds; + + power { + label = buffalo:green:power; + gpios = gpio0 22 1; + }; + }; + }; -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail
--- target/linux/ramips/dts/FIREWRT.dts| 12 target/linux/ramips/mt7621/profiles/firefly.mk |2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index ddad8bf..58049b7 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -92,4 +92,16 @@ }; }; + gpio-keys-polled { + compatible = gpio-keys-polled; + #address-cells = 1; + #size-cells = 0; + poll-interval = 20; + wps { + label = wps; + gpios = gpio0 18 1; + linux,code = 0x211; + }; + }; + }; diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk index c8292b0..b095979 100644 --- a/target/linux/ramips/mt7621/profiles/firefly.mk +++ b/target/linux/ramips/mt7621/profiles/firefly.mk @@ -8,7 +8,7 @@ define Profile/Firefly NAME:=Firefly Device PACKAGES:=\ - kmod-usb-core kmod-usb3 kmod-usb-hid kmod-usb-storage mount-utils usbutils \ + kmod-usb-core kmod-usb3 kmod-usb-hid kmod-usb-storage mount-utils usbutils hostapd-utils \ kmod-sdhci-mt7620 \ kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \ kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \ -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ralink: check ethernet MAC address whether it is valid
From: wengbj linu...@foxmail.com The mac address usually write in factory block. but sometime user erase this block , the mac address will change to ff:ff:ff:ff:ff:ff. This patch is purpose to fix this issue. --- .../drivers/net/ethernet/ralink/ralink_soc_eth.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c index d7d1e8e..9900a5e 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c @@ -1220,8 +1220,10 @@ static int __init fe_init(struct net_device *dev) if (priv-soc-switch_init) priv-soc-switch_init(priv); - memcpy(dev-dev_addr, priv-soc-mac, ETH_ALEN); of_get_mac_address_mtd(priv-device-of_node, dev-dev_addr); + /*If the mac address is invalid, use default mac address */ + if (!is_valid_ether_addr(dev-dev_addr)) + memcpy(dev-dev_addr, priv-soc-mac, ETH_ALEN); err = fe_mdio_init(priv); if (err) -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel