From 69ac27a0cf16278023058716832647b4d84b7a65 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Sat, 16 Nov 2019 01:34:31 -0800 Subject: [PATCH] ipq40xx: Add IPQ4019 SD/MMC controller support --- target/linux/ipq40xx/config-4.14 | 8 ++++ .../400-sdhci-msm-fix-clock.patch | 11 +++++ .../853-add-sdhci-msm-node-to-dts.patch | 41 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 target/linux/ipq40xx/patches-4.14/400-sdhci-msm-fix-clock.patch create mode 100644 target/linux/ipq40xx/patches-4.14/853-add-sdhci-msm-node-to-dts.patch diff --git a/target/linux/ipq40xx/config-4.14 b/target/linux/ipq40xx/config-4.14 index c72e69320..c2a95ac79 100644 --- a/target/linux/ipq40xx/config-4.14 +++ b/target/linux/ipq40xx/config-4.14 @@ -284,6 +284,14 @@ CONFIG_MFD_SYSCON=y CONFIG_MIGHT_HAVE_CACHE_L2X0=y CONFIG_MIGHT_HAVE_PCI=y CONFIG_MIGRATION=y +CONFIG_MMC=y +CONFIG_MMC_BLOCK=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_MSM=y +# CONFIG_MMC_SDHCI_PCI is not set +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_TIFM_SD is not set CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MSM_GCC_8660 is not set # CONFIG_MSM_GCC_8916 is not set diff --git a/target/linux/ipq40xx/patches-4.14/400-sdhci-msm-fix-clock.patch b/target/linux/ipq40xx/patches-4.14/400-sdhci-msm-fix-clock.patch new file mode 100644 index 000000000..e2b4bcfc0 --- /dev/null +++ b/target/linux/ipq40xx/patches-4.14/400-sdhci-msm-fix-clock.patch @@ -0,0 +1,11 @@ +--- a/drivers/mmc/host/sdhci-msm.c ++++ b/drivers/mmc/host/sdhci-msm.c +@@ -1681,7 +1681,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat + + static const struct sdhci_ops sdhci_msm_ops = { + .reset = sdhci_reset, +- .set_clock = sdhci_msm_set_clock, ++ .set_clock = sdhci_set_clock, + .get_min_clock = sdhci_msm_get_min_clock, + .get_max_clock = sdhci_msm_get_max_clock, + .set_bus_width = sdhci_set_bus_width, diff --git a/target/linux/ipq40xx/patches-4.14/853-add-sdhci-msm-node-to-dts.patch b/target/linux/ipq40xx/patches-4.14/853-add-sdhci-msm-node-to-dts.patch new file mode 100644 index 000000000..4450d4850 --- /dev/null +++ b/target/linux/ipq40xx/patches-4.14/853-add-sdhci-msm-node-to-dts.patch @@ -0,0 +1,41 @@ +Subject: [PATCH] ARM: dts: qcom: ipq4019: Add SDHCI controller node +Date: Thu, 15 Aug 2019 19:28:23 +0200 +Message-Id: <20190815172823.12028-1-robimarko@gmail.com> +X-Mailer: git-send-email 2.21.0 +MIME-Version: 1.0 +Sender: linux-arm-msm-owner@vger.kernel.org +Precedence: bulk +List-ID: +X-Mailing-List: linux-arm-msm@vger.kernel.org +X-Virus-Scanned: ClamAV using ClamSMTP + +IPQ4019 has a built in SD/eMMC controller which is supported by the +SDHCI MSM driver, by the "qcom,sdhci-msm-v4" binding. +So lets add the appropriate node for it. + +Signed-off-by: Robert Marko +--- + arch/arm/boot/dts/qcom-ipq4019.dtsi | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi ++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi +@@ -226,6 +226,18 @@ + status = "disabled"; + }; + ++ sdhci: sdhci@7824900 { ++ compatible = "qcom,sdhci-msm-v4"; ++ reg = <0x7824900 0x11c>, <0x7824000 0x800>; ++ interrupts = , ; ++ interrupt-names = "hc_irq", "pwr_irq"; ++ bus-width = <8>; ++ clocks = <&gcc GCC_SDCC1_APPS_CLK>, <&gcc GCC_SDCC1_AHB_CLK>, ++ <&gcc GCC_DCD_XO_CLK>; ++ clock-names = "core", "iface", "xo"; ++ status = "disabled"; ++ }; ++ + blsp_dma: dma@7884000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0x07884000 0x23000>;