From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EB4E22D792 for ; Fri, 3 Jul 2026 01:51:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783043501; cv=none; b=Ui0G/jXbGi0j+Ug1f81fX3mJGEj8Q5mXNx4fhhIG4w2xgBCGrrWTNOOTixmRliv4ZWyFOOxb4TBLW0ZOxINlN4CnVDRBw8RYqcjmZfXTL7lVpj3MTZ+K6kX/AblAVO/PqIm7T5IZX2S+KlnRBbtETJUxXk1tBP8baF3r6oiszJo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783043501; c=relaxed/simple; bh=b5whjc3gJgzLr/xpZRDwWBd8d15pv5MvoPIhIx6ndbQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lKtWhGMzIvUl1tO1VQ/Hism6wBzzYbwJZYj3x/zp8UlkV29DsFk72gx7eooGDiuR3VGoT8az0l0BcKC2e80U0u/X7HD2TTZRMaINvOSRfDN2lBYkO343UGlb/bcp25hGFR/dxuDw5tXuipRi9A4ZMVhn8BXh/2mMnQOcoIifo1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=euOBhVEN; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="euOBhVEN" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-845537740ddso35306b3a.0 for ; Thu, 02 Jul 2026 18:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783043499; x=1783648299; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=uucYeY9/tilSu22+Lvc2ys3l48BWNkemNgiDbDRjkc8=; b=euOBhVENJxd+cDJRjEkAVOav2ELJ++qZAqrh+eNxjPKcQVcui/ybDK6YRmoaSMKDX+ /gl7ZoQC41TQ5d3SrJiEAi5T6QEocQ2pW7DfDkMmZ4a3J/LcBg+MbMMH7SYVFjJKA3Ud WLkh8vpGRsUwI9s5Kdch5WZGRzVQtpOwdu6ZNufO4p9/GzaCl0WQN0SwtVLSSFixmhL4 SIPRMaFEwCZUT5Ssjf8JTaytIJteB802JeLeX38ALUh3BDBRwrbQGUgCJM/RROr6rrSL HnOGXNv+DPDE9u6oqc8Kse2uy1+bbI0K1JvH00WnxSHn7r49Jec1YPKDDCL3whoD/Q3J APNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783043499; x=1783648299; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uucYeY9/tilSu22+Lvc2ys3l48BWNkemNgiDbDRjkc8=; b=ZPcb4dvyYbJSLVKhTbc3NPtYaa3MbabeboSO8tS3B/SXOvQ0fTGBB7La+AJVGc1+AQ RaxXd58Z7xXhipB3beedxIHZ13lfsS+Ols3zZjEth7p9kBv6LUTjf4nbDDHZmuHH4x8x AOpn5HeGowxQg2nMVYDFzN6JxrHGANBcA6qqiZebaHyMTtwZ6VAdxLJ3Xmt255bG+zsm rUC/EPyl0s6v1bptsNjBELuIAamsikEtw5YR9+pV7RFK0L4ok39JMFW14842j4JtTc2/ iXMWdmfhDu2P0U7iP/TkOlzwV6V5BTqP7yYEquoG0uLVth38dUf7ht4gmDf1CG0sAbAW 1RHg== X-Forwarded-Encrypted: i=1; AFNElJ/Hebk0UL3UzDW4JYEvKp0wg4fRoGiYuVEMIdjQdBCB5XCccKxQnMwaA9/rerhx0ZXw7bc4Q0DOqRGF@vger.kernel.org X-Gm-Message-State: AOJu0Yw14jZu/7d6krmOaShLFvvDw29Na9ViH0rZicb1OcHDHP42PDme EJX/muJTJrX0Ss+S7HI0qGW+bWjejBfdXeoBwKnRo+9z0HHFk4b6vAG2 X-Gm-Gg: AfdE7cn4nWyhvEzJWevfDEAxUVvAVXxdhnnHQCaVJwhDwi+L0DRi2yEbOXBWoiiP6Hd f4JdhC0T4nFtQC7MdM4PCY415IWU2SvFyGoUhe2jN9GCd2gNSAmaKLB8T6wkJVAbfgojYCBHGyw Tr7WpbWaMVOK3dRnnHrUbw2XhO6KYIy8Jqbk1e1WNtPTcDkZWxDPbhreDS2lChGlvlsNYjTU9NT zSStNYvu4IWWxgMElyzKK7iNaAj5yfYmkxKHiuVhahQIAALxTAfhiykf1B29cLfqfOxcbVNnGHo Ahd+vKgpHfYi0Pm/41MCwhv0rftwJ1AeVAmWcB2PivMkQfDUqZnmOSOBjiYk6XDvR/rVsiw1HaT VkyraGON1jgkHGWazhF8MJ+P8kK2XAbjPLNtXTIcge3YtsbrOAd9n08nz2vihgrKfZ1raVz/rvX o= X-Received: by 2002:a05:6a00:4388:b0:847:1013:f8e0 with SMTP id d2e1a72fcca58-847c4ffbc14mr7392325b3a.7.1783043498765; Thu, 02 Jul 2026 18:51:38 -0700 (PDT) Received: from localhost ([2001:da8:7001:11::cb]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-847cb9d80c0sm2123471b3a.54.2026.07.02.18.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 18:51:38 -0700 (PDT) Date: Fri, 3 Jul 2026 09:51:08 +0800 From: Inochi Amaoto To: Alex Elder , Manivannan Sadhasivam , Inochi Amaoto Cc: Jingoo Han , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Christian Bruel , Vincent Guittot , Senchuan Zhang , Nam Cao , Siddharth Vadapalli , Randolph Lin , Andy Shevchenko , Vidya Sagar , Neil Armstrong , Gustavo Pimentel , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, Yixun Lan , Longbin Li Subject: Re: [PATCH v2 4/5] dt-bindings: PCI: spacemit: Introduce Spacemit K3 PCIe host controller Message-ID: References: <20260517014841.254085-1-inochiama@gmail.com> <20260517014841.254085-5-inochiama@gmail.com> <8010bb91-77e1-42b4-9f19-d9e70e385d00@riscstar.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8010bb91-77e1-42b4-9f19-d9e70e385d00@riscstar.com> On Tue, Jun 09, 2026 at 11:11:20AM -0500, Alex Elder wrote: > On 6/9/26 9:03 AM, Manivannan Sadhasivam wrote: > > On Sun, May 17, 2026 at 09:48:39AM +0800, Inochi Amaoto wrote: > > > Add binding support for the PCIe controller on the SpacemiT K3 SoC. > > > This controller is almost a standard Synopsys DesignWare PCIe IP, > > > with some extra link and reset state control. > > > > > > Signed-off-by: Inochi Amaoto > > > > Why can't you reuse the existing spacemit,k1-pcie-host.yaml binding? I see very > > few differences which could be added using conditionals. Also, this binding > > defines the PHY property in the controller node, which is a way backwards as we > > now prefer to define these in Root Port node as spacemit,k1-pcie-host.yaml does. > > I agree. I have another couple of comments below, including several > things that just point out what's the same and what's different. > > -Alex > A good caught, I have confirmed, they share the same topology so it can be reused. Regards, Inochi > > > > - Mani > > > > > --- > > > .../bindings/pci/spacemit,k3-pcie-host.yaml | 135 ++++++++++++++++++ > > > 1 file changed, 135 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/pci/spacemit,k3-pcie-host.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/pci/spacemit,k3-pcie-host.yaml b/Documentation/devicetree/bindings/pci/spacemit,k3-pcie-host.yaml > > > new file mode 100644 > > > index 000000000000..46147a37a9ce > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/pci/spacemit,k3-pcie-host.yaml > > > @@ -0,0 +1,135 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/pci/spacemit,k3-pcie-host.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: SpacemiT K3 PCI Express Host Controller > > > + > > > +maintainers: > > > + - Inochi Amaoto > > If you would like to maintain the (common) SpacemiT K1 host > controller binding I'd be OK with that. > > > > + > > > +description: > > > + The SpacemiT K3 SoC PCIe host controller is based on the Synopsys > > > + DesignWare PCIe IP. The controller uses the external MSI interrupt > > > + controller. > > > + > > > +allOf: > > > + - $ref: /schemas/pci/pci-host-bridge.yaml# > > > + - $ref: /schemas/pci/snps,dw-pcie.yaml# > > > + > > > +properties: > > > + compatible: > > > + const: spacemit,k3-pcie > > > + > > > + reg: > > > + items: > > > + - description: DesignWare PCIe registers > > > + - description: Data Bus Interface (DBI) shadow registers > > The above is new (different from K1), as is "dbi2" as its name. > > > > + - description: ATU address space > > > + - description: PCIe configuration space > > > + - description: Link control registers > > > + > > > + reg-names: > > > + items: > > > + - const: dbi > > > + - const: dbi2 > > > + - const: atu > > > + - const: config > > > + - const: link > > > + > > > + clocks: > > Clocks and resets are the same as K1. > > > > + items: > > > + - description: DWC PCIe Data Bus Interface (DBI) clock > > > + - description: DWC PCIe application AXI-bus master interface clock > > > + - description: DWC PCIe application AXI-bus slave interface clock > > > + > > > + clock-names: > > > + items: > > > + - const: dbi > > > + - const: mstr > > > + - const: slv > > > + > > > + resets: > > > + items: > > > + - description: DWC PCIe Data Bus Interface (DBI) reset > > > + - description: DWC PCIe application AXI-bus master interface reset > > > + - description: DWC PCIe application AXI-bus slave interface reset > > > + > > > + reset-names: > > > + items: > > > + - const: dbi > > > + - const: mstr > > > + - const: slv > > > + > > > + msi-parent: true > > msi-parent and phys are not present in the K1 binding. > > > > + > > > + phys: > > > + description: > > > + PHY phandle from the Combo PHY, the lane number does not depends > > > + on this, since the number of lanes provided by Combo PHY can be > > > + 1 or 2. > > > + minItems: 1 > > > + maxItems: 6 > > > + > > > + phy-names: > > > + minItems: 1 > > > + maxItems: 6 > > > + > > The following property is the same as K1. > > > > + spacemit,apmu: > > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > > + description: > > > + A phandle that refers to the APMU system controller, whose regmap is > > > + used in managing resets and link state, along with and offset of its > > > + reset control register. > > > + items: > > > + - items: > > > + - description: phandle to APMU system controller > > > + - description: register offset > > > + > > > +required: > > > + - clocks > > > + - clock-names > > > + - resets > > > + - reset-names > > > + - msi-parent > > > + - spacemit,apmu > > > + > > > +unevaluatedProperties: false > > > + > > > +examples: > > > + - | > > > + #include > > > + > > > + soc { > > > + #address-cells = <2>; > > > + #size-cells = <2>; > > > + > > > + pcie@80000000 { > > > + compatible = "spacemit,k3-pcie"; > > > + reg = <0x0 0x80000000 0x0 0x00001000>, > > > + <0x0 0x80100000 0x0 0x00001000>, > > > + <0x0 0x80300000 0x0 0x00003f20>, > > > + <0x11 0x00000000 0x0 0x00010000>, > > > + <0x0 0x82900000 0x0 0x00001000>; > > > + reg-names = "dbi", "dbi2", "atu", "config", "link"; > > > + device_type = "pci"; > > > + #address-cells = <3>; > > > + #size-cells = <2>; > > > + clocks = <&syscon_apmu 89>, > > > + <&syscon_apmu 56>, > > > + <&syscon_apmu 57>; > > > + clock-names = "dbi", "mstr", "slv"; > > > + msi-parent = <&simsic>; > > > + ranges = <0x01000000 0x00 0x00010000 0x11 0x00010000 0x0 0x00100000>, > > > + <0x02000000 0x0 0x00110000 0x11 0x00110000 0x0 0x7fef0000>, > > > + <0x43000000 0x18 0x00000000 0x18 0x00000000 0x1 0x00000000>; > > > + resets = <&syscon_apmu 76>, > > > + <&syscon_apmu 78>, > > > + <&syscon_apmu 77>; > > > + reset-names = "dbi", "mstr", "slv"; > > > + linux,pci-domain = <0>; > > > + spacemit,apmu = <&syscon_apmu 0x1f0>; > > > + }; > > > + }; > > > + > > > -- > > > 2.54.0 > > > > > >