[OpenWrt-Devel] [PATCHv3] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1
Archer C7 V2.0 units from December 2015 onwards ( serials starting 215C ) have changed flash chips to the gd25q128 chip, this is supported in trunk but not presently in 15.05. I would like stable support for this version so I've back ported the required fix from trunk and removed a conflicting patch from bcm53xx I've tested the patch it and I'm able to install a build of 15.05.1 on a new Archer C7 device with this patch. Signed-off-by: John Marrett <jo...@zioncluster.ca> --- .../patches-3.18/004-mtd-spi-nor-from-3.20.patch | 26 +- ...-mtd_GD25Q128B_support_backport_from_3.19.patch | 12 ++ 2 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch diff --git a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch index ab7b0bb..449e80f 100644 --- a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch +++ b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch @@ -1,14 +1,8 @@ a/drivers/mtd/spi-nor/spi-nor.c -+++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -538,6 +538,7 @@ static const struct spi_device_id spi_no - /* GigaDevice */ - { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, - { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, -+ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, - - /* Intel/Numonyx -- xxxs33b */ - { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, -@@ -564,14 +565,14 @@ static const struct spi_device_id spi_no +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-19 19:28:00.391762486 -0400 linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c2016-04-19 19:29:03.220034573 -0400 +@@ -564,14 +564,14 @@ { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, /* Micron */ @@ -31,7 +25,7 @@ /* PMC */ { "pm25lv512", INFO(0,0, 32 * 1024,2, SECT_4K_PMC) }, -@@ -895,6 +896,45 @@ static int spansion_quad_enable(struct s +@@ -895,6 +895,45 @@ return 0; } @@ -77,7 +71,7 @@ static int set_quad_mode(struct spi_nor *nor, struct flash_info *info) { int status; -@@ -907,6 +947,13 @@ static int set_quad_mode(struct spi_nor +@@ -907,6 +946,13 @@ return -EINVAL; } return status; @@ -91,8 +85,10 @@ default: status = spansion_quad_enable(nor); if (status) { a/include/linux/mtd/spi-nor.h -+++ b/include/linux/mtd/spi-nor.h +Index: linux-3.18.29/include/linux/mtd/spi-nor.h +=== +--- linux-3.18.29.orig/include/linux/mtd/spi-nor.h 2016-04-19 19:28:00.391762486 -0400 linux-3.18.29/include/linux/mtd/spi-nor.h 2016-04-19 19:28:00.387762470 -0400 @@ -56,6 +56,10 @@ /* Used for Spansion flashes only. */ #define SPINOR_OP_BRWR0x17/* Bank register write */ diff --git a/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch new file mode 100644 index 000..b1bb3fb --- /dev/null +++ b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch @@ -0,0 +1,12 @@ +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-19 20:30:41.535015813 -0400 linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c2016-04-19 20:32:12.767454183 -0400 +@@ -510,6 +510,7 @@ + /* GigaDevice */ + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, + + /* Intel/Numonyx -- xxxs33b */ + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv2] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1
I've updated the patch based on Hauke's feedback. I'm removing the update info from existing patch target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch and using the name target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support matching the patch from trunk. Signed-off-by: John Marrett <jo...@zioncluster.ca> diff --git a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch index ab7b0bb..acdbb1f 100644 --- a/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch +++ b/target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch @@ -1,13 +1,5 @@ --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c -@@ -538,6 +538,7 @@ static const struct spi_device_id spi_no - /* GigaDevice */ - { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, - { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, -+ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, - - /* Intel/Numonyx -- xxxs33b */ - { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, @@ -564,14 +565,14 @@ static const struct spi_device_id spi_no { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, diff --git a/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support new file mode 100644 index 000..2f0fc18 --- /dev/null +++ b/target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch @@ -0,0 +1,12 @@ +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-18 11:31:18.970916900 -0400 linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c2016-04-18 11:40:17.401622014 -0400 +@@ -510,6 +510,7 @@ + /* GigaDevice */ + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, + + /* Intel/Numonyx -- xxxs33b */ + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1
Kristian, On Sun, Apr 17, 2016 at 2:06 PM, Kristian Kielhofnerwrote: > Specifically this applies to units manufactured in December of 2015 or > later; serial numbers starting with 215C. Thank you for that detail, I see that my router does have a serial number that meets that pattern, I'll update the wiki with this information. Hauke, > I want to make certain I get the updated patch right; I should > integrate > target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > patch (which, because of its order, results in pushes down in some > other flash files) and adjust the > target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch to > avoid a conflict because of the change? I could patch it as planned, however as far as I can tell this file contains a large table of flash chip identifiers. Is there a reason I wouldn't want to create a new single patch that updates the entire "static const struct spi_device_id spi_nor_ids[]" table? This would also consoldiate the table updates out of the following patches. target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch target/linux/generic/patches-3.18/474-mtd-spi-nor-add-support-for-the-ISSI-SI25CD512-SPI-f.patch target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch target/linux/generic/patches-3.18/472-mtd-m25p80-add-support-for-Winbond-W25X05-flash.patch target/linux/generic/patches-3.18/473-mtd-spi-nor-add-support-for-the-Macronix-MX25L512E-S.patch target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch target/linux/bcm53xx/patches-3.18/003-mtd-spi-nor-from-3.19.patch I could create the new single patch for both trunk and 15.05.1 and bring these updates into a single place under target/linux/generic. Please let me know if this makes sense or if I'm better off limiting the scope as originally described? I'm aware that there are non-table updates on the other patches, I'll leave those parts alone. -JohnF ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1
Hauke, I want to make certain I get the updated patch right; I should integrate target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch patch (which, because of its order, results in pushes down in some other flash files) and adjust the target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch to avoid a conflict because of the change? Please confirm and I'll make the appropriate adjustments. Thank you for taking the time to review my submission, -JohnF On Sun, Apr 17, 2016 at 9:04 AM, Hauke Mehrtens <ha...@hauke-m.de> wrote: > On 04/17/2016 01:55 PM, John Marrett wrote: >> Recent Archer C7 V2.0 units have changed flash chips to the gd25q128 >> chip, this is supported in trunk but not presently in 15.05. I would >> like stable support for this version so I've back ported the required >> fix [1] from the upstream kernel. I've tried to place this patch in >> order with the other flash support patches. I've tested it and I'm >> able to install a build of 15.05.1 on the device with this patch. >> Wireless and other functionality appears to be working properly. >> >> This is my first submitted patch for OpenWrt, please let me know on >> list or off if there are any issues. >> >> [1] >> https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=fcc87a95195236b0935183361a72e4a98bf577d8 >> >> Signed-off-by: John Marrett <jo...@zioncluster.ca> >> >> diff --git a/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch >> b/target/linux/ar71xx/ >> new file mode 100644 >> index 000..c4a0a94 >> --- /dev/null >> +++ b/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch >> @@ -0,0 +1,12 @@ >> +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c >> +=== >> +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-15 >> 20:02:47.709062050 -0400 >> linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c2016-04-16 >> 07:41:06.071314788 -0400 >> +@@ -510,6 +510,7 @@ >> + /* GigaDevice */ >> + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, >> + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, >> ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, >> + >> + /* Intel/Numonyx -- xxxs33b */ >> + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, > > This patch is already in trunk at > target/linux/generic/patches-3.18/043-mtd_GD25Q128B_support_backport_from_3.19.patch > could you also place your change to the generic folder to keep it in > sync with trunk. > > There is already a patch in cc for the bcm53xx target which also adds > this line here: > target/linux/bcm53xx/patches-3.18/004-mtd-spi-nor-from-3.20.patch this > has to be modified when you add your patch to generic. > > Hauke > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [kernel] Support for new Archer C7 with gd25q128 chip in 15.05.1
Recent Archer C7 V2.0 units have changed flash chips to the gd25q128 chip, this is supported in trunk but not presently in 15.05. I would like stable support for this version so I've back ported the required fix [1] from the upstream kernel. I've tried to place this patch in order with the other flash support patches. I've tested it and I'm able to install a build of 15.05.1 on the device with this patch. Wireless and other functionality appears to be working properly. This is my first submitted patch for OpenWrt, please let me know on list or off if there are any issues. [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/drivers/mtd/spi-nor/spi-nor.c?id=fcc87a95195236b0935183361a72e4a98bf577d8 Signed-off-by: John Marrett <jo...@zioncluster.ca> diff --git a/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch b/target/linux/ar71xx/ new file mode 100644 index 000..c4a0a94 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/414-mtd-gd25q128-support.patch @@ -0,0 +1,12 @@ +Index: linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c +=== +--- linux-3.18.29.orig/drivers/mtd/spi-nor/spi-nor.c 2016-04-15 20:02:47.709062050 -0400 linux-3.18.29/drivers/mtd/spi-nor/spi-nor.c2016-04-16 07:41:06.071314788 -0400 +@@ -510,6 +510,7 @@ + /* GigaDevice */ + { "gd25q32", INFO(0xc84016, 0, 64 * 1024, 64, SECT_4K) }, + { "gd25q64", INFO(0xc84017, 0, 64 * 1024, 128, SECT_4K) }, ++ { "gd25q128", INFO(0xc84018, 0, 64 * 1024, 256, SECT_4K) }, + + /* Intel/Numonyx -- xxxs33b */ + { "160s33b", INFO(0x898911, 0, 64 * 1024, 32, 0) }, ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel