From f2b16c5a1e825f59cadd9c0982adf5b71b7d6c07 Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Mon, 15 Jun 2020 21:08:26 +0530 Subject: [PATCH] ipq807x: Removed identical device-trees AC02 and OAK03 Removed identical device-tree to reuse original dts. Affected boards: AC02 and OAK03 OAK03 to reuse HK01 dts and AC02 to reuse AC01 dts Signed-off-by: Gokul Sriram Palanisamy Change-Id: I5a70514370f394b15e68d5819cf8d1b52da14f3f --- arch/arm/dts/Makefile | 2 -- arch/arm/dts/ipq807x-ac02.dts | 60 ------------------------------- arch/arm/dts/ipq807x-oak03.dts | 38 -------------------- arch/arm/include/asm/mach-types.h | 3 ++ board/qca/arm/ipq807x/ipq807x.c | 9 +++++ 5 files changed, 12 insertions(+), 100 deletions(-) delete mode 100644 arch/arm/dts/ipq807x-ac02.dts delete mode 100644 arch/arm/dts/ipq807x-oak03.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2f50b1afb3..2ea1889680 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -30,11 +30,9 @@ dtb-$(CONFIG_ARCH_IPQ807x) += ipq807x-hk01.dtb \ ipq807x-hk14.dtb \ ipq807x-hk11-c1.dtb \ ipq807x-ac01.dtb \ - ipq807x-ac02.dtb \ ipq807x-ac03.dtb \ ipq807x-ac04.dtb \ ipq807x-oak02.dtb \ - ipq807x-oak03.dtb \ ipq807x-hk01-c2.dtb \ ipq807x-hk01-c4.dtb \ ipq807x-hk01-c5.dtb \ diff --git a/arch/arm/dts/ipq807x-ac02.dts b/arch/arm/dts/ipq807x-ac02.dts deleted file mode 100644 index d9b186c489..0000000000 --- a/arch/arm/dts/ipq807x-ac02.dts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2016 - 2018, 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 "ipq807x-soc.dtsi" -#include -/ { - machid = <0x0801000A>; - config_name = "config@ac02"; - - aliases { - console = "/serial@78B3000"; - uart2 = "/serial@78B0000"; - pci0 = "/pci@20000000"; - }; - ess-switch { - switch_mac_mode = <0x0>; - switch_mac_mode1 = <0x6>; - switch_mac_mode2 = <0x6>; - napa_gpio = <25 44>; - napa_gpio_cnt = <2>; - port_phyinfo { - port@0 { - phy_address = <0>; - phy_type = <1>; - }; - port@1 { - phy_address = <1>; - phy_type = <1>; - }; - port@2 { - phy_address = <2>; - phy_type = <1>; - }; - port@3 { - phy_address = <3>; - phy_type = <1>; - }; - port@4 { - phy_address = <24>; - phy_type = <2>; - }; - port@5 { - phy_address = <28>; - phy_type = <2>; - }; - }; - }; -}; - diff --git a/arch/arm/dts/ipq807x-oak03.dts b/arch/arm/dts/ipq807x-oak03.dts deleted file mode 100644 index b5949729f3..0000000000 --- a/arch/arm/dts/ipq807x-oak03.dts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2016 - 2018, 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 "ipq807x-soc.dtsi" -#include -/ { - machid = <0x0801000D>; - config_name = "config@oak03"; - - aliases { - console = "/serial@78B3000"; - uart2 = "/serial@78B0000"; - i2c0 = "/i2c@78b6000"; - pci0 = "/pci@20000000"; - pci1 = "/pci@10000000"; - mmc = "/sdhci@07824000"; - }; - ess-switch { - switch_mac_mode = <0x0>; - switch_mac_mode1 = <0xFF>; - switch_mac_mode2 = <0x2>; - aquantia_port = <5>; - aquantia_gpio = <44>; - }; - -}; - diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index a6af4b7455..388b77757a 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -1148,6 +1148,9 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_IPQ5018_DB_MP02_1 0X1040003 #define MACH_TYPE_IPQ807x_AP_HK01_C1 0x8010000 #define MACH_TYPE_IPQ807x_AP_HK01_C3 0x8010200 +#define MACH_TYPE_IPQ807x_AP_AC01 0x8010009 +#define MACH_TYPE_IPQ807x_AP_AC02 0x801000A +#define MACH_TYPE_IPQ807x_AP_OAK03 0x801000D #ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type diff --git a/board/qca/arm/ipq807x/ipq807x.c b/board/qca/arm/ipq807x/ipq807x.c index 3b67a6a2ed..eb776d35af 100644 --- a/board/qca/arm/ipq807x/ipq807x.c +++ b/board/qca/arm/ipq807x/ipq807x.c @@ -1267,7 +1267,10 @@ unsigned int get_dts_machid(unsigned int machid) switch (machid) { case MACH_TYPE_IPQ807x_AP_HK01_C3: + case MACH_TYPE_IPQ807x_AP_OAK03: return MACH_TYPE_IPQ807x_AP_HK01_C1; + case MACH_TYPE_IPQ807x_AP_AC02: + return MACH_TYPE_IPQ807x_AP_AC01; default: return machid; } @@ -1283,6 +1286,12 @@ void ipq_uboot_fdt_fixup(void) case MACH_TYPE_IPQ807x_AP_HK01_C3: config = "config@hk01.c3"; break; + case MACH_TYPE_IPQ807x_AP_AC02: + config = "config@ac02"; + break; + case MACH_TYPE_IPQ807x_AP_OAK03: + config = "config@oak03"; + break; } if (config != NULL)