mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Merge pull request #1784 from loki666/linux-6.16.1
linux/kernel: bump to 6.16.3
This commit is contained in:
@@ -611,46 +611,6 @@ index 9845a187bdf6..317a27cf590b 100644
|
||||
--
|
||||
2.48.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v8 6/11] dt-bindings: allwinner: add H616 DE33 clock
|
||||
binding
|
||||
From: Ryan Walklin <ryan@testtoast.com>
|
||||
Date: Mon, 10 Mar 2025 22:09:52 +1300
|
||||
Message-Id: <20250310092345.31708-7-ryan@testtoast.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
The Allwinner H616 and variants have a new display engine revision
|
||||
(DE33).
|
||||
|
||||
Add a clock binding for the DE33.
|
||||
|
||||
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
|
||||
Acked-by: Conor Dooley <conor.dooley@microchip.com>
|
||||
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
|
||||
---
|
||||
Changelog v2..v3:
|
||||
- Separate content into three patches for three separate subsystems
|
||||
---
|
||||
.../devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml b/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml
|
||||
index 70369bd633e4..7fcd55d468d4 100644
|
||||
--- a/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml
|
||||
+++ b/Documentation/devicetree/bindings/clock/allwinner,sun8i-a83t-de2-clk.yaml
|
||||
@@ -25,6 +25,7 @@ properties:
|
||||
- const: allwinner,sun50i-a64-de2-clk
|
||||
- const: allwinner,sun50i-h5-de2-clk
|
||||
- const: allwinner,sun50i-h6-de3-clk
|
||||
+ - const: allwinner,sun50i-h616-de33-clk
|
||||
- items:
|
||||
- const: allwinner,sun8i-r40-de2-clk
|
||||
- const: allwinner,sun8i-h3-de2-clk
|
||||
--
|
||||
2.48.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v8 7/11] dt-bindings: allwinner: add H616 DE33 mixer
|
||||
binding
|
||||
@@ -727,106 +687,6 @@ index b75c1ec686ad..274f5e632733 100644
|
||||
--
|
||||
2.48.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v8 8/11] clk: sunxi-ng: ccu: add Display Engine 3.3 (DE33)
|
||||
support
|
||||
From: Ryan Walklin <ryan@testtoast.com>
|
||||
Date: Mon, 10 Mar 2025 22:09:54 +1300
|
||||
Message-Id: <20250310092345.31708-9-ryan@testtoast.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
The DE33 is a newer version of the Allwinner Display Engine IP block,
|
||||
found in the H616, H618, H700 and T507 SoCs. DE2 and DE3 are already
|
||||
supported by the mainline driver.
|
||||
|
||||
The DE33 in the H616 has mixer0 and writeback units. The clocks
|
||||
and resets required are identical to the H3 and H5 respectively, so use
|
||||
those existing structs for the H616 description.
|
||||
|
||||
There are two additional 32-bit registers (at offsets 0x24 and 0x28)
|
||||
which require clearing and setting respectively to bring up the
|
||||
hardware. The function of these registers is currently unknown, and the
|
||||
values are taken from the out-of-tree driver.
|
||||
|
||||
Add the required clock description struct and compatible string to the
|
||||
DE2 driver.
|
||||
|
||||
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
|
||||
---
|
||||
Changelog v2..v3:
|
||||
- Lowercase hex value
|
||||
|
||||
Changelog v2..v3:
|
||||
- Correct #include for writel()
|
||||
|
||||
Changelog v4..v5:
|
||||
- Whitespace fix
|
||||
---
|
||||
drivers/clk/sunxi-ng/ccu-sun8i-de2.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
|
||||
index f2aa71206bc2..a6cd0f988859 100644
|
||||
--- a/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
|
||||
+++ b/drivers/clk/sunxi-ng/ccu-sun8i-de2.c
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/clk-provider.h>
|
||||
+#include <linux/io.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -239,6 +240,16 @@ static const struct sunxi_ccu_desc sun50i_h5_de2_clk_desc = {
|
||||
.num_resets = ARRAY_SIZE(sun50i_h5_de2_resets),
|
||||
};
|
||||
|
||||
+static const struct sunxi_ccu_desc sun50i_h616_de33_clk_desc = {
|
||||
+ .ccu_clks = sun8i_de2_ccu_clks,
|
||||
+ .num_ccu_clks = ARRAY_SIZE(sun8i_de2_ccu_clks),
|
||||
+
|
||||
+ .hw_clks = &sun8i_h3_de2_hw_clks,
|
||||
+
|
||||
+ .resets = sun50i_h5_de2_resets,
|
||||
+ .num_resets = ARRAY_SIZE(sun50i_h5_de2_resets),
|
||||
+};
|
||||
+
|
||||
static int sunxi_de2_clk_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct clk *bus_clk, *mod_clk;
|
||||
@@ -291,6 +302,16 @@ static int sunxi_de2_clk_probe(struct platform_device *pdev)
|
||||
goto err_disable_mod_clk;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * The DE33 requires these additional (unknown) registers set
|
||||
+ * during initialisation.
|
||||
+ */
|
||||
+ if (of_device_is_compatible(pdev->dev.of_node,
|
||||
+ "allwinner,sun50i-h616-de33-clk")) {
|
||||
+ writel(0, reg + 0x24);
|
||||
+ writel(0x0000a980, reg + 0x28);
|
||||
+ }
|
||||
+
|
||||
ret = devm_sunxi_ccu_probe(&pdev->dev, reg, ccu_desc);
|
||||
if (ret)
|
||||
goto err_assert_reset;
|
||||
@@ -335,6 +356,10 @@ static const struct of_device_id sunxi_de2_clk_ids[] = {
|
||||
.compatible = "allwinner,sun50i-h6-de3-clk",
|
||||
.data = &sun50i_h5_de2_clk_desc,
|
||||
},
|
||||
+ {
|
||||
+ .compatible = "allwinner,sun50i-h616-de33-clk",
|
||||
+ .data = &sun50i_h616_de33_clk_desc,
|
||||
+ },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sunxi_de2_clk_ids);
|
||||
--
|
||||
2.48.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v8 9/11] drm: sun4i: de33: vi_scaler: add Display Engine
|
||||
3.3 (DE33) support
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v3 4/5] arm64: dts: allwinner: h700: Add hp-det-gpios for
|
||||
Anbernic RG35XX
|
||||
From: Chris Morgan <macromorgan@hotmail.com>
|
||||
Date: Sat, 15 Feb 2025 11:02:26 +1300
|
||||
Message-Id: <20250214220247.10810-5-ryan@testtoast.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
Add support for headphone insertion detection via GPIO for the
|
||||
RG35XX series, and add the corresponding routing to the codec node.
|
||||
|
||||
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
|
||||
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
|
||||
Tested-by: Philippe Simons <simons.philippe@gmail.com>
|
||||
|
||||
--
|
||||
Changelog v1..v2:
|
||||
- Remove vendor prefix from GPIO description.
|
||||
- Whitespace fix
|
||||
|
||||
Changelog v2..v3:
|
||||
- Add Tested-by tag
|
||||
|
||||
---
|
||||
.../boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
|
||||
index a231abf1684ad..b482fdf1fdba8 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-2024.dts
|
||||
@@ -178,8 +178,11 @@ reg_vcc5v: regulator-vcc5v { /* USB-C power input */
|
||||
};
|
||||
|
||||
&codec {
|
||||
- allwinner,audio-routing = "Line Out", "LINEOUT";
|
||||
+ /* Both speakers and headphone jack connected to 74HC4052D analog mux*/
|
||||
+ allwinner,audio-routing = "Speaker", "LINEOUT",
|
||||
+ "Headphone", "LINEOUT";
|
||||
allwinner,pa-gpios = <&pio 8 5 GPIO_ACTIVE_HIGH>; // PI5
|
||||
+ hp-det-gpios = <&pio 8 3 GPIO_ACTIVE_HIGH>; // PI3
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
2.48.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,260 +0,0 @@
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v2 1/3] drm/panfrost: Add PM runtime flag
|
||||
From: Philippe Simons <simons.philippe@gmail.com>
|
||||
Date: Thu, 03 Apr 2025 07:52:08 +0200
|
||||
Message-Id: <20250403055210.54486-2-simons.philippe@gmail.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
When the GPU is the only device attached to a single power domain,
|
||||
core genpd disable and enable it when gpu enter and leave runtime suspend.
|
||||
|
||||
Some power-domain requires a sequence before disabled,
|
||||
and the reverse when enabled.
|
||||
|
||||
Add GPU_PM_RT flag, and implement in
|
||||
panfrost_device_runtime_suspend/resume.
|
||||
|
||||
Reviewed-by: Steven Price <steven.price@arm.com>
|
||||
Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/panfrost/panfrost_device.c | 33 ++++++++++++++++++++++
|
||||
drivers/gpu/drm/panfrost/panfrost_device.h | 3 ++
|
||||
2 files changed, 36 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
|
||||
index a45e4addcc19..93d48e97ce10 100644
|
||||
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
|
||||
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
|
||||
@@ -406,11 +406,36 @@ void panfrost_device_reset(struct panfrost_device *pfdev)
|
||||
static int panfrost_device_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct panfrost_device *pfdev = dev_get_drvdata(dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
|
||||
+ ret = reset_control_deassert(pfdev->rstc);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = clk_enable(pfdev->clock);
|
||||
+ if (ret)
|
||||
+ goto err_clk;
|
||||
+
|
||||
+ if (pfdev->bus_clock) {
|
||||
+ ret = clk_enable(pfdev->bus_clock);
|
||||
+ if (ret)
|
||||
+ goto err_bus_clk;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
panfrost_device_reset(pfdev);
|
||||
panfrost_devfreq_resume(pfdev);
|
||||
|
||||
return 0;
|
||||
+
|
||||
+err_bus_clk:
|
||||
+ if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
|
||||
+ clk_disable(pfdev->clock);
|
||||
+err_clk:
|
||||
+ if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
|
||||
+ reset_control_assert(pfdev->rstc);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int panfrost_device_runtime_suspend(struct device *dev)
|
||||
@@ -426,6 +451,14 @@ static int panfrost_device_runtime_suspend(struct device *dev)
|
||||
panfrost_gpu_suspend_irq(pfdev);
|
||||
panfrost_gpu_power_off(pfdev);
|
||||
|
||||
+ if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
|
||||
+ if (pfdev->bus_clock)
|
||||
+ clk_disable(pfdev->bus_clock);
|
||||
+
|
||||
+ clk_disable(pfdev->clock);
|
||||
+ reset_control_assert(pfdev->rstc);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.h b/drivers/gpu/drm/panfrost/panfrost_device.h
|
||||
index cffcb0ac7c11..861555ceea65 100644
|
||||
--- a/drivers/gpu/drm/panfrost/panfrost_device.h
|
||||
+++ b/drivers/gpu/drm/panfrost/panfrost_device.h
|
||||
@@ -36,10 +36,13 @@ enum panfrost_drv_comp_bits {
|
||||
* enum panfrost_gpu_pm - Supported kernel power management features
|
||||
* @GPU_PM_CLK_DIS: Allow disabling clocks during system suspend
|
||||
* @GPU_PM_VREG_OFF: Allow turning off regulators during system suspend
|
||||
+ * @GPU_PM_RT: Allow disabling clocks and asserting the reset control during
|
||||
+ * system runtime suspend
|
||||
*/
|
||||
enum panfrost_gpu_pm {
|
||||
GPU_PM_CLK_DIS,
|
||||
GPU_PM_VREG_OFF,
|
||||
+ GPU_PM_RT
|
||||
};
|
||||
|
||||
struct panfrost_features {
|
||||
--
|
||||
2.49.0
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v2 2/3] drm/panfrost: add h616 compatible string
|
||||
From: Philippe Simons <simons.philippe@gmail.com>
|
||||
Date: Thu, 03 Apr 2025 07:52:09 +0200
|
||||
Message-Id: <20250403055210.54486-3-simons.philippe@gmail.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
Tie the Allwinner compatible string to the GPU_PM_RT feature bits that will
|
||||
toggle the clocks and the reset line whenever the power domain is changing
|
||||
state.
|
||||
|
||||
Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/panfrost/panfrost_drv.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
|
||||
index 0f3935556ac7..9470c04c5487 100644
|
||||
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
|
||||
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
|
||||
@@ -776,6 +776,13 @@ static const struct panfrost_compatible default_data = {
|
||||
.pm_domain_names = NULL,
|
||||
};
|
||||
|
||||
+static const struct panfrost_compatible allwinner_h616_data = {
|
||||
+ .num_supplies = ARRAY_SIZE(default_supplies) - 1,
|
||||
+ .supply_names = default_supplies,
|
||||
+ .num_pm_domains = 1,
|
||||
+ .pm_features = BIT(GPU_PM_RT),
|
||||
+};
|
||||
+
|
||||
static const struct panfrost_compatible amlogic_data = {
|
||||
.num_supplies = ARRAY_SIZE(default_supplies) - 1,
|
||||
.supply_names = default_supplies,
|
||||
@@ -859,6 +866,7 @@ static const struct of_device_id dt_match[] = {
|
||||
{ .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
|
||||
{ .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
|
||||
{ .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
|
||||
+ { .compatible = "allwinner,sun50i-h616-mali", .data = &allwinner_h616_data },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dt_match);
|
||||
--
|
||||
2.49.0
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH v2 3/3] drm/panfrost: reorder pd/clk/rst sequence
|
||||
From: Philippe Simons <simons.philippe@gmail.com>
|
||||
Date: Thu, 03 Apr 2025 07:52:10 +0200
|
||||
Message-Id: <20250403055210.54486-4-simons.philippe@gmail.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
According to Mali manuals, the powerup sequence should be
|
||||
enable pd, asserting the reset then enabling the clock and
|
||||
the reverse for powerdown.
|
||||
|
||||
Tested-by: John Williams <porschemad911@gmail.com>
|
||||
Signed-off-by: Philippe Simons <simons.philippe@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/panfrost/panfrost_device.c | 38 +++++++++++-----------
|
||||
1 file changed, 19 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
|
||||
index 93d48e97ce10..5d35076b2e6d 100644
|
||||
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
|
||||
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
|
||||
@@ -209,10 +209,20 @@ int panfrost_device_init(struct panfrost_device *pfdev)
|
||||
|
||||
spin_lock_init(&pfdev->cycle_counter.lock);
|
||||
|
||||
+ err = panfrost_pm_domain_init(pfdev);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ err = panfrost_reset_init(pfdev);
|
||||
+ if (err) {
|
||||
+ dev_err(pfdev->dev, "reset init failed %d\n", err);
|
||||
+ goto out_pm_domain;
|
||||
+ }
|
||||
+
|
||||
err = panfrost_clk_init(pfdev);
|
||||
if (err) {
|
||||
dev_err(pfdev->dev, "clk init failed %d\n", err);
|
||||
- return err;
|
||||
+ goto out_reset;
|
||||
}
|
||||
|
||||
err = panfrost_devfreq_init(pfdev);
|
||||
@@ -229,25 +239,15 @@ int panfrost_device_init(struct panfrost_device *pfdev)
|
||||
goto out_devfreq;
|
||||
}
|
||||
|
||||
- err = panfrost_reset_init(pfdev);
|
||||
- if (err) {
|
||||
- dev_err(pfdev->dev, "reset init failed %d\n", err);
|
||||
- goto out_regulator;
|
||||
- }
|
||||
-
|
||||
- err = panfrost_pm_domain_init(pfdev);
|
||||
- if (err)
|
||||
- goto out_reset;
|
||||
-
|
||||
pfdev->iomem = devm_platform_ioremap_resource(pfdev->pdev, 0);
|
||||
if (IS_ERR(pfdev->iomem)) {
|
||||
err = PTR_ERR(pfdev->iomem);
|
||||
- goto out_pm_domain;
|
||||
+ goto out_regulator;
|
||||
}
|
||||
|
||||
err = panfrost_gpu_init(pfdev);
|
||||
if (err)
|
||||
- goto out_pm_domain;
|
||||
+ goto out_regulator;
|
||||
|
||||
err = panfrost_mmu_init(pfdev);
|
||||
if (err)
|
||||
@@ -268,16 +268,16 @@ int panfrost_device_init(struct panfrost_device *pfdev)
|
||||
panfrost_mmu_fini(pfdev);
|
||||
out_gpu:
|
||||
panfrost_gpu_fini(pfdev);
|
||||
-out_pm_domain:
|
||||
- panfrost_pm_domain_fini(pfdev);
|
||||
-out_reset:
|
||||
- panfrost_reset_fini(pfdev);
|
||||
out_regulator:
|
||||
panfrost_regulator_fini(pfdev);
|
||||
out_devfreq:
|
||||
panfrost_devfreq_fini(pfdev);
|
||||
out_clk:
|
||||
panfrost_clk_fini(pfdev);
|
||||
+out_reset:
|
||||
+ panfrost_reset_fini(pfdev);
|
||||
+out_pm_domain:
|
||||
+ panfrost_pm_domain_fini(pfdev);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -287,11 +287,11 @@ void panfrost_device_fini(struct panfrost_device *pfdev)
|
||||
panfrost_job_fini(pfdev);
|
||||
panfrost_mmu_fini(pfdev);
|
||||
panfrost_gpu_fini(pfdev);
|
||||
- panfrost_pm_domain_fini(pfdev);
|
||||
- panfrost_reset_fini(pfdev);
|
||||
panfrost_devfreq_fini(pfdev);
|
||||
panfrost_regulator_fini(pfdev);
|
||||
panfrost_clk_fini(pfdev);
|
||||
+ panfrost_reset_fini(pfdev);
|
||||
+ panfrost_pm_domain_fini(pfdev);
|
||||
}
|
||||
|
||||
#define PANFROST_EXCEPTION(id) \
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@@ -75,13 +75,13 @@ diff -rupbN linux.orig/drivers/firmware/psci/psci.c linux/drivers/firmware/psci/
|
||||
diff -rupbN linux.orig/drivers/remoteproc/qcom_q6v5_pas.c linux/drivers/remoteproc/qcom_q6v5_pas.c
|
||||
--- linux.orig/drivers/remoteproc/qcom_q6v5_pas.c 2024-10-19 13:35:30.157005891 +0000
|
||||
+++ linux/drivers/remoteproc/qcom_q6v5_pas.c 2024-11-04 05:06:06.991809741 +0000
|
||||
@@ -316,8 +316,8 @@ static int adsp_start(struct rproc *rpro
|
||||
@@ -316,8 +316,8 @@ static int qcom_pas_start(struct rproc *rproc)
|
||||
|
||||
ret = qcom_scm_pas_auth_and_reset(adsp->pas_id);
|
||||
ret = qcom_scm_pas_auth_and_reset(pas->pas_id);
|
||||
if (ret) {
|
||||
- dev_err(adsp->dev,
|
||||
- dev_err(pas->dev,
|
||||
- "failed to authenticate image and release reset\n");
|
||||
+ //dev_err(adsp->dev,
|
||||
+ //dev_err(pas->dev,
|
||||
+ //"failed to authenticate image and release reset\n");
|
||||
goto release_pas_metadata;
|
||||
}
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH 1/2] wifi: ath12k: avoid bit operation on key flags
|
||||
From: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Date: Fri, 23 May 2025 11:49:01 +0800
|
||||
Message-Id: <20250523-ath12k-unicast-key-first-v1-1-f53c3880e6d8@quicinc.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
WMI_KEY_PAIRWISE and WMI_KEY_GROUP are not bit fields, change
|
||||
bit operation to direct assignment to avoid confusion.
|
||||
|
||||
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00217-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
index 88b59f3ff87af8b48cb3fafcd364fd9ced4ff197..eb3c6d10e116b098d44cd94ba8e0257a77b54af8 100644
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -4881,9 +4881,9 @@ static int ath12k_mac_set_key(struct ath12k *ar, enum set_key_cmd cmd,
|
||||
}
|
||||
|
||||
if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)
|
||||
- flags |= WMI_KEY_PAIRWISE;
|
||||
+ flags = WMI_KEY_PAIRWISE;
|
||||
else
|
||||
- flags |= WMI_KEY_GROUP;
|
||||
+ flags = WMI_KEY_GROUP;
|
||||
|
||||
ret = ath12k_install_key(arvif, key, cmd, peer_addr, flags);
|
||||
if (ret) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
From git@z Thu Jan 1 00:00:00 1970
|
||||
Subject: [PATCH 2/2] wifi: ath12k: install pairwise key first
|
||||
From: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Date: Fri, 23 May 2025 11:49:02 +0800
|
||||
Message-Id: <20250523-ath12k-unicast-key-first-v1-2-f53c3880e6d8@quicinc.com>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
As station, WCN7850 firmware requires pairwise key to be installed before
|
||||
group key. Currently host does not care about this, so it is up to kernel
|
||||
or userspace to decide which one will be installed first. In case above
|
||||
requirement is not met, WCN7850 firmware's EAPOL station machine is messed
|
||||
up, and finally connection fails [1].
|
||||
|
||||
Reorder key install for station interface in that case: this is done by
|
||||
caching group key first; Later when pairwise key arrives, both can be
|
||||
installed in required order.
|
||||
|
||||
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
|
||||
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00217-QCAHKSWPL_SILICONZ-1
|
||||
|
||||
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218733
|
||||
Link: https://lore.kernel.org/all/AS8P190MB12051DDBD84CD88E71C40AD7873F2@AS8P190MB1205.EURP190.PROD.OUTLOOK.COM # [1]
|
||||
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
|
||||
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath12k/core.h | 4 ++
|
||||
drivers/net/wireless/ath/ath12k/mac.c | 76 ++++++++++++++++++++++++++++++----
|
||||
drivers/net/wireless/ath/ath12k/wmi.h | 1 +
|
||||
3 files changed, 74 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
|
||||
index 941db6e49d6eaeb03783f7714d433259d887820b..eeaaa0616e48c3cf34f2769a1979e2f67888ac25 100644
|
||||
--- a/drivers/net/wireless/ath/ath12k/core.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/core.h
|
||||
@@ -345,6 +345,10 @@ struct ath12k_link_vif {
|
||||
bool is_sta_assoc_link;
|
||||
|
||||
struct ath12k_reg_tpc_power_info reg_tpc_info;
|
||||
+
|
||||
+ bool group_key_valid;
|
||||
+ struct wmi_vdev_install_key_arg group_key;
|
||||
+ bool pairwise_key_done;
|
||||
};
|
||||
|
||||
struct ath12k_vif {
|
||||
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
index eb3c6d10e116b098d44cd94ba8e0257a77b54af8..05a17ad2eaeea00c938b16d22fb8e7605dfb4007 100644
|
||||
--- a/drivers/net/wireless/ath/ath12k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath12k/mac.c
|
||||
@@ -4731,14 +4731,13 @@ static int ath12k_install_key(struct ath12k_link_vif *arvif,
|
||||
.key_len = key->keylen,
|
||||
.key_data = key->key,
|
||||
.key_flags = flags,
|
||||
+ .ieee80211_key_cipher = key->cipher,
|
||||
.macaddr = macaddr,
|
||||
};
|
||||
struct ath12k_vif *ahvif = arvif->ahvif;
|
||||
|
||||
lockdep_assert_wiphy(ath12k_ar_to_hw(ar)->wiphy);
|
||||
|
||||
- reinit_completion(&ar->install_key_done);
|
||||
-
|
||||
if (test_bit(ATH12K_FLAG_HW_CRYPTO_DISABLED, &ar->ab->dev_flags))
|
||||
return 0;
|
||||
|
||||
@@ -4747,7 +4746,7 @@ static int ath12k_install_key(struct ath12k_link_vif *arvif,
|
||||
/* arg.key_cipher = WMI_CIPHER_NONE; */
|
||||
arg.key_len = 0;
|
||||
arg.key_data = NULL;
|
||||
- goto install;
|
||||
+ goto check_order;
|
||||
}
|
||||
|
||||
switch (key->cipher) {
|
||||
@@ -4775,19 +4774,82 @@ static int ath12k_install_key(struct ath12k_link_vif *arvif,
|
||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV |
|
||||
IEEE80211_KEY_FLAG_RESERVE_TAILROOM;
|
||||
|
||||
+check_order:
|
||||
+ if (ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arg.key_flags == WMI_KEY_GROUP) {
|
||||
+ if (cmd == SET_KEY) {
|
||||
+ if (arvif->pairwise_key_done) {
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "vdev %u pairwise key done, go install group key\n",
|
||||
+ arg.vdev_id);
|
||||
+ goto install;
|
||||
+ } else {
|
||||
+ /* WCN7850 firmware requires pairwise key to be installed
|
||||
+ * before group key. In case group key comes first, cache
|
||||
+ * it and return. Will revisit it once pairwise key gets
|
||||
+ * installed.
|
||||
+ */
|
||||
+ arvif->group_key = arg;
|
||||
+ arvif->group_key_valid = true;
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "vdev %u group key before pairwise key, cache and skip\n",
|
||||
+ arg.vdev_id);
|
||||
+
|
||||
+ ret = 0;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ } else {
|
||||
+ arvif->group_key_valid = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
install:
|
||||
- ret = ath12k_wmi_vdev_install_key(arvif->ar, &arg);
|
||||
+ reinit_completion(&ar->install_key_done);
|
||||
|
||||
+ ret = ath12k_wmi_vdev_install_key(arvif->ar, &arg);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (!wait_for_completion_timeout(&ar->install_key_done, 1 * HZ))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
- if (ether_addr_equal(macaddr, arvif->bssid))
|
||||
- ahvif->key_cipher = key->cipher;
|
||||
+ if (ether_addr_equal(arg.macaddr, arvif->bssid))
|
||||
+ ahvif->key_cipher = arg.ieee80211_key_cipher;
|
||||
+
|
||||
+ if (ar->install_key_status) {
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (ahvif->vdev_type == WMI_VDEV_TYPE_STA &&
|
||||
+ arg.key_flags == WMI_KEY_PAIRWISE) {
|
||||
+ if (cmd == SET_KEY) {
|
||||
+ arvif->pairwise_key_done = true;
|
||||
+ if (arvif->group_key_valid) {
|
||||
+ /* Install cached GTK */
|
||||
+ arvif->group_key_valid = false;
|
||||
+ arg = arvif->group_key;
|
||||
+ ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
|
||||
+ "vdev %u pairwise key done, group key ready, go install\n",
|
||||
+ arg.vdev_id);
|
||||
+ goto install;
|
||||
+ }
|
||||
+ } else {
|
||||
+ arvif->pairwise_key_done = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+out:
|
||||
+ if (ret) {
|
||||
+ /* In case of failure userspace may not do DISABLE_KEY
|
||||
+ * but triggers re-connection directly, so manually reset
|
||||
+ * status here.
|
||||
+ */
|
||||
+ arvif->group_key_valid = false;
|
||||
+ arvif->pairwise_key_done = false;
|
||||
+ }
|
||||
|
||||
- return ar->install_key_status ? -EINVAL : 0;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int ath12k_clear_peer_keys(struct ath12k_link_vif *arvif,
|
||||
diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
index ac18f75e04492b62594acb159e3b43b81bd6c392..63302302cf87058a87ba99c294810823f714779b 100644
|
||||
--- a/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
+++ b/drivers/net/wireless/ath/ath12k/wmi.h
|
||||
@@ -3746,6 +3746,7 @@ struct wmi_vdev_install_key_arg {
|
||||
u32 key_idx;
|
||||
u32 key_flags;
|
||||
u32 key_cipher;
|
||||
+ u32 ieee80211_key_cipher;
|
||||
u32 key_len;
|
||||
u32 key_txmic_len;
|
||||
u32 key_rxmic_len;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -31,11 +31,8 @@ case ${DEVICE} in
|
||||
;;
|
||||
*)
|
||||
case ${DEVICE} in
|
||||
H700)
|
||||
PKG_VERSION="6.15.2"
|
||||
;;
|
||||
SM8250|SM8550)
|
||||
PKG_VERSION="6.16"
|
||||
SM8250|SM8550|H700)
|
||||
PKG_VERSION="6.16.3"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="6.12.40"
|
||||
|
||||
Reference in New Issue
Block a user