mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
bcm2711/edge: bump to RPi Foundation's 6.5.y branch; rebase all patches
This commit is contained in:
@@ -44,8 +44,8 @@ case "${BRANCH}" in
|
|||||||
edge)
|
edge)
|
||||||
declare -g RASPI_DISTRO_KERNEL=no
|
declare -g RASPI_DISTRO_KERNEL=no
|
||||||
declare -g KERNELSOURCE='https://github.com/raspberrypi/linux'
|
declare -g KERNELSOURCE='https://github.com/raspberrypi/linux'
|
||||||
declare -g KERNEL_MAJOR_MINOR="6.3" # Major and minor versions of this kernel. For mainline caching.
|
declare -g KERNEL_MAJOR_MINOR="6.5" # Major and minor versions of this kernel. For mainline caching.
|
||||||
declare -g KERNELBRANCH="branch:rpi-6.3.y"
|
declare -g KERNELBRANCH="branch:rpi-6.5.y"
|
||||||
declare -g KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}"
|
declare -g KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}"
|
||||||
declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
|
declare -g LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: graysky <graysky@archlinux.us>
|
||||||
|
Date: Mon, 7 Dec 2020 13:03:40 -0500
|
||||||
|
Subject: Make /proc/cpuinfo consistent on arm64 and arm
|
||||||
|
|
||||||
|
Signed-off-by: graysky <graysky@archlinux.us>
|
||||||
|
---
|
||||||
|
arch/arm64/kernel/cpuinfo.c | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
|
||||||
|
index ee36fa8be3af..049bdca2655c 100644
|
||||||
|
--- a/arch/arm64/kernel/cpuinfo.c
|
||||||
|
+++ b/arch/arm64/kernel/cpuinfo.c
|
||||||
|
@@ -193,9 +193,8 @@ static int c_show(struct seq_file *m, void *v)
|
||||||
|
* "processor". Give glibc what it expects.
|
||||||
|
*/
|
||||||
|
seq_printf(m, "processor\t: %d\n", i);
|
||||||
|
- if (compat)
|
||||||
|
- seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
|
||||||
|
- MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
|
||||||
|
+ seq_printf(m, "model name\t: ARMv8 Processor rev %d (%s)\n",
|
||||||
|
+ MIDR_REVISION(midr), COMPAT_ELF_PLATFORM);
|
||||||
|
|
||||||
|
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
|
||||||
|
loops_per_jiffy / (500000UL/HZ),
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
diff -Naur a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||||
|
--- a/arch/arm/Kconfig 2022-12-11 17:15:18.000000000 -0500
|
||||||
|
+++ b/arch/arm/Kconfig 2022-12-13 10:24:24.085749880 -0500
|
||||||
|
@@ -2,6 +2,7 @@
|
||||||
|
config ARM
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
+ select ARCH_BCM
|
||||||
|
select ARCH_32BIT_OFF_T
|
||||||
|
select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE if HAVE_KRETPROBES && FRAME_POINTER && !ARM_UNWIND
|
||||||
|
select ARCH_HAS_BINFMT_FLAT
|
||||||
|
diff -Naur a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||||
|
--- a/arch/arm64/Kconfig 2022-12-11 17:15:18.000000000 -0500
|
||||||
|
+++ b/arch/arm64/Kconfig 2022-12-13 10:28:40.045233987 -0500
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
config ARM64
|
||||||
|
def_bool y
|
||||||
|
+ select ARCH_BCM
|
||||||
|
select ACPI_APMT if ACPI
|
||||||
|
select ACPI_CCA_REQUIRED if ACPI
|
||||||
|
select ACPI_GENERIC_GSI if ACPI
|
||||||
193
patch/kernel/archive/bcm2711-6.5/1003-remote-wakeup.patch
Normal file
193
patch/kernel/archive/bcm2711-6.5/1003-remote-wakeup.patch
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||||
|
Date: Mon, 29 Aug 2022 08:43:24 +0200
|
||||||
|
Subject: [ARCHEOLOGY] Add patches needed for Pi-KVM on Rpi4 (#4127)
|
||||||
|
|
||||||
|
> X-Git-Archeology: > recovered message: > * Add patches needed for Pi-KVM on Rpi4
|
||||||
|
> X-Git-Archeology: > recovered message: > * Remove patch that does not belong here
|
||||||
|
> X-Git-Archeology: > recovered message: > * Update config
|
||||||
|
> X-Git-Archeology: > recovered message: > * Update edge config
|
||||||
|
> X-Git-Archeology: - Revision 2fb3aaaf86a7463ef1d26f4d623e1d3289ea4f25: https://github.com/armbian/build/commit/2fb3aaaf86a7463ef1d26f4d623e1d3289ea4f25
|
||||||
|
> X-Git-Archeology: Date: Mon, 29 Aug 2022 08:43:24 +0200
|
||||||
|
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||||
|
> X-Git-Archeology: Subject: Add patches needed for Pi-KVM on Rpi4 (#4127)
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision acf5810cbe38c7578907ecd06e61abb0a446df1e: https://github.com/armbian/build/commit/acf5810cbe38c7578907ecd06e61abb0a446df1e
|
||||||
|
> X-Git-Archeology: Date: Sat, 11 Mar 2023 19:19:13 +0100
|
||||||
|
> X-Git-Archeology: From: Igor Pecovnik <igor@armbian.com>
|
||||||
|
> X-Git-Archeology: Subject: Move Rpi kernels to 6.2, move current to legacy (#4898)
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision 5f2a1af2193187f0b994d6f163b94f370a01134f: https://github.com/armbian/build/commit/5f2a1af2193187f0b994d6f163b94f370a01134f
|
||||||
|
> X-Git-Archeology: Date: Fri, 28 Apr 2023 21:32:52 +0200
|
||||||
|
> X-Git-Archeology: From: Ricardo Pardini <ricardo@pardini.net>
|
||||||
|
> X-Git-Archeology: Subject: `bcm2711`/`edge`: bump to `6.3` (`rpi4b`, RPi Foundation Kernel)
|
||||||
|
> X-Git-Archeology:
|
||||||
|
---
|
||||||
|
drivers/usb/dwc2/gadget.c | 73 ++++++++++
|
||||||
|
drivers/usb/gadget/function/f_hid.c | 14 ++
|
||||||
|
drivers/usb/gadget/function/u_hid.h | 1 +
|
||||||
|
3 files changed, 88 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
|
||||||
|
index 8b15742d9e8a..a7d997a205d5 100644
|
||||||
|
--- a/drivers/usb/dwc2/gadget.c
|
||||||
|
+++ b/drivers/usb/dwc2/gadget.c
|
||||||
|
@@ -4763,6 +4763,78 @@ static void dwc2_gadget_set_speed(struct usb_gadget *g, enum usb_device_speed sp
|
||||||
|
spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * dwc2_hsotg_wakeup - send wakeup signal to the host
|
||||||
|
+ * @gadget: The usb gadget state
|
||||||
|
+ *
|
||||||
|
+ * If the gadget is in device mode and in the L1 or L2 state,
|
||||||
|
+ * it sends a wakeup signal to the host.
|
||||||
|
+ */
|
||||||
|
+static int dwc2_hsotg_wakeup(struct usb_gadget *gadget)
|
||||||
|
+{
|
||||||
|
+ struct dwc2_hsotg *hsotg = to_hsotg(gadget);
|
||||||
|
+ int ret = -1;
|
||||||
|
+ unsigned long flags;
|
||||||
|
+
|
||||||
|
+ spin_lock_irqsave(&hsotg->lock, flags);
|
||||||
|
+
|
||||||
|
+ if (!hsotg->remote_wakeup_allowed) {
|
||||||
|
+ dev_dbg(hsotg->dev,
|
||||||
|
+ "wakeup: signalling skipped: is not allowed by host\n");
|
||||||
|
+ goto skip;
|
||||||
|
+ }
|
||||||
|
+ if (hsotg->lx_state != DWC2_L1 && hsotg->lx_state != DWC2_L2) {
|
||||||
|
+ dev_dbg(hsotg->dev,
|
||||||
|
+ "wakeup: signalling skipped: gadget not in L1/L2 state: %d\n", hsotg->lx_state);
|
||||||
|
+ goto skip;
|
||||||
|
+ }
|
||||||
|
+ if (!dwc2_is_device_mode(hsotg)) {
|
||||||
|
+ dev_dbg(hsotg->dev,
|
||||||
|
+ "wakeup: signalling skipped: gadget not in device mode\n");
|
||||||
|
+ goto skip;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /*if (hsotg->in_ppd) {
|
||||||
|
+ if (dwc2_exit_partial_power_down(hsotg, 1, true))
|
||||||
|
+ dev_err(hsotg->dev, "wakeup: exit partial_power_down failed\n");
|
||||||
|
+ call_gadget(hsotg, resume);
|
||||||
|
+ }*/
|
||||||
|
+ if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_NONE && hsotg->bus_suspended) {
|
||||||
|
+ u32 pcgctl;
|
||||||
|
+
|
||||||
|
+ dev_dbg(hsotg->dev, "wakeup: exiting device clock gating\n");
|
||||||
|
+
|
||||||
|
+ /* Clear the Gate hclk. */
|
||||||
|
+ pcgctl = dwc2_readl(hsotg, PCGCTL);
|
||||||
|
+ pcgctl &= ~PCGCTL_GATEHCLK;
|
||||||
|
+ dwc2_writel(hsotg, pcgctl, PCGCTL);
|
||||||
|
+ udelay(5);
|
||||||
|
+
|
||||||
|
+ /* Phy Clock bit. */
|
||||||
|
+ pcgctl = dwc2_readl(hsotg, PCGCTL);
|
||||||
|
+ pcgctl &= ~PCGCTL_STOPPCLK;
|
||||||
|
+ dwc2_writel(hsotg, pcgctl, PCGCTL);
|
||||||
|
+ udelay(5);
|
||||||
|
+
|
||||||
|
+ hsotg->bus_suspended = false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ dev_dbg(hsotg->dev, "wakeup: sending signal to the host");
|
||||||
|
+
|
||||||
|
+ dwc2_set_bit(hsotg, DCTL, DCTL_RMTWKUPSIG);
|
||||||
|
+ mdelay(10);
|
||||||
|
+ dwc2_clear_bit(hsotg, DCTL, DCTL_RMTWKUPSIG);
|
||||||
|
+
|
||||||
|
+ /* After the signalling, the USB core wakes up to L0 */
|
||||||
|
+ call_gadget(hsotg, resume);
|
||||||
|
+ hsotg->lx_state = DWC2_L0;
|
||||||
|
+
|
||||||
|
+ ret = 0;
|
||||||
|
+skip:
|
||||||
|
+ spin_unlock_irqrestore(&hsotg->lock, flags);
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static const struct usb_gadget_ops dwc2_hsotg_gadget_ops = {
|
||||||
|
.get_frame = dwc2_hsotg_gadget_getframe,
|
||||||
|
.set_selfpowered = dwc2_hsotg_set_selfpowered,
|
||||||
|
@@ -4772,6 +4844,7 @@ static const struct usb_gadget_ops dwc2_hsotg_gadget_ops = {
|
||||||
|
.udc_set_speed = dwc2_gadget_set_speed,
|
||||||
|
.vbus_session = dwc2_hsotg_vbus_session,
|
||||||
|
.vbus_draw = dwc2_hsotg_vbus_draw,
|
||||||
|
+ .wakeup = dwc2_hsotg_wakeup,
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
|
||||||
|
index ea85e2c701a1..846942e4275a 100644
|
||||||
|
--- a/drivers/usb/gadget/function/f_hid.c
|
||||||
|
+++ b/drivers/usb/gadget/function/f_hid.c
|
||||||
|
@@ -58,6 +58,8 @@ struct f_hidg {
|
||||||
|
* will be used to receive reports.
|
||||||
|
*/
|
||||||
|
bool use_out_ep;
|
||||||
|
+ /* attempt to wake up the host before write */
|
||||||
|
+ bool wakeup_on_write;
|
||||||
|
|
||||||
|
/* recv report */
|
||||||
|
spinlock_t read_spinlock;
|
||||||
|
@@ -434,10 +436,19 @@ static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
|
||||||
|
size_t count, loff_t *offp)
|
||||||
|
{
|
||||||
|
struct f_hidg *hidg = file->private_data;
|
||||||
|
+ struct usb_composite_dev *cdev = hidg->func.config->cdev;
|
||||||
|
struct usb_request *req;
|
||||||
|
unsigned long flags;
|
||||||
|
ssize_t status = -ENOMEM;
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * remote wakeup is allowed only when the corresponding bit
|
||||||
|
+ * in config descriptor is set and wakeup_on_write is enabled.
|
||||||
|
+ * FIXME: cdev->config can be NULLed on disconnect.
|
||||||
|
+ */
|
||||||
|
+ if (hidg->wakeup_on_write /*&& cdev->config->bmAttributes & 0x20*/)
|
||||||
|
+ usb_gadget_wakeup(cdev->gadget);
|
||||||
|
+
|
||||||
|
spin_lock_irqsave(&hidg->write_spinlock, flags);
|
||||||
|
|
||||||
|
if (!hidg->req) {
|
||||||
|
@@ -1101,6 +1112,7 @@ CONFIGFS_ATTR(f_hid_opts_, name)
|
||||||
|
F_HID_OPT(subclass, 8, 255);
|
||||||
|
F_HID_OPT(protocol, 8, 255);
|
||||||
|
F_HID_OPT(no_out_endpoint, 8, 1);
|
||||||
|
+F_HID_OPT(wakeup_on_write, 8, 1);
|
||||||
|
F_HID_OPT(report_length, 16, 65535);
|
||||||
|
|
||||||
|
static ssize_t f_hid_opts_report_desc_show(struct config_item *item, char *page)
|
||||||
|
@@ -1161,6 +1173,7 @@ static struct configfs_attribute *hid_attrs[] = {
|
||||||
|
&f_hid_opts_attr_subclass,
|
||||||
|
&f_hid_opts_attr_protocol,
|
||||||
|
&f_hid_opts_attr_no_out_endpoint,
|
||||||
|
+ &f_hid_opts_attr_wakeup_on_write,
|
||||||
|
&f_hid_opts_attr_report_length,
|
||||||
|
&f_hid_opts_attr_report_desc,
|
||||||
|
&f_hid_opts_attr_dev,
|
||||||
|
@@ -1296,6 +1309,7 @@ static struct usb_function *hidg_alloc(struct usb_function_instance *fi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hidg->use_out_ep = !opts->no_out_endpoint;
|
||||||
|
+ hidg->wakeup_on_write = opts->wakeup_on_write;
|
||||||
|
|
||||||
|
++opts->refcnt;
|
||||||
|
mutex_unlock(&opts->lock);
|
||||||
|
diff --git a/drivers/usb/gadget/function/u_hid.h b/drivers/usb/gadget/function/u_hid.h
|
||||||
|
index 84bb70292855..f7fcaf1eaf1d 100644
|
||||||
|
--- a/drivers/usb/gadget/function/u_hid.h
|
||||||
|
+++ b/drivers/usb/gadget/function/u_hid.h
|
||||||
|
@@ -21,6 +21,7 @@ struct f_hid_opts {
|
||||||
|
unsigned char subclass;
|
||||||
|
unsigned char protocol;
|
||||||
|
unsigned char no_out_endpoint;
|
||||||
|
+ unsigned char wakeup_on_write;
|
||||||
|
unsigned short report_length;
|
||||||
|
unsigned short report_desc_length;
|
||||||
|
unsigned char *report_desc;
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
50
patch/kernel/archive/bcm2711-6.5/2001-rename-msd.patch
Normal file
50
patch/kernel/archive/bcm2711-6.5/2001-rename-msd.patch
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||||
|
Date: Mon, 29 Aug 2022 08:43:24 +0200
|
||||||
|
Subject: [ARCHEOLOGY] Add patches needed for Pi-KVM on Rpi4 (#4127)
|
||||||
|
|
||||||
|
> X-Git-Archeology: > recovered message: > * Add patches needed for Pi-KVM on Rpi4
|
||||||
|
> X-Git-Archeology: > recovered message: > * Remove patch that does not belong here
|
||||||
|
> X-Git-Archeology: > recovered message: > * Update config
|
||||||
|
> X-Git-Archeology: > recovered message: > * Update edge config
|
||||||
|
> X-Git-Archeology: - Revision 2fb3aaaf86a7463ef1d26f4d623e1d3289ea4f25: https://github.com/armbian/build/commit/2fb3aaaf86a7463ef1d26f4d623e1d3289ea4f25
|
||||||
|
> X-Git-Archeology: Date: Mon, 29 Aug 2022 08:43:24 +0200
|
||||||
|
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
|
||||||
|
> X-Git-Archeology: Subject: Add patches needed for Pi-KVM on Rpi4 (#4127)
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision acf5810cbe38c7578907ecd06e61abb0a446df1e: https://github.com/armbian/build/commit/acf5810cbe38c7578907ecd06e61abb0a446df1e
|
||||||
|
> X-Git-Archeology: Date: Sat, 11 Mar 2023 19:19:13 +0100
|
||||||
|
> X-Git-Archeology: From: Igor Pecovnik <igor@armbian.com>
|
||||||
|
> X-Git-Archeology: Subject: Move Rpi kernels to 6.2, move current to legacy (#4898)
|
||||||
|
> X-Git-Archeology:
|
||||||
|
> X-Git-Archeology: - Revision 5f2a1af2193187f0b994d6f163b94f370a01134f: https://github.com/armbian/build/commit/5f2a1af2193187f0b994d6f163b94f370a01134f
|
||||||
|
> X-Git-Archeology: Date: Fri, 28 Apr 2023 21:32:52 +0200
|
||||||
|
> X-Git-Archeology: From: Ricardo Pardini <ricardo@pardini.net>
|
||||||
|
> X-Git-Archeology: Subject: `bcm2711`/`edge`: bump to `6.3` (`rpi4b`, RPi Foundation Kernel)
|
||||||
|
> X-Git-Archeology:
|
||||||
|
---
|
||||||
|
drivers/usb/gadget/function/f_mass_storage.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
|
||||||
|
index da07e45ae6df..723d70766a49 100644
|
||||||
|
--- a/drivers/usb/gadget/function/f_mass_storage.c
|
||||||
|
+++ b/drivers/usb/gadget/function/f_mass_storage.c
|
||||||
|
@@ -2967,11 +2967,11 @@ void fsg_common_set_inquiry_string(struct fsg_common *common, const char *vn,
|
||||||
|
/* Prepare inquiryString */
|
||||||
|
i = get_default_bcdDevice();
|
||||||
|
snprintf(common->inquiry_string, sizeof(common->inquiry_string),
|
||||||
|
- "%-8s%-16s%04x", vn ?: "Linux",
|
||||||
|
+ "%-8s%-16s%04x", vn ?: "PiKVM",
|
||||||
|
/* Assume product name dependent on the first LUN */
|
||||||
|
pn ?: ((*common->luns)->cdrom
|
||||||
|
- ? "File-CD Gadget"
|
||||||
|
- : "File-Stor Gadget"),
|
||||||
|
+ ? "CD-ROM Drive"
|
||||||
|
+ : "Flash Drive"),
|
||||||
|
i);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(fsg_common_set_inquiry_string);
|
||||||
|
--
|
||||||
|
Armbian
|
||||||
|
|
||||||
@@ -1 +1 @@
|
|||||||
archive/bcm2711-6.3
|
archive/bcm2711-6.5
|
||||||
Reference in New Issue
Block a user