From 58e4e2036b13e05e6c3ce5d290ac3b35e8c500c9 Mon Sep 17 00:00:00 2001 From: Antony Arun T Date: Wed, 3 Apr 2019 11:24:27 +0530 Subject: [PATCH 1/4] dts: ipq6018: configuring spi nor gpio's in emulation Change-Id: I7cf174af173fde5e506dae3388fb3906fcad614b Signed-off-by: Antony Arun T --- arch/arm/dts/ipq6018-emulation.dts | 34 +++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/ipq6018-emulation.dts b/arch/arm/dts/ipq6018-emulation.dts index 6d2f97a2d0..169bc568e4 100644 --- a/arch/arm/dts/ipq6018-emulation.dts +++ b/arch/arm/dts/ipq6018-emulation.dts @@ -67,7 +67,39 @@ wr_pipe_1 = <14>; rd_pipe_1 = <15>; status = "ok"; - spi_gpio {}; + spi_gpio { + gpio1 { + gpio = <38>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio2 { + gpio = <39>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio3 { + gpio = <40>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio4 { + gpio = <41>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + }; spi_nand { bus-num = <1>; cs = <0>; From 3210ceb503da0775a269c3e71a1ff999cf3e8f47 Mon Sep 17 00:00:00 2001 From: Antony Arun T Date: Wed, 3 Apr 2019 11:33:33 +0530 Subject: [PATCH 2/4] dts: ipq6018: Configuring spi nor and nand gpio's in common soc file Change-Id: I6d7dce08765a5ada48362117dec79e5b558807ca Signed-off-by: Antony Arun T --- arch/arm/dts/ipq6018-soc.dtsi | 151 ++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/arch/arm/dts/ipq6018-soc.dtsi b/arch/arm/dts/ipq6018-soc.dtsi index 2ef501b619..3ce72ee99d 100644 --- a/arch/arm/dts/ipq6018-soc.dtsi +++ b/arch/arm/dts/ipq6018-soc.dtsi @@ -65,6 +65,157 @@ reg = <0x7000000 0xcd00>; }; + spi { + status = "ok"; + + compatible = "qcom,spi-qup-v2.7.0"; + wr_pipe_0 = <12>; + rd_pipe_0 = <13>; + spi_gpio { + gpio1 { + gpio = <38>; + func = <3>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio2 { + gpio = <39>; + func = <3>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio3 { + gpio = <40>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio4 { + gpio = <41>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + }; + }; + + nand: nand-controller@79B0000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "qcom,qpic-nand.1.5.20"; + reg = <0x79B0000 0x10000>; + + nand_gpio { + gpio1 { + gpio = <1>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio2 { + gpio = <3>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio3 { + gpio = <4>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio4 { + gpio = <5>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio5 { + gpio = <6>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio6 { + gpio = <7>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio7 { + gpio = <8>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio8 { + gpio = <10>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio9 { + gpio = <11>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio10 { + gpio = <12>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio11 { + gpio = <13>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio12 { + gpio = <14>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio13 { + gpio = <15>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + gpio14 { + gpio = <17>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + + }; + + }; + pci@20000000 { compatible = "qcom,ipq6018-pcie"; #address-cells = <1>; From 57f9843498e5cd6d7583353bac1d33aab78df2c4 Mon Sep 17 00:00:00 2001 From: Antony Arun T Date: Fri, 8 Mar 2019 11:03:18 +0530 Subject: [PATCH 3/4] dts: ipq6018: Enable support for cp01 Change-Id: If849c9b741de0763726831b5818a9e7f5f9815c4 Signed-off-by: Antony Arun T --- arch/arm/dts/Makefile | 2 +- .../dts/{ipq6018-cp01.dts => ipq6018-cp01-c1.dts} | 15 +++++++++------ arch/arm/dts/ipq6018-soc.dtsi | 12 ++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) rename arch/arm/dts/{ipq6018-cp01.dts => ipq6018-cp01-c1.dts} (63%) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 889b882d6c..b6d3748a97 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -61,7 +61,7 @@ dtb-$(CONFIG_ARCH_IPQ40xx) += ipq40xx-dk01-c1.dtb \ ipq40xx-dk01-s1.dtb \ ipq40xx-dk06-c1.dtb -dtb-$(CONFIG_ARCH_IPQ6018) += ipq6018-cp01.dtb \ +dtb-$(CONFIG_ARCH_IPQ6018) += ipq6018-cp01-c1.dtb \ ipq6018-emulation.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += \ diff --git a/arch/arm/dts/ipq6018-cp01.dts b/arch/arm/dts/ipq6018-cp01-c1.dts similarity index 63% rename from arch/arm/dts/ipq6018-cp01.dts rename to arch/arm/dts/ipq6018-cp01-c1.dts index 9e9828bbee..4628b24feb 100644 --- a/arch/arm/dts/ipq6018-cp01.dts +++ b/arch/arm/dts/ipq6018-cp01-c1.dts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2019, 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 @@ -14,12 +14,15 @@ /dts-v1/; #include "ipq6018-soc.dtsi" / { - model ="QCA, IPQ6018-CP01"; - compatible = "qca,ipq6018", "qca,ipq6018-cp01"; - machid = <0x08010001>; + model ="QCA, IPQ6018-CP01-C1"; + compatible = "qca,ipq6018", "qca,ipq6018-cp01-c1"; + machid = <0x8030000>; + config_name = "config@cp01-c1"; aliases { - console = "/serial@78B3000"; + console = "/serial@78B1000"; + pci0 = "/pci@20000000"; + usb0 = "/xhci@8a00000"; + usb1 = "/xhci@7000000"; }; }; - diff --git a/arch/arm/dts/ipq6018-soc.dtsi b/arch/arm/dts/ipq6018-soc.dtsi index 3ce72ee99d..bc49f861a7 100644 --- a/arch/arm/dts/ipq6018-soc.dtsi +++ b/arch/arm/dts/ipq6018-soc.dtsi @@ -16,22 +16,22 @@ / { - serial@78B3000 { + serial@78B1000 { compatible = "qca,ipq-uartdm"; - reg = <0x78B3000 0x200>; + reg = <0x78B1000 0x200>; id = <4>; bit_rate = <0xee>; serial_gpio { gpio1 { - gpio = <23>; - func = <2>; + gpio = <44>; + func = <1>; pull = ; oe = ; }; gpio2 { - gpio = <24>; - func = <2>; + gpio = <45>; + func = <1>; pull = ; oe = ; }; From ae32d441d869a45e625f75ee7ee0a6b8c199e13d Mon Sep 17 00:00:00 2001 From: Antony Arun T Date: Thu, 7 Mar 2019 12:45:30 +0530 Subject: [PATCH 4/4] dts: ipq6018: Add support for CP02-C1 Change-Id: I1114f6afcac39a7dcde9beef675a7ec723d41f8f Signed-off-by: Antony Arun T --- arch/arm/dts/Makefile | 3 ++- arch/arm/dts/ipq6018-cp02-c1.dts | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/ipq6018-cp02-c1.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index b6d3748a97..5be60274b2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -62,7 +62,8 @@ dtb-$(CONFIG_ARCH_IPQ40xx) += ipq40xx-dk01-c1.dtb \ ipq40xx-dk06-c1.dtb dtb-$(CONFIG_ARCH_IPQ6018) += ipq6018-cp01-c1.dtb \ - ipq6018-emulation.dtb + ipq6018-cp02-c1.dtb \ + ipq6018-emulation.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3288-firefly.dtb \ diff --git a/arch/arm/dts/ipq6018-cp02-c1.dts b/arch/arm/dts/ipq6018-cp02-c1.dts new file mode 100644 index 0000000000..017f753bc8 --- /dev/null +++ b/arch/arm/dts/ipq6018-cp02-c1.dts @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2019, 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. + */ + +/dts-v1/; +#include "ipq6018-soc.dtsi" +/ { + model ="QCA, IPQ6018-CP02-c1"; + compatible = "qca,ipq6018", "qca,ipq6018-cp02-c1"; + machid = <0x8030100>; + config_name = "config@cp02-c1"; + + aliases { + console = "/serial@78B1000"; + mmc = "/sdhci@7804000"; + pci0 = "/pci@20000000"; + usb0 = "/xhci@8a00000"; + }; +};