Received: by 10.213.65.68 with SMTP id h4csp1187566imn; Sun, 18 Mar 2018 18:43:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELvX566x1VEwIAqIFBC52XREIV6oSUk/TZEWapMmRUYruNidLklthJYRuEnMKf9sNxwXzSbq X-Received: by 2002:a17:902:bc84:: with SMTP id bb4-v6mr10742662plb.317.1521423789357; Sun, 18 Mar 2018 18:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521423789; cv=none; d=google.com; s=arc-20160816; b=okYaWJTOpCYY5fKnGeZX/UxDX7dsCjHMRXoOrvwvNln6aLxvyGp6Al6eg185uTLrGY IeGJi4O6s+cyuKLRlRogwiNpz06vikOiQixnVKL7/nuwszKEpj5Kae7cjC9XjMW4Pyyk fCLW5iAKtnJMdm8K0jAIBKHhkCwQNrputANjIIhcQmm0RD9hrQF5Xn8bGO5W/IWb4URn aJFBYDLf7jrUSwo1BWS+851MT9OY6XaVlUy3FMUBuTXXwLofD1YVDxlpfLoJD6NfPwXy ePEbyDHxPM3vuORYjP9dv+VFCwFo5hSp7jmEsyZOQLi6YKHzDFAiuVwL1XgAUtYvqIm1 Amtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=3SJOHDrqh2kbAxIv+Ao5dk78tT7/ptazYxwC+DL1pck=; b=byRCK+LLA4mBkepR9WFGK8Ww0pQjpAIHtrOFw12zYubDtd6m8N8onjqCYu8nn3SiaN 6HCkCSY/v8Ie2rXngMvL7gZbmwqUDwwEqgu/mv4eYDeaDIt8CSDIaaUGjFcipfL3R+pn T57Owxr0zQW5STCsm/LRGpAj+Lh2Tm5GZUNI6gWykidlHRSnNebBoYnDEoFfw7/v4KYi IOAKeU+6Vgo/vTGdYz+hhnXfV79nVhmdbhE+pfXk43MlnSLOespLXnqS6rwxrur1u8l6 A0qb+oSkD2ILUUQMKxKYpVrMBi5z4WjXUENl8O6LxXDzIREFKZEp/poMQK04dL6NwndG JfPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gtx+I+5s; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v77si9673365pfa.108.2018.03.18.18.42.55; Sun, 18 Mar 2018 18:43:09 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gtx+I+5s; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755014AbeCSBlZ (ORCPT + 99 others); Sun, 18 Mar 2018 21:41:25 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36745 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755213AbeCSBlM (ORCPT ); Sun, 18 Mar 2018 21:41:12 -0400 Received: by mail-wm0-f67.google.com with SMTP id n3so12611528wmd.1; Sun, 18 Mar 2018 18:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3SJOHDrqh2kbAxIv+Ao5dk78tT7/ptazYxwC+DL1pck=; b=gtx+I+5s+uRfKOawF8FPJ+sgemOcgImgFVyoyytXoRFSTCm1n4zF/bFu5nxsKo39rJ bbjUiQV6I4sZ7fWnoieXQpBHyAUDtrkm3PjV6PtY1j4tp/RYpL9G7ARouHMGNNQdm2mQ voBaf6x4kA0u7oopt7JMUS7k2AYitAWc2tiszph42E9CD6jbvXIEkgpOLAxc87bjLQ3Y p8Xco+Zq0sIhdsmegF4spcCmtomQhZE45NG3mVoTP9HACf1vkUVf+nsUePreb7sfLdaO XFNNPyOUqFcaNzVIKkdR9mmj8NbMq2JxMVBarpOl84RKjVZxS7m/OCTfA2P5TAwDzRF8 21dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3SJOHDrqh2kbAxIv+Ao5dk78tT7/ptazYxwC+DL1pck=; b=lPjU2xHwS6eVvI7k5IPJbZqTQXupKQHC5hjY+5Wosllvb9X/BmCrl1gbHKeFAAjrEx LPD/nmFkX+tzBajbmd0aCZuZm1PUoEC5MGaH/G/cMS9zB/ll7wF9HbqI2VIsFCkWuoaO pxJrs9ynCdEX2K0AGLtQZKrEwOAxBLJXR9P/JRCPEC0buX7Z7JmGJLiPGZDSxZayhWbo r6K7Ov/ZPVvzn+zvf0GlEBqJ7jSP3B42KoNS6K/ZqjxjtNjzFvYfez0A1TnuvT/UWWsU K8IBgZOLTFAPBhOX/m28sn0aJo5xXLdpfEntukTJ8ELUMGi7bRI9aIROPJDT6O3Y+Z6B e45g== X-Gm-Message-State: AElRT7Ed0Wj2lxO94Fv6V6OjtWQYFdQii7mLZ7IVaq0jt0Jq+9SL77OP hEV5Okyrq1PQPY8LnicFcO8= X-Received: by 10.28.88.12 with SMTP id m12mr2124412wmb.57.1521423670767; Sun, 18 Mar 2018 18:41:10 -0700 (PDT) Received: from ziggy.stardust ([93.176.145.166]) by smtp.gmail.com with ESMTPSA id f84sm8973431wmh.44.2018.03.18.18.41.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Mar 2018 18:41:09 -0700 (PDT) Subject: Re: [PATCH v1] arm: dts: mt7623: add PCIe related nodes To: Ryder Lee , Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Rutland , linux-mediatek@lists.infradead.org, Benjamin Herrenschmidt , Arnd Bergmann References: <4e567be2546f90ef62a5df0e957e8a014e460cde.1518576282.git.ryder.lee@mediatek.com> From: Matthias Brugger Message-ID: <5dc6610c-0d8e-63e8-8528-c79b777f0ce7@gmail.com> Date: Mon, 19 Mar 2018 02:41:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <4e567be2546f90ef62a5df0e957e8a014e460cde.1518576282.git.ryder.lee@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/14/2018 04:27 AM, Ryder Lee wrote: > 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 Applied now to v4.16-next/dts32 Thanks! > --- > > Sorry to send v1 in such a rush. Somehow I forgot to add something in previous version. > > changes since v1: > - enable device nodes - pcie0_phy & pcie2_phy > - fix dtc warning: Warning (pci_bridge): Node /pcie-controller@1a140000 node name is not "pci" or "pcie" > --- > arch/arm/boot/dts/mt7623.dtsi | 105 ++++++++++++++++++++++++++ > arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 30 ++++++++ > 2 files changed, 135 insertions(+) > > diff --git a/arch/arm/boot/dts/mt7623.dtsi b/arch/arm/boot/dts/mt7623.dtsi > index 629c92b..137ce99 100644 > --- a/arch/arm/boot/dts/mt7623.dtsi > +++ b/arch/arm/boot/dts/mt7623.dtsi > @@ -667,6 +667,111 @@ > #reset-cells = <1>; > }; > > + pcie: pcie@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..3efecc5 100644 > --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts > +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts > @@ -209,6 +209,28 @@ > 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"; > + }; > +}; > + > +&pcie0_phy { > + status = "okay"; > +}; > + > +&pcie1_phy { > + status = "okay"; > +}; > + > &pio { > cir_pins_a:cir@0 { > pins_cir { > @@ -376,6 +398,14 @@ > }; > }; > > + pcie_default: pcie_pin_default { > + pins_cmd_dat { > + pinmux = , > + ; > + bias-disable; > + }; > + }; > + > pwm_pins_a: pwm@0 { > pins_pwm { > pinmux = , >