From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net [185.136.64.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B613A1E7C28 for ; Tue, 22 Apr 2025 06:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.136.64.226 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745302476; cv=none; b=BrFCfW5dvrVH0ZosWxNlFlqBhugiVR1sB0Rf13gKc3ClBPIMJK93tP8CsqpTiUqGI47RYZsXhVDHAt7zgbnNC2E7hiJDBxymtKdRdiSWE12nv0m6yew4o2pN8bhUU8eqpElqNbdjlPIa73IAYPBf+LCNQf49eCok0svOy3v0U5U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745302476; c=relaxed/simple; bh=dS3Vq/AtXU+TxZP7QmUzQG/h1E9LjY5aHSbcuNRJ2HM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JL5PHsSv8CrORecmTostb4DXxr4dmdIgNXWMmh6+Ad0brE92Pl8q9nc8wz81FSLp09tJxt4gMlCTjAwzx6Qkr6FPgmMRTe1vLv2nl2/5zys/KnY9okpUxf8KtlNZuO9j/0slWH4dJxS5Vt2yWTRB2Vat84mxchKxCJ8Lp78K+ms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com; spf=pass smtp.mailfrom=rts-flowmailer.siemens.com; dkim=pass (2048-bit key) header.d=siemens.com header.i=huaqian.li@siemens.com header.b=fM0EeseB; arc=none smtp.client-ip=185.136.64.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=siemens.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rts-flowmailer.siemens.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=siemens.com header.i=huaqian.li@siemens.com header.b="fM0EeseB" Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 2025042206143252e0e24441fd42fff4 for ; Tue, 22 Apr 2025 08:14:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm2; d=siemens.com; i=huaqian.li@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=SCQPF5NJaTXFf43IS370UO0r+J/hStgHdQgUeUn8d7s=; b=fM0EeseBh9Kn1ojzu+hdfL8r35EUxewC38O1Ke3IkfwQ//hWnH1W2XKDb4XYxq3AVuIW+h fazAuf+2BdyB6MSmuNseRQfA3ZD+M3HGAaEqpy/SaitqFCPuMd7Uvyy8VpF4wkQ99C0mNNGN 9gnZ0sZUWx6GZplJaTkAcqPSNPpl5AfLg82yLma0Ce+KHgwBusId6NbWTWdpWvb7hvK5hzg6 gLro4cB15iImk09YgAnqGVBFsaJSwVvt8Y7WAaftXkcAV3qVgCW/Z8v6QX6d+AwqOkn8kmP5 /MalxrG94B781v36tq/xjx9X1W8YfVLq9SJ030NE01kfhpLIXC7dYUxw==; From: huaqian.li@siemens.com To: helgaas@kernel.org Cc: baocheng.su@siemens.com, bhelgaas@google.com, conor+dt@kernel.org, devicetree@vger.kernel.org, diogo.ivo@siemens.com, huaqian.li@siemens.com, jan.kiszka@siemens.com, kristo@kernel.org, krzk+dt@kernel.org, kw@linux.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, nm@ti.com, robh@kernel.org, s-vadapalli@ti.com, ssantosh@kernel.org, vigneshr@ti.com, Krzysztof Kozlowski Subject: [PATCH v8 2/7] dt-bindings: PCI: ti,am65: Extend for use with PVU Date: Tue, 22 Apr 2025 14:14:01 +0800 Message-Id: <20250422061406.112539-3-huaqian.li@siemens.com> In-Reply-To: <20250422061406.112539-1-huaqian.li@siemens.com> References: <20250422061406.112539-1-huaqian.li@siemens.com> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-959203:519-21489:flowmailer From: Jan Kiszka The PVU on the AM65 SoC is capable of restricting DMA from PCIe devices to specific regions of host memory. Add the optional property "memory-regions" to point to such regions of memory when PVU is used. Since the PVU deals with system physical addresses, utilizing the PVU with PCIe devices also requires setting up the VMAP registers to map the Requester ID of the PCIe device to the CBA Virtual ID, which in turn is mapped to the system physical address. Hence, describe the VMAP registers which are optional unless the PVU shall be used for PCIe. Signed-off-by: Jan Kiszka Reviewed-by: Krzysztof Kozlowski Signed-off-by: Li Hua Qian --- .../bindings/pci/ti,am65-pci-host.yaml | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml b/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml index 0a9d10532cc8..98f6c7f1b1a6 100644 --- a/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml +++ b/Documentation/devicetree/bindings/pci/ti,am65-pci-host.yaml @@ -20,14 +20,18 @@ properties: - ti,keystone-pcie reg: - maxItems: 4 + minItems: 4 + maxItems: 6 reg-names: + minItems: 4 items: - const: app - const: dbics - const: config - const: atu + - const: vmap_lp + - const: vmap_hp interrupts: maxItems: 1 @@ -69,6 +73,15 @@ properties: items: pattern: '^pcie-phy[0-1]$' + memory-region: + maxItems: 1 + description: | + phandle to a restricted DMA pool to be used for all devices behind + this controller. The regions should be defined according to + reserved-memory/shared-dma-pool.yaml. + Note that enforcement via the PVU will only be available to + ti,am654-pcie-rc devices. + required: - compatible - reg @@ -89,6 +102,13 @@ then: - power-domains - msi-map - num-viewport +else: + properties: + reg: + maxItems: 4 + + reg-names: + maxItems: 4 unevaluatedProperties: false @@ -104,8 +124,10 @@ examples: reg = <0x5500000 0x1000>, <0x5501000 0x1000>, <0x10000000 0x2000>, - <0x5506000 0x1000>; - reg-names = "app", "dbics", "config", "atu"; + <0x5506000 0x1000>, + <0x2900000 0x1000>, + <0x2908000 0x1000>; + reg-names = "app", "dbics", "config", "atu", "vmap_lp", "vmap_hp"; power-domains = <&k3_pds 120 TI_SCI_PD_EXCLUSIVE>; #address-cells = <3>; #size-cells = <2>; -- 2.34.1