-
Notifications
You must be signed in to change notification settings - Fork 913
drivers: net: mqnic: Add initial driver support for Corundum (MQNIC) #2849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
56ccfe5
drivers: net: Add Corundum MQNIC driver
eliza-balas e84f0e4
dt-bindings: net: corundum,mqnic: Add device-tree binding for Corundu…
eliza-balas a3d07b5
arch: microblaze: configs: adi_mb_defconfig: Add corundum configs to …
eliza-balas bae6c1b
arch: microblaze: boot: dts: Add VCU118 Corundum support
eliza-balas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
Documentation/devicetree/bindings/net/corundum,mqnic.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # SPDX-License-Identifier: BSD-2-Clause-Views | ||
| # Copyright (c) 2019-2024 The Regents of the University of California | ||
| %YAML 1.2 | ||
| --- | ||
| $id: "http://devicetree.org/schemas/net/corundum,mqnic.yaml#" | ||
| $schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
|
||
| title: Corundum mqnic Ethernet controller | ||
|
|
||
| maintainers: | ||
| - Alex Forencich <[email protected]> | ||
|
|
||
| description: | | ||
| The Corundum mqnic is an open-source multi-queue network interface controller | ||
| for FPGA platforms. | ||
|
|
||
| properties: | ||
| compatible: | ||
| enum: | ||
| - corundum,mqnic | ||
|
|
||
| reg: | ||
| description: > | ||
| Address and length of the "control" register set. Optionally a second and | ||
| third range, the "app" and "ram" register sets may be added. | ||
|
|
||
| reg-names: | ||
| description: > | ||
| Names for each register region in 'reg'. | ||
|
|
||
| interrupts: | ||
| minItems: 1 | ||
| description: > | ||
| Should contain mqnic interrupt(s) | ||
|
|
||
| reset-gpios: | ||
| $ref: /schemas/gpio/gpio.yaml# | ||
| description: > | ||
| GPIO used to reset the device. This property is optional, but if present, | ||
| the RESET GPIO controller will be used to reset the device. | ||
|
|
||
| resets: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: > | ||
| Phandle to a reset controller node. This property is optional, but if | ||
| present, the device will be reset using the reset controller. | ||
|
|
||
| nvmem-cells: | ||
| description: > | ||
| Phandle of nvmem cell containing the base MAC address | ||
|
|
||
| nvmem-cell-names: | ||
| const: mac-address | ||
| description: > | ||
| Should be "mac-address" | ||
|
|
||
| mac-address-increment-byte: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: > | ||
| Index of base MAC address byte to increment (default: 0x5) | ||
|
|
||
| mac-address-increment: | ||
| $ref: /schemas/types.yaml#/definitions/uint32 | ||
| description: > | ||
| Number to add to the chosen base MAC address byte (default: 0x0) | ||
|
|
||
| mac-address-local: | ||
| type: boolean | ||
| description: > | ||
| Boolean, mark derived MAC addresses as "locally administrated" | ||
| (default: false) | ||
|
|
||
| module-eeproms: | ||
| $ref: /schemas/types.yaml#/definitions/phandle | ||
| description: > | ||
| Array of phandles to SFP module EEPROM node(s) | ||
|
|
||
| required: | ||
| - compatible | ||
| - reg | ||
| - interrupts | ||
|
|
||
| additionalProperties: false | ||
|
|
||
| examples: | ||
| - | | ||
| mqnic0: ethernet@a0000000 { | ||
| compatible = "corundum,mqnic"; | ||
| reg = <0x0 0xa0000000 0x0 0x1000000>, | ||
| <0x0 0xb0000000 0x0 0x1000000>; | ||
| reg-names = "csr", "app"; | ||
| interrupt-parent = <&gic>; | ||
| interrupts = <0x0 0x59 0x1>; | ||
|
|
||
| nvmem-cells = <&macaddress>; | ||
| nvmem-cell-names = "mac-address"; | ||
|
|
||
| mac-address-increment = <0x1>; | ||
| mac-address-local; | ||
|
|
||
| module-eeproms = <&module_eeprom_sfp0>; | ||
| }; | ||
|
|
||
| eeprom { | ||
| #address-cells = <1>; | ||
| #size-cells = <1>; | ||
|
|
||
| macaddress: macaddress@20 { | ||
| reg = <0x20 0x06>; | ||
| }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // SPDX-License-Identifier: GPL-2.0 | ||
| /* | ||
| * Analog Devices AD9081-FMC-EBZ | ||
| * https://wiki.analog.com/resources/tools-software/linux-drivers/iio-mxfe/ad9081 | ||
| * https://wiki.analog.com/resources/eval/user-guides/ad9081_fmca_ebz/ad9081_fmca_ebz_hdl | ||
| * | ||
| * hdl_project: <ad9081_fmca_ebz/vcu118> | ||
| * board_revision: <> | ||
| * | ||
| * Copyright (C) 2019-2025 Analog Devices Inc. | ||
| */ | ||
|
|
||
| #include "vcu118_ad9081_m8_l4.dts" | ||
|
|
||
| / { | ||
| model = "Analog Devices AD9081-FMCA-EBZ @Xilinx/vcu118 Corundum support"; | ||
| }; | ||
|
|
||
| &amba_pl { | ||
| corundum_reset: gpio@52000000 { | ||
| #gpio-cells = <2>; | ||
| clock-frequency = <100000000>; | ||
| clock-names = "s_axi_aclk"; | ||
| clocks = <&clk_bus_0>; | ||
| compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a"; | ||
| gpio-controller ; | ||
| reg = <0x52000000 0x1000>; | ||
| xlnx,all-inputs = <0x0>; | ||
| xlnx,all-inputs-2 = <0x0>; | ||
| xlnx,all-outputs = <0x1>; | ||
| xlnx,all-outputs-2 = <0x0>; | ||
| xlnx,dout-default = <0x00000000>; | ||
| xlnx,dout-default-2 = <0x00000000>; | ||
| xlnx,gpio-width = <0x1>; | ||
| xlnx,gpio2-width = <0x20>; | ||
| xlnx,interrupt-present = <0x0>; | ||
| xlnx,is-dual = <0x0>; | ||
| xlnx,tri-default = <0xFFFFFFFF>; | ||
| xlnx,tri-default-2 = <0xFFFFFFFF>; | ||
| }; | ||
| corundum: corundum_eth100g@50000000 { | ||
| compatible = "corundum,mqnic"; | ||
| reg = <0x50000000 0x1000000>; | ||
| reg-names = "csr"; | ||
| local-mac-address = [00 0a 35 00 01 02]; | ||
| interrupt-names = "irq"; | ||
| interrupt-parent = <&axi_intc>; | ||
| interrupts = <5 2>; | ||
| reset-gpios = <&corundum_reset 0 GPIO_ACTIVE_HIGH>; | ||
| }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # SPDX-License-Identifier: BSD-2-Clause-Views | ||
| # Copyright (c) 2019-2023 The Regents of the University of California | ||
|
|
||
| menuconfig CORUNDUM_MQNIC | ||
| tristate "Corundum MQNIC support" | ||
| select NET_DEVLINK | ||
| select I2C_ALGOBIT | ||
| depends on RTC_CLASS | ||
| help | ||
| Corundum is an open-source, FPGA-based Network Interface Card (NIC) | ||
| and platform designed for high-performance networking and in-network | ||
| compute applications. | ||
|
|
||
| Say yes here to build support for Corundum network interface card. | ||
|
|
||
| if CORUNDUM_MQNIC | ||
|
|
||
| config CORUNDUM_MQNIC_PCI | ||
| bool "Enable PCI support for Corundum MQNIC" | ||
| depends on CORUNDUM_MQNIC && PCI | ||
| help | ||
| Enable support for Corundum MQNIC devices connected via the PCI bus. | ||
| Corundum supports both PCI and AXI interfaces, so enabling this | ||
| option allows the driver to work with PCIe-based hardware. If you are | ||
| targeting FPGA boards or systems that use PCIe for host communication, | ||
| select this option. | ||
|
|
||
| endif # CORUNDUM_MQNIC | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # SPDX-License-Identifier: BSD-2-Clause-Views | ||
| # Copyright (c) 2019-2023 The Regents of the University of California | ||
|
|
||
| ifneq ($(KERNELRELEASE),) | ||
|
|
||
| # object files to build | ||
| obj-$(CONFIG_CORUNDUM_MQNIC) += mqnic.o | ||
| mqnic-y += mqnic_main.o | ||
| mqnic-y += mqnic_devlink.o | ||
| mqnic-y += mqnic_res.o | ||
| mqnic-y += mqnic_reg_block.o | ||
| mqnic-y += mqnic_irq.o | ||
| mqnic-y += mqnic_dev.o | ||
| mqnic-y += mqnic_if.o | ||
| mqnic-y += mqnic_port.o | ||
| mqnic-y += mqnic_netdev.o | ||
| mqnic-y += mqnic_sched_block.o | ||
| mqnic-y += mqnic_sched_port.o | ||
| mqnic-y += mqnic_scheduler.o | ||
| mqnic-y += mqnic_ptp.o | ||
| mqnic-y += mqnic_i2c.o | ||
| mqnic-y += mqnic_board.o | ||
| mqnic-y += mqnic_clk_info.o | ||
| mqnic-y += mqnic_stats.o | ||
| mqnic-y += mqnic_tx.o | ||
| mqnic-y += mqnic_rx.o | ||
| mqnic-y += mqnic_cq.o | ||
| mqnic-y += mqnic_eq.o | ||
| mqnic-y += mqnic_ethtool.o | ||
|
|
||
| ifneq ($(DEBUG),) | ||
| ccflags-y += -DDEBUG | ||
| endif | ||
|
|
||
| else | ||
|
|
||
| ifneq ($(KERNEL_SRC),) | ||
| # alternatively to variable KDIR accept variable KERNEL_SRC as used in | ||
| # PetaLinux/Yocto for example | ||
| KDIR ?= $(KERNEL_SRC) | ||
| endif | ||
|
|
||
| KDIR ?= /lib/modules/$(shell uname -r)/build | ||
|
|
||
| all: modules | ||
|
|
||
| help modules modules_install clean: | ||
| $(MAKE) -C $(KDIR) M=$(shell pwd) $@ | ||
|
|
||
| install: modules_install | ||
|
|
||
| endif | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.