Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: Add network-class schema for mac-address properties

The ethernet-controller schema specifies "mac-address" and
"local-mac-address" but other network devices such as wireless network
adapters use mac addresses as well.
The Devicetree Specification, Release v0.3 specifies in section 4.3.1
a generic "Network Class Binding" with "address-bits", "mac-address",
"local-mac-address" and "max-frame-size". This schema specifies the
"address-bits" property and moves the remaining properties over from
the ethernet-controller.yaml schema.

The "max-frame-size" property is used to describe the maximal payload
size despite its name. Keep the description from ethernet-controller
specifying this property as MTU. The contradictory description in the
Devicetree Specification is ignored.

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20250324-dt-bindings-network-class-v5-1-f5c3fe00e8f0@ixit.cz
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Janne Grunau and committed by
Johannes Berg
dede3640 5632a505

+47 -24
+1 -24
Documentation/devicetree/bindings/net/ethernet-controller.yaml
··· 16 16 label: 17 17 description: Human readable label on a port of a box. 18 18 19 - local-mac-address: 20 - description: 21 - Specifies the MAC address that was assigned to the network device. 22 - $ref: /schemas/types.yaml#/definitions/uint8-array 23 - minItems: 6 24 - maxItems: 6 25 - 26 - mac-address: 27 - description: 28 - Specifies the MAC address that was last used by the boot 29 - program; should be used in cases where the MAC address assigned 30 - to the device by the boot program is different from the 31 - local-mac-address property. 32 - $ref: /schemas/types.yaml#/definitions/uint8-array 33 - minItems: 6 34 - maxItems: 6 35 - 36 - max-frame-size: 37 - $ref: /schemas/types.yaml#/definitions/uint32 38 - description: 39 - Maximum transfer unit (IEEE defined MTU), rather than the 40 - maximum frame size (there\'s contradiction in the Devicetree 41 - Specification). 42 - 43 19 max-speed: 44 20 $ref: /schemas/types.yaml#/definitions/uint32 45 21 description: ··· 238 262 pcs-handle-names: [pcs-handle] 239 263 240 264 allOf: 265 + - $ref: /schemas/net/network-class.yaml# 241 266 - if: 242 267 properties: 243 268 phy-mode:
+46
Documentation/devicetree/bindings/net/network-class.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/network-class.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Network Class Common Properties 8 + 9 + maintainers: 10 + - Devicetree Specification Mailing List <devicetree-spec@vger.kernel.org> 11 + 12 + properties: 13 + address-bits: 14 + description: 15 + Specifies number of address bits required to address the device 16 + described by this node, e.g. size of the MAC address. 17 + default: 48 18 + const: 48 19 + 20 + local-mac-address: 21 + description: 22 + Specifies MAC address that was assigned to the network device described by 23 + the node containing this property. 24 + $ref: /schemas/types.yaml#/definitions/uint8-array 25 + minItems: 6 26 + maxItems: 6 27 + 28 + mac-address: 29 + description: 30 + Specifies the MAC address that was last used by the boot program. This 31 + property should be used in cases where the MAC address assigned to the 32 + device by the boot program is different from the 33 + local-mac-address property. This property shall be used only if the value 34 + differs from local-mac-address property value. 35 + $ref: /schemas/types.yaml#/definitions/uint8-array 36 + minItems: 6 37 + maxItems: 6 38 + 39 + max-frame-size: 40 + $ref: /schemas/types.yaml#/definitions/uint32 41 + description: 42 + Maximum transfer unit (IEEE defined MTU), rather than the 43 + maximum frame size (there\'s contradiction in the Devicetree 44 + Specification). 45 + 46 + additionalProperties: true