diff options
author | Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> | 2021-02-06 17:42:37 +0200 |
---|---|---|
committer | Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> | 2021-02-06 17:42:37 +0200 |
commit | 7c0599b8bcfac7f63b59cc607b9bf8e967a608a0 (patch) | |
tree | 3a6bf0d7f15e9d3b5224871677e4466f80f7b606 | |
parent | 37cf2eb3598fd2fdced4f0f9723b6a7ccaef33e2 (diff) | |
download | meta-multitech-atmel-7c0599b8bcfac7f63b59cc607b9bf8e967a608a0.tar.gz meta-multitech-atmel-7c0599b8bcfac7f63b59cc607b9bf8e967a608a0.tar.bz2 meta-multitech-atmel-7c0599b8bcfac7f63b59cc607b9bf8e967a608a0.zip |
linux-5.4: apply mtr mmc/wl1271 fixes.
4 files changed, 75 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-fix-atmel-mci-reg-overloading.patch b/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-fix-atmel-mci-reg-overloading.patch new file mode 100644 index 0000000..5c2ad5c --- /dev/null +++ b/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-fix-atmel-mci-reg-overloading.patch @@ -0,0 +1,31 @@ +From 7b8c093062598df773858f956b1145a8df84434f Mon Sep 17 00:00:00 2001 +From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> +Date: Fri, 5 Feb 2021 19:20:29 +0200 +Subject: [PATCH] linux-5.4: fix-atmel-mci-reg-overloading + +--- + drivers/mmc/host/atmel-mci.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c +index a750b0c..284057a 100644 +--- a/drivers/mmc/host/atmel-mci.c ++++ b/drivers/mmc/host/atmel-mci.c +@@ -617,8 +617,12 @@ static void atmci_init_debugfs(struct atmel_mci_slot *slot) + return ERR_PTR(-ENOMEM); + + for_each_child_of_node(np, cnp) { +- if (of_property_read_u32(cnp, "reg", &slot_id)) { +- dev_warn(&pdev->dev, "reg property is missing for %pOF\n", ++ /* Multi-Tech patch here. The original driver went through each child ++ device, and interprets 'reg' as slot ID. All other devices treat 'reg' ++ as function. We correct the driver here to take a 'slot-id' parameter ++ from OF for slot. MN */ ++ if (of_property_read_u32(cnp, "slot-id", &slot_id)) { ++ dev_warn(&pdev->dev, "slot-id property is missing for %s\n", + cnp); + continue; + } +-- +1.9.1 + diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch b/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch new file mode 100644 index 0000000..b3fc9be --- /dev/null +++ b/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch @@ -0,0 +1,40 @@ +From d9008c90d39d9993cca2094d31f096067dde16f8 Mon Sep 17 00:00:00 2001 +From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> +Date: Fri, 5 Feb 2021 19:31:47 +0200 +Subject: [PATCH] linux-5.4: wl12xx_enable_disable + +--- + drivers/net/wireless/ti/wlcore/sdio.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c +index 7afaf35..39f9ff5 100644 +--- a/drivers/net/wireless/ti/wlcore/sdio.c ++++ b/drivers/net/wireless/ti/wlcore/sdio.c +@@ -140,6 +140,12 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue) + struct sdio_func *func = dev_to_sdio_func(glue->dev); + struct mmc_card *card = func->card; + ++ /* Multi-Tech MTR patch: Assert WL_EN (PA27) to enable Wi-Fi */ ++ gpio_set_value(27, 0); ++ msleep(10); ++ gpio_set_value(27, 1); ++ msleep(100); ++ + ret = pm_runtime_get_sync(&card->dev); + if (ret < 0) { + pm_runtime_put_noidle(&card->dev); +@@ -171,6 +177,10 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue) + sdio_disable_func(func); + sdio_release_host(func); + ++ /* Multi-Tech MTR patch: De-assert WL_EN (PA27) to disable Wi-Fi */ ++ gpio_set_value(27, 0); ++ msleep(10); ++ + /* Let runtime PM know the card is powered off */ + pm_runtime_put(&card->dev); + return 0; +-- +1.9.1 + diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtr.dts b/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtr.dts index bc6ff93..4e19be2 100644 --- a/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtr.dts +++ b/recipes-kernel/linux/linux-at91-5.4.81/mts-dts/mtr.dts @@ -839,6 +839,8 @@ &pinctrl_mmc0_slot0_dat1_3>; status = "okay"; + always_present; + cd-permanent; slot@0 { compatible = "ti,wl1271"; reg = <2>; /* Card function */ @@ -850,7 +852,6 @@ ref-clock-frequency = <38400000>; /* 2 = 38.4MHz */ platform-quirks = <0x1>; /* 1 = Edge IRQ */ slot-id = <0>; /* Atmel MCI driver fix */ - cd-gpios = <&pioA 1 GPIO_ACTIVE_HIGH>; }; }; diff --git a/recipes-kernel/linux/linux-at91_5.4.81.bb b/recipes-kernel/linux/linux-at91_5.4.81.bb index 4bdf729..acb0272 100644 --- a/recipes-kernel/linux/linux-at91_5.4.81.bb +++ b/recipes-kernel/linux/linux-at91_5.4.81.bb @@ -58,6 +58,8 @@ SRC_URI_append_mtcap = "\ " SRC_URI_append_mtr = "\ ${COMMON_PATCHES} \ + file://linux-5.4-fix-atmel-mci-reg-overloading.patch \ + file://linux-5.4-wl12xx_enable_disable.patch \ " python __anonymous () { |