arm64: dts: marvell: add DTS for 7215-IXS-A1 board
Subsystems (2)
PATCH 1/1 arm64: dts: marvell: add DTS for 7215-IXS-A1 board
From: Natarajan Subbiramani <[email protected]>
7215-IXS-A1 is an aggregation switch based on Marvell AlleyCat5X. This dts is extracted from Marvell RD-AC5X and modified to adjust the default LED configuration of Mangement port, specifically tailored for this platform.
These files have been taken from the Marvell SDK and lightly cleaned up with the License and copyright retained.
--- arch/arm64/boot/dts/marvell/7215-ixs-a1.dts | 108 ++++++++++++++++++++ arch/arm64/boot/dts/marvell/Makefile | 1 + 2 files changed, 109 insertions(+) create mode 100644 arch/arm64/boot/dts/marvell/7215-ixs-a1.dts
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +108 -0
@@ -0,0 +1,108 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2023 Nokia + * Copyright (C) 2021 Marvell + * Copyright (C) 2022 Allied Telesis Labs + */ +/* + * Device Tree file for Nokia 7215-IXS-A1 + */ + +/dts-v1/; + +#include "ac5-98dx35xx.dtsi" + +/ { + model = "7215-IXS-A1"; + compatible = "marvell,rd-ac5x", "marvell,ac5x", "marvell,ac5"; + + aliases { + serial0 = &uart0; + spiflash0 = &spiflash0; + gpio0 = &gpio0; + gpio1 = &gpio1; + ethernet0 = ð0; + ethernet1 = ð1; + }; + + memory@0 { + device_type = "memory"; + reg = <0x2 0x00000000 0x0 0x40000000>; + }; + + usb1phy: usb-phy { + compatible = "usb-nop-xceiv"; + #phy-cells = <0>; + }; +}; + +&mdio { + phy0: ethernet-phy@0 { + marvell,reg-init = <0x03 0x10 0x0 0x1140>; + reg = <0>; + }; +}; + +&i2c0 { + status = "okay"; +}; + +&i2c1 { + status = "okay"; +}; + +ð0 { + status = "okay"; + phy-handle = <&phy0>; +}; + +/* USB0 is a host USB */ +&usb0 { + status = "okay"; +}; + +/* USB1 is a peripheral USB */ +&usb1 { + status = "okay"; + phys = <&usb1phy>; + phy-names = "usb-phy"; + dr_mode = "peripheral"; +}; + +&spi0 { + status = "okay"; + + spiflash0: flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + spi-tx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */ + spi-rx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */ + reg = <0>; + + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "spi_flash_part0"; + reg = <0x0 0x800000>; + }; + + parition@1 { + label = "spi_flash_part1"; + reg = <0x800000 0x700000>; + }; + + parition@2 { + label = "spi_flash_part2"; + reg = <0xF00000 0x100000>; + }; + }; +}; + +/{ + sdma_drv { + compatible = "marvell,mvppnd"; + interrupts = <GIC_SPI 0x23 IRQ_TYPE_LEVEL_HIGH>; + status = "okay"; + }; +};
arch/arm64/boot/dts/marvell/Makefile +1 -0
@@ -27,3 +27,4 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9132-db-B.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-B.dtb dtb-$(CONFIG_ARCH_MVEBU) += ac5-98dx35xx-rd.dtb +dtb-$(CONFIG_ARCH_MVEBU) += 7215-ixs-a1.dtb
base-commit: 4853c74bd7ab7fdb83f319bd9ace8a08c031e9b6
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Andrew Lunn
maintainerarch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 41
Quoted 3 lines
+&mdio {
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +2
-0+ phy0: ethernet-phy@0 { + marvell,reg-init = <0x03 0x10 0x0 0x1140>;
Please document what this is doing? I assume it is changing an LED? But i'm too lazy to go look at the datasheet.
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 8 lines · Andrew Lunn
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 41
Quoted 4 lines
+&mdio {
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +2
-0+ phy0: ethernet-phy@0 { + marvell,reg-init = <0x03 0x10 0x0 0x1140>;Please document what this is doing? I assume it is changing an LED? But i'm too lazy to go look at the datasheet.
Yes, This is to configure the management port LED to turn ON/OFF on Link Up/Down state and BLINK on activity.
Quoted 1 line
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Andrew Lunn
maintainerQuoted 11 lines · Natarajan Subbiramani
Quoted 8 lines · Andrew Lunn
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 41
Quoted 4 lines
+&mdio {
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +2
-0+ phy0: ethernet-phy@0 { + marvell,reg-init = <0x03 0x10 0x0 0x1140>;Please document what this is doing? I assume it is changing an LED? But i'm too lazy to go look at the datasheet.
Yes, This is to configure the management port LED to turn ON/OFF on Link Up/Down state and BLINK on activity.
So there is new code merged recently to control the marvell LEDs from userspace. Please take a look at arch/arm/boot/dts/marvell/armada-370-rd.dts which defines an LED as part of ethernet-phy@0. The LED then appears in /sys/class/leds/<foobar>/wan in this case, and you can configure it for your use cases. I have a device tree binding in progress to be able to specify the configuration, but that is not merged yet. marvell,reg-init is a pretty horrible interface, so i would prefer not to add any more users.
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 14 lines · Andrew Lunn
Quoted 11 lines · Natarajan Subbiramani
Quoted 8 lines · Andrew Lunn
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 41
Quoted 4 lines
+&mdio {
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +2
-0+ phy0: ethernet-phy@0 { + marvell,reg-init = <0x03 0x10 0x0 0x1140>;Please document what this is doing? I assume it is changing an LED? But i'm too lazy to go look at the datasheet.
Yes, This is to configure the management port LED to turn ON/OFF on Link Up/Down state and BLINK on activity.
Quoted 9 lines
So there is new code merged recently to control the marvell LEDs from userspace. Please take a look at
arch/arm/boot/dts/marvell/armada-370-rd.dtswhich defines an LED as part of ethernet-phy@0. The LED then appears in /sys/class/leds/<foobar>/wan in this case, and you can configure it for your use cases. I have a device tree binding in progress to be able to specify the configuration, but that is not merged yet. marvell,reg-init is a pretty horrible interface, so i would prefer not to add any more users.
Thank you for the information.
These changes are for a NOS which is based on 5.10.140.
The new code and its dt-binding changes are not available.
Could you please allow "marvell,reg-init" interface to customize 7215-ixs-a1?
Quoted 1 line
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Andrew Lunn
maintainerQuoted 1 line
These changes are for a NOS which is based on 5.10.140.
I hope you actually mean 5.10.190ish, or are you really 50 releases behind?
Anyway, you are submitting to mainline, so you should use the facilities mainline offers. When you back port to the old kernel in your NOS fork, you can use whatever properties you want, since that is not mainline.
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 11 lines · Andrew Lunn
Quoted 2 lines
These changes are for a NOS which is based on 5.10.140.
I hope you actually mean 5.10.190ish, or are you really 50 releases behind?
Anyway, you are submitting to mainline, so you should use the facilities mainline offers. When you back port to the old kernel in your NOS fork, you can use whatever properties you want, since that is not mainline.
Sure, Then I will keep these changes in our NOS right now and will push to upstream once our NOS is upgraded to the latest version. Thank you for your time in reviewing and providing valuable comments.
Quoted 1 line
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel