From 6b5567dedd87b414b40e239a6939a342e82087ef Mon Sep 17 00:00:00 2001 From: Saahil Tomar Date: Wed, 15 Nov 2023 11:07:23 +0530 Subject: [PATCH] arm: dts: Add MI01.12 (RDP479) dts support Add dts support of RDP 479 IPQ5332 + QCN6432 + QCN9224 (2+2+4) PCIe0 QCN6432-6G PCIe1(x2) QCN9224-5G Change-Id: If370919a699f45d8e0b5f41d4214c7e4e2967790 Signed-off-by: Saahil Tomar --- arch/arm/dts/Makefile | 1 + arch/arm/dts/ipq5332-mi01.12.dts | 284 +++++++++++++++++++++++++++++++ board/qca/arm/ipq5332/ipq5332.c | 9 +- 3 files changed, 287 insertions(+), 7 deletions(-) create mode 100644 arch/arm/dts/ipq5332-mi01.12.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index cdbaf88bdc..e43c63c14b 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -99,6 +99,7 @@ dtb-$(CONFIG_ARCH_IPQ5332) += ipq5332-emulation.dtb \ ipq5332-mi01.4.dtb \ ipq5332-mi01.6.dtb \ ipq5332-mi01.9.dtb \ + ipq5332-mi01.12.dtb \ ipq5332-mi03.1.dtb \ ipq5332-mi04.1.dtb \ ipq5332-mi04.3.dtb \ diff --git a/arch/arm/dts/ipq5332-mi01.12.dts b/arch/arm/dts/ipq5332-mi01.12.dts new file mode 100644 index 0000000000..7fb87e287a --- /dev/null +++ b/arch/arm/dts/ipq5332-mi01.12.dts @@ -0,0 +1,284 @@ +/* + * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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 "ipq5332-soc.dtsi" +/ { + machid = <0x8060202>; + config_name = "config@mi01.12", "config@rdp479", "config-rdp479"; + + aliases { + console = "/serial@78AF000"; + nand = "/nand-controller@79B0000"; + mmc = "/sdhci@7804000"; + usb0 = "/xhci@8a00000"; + i2c0 = "/i2c@78B6000"; + pci0 = "/pci@20000000"; + pci1 = "/pci@18000000"; + }; + + serial@78AF000 { + status = "ok"; + serial_gpio { + blsp0_uart_rx { + gpio = <18>; + func = <1>; + pull = ; + drvstr = ; + }; + blsp0_uart_tx { + gpio = <19>; + func = <1>; + pull = ; + drvstr = ; + }; + }; + }; + + spi { + spi_gpio { + blsp0_spi_clk { + gpio = <14>; + func = <1>; + pull = ; + oe = ; + drvstr = ; + }; + blsp0_spi_mosi { + gpio = <15>; + func = <1>; + pull = ; + oe = ; + drvstr = ; + }; + blsp0_spi_miso { + gpio = <16>; + func = <1>; + pull = ; + drvstr = ; + }; + blsp0_spi_cs { + gpio = <17>; + func = <1>; + pull = ; + oe = ; + drvstr = ; + }; + }; + }; + + i2c@78B6000 { + i2c_gpio { + gpio1 { + gpio = <29>; + func = <3>; + pull = ; + drvstr = ; + oe = ; + }; + + gpio2 { + gpio = <30>; + func = <3>; + pull = ; + drvstr = ; + oe = ; + }; + }; + }; + + nand: nand-controller@79B0000 { + nand_gpio { + qspi_dat3 { + gpio = <8>; + func = <2>; + pull = ; + drvstr = ; + }; + qspi_dat2 { + gpio = <9>; + func = <2>; + pull = ; + drvstr = ; + }; + qspi_dat1 { + gpio = <10>; + func = <2>; + pull = ; + drvstr = ; + }; + qspi_dat0 { + gpio = <11>; + func = <2>; + pull = ; + drvstr = ; + }; + qspi_cs_n { + gpio = <12>; + func = <2>; + pull = ; + drvstr = ; + }; + qspi_clk { + gpio = <13>; + func = <2>; + pull = ; + drvstr = ; + }; + }; + }; + + mmc: sdhci@7804000 { + mmc_gpio { + emmc_dat3 { + gpio = <8>; + func = <1>; + pull = ; + drvstr = ; + }; + emmc_dat2 { + gpio = <9>; + func = <1>; + pull = ; + drvstr = ; + }; + emmc_dat1 { + gpio = <10>; + func = <1>; + pull = ; + drvstr = ; + }; + emmc_dat0 { + gpio = <11>; + func = <1>; + pull = ; + drvstr = ; + }; + emmc_cmd{ + gpio = <12>; + func = <1>; + pull = ; + drvstr = ; + }; + emmc_clk{ + gpio = <13>; + func = <1>; + pull = ; + drvstr = ; + }; + }; + }; + + pci0: pci@20000000 { + status = "ok"; + perst_gpio = <38>; + lane = <1>; + pci_gpio { + pci_rst { + gpio = <38>; + pull = ; + oe = ; + drvstr = ; + }; + }; + }; + + pci1: pci@18000000 { + status = "ok"; + perst_gpio = <47>; + lane = <2>; + pci_gpio { + pci_rst { + gpio = <47>; + pull = ; + oe = ; + drvstr = ; + }; + }; + }; + + ess-switch { + switch_mac_mode0 = ; + switch_mac_mode1 = ; + qca808x_gpio = <51>; + qca808x_gpio_cnt = <1>; + qca8084_switch_enable = <1>; + sfp_gpio = <24>; + sfp_gpio_cnt = <1>; + + mdio_gpio { + mdc1 { + gpio = <27>; + func = <1>; + pull = ; + drvstr = ; + }; + mdio { + gpio = <28>; + func = <1>; + pull = ; + drvstr = ; + }; + }; + + port_phyinfo { + port@0 { + phy_address = <1>; + uniphy_id = <0>; + phy_type = ; + uniphy_mode = ; + }; + port@1 { + phy_type = ; + uniphy_id = <1>; + uniphy_mode = ; + }; + }; + + qca8084_swt_info { + switch_mac_mode0 = ; + switch_mac_mode1 = ; + + port@0 { + phy_address = <0xff>; + phy_type = ; + forced-speed = <2500>; + forced-duplex = <1>; + }; + port@1 { + phy_address = <1>; + phy_type = ; + }; + port@2 { + phy_address = <2>; + phy_type = ; + }; + port@3 { + phy_address = <3>; + phy_type = ; + }; + port@4 { + phy_address = <0x4>; + phy_type = ; + }; + port@5 { + phy_address = <0xff>; + phy_type = ; + forced-speed = <2500>; + forced-duplex = <1>; + }; + }; + }; +}; diff --git a/board/qca/arm/ipq5332/ipq5332.c b/board/qca/arm/ipq5332/ipq5332.c index b10036c17d..cfcc75f6d7 100644 --- a/board/qca/arm/ipq5332/ipq5332.c +++ b/board/qca/arm/ipq5332/ipq5332.c @@ -852,9 +852,9 @@ unsigned int get_dts_machid(unsigned int machid) return MACH_TYPE_IPQ5332_AP_MI01_2; case MACH_TYPE_IPQ5332_AP_MI01_3_C2: case MACH_TYPE_IPQ5332_AP_MI01_7: - case MACH_TYPE_IPQ5332_AP_MI01_12: - case MACH_TYPE_IPQ5332_AP_MI01_14: return MACH_TYPE_IPQ5332_AP_MI01_3; + case MACH_TYPE_IPQ5332_AP_MI01_14: + return MACH_TYPE_IPQ5332_AP_MI01_12; case MACH_TYPE_IPQ5332_AP_MI04_1_C2: return MACH_TYPE_IPQ5332_AP_MI04_1; default: @@ -891,11 +891,6 @@ void ipq_uboot_fdt_fixup(void) config_list[config_nos++] = "config-rdp478"; config_list[config_nos++] = "config@1"; break; - case MACH_TYPE_IPQ5332_AP_MI01_12: - config_list[config_nos++] = "config@mi01.12"; - config_list[config_nos++] = "config@rdp479"; - config_list[config_nos++] = "config-rdp479"; - break; case MACH_TYPE_IPQ5332_AP_MI01_14: config_list[config_nos++] = "config@mi01.14"; config_list[config_nos++] = "config@rdp481";