1
0
Fork 0
alistair23-linux/drivers/bus
Marek Behún 5bc7f990cd bus: Add support for Moxtet bus
On the Turris Mox router different modules can be connected to the main
CPU board: currently a module with a SFP cage, a module with MiniPCIe
connector, a PCIe pass-through MiniPCIe connector module, a 4-port
switch module, an 8-port switch module, and a 4-port USB3 module.

For example:
  [CPU]-[PCIe-pass-through]-[PCIe]-[8-port switch]-[8-port switch]-[SFP]

Each of this modules has an input and output shift register, and these
are connected via SPI to the CPU board.

Via SPI we are able to discover which modules are connected, in which
order, and we can also read some information about the modules (eg.
their interrupt status), and configure them.
From each module 8 bits can be read (of which low 4 bits identify the
module) and 8 bits can be written.

For example from the module with a SFP cage we can read the LOS,
TX-FAULT and MOD-DEF0 signals, while we can write TX-DISABLE and
RATE-SELECT signals.

This driver creates a new bus type, called "moxtet". For each Mox module
it finds via SPI, it creates a new device on the moxtet bus so that
drivers can be written for them.

It also implements a virtual interrupt controller for the modules which
send their interrupt status over the SPI shift register. These modules
do this in addition to sending their interrupt status via the shared
interrupt line. When the shared interrupt is triggered, we read from the
shift register and handle IRQs for all devices which are in interrupt.

The topology of how Mox modules are connected can then be read by
listing /sys/bus/moxtet/devices.

Link: https://lore.kernel.org/r/20190812161118.21476-2-marek.behun@nic.cz
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-08-14 15:30:35 +02:00
..
fsl-mc bus: mc-bus: Add support for mapping shareable portals 2019-05-20 14:28:16 -05:00
Kconfig bus: Add support for Moxtet bus 2019-08-14 15:30:35 +02:00
Makefile bus: Add support for Moxtet bus 2019-08-14 15:30:35 +02:00
arm-cci.c bus: arm-cci: remove unnecessary unreachable() 2018-05-14 01:22:49 -07:00
brcmstb_gisb.c This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers changes 2019-06-17 04:52:52 -07:00
da8xx-mstpri.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hisi_lpc.c bus: hisi_lpc: Don't fail probe for unrecognised child devices 2019-02-08 09:18:53 +00:00
imx-weim.c bus: imx-weim: guard against timing configuration conflicts 2019-01-11 15:16:45 +08:00
mips_cdmm.c MIPS/BUS/CDMM: Convert to hotplug state machine 2016-09-06 18:30:25 +02:00
moxtet.c bus: Add support for Moxtet bus 2019-08-14 15:30:35 +02:00
mvebu-mbus.c bus: mvebu-mbus: Convert to using %pOFn instead of device_node.name 2018-09-28 16:41:57 -05:00
omap-ocp2scp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
omap_l3_noc.c bus: omap: add MODULE_LICENSE tags 2018-01-11 18:02:56 -08:00
omap_l3_noc.h bus: omap_l3_noc: Fix master id address decoding for OMAP5 2015-05-04 10:21:01 -07:00
omap_l3_smx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
omap_l3_smx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
qcom-ebi2.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
simple-pm-bus.c drivers: bus: Add Simple Power-Managed Bus Driver 2015-02-24 06:36:18 +09:00
sun50i-de2.c bus: add bus driver for accessing Allwinner A64 DE2 2018-06-28 10:20:19 +02:00
sunxi-rsb.c sunxi-rsb: Include OF based modalias in device uevent 2017-12-05 09:14:30 +01:00
tegra-aconnect.c bus: tegra-aconnect: add system sleep callbacks 2019-03-28 17:26:14 +01:00
tegra-gmi.c bus: Add support for Tegra Generic Memory Interface 2016-11-15 17:27:53 +01:00
ti-sysc.c bus: ti-sysc: Add support for module specific reset quirks 2019-06-10 04:52:22 -07:00
ts-nbus.c gpiolib: Pass array info to get/set array functions 2018-09-13 11:16:54 +02:00
uniphier-system-bus.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
vexpress-config.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00