From f5c7ca631b7e05cb852188f2e42caba8a2b6e9e4 Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Mon, 3 Oct 2016 20:46:07 +0530 Subject: [PATCH] ipq806x: Enables bootipq support This gerrit adds missing configs and config_name device tree entry to enable bootipq support for AP148. Change-Id: If1fb4aa1a3d7d7091b31f882a24f775ced6df52f Signed-off-by: Gokul Sriram Palanisamy --- arch/arm/dts/ipq806x-ap148.dts | 149 +---------------------------- arch/arm/dts/ipq806x-ap160.dts | 25 +++++ arch/arm/dts/ipq806x-ap160_2xx.dts | 25 +++++ arch/arm/dts/ipq806x-ap161.dts | 25 +++++ arch/arm/dts/ipq806x-soc.dtsi | 147 ++++++++++++++++++++++++++++ include/configs/ipq806x.h | 4 + 6 files changed, 228 insertions(+), 147 deletions(-) create mode 100644 arch/arm/dts/ipq806x-ap160.dts create mode 100644 arch/arm/dts/ipq806x-ap160_2xx.dts create mode 100644 arch/arm/dts/ipq806x-ap161.dts diff --git a/arch/arm/dts/ipq806x-ap148.dts b/arch/arm/dts/ipq806x-ap148.dts index fa8bbb9d30..df35484e08 100644 --- a/arch/arm/dts/ipq806x-ap148.dts +++ b/arch/arm/dts/ipq806x-ap148.dts @@ -17,154 +17,9 @@ model ="QCA, IPQ806x-AP148"; compatible = "qca,ipq806x", "qca,ipq806x-ap148"; machid = <4704>; + config_name = "config@ap148"; + aliases { console = "/serial@16340000"; }; - - gmac { - gmac_gpio { - gpio0 { - gpio = <0>; - func = <1>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio1 { - gpio = <1>; - func = <1>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio51 { - gpio = <51>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio52 { - gpio = <52>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio59 { - gpio = <59>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio60 { - gpio = <60>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio61 { - gpio = <61>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio62 { - gpio = <62>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio27 { - gpio = <27>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio28 { - gpio = <28>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio29 { - gpio = <29>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio30 { - gpio = <30>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio31 { - gpio = <31>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - - gpio32 { - gpio = <32>; - func = <2>; - pull = ; - drvstr = ; - oe = ; - }; - }; - - gmac_cfg { - gmac_count = <2>; - - gmac1_cfg { - base = <0x37200000>; - unit = <1>; - is_macsec = <1>; - mac_pwr0 = <0x00080000>; - mac_pwr1 = <0x00040000>; - mac_conn_to_phy = <0>; - phy_interface_type = <7>; - phy_address_count = <1>; - phy_address = <4>; - phy_name = "IPQ MDIO1"; - }; - - gmac2_cfg { - base = <0x37400000>; - unit = <2>; - is_macsec = <1>; - mac_pwr0 = <0x00080000>; - mac_pwr1 = <0x00040000>; - mac_conn_to_phy = <0>; - phy_interface_type = <2>; - phy_address_count = <4>; - phy_address = <0 1 2 3>; - phy_name = "IPQ MDIO2"; - }; - }; - - }; }; diff --git a/arch/arm/dts/ipq806x-ap160.dts b/arch/arm/dts/ipq806x-ap160.dts new file mode 100644 index 0000000000..2f29379ad9 --- /dev/null +++ b/arch/arm/dts/ipq806x-ap160.dts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016, 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 "ipq806x-soc.dtsi" +/ { + model ="QCA, IPQ806x-AP160"; + compatible = "qca,ipq806x", "qca,ipq806x-ap160"; + machid = <4971>; + config_name = "config@ap160"; + + aliases { + console = "/serial@16340000"; + }; +}; diff --git a/arch/arm/dts/ipq806x-ap160_2xx.dts b/arch/arm/dts/ipq806x-ap160_2xx.dts new file mode 100644 index 0000000000..583eec873e --- /dev/null +++ b/arch/arm/dts/ipq806x-ap160_2xx.dts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016, 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 "ipq806x-soc.dtsi" +/ { + model ="QCA, IPQ806x-AP160_2XX"; + compatible = "qca,ipq806x", "qca,ipq806x-ap160_2XX"; + machid = <4991>; + config_name = "config@ap160_2xx"; + + aliases { + console = "/serial@16340000"; + }; +}; diff --git a/arch/arm/dts/ipq806x-ap161.dts b/arch/arm/dts/ipq806x-ap161.dts new file mode 100644 index 0000000000..ab153c401d --- /dev/null +++ b/arch/arm/dts/ipq806x-ap161.dts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2016, 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 "ipq806x-soc.dtsi" +/ { + model ="QCA, IPQ806x-AP161"; + compatible = "qca,ipq806x", "qca,ipq806x-ap161"; + machid = <4972>; + config_name = "config@ap161"; + + aliases { + console = "/serial@16340000"; + }; +}; diff --git a/arch/arm/dts/ipq806x-soc.dtsi b/arch/arm/dts/ipq806x-soc.dtsi index 614fbc8cbd..9514f9f0d1 100644 --- a/arch/arm/dts/ipq806x-soc.dtsi +++ b/arch/arm/dts/ipq806x-soc.dtsi @@ -15,6 +15,7 @@ #include / { + config_name = "config@1"; serial@16340000 { compatible = "qca,ipq-uartdm"; @@ -57,5 +58,151 @@ timer_load_val = <0x00000000 0xFFFFFFFF>; }; + gmac { + gmac_gpio { + gpio0 { + gpio = <0>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio1 { + gpio = <1>; + func = <1>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio51 { + gpio = <51>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio52 { + gpio = <52>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio59 { + gpio = <59>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio60 { + gpio = <60>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio61 { + gpio = <61>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio62 { + gpio = <62>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio27 { + gpio = <27>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio28 { + gpio = <28>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio29 { + gpio = <29>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio30 { + gpio = <30>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio31 { + gpio = <31>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio32 { + gpio = <32>; + func = <2>; + pull = ; + drvstr = ; + oe = ; + }; + }; + + gmac_cfg { + gmac_count = <2>; + + gmac1_cfg { + base = <0x37200000>; + unit = <1>; + is_macsec = <1>; + mac_pwr0 = <0x00080000>; + mac_pwr1 = <0x00040000>; + mac_conn_to_phy = <0>; + phy_interface_type = <7>; + phy_address_count = <1>; + phy_address = <4>; + phy_name = "IPQ MDIO1"; + }; + + gmac2_cfg { + base = <0x37400000>; + unit = <2>; + is_macsec = <1>; + mac_pwr0 = <0x00080000>; + mac_pwr1 = <0x00040000>; + mac_conn_to_phy = <0>; + phy_interface_type = <2>; + phy_address_count = <4>; + phy_address = <0 1 2 3>; + phy_name = "IPQ MDIO2"; + }; + }; + + }; }; diff --git a/include/configs/ipq806x.h b/include/configs/ipq806x.h index e9097247ba..e2e011394c 100644 --- a/include/configs/ipq806x.h +++ b/include/configs/ipq806x.h @@ -38,6 +38,10 @@ #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_CACHELINE_SIZE 64 #define CONFIG_IPQ806X_ENV +#define CONFIG_SYS_BOOTM_LEN (64 << 20) +#define CONFIG_IPQ_FDT_HIGH 0xFFFFFFFF +#define CONFIG_BOOTARGS "console=ttyMSM0,115200n8" +#define CONFIG_SYS_HUSH_PARSER #undef CONFIG_IPQ806X_USB #ifdef CONFIG_IPQ806X_USB