All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/40] arm64: zynqmp: Add SMMU support for SATA IP
Date: Mon,  6 Nov 2017 13:12:44 +0100	[thread overview]
Message-ID: <4fc49e8a5473d46a2b26566249af128d53baa862.1509970359.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <cover.1509970359.git.michal.simek@xilinx.com>

From: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>

AXI master interface in CEVA AHCI controller requires two unique
Write/Read ID tags per port. This is because, ahci controller uses
different AXI ID[3:0] bits for identifying non-data transfers(like
reading descriptors, updating PRD tables, etc) and data transfers
(like sending/receiving FIS).To make SMMU work with SATA we need to
add correct SMMU stream id for SATA. SMMU stream id for SATA is
determined based on the AXI ID[1:0] as shown below

	SATA SMMU ID =  <TBU number>, 0011, 00, 00, AXI ID[1:0]
	Note: SATA in  ZynqMp uses TBU1 so TBU number = 0x1, so
	      SMMU ID = 001, 0011, 00, 00, AXI ID[1:0]

Since we have four different AXI ID[3:0] (2 for port0 & 2 for port1
as said above) we get four different SMMU stream id's combinations
for SATA. These AXI ID can be configured using PAXIC register.
In this patch we assumed the below AXI ID values

 Read ID/ Write ID for Non-Data Port0 transfers = 0
 Read ID/ Write ID for Data Port0 transfers = 1
 Read ID/ Write ID for Non-Data Port1 transfers = 2
 Read ID/ Write ID for Data Port1 transfers = 3

Based on the above values,SMMU stream ID's for SATA will be 0x4c0 &
0x4c1 for PORT0, 0x4c2 & 0x4c3 for PORT1. These values needed to be
added to iommus dts property. This patch does the same.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 arch/arm/dts/zynqmp.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/zynqmp.dtsi b/arch/arm/dts/zynqmp.dtsi
index c1900e9c95c2..f2c0b5ebf9ab 100644
--- a/arch/arm/dts/zynqmp.dtsi
+++ b/arch/arm/dts/zynqmp.dtsi
@@ -796,6 +796,10 @@
 			interrupt-parent = <&gic>;
 			interrupts = <0 133 4>;
 			power-domains = <&pd_sata>;
+			#stream-id-cells = <4>;
+			iommus = <&smmu 0x4c0>, <&smmu 0x4c1>,
+				 <&smmu 0x4c2>, <&smmu 0x4c3>;
+			/* dma-coherent; */
 		};
 
 		sdhci0: sdhci at ff160000 {
-- 
1.9.1

  parent reply	other threads:[~2017-11-06 12:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 12:12 [U-Boot] [PATCH 00/40] zynqmp: arm64: DT changes Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 01/40] arm64: zynqmp: Add references to cpu nodes Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 02/40] arm64: zynqmp: Update the OPPs for cpu freq Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 03/40] arm64: zynqmp: DT: Fix typo in idle-states node definition Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 04/40] arm64: zynqmp: Reduced min-residency time for idle state node Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 05/40] arm64: zynqmp: PM: Add IRQ Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 06/40] arm64: zynqmp: Fix broken architected timer interrupt trigger Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 07/40] arm64: zynqmp: Label whole PL part as fpga_full region Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 08/40] arm64: zynqmp: Add clock name for GPU Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 09/40] arm64: zynqmp: Update the GPU address size Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 10/40] arm64: zynqmp: Add missing gpio property to dtsi Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 11/40] arm64: dts: xilinx: fix PCI bus dtc warnings Michal Simek
2017-11-06 12:12 ` Michal Simek [this message]
2017-11-06 12:12 ` [U-Boot] [PATCH 13/40] arm64: zynqmp: rtc: Add calibration Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 14/40] arm64: zynqmp: disable smmu Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 15/40] arm64: zynqmp: PM: Specify power domains for DP related nodes Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 16/40] arm64: zynqmp: Use revision in dts file description Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 17/40] arm64: zynqmp: Add revB string to compatible string Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 18/40] arm64: zynqmp: Update device tree for gpio Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 19/40] arm64: zynqmp: zcu102: Modifying GTR lane-0 to PCIe Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 20/40] arm64: zynqmp: Add missing alias for gem0 for ep108 Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 21/40] arm64: zynqmp: Remove leading 0s from mtd table for spi flashes Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 22/40] arm64: zynqmp: Use SPDX license with dc4 Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 23/40] arm64: zynqmp: Remove local-mac-address from dtsi file Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 24/40] arm64: zynqmp: Update device tree for pinmux Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 25/40] arm64: zynqmp: Add support for zcu102 1.0 rev Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 26/40] arm64: zynqmp: Add support for zynqmp nvmem firmware driver Michal Simek
2017-11-06 12:12 ` [U-Boot] [PATCH 27/40] arm64: zynqmp: Remove tx_termination_fix detection on silicon v1 Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 28/40] arm64: zynqmp: Add reset-controller support in serdes driver Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 29/40] arm64: zynqmp: Use reset controller framework for asserting/de-asserting reset Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 30/40] arm64: zynqmp: sdhci: set host quirk2 for no 1.8V support for 1.0 silicon Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 31/40] arm64: zynqmp: dt: Add AMS node Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 32/40] arm64: zynqmp: Move nodes which have no reg property out of bus Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 33/40] arm64: zynqmp: Add support reading SoC revision using nvmem driver in dwc3 Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 34/40] arm64: zynqmp: Enabled CCI support for USB Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 35/40] arm64: zynqmmp: Add USB OTG interrupts support in dt Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 36/40] arm64: zynqmp: Uncomment snps, quirk-frame-length-adjustment flag in dwc3 Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 37/40] arm64: zynqmp: Remove clock setting from dtsi Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 38/40] arm64: zynqmp: usb: Correct IOMMU node for making SMMU work with USB Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 39/40] arm64: zynqmp: Add note about si5328 interrupt Michal Simek
2017-11-06 12:13 ` [U-Boot] [PATCH 40/40] arm64: zynqmp: Enable watchdog by default Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4fc49e8a5473d46a2b26566249af128d53baa862.1509970359.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.