Skip to content

Commit d2065c4

Browse files
EvilOlafigorpecovnik
authored andcommitted
rockchip64-7.0: rewrite kernel patches against 7.0.7
1 parent 8f2d27c commit d2065c4

7 files changed

Lines changed: 41 additions & 38 deletions

patch/kernel/archive/rockchip64-7.0/general-add-miniDP-virtual-extcon.patch

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From f0d2b53fcfd0151999f8f7041c3f4a19ac77b191 Mon Sep 17 00:00:00 2001
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Tony <tonymckahan@gmail.com>
33
Date: Wed, 3 Mar 2021 07:59:25 +0100
4-
Subject: [PATCH] RK3399 Typec DP (#2676)
4+
Subject: RK3399 Typec DP (#2676)
55

66
> X-Git-Archeology: > recovered message: > * RK3399 NanoPC-T4 Add Type-C alt mode DP
77
> X-Git-Archeology: > recovered message: > * rk3399 rockpi 4C add mini-DP (WIP)
@@ -55,12 +55,11 @@ Subject: [PATCH] RK3399 Typec DP (#2676)
5555
---
5656
drivers/extcon/Kconfig | 10 +
5757
drivers/extcon/Makefile | 1 +
58-
drivers/extcon/extcon-usbc-virtual-pd.c | 285 ++++++++++++++++++++++++
58+
drivers/extcon/extcon-usbc-virtual-pd.c | 285 ++++++++++
5959
3 files changed, 296 insertions(+)
60-
create mode 100644 drivers/extcon/extcon-usbc-virtual-pd.c
6160

6261
diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
63-
index aec46bf03..dd755b952 100644
62+
index 111111111111..222222222222 100644
6463
--- a/drivers/extcon/Kconfig
6564
+++ b/drivers/extcon/Kconfig
6665
@@ -227,4 +227,14 @@ config EXTCON_RTK_TYPE_C
@@ -79,7 +78,7 @@ index aec46bf03..dd755b952 100644
7978
+
8079
endif
8180
diff --git a/drivers/extcon/Makefile b/drivers/extcon/Makefile
82-
index 6482f2bfd..979770183 100644
81+
index 111111111111..222222222222 100644
8382
--- a/drivers/extcon/Makefile
8483
+++ b/drivers/extcon/Makefile
8584
@@ -28,3 +28,4 @@ obj-$(CONFIG_EXTCON_USB_GPIO) += extcon-usb-gpio.o
@@ -89,7 +88,7 @@ index 6482f2bfd..979770183 100644
8988
+obj-$(CONFIG_EXTCON_USBC_VIRTUAL_PD) += extcon-usbc-virtual-pd.o
9089
diff --git a/drivers/extcon/extcon-usbc-virtual-pd.c b/drivers/extcon/extcon-usbc-virtual-pd.c
9190
new file mode 100644
92-
index 000000000..1040c98db
91+
index 000000000000..111111111111
9392
--- /dev/null
9493
+++ b/drivers/extcon/extcon-usbc-virtual-pd.c
9594
@@ -0,0 +1,285 @@
@@ -379,5 +378,5 @@ index 000000000..1040c98db
379378
+MODULE_DESCRIPTION("Type-C Virtual PD extcon driver");
380379
+MODULE_LICENSE("GPL v2");
381380
--
382-
2.54.0
381+
Armbian
383382

patch/kernel/archive/rockchip64-7.0/general-disable-mtu-validation.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/eth
1818
index 111111111111..222222222222 100644
1919
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
2020
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
21-
@@ -6033,27 +6033,15 @@ static void stmmac_set_rx_mode(struct net_device *dev)
21+
@@ -6038,27 +6038,15 @@ static void stmmac_set_rx_mode(struct net_device *dev)
2222
static int stmmac_change_mtu(struct net_device *dev, int new_mtu)
2323
{
2424
struct stmmac_priv *priv = netdev_priv(dev);

patch/kernel/archive/rockchip64-7.0/general-possibility-of-disabling-rk808-rtc.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
2525
index 111111111111..222222222222 100644
2626
--- a/drivers/mfd/mfd-core.c
2727
+++ b/drivers/mfd/mfd-core.c
28-
@@ -208,7 +208,7 @@ static int mfd_add_device(struct device *parent, int id,
28+
@@ -218,7 +218,7 @@ static int mfd_add_device(struct device *parent, int id,
2929

3030
match:
3131
if (!pdev->dev.of_node)

patch/kernel/archive/rockchip64-7.0/general-serial-8250-fix-sysrq-break-dw-apb.patch

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
22
From: Igor Velkov <325961+iav@users.noreply.github.com>
3-
Date: Sat, 03 May 2026 00:00:00 +0000
4-
Subject: serial: 8250: fix SysRq-via-BREAK regression for dw-apb-uart (8250_dw)
3+
Date: Sun, 3 May 2026 00:00:00 +0000
4+
Subject: serial: 8250: fix SysRq-via-BREAK regression for dw-apb-uart
5+
(8250_dw)
56

67
Sending a serial BREAK followed by a SysRq command character stopped
78
working on dw-apb-uart (e.g. RK3399 / helios64) in Linux 7.0.
@@ -10,12 +11,12 @@ The refactoring introduced by:
1011

1112
commit 8324a54f604d ("serial: 8250: Add serial8250_handle_irq_locked()")
1213
Link: https://patch.msgid.link/20260203171049.4353-4-ilpo.jarvinen@linux.intel.com
13-
(Ilpo Järvinen, [PATCH v2 4/7], 2026-02-03; merged for linux 7.0,
14+
(Ilpo Jarvinen, [PATCH v2 4/7], 2026-02-03; merged for linux 7.0,
1415
Cc: stable -> backported to v6.19.10)
1516

1617
commit 883c5a2bc934 ("serial: 8250_dw: Rework dw8250_handle_irq() locking and IIR handling")
1718
Link: https://patch.msgid.link/20260203171049.4353-5-ilpo.jarvinen@linux.intel.com
18-
(Ilpo Järvinen, [PATCH v2 5/7], 2026-02-03)
19+
(Ilpo Jarvinen, [PATCH v2 5/7], 2026-02-03)
1920

2021
replaced the explicit uart_unlock_and_check_sysrq_irqrestore() call in
2122
serial8250_handle_irq() with a guard(uart_port_lock_irqsave) scope.
@@ -45,60 +46,60 @@ The change to serial8250_handle_irq() is kept as a defence-in-depth fix
4546
for any other caller that goes through that path.
4647

4748
Fixes: 8324a54f604d ("serial: 8250: Add serial8250_handle_irq_locked()")
48-
Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
49+
Cc: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>
4950
---
50-
drivers/tty/serial/8250/8250_dw.c | 11 +++++++++--
51-
drivers/tty/serial/8250/8250_port.c | 5 +++--
52-
2 files changed, 12 insertions(+), 4 deletions(-)
51+
drivers/tty/serial/8250/8250_dw.c | 10 ++++++++--
52+
drivers/tty/serial/8250/8250_port.c | 5 ++++-
53+
2 files changed, 12 insertions(+), 3 deletions(-)
5354

5455
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
55-
index 94beadb4024d..bd8f14dc248c 100644
56+
index 111111111111..222222222222 100644
5657
--- a/drivers/tty/serial/8250/8250_dw.c
5758
+++ b/drivers/tty/serial/8250/8250_dw.c
5859
@@ -426,19 +426,23 @@ static int dw8250_handle_irq(struct uart_port *p)
5960
bool rx_timeout = (iir & 0x3f) == UART_IIR_RX_TIMEOUT;
6061
unsigned int quirks = d->pdata->quirks;
6162
unsigned int status;
6263
+ unsigned long flags;
63-
64+
6465
- guard(uart_port_lock_irqsave)(p);
6566
+ uart_port_lock_irqsave(p, &flags);
66-
67+
6768
switch (FIELD_GET(DW_UART_IIR_IID, iir)) {
6869
case UART_IIR_NO_INT:
6970
- if (d->uart_16550_compatible || up->dma)
7071
+ if (d->uart_16550_compatible || up->dma) {
7172
+ uart_port_unlock_irqrestore(p, flags);
7273
return 0;
7374
+ }
74-
75+
7576
if (quirks & DW_UART_QUIRK_IER_KICK &&
7677
d->no_int_count == (DW_UART_QUIRK_IER_KICK_THRES - 1))
7778
dw8250_quirk_ier_kick(p);
7879
d->no_int_count = (d->no_int_count + 1) % DW_UART_QUIRK_IER_KICK_THRES;
79-
80+
8081
+ uart_port_unlock_irqrestore(p, flags);
8182
return 0;
82-
83+
8384
case UART_IIR_BUSY:
8485
@@ -447,6 +451,7 @@ static int dw8250_handle_irq(struct uart_port *p)
85-
86+
8687
d->no_int_count = 0;
87-
88+
8889
+ uart_port_unlock_irqrestore(p, flags);
8990
return 1;
9091
}
91-
92+
9293
@@ -480,6 +485,7 @@ static int dw8250_handle_irq(struct uart_port *p)
9394
}
94-
95+
9596
serial8250_handle_irq_locked(p, iir);
9697
+ uart_unlock_and_check_sysrq_irqrestore(p, flags);
97-
98+
9899
return 1;
99100
}
100101
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
101-
index 328711b5df1a..a815e9075648 100644
102+
index 111111111111..222222222222 100644
102103
--- a/drivers/tty/serial/8250/8250_port.c
103104
+++ b/drivers/tty/serial/8250/8250_port.c
104105
@@ -1834,11 +1834,14 @@ EXPORT_SYMBOL_NS_GPL(serial8250_handle_irq_locked, "SERIAL_8250");
@@ -109,11 +110,14 @@ index 328711b5df1a..a815e9075648 100644
109110
+
110111
if (iir & UART_IIR_NO_INT)
111112
return 0;
112-
113+
113114
- guard(uart_port_lock_irqsave)(port);
114115
+ uart_port_lock_irqsave(port, &flags);
115116
serial8250_handle_irq_locked(port, iir);
116117
+ uart_unlock_and_check_sysrq_irqrestore(port, flags);
117-
118+
118119
return 1;
119120
}
121+
--
122+
Armbian
123+

patch/kernel/archive/rockchip64-7.0/rk3399-usbc-Revert-usb-typec-tcpm-unregister-existing-source-cap.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
1313
index 111111111111..222222222222 100644
1414
--- a/drivers/usb/typec/tcpm/tcpm.c
1515
+++ b/drivers/usb/typec/tcpm/tcpm.c
16-
@@ -3127,7 +3127,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
16+
@@ -3132,7 +3132,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
1717
{
1818
struct usb_power_delivery_desc desc = { port->negotiated_rev };
1919
struct usb_power_delivery_capabilities_desc caps = { };
@@ -22,7 +22,7 @@ index 111111111111..222222222222 100644
2222

2323
if (!port->partner_pd)
2424
port->partner_pd = usb_power_delivery_register(NULL, &desc);
25-
@@ -3137,11 +3137,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
25+
@@ -3142,11 +3142,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
2626
memcpy(caps.pdo, port->source_caps, sizeof(u32) * port->nr_source_caps);
2727
caps.role = TYPEC_SOURCE;
2828

patch/kernel/archive/rockchip64-7.0/rk3399-usbc-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
1818
index 111111111111..222222222222 100644
1919
--- a/drivers/usb/typec/tcpm/tcpm.c
2020
+++ b/drivers/usb/typec/tcpm/tcpm.c
21-
@@ -3128,15 +3128,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
21+
@@ -3133,15 +3133,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
2222
struct usb_power_delivery_desc desc = { port->negotiated_rev };
2323
struct usb_power_delivery_capabilities_desc caps = { };
2424
struct usb_power_delivery_capabilities *cap;
@@ -45,7 +45,7 @@ index 111111111111..222222222222 100644
4545
cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps);
4646
if (IS_ERR(cap))
4747
return PTR_ERR(cap);
48-
@@ -3151,15 +3158,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port)
48+
@@ -3156,15 +3163,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port)
4949
struct usb_power_delivery_desc desc = { port->negotiated_rev };
5050
struct usb_power_delivery_capabilities_desc caps = { };
5151
struct usb_power_delivery_capabilities *cap;
@@ -72,7 +72,7 @@ index 111111111111..222222222222 100644
7272
cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps);
7373
if (IS_ERR(cap))
7474
return PTR_ERR(cap);
75-
@@ -7222,10 +7236,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port)
75+
@@ -7229,10 +7243,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port)
7676
port->pds[i] = usb_power_delivery_register(port->dev, &desc);
7777
if (IS_ERR(port->pds[i])) {
7878
ret = PTR_ERR(port->pds[i]);

patch/kernel/archive/rockchip64-7.0/rk3399-usbc-usb-typec-tcpm-Unregister-altmodes-before-registerin.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
3737
index 111111111111..222222222222 100644
3838
--- a/drivers/usb/typec/tcpm/tcpm.c
3939
+++ b/drivers/usb/typec/tcpm/tcpm.c
40-
@@ -1876,6 +1876,9 @@ static void tcpm_register_partner_altmodes(struct tcpm_port *port)
40+
@@ -1881,6 +1881,9 @@ static void tcpm_register_partner_altmodes(struct tcpm_port *port)
4141
return;
4242

4343
for (i = 0; i < modep->altmodes; i++) {

0 commit comments

Comments
 (0)