From 32f8bbf8cda79873753a2442fa20f3c6e07ef162 Mon Sep 17 00:00:00 2001 From: Stanislav Galabov Date: Tue, 17 May 2016 06:45:25 +0000 Subject: [PATCH] Add proper PCIe init for MT7628/MT7688 SoCs PCIe PHY needs different initialization on MT7628/MT7688 SoCs than it does on MT7620. However, LEDE (and OpenWRT) dts files have the PCIe node for MT7628/MT7688 as compatible with mt7620-pci. We already can handle this properly in our driver, so we just need to add compat strings to fbsd-mt7628an.dtsi and the PCIe driver. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D6395 --- sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi | 1 + sys/mips/mediatek/mtk_pcie.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi b/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi index 04564fc0f46..e64887976cf 100644 --- a/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi +++ b/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi @@ -36,4 +36,5 @@ * different values for the reg property */ reg = <0x10140000 0x10000>; + compatible = "mediatek,mt7628-pci"; }; diff --git a/sys/mips/mediatek/mtk_pcie.c b/sys/mips/mediatek/mtk_pcie.c index d36f6a4d2db..59c1319edf5 100644 --- a/sys/mips/mediatek/mtk_pcie.c +++ b/sys/mips/mediatek/mtk_pcie.c @@ -203,6 +203,7 @@ mtk_pci_ranges(phandle_t node, struct mtk_pci_range *io_space, static struct ofw_compat_data compat_data[] = { { "ralink,rt3883-pci", MTK_SOC_RT3883 }, { "mediatek,mt7620-pci", MTK_SOC_MT7620A }, + { "mediatek,mt7628-pci", MTK_SOC_MT7628 }, { "mediatek,mt7621-pci", MTK_SOC_MT7621 }, { NULL, MTK_SOC_UNKNOWN } };