kernel: bump all to latest HEAD

This commit is contained in:
coolsnowwolf 2025-06-14 23:20:18 +08:00
parent 4b4353bfbc
commit 4537439d30
26 changed files with 125 additions and 352 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.12 = .32
LINUX_KERNEL_HASH-6.12.32 = a9b020721778384507010177d3929e7d4058f7f6120f05a99d56b5c5c0346a70
LINUX_VERSION-6.12 = .34
LINUX_KERNEL_HASH-6.12.34 = a7f3fe381f67eca4172e9b63efb61a14bd7f9e1278e03603d0ff5a93f270c24d

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .93
LINUX_KERNEL_HASH-6.6.93 = 0d79ff359635e9f009f1e330deed5f3aefd8c452b80660bffdc504b877797719
LINUX_VERSION-6.6 = .94
LINUX_KERNEL_HASH-6.6.94 = 713981ea26b20b476ba4ce880b76b21294576788d5db1c2188b167bcb06ecc56

View File

@ -25,7 +25,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
@@ -1114,7 +1114,9 @@ static int usbhid_start(struct hid_devic
@@ -1117,7 +1117,9 @@ static int usbhid_start(struct hid_devic
*/
switch (hid->collection->usage) {
case HID_GD_MOUSE:
@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
interval = hid_mousepoll_interval;
break;
case HID_GD_JOYSTICK:
@@ -1126,6 +1128,7 @@ static int usbhid_start(struct hid_devic
@@ -1129,6 +1131,7 @@ static int usbhid_start(struct hid_devic
interval = hid_kbpoll_interval;
break;
}

View File

@ -315,7 +315,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
if (ddc) {
panel->ddc = of_find_i2c_adapter_by_node(ddc);
@@ -2262,6 +2243,32 @@ static const struct panel_desc friendlya
@@ -2263,6 +2244,32 @@ static const struct panel_desc friendlya
},
};
@ -348,7 +348,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
.clock = 9000,
.hdisplay = 480,
@@ -2442,6 +2449,38 @@ static const struct panel_desc innolux_a
@@ -2443,6 +2450,38 @@ static const struct panel_desc innolux_a
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
};
@ -387,7 +387,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct drm_display_mode innolux_at070tn92_mode = {
.clock = 33333,
.hdisplay = 800,
@@ -3855,6 +3894,31 @@ static const struct panel_desc rocktech_
@@ -3856,6 +3895,31 @@ static const struct panel_desc rocktech_
.connector_type = DRM_MODE_CONNECTOR_DPI,
};
@ -419,7 +419,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct display_timing rocktech_rk070er9427_timing = {
.pixelclock = { 26400000, 33300000, 46800000 },
.hactive = { 800, 800, 800 },
@@ -4799,6 +4863,9 @@ static const struct of_device_id platfor
@@ -4800,6 +4864,9 @@ static const struct of_device_id platfor
.compatible = "friendlyarm,hd702e",
.data = &friendlyarm_hd702e,
}, {
@ -429,7 +429,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
.compatible = "giantplus,gpg482739qs5",
.data = &giantplus_gpg482739qs5
}, {
@@ -4820,6 +4887,9 @@ static const struct of_device_id platfor
@@ -4821,6 +4888,9 @@ static const struct of_device_id platfor
.compatible = "innolux,at043tn24",
.data = &innolux_at043tn24,
}, {
@ -439,7 +439,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
.compatible = "innolux,at070tn92",
.data = &innolux_at070tn92,
}, {
@@ -4979,6 +5049,9 @@ static const struct of_device_id platfor
@@ -4980,6 +5050,9 @@ static const struct of_device_id platfor
.compatible = "rocktech,rk043fn48h",
.data = &rocktech_rk043fn48h,
}, {
@ -449,7 +449,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
.compatible = "rocktech,rk070er9427",
.data = &rocktech_rk070er9427,
}, {
@@ -5335,6 +5408,9 @@ static const struct panel_desc_dsi osd10
@@ -5336,6 +5409,9 @@ static const struct panel_desc_dsi osd10
.lanes = 4,
};
@ -459,7 +459,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
static const struct of_device_id dsi_of_match[] = {
{
.compatible = "auo,b080uan01",
@@ -5358,20 +5434,137 @@ static const struct of_device_id dsi_of_
@@ -5359,20 +5435,137 @@ static const struct of_device_id dsi_of_
.compatible = "osddisplays,osd101t2045-53ts",
.data = &osd101t2045_53ts
}, {

View File

@ -48,7 +48,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
unsigned int pageblock_order __read_mostly;
#endif
@@ -2269,12 +2290,13 @@ __rmqueue(struct zone *zone, unsigned in
@@ -2265,12 +2286,13 @@ __rmqueue(struct zone *zone, unsigned in
if (IS_ENABLED(CONFIG_CMA)) {
/*
* Balance movable allocations between regular and CMA areas by

View File

@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4866,6 +4866,7 @@ static const struct {
@@ -4877,6 +4877,7 @@ static const struct {
*/
static int hci_dev_setup_sync(struct hci_dev *hdev)
{
@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
int ret = 0;
bool invalid_bdaddr;
size_t i;
@@ -4894,7 +4895,8 @@ static int hci_dev_setup_sync(struct hci
@@ -4905,7 +4906,8 @@ static int hci_dev_setup_sync(struct hci
test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks);
if (!ret) {
if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) &&

View File

@ -12,7 +12,7 @@ sdhci: remove PYA0_INTR_BUG quirk. Add quirks to disable some of the higher SDR
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -1212,7 +1212,11 @@ static const struct dwcmshc_pltfm_data s
@@ -1236,7 +1236,11 @@ static const struct dwcmshc_pltfm_data s
.quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
.quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |

View File

@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -220,6 +220,7 @@ struct rk35xx_priv {
@@ -221,6 +221,7 @@ struct rk35xx_priv {
struct dwcmshc_priv {
struct clk *bus_clk;
@ -30,7 +30,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
int vendor_specific_area1; /* P_VENDOR_SPECIFIC_AREA1 reg */
int vendor_specific_area2; /* P_VENDOR_SPECIFIC_AREA2 reg */
@@ -288,6 +289,17 @@ static void dwcmshc_adma_write_desc(stru
@@ -289,6 +290,17 @@ static void dwcmshc_adma_write_desc(stru
sdhci_adma_write_desc(host, desc, addr, len, cmd);
}
@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static unsigned int dwcmshc_get_max_clock(struct sdhci_host *host)
{
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1114,10 +1126,11 @@ static int sg2042_init(struct device *de
@@ -1138,10 +1150,11 @@ static int sg2042_init(struct device *de
}
static const struct sdhci_ops sdhci_dwcmshc_ops = {
@ -61,7 +61,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
.reset = sdhci_reset,
.adma_write_desc = dwcmshc_adma_write_desc,
.irq = dwcmshc_cqe_irq_handler,
@@ -1190,8 +1203,10 @@ static const struct sdhci_ops sdhci_dwcm
@@ -1214,8 +1227,10 @@ static const struct sdhci_ops sdhci_dwcm
static const struct dwcmshc_pltfm_data sdhci_dwcmshc_pdata = {
.pdata = {
.ops = &sdhci_dwcmshc_ops,
@ -74,7 +74,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
},
};
@@ -1206,6 +1221,15 @@ static const struct dwcmshc_pltfm_data s
@@ -1230,6 +1245,15 @@ static const struct dwcmshc_pltfm_data s
};
#endif
@ -90,7 +90,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk35xx_pdata = {
.pdata = {
.ops = &sdhci_dwcmshc_rk35xx_ops,
@@ -1317,6 +1341,10 @@ dsbl_cqe_caps:
@@ -1353,6 +1377,10 @@ dsbl_cqe_caps:
static const struct of_device_id sdhci_dwcmshc_dt_ids[] = {
{
@ -101,7 +101,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
.compatible = "rockchip,rk3588-dwcmshc",
.data = &sdhci_dwcmshc_rk35xx_pdata,
},
@@ -1405,13 +1433,32 @@ static int dwcmshc_probe(struct platform
@@ -1445,13 +1473,32 @@ static int dwcmshc_probe(struct platform
priv->bus_clk = devm_clk_get(dev, "bus");
if (!IS_ERR(priv->bus_clk))
clk_prepare_enable(priv->bus_clk);
@ -134,7 +134,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
priv->vendor_specific_area1 =
sdhci_readl(host, DWCMSHC_P_VENDOR_AREA1) & DWCMSHC_AREA1_MASK;
@@ -1471,6 +1518,7 @@ err_rpm:
@@ -1511,6 +1558,7 @@ err_rpm:
pm_runtime_put_noidle(dev);
err_clk:
clk_disable_unprepare(pltfm_host->clk);

View File

@ -55,7 +55,7 @@ Signed-off-by: Ratchanan Srirattanamet <peathot@hotmail.com>
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -519,4 +519,11 @@ config SPRD_IOMMU
@@ -518,4 +518,11 @@ config SPRD_IOMMU
Say Y here if you want to use the multimedia devices listed above.

View File

@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4866,7 +4866,8 @@ static const struct {
@@ -4877,7 +4877,8 @@ static const struct {
*/
static int hci_dev_setup_sync(struct hci_dev *hdev)
{

View File

@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/firmware/Kconfig
+++ b/drivers/firmware/Kconfig
@@ -120,6 +120,15 @@ config RASPBERRYPI_FIRMWARE
@@ -119,6 +119,15 @@ config RASPBERRYPI_FIRMWARE
This option enables support for communicating with the firmware on the
Raspberry Pi.

View File

@ -32,24 +32,24 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
KUNIT_ASSERT_EQ(test, hweight32(encoder->possible_crtcs), 1);
--- a/drivers/gpu/drm/vc4/tests/vc4_mock_output.c
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock_output.c
@@ -77,7 +77,7 @@ int vc4_mock_atomic_add_output(struct ku
encoder = vc4_find_encoder_by_type(drm, type);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, encoder);
@@ -78,7 +78,7 @@ int vc4_mock_atomic_add_output(struct ku
if (!encoder)
return -ENODEV;
- crtc = vc4_find_crtc_for_encoder(test, drm, encoder);
+ crtc = vc4_find_crtc_for_encoder(test, encoder);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc);
if (!crtc)
return -ENODEV;
output = encoder_to_vc4_dummy_output(encoder);
@@ -115,7 +115,7 @@ int vc4_mock_atomic_del_output(struct ku
encoder = vc4_find_encoder_by_type(drm, type);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, encoder);
@@ -122,7 +122,7 @@ int vc4_mock_atomic_del_output(struct ku
if (!encoder)
return -ENODEV;
- crtc = vc4_find_crtc_for_encoder(test, drm, encoder);
+ crtc = vc4_find_crtc_for_encoder(test, encoder);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc);
if (!crtc)
return -ENODEV;
crtc_state = drm_atomic_get_crtc_state(state, crtc);
--- a/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c
+++ b/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c
@@ -131,7 +131,7 @@ get_vc4_crtc_state_for_encoder(struct ku

View File

@ -49,7 +49,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
{
struct drm_device *drm = state->dev;
struct drm_connector_state *conn_state;
@@ -96,7 +97,7 @@ int vc4_mock_atomic_add_output(struct ku
@@ -102,7 +103,7 @@ int vc4_mock_atomic_add_output(struct ku
crtc_state->active = true;

View File

@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.com>
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -1221,13 +1221,15 @@ static const struct dwcmshc_pltfm_data s
@@ -1245,13 +1245,15 @@ static const struct dwcmshc_pltfm_data s
};
#endif

View File

@ -14,6 +14,7 @@ CONFIG_32BIT=y
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
# CONFIG_ACORN_PARTITION is not set
# CONFIG_ACPI_AGDI is not set
# CONFIG_ACPI_ALS is not set
# CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_APEI_PCIEAER is not set

View File

@ -14,6 +14,7 @@ CONFIG_32BIT=y
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
# CONFIG_ACORN_PARTITION is not set
# CONFIG_ACPI_AGDI is not set
# CONFIG_ACPI_ALS is not set
# CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_APEI_PCIEAER is not set

View File

@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -1064,7 +1064,7 @@ static void page_pool_release_retry(stru
@@ -1120,7 +1120,7 @@ static void page_pool_release_retry(stru
struct delayed_work *dwq = to_delayed_work(wq);
struct page_pool *pool = container_of(dwq, typeof(*pool), release_dw);
void *netdev;
@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
inflight = page_pool_release(pool);
/* In rare cases, a driver bug may cause inflight to go negative.
@@ -1076,6 +1076,17 @@ static void page_pool_release_retry(stru
@@ -1132,6 +1132,17 @@ static void page_pool_release_retry(stru
if (inflight <= 0)
return;

View File

@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+MODULE_LICENSE("GPL");
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4422,6 +4422,7 @@ int wake_up_state(struct task_struct *p,
@@ -4428,6 +4428,7 @@ int wake_up_state(struct task_struct *p,
{
return try_to_wake_up(p, state, 0);
}

View File

@ -11,9 +11,9 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2013,6 +2013,9 @@ void phy_detach(struct phy_device *phyde
if (phydev->devlink)
device_link_del(phydev->devlink);
@@ -2015,6 +2015,9 @@ void phy_detach(struct phy_device *phyde
phydev->devlink = NULL;
}
+ if (phydev->drv && phydev->drv->detach)
+ phydev->drv->detach(phydev);
@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
sysfs_remove_link(&dev->dev.kobj, "phydev");
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -999,6 +999,12 @@ struct phy_driver {
@@ -996,6 +996,12 @@ struct phy_driver {
/** @handle_interrupt: Override default interrupt handling */
irqreturn_t (*handle_interrupt)(struct phy_device *phydev);

View File

@ -0,0 +1,72 @@
From 988e05f0c036c9c64f211b8b91a4a33c34db216a Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 21 Jun 2025 19:08:30 +0200
Subject: [PATCH] Revert "ipv6: save dontfrag in cork"
This reverts commit 8ebf2709fe4dcd0a1b7b95bf61e529ddcd3cdf51.
This change breaks IPv6 UDP packet fragmentation.
See discussion: https://lore.kernel.org/stable/aFGl-mb--GOMY8ZQ@karahi.gladserv.com/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/linux/ipv6.h | 1 -
net/ipv6/ip6_output.c | 9 ++++-----
2 files changed, 4 insertions(+), 6 deletions(-)
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -199,7 +199,6 @@ struct inet6_cork {
struct ipv6_txoptions *opt;
u8 hop_limit;
u8 tclass;
- u8 dontfrag:1;
};
/* struct ipv6_pinfo - ipv6 private area */
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1452,7 +1452,6 @@ static int ip6_setup_cork(struct sock *s
}
v6_cork->hop_limit = ipc6->hlimit;
v6_cork->tclass = ipc6->tclass;
- v6_cork->dontfrag = ipc6->dontfrag;
if (rt->dst.flags & DST_XFRM_TUNNEL)
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
@@ -1486,7 +1485,7 @@ static int __ip6_append_data(struct sock
int getfrag(void *from, char *to, int offset,
int len, int odd, struct sk_buff *skb),
void *from, size_t length, int transhdrlen,
- unsigned int flags)
+ unsigned int flags, struct ipcm6_cookie *ipc6)
{
struct sk_buff *skb, *skb_prev = NULL;
struct inet_cork *cork = &cork_full->base;
@@ -1542,7 +1541,7 @@ static int __ip6_append_data(struct sock
if (headersize + transhdrlen > mtu)
goto emsgsize;
- if (cork->length + length > mtu - headersize && v6_cork->dontfrag &&
+ if (cork->length + length > mtu - headersize && ipc6->dontfrag &&
(sk->sk_protocol == IPPROTO_UDP ||
sk->sk_protocol == IPPROTO_ICMPV6 ||
sk->sk_protocol == IPPROTO_RAW)) {
@@ -1914,7 +1913,7 @@ int ip6_append_data(struct sock *sk,
return __ip6_append_data(sk, &sk->sk_write_queue, &inet->cork,
&np->cork, sk_page_frag(sk), getfrag,
- from, length, transhdrlen, flags);
+ from, length, transhdrlen, flags, ipc6);
}
EXPORT_SYMBOL_GPL(ip6_append_data);
@@ -2119,7 +2118,7 @@ struct sk_buff *ip6_make_skb(struct sock
err = __ip6_append_data(sk, &queue, cork, &v6_cork,
&current->task_frag, getfrag, from,
length + exthdrlen, transhdrlen + exthdrlen,
- flags);
+ flags, ipc6);
if (err) {
__ip6_flush_pending_frames(sk, &queue, cork, &v6_cork);
return ERR_PTR(err);

View File

@ -835,7 +835,7 @@ publishing the in-band capabilities from the BCM84881 PHY driver.
*
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -819,6 +819,24 @@ struct phy_tdr_config {
@@ -816,6 +816,24 @@ struct phy_tdr_config {
#define PHY_PAIR_ALL -1
/**
@ -860,7 +860,7 @@ publishing the in-band capabilities from the BCM84881 PHY driver.
* struct phy_plca_cfg - Configuration of the PLCA (Physical Layer Collision
* Avoidance) Reconciliation Sublayer.
*
@@ -958,6 +976,19 @@ struct phy_driver {
@@ -955,6 +973,19 @@ struct phy_driver {
int (*get_features)(struct phy_device *phydev);
/**
@ -880,7 +880,7 @@ publishing the in-band capabilities from the BCM84881 PHY driver.
* @get_rate_matching: Get the supported type of rate matching for a
* particular phy interface. This is used by phy consumers to determine
* whether to advertise lower-speed modes for that interface. It is
@@ -1842,6 +1873,9 @@ int phy_config_aneg(struct phy_device *p
@@ -1839,6 +1870,9 @@ int phy_config_aneg(struct phy_device *p
int _phy_start_aneg(struct phy_device *phydev);
int phy_start_aneg(struct phy_device *phydev);
int phy_aneg_done(struct phy_device *phydev);

View File

@ -1,44 +0,0 @@
From 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <j4g8y7@gmail.com>
Date: Wed, 14 May 2025 21:18:32 +0200
Subject: [PATCH 1/7] pinctrl: armada-37xx: use correct OUTPUT_VAL register for
GPIOs > 31
The controller has two consecutive OUTPUT_VAL registers and both
holds output value for 32 GPIOs. Due to a missing adjustment, the
current code always uses the first register while setting the
output value whereas it should use the second one for GPIOs > 31.
Add the missing armada_37xx_update_reg() call to adjust the register
according to the 'offset' parameter of the function to fix the issue.
Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-1-07e9ac1ab737@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -417,6 +417,7 @@ static int armada_37xx_gpio_direction_ou
unsigned int offset, int value)
{
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
+ unsigned int val_offset = offset;
unsigned int reg = OUTPUT_EN;
unsigned int mask, val, ret;
@@ -429,6 +430,8 @@ static int armada_37xx_gpio_direction_ou
return ret;
reg = OUTPUT_VAL;
+ armada_37xx_update_reg(&reg, &val_offset);
+
val = value ? mask : 0;
regmap_update_bits(info->regmap, reg, mask, val);

View File

@ -1,58 +0,0 @@
From e6ebd4942981f8ad37189bbb36a3c8495e21ef4c Mon Sep 17 00:00:00 2001
From: Gabor Juhos <j4g8y7@gmail.com>
Date: Wed, 14 May 2025 21:18:33 +0200
Subject: [PATCH 2/7] pinctrl: armada-37xx: set GPIO output value before
setting direction
Changing the direction before updating the output value in the
OUTPUT_VAL register may result in a glitch on the output line
if the previous value in the OUTPUT_VAL register is different
from the one we want to set.
In order to avoid that, update the output value before changing
the direction.
Cc: stable@vger.kernel.org
Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior")
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-2-07e9ac1ab737@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -417,23 +417,22 @@ static int armada_37xx_gpio_direction_ou
unsigned int offset, int value)
{
struct armada_37xx_pinctrl *info = gpiochip_get_data(chip);
- unsigned int val_offset = offset;
- unsigned int reg = OUTPUT_EN;
+ unsigned int en_offset = offset;
+ unsigned int reg = OUTPUT_VAL;
unsigned int mask, val, ret;
armada_37xx_update_reg(&reg, &offset);
mask = BIT(offset);
+ val = value ? mask : 0;
- ret = regmap_update_bits(info->regmap, reg, mask, mask);
-
+ ret = regmap_update_bits(info->regmap, reg, mask, val);
if (ret)
return ret;
- reg = OUTPUT_VAL;
- armada_37xx_update_reg(&reg, &val_offset);
+ reg = OUTPUT_EN;
+ armada_37xx_update_reg(&reg, &en_offset);
- val = value ? mask : 0;
- regmap_update_bits(info->regmap, reg, mask, val);
+ regmap_update_bits(info->regmap, reg, mask, mask);
return 0;
}

View File

@ -1,104 +0,0 @@
From: Ulf Hansson <ulf.hansson@linaro.org>
For some usecases a consumer driver requires its device to remain power-on
from the PM domain perspective during runtime. Using dev PM qos along with
the genpd governors, doesn't work for this case as would potentially
prevent the device from being runtime suspended too.
To support these usecases, let's introduce dev_pm_genpd_rpm_always_on() to
allow consumers drivers to dynamically control the behaviour in genpd for a
device that is attached to it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/pmdomain/core.c | 34 ++++++++++++++++++++++++++++++++++
include/linux/pm_domain.h | 7 +++++++
2 files changed, 41 insertions(+)
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -697,6 +697,36 @@ bool dev_pm_genpd_get_hwmode(struct devi
}
EXPORT_SYMBOL_GPL(dev_pm_genpd_get_hwmode);
+/**
+ * dev_pm_genpd_rpm_always_on() - Control if the PM domain can be powered off.
+ *
+ * @dev: Device for which the PM domain may need to stay on for.
+ * @on: Value to set or unset for the condition.
+ *
+ * For some usecases a consumer driver requires its device to remain power-on
+ * from the PM domain perspective during runtime. This function allows the
+ * behaviour to be dynamically controlled for a device attached to a genpd.
+ *
+ * It is assumed that the users guarantee that the genpd wouldn't be detached
+ * while this routine is getting called.
+ *
+ * Return: Returns 0 on success and negative error values on failures.
+ */
+int dev_pm_genpd_rpm_always_on(struct device *dev, bool on)
+{
+ struct generic_pm_domain *genpd;
+
+ genpd = dev_to_genpd_safe(dev);
+ if (!genpd)
+ return -ENODEV;
+
+ genpd_lock(genpd);
+ dev_gpd_data(dev)->rpm_always_on = on;
+ genpd_unlock(genpd);
+
+ return 0;
+}
+
static int _genpd_power_on(struct generic_pm_domain *genpd, bool timed)
{
unsigned int state_idx = genpd->state_idx;
@@ -868,6 +898,10 @@ static int genpd_power_off(struct generi
if (!pm_runtime_suspended(pdd->dev) ||
irq_safe_dev_in_sleep_domain(pdd->dev, genpd))
not_suspended++;
+
+ /* The device may need its PM domain to stay powered on. */
+ if (to_gpd_data(pdd)->rpm_always_on)
+ return -EBUSY;
}
if (not_suspended > 1 || (not_suspended == 1 && !one_dev_on))
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -251,6 +251,7 @@ struct generic_pm_domain_data {
unsigned int default_pstate;
unsigned int rpm_pstate;
bool hw_mode;
+ bool rpm_always_on;
void *data;
};
@@ -283,6 +284,7 @@ ktime_t dev_pm_genpd_get_next_hrtimer(st
void dev_pm_genpd_synced_poweroff(struct device *dev);
int dev_pm_genpd_set_hwmode(struct device *dev, bool enable);
bool dev_pm_genpd_get_hwmode(struct device *dev);
+int dev_pm_genpd_rpm_always_on(struct device *dev, bool on);
extern struct dev_power_governor simple_qos_governor;
extern struct dev_power_governor pm_domain_always_on_gov;
@@ -366,6 +368,11 @@ static inline bool dev_pm_genpd_get_hwmo
return false;
}
+static inline int dev_pm_genpd_rpm_always_on(struct device *dev, bool on)
+{
+ return -EOPNOTSUPP;
+}
+
#define simple_qos_governor (*(struct dev_power_governor *)(NULL))
#define pm_domain_always_on_gov (*(struct dev_power_governor *)(NULL))
#endif

View File

@ -1,16 +0,0 @@
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml
@@ -133,7 +133,7 @@ additionalProperties:
description:
Pin bank index.
- minimum: 0
- maximum: 13
+ maximum: 14
description:
Mux 0 means GPIO and mux 1 to N means
the specific device function.

View File

@ -1,79 +0,0 @@
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Changes in v2:
- Rewrite patch to use dev_pm_genpd_rpm_always_on in sdhci driver
instead, after Ulf Hansson made me aware of its existence
- Link to v1: https://lore.kernel.org/r/20250408-rk3576-emmc-fix-v1-1-3009828b1b31@collabora.com
---
drivers/mmc/host/sdhci-of-dwcmshc.c | 39 +++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/sizes.h>
@@ -787,6 +788,28 @@ static void dwcmshc_rk35xx_postinit(stru
}
}
+static void dwcmshc_rk3576_postinit(struct sdhci_host *host, struct dwcmshc_priv *dwc_priv)
+{
+ struct device *dev = mmc_dev(host->mmc);
+ int ret;
+
+ /*
+ * This works around what appears to be a silicon bug, which makes the
+ * PD_NVM power domain, which the sdhci controller on the RK3576 is in,
+ * never come back the same way once it's turned off once. This can
+ * happen during early kernel boot if no driver is using either PD_NVM
+ * or its child power domain PD_SDGMAC for a short moment, leading to it
+ * being turned off to save power. By keeping it on, sdhci suspending
+ * won't lead to PD_NVM becoming a candidate for getting turned off.
+ */
+ ret = dev_pm_genpd_rpm_always_on(dev, true);
+ if (ret && ret != -EOPNOTSUPP)
+ dev_warn(dev, "failed to set PD rpm always on, SoC may hang later: %pe\n",
+ ERR_PTR(ret));
+
+ dwcmshc_rk35xx_postinit(host, dwc_priv);
+}
+
static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
{
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
@@ -1218,6 +1241,18 @@ static const struct dwcmshc_pltfm_data s
.postinit = dwcmshc_rk35xx_postinit,
};
+static const struct dwcmshc_pltfm_data sdhci_dwcmshc_rk3576_pdata = {
+ .pdata = {
+ .ops = &sdhci_dwcmshc_rk35xx_ops,
+ .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN |
+ SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
+ .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
+ SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
+ },
+ .init = dwcmshc_rk35xx_init,
+ .postinit = dwcmshc_rk3576_postinit,
+};
+
static const struct dwcmshc_pltfm_data sdhci_dwcmshc_th1520_pdata = {
.pdata = {
.ops = &sdhci_dwcmshc_th1520_ops,
@@ -1317,6 +1352,10 @@ static const struct of_device_id sdhci_d
.data = &sdhci_dwcmshc_rk35xx_pdata,
},
{
+ .compatible = "rockchip,rk3576-dwcmshc",
+ .data = &sdhci_dwcmshc_rk3576_pdata,
+ },
+ {
.compatible = "rockchip,rk3568-dwcmshc",
.data = &sdhci_dwcmshc_rk35xx_pdata,
},