Files
eternalwrt-mt798x/target/linux/mvebu/patches-6.12/325-arm-dts-marvell-add-LED-aliases-and-USB-ports-to-Cte.patch
T
Shiji YangandHauke Mehrtens a06c79212a mvebu: fix usb node dtc warnings for Ctera C200 V2
Correct #address-cells and #size-cells based on child node reg
property structure to fix the following dtc warnings:

armada-370-c200-v2.dts:342.6-16: Warning (reg_format): /soc/pcie@82000000/pcie@1,0/bridge@0,1/usb@1,0/port@1:reg: property has invalid length (4 bytes) (#address-cells == 3, #size-cells == 2)
armada-370-c200-v2.dts:347.6-16: Warning (reg_format): /soc/pcie@82000000/pcie@1,0/bridge@0,1/usb@1,0/port@2:reg: property has invalid length (4 bytes) (#address-cells == 3, #size-cells == 2)

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18242
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-19 21:55:34 +02:00

122 lines
3.0 KiB
Diff

From a926f75a98612349885528aef26beb6265eaa027 Mon Sep 17 00:00:00 2001
From: Stefan Kalscheuer <stefan@stklcode.de>
Date: Fri, 15 Aug 2025 15:11:23 +0200
Subject: [PATCH] arm: dts: marvell: add LED aliases and USB ports to Ctera
C200-V2
* add PCIe bridge nodes for USB ports
* add aliases and triggers for some LEDs
* update partition label from "rootfs" to "ubi"
Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
---
.../boot/dts/marvell/armada-370-c200-v2.dts | 46 +++++++++++++++++--
1 file changed, 43 insertions(+), 3 deletions(-)
--- a/arch/arm/boot/dts/marvell/armada-370-c200-v2.dts
+++ b/arch/arm/boot/dts/marvell/armada-370-c200-v2.dts
@@ -17,6 +17,13 @@
model = "Ctera C200 V2";
compatible = "ctera,c200-v2", "marvell,armada370", "marvell,armada-370-xp";
+ aliases {
+ led-boot = &led_status_green;
+ led-failsafe = &led_status_red;
+ led-running = &led_status_green;
+ led-upgrade = &led_status_red;
+ };
+
chosen {
bootargs = "console=ttyS0,115200";
stdout-path = "serial0:115200n8";
@@ -117,6 +124,8 @@
function-enumerator = <2>;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "usbport";
+ trigger-sources = <&usb1_port 1>, <&usb2_port 1>;
};
led-2 {
@@ -131,6 +140,8 @@
function-enumerator = <1>;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "usbport";
+ trigger-sources = <&usb1_port 2>, <&usb2_port 2>;
};
led-4 {
@@ -138,6 +149,7 @@
function-enumerator = <2>;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "ata2";
};
led-5 {
@@ -172,7 +184,7 @@
gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
};
- led-10 {
+ led_status_red: led-10 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
@@ -183,9 +195,10 @@
function-enumerator = <1>;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "ata1";
};
- led-12 {
+ led_status_green: led-12 {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
@@ -301,7 +314,7 @@
};
partition@7a00000 {
- label = "rootfs";
+ label = "ubi";
reg = <0x7a00000 0x8600000>;
};
};
@@ -316,6 +329,33 @@
pinctrl-names = "default";
status = "okay";
reset-gpios = <&gpio1 27 GPIO_ACTIVE_LOW>;
+
+ /* -[0000:00]---01.0-[01]----00.0 */
+ /* usbport trigger won't work */
+ bridge@0,1 {
+ compatible = "pci11ab,6710";
+ reg = <0x3800 0 0 0 0>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ usb@1,0 {
+ /* Renesas uPD720202 */
+ compatible = "pci1912,0015";
+ reg = <0x1000 0 0 0 0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb1_port: port@1 {
+ reg = <1>;
+ #trigger-source-cells = <1>;
+ };
+
+ usb2_port: port@2 {
+ reg = <2>;
+ #trigger-source-cells = <1>;
+ };
+ };
+ };
};
};