dts: bindings: boards: Update Ethernet PHY to use reg
property
Updates Ethernet PHY devicetree bindings to be more consistent with Linux by using the standard `reg` property for the PHY address instead of a custom `address` property. As a result, MDIO controller bindings now require standard `#address-cells` and `#size-cells` properties. Signed-off-by: Maureen Helm <maureen.helm@analog.com>
This commit is contained in:
parent
ce42ffcce0
commit
d5287578fe
19 changed files with 66 additions and 28 deletions
|
@ -132,9 +132,9 @@ zephyr_udc0: &usb0 {
|
||||||
pinctrl-0 = <&mdio_default>;
|
pinctrl-0 = <&mdio_default>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@0 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
address = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
phy0: ethernet-phy {
|
phy0: ethernet-phy@7 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
address = <0x7>;
|
reg = <0x7>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -198,10 +198,10 @@
|
||||||
pinctrl-0 = <&mdio_default>;
|
pinctrl-0 = <&mdio_default>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@0 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
address = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -136,10 +136,10 @@ zephyr_udc0: &usbhs {
|
||||||
pinctrl-0 = <&mdio_default>;
|
pinctrl-0 = <&mdio_default>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@0 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
address = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -245,10 +245,10 @@ zephyr_udc0: &usbhs {
|
||||||
pinctrl-0 = <&mdio_default>;
|
pinctrl-0 = <&mdio_default>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@0 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
address = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -146,11 +146,13 @@
|
||||||
mdio: mdio {
|
mdio: mdio {
|
||||||
compatible = "smsc,lan91c111-mdio";
|
compatible = "smsc,lan91c111-mdio";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@0 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
address = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -119,10 +119,10 @@
|
||||||
pinctrl-0 = <&mdio_default>;
|
pinctrl-0 = <&mdio_default>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@1 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
address = <1>;
|
reg = <1>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,27 @@ Required changes
|
||||||
:c:func:`can_set_bitrate` and :c:func:`can_set_bitrate_data` now also automatically calculate a
|
:c:func:`can_set_bitrate` and :c:func:`can_set_bitrate_data` now also automatically calculate a
|
||||||
suitable SJW, but their SJW cannot be overwritten by the caller.
|
suitable SJW, but their SJW cannot be overwritten by the caller.
|
||||||
|
|
||||||
|
* Ethernet PHY devicetree bindings were updated to use the standard ``reg``
|
||||||
|
property for the PHY address instead of a custom ``address`` property. As a
|
||||||
|
result, MDIO controller nodes now require ``#address-cells`` and
|
||||||
|
``#size-cells`` properties. Similarly, Ethernet PHY devicetree nodes and
|
||||||
|
corresponding driver were updated to consistently use the node name
|
||||||
|
``ethernet-phy`` instead of ``phy``. Devicetrees and overlays must be updated
|
||||||
|
accordingly:
|
||||||
|
|
||||||
|
.. code-block:: devicetree
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
compatible = "mdio-controller";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
ethernet-phy@0 {
|
||||||
|
compatible = "ethernet-phy";
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
Recommended Changes
|
Recommended Changes
|
||||||
*******************
|
*******************
|
||||||
|
|
||||||
|
|
|
@ -477,7 +477,7 @@ static const struct ethphy_driver_api phy_mii_driver_api = {
|
||||||
|
|
||||||
#define PHY_MII_CONFIG(n) \
|
#define PHY_MII_CONFIG(n) \
|
||||||
static const struct phy_mii_dev_config phy_mii_dev_config_##n = { \
|
static const struct phy_mii_dev_config phy_mii_dev_config_##n = { \
|
||||||
.phy_addr = DT_INST_PROP(n, address), \
|
.phy_addr = DT_INST_REG_ADDR(n), \
|
||||||
.fixed = IS_FIXED_LINK(n), \
|
.fixed = IS_FIXED_LINK(n), \
|
||||||
.fixed_speed = DT_INST_ENUM_IDX_OR(n, fixed_link, 0), \
|
.fixed_speed = DT_INST_ENUM_IDX_OR(n, fixed_link, 0), \
|
||||||
.mdio = UTIL_AND(UTIL_NOT(IS_FIXED_LINK(n)), \
|
.mdio = UTIL_AND(UTIL_NOT(IS_FIXED_LINK(n)), \
|
||||||
|
|
|
@ -172,6 +172,8 @@
|
||||||
compatible = "atmel,sam-mdio";
|
compatible = "atmel,sam-mdio";
|
||||||
reg = <0x40034000 0x4000>;
|
reg = <0x40034000 0x4000>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl: pinctrl@400e0e00 {
|
pinctrl: pinctrl@400e0e00 {
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
compatible = "atmel,sam-mdio";
|
compatible = "atmel,sam-mdio";
|
||||||
reg = <0x42000800 0x400>;
|
reg = <0x42000800 0x400>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -334,6 +334,8 @@
|
||||||
compatible = "atmel,sam-mdio";
|
compatible = "atmel,sam-mdio";
|
||||||
reg = <0x40050000 0x4000>;
|
reg = <0x40050000 0x4000>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
tc0: tc@4000c000 {
|
tc0: tc@4000c000 {
|
||||||
|
|
|
@ -637,6 +637,8 @@
|
||||||
compatible = "nxp,s32-netc-emdio";
|
compatible = "nxp,s32-netc-emdio";
|
||||||
reg = <0x74b60000 0x1c44>;
|
reg = <0x74b60000 0x1c44>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
enetc_psi0: ethernet@74b00000 {
|
enetc_psi0: ethernet@74b00000 {
|
||||||
|
|
|
@ -118,11 +118,13 @@
|
||||||
mdio: mdio {
|
mdio: mdio {
|
||||||
compatible = "smsc,lan91c111-mdio";
|
compatible = "smsc,lan91c111-mdio";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
phy: ethernet-phy {
|
phy: ethernet-phy@0 {
|
||||||
compatible = "ethernet-phy";
|
compatible = "ethernet-phy";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
address = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,8 +10,7 @@ compatible: "ethernet-phy"
|
||||||
include: phy.yaml
|
include: phy.yaml
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
address:
|
reg:
|
||||||
type: int
|
|
||||||
required: true
|
required: true
|
||||||
description: PHY address
|
description: PHY address
|
||||||
no-reset:
|
no-reset:
|
||||||
|
|
|
@ -8,12 +8,3 @@ compatible: "adi,adin2111-mdio"
|
||||||
include: mdio-controller.yaml
|
include: mdio-controller.yaml
|
||||||
|
|
||||||
on-bus: adin2111
|
on-bus: adin2111
|
||||||
|
|
||||||
properties:
|
|
||||||
"#address-cells":
|
|
||||||
required: true
|
|
||||||
const: 1
|
|
||||||
|
|
||||||
"#size-cells":
|
|
||||||
required: true
|
|
||||||
const: 0
|
|
||||||
|
|
|
@ -6,3 +6,12 @@
|
||||||
include: base.yaml
|
include: base.yaml
|
||||||
|
|
||||||
bus: mdio
|
bus: mdio
|
||||||
|
|
||||||
|
properties:
|
||||||
|
"#address-cells":
|
||||||
|
required: true
|
||||||
|
const: 1
|
||||||
|
|
||||||
|
"#size-cells":
|
||||||
|
required: true
|
||||||
|
const: 0
|
||||||
|
|
|
@ -71,6 +71,8 @@
|
||||||
compatible = "espressif,esp32-mdio";
|
compatible = "espressif,esp32-mdio";
|
||||||
clocks = <&rtc ESP32_EMAC_MODULE>;
|
clocks = <&rtc ESP32_EMAC_MODULE>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
pinctrl: pin-controller {
|
pinctrl: pin-controller {
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
mdc-gpios = <&test_gpio 0 0>;
|
mdc-gpios = <&test_gpio 0 0>;
|
||||||
mdio-gpios = <&test_gpio 0 0>;
|
mdio-gpios = <&test_gpio 0 0>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
test_mdio1: mdio@33334444 {
|
test_mdio1: mdio@33334444 {
|
||||||
|
@ -37,6 +39,8 @@
|
||||||
mdc-gpios = <&test_gpio 0 0>;
|
mdc-gpios = <&test_gpio 0 0>;
|
||||||
mdio-gpios = <&test_gpio 0 0>;
|
mdio-gpios = <&test_gpio 0 0>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue