From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 BC0E7426D22 for ; Fri, 10 Jul 2026 16:01:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783699307; cv=none; b=a9GJZnef68q4XnU5cmps6DvKf3GEdw4hJI45CcDCcLQtlyZABmOqMVZNaq2wQXutBPs/dtRiMTL3AV4mCzcmQW/rK+4CMhC+82As3f9hh98J2cP+UcTObUuEQQbb3NMrRMinxRbQMVQtONPLoEIRzcssxOlcQOvDXxaMQFbtD5Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783699307; c=relaxed/simple; bh=FpvBMFOBjGbtex0F2E85sDkJ0mHA1kFz8fwtEFKL9Fs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=f0Gz8ZfPbYqqAbKRnUSMwSIB82ySx2eK+nPgf4a7WLZuxn3gOqdqDuaIXRaODoUvzrVvdD/Rnbslam0S5q2cRf1UNyHUu46Q248CyMcYnA+/4875Cq/D/LJ7hesv9BSUPobioDqDyv3ipRWzYeeOzVzC1fcXPQJR3lxyp43yApc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=YMqYFWBH; arc=none smtp.client-ip=209.85.160.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="YMqYFWBH" Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-51c21495722so5123251cf.3 for ; Fri, 10 Jul 2026 09:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1783699302; x=1784304102; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Xplki/WjnUaATCo6uGj8PBglmca7aRIHrcSArfmWE/8=; b=YMqYFWBHH3a37kqe/Jc/56EqUtfRQqBlg6YZmh6HajWWXHheWFEfPvkYeQoN6OABTH 9K+nAf/FI7lNo+1rMbGACesyTcZnBJ3iaa9bVTWWiXI9aqhprCw66xzOEiHH0t4pHUDm 9F0TiiPv/Sh0RjbyctyPl5i4uwkWWTIhAfXLdgQ8XzS1ZR5u7jre2hlq604XreguIz7B Hs35lVokfrCXvgZNSHXfLfFHYB6BMAAuAhQO3NmXzeagV+lUwqPOLs/a1YeUMjuxuetD bgILXOUIFUv6/mTcwZ3caimiuO06QnaeAR0CQDPTdlZtwXkyuejmBUMKp/PgC+uw5sYH pGEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783699302; x=1784304102; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Xplki/WjnUaATCo6uGj8PBglmca7aRIHrcSArfmWE/8=; b=KzfamdQ+ipMdgIclznnvnTHAehKVLVwu0vyoh+zIf3xqG5Qax4i3RUhhl4bQAvuQ8l FCduyIqjncqQbjXoclFnXY+Fesy9ZTzLk7cNEH2eSLo8wLjDYHEwP9Sp6TpHTzsUBpsB RSjC+IyzZl/oRbWji9grU5flNzDRY6mHV/emnDh7h0dxKLIHuZr1VA0IQg679Vl/uadr cQ9yuq3Xv0c1LH1ESnr2k8FbX3aLK467UDAkUl83k0ae1wOsRiGclFfZsSci0NYLex7z 152spKjrI9iDi2wFsHO1f5xOYy72Ix+93QcDDmTOkdam2EVMd8JZMlPLuFhZXlpE7dfq Te1Q== X-Forwarded-Encrypted: i=1; AHgh+Rqc2GvpjsFce7rjH4pe+x8miRWM3OLearbYGgjPPov1CIcTC2GXGkYo/twCQ79JeNtbc+fINmH6HUR6Jx4=@vger.kernel.org X-Gm-Message-State: AOJu0YzaStqHTVfSNZYrzT2fDdDeBbb92ZO103SM3GtKHzZe/JOETBzs tsJ3lYVjldohDGmrn7brg3mW/76HBws/SU9yeOJxxYapCA+wnjnH6mVAzYRiAYFatSs= X-Gm-Gg: AfdE7cmzb8kjPnjL4qyE31cIQXnHPdqKJ9hY28IoUG8HXIAROxKnn+hyBmKHPPiQjRH /g6fTM5rpC0/9+h8Qt4FcA4lP1DQ3IexLq7EHBknR5YYeOs9OP6/YJTapwTVnt/pLv/Y6Vqd36Z 3f7aVI/Ik4Ptdiv+n1mJXLPHLqUqvBIHZT/y17Zp70IEh2xbH1uFpi0MSCgaWQPt2ULzdQZsKfX gccIG736ABzmYKWGI2Or1Yome8vSHFfW0Gfvt5ixsqrJ+E1lkKEeDaBqnwbXudOkBViuWDzGTjz ohjTsT9NPZAanTWm/BMM7XOHBb//ZuJ/Uq8hVpFnGyld/vncwrWcBiQjwBNMku0giakVnNoxKSO hZj1fuAWSLhw+LRuX8FZbFQWFLaZ1tBhFHmY8ULi2UPrKVr7Xy2ouY5xkXFpgBOyZCrxP9dMr4P gaXh9hzyB4ptRE X-Received: by 2002:a05:622a:2c6:b0:516:df62:bdd2 with SMTP id d75a77b69052e-51c8b3c65f5mr122904381cf.55.1783699301497; Fri, 10 Jul 2026 09:01:41 -0700 (PDT) Received: from [172.22.22.28] ([73.62.185.64]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51caaf5f61csm18644921cf.22.2026.07.10.09.01.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jul 2026 09:01:40 -0700 (PDT) Message-ID: <58948c74-0990-449e-8eee-88cbb38db7e7@riscstar.com> Date: Fri, 10 Jul 2026 11:01:38 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 5/6] dt-bindings: PCI: spacemit: Introduce Spacemit K3 PCIe host controller To: Inochi Amaoto , Jingoo Han , Manivannan Sadhasivam , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Christian Bruel , Frank Li , Nam Cao , Qiang Yu , Krishna Chaitanya Chundru , Xincheng Zhang , Siddharth Vadapalli , Andy Shevchenko , Vidya Sagar , Neil Armstrong , Gustavo Pimentel Cc: 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 References: <20260709040027.958400-1-inochiama@gmail.com> <20260709040027.958400-6-inochiama@gmail.com> Content-Language: en-US From: Alex Elder In-Reply-To: <20260709040027.958400-6-inochiama@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/8/26 11:00 PM, 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 This looks OK to me. What I see is that K3 does not require the interrupts and interrupt-names properties, allows up to six PHYs (not just one), and adds a dbi2 register that is not used by K1. I might have missed it, but I don't see where the dbi2 register is used by the K3 code you have added. In pcie-designware.c, I see that if no "dbi2" resource is found, memory at offset 4096 from the "dbi" base is used. Does that apply for K3? If so, maybe there's no need to define dbi2. -Alex > --- > .../bindings/pci/spacemit,k1-pcie-host.yaml | 50 ++++++++++++++++--- > 1 file changed, 43 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml b/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml > index c4c00b5fcdc0..54817d6fd9af 100644 > --- a/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml > +++ b/Documentation/devicetree/bindings/pci/spacemit,k1-pcie-host.yaml > @@ -14,26 +14,29 @@ description: > > PCIe IP. The controller uses the DesignWare built-in MSI interrupt > controller, and supports 256 MSIs. > > -allOf: > - - $ref: /schemas/pci/snps,dw-pcie.yaml# > - > properties: > compatible: > - const: spacemit,k1-pcie > + enum: > + - spacemit,k1-pcie > + - spacemit,k3-pcie > > reg: > + minItems: 4 > items: > - description: DesignWare PCIe registers > - description: ATU address space > - description: PCIe configuration space > - description: Link control registers > + - description: Data Bus Interface (DBI) shadow registers. > > reg-names: > + minItems: 4 > items: > - const: dbi > - const: atu > - const: config > - const: link > + - const: dbi2 > > clocks: > items: > @@ -66,6 +69,8 @@ properties: > interrupt-names: > const: msi > > + msi-parent: true > + > spacemit,apmu: > $ref: /schemas/types.yaml#/definitions/phandle-array > description: > @@ -84,7 +89,8 @@ patternProperties: > > properties: > phys: > - maxItems: 1 > + minItems: 1 > + maxItems: 6 > > vpcie3v3-supply: > description: > @@ -96,13 +102,43 @@ patternProperties: > > unevaluatedProperties: false > > +allOf: > + - $ref: /schemas/pci/snps,dw-pcie.yaml# > + - if: > + properties: > + compatible: > + contains: > + const: spacemit,k1-pcie > + then: > + properties: > + reg: > + maxItems: 4 > + > + reg-names: > + maxItems: 4 > + > + patternProperties: > + '^pcie@': > + properties: > + phys: > + maxItems: 1 > + > + required: > + - interrupts > + - interrupt-names > + else: > + properties: > + reg: > + minItems: 5 > + > + reg-names: > + minItems: 5 > + > required: > - clocks > - clock-names > - resets > - reset-names > - - interrupts > - - interrupt-names > - spacemit,apmu > > unevaluatedProperties: false