arm64: dts: marvell: armada-37xx: Add DTS file for Turris Mox
Subsystems (2)
PATCH 1/1 arm64: dts: marvell: armada-37xx: Add DTS file for Turris Mox
This adds support for the Turris Mox board from CZ.NIC.
Turris Mox is as modular router based on the Armada 3720 SOC (same as EspressoBin).
The basic module can be extended by different modules. When those modules are connected, U-Boot shall patch this device-tree by enabling nodes corresponding to those modules.
--- .../arm/marvell/armada-3720-turris-mox.txt | 6 + arch/arm64/boot/dts/marvell/Makefile | 1 + .../boot/dts/marvell/armada-3720-turris-mox.dts | 817 +++++++++++++++++++++ 3 files changed, 824 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/marvell/armada-3720-turris-mox.txt create mode 100644 arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
Documentation/devicetree/bindings/arm/marvell/armada-3720-turris-mox.txt new file +6 -0
@@ -0,0 +1,6 @@ +CZ.NIC's Turris Mox SOHO router Device Tree Bindings +---------------------------------------------------- + +Required root node property: + +compatible: must contain "cznic,turris-mox"
arch/arm64/boot/dts/marvell/Makefile +1 -0
@@ -2,6 +2,7 @@ # Mvebu SoC Family dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-db.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-espressobin.dtb +dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-turris-mox.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-7040-db.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-db.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-mcbin.dtb
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +817 -0
817 lines not on this page · raw message
Signature · 1 line
2.16.4
Andrew Lunn
maintainerPATCH 1/1 arm64: dts: marvell: armada-37xx: Add DTS file for Turris Mox
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts line 184
Quoted 3 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +3
-0+ switch0 at 10 { + compatible = "marvell,mv88e6190"; + reg = <0x10 0>;
MDO reg should have a single value, i think.
Quoted 2 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +2
-0+ switch0 at 2 { + status = "disabled";
...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch1 at 11 { + status = "disabled";
...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch1 at 2 { + status = "disabled";
...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch2 at 12 { + status = "disabled";
...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch2 at 2 { + status = "disabled";
...
Review
Quoted 2 lines
(quoted diff) +2
-0+ }; +};
I'm assuming the boatloader is probing the hardware, and then enabling what it finds? This is a poor mans DT fragments. Lets see that Rob has to say about this.
Quoted 12 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +12
-0+ moxtet at 1 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "cznic,moxtet"; + reg = <1>; + devrst-gpio = <&gpiosb 2 GPIO_ACTIVE_LOW>; + spi-max-frequency = <1000000>; + spi-cpol; + spi-cpha; + + moxtet_sfp: moxtet-sfp at 0 { + compatible = "cznic,moxtet-gpio";
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts line 812
Quoted 10 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +10
-0+ gpio-controller; + #gpio-cells = <2>; + reg = <0>; + moxtet,id = <1>; + moxtet,input-mask = <0x7>; + moxtet,output-mask = <0x3>; + status = "disabled"; + }; + }; +};
Have the drivers for this been merged yet?
Andrew
PATCH 1/1 arm64: dts: marvell: armada-37xx: Add DTS file for Turris Mox
Quoted 29 lines · On Thu, 30 Aug 2018 17:57:01 +0200 Andrew Lunn <[email protected]> wrote:
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts line 184
Quoted 3 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +3
-0+ switch0 at 10 { + compatible = "marvell,mv88e6190"; + reg = <0x10 0>;MDO reg should have a single value, i think.
Quoted 2 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +2
-0+ switch0 at 2 { + status = "disabled";...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch1 at 11 { + status = "disabled";...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch1 at 2 { + status = "disabled";...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch2 at 12 { + status = "disabled";...
Quoted 4 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +4
-0+ }; + + switch2 at 2 { + status = "disabled";...
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ }; +};I'm assuming the boatloader is probing the hardware, and then enabling what it finds? This is a poor mans DT fragments. Lets see that Rob has to say about this.
The bootloader can read which hardware is connected via a SPI shift register. Three switch modules can be connected in DSA, in these possibilities:
6190
6190-6190
6190-6190-6190
6141
6190-6141
6190-6190-6141
At first I had the Linux's device tree completely without the switch nodes, and I generated the nodes via libfdt in u-boot, but the code was terrible to read. This way u-boot's code is nice and readable.
Quoted 17 lines
Quoted 17 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +16
-0+ moxtet at 1 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "cznic,moxtet"; + reg = <1>; + devrst-gpio = <&gpiosb 2 GPIO_ACTIVE_LOW>; + spi-max-frequency = <1000000>; + spi-cpol; + spi-cpha; + + moxtet_sfp: moxtet-sfp at 0 { + compatible = "cznic,moxtet-gpio"; + gpio-controller; + #gpio-cells = <2>; + reg = <0>; + moxtet,id = <1>;
Quoted 8 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts line 812
Quoted 6 lines
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts new file +6
-0+ moxtet,input-mask = <0x7>; + moxtet,output-mask = <0x3>; + status = "disabled"; + }; + }; +};Have the drivers for this been merged yet?
No, I sent the patches today as this one.
Quoted 2 lines
Andrew