Received: by 10.223.185.116 with SMTP id b49csp2053561wrg; Mon, 12 Feb 2018 03:34:25 -0800 (PST) X-Google-Smtp-Source: AH8x2254oNN8hEYnJl1swhR4enrhna5tRNDMoc8HJiBGxPuSXH/V8TElgy8mRzJa4mEEqI0/FWZ1 X-Received: by 2002:a17:902:1:: with SMTP id 1-v6mr3152361pla.187.1518435265016; Mon, 12 Feb 2018 03:34:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518435264; cv=none; d=google.com; s=arc-20160816; b=ln6cwFpEc2ezE7sq3Y7fDwpWXhdTB4rzzyvm+1BuYdKqR9xIGZNlYXJkPeDsn3KcMF z4OKyPUoXHhXS+Y0KWiZOqdM9rQqopRikG30gEjWkVYPlSB7VMXxzUp103R9czb88qsi kDouSY0t8bDl4lQAFHSqva15D8wBYhF4ASG+uI1OUsJwjLUdcx4T282bVUcMLjxyvDnH 3gxjLQj2DStdjs3TqU2wyrfAxoHipb6Nc6ANYqEj12hwiB4tvyNa64lywdlFK3BL2Id7 45iHSgsTTCt3TtwGsUe2lsTY/uIS6WkkOMR2L1m6PP5i8aMvvro75PmvAxqeSBs6SgaW 17AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=XcEQld0+zEWeeziBe5B0JtPDYFVMlbL0Qsvf9yxejss=; b=f3KIsXMtaXAipR12bRkiZi28AinJryRCcvUHLg8iARDsWsPTuuj7G2g6+ctOFP8bjW EUC36psSCq8vwmn2MI3W7koqTcpMj7M/n27eAcRIHBt6egj5easimrItrNQ9ymTk3awR GreLMw3BPlCvjhC6mLcdmV+HQC2JFD4xi6bc+82F70AG43VQZCQ3XFSIFCnzT50dq7bB TyhdSx8WCrJuUXHLxPGyLDl56OP5BlJO59zTsR3yQWvqpkH/v/DsUtgynY80d7CzPWPo 5tMSfA4oeQ2JnQCUwtMVkpa62NGQBEv1nmXQP/MZ+943FMOEGze3BVXEKXs0vZ5I18iS 3y2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si4981876pgn.343.2018.02.12.03.34.10; Mon, 12 Feb 2018 03:34:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934080AbeBLLco (ORCPT + 99 others); Mon, 12 Feb 2018 06:32:44 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:51527 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933981AbeBLLcn (ORCPT ); Mon, 12 Feb 2018 06:32:43 -0500 X-UUID: 55dff24b89774f5f8b93457883620e89-20180212 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1836674317; Mon, 12 Feb 2018 19:32:40 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 12 Feb 2018 19:32:39 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 12 Feb 2018 19:32:39 +0800 From: Ryder Lee To: Matthias Brugger , Rob Herring CC: , , , Mark Rutland , , Ryder Lee , Benjamin Herrenschmidt , Arnd Bergmann Subject: [PATCH] arm: dts: mt7623: add PCIe related nodes Date: Mon, 12 Feb 2018 19:32:37 +0800 Message-ID: <3b3a4d73d7b33a9318b8db1033d2f7e4c32b0136.1518400130.git.ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds some device nodes for the PCIe function block and updates related pinmux. Moreover, we add interrupt-map properties in both parent and children as the chip only has one IRQ per slot that is connected to all INTx and get propagated through the bridges and it also represents the root ports own interrupts. Signed-off-by: Ryder Lee Cc: Benjamin Herrenschmidt Cc: Arnd Bergmann --- Please refer to the previous discussion: https://patchwork.ozlabs.org/patch/829108/ https://patchwork.kernel.org/patch/10193391/ --- arch/arm/boot/dts/mt7623.dtsi | 105 ++++++++++++++++++++++++++ arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 22 ++++++ 2 files changed, 127 insertions(+) diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi index b750da5..c2541a0 100644 --- a/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mt7623.dtsi @@ -670,6 +670,111 @@ #reset-cells = <1>; }; + pcie: pcie-controller@1a140000 { + compatible = "mediatek,mt7623-pcie"; + device_type = "pci"; + reg = <0 0x1a140000 0 0x1000>, /* PCIe shared registers */ + <0 0x1a142000 0 0x1000>, /* Port0 registers */ + <0 0x1a143000 0 0x1000>, /* Port1 registers */ + <0 0x1a144000 0 0x1000>; /* Port2 registers */ + reg-names = "subsys", "port0", "port1", "port2"; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + interrupt-map-mask = <0xf800 0 0 0>; + interrupt-map = <0x0000 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>, + <0x0800 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>, + <0x1000 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>; + clocks = <&topckgen CLK_TOP_ETHIF_SEL>, + <&hifsys CLK_HIFSYS_PCIE0>, + <&hifsys CLK_HIFSYS_PCIE1>, + <&hifsys CLK_HIFSYS_PCIE2>; + clock-names = "free_ck", "sys_ck0", "sys_ck1", "sys_ck2"; + resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>, + <&hifsys MT2701_HIFSYS_PCIE1_RST>, + <&hifsys MT2701_HIFSYS_PCIE2_RST>; + reset-names = "pcie-rst0", "pcie-rst1", "pcie-rst2"; + phys = <&pcie0_port PHY_TYPE_PCIE>, + <&pcie1_port PHY_TYPE_PCIE>, + <&u3port1 PHY_TYPE_PCIE>; + phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2"; + power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>; + bus-range = <0x00 0xff>; + status = "disabled"; + ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000 + 0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; + + pcie@0,0 { + reg = <0x0000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>; + ranges; + num-lanes = <1>; + status = "disabled"; + }; + + pcie@1,0 { + reg = <0x0800 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>; + ranges; + num-lanes = <1>; + status = "disabled"; + }; + + pcie@2,0 { + reg = <0x1000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0>; + interrupt-map = <0 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>; + ranges; + num-lanes = <1>; + status = "disabled"; + }; + }; + + pcie0_phy: pcie-phy@1a149000 { + compatible = "mediatek,generic-tphy-v1"; + reg = <0 0x1a149000 0 0x0700>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + pcie0_port: pcie-phy@1a149900 { + reg = <0 0x1a149900 0 0x0700>; + clocks = <&clk26m>; + clock-names = "ref"; + #phy-cells = <1>; + status = "okay"; + }; + }; + + pcie1_phy: pcie-phy@1a14a000 { + compatible = "mediatek,generic-tphy-v1"; + reg = <0 0x1a14a000 0 0x0700>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + pcie1_port: pcie-phy@1a14a900 { + reg = <0 0x1a14a900 0 0x0700>; + clocks = <&clk26m>; + clock-names = "ref"; + #phy-cells = <1>; + status = "okay"; + }; + }; + usb1: usb@1a1c0000 { compatible = "mediatek,mt7623-xhci", "mediatek,mt8173-xhci"; diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts index 7bf5aa2..b077808 100644 --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts @@ -209,6 +209,20 @@ vqmmc-supply = <&mt6323_vio18_reg>; }; +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_default>; + status = "okay"; + + pcie@0,0 { + status = "okay"; + }; + + pcie@1,0 { + status = "okay"; + }; +}; + &pio { cir_pins_a:cir@0 { pins_cir { @@ -376,6 +390,14 @@ }; }; + pcie_default: pcie_pin_default { + pins_cmd_dat { + pinmux = , + ; + bias-disable; + }; + }; + pwm_pins_a: pwm@0 { pins_pwm { pinmux = , -- 1.9.1