From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E9D5C433E2 for ; Fri, 11 Sep 2020 22:51:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BD1A221EB for ; Fri, 11 Sep 2020 22:51:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sVk64zVL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BD1A221EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AEaScj0RLLkVqABr9aLf0b3K+W+IVitjZHS+sHMDYe0=; b=sVk64zVLrwWSQI0rietqoe8oJ 5+DbSUtJG3ZhK3z5owgN4sKJWBIbYM3yrZN6IK08wbUJ+zucYdCIkWBBH3iYHAHHkGLOskTzYLMEd Y+4xr8B5LktgLMRwRzvWNoKBY2qQMGZvs00v5RprurMYYKsAdSIzaLD1fw+aSJ3ofZt+IAqeSlW41 /cLeXBwBN8OfZ/lJqUZz6jEo2EgbpUe4Io8EEsmDaa3XNX/ekK0frDHVwYm6olNbkbQZLNeDDJGFX SW77zoxn6ick8SH1yHr/Lxep5qbEhHMrevpnpxPAKrDT+68RocsiXGTpxbOByaaECWQCjKE8sKTkd jpyUlwoAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGrsF-0002u4-1H; Fri, 11 Sep 2020 22:50:31 +0000 Received: from mail-io1-f68.google.com ([209.85.166.68]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGrsA-0002t1-MB; Fri, 11 Sep 2020 22:50:28 +0000 Received: by mail-io1-f68.google.com with SMTP id b6so12736644iof.6; Fri, 11 Sep 2020 15:50:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=X7iH2gL3TGegBIDLIKlWXcEbx8NEf9M8ur9gTzrs3rc=; b=nsywYn5P0KfMp9MKxDTflGm0WsCK6sB2swH+hjtBV6nz/Xkb6/mMzEfH52gOLXY8vx 0SvzA5zzdJRoMRb+yzrefbkTdkEi+36+REXR2Zq5rFkivfwmJwhmvqgqTIaPrEz2qpez 1rLFVboLJ4svZUU6lnR0CM1P3HiEnvxUOy6nOW2X6bZEzyiXnHlFeodGMa9YDN25I3r4 0vt+zWoKuZUT9haqEQSMIP5ZX311mU+t9mGNIVl70w6xBSpxBdTnlrVrC55fb8OdGgpE U5BcEDHmn3EgBTpp8Gucah/k1n04RxyNciU5kZuOYx6/NXVfuWRRpwg0pdUSj79g+wTF XgNA== X-Gm-Message-State: AOAM531I/BZFMH76s+pwtO2O/Ssro8zpWdq6IpZ7IiMKwBYo0hKtvH61 dy2Zgzpkgxg2CkgzrkMwPw== X-Google-Smtp-Source: ABdhPJyLgpUwEqdBoCEc1Uj+Z/n0aBHakYt3NgITVkM42PZL4627E/gOVbzkvk3u8Qh9QBXlEaZBkA== X-Received: by 2002:a6b:da16:: with SMTP id x22mr3487643iob.33.1599864625891; Fri, 11 Sep 2020 15:50:25 -0700 (PDT) Received: from xps15 ([64.188.179.251]) by smtp.gmail.com with ESMTPSA id t10sm1900423iog.49.2020.09.11.15.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 15:50:25 -0700 (PDT) Received: (nullmailer pid 2966093 invoked by uid 1000); Fri, 11 Sep 2020 22:50:24 -0000 Date: Fri, 11 Sep 2020 16:50:24 -0600 From: Rob Herring To: Chuanjia Liu Subject: Re: [PATCH v5 1/4] dt-bindings: pci: mediatek: Modified the Device tree bindings Message-ID: <20200911225024.GB2960430@bogus> References: <20200910061115.909-1-chuanjia.liu@mediatek.com> <20200910061115.909-2-chuanjia.liu@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200910061115.909-2-chuanjia.liu@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200911_185026_771010_671F20E1 X-CRM114-Status: GOOD ( 24.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Lorenzo Pieralisi , Frank Wunderlich , linux-pci@vger.kernel.org, Ryder Lee , linux-mediatek@lists.infradead.org, yong.wu@mediatek.com, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 10, 2020 at 02:11:12PM +0800, Chuanjia Liu wrote: > Split the PCIe node and add pciecfg node to fix MSI issue. > > Acked-by: Ryder Lee > Signed-off-by: Chuanjia Liu > --- > .../bindings/pci/mediatek-pcie-cfg.yaml | 38 +++++ > .../devicetree/bindings/pci/mediatek-pcie.txt | 144 +++++++++++------- > 2 files changed, 129 insertions(+), 53 deletions(-) > create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml > > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml > new file mode 100644 > index 000000000000..4d2835ab4858 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml > @@ -0,0 +1,38 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pci/mediatek-pcie-cfg.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek PCIECFG controller > + > +maintainers: > + - Chuanjia Liu > + - Jianjun Wang > + > +description: | > + The MediaTek PCIECFG controller controls some feature about > + LTSSM, ASPM and so on. > + > +properties: > + compatible: > + items: > + - enum: > + - mediatek,mt7622-pciecfg > + - mediatek,mt7629-pciecfg > + - const: syscon > + > + reg: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + > +examples: > + - | > + pciecfg: pciecfg@1a140000 { > + compatible = "mediatek,mt7622-pciecfg", "syscon"; > + reg = <0 0x1a140000 0 0x1000>; > + }; > +... > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt > index 7468d666763a..31e261933685 100644 > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt > @@ -8,7 +8,7 @@ Required properties: > "mediatek,mt7623-pcie" > "mediatek,mt7629-pcie" > - device_type: Must be "pci" > -- reg: Base addresses and lengths of the PCIe subsys and root ports. > +- reg: Base addresses and lengths of the root ports. > - reg-names: Names of the above areas to use during resource lookup. > - #address-cells: Address representation for root ports (must be 3) > - #size-cells: Size representation for root ports (must be 2) > @@ -19,10 +19,10 @@ Required properties: > - sys_ckN :transaction layer and data link layer clock > Required entries for MT2701/MT7623: > - free_ck :for reference clock of PCIe subsys > - Required entries for MT2712/MT7622: > + Required entries for MT2712/MT7622/MT7629: > - ahb_ckN :AHB slave interface operating clock for CSR access and RC > initiated MMIO access > - Required entries for MT7622: > + Required entries for MT7622/MT7629: > - axi_ckN :application layer MMIO channel operating clock > - aux_ckN :pe2_mac_bridge and pe2_mac_core operating clock when > pcie_mac_ck/pcie_pipe_ck is turned off > @@ -47,10 +47,13 @@ Required properties for MT7623/MT2701: > - reset-names: Must be "pcie-rst0", "pcie-rst1", "pcie-rstN".. based on the > number of root ports. > > -Required properties for MT2712/MT7622: > +Required properties for MT2712/MT7622/MT7629: > -interrupts: A list of interrupt outputs of the controller, must have one > entry for each PCIe port > > +Required properties for MT7622/MT7629: > +- mediatek,pcie-subsys: Should be a phandle of the pciecfg node. > + You don't need this. You can search for the node by compatible. Plus it doesn't match the example. > In addition, the device tree node must have sub-nodes describing each > PCIe port interface, having the following mandatory properties: > > @@ -143,56 +146,73 @@ Examples for MT7623: > > Examples for MT2712: > > - pcie: pcie@11700000 { > + pcie1: pcie@112ff000 { > compatible = "mediatek,mt2712-pcie"; > device_type = "pci"; > - reg = <0 0x11700000 0 0x1000>, > - <0 0x112ff000 0 0x1000>; > - reg-names = "port0", "port1"; > + reg = <0 0x112ff000 0 0x1000>; > + reg-names = "port1"; > #address-cells = <3>; > #size-cells = <2>; > - interrupts = , > - ; > - clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>, > - <&topckgen CLK_TOP_PE2_MAC_P1_SEL>, > - <&pericfg CLK_PERI_PCIE0>, > + interrupts = ; > + interrupt-names = "pcie_irq"; > + clocks = <&topckgen CLK_TOP_PE2_MAC_P1_SEL>, > <&pericfg CLK_PERI_PCIE1>; > - clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1"; > - phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>; > - phy-names = "pcie-phy0", "pcie-phy1"; > + clock-names = "sys_ck1", "ahb_ck1"; > + phys = <&u3port1 PHY_TYPE_PCIE>; > + phy-names = "pcie-phy1"; > bus-range = <0x00 0xff>; > - ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>; > + ranges = <0x82000000 0 0x11400000 0x0 0x11400000 0 0x300000>; > + status = "disabled"; > > - pcie0: pcie@0,0 { > - reg = <0x0000 0 0 0 0>; > + slot1: pcie@1,0 { > + reg = <0x0800 0 0 0 0>; > #address-cells = <3>; > #size-cells = <2>; > #interrupt-cells = <1>; > ranges; > interrupt-map-mask = <0 0 0 7>; > - interrupt-map = <0 0 0 1 &pcie_intc0 0>, > - <0 0 0 2 &pcie_intc0 1>, > - <0 0 0 3 &pcie_intc0 2>, > - <0 0 0 4 &pcie_intc0 3>; > - pcie_intc0: interrupt-controller { > + interrupt-map = <0 0 0 1 &pcie_intc1 0>, > + <0 0 0 2 &pcie_intc1 1>, > + <0 0 0 3 &pcie_intc1 2>, > + <0 0 0 4 &pcie_intc1 3>; > + pcie_intc1: interrupt-controller { > interrupt-controller; > #address-cells = <0>; > #interrupt-cells = <1>; > }; > }; > + }; > > - pcie1: pcie@1,0 { > - reg = <0x0800 0 0 0 0>; > + pcie0: pcie@11700000 { > + compatible = "mediatek,mt2712-pcie"; > + device_type = "pci"; > + reg = <0 0x11700000 0 0x1000>; > + reg-names = "port0"; > + #address-cells = <3>; > + #size-cells = <2>; > + interrupts = ; > + interrupt-names = "pcie_irq"; > + clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>, > + <&pericfg CLK_PERI_PCIE0>; > + clock-names = "sys_ck0", "ahb_ck0"; > + phys = <&u3port0 PHY_TYPE_PCIE>; > + phy-names = "pcie-phy0"; > + bus-range = <0x00 0xff>; > + ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>; > + status = "disabled"; > + > + slot0: pcie@0,0 { > + reg = <0x0000 0 0 0 0>; > #address-cells = <3>; > #size-cells = <2>; > #interrupt-cells = <1>; > ranges; > interrupt-map-mask = <0 0 0 7>; > - interrupt-map = <0 0 0 1 &pcie_intc1 0>, > - <0 0 0 2 &pcie_intc1 1>, > - <0 0 0 3 &pcie_intc1 2>, > - <0 0 0 4 &pcie_intc1 3>; > - pcie_intc1: interrupt-controller { > + interrupt-map = <0 0 0 1 &pcie_intc0 0>, > + <0 0 0 2 &pcie_intc0 1>, > + <0 0 0 3 &pcie_intc0 2>, > + <0 0 0 4 &pcie_intc0 3>; > + pcie_intc0: interrupt-controller { > interrupt-controller; > #address-cells = <0>; > #interrupt-cells = <1>; > @@ -202,39 +222,31 @@ Examples for MT2712: > > Examples for MT7622: > > - pcie: pcie@1a140000 { > + pcie0: pcie@1a143000 { > compatible = "mediatek,mt7622-pcie"; > device_type = "pci"; > - reg = <0 0x1a140000 0 0x1000>, > - <0 0x1a143000 0 0x1000>, > - <0 0x1a145000 0 0x1000>; > - reg-names = "subsys", "port0", "port1"; > + reg = <0 0x1a143000 0 0x1000>; > + reg-names = "port0"; > + mediatek,pcie-cfg = <&pciecfg>; > #address-cells = <3>; > #size-cells = <2>; > - interrupts = , > - ; > + interrupts = ; > + interrupt-names = "pcie_irq"; > clocks = <&pciesys CLK_PCIE_P0_MAC_EN>, > - <&pciesys CLK_PCIE_P1_MAC_EN>, > <&pciesys CLK_PCIE_P0_AHB_EN>, > - <&pciesys CLK_PCIE_P1_AHB_EN>, > <&pciesys CLK_PCIE_P0_AUX_EN>, > - <&pciesys CLK_PCIE_P1_AUX_EN>, > <&pciesys CLK_PCIE_P0_AXI_EN>, > - <&pciesys CLK_PCIE_P1_AXI_EN>, > <&pciesys CLK_PCIE_P0_OBFF_EN>, > - <&pciesys CLK_PCIE_P1_OBFF_EN>, > - <&pciesys CLK_PCIE_P0_PIPE_EN>, > - <&pciesys CLK_PCIE_P1_PIPE_EN>; > - clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1", > - "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1", > - "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1"; > - phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>; > - phy-names = "pcie-phy0", "pcie-phy1"; > + <&pciesys CLK_PCIE_P0_PIPE_EN>; > + clock-names = "sys_ck0", "ahb_ck0", "aux_ck0", > + "axi_ck0", "obff_ck0", "pipe_ck0"; > + > power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>; > bus-range = <0x00 0xff>; > - ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>; > + ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>; > + status = "disabled"; > > - pcie0: pcie@0,0 { > + slot0: pcie@0,0 { > reg = <0x0000 0 0 0 0>; > #address-cells = <3>; > #size-cells = <2>; > @@ -251,8 +263,34 @@ Examples for MT7622: > #interrupt-cells = <1>; > }; > }; > + }; > + > + pcie1: pcie@1a145000 { > + compatible = "mediatek,mt7622-pcie"; > + device_type = "pci"; > + reg = <0 0x1a145000 0 0x1000>; > + reg-names = "port1"; > + mediatek,pcie-cfg = <&pciecfg>; > + #address-cells = <3>; > + #size-cells = <2>; > + interrupts = ; > + interrupt-names = "pcie_irq"; > + clocks = <&pciesys CLK_PCIE_P1_MAC_EN>, > + /* designer has connect RC1 with p0_ahb clock */ > + <&pciesys CLK_PCIE_P0_AHB_EN>, > + <&pciesys CLK_PCIE_P1_AUX_EN>, > + <&pciesys CLK_PCIE_P1_AXI_EN>, > + <&pciesys CLK_PCIE_P1_OBFF_EN>, > + <&pciesys CLK_PCIE_P1_PIPE_EN>; > + clock-names = "sys_ck1", "ahb_ck1", "aux_ck1", > + "axi_ck1", "obff_ck1", "pipe_ck1"; > + > + power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>; > + bus-range = <0x00 0xff>; > + ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>; > + status = "disabled"; > > - pcie1: pcie@1,0 { > + slot1: pcie@1,0 { > reg = <0x0800 0 0 0 0>; > #address-cells = <3>; > #size-cells = <2>; > -- > 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel