[PATCH RESEND 1/5] dt-bindings: net: add bitfield defines for Ethernet speeds
From: Rafał Miłecki
Date: Thu May 05 2022 - 09:55:54 EST
From: Rafał Miłecki <rafal@xxxxxxxxxx>
This allows specifying multiple Ethernet speeds in a single DT uint32
value.
Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
---
include/dt-bindings/net/eth.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 include/dt-bindings/net/eth.h
diff --git a/include/dt-bindings/net/eth.h b/include/dt-bindings/net/eth.h
new file mode 100644
index 000000000000..89caff09179b
--- /dev/null
+++ b/include/dt-bindings/net/eth.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Device Tree constants for the Ethernet
+ */
+
+#ifndef _DT_BINDINGS_ETH_H
+#define _DT_BINDINGS_ETH_H
+
+#define SPEED_UNSPEC 0
+#define SPEED_10 (1 << 0)
+#define SPEED_100 (1 << 1)
+#define SPEED_1000 (1 << 2)
+#define SPEED_2000 (1 << 3)
+#define SPEED_2500 (1 << 4)
+#define SPEED_5000 (1 << 5)
+#define SPEED_10000 (1 << 6)
+#define SPEED_14000 (1 << 7)
+#define SPEED_20000 (1 << 8)
+#define SPEED_25000 (1 << 9)
+#define SPEED_40000 (1 << 10)
+#define SPEED_50000 (1 << 11)
+#define SPEED_56000 (1 << 12)
+#define SPEED_100000 (1 << 13)
+#define SPEED_200000 (1 << 14)
+#define SPEED_400000 (1 << 15)
+
+#endif
--
2.34.1