File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 4
4
description : DSA Device
5
5
6
6
child-binding :
7
- description : Properties of slave port
7
+ description : Properties of port
8
8
9
9
include :
10
10
- name : pinctrl-device.yaml
@@ -25,3 +25,10 @@ child-binding:
25
25
description :
26
26
A phandle to a valid Ethernet device node. This host
27
27
device is what the switch port is connected to.
28
+ tag-protocol :
29
+ type : string
30
+ description :
31
+ Tag protocol the switch using. Or the switch supports no tag way
32
+ if it's not specified on CPU port.
33
+ enum :
34
+ - " netc"
Original file line number Diff line number Diff line change @@ -75,6 +75,12 @@ extern "C" {
75
75
}; \
76
76
DT_INST_FOREACH_CHILD_STATUS_OKAY_VARGS(n, fn, n);
77
77
78
+ #define DSA_TAG_PROTO_NONE 0
79
+ #define DSA_TAG_PROTO_NETC 1
80
+
81
+ #define DSA_TAG_PROTO_BY_DT (node_id ) \
82
+ (DT_ENUM_HAS_VALUE(node_id, tag_protocol, netc) ? DSA_TAG_PROTO_NETC : DSA_TAG_PROTO_NONE)
83
+
78
84
/** DSA switch context data */
79
85
struct dsa_switch_context {
80
86
/** Pointers to all DSA user network interfaces */
@@ -137,6 +143,8 @@ struct dsa_port_config {
137
143
const struct device * phy_dev ;
138
144
/** PHY mode */
139
145
const char * phy_mode ;
146
+ /** Tag protocol */
147
+ const int tag_proto ;
140
148
/** Ethernet device connected to the port */
141
149
const struct device * ethernet_connection ;
142
150
/** Instance specific config */
You can’t perform that action at this time.
0 commit comments