Historially, the RGMII PHY modes specified in Device Trees have been
used inconsistently, often referring to the usage of delays on the PHY
side rather than describing the board; many drivers still implement this
incorrectly.
Require a comment in Devices Trees using these modes (usually mentioning
that the delay is relalized
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 784912f570e9d..57fcbd4b63ede 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3735,6 +3735,17 @@ sub process {
}
}
+# Check for RGMII phy-mode with delay on PCB
+ if ($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*(phy-mode|phy-connection-type)\s*=\s*"/ &&
+ !ctx_has_comment($first_line, $linenr)) {