Skip to contentSkip to conversation

arm64: dts: marvell: add DTS for 7215-IXS-A1 board

PATCH RESEND In review Natarajan Subbiramani 3 participants 4 messages Mar 29, 2024 – Apr 1, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 arm64: dts: marvell: add DTS for 7215-IXS-A1 board

From: nsubbara <[email protected]>

7215-IXS-A1 is an aggregation switch based on Marvell AlleyCat5X. This dts is extracted from Marvell cn9130-crb and removed unused nodes along with platform specific changes.

---
 arch/arm64/boot/dts/marvell/7215-ixs-a1.dts | 226 ++++++++++++++++++++
 arch/arm64/boot/dts/marvell/Makefile        |   1 +
 2 files changed, 227 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/7215-ixs-a1.dts
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +226 -0
new file mode 100644
index 000000000000..e683b7ca4c9c
@@ -0,0 +1,226 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2024 Nokia
+ * Copyright (C) 2020 Marvell International Ltd.
+ */
+
+#include "cn9130.dtsi" /* include SoC device tree */
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	#address-cells = <0x02>;
+	#size-cells = <0x02>;
+	model = "7215 IXS-A1";
+	compatible = "marvell,cn9130\0marvell,armada-ap807-quad\0marvell,armada-ap807";
+
+	aliases {
+		i2c0 = &cp0_i2c0;
+		ethernet0 = &cp0_eth0;
+		ethernet1 = &cp0_eth1;
+		ethernet2 = &cp0_eth2;
+		gpio1 = &cp0_gpio1;
+		gpio2 = &cp0_gpio2;
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x0 0x0 0x80000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <0x02>;
+		#size-cells = <0x02>;
+		ranges;
+
+		/delete-node/ psci-area@4000000;
+
+		buf1: buffer@4000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x04000000 0x0 0x02000000>;
+			no-map;
+		};
+		psci-area@6000000 {
+			reg = <0x0 0x06000000 0x0 0x00200000>;
+			no-map;
+		};
+	};
+
+	mv_dma {
+		compatible = "marvell,mv_dma";
+		memory-region = <&buf1>;
+		status = "okay";
+	};
+
+	cp0_usb3_0_phy0: cp0_usb3_phy0 {
+		compatible = "usb-nop-xceiv";
+	};
+
+	cp0_usb3_0_phy1: cp0_usb3_phy1 {
+		compatible = "usb-nop-xceiv";
+	};
+};
+
+&cp0_syscon0 {
+	cp0_pinctrl: pinctrl {
+		compatible = "marvell,cp115-standalone-pinctrl";
+
+		cp0_i2c0_pins: cp0-i2c-pins-0 {
+			marvell,pins = "mpp37", "mpp38";
+			marvell,function = "i2c0";
+		};
+		cp0_i2c1_pins: cp0-i2c-pins-1 {
+			marvell,pins = "mpp35", "mpp36";
+			marvell,function = "i2c1";
+		};
+		cp0_spi0_pins: cp0-spi-pins-0 {
+			marvell,pins = "mpp13", "mpp14", "mpp15", "mpp16";
+			marvell,function = "spi1";
+		};
+	};
+};
+
+&cp0_gpio1 {
+	status = "okay";
+};
+
+&cp0_gpio2 {
+	status = "okay";
+};
+
+&cp0_pcie0 {
+	status = "okay";
+	num-lanes = <4>;
+	num-viewport = <8>;
+	/* Generic PHY, providing serdes lanes */
+	phys = <&cp0_comphy0 0
+		&cp0_comphy1 0
+		&cp0_comphy2 0
+		&cp0_comphy3 0>;
+	iommu-map =
+		<0x0   &smmu 0x480 0x20>,
+		<0x100 &smmu 0x4a0 0x20>,
+		<0x200 &smmu 0x4c0 0x20>;
+	iommu-map-mask = <0x031f>;
+};
+
+&uart0 {
+	status = "okay";
+};
+
+/* on-board eMMC U6 */
+&ap_sdhci0 {
+	pinctrl-names = "default";
+	bus-width = <8>;
+	status = "okay";
+	non-removable;
+	mmc-ddr-1_8v;
+	mmc-hs200-1_8v;
+	mmc-hs400-1_8v;
+};
+
+/*Delete nodes that are not available*/
+/delete-node/ &cp0_rtc;
+/delete-node/ &cp0_sdhci0;
+/delete-node/ &cp0_crypto;
+
+&cp0_i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cp0_i2c0_pins>;
+	status = "okay";
+	clock-frequency = <100000>;
+	rtc@68 {
+		compatible = "st,m41t11";
+		reg = <0x68>;
+	};
+};
+
+&cp0_i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cp0_i2c1_pins>;
+	clock-frequency = <100000>;
+	status = "okay";
+};
+
+&cp0_usb3_0 {
+	status = "okay";
+	usb-phy = <&cp0_usb3_0_phy0>;
+	phy-names = "usb";
+};
+
+&cp0_usb3_1 {
+	status = "okay";
+	usb-phy = <&cp0_usb3_0_phy1>;
+	phy-names = "usb";
+};
+
+&cp0_spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&cp0_spi0_pins>;
+	reg = <0x700680 0x50>,		/* control */
+	      <0x2000000 0x1000000>;	/* CS0 */
+	status = "okay";
+
+	flash@0 {
+		#address-cells = <0x1>;
+		#size-cells = <0x1>;
+		compatible = "jedec,spi-nor";
+		reg = <0x0>;
+		/* On-board MUX does not allow higher frequencies */
+		spi-max-frequency = <40000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0x0 0x2f0000>;
+			};
+
+			partition@1 {
+				label = "U-Boot-Env";
+				reg = <0x2f0000 0x10000>;
+			};
+
+			partition@2{
+				label = "Filesystem";
+				reg = <0x300000 0xd00000>;
+			};
+		};
+	};
+};
+
+&cp0_mdio {
+	status = "okay";
+	phy0: ethernet-phy@0 {
+		reg = <0>;
+		/* Management port LED blink activity*/
+		marvell,reg-init = <0x03 0x10 0x0 0x1140>;
+	};
+};
+
+&cp0_xmdio {
+	status = "disabled";
+};
+
+&cp0_ethernet {
+	status = "okay";
+};
+
+&cp0_eth0 {
+	status = "disabled";
+};
+
+&cp0_eth1 {
+	status = "disabled";
+};
+
+&cp0_eth2 {
+	/* This port uses "sgmii" phy-mode */
+	status = "okay";
+	phy = <&phy0>;
+	phys = <&cp0_comphy5 2>;
+	phy-mode = "sgmii";
+};
arch/arm64/boot/dts/marvell/Makefile +1 -0
index 99b8cb3c49e1..124a7d1fd5a8 100644
@@ -28,3 +28,4 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-B.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5x-rd-carrier-cn9131.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5-98dx35xx-rd.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += 7215-ixs-a1.dtb

base-commit: 6b6f1082cb46d72823b7ea99c058c601668ba1d3

Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#1 lore raw
Quoted 5 lines
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +5 -0
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2024 Nokia
+ * Copyright (C) 2020 Marvell International Ltd.
+ */

arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 15

Quoted 10 lines
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +10 -0
+
+#include "cn9130.dtsi" /* include SoC device tree */
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+	#address-cells = <0x02>;
+	#size-cells = <0x02>;
+	model = "7215 IXS-A1";
+	compatible = "marvell,cn9130\0marvell,armada-ap807-quad\0marvell,armada-ap807";

Could you please explain the \0 ?

Also, there is generally a compatible which has something to do with the actual product, 7215 IXS-A1, not just the RDK it is based on.

arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 200

Quoted 6 lines

+&cp0_mdio {

arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +5 -0
+	status = "okay";
+	phy0: ethernet-phy@0 {
+		reg = <0>;
+		/* Management port LED blink activity*/
+		marvell,reg-init = <0x03 0x10 0x0 0x1140>;

Please configure this via /sys/class/leds. Take a look at armada 370 rd for an example for what you need in DT.

arch/arm64/boot/dts/marvell/Makefile dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb · line 31

Quoted 9 lines
arch/arm64/boot/dts/marvell/Makefile +1 -0
index 99b8cb3c49e1..124a7d1fd5a8 100644
@@ -28,3 +28,4 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-B.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5x-rd-carrier-cn9131.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5-98dx35xx-rd.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += 7215-ixs-a1.dtb

This file is sorted alphabetically. It is not so important for this file, but Makefiles which see a lot of changed get merge conflicts if you always add at the end. By keeping it in alphabetic order it tends to spread changes out so they are less likely to cause such conflicts.

Also, maybe this should be nokia-7215-ixs-a1.dtb?

Andrew

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
Quoted 10 lines
Quoted 10 lines
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +9 -0
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2024 Nokia
+ * Copyright (C) 2020 Marvell International Ltd.
+ */
+
+#include "cn9130.dtsi" /* include SoC device tree */
+
+#include <dt-bindings/gpio/gpio.h>
Quoted 8 lines

arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 15

Quoted 6 lines
arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +6 -0
+
+/ {
+     #address-cells = <0x02>;
+     #size-cells = <0x02>;
+     model = "7215 IXS-A1";
+     compatible = "marvell,cn9130\0marvell,armada-ap807-quad\0marvell,armada-ap807";

Could you please explain the \0 ?

We inherited this from the Marvell SDK for our board. Sure, We will remove this compatible property and use the default present in included the dtsi file.

Quoted 11 lines

Also, there is generally a compatible which has something to do with the actual product, 7215 IXS-A1, not just the RDK it is based on.

arch/arm64/boot/dts/marvell/7215-ixs-a1.dts line 200

Quoted 6 lines

+&cp0_mdio {

arch/arm64/boot/dts/marvell/7215-ixs-a1.dts new file +5 -0
+     status = "okay";
+     phy0: ethernet-phy@0 {
+             reg = <0>;
+             /* Management port LED blink activity*/
+             marvell,reg-init = <0x03 0x10 0x0 0x1140>;
Quoted 2 lines

Please configure this via /sys/class/leds. Take a look at armada 370 rd for an example for what you need in DT.

The present Network Operating System (NOS) lacks the LED functionality modifications in the Marvell PHY drivers you mentioned. Therefore, we cannot verify the suggested changes at this time. We plan to address this by upgrading to the latest kernel and conducting thorough testing. Thank you for taking the time to review the changes.

Quoted 16 lines

arch/arm64/boot/dts/marvell/Makefile dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb · line 31

Quoted 10 lines
arch/arm64/boot/dts/marvell/Makefile +1 -0
index 99b8cb3c49e1..124a7d1fd5a8 100644
@@ -28,3 +28,4 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-B.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5x-rd-carrier-cn9131.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5-98dx35xx-rd.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += 7215-ixs-a1.dtb

This file is sorted alphabetically. It is not so important for this file, but Makefiles which see a lot of changed get merge conflicts if you always add at the end. By keeping it in alphabetic order it tends to spread changes out so they are less likely to cause such conflicts.

Quoted 1 line

Also, maybe this should be nokia-7215-ixs-a1.dtb?

This was intentional, we will move it as per alphabetical order when we upstream again.

Quoted 2 lines

Andrew

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#3 lore raw
In reply to Natarajan Subbiramani
Quoted 6 lines · Natarajan Subbiramani

From: nsubbara <[email protected]>

7215-IXS-A1 is an aggregation switch based on Marvell AlleyCat5X. This dts is extracted from Marvell cn9130-crb and removed unused nodes along with platform specific changes.

Quoted 7 lines
---
 arch/arm64/boot/dts/marvell/7215-ixs-a1.dts | 226 ++++++++++++++++++++
 arch/arm64/boot/dts/marvell/Makefile        |   1 +
 2 files changed, 227 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/7215-ixs-a1.dts

My bot found new DTB warnings on the .dts files added or changed in this series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:

  pip3 install dtschema --upgrade

New warnings running 'make CHECK_DTBS=y marvell/7215-ixs-a1.dtb' for [email protected]:

arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: ap807: $nodename:0: 'ap807' does not match '^([a-z][a-z0-9\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
from schema $id: http://devicetree.org/schemas/simple-bus.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: config-space@f0000000: $nodename:0: 'config-space@f0000000' does not match '^([a-z][a-z0-9\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
from schema $id: http://devicetree.org/schemas/simple-bus.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: config-space@f0000000: timer: {'compatible': ['arm,armv8-timer'], 'interrupts': [[1, 13, 3848], [1, 14, 3848], [1, 11, 3848], [1, 10, 3848]]} should not be valid under {'type': 'object'}
from schema $id: http://devicetree.org/schemas/simple-bus.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: config-space@f0000000: pmu: {'compatible': ['arm,cortex-a72-pmu'], 'interrupt-parent': [[2]], 'interrupts': [[17]]} should not be valid under {'type': 'object'}
from schema $id: http://devicetree.org/schemas/simple-bus.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: mmc@6e0000: clocks: [[4, 4]] is too short
from schema $id: http://devicetree.org/schemas/mmc/marvell,xenon-sdhci.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: mmc@6e0000: clock-names: ['core'] is too short
from schema $id: http://devicetree.org/schemas/mmc/marvell,xenon-sdhci.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: mmc@6e0000: Unevaluated properties are not allowed ('dma-coherent' was unexpected)
from schema $id: http://devicetree.org/schemas/mmc/marvell,xenon-sdhci.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: gpio@1040: Unevaluated properties are not allowed ('gpio-ranges' was unexpected)
from schema $id: http://devicetree.org/schemas/gpio/gpio-mvebu.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: cp0: $nodename:0: 'cp0' does not match '^([a-z][a-z0-9\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
from schema $id: http://devicetree.org/schemas/simple-bus.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: config-space@f2000000: $nodename:0: 'config-space@f2000000' does not match '^([a-z][a-z0-9\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
from schema $id: http://devicetree.org/schemas/simple-bus.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: gpio@100: Unevaluated properties are not allowed ('gpio-ranges' was unexpected)
from schema $id: http://devicetree.org/schemas/gpio/gpio-mvebu.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: gpio@140: Unevaluated properties are not allowed ('gpio-ranges' was unexpected)
from schema $id: http://devicetree.org/schemas/gpio/gpio-mvebu.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: usb@500000: Unevaluated properties are not allowed ('dma-coherent' was unexpected)
from schema $id: http://devicetree.org/schemas/usb/generic-xhci.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: usb@510000: Unevaluated properties are not allowed ('dma-coherent' was unexpected)
from schema $id: http://devicetree.org/schemas/usb/generic-xhci.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: cp0_usb3_phy0: '#phy-cells' is a required property
from schema $id: http://devicetree.org/schemas/usb/usb-nop-xceiv.yaml#
arch/arm64/boot/dts/marvell/7215-ixs-a1.dtb: cp0_usb3_phy1: '#phy-cells' is a required property
from schema $id: http://devicetree.org/schemas/usb/usb-nop-xceiv.yaml#

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel