Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d51ce720 authored by Jinesh K. Jayakumar's avatar Jinesh K. Jayakumar
Browse files

net: aquantia: smmu support via devicetree



Enable support for attaching Aquantia PCI NIC to SMMU with configuration
via devicetree.

CRs-Fixed: 2309519
Change-Id: Iff1f54cbaf25040cb6ea5512c0867955dee727a8
Signed-off-by: default avatarJinesh K. Jayakumar <jineshk@codeaurora.org>
parent 88e829ae
Loading
Loading
Loading
Loading
+52 −0
Original line number Diff line number Diff line
Aquantia Corporation AQC/AQN 107/108/109 Ethernet Controller


Required properties:

- compatible : should be one of "aquantia,aqc-107", "aquantia,aqc-108",
  "aquantia,aqc-109"

If SMMU is present, also use:

- qcom,smmu : if present, SMMU attach is performed
- qcom,smmu-iova-base : SMMU IOVA start address the device can access
- qcom,smmu-iova-size : SMMU IOVA size the device can access

Optional Properties:

- qcom,smmu-attr-s1-bypass : Bypasses SMMU S1 translation
- qcom,smmu-attr-fastmap : Enables SMMU fastmap
- qcom,smmu-attr-atomic : Enables DMA alloc using GFP_ATOMIC
- qcom,smmu-attr-pt-coherent : Use if DMA coherency is available for SMMU page tables


Example:

&pcie_rc0 {

	aqc_x1: qcom,aqc@0 {
		compatible = "aquantia,aqc-107";

		qcom,smmu;
		qcom,smmu-iova-base = /bits/ 64 <0x0>;
		qcom,smmu-iova-size = /bits/ 64 <0x100000000>;

		qcom,smmu-attr-s1-bypass;
	};
};

&pcie_rc1 {

	aqc_x4: qcom,aqc@1 {
		compatible = "aquantia,aqc-107";

		qcom,smmu;
		qcom,smmu-iova-base = /bits/ 64 <0x0>;
		qcom,smmu-iova-size = /bits/ 64 <0x100000000>;

		qcom,smmu-attr-atomic;
		qcom,smmu-attr-fastmap;
		qcom,smmu-attr-pt-coherent;
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ andestech Andes Technology Corporation
android	Google
apm	Applied Micro Circuits Corporation (APM)
aptina	Aptina Imaging
aquantia	Aquantia Corporation
arasan	Arasan Chip Systems
arctic	Arctic Sand
aries	Aries Embedded GmbH
+8 −0
Original line number Diff line number Diff line
@@ -26,4 +26,12 @@ config AQFWD
	depends on PCI && (X86_64 || ARM64)
	---help---
	  This enables the support for forwarding driver for the aQuantia AQtion(tm) Ethernet card.

config AQFWD_QCOM
	bool "QTI MSM/MDM target support"
	depends on AQFWD
	depends on ARCH_QCOM
	help
	  Enable support for integration with Qualcomm Technologies, Inc. chipsets.

endif # NET_VENDOR_AQUANTIA
+4 −0
Original line number Diff line number Diff line
@@ -39,4 +39,8 @@ atlantic-fwd-objs := atl_fw.o \
		     atl_compat.o \
		     atl_hwmon.o

atlantic-fwd-$(CONFIG_OF) += atl_of.o

atlantic-fwd-$(CONFIG_AQFWD_QCOM) += atl_qcom.o

CFLAGS_atl_trace.o := -I$(src)
+6 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>

#include "atl_of.h"

const char atl_driver_name[] = "atlantic-fwd";

int atl_max_queues = ATL_MAX_QUEUES;
@@ -290,6 +292,10 @@ static int atl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
		return -EINVAL;
	}

	ret = atl_parse_dt(&pdev->dev);
	if (ret)
		return ret;

	ret = pci_enable_device_mem(pdev);
	if (ret)
		return ret;
Loading