devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] iommu: sun50i: Add Allwinner H616 support
@ 2024-06-16 22:40 Andre Przywara
  2024-06-16 22:40 ` [PATCH v2 1/5] iommu: sun50i: clear bypass register Andre Przywara
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Andre Przywara @ 2024-06-16 22:40 UTC (permalink / raw)
  To: Joerg Roedel, Will Deacon, Robin Murphy, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, Krzysztof Kozlowski, Conor Dooley,
	Rob Herring
  Cc: Chris Morgan, Ryan Walklin, Philippe Simons, iommu, devicetree,
	linux-sunxi, linux-arm-kernel

Version two of this series adds a check that no physical address larger
than 4GB makes it into the PTEs: the map_pages() function returns an
error and prints a warning into dmesg to give users a clue why this
failed. I haven't tested whether this really happens, or whether the
32-bit DMA mask of the master devices already prevents this. In the
worst case this might fail on devices with 4GB of DRAM, but would always
work on smaller devices, which are arguably under bigger pressure to
find contiguous PA ranges. Changelog below.
===========================================

The Allwinner H616 contains an IOMMU almost compatible to the one used
in the H6. The differing default reset value of the bypass register
makes the two technically incompatible, so use a new DT compatible
string to be on the safe side.
The required driver changes can be applied to both variants, so the driver
is ignorant of the differences between the two for now.

Change the driver to cope with the new variant in patch 1/5 and 2/5,
then apply the required devicetree and binding changes in the remaining
patches.

I could just verify that the driver probes and allocates the page table
from below 4 GB. Others have verified that the driver works with the
(not yet upstream) video decoder engine, but more tests are surely
welcome.

Cheers,
Andre.

Changelog v1 .. v2:
- return error for too large PA in map_pages()
- add Krzysztof's ACK to the binding patch

Andre Przywara (4):
  iommu: sun50i: allocate page tables from below 4 GiB
  dt-bindings: iommu: add new compatible strings
  iommu: sun50i: Add H616 compatible string
  arm64: dts: allwinner: h616: add IOMMU node

Jernej Skrabec (1):
  iommu: sun50i: clear bypass register

 .../bindings/iommu/allwinner,sun50i-h6-iommu.yaml |  7 ++++++-
 arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi    |  9 +++++++++
 drivers/iommu/sun50i-iommu.c                      | 15 +++++++++++++--
 3 files changed, 28 insertions(+), 3 deletions(-)

-- 
2.39.4


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-11-19 13:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 22:40 [PATCH v2 0/5] iommu: sun50i: Add Allwinner H616 support Andre Przywara
2024-06-16 22:40 ` [PATCH v2 1/5] iommu: sun50i: clear bypass register Andre Przywara
2024-06-20 10:16   ` Chen-Yu Tsai
2024-06-16 22:40 ` [PATCH v2 2/5] iommu: sun50i: allocate page tables from below 4 GiB Andre Przywara
2024-06-20 10:17   ` Chen-Yu Tsai
2024-11-19 13:45   ` Parthiban
2024-06-16 22:40 ` [PATCH v2 3/5] dt-bindings: iommu: add new compatible strings Andre Przywara
2024-06-20 10:17   ` Chen-Yu Tsai
2024-06-16 22:40 ` [PATCH v2 4/5] iommu: sun50i: Add H616 compatible string Andre Przywara
2024-06-20 10:17   ` Chen-Yu Tsai
2024-06-16 22:40 ` [PATCH v2 5/5] arm64: dts: allwinner: h616: add IOMMU node Andre Przywara
2024-06-20  9:45   ` Ryan Walklin
2024-06-25 12:03 ` [PATCH v2 0/5] iommu: sun50i: Add Allwinner H616 support Joerg Roedel
2024-06-25 16:20   ` Chen-Yu Tsai
2024-06-27 10:15     ` Joerg Roedel
2024-06-27 14:02 ` (subset) " Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).