diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 98316bb36b..d3fbaddd41 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -67,10 +67,14 @@ ifneq ($(CONFIG_IPQ_TINY),y) dtb-$(CONFIG_ARCH_IPQ5018) += ipq5018-emulation.dtb \ ipq5018-mp02.1.dtb \ ipq5018-mp03.1.dtb \ + ipq5018-mp03.1-c2.dtb \ ipq5018-mp03.3.dtb \ + ipq5018-mp03.3-c2.dtb \ ipq5018-db-mp02.1.dtb \ ipq5018-db-mp03.1.dtb \ - ipq5018-db-mp03.3.dtb + ipq5018-db-mp03.1-c2.dtb \ + ipq5018-db-mp03.3.dtb \ + ipq5018-db-mp03.3-c2.dtb else dtb-$(CONFIG_ARCH_IPQ5018) += ipq5018-emulation.dtb endif diff --git a/arch/arm/dts/ipq5018-db-mp03.1-c2.dts b/arch/arm/dts/ipq5018-db-mp03.1-c2.dts new file mode 100644 index 0000000000..51508dd340 --- /dev/null +++ b/arch/arm/dts/ipq5018-db-mp03.1-c2.dts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "ipq5018-db-mp03.1.dts" +/ { + model ="QCA, IPQ5018/DB-MP03.1-C2"; + compatible = "qca,ipq5018", "qca,ipq5018-db-mp03.1-c2"; + machid = <0x1040104>; + config_name = "config@db-mp03.1-c2"; + + mmc: sdhci@7804000 { + compatible = "qcom,sdhci-msm"; + status = "ok"; + mmc_gpio { + emmc_dat3 { + gpio = <4>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat2 { + gpio = <5>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat1 { + gpio = <6>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat0 { + gpio = <7>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_cmd{ + gpio = <8>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_clk{ + gpio = <9>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + }; + }; + + nand: nand-controller@79B0000 { + status = "disabled"; + }; +}; diff --git a/arch/arm/dts/ipq5018-db-mp03.3-c2.dts b/arch/arm/dts/ipq5018-db-mp03.3-c2.dts new file mode 100644 index 0000000000..c23034b66d --- /dev/null +++ b/arch/arm/dts/ipq5018-db-mp03.3-c2.dts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "ipq5018-db-mp03.3.dts" +/ { + model ="QCA, IPQ5018/DB-MP03.3-C2"; + compatible = "qca,ipq5018", "qca,ipq5018-db-mp03.3-c2"; + machid = <0x1040105>; + config_name = "config@db-mp03.3-c2"; + + mmc: sdhci@7804000 { + compatible = "qcom,sdhci-msm"; + status = "ok"; + mmc_gpio { + emmc_dat3 { + gpio = <4>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat2 { + gpio = <5>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat1 { + gpio = <6>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat0 { + gpio = <7>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_cmd{ + gpio = <8>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_clk{ + gpio = <9>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + }; + }; + + nand: nand-controller@79B0000 { + status = "disabled"; + }; +}; diff --git a/arch/arm/dts/ipq5018-mp03.1-c2.dts b/arch/arm/dts/ipq5018-mp03.1-c2.dts new file mode 100644 index 0000000000..9eee2d5869 --- /dev/null +++ b/arch/arm/dts/ipq5018-mp03.1-c2.dts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include "ipq5018-mp03.1.dts" +/ { + model ="QCA, IPQ5018-MP03.1-C2"; + compatible = "qca,ipq5018", "qca,ipq5018-mp03.1-c2"; + machid = <0x8040101>; + config_name = "config@mp03.1-c2"; + + mmc: sdhci@7804000 { + compatible = "qcom,sdhci-msm"; + status = "ok"; + mmc_gpio { + emmc_dat3 { + gpio = <4>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat2 { + gpio = <5>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat1 { + gpio = <6>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat0 { + gpio = <7>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_cmd{ + gpio = <8>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_clk{ + gpio = <9>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + }; + }; + + nand: nand-controller@79B0000 { + status = "disabled"; + }; +}; diff --git a/arch/arm/dts/ipq5018-mp03.3-c2.dts b/arch/arm/dts/ipq5018-mp03.3-c2.dts new file mode 100644 index 0000000000..7a03eaa405 --- /dev/null +++ b/arch/arm/dts/ipq5018-mp03.3-c2.dts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#include "ipq5018-mp03.3.dts" +/ { + model ="QCA, IPQ5018-MP03.3-C2"; + compatible = "qca,ipq5018", "qca,ipq5018-mp03.3-c2"; + machid = <0x8040102>; + config_name = "config@mp03.3-c2"; + + mmc: sdhci@7804000 { + compatible = "qcom,sdhci-msm"; + status = "ok"; + mmc_gpio { + emmc_dat3 { + gpio = <4>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat2 { + gpio = <5>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat1 { + gpio = <6>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_dat0 { + gpio = <7>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_cmd{ + gpio = <8>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + emmc_clk{ + gpio = <9>; + func = <1>; + pull = ; + od_en = ; + drvstr = ; + }; + }; + }; + + nand: nand-controller@79B0000 { + status = "disabled"; + }; +}; diff --git a/board/qca/arm/ipq5018/ipq5018.c b/board/qca/arm/ipq5018/ipq5018.c index 75b9a02f98..bc096f2d27 100644 --- a/board/qca/arm/ipq5018/ipq5018.c +++ b/board/qca/arm/ipq5018/ipq5018.c @@ -306,7 +306,7 @@ void emmc_clock_reset(void) int board_mmc_init(bd_t *bis) { - int node; + int node, gpio_node; int ret = 0; qca_smem_flash_info_t *sfi = &qca_smem_flash_info; @@ -316,6 +316,9 @@ int board_mmc_init(bd_t *bis) return -1; } + gpio_node = fdt_subnode_offset(gd->fdt_blob, node, "mmc_gpio"); + qca_gpio_init(gpio_node); + mmc_host.ioaddr = (void *)MSM_SDC1_SDHCI_BASE; mmc_host.voltages = MMC_VDD_165_195; mmc_host.version = SDHCI_SPEC_300;