linux: bump Amlogic kernel to 6.1.y

This commit is contained in:
Christian Hewitt
2022-11-16 16:52:23 +00:00
parent 46a791284d
commit bb294733eb
99 changed files with 2552 additions and 781 deletions

View File

@@ -16,8 +16,8 @@ PKG_PATCH_DIRS="${LINUX}"
case "${LINUX}" in
amlogic)
PKG_VERSION="be8b93b5cc7d533eb8c9b0590cdac055ecafe13a" # 6.0.9
PKG_SHA256="d32f975add35f62ad1a0fe7207fd6503c566a60faf856b037008d4d6471e7a8d"
PKG_VERSION="90ca7a874a9093e500cc6147cecd85ad2e6a2852" # 6.1.5
PKG_SHA256="6fed4ac4f4585ebac26e82022f377fca29f8b4dc8042e34db1f67b53f4f5d2d8"
PKG_URL="https://github.com/torvalds/linux/archive/${PKG_VERSION}.tar.gz"
PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz"
;;

View File

@@ -1,7 +1,7 @@
From bbbc1a8a588a2f899c67941f054dfeb250233a19 Mon Sep 17 00:00:00 2001
From ff14abfd54075d016f8d46e30e3395dd5613024b Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Sat, 13 Apr 2019 05:41:51 +0000
Subject: [PATCH 01/73] LOCAL: set meson-gx cma pool to 896MB
Subject: [PATCH 01/92] LOCAL: set meson-gx cma pool to 896MB
This change sets the CMA pool to a larger 896MB! value for vdec use
@@ -14,7 +14,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/aml
index 023a52005494..ca0d1733d515 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -58,7 +58,7 @@
@@ -58,7 +58,7 @@ secmon_reserved_bl32: secmon@5300000 {
linux,cma {
compatible = "shared-dma-pool";
reusable;
@@ -24,5 +24,5 @@ index 023a52005494..ca0d1733d515 100644
linux,cma-default;
};
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 391e4a8fc138daf6fba77392eb6ebe688f2f6468 Mon Sep 17 00:00:00 2001
From 184621c6007e47fb0415a05668f132006c80caa9 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Wed, 14 Aug 2019 19:58:14 +0000
Subject: [PATCH 02/73] LOCAL: set meson-g12 cma pool to 896MB
Subject: [PATCH 02/92] LOCAL: set meson-g12 cma pool to 896MB
This change sets the CMA pool to a larger 896MB! value for vdec use
@@ -14,7 +14,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot
index 45947c1031c4..2c56b216d6f9 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -116,7 +116,7 @@
@@ -116,7 +116,7 @@ secmon_reserved_bl32: secmon@5300000 {
linux,cma {
compatible = "shared-dma-pool";
reusable;
@@ -24,5 +24,5 @@ index 45947c1031c4..2c56b216d6f9 100644
linux,cma-default;
};
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From b0f2464452ed2c0cf69e2dee5a1c054fa1b0e6cc Mon Sep 17 00:00:00 2001
From b1e12b3742785eecdda1b58e2445c3d83eccf445 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Sat, 13 Apr 2019 05:45:18 +0000
Subject: [PATCH 03/73] LOCAL: arm64: fix Kodi sysinfo CPU information
Subject: [PATCH 03/92] LOCAL: arm64: fix Kodi sysinfo CPU information
This allows the CPU information to show in the Kodi sysinfo screen, e.g.
@@ -13,10 +13,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index d7702f39b4d3..4b6ac49e34b4 100644
index 28d4f442b0bc..d46cea365be4 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -169,8 +169,7 @@ static int c_show(struct seq_file *m, void *v)
@@ -170,8 +170,7 @@ static int c_show(struct seq_file *m, void *v)
* "processor". Give glibc what it expects.
*/
seq_printf(m, "processor\t: %d\n", i);
@@ -27,5 +27,5 @@ index d7702f39b4d3..4b6ac49e34b4 100644
seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From d0e70c5cf59999273d7f25ac7153f959a9f12f42 Mon Sep 17 00:00:00 2001
From a859d1225bad98a5398a4777acc0cb64d32dfe04 Mon Sep 17 00:00:00 2001
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Thu, 3 Nov 2016 15:29:23 +0100
Subject: [PATCH 04/73] LOCAL: arm64: meson: add Amlogic Meson GX PM Suspend
Subject: [PATCH 04/92] LOCAL: arm64: meson: add Amlogic Meson GX PM Suspend
The Amlogic Meson GX SoCs uses a non-standard argument to the
PSCI CPU_SUSPEND call to enter system suspend.
@@ -131,5 +131,5 @@ index 000000000000..c104c2e4c77f
+MODULE_DESCRIPTION("Amlogic Meson GX PM driver");
+MODULE_LICENSE("GPL v2");
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 482d13486412a6b33ceb9e64c87e6394942834e9 Mon Sep 17 00:00:00 2001
From 87dbe21ffcdcd929dcb86f31453fcb400c954cd7 Mon Sep 17 00:00:00 2001
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Thu, 3 Nov 2016 15:29:25 +0100
Subject: [PATCH 05/73] LOCAL: arm64: dts: meson: add support for GX PM and
Subject: [PATCH 05/92] LOCAL: arm64: dts: meson: add support for GX PM and
Virtual RTC
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
@@ -13,7 +13,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/aml
index ca0d1733d515..b278a8380f8a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -221,6 +221,10 @@
@@ -221,6 +221,10 @@ sm: secure-monitor {
};
};
@@ -24,7 +24,7 @@ index ca0d1733d515..b278a8380f8a 100644
efuse: efuse {
compatible = "amlogic,meson-gx-efuse", "amlogic,meson-gxbb-efuse";
#address-cells = <1>;
@@ -459,6 +463,11 @@
@@ -459,6 +463,11 @@ clkc_AO: clock-controller {
};
};
@@ -37,5 +37,5 @@ index ca0d1733d515..b278a8380f8a 100644
compatible = "amlogic,meson-gx-ao-cec";
reg = <0x0 0x00100 0x0 0x14>;
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 411cb7102c7addd30d31b41f21471d57df8e2124 Mon Sep 17 00:00:00 2001
From 6f466ee418a0ce0de01ac2671efc5e73364b83eb Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Thu, 21 Jan 2021 01:35:36 +0000
Subject: [PATCH 06/73] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
Subject: [PATCH 06/92] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
Khadas VIM
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
@@ -16,7 +16,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/a
index 6ab1cc125b96..24af15e18026 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -29,6 +29,8 @@
@@ -29,6 +29,8 @@ button-function {
aliases {
serial2 = &uart_AO_B;
ethernet0 = &ethmac;
@@ -26,5 +26,5 @@ index 6ab1cc125b96..24af15e18026 100644
gpio-keys-polled {
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 1786033be020b8a5ab6a86646135e8df2e294524 Mon Sep 17 00:00:00 2001
From 14ad2621e7d5d7d96ef6ead4ed2dd2658d75acc6 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Sat, 6 Nov 2021 13:01:08 +0000
Subject: [PATCH 07/73] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
Subject: [PATCH 07/92] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
Khadas VIM2
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
@@ -16,7 +16,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/
index f43c45daf7eb..6d396c1be3d6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -18,6 +18,8 @@
@@ -18,6 +18,8 @@ / {
aliases {
serial0 = &uart_AO;
serial2 = &uart_AO_B;
@@ -26,5 +26,5 @@ index f43c45daf7eb..6d396c1be3d6 100644
chosen {
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From eae65baf2f29a74a7fe9d349501561b50439abfe Mon Sep 17 00:00:00 2001
From b9ec4238130625734e858f024ca9f5d87642bb62 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Mon, 1 Feb 2021 19:27:40 +0000
Subject: [PATCH 08/73] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to Minix
Subject: [PATCH 08/92] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to Minix
NEO U9-H
Add node aliases to prevent meson-vrtc from claiming /dev/rtc0
@@ -15,7 +15,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts b/arch/arm6
index b8ef3bd8b840..0920e7b096f5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
@@ -14,6 +14,11 @@
@@ -14,6 +14,11 @@ / {
compatible = "minix,neo-u9h", "amlogic,s912", "amlogic,meson-gxm";
model = "Minix Neo U9-H";
@@ -28,5 +28,5 @@ index b8ef3bd8b840..0920e7b096f5 100644
compatible = "gpio-leds";
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 04bdcad098193dda5988bb96bfae7178834b13b0 Mon Sep 17 00:00:00 2001
From 0cade3f576c5486cc914c32c7478af90aedf31bb Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Sun, 17 Apr 2022 04:37:48 +0000
Subject: [PATCH 09/73] LOCAL: ALSA: Assign internal PCM chmap/ELD/IEC958 kctls
Subject: [PATCH 09/92] LOCAL: ALSA: Assign internal PCM chmap/ELD/IEC958 kctls
to device 0
On SoC sound devices utilizing codec2codec DAI links with a HDMI codec
@@ -25,7 +25,7 @@ Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 40751e5aff09..1461463dc320 100644
index 8b6aeb8a78f7..eee05d447dec 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -2514,7 +2514,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
@@ -41,10 +41,10 @@ index 40751e5aff09..1461463dc320 100644
knew.private_value = private_value;
info->kctl = snd_ctl_new1(&knew, info);
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 5679102de91f..aa2ca5078551 100644
index 0b1cdb2d6049..bbc33161bcca 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -797,7 +797,8 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
@@ -793,7 +793,8 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
if (!kctl)
return -ENOMEM;
@@ -55,5 +55,5 @@ index 5679102de91f..aa2ca5078551 100644
if (ret < 0)
return ret;
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 080a637d2fedf1d550f2fcee2da8520cb2456122 Mon Sep 17 00:00:00 2001
From 72ea6f5c5fe299d105ebee91103ae26a7473af46 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Mon, 3 Jan 2022 10:44:17 +0000
Subject: [PATCH 10/73] LOCAL: usb: hub: disable autosuspend for Genesys Logic
Subject: [PATCH 10/92] LOCAL: usb: hub: disable autosuspend for Genesys Logic
Hubs
Disable autosuspend in Genesys Logic hubs to allow USB devices on the
@@ -30,5 +30,5 @@ index bbab424b0d55..ccfd0b312867 100644
.bDeviceClass = USB_CLASS_HUB},
{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS,
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 31cdc54e582baafbe8e2daf291c35b027081f01d Mon Sep 17 00:00:00 2001
From 0efd3bd51c74ee027a993d1a51501dd20c70e9ac Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 15 Sep 2021 05:00:45 +0000
Subject: [PATCH 11/73] LOCAL: of: partial revert of fdt.c changes
Subject: [PATCH 11/92] LOCAL: of: partial revert of fdt.c changes
This resolves reports similar to the below which are present in dmesg
since Linux 5.10; which are also causing crashes in some distros:
@@ -14,7 +14,7 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
1 file changed, 9 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 1c573e7a60bc..f9188a76500d 100644
index 4f88e8bbdd27..efa14615b865 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -481,15 +481,6 @@ static int __init early_init_dt_reserve_memory(phys_addr_t base,
@@ -34,5 +34,5 @@ index 1c573e7a60bc..f9188a76500d 100644
}
return memblock_reserve(base, size);
--
2.17.1
2.34.1

View File

@@ -1,57 +0,0 @@
From 7712306891a8e02c0253f4b6f68101cf4e567e3a Mon Sep 17 00:00:00 2001
From: Erico Nunes <nunes.erico@gmail.com>
Date: Fri, 18 Nov 2022 03:00:39 +0000
Subject: [PATCH 12/73] FROMGIT: drm/lima: Fix opp clkname setting in case of
missing regulator
Commit d8c32d3971e4 ("drm/lima: Migrate to dev_pm_opp_set_config()")
introduced a regression as it may undo the clk_names setting in case
the optional regulator is missing. This resulted in test and performance
regressions with lima.
Restore the old behavior where clk_names is set separately so it is not
undone in case of a missing optional regulator.
Fixes: d8c32d3971e4 ("drm/lima: Migrate to dev_pm_opp_set_config()")
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/gpu/drm/lima/lima_devfreq.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
index 011be7ff51e1..bc8fb4e38d0a 100644
--- a/drivers/gpu/drm/lima/lima_devfreq.c
+++ b/drivers/gpu/drm/lima/lima_devfreq.c
@@ -112,11 +112,6 @@ int lima_devfreq_init(struct lima_device *ldev)
unsigned long cur_freq;
int ret;
const char *regulator_names[] = { "mali", NULL };
- const char *clk_names[] = { "core", NULL };
- struct dev_pm_opp_config config = {
- .regulator_names = regulator_names,
- .clk_names = clk_names,
- };
if (!device_property_present(dev, "operating-points-v2"))
/* Optional, continue without devfreq */
@@ -124,7 +119,15 @@ int lima_devfreq_init(struct lima_device *ldev)
spin_lock_init(&ldevfreq->lock);
- ret = devm_pm_opp_set_config(dev, &config);
+ /*
+ * clkname is set separately so it is not affected by the optional
+ * regulator setting which may return error.
+ */
+ ret = devm_pm_opp_set_clkname(dev, "core");
+ if (ret)
+ return ret;
+
+ ret = devm_pm_opp_set_regulators(dev, regulator_names);
if (ret) {
/* Continue if the optional regulator is missing */
if (ret != -ENODEV)
--
2.17.1

View File

@@ -0,0 +1,197 @@
From 95ad58d671ddc3b20f6de9a90659a12bfed01548 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Sat, 14 Jan 2023 12:25:33 +0000
Subject: [PATCH 12/92] REVERT: mmc: meson-gx: add SDIO interrupt support
This reverts commit 066ecde6d826b443f492570e080cba3f2212280d.
See https://lore.kernel.org/linux-amlogic/52861a84-0fe2-37f0-d66a-145f2ebe1d79@gmail.com/T/#m9c6a0aa6b221bcbf51457e612456c6fff5eeacfa
---
drivers/mmc/host/meson-gx-mmc.c | 70 +++++----------------------------
1 file changed, 10 insertions(+), 60 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 6e5ea0213b47..a8258ea5364c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -41,17 +41,14 @@
#define CLK_V2_TX_DELAY_MASK GENMASK(19, 16)
#define CLK_V2_RX_DELAY_MASK GENMASK(23, 20)
#define CLK_V2_ALWAYS_ON BIT(24)
-#define CLK_V2_IRQ_SDIO_SLEEP BIT(25)
#define CLK_V3_TX_DELAY_MASK GENMASK(21, 16)
#define CLK_V3_RX_DELAY_MASK GENMASK(27, 22)
#define CLK_V3_ALWAYS_ON BIT(28)
-#define CLK_V3_IRQ_SDIO_SLEEP BIT(29)
#define CLK_TX_DELAY_MASK(h) (h->data->tx_delay_mask)
#define CLK_RX_DELAY_MASK(h) (h->data->rx_delay_mask)
#define CLK_ALWAYS_ON(h) (h->data->always_on)
-#define CLK_IRQ_SDIO_SLEEP(h) (h->data->irq_sdio_sleep)
#define SD_EMMC_DELAY 0x4
#define SD_EMMC_ADJUST 0x8
@@ -138,7 +135,6 @@ struct meson_mmc_data {
unsigned int rx_delay_mask;
unsigned int always_on;
unsigned int adjust;
- unsigned int irq_sdio_sleep;
};
struct sd_emmc_desc {
@@ -178,7 +174,6 @@ struct meson_host {
bool vqmmc_enabled;
bool needs_pre_post_req;
- spinlock_t lock;
};
#define CMD_CFG_LENGTH_MASK GENMASK(8, 0)
@@ -435,7 +430,6 @@ static int meson_mmc_clk_init(struct meson_host *host)
clk_reg |= FIELD_PREP(CLK_CORE_PHASE_MASK, CLK_PHASE_180);
clk_reg |= FIELD_PREP(CLK_TX_PHASE_MASK, CLK_PHASE_0);
clk_reg |= FIELD_PREP(CLK_RX_PHASE_MASK, CLK_PHASE_0);
- clk_reg |= CLK_IRQ_SDIO_SLEEP(host);
writel(clk_reg, host->regs + SD_EMMC_CLOCK);
/* get the mux parents */
@@ -934,54 +928,32 @@ static void meson_mmc_read_resp(struct mmc_host *mmc, struct mmc_command *cmd)
}
}
-static void __meson_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
-{
- struct meson_host *host = mmc_priv(mmc);
- u32 reg_irqen = IRQ_EN_MASK;
-
- if (enable)
- reg_irqen |= IRQ_SDIO;
- writel(reg_irqen, host->regs + SD_EMMC_IRQ_EN);
-}
-
static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
{
struct meson_host *host = dev_id;
struct mmc_command *cmd;
+ struct mmc_data *data;
u32 status, raw_status;
irqreturn_t ret = IRQ_NONE;
raw_status = readl(host->regs + SD_EMMC_STATUS);
- status = raw_status & (IRQ_EN_MASK | IRQ_SDIO);
+ status = raw_status & IRQ_EN_MASK;
if (!status) {
dev_dbg(host->dev,
"Unexpected IRQ! irq_en 0x%08lx - status 0x%08x\n",
- IRQ_EN_MASK | IRQ_SDIO, raw_status);
+ IRQ_EN_MASK, raw_status);
return IRQ_NONE;
}
- if (WARN_ON(!host))
+ if (WARN_ON(!host) || WARN_ON(!host->cmd))
return IRQ_NONE;
/* ack all raised interrupts */
writel(status, host->regs + SD_EMMC_STATUS);
cmd = host->cmd;
-
- if (status & IRQ_SDIO) {
- spin_lock(&host->lock);
- __meson_mmc_enable_sdio_irq(host->mmc, 0);
- sdio_signal_irq(host->mmc);
- spin_unlock(&host->lock);
- status &= ~IRQ_SDIO;
- if (!status)
- return IRQ_HANDLED;
- }
-
- if (WARN_ON(!cmd))
- return IRQ_NONE;
-
+ data = cmd->data;
cmd->error = 0;
if (status & IRQ_CRC_ERR) {
dev_dbg(host->dev, "CRC Error - status 0x%08x\n", status);
@@ -999,9 +971,12 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id)
meson_mmc_read_resp(host->mmc, cmd);
- if (status & (IRQ_END_OF_CHAIN | IRQ_RESP_STATUS)) {
- struct mmc_data *data = cmd->data;
+ if (status & IRQ_SDIO) {
+ dev_dbg(host->dev, "IRQ: SDIO TODO.\n");
+ ret = IRQ_HANDLED;
+ }
+ if (status & (IRQ_END_OF_CHAIN | IRQ_RESP_STATUS)) {
if (data && !cmd->error)
data->bytes_xfered = data->blksz * data->blocks;
if (meson_mmc_bounce_buf_read(data) ||
@@ -1144,21 +1119,6 @@ static int meson_mmc_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)
return -EINVAL;
}
-static void meson_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
-{
- struct meson_host *host = mmc_priv(mmc);
- unsigned long flags;
-
- spin_lock_irqsave(&host->lock, flags);
- __meson_mmc_enable_sdio_irq(mmc, enable);
- spin_unlock_irqrestore(&host->lock, flags);
-}
-
-static void meson_mmc_ack_sdio_irq(struct mmc_host *mmc)
-{
- meson_mmc_enable_sdio_irq(mmc, 1);
-}
-
static const struct mmc_host_ops meson_mmc_ops = {
.request = meson_mmc_request,
.set_ios = meson_mmc_set_ios,
@@ -1168,8 +1128,6 @@ static const struct mmc_host_ops meson_mmc_ops = {
.execute_tuning = meson_mmc_resampling_tuning,
.card_busy = meson_mmc_card_busy,
.start_signal_voltage_switch = meson_mmc_voltage_switch,
- .enable_sdio_irq = meson_mmc_enable_sdio_irq,
- .ack_sdio_irq = meson_mmc_ack_sdio_irq,
};
static int meson_mmc_probe(struct platform_device *pdev)
@@ -1275,13 +1233,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
if (ret)
goto err_init_clk;
- spin_lock_init(&host->lock);
-
mmc->caps |= MMC_CAP_CMD23;
-
- if (mmc->caps & MMC_CAP_SDIO_IRQ)
- mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
-
if (host->dram_access_quirk) {
/* Limit segments to 1 due to low available sram memory */
mmc->max_segs = 1;
@@ -1374,7 +1326,6 @@ static const struct meson_mmc_data meson_gx_data = {
.rx_delay_mask = CLK_V2_RX_DELAY_MASK,
.always_on = CLK_V2_ALWAYS_ON,
.adjust = SD_EMMC_ADJUST,
- .irq_sdio_sleep = CLK_V2_IRQ_SDIO_SLEEP,
};
static const struct meson_mmc_data meson_axg_data = {
@@ -1382,7 +1333,6 @@ static const struct meson_mmc_data meson_axg_data = {
.rx_delay_mask = CLK_V3_RX_DELAY_MASK,
.always_on = CLK_V3_ALWAYS_ON,
.adjust = SD_EMMC_V3_ADJUST,
- .irq_sdio_sleep = CLK_V3_IRQ_SDIO_SLEEP,
};
static const struct of_device_id meson_mmc_of_match[] = {
--
2.34.1

View File

@@ -1,30 +0,0 @@
From f159c2cb2327d34823fb0731da4f3e7438fad3a9 Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Wed, 6 Jul 2022 09:58:31 +0000
Subject: [PATCH 13/73] FROMGIT(6.1): dt-bindings: arm: amlogic: add Beelink
GT1 Ultimate binding
Add the board binding for the Shenzen AZW (Beelink) GT1 Ultimate
Android Set-Top Box device.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
index 61a6cabb375b..3217c069673e 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
@@ -120,6 +120,7 @@ properties:
- enum:
- amlogic,q200
- amlogic,q201
+ - azw,gt1-ultimate
- khadas,vim2
- kingnovel,r-box-pro
- libretech,aml-s912-pc
--
2.17.1

View File

@@ -1,7 +1,7 @@
From f1ff5687260210679d811005e7f3fb0ff48a51cc Mon Sep 17 00:00:00 2001
From 9faf586f51d20766a18a6b17bd0ce263c2880ed2 Mon Sep 17 00:00:00 2001
From: David Heidelberg <david@ixit.cz>
Date: Sat, 27 Nov 2021 07:23:35 +0000
Subject: [PATCH 15/73] FROMLIST(v2): arm64: dts: meson: make dts use gpio-fan
Subject: [PATCH 13/92] FROMLIST(v2): arm64: dts: meson: make dts use gpio-fan
matrix instead of array
No functional changes.
@@ -19,7 +19,7 @@ diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/
index 6d396c1be3d6..9b0c7e9d0620 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -54,10 +54,11 @@
@@ -54,10 +54,11 @@ gpio_fan: gpio-fan {
gpios = <&gpio GPIODV_14 GPIO_ACTIVE_HIGH
&gpio GPIODV_15 GPIO_ACTIVE_HIGH>;
/* Dummy RPM values since fan is optional */
@@ -36,5 +36,5 @@ index 6d396c1be3d6..9b0c7e9d0620 100644
};
--
2.17.1
2.34.1

View File

@@ -1,141 +0,0 @@
From 11d8541da45ed52bd6363b8be424289149cb7b7a Mon Sep 17 00:00:00 2001
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Wed, 6 Jul 2022 09:58:31 +0000
Subject: [PATCH 14/73] FROMGIT(6.1): arm64: dts: meson: add support for
Beelink GT1-Ultimate
The Beelink GT1-Ultimate is based on the Amlogic S912 (Q200)
reference design with the following specifications:
- 3GB DDR3 RAM
- 32GB eMMC
- HDMI 2.1 video
- S/PDIF optical output
- 10/100/1000 Ethernet
- AP6356S Wireless (802.11 a/b/g/n, BT 4.2)
- 3x USB 2.0 ports
- IR receiver (internal)
- 1x micro SD card slot
- 1x Power LED (white)
- 1x Reset button (internal)
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../dts/amlogic/meson-gxm-gt1-ultimate.dts | 91 +++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-gt1-ultimate.dts
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 8773211df50e..641399fcbdd9 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1-ultimate.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-minix-neo-u9h.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-gt1-ultimate.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-gt1-ultimate.dts
new file mode 100644
index 000000000000..2c267884cc16
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-gt1-ultimate.dts
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) Christian Hewitt <christianshewitt@gmail.com>
+ */
+
+/dts-v1/;
+
+#include "meson-gxm.dtsi"
+#include "meson-gx-p23x-q20x.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ compatible = "azw,gt1-ultimate", "amlogic,s912", "amlogic,meson-gxm";
+ model = "Beelink GT1 Ultimate";
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-white {
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_POWER;
+ gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ panic-indicator;
+ };
+ };
+
+ adc-keys {
+ compatible = "adc-keys";
+ io-channels = <&saradc 0>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1710000>;
+
+ button-function {
+ label = "update";
+ linux,code = <KEY_VENDOR>;
+ press-threshold-microvolt = <10000>;
+ };
+ };
+};
+
+&ethmac {
+ pinctrl-0 = <&eth_pins>;
+ pinctrl-names = "default";
+ phy-handle = <&external_phy>;
+ amlogic,tx-delay-ns = <2>;
+ phy-mode = "rgmii";
+};
+
+&external_mdio {
+ external_phy: ethernet-phy@0 {
+ /* Realtek RTL8211F (0x001cc916) */
+ reg = <0>;
+ max-speed = <1000>;
+
+ reset-assert-us = <10000>;
+ reset-deassert-us = <80000>;
+ reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+
+ interrupt-parent = <&gpio_intc>;
+ /* MAC_INTR on GPIOZ_15 */
+ interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
+&ir {
+ linux,rc-map-name = "rc-beelink-gs1";
+};
+
+&sd_emmc_a {
+ brcmf: wifi@1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ };
+};
+
+&uart_A {
+ status = "okay";
+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
+ pinctrl-names = "default";
+ uart-has-rtscts;
+
+ bluetooth {
+ compatible = "brcm,bcm43438-bt";
+ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+ max-speed = <2000000>;
+ clocks = <&wifi32k>;
+ clock-names = "lpo";
+ };
+};
--
2.17.1

View File

@@ -1,7 +1,7 @@
From fe266042ccee82d0997fdc437572de68ff9a1a76 Mon Sep 17 00:00:00 2001
From f19c935ec550a795e05b2357b00edfef0bdfa398 Mon Sep 17 00:00:00 2001
From: Sergey Shtylyov <s.shtylyov@omp.ru>
Date: Fri, 24 Dec 2021 06:09:57 +0000
Subject: [PATCH 16/73] FROMLIST(v1): mmc: meson-gx: fix deferred probing
Subject: [PATCH 14/92] FROMLIST(v1): mmc: meson-gx: fix deferred probing
The driver overrides the error codes and IRQ0 returned by platform_get_irq()
to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe
@@ -17,10 +17,10 @@ Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index fc462995cf94..a2aacbffc3bf 100644
index a8258ea5364c..2454d92c4391 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -1185,8 +1185,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
@@ -1183,8 +1183,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
}
host->irq = platform_get_irq(pdev, 0);
@@ -32,5 +32,5 @@ index fc462995cf94..a2aacbffc3bf 100644
}
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From d04e53e0b5cc15aeee4cd078706226ea80d47dee Mon Sep 17 00:00:00 2001
From f135d58914b0d5c93af9f93f9a9908a08fd87531 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Sun, 20 Feb 2022 08:23:12 +0000
Subject: [PATCH 17/73] FROMLIST(v5): dt-bindings: vendor-prefixes: Add Titan
Subject: [PATCH 15/92] FROMLIST(v5): dt-bindings: vendor-prefixes: Add Titan
Micro Electronics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -17,10 +17,10 @@ Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 2f0151e9f6be..7163901e5976 100644
index 6e323a380294..9570cc9e0e06 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1291,6 +1291,8 @@ patternProperties:
@@ -1303,6 +1303,8 @@ patternProperties:
description: Texas Instruments
"^tianma,.*":
description: Tianma Micro-electronics Co., Ltd.
@@ -30,5 +30,5 @@ index 2f0151e9f6be..7163901e5976 100644
description: Trusted Logic Mobility
"^tmt,.*":
--
2.17.1
2.34.1

View File

@@ -1,7 +1,7 @@
From 1bc9224b52be0df338c4e63e122460df0f651d96 Mon Sep 17 00:00:00 2001
From a2b6a10d9cedb6db79a6a5b3efc0f14fd2ac9387 Mon Sep 17 00:00:00 2001
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Sun, 20 Feb 2022 08:24:47 +0000
Subject: [PATCH 18/73] FROMLIST(v5): dt-bindings: auxdisplay: Add Titan Micro
Subject: [PATCH 16/92] FROMLIST(v5): dt-bindings: auxdisplay: Add Titan Micro
Electronics TM1628
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -110,5 +110,5 @@ index 000000000000..d9cbbc950aab
+ };
+...
--
2.17.1
2.34.1

Some files were not shown because too many files have changed in this diff Show More