From 2d972b6ac972b3d3c2e4336325745568c79a5dd3 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 28 Mar 2018 18:00:53 -0300 Subject: MIPS: dts: jz4780: Add DMA controller node to the devicetree Add the devicetree node to support the DMA controller found in JZ480 SoCs. Tested-by: Mathieu Malaterre Acked-by: James Hogan Signed-off-by: Ezequiel Garcia Signed-off-by: Ulf Hansson --- arch/mips/boot/dts/ingenic/jz4780.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch') diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi index 9b5794667aee..15a9801430bd 100644 --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include +#include / { #address-cells = <1>; @@ -241,6 +242,17 @@ status = "disabled"; }; + dma: dma@13420000 { + compatible = "ingenic,jz4780-dma"; + reg = <0x13420000 0x10000>; + #dma-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <10>; + + clocks = <&cgu JZ4780_CLK_PDMA>; + }; + bch: bch@134d0000 { compatible = "ingenic,jz4780-bch"; reg = <0x134d0000 0x10000>; -- cgit v1.2.3-59-g8ed1b From 7f5a07f4c2d22cf9a07a1a959cd5561795c8d527 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 28 Mar 2018 18:00:54 -0300 Subject: MIPS: dts: jz4780: Add MMC controller node to the devicetree Add the devicetree node to support the MMC host controller available in JZ480 SoCs. Acked-by: James Hogan Tested-by: Mathieu Malaterre Signed-off-by: Ezequiel Garcia Signed-off-by: Ulf Hansson --- arch/mips/boot/dts/ingenic/jz4780.dtsi | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'arch') diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi index 15a9801430bd..b72e53bb7292 100644 --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi @@ -253,6 +253,46 @@ clocks = <&cgu JZ4780_CLK_PDMA>; }; + mmc0: mmc@13450000 { + compatible = "ingenic,jz4780-mmc"; + reg = <0x13450000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <37>; + + clocks = <&cgu JZ4780_CLK_MSC0>; + clock-names = "mmc"; + + cap-sd-highspeed; + cap-mmc-highspeed; + cap-sdio-irq; + dmas = <&dma JZ4780_DMA_MSC0_RX 0xffffffff>, + <&dma JZ4780_DMA_MSC0_TX 0xffffffff>; + dma-names = "rx", "tx"; + + status = "disabled"; + }; + + mmc1: mmc@13460000 { + compatible = "ingenic,jz4780-mmc"; + reg = <0x13460000 0x1000>; + + interrupt-parent = <&intc>; + interrupts = <36>; + + clocks = <&cgu JZ4780_CLK_MSC1>; + clock-names = "mmc"; + + cap-sd-highspeed; + cap-mmc-highspeed; + cap-sdio-irq; + dmas = <&dma JZ4780_DMA_MSC1_RX 0xffffffff>, + <&dma JZ4780_DMA_MSC1_TX 0xffffffff>; + dma-names = "rx", "tx"; + + status = "disabled"; + }; + bch: bch@134d0000 { compatible = "ingenic,jz4780-bch"; reg = <0x134d0000 0x10000>; -- cgit v1.2.3-59-g8ed1b From 671963bbb3a72211960662e9ac274c1fb9e08234 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 28 Mar 2018 18:00:55 -0300 Subject: MIPS: dts: ci20: Enable MMC in the devicetree Now that we have support for JZ480 SoCs in the MMC driver, let's enable it on the devicetree. Acked-by: James Hogan Tested-by: Mathieu Malaterre Signed-off-by: Ezequiel Garcia Signed-off-by: Ulf Hansson --- arch/mips/boot/dts/ingenic/ci20.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'arch') diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts index 38078594cf97..50cff3cbcc6d 100644 --- a/arch/mips/boot/dts/ingenic/ci20.dts +++ b/arch/mips/boot/dts/ingenic/ci20.dts @@ -36,6 +36,28 @@ clock-frequency = <48000000>; }; +&mmc0 { + status = "okay"; + + bus-width = <4>; + max-frequency = <50000000>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_mmc0>; + + cd-gpios = <&gpf 20 GPIO_ACTIVE_LOW>; +}; + +&mmc1 { + status = "okay"; + + bus-width = <4>; + max-frequency = <50000000>; + + pinctrl-names = "default"; + pinctrl-0 = <&pins_mmc1>; +}; + &uart0 { status = "okay"; @@ -203,4 +225,16 @@ groups = "nemc-cs6"; bias-disable; }; + + pins_mmc0: mmc0 { + function = "mmc0"; + groups = "mmc0-1bit-e", "mmc0-4bit-e"; + bias-disable; + }; + + pins_mmc1: mmc1 { + function = "mmc1"; + groups = "mmc1-1bit-d", "mmc1-4bit-d"; + bias-disable; + }; }; -- cgit v1.2.3-59-g8ed1b From aabaeb3f30f9561ed938be0b4e9da02a03576fc3 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 28 Mar 2018 18:00:56 -0300 Subject: MIPS: configs: ci20: Enable DMA and MMC support Enable the SD/MMC support, along with DMA engine support in the CI20 defconfig. Acked-by: James Hogan Tested-by: Mathieu Malaterre Signed-off-by: Ezequiel Garcia Signed-off-by: Ulf Hansson --- arch/mips/configs/ci20_defconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig index b5f4ad8f2c45..f88b05fd3077 100644 --- a/arch/mips/configs/ci20_defconfig +++ b/arch/mips/configs/ci20_defconfig @@ -104,8 +104,11 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y # CONFIG_HID is not set # CONFIG_USB_SUPPORT is not set CONFIG_MMC=y +CONFIG_MMC_JZ4740=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_JZ4740=y +CONFIG_DMADEVICES=y +CONFIG_DMA_JZ4780=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_MEMORY=y # CONFIG_DNOTIFY is not set -- cgit v1.2.3-59-g8ed1b From c63cde7d6a313a0203733fe31a76dab4e56d61d3 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 28 Mar 2018 18:00:57 -0300 Subject: MIPS: configs: ci20: Enable ext4 Now that we have MMC support, enable ext2/3/4 support in the CI20 defconfig. Signed-off-by: Ezequiel Garcia Acked-by: James Hogan Signed-off-by: Ulf Hansson --- arch/mips/configs/ci20_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig index f88b05fd3077..be23fd25eeaa 100644 --- a/arch/mips/configs/ci20_defconfig +++ b/arch/mips/configs/ci20_defconfig @@ -111,6 +111,7 @@ CONFIG_DMADEVICES=y CONFIG_DMA_JZ4780=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_MEMORY=y +CONFIG_EXT4_FS=y # CONFIG_DNOTIFY is not set CONFIG_PROC_KCORE=y # CONFIG_PROC_PAGE_MONITOR is not set -- cgit v1.2.3-59-g8ed1b