Skip to content

Commit 2e4e9a9

Browse files
decsnynashif
authored andcommitted
dts: bindings: Fix KSZ8081 property names
Fix KSZ8081 binding properties: - reset-gpios and interrupt-gpios are generally standard properties and therefore should not be using a special name - mc, is not the correct vendor prefix for microchip Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
1 parent 62b4e3e commit 2e4e9a9

File tree

10 files changed

+40
-42
lines changed

10 files changed

+40
-42
lines changed

boards/nxp/frdm_k64f/frdm_k64f.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ zephyr_udc0: &usbotg {
272272
compatible = "microchip,ksz8081";
273273
reg = <0>;
274274
status = "okay";
275-
mc,interface-type = "rmii-25MHz";
275+
microchip,interface-type = "rmii-25MHz";
276276
};
277277
};
278278

boards/nxp/mimxrt1020_evk/mimxrt1020_evk.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ arduino_serial: &lpuart2 {
147147
compatible = "microchip,ksz8081";
148148
reg = <0>;
149149
status = "okay";
150-
mc,reset-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
151-
mc,interrupt-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
152-
mc,interface-type = "rmii";
150+
reset-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
151+
int-gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
152+
microchip,interface-type = "rmii";
153153
};
154154
};
155155

boards/nxp/mimxrt1024_evk/mimxrt1024_evk.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ arduino_serial: &lpuart2 {
139139
compatible = "microchip,ksz8081";
140140
reg = <0>;
141141
status = "okay";
142-
mc,reset-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>;
143-
mc,interrupt-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
144-
mc,interface-type = "rmii";
142+
reset-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
143+
int-gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
144+
microchip,interface-type = "rmii";
145145
};
146146
};
147147

boards/nxp/mimxrt1050_evk/mimxrt1050_evk.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ arduino_serial: &lpuart3 {
210210
compatible = "microchip,ksz8081";
211211
reg = <0>;
212212
status = "okay";
213-
mc,reset-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
214-
mc,interrupt-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
215-
mc,interface-type = "rmii";
213+
reset-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
214+
int-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
215+
microchip,interface-type = "rmii";
216216
};
217217
};
218218

boards/nxp/mimxrt1060_evk/mimxrt1060_evk.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ arduino_i2c: &lpi2c1 {
163163
compatible = "microchip,ksz8081";
164164
reg = <0>;
165165
status = "okay";
166-
mc,reset-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
167-
mc,interrupt-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
168-
mc,interface-type = "rmii";
166+
reset-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
167+
int-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
168+
microchip,interface-type = "rmii";
169169
};
170170
};
171171

boards/nxp/mimxrt1064_evk/mimxrt1064_evk.dts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ arduino_serial: &lpuart3 {
241241
compatible = "microchip,ksz8081";
242242
reg = <0>;
243243
status = "okay";
244-
mc,reset-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
245-
mc,interrupt-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>;
246-
mc,interface-type = "rmii";
244+
reset-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
245+
int-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
246+
microchip,interface-type = "rmii";
247247
};
248248
};
249249

boards/nxp/mimxrt1160_evk/mimxrt1160_evk.dtsi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@
150150
compatible = "microchip,ksz8081";
151151
reg = <0>;
152152
status = "okay";
153-
mc,reset-gpio = <&gpio12 12 GPIO_ACTIVE_HIGH>;
154-
mc,interrupt-gpio = <&gpio9 11 GPIO_ACTIVE_HIGH>;
155-
mc,interface-type = "rmii";
153+
reset-gpios = <&gpio12 12 GPIO_ACTIVE_HIGH>;
154+
int-gpios = <&gpio9 11 GPIO_ACTIVE_HIGH>;
155+
microchip,interface-type = "rmii";
156156
};
157157
};
158158

boards/nxp/mimxrt1170_evk/mimxrt1170_evk.dtsi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@
114114
compatible = "microchip,ksz8081";
115115
reg = <0>;
116116
status = "okay";
117-
mc,reset-gpio = <&gpio12 12 GPIO_ACTIVE_HIGH>;
118-
mc,interrupt-gpio = <&gpio9 11 GPIO_ACTIVE_HIGH>;
119-
mc,interface-type = "rmii";
117+
reset-gpios = <&gpio12 12 GPIO_ACTIVE_HIGH>;
118+
int-gpios = <&gpio9 11 GPIO_ACTIVE_HIGH>;
119+
microchip,interface-type = "rmii";
120120
};
121121
};
122122

drivers/ethernet/phy/phy_microchip_ksz8081.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ struct mc_ksz8081_config {
4242
uint8_t addr;
4343
const struct device *mdio_dev;
4444
enum ksz8081_interface phy_iface;
45-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio)
45+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios)
4646
const struct gpio_dt_spec reset_gpio;
4747
#endif
48-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_interrupt_gpio)
48+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(int_gpios)
4949
const struct gpio_dt_spec interrupt_gpio;
5050
#endif
5151
};
@@ -265,9 +265,9 @@ static int phy_mc_ksz8081_static_cfg(const struct device *dev)
265265

266266
static int phy_mc_ksz8081_reset(const struct device *dev)
267267
{
268-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio)
268+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios)
269269
const struct mc_ksz8081_config *config = dev->config;
270-
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio) */
270+
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios) */
271271
struct mc_ksz8081_data *data = dev->data;
272272
int ret;
273273

@@ -278,7 +278,7 @@ static int phy_mc_ksz8081_reset(const struct device *dev)
278278
return ret;
279279
}
280280

281-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio)
281+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios)
282282
if (!config->reset_gpio.port) {
283283
goto skip_reset_gpio;
284284
}
@@ -296,7 +296,7 @@ static int phy_mc_ksz8081_reset(const struct device *dev)
296296
ret = gpio_pin_set_dt(&config->reset_gpio, 1);
297297
goto done;
298298
skip_reset_gpio:
299-
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio) */
299+
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios) */
300300
ret = phy_mc_ksz8081_write(dev, MII_BMCR, MII_BMCR_RESET);
301301
if (ret) {
302302
goto done;
@@ -465,7 +465,7 @@ static int phy_mc_ksz8081_init(const struct device *dev)
465465

466466
mdio_bus_enable(config->mdio_dev);
467467

468-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_interrupt_gpio)
468+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(int_gpios)
469469
if (!config->interrupt_gpio.port) {
470470
goto skip_int_gpio;
471471
}
@@ -477,16 +477,16 @@ static int phy_mc_ksz8081_init(const struct device *dev)
477477
}
478478

479479
skip_int_gpio:
480-
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_interrupt_gpio) */
480+
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(int_gpios) */
481481

482-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio)
482+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios)
483483
if (config->reset_gpio.port) {
484484
ret = gpio_pin_configure_dt(&config->reset_gpio, GPIO_OUTPUT_ACTIVE);
485485
if (ret) {
486486
return ret;
487487
}
488488
}
489-
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio) */
489+
#endif /* DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios) */
490490

491491
/* Reset PHY */
492492
ret = phy_mc_ksz8081_reset(dev);
@@ -508,16 +508,16 @@ static const struct ethphy_driver_api mc_ksz8081_phy_api = {
508508
.write = phy_mc_ksz8081_write,
509509
};
510510

511-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_reset_gpio)
511+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(reset_gpios)
512512
#define RESET_GPIO(n) \
513-
.reset_gpio = GPIO_DT_SPEC_INST_GET_OR(n, mc_reset_gpio, {0}),
513+
.reset_gpio = GPIO_DT_SPEC_INST_GET_OR(n, reset_gpios, {0}),
514514
#else
515515
#define RESET_GPIO(n)
516516
#endif /* reset gpio */
517517

518-
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(mc_interrupt_gpio)
518+
#if DT_ANY_INST_HAS_PROP_STATUS_OKAY(int_gpios)
519519
#define INTERRUPT_GPIO(n) \
520-
.interrupt_gpio = GPIO_DT_SPEC_INST_GET_OR(n, mc_interrupt_gpio, {0}),
520+
.interrupt_gpio = GPIO_DT_SPEC_INST_GET_OR(n, int_gpios, {0}),
521521
#else
522522
#define INTERRUPT_GPIO(n)
523523
#endif /* interrupt gpio */
@@ -526,7 +526,7 @@ static const struct ethphy_driver_api mc_ksz8081_phy_api = {
526526
static const struct mc_ksz8081_config mc_ksz8081_##n##_config = { \
527527
.addr = DT_INST_REG_ADDR(n), \
528528
.mdio_dev = DEVICE_DT_GET(DT_INST_PARENT(n)), \
529-
.phy_iface = DT_INST_ENUM_IDX(n, mc_interface_type), \
529+
.phy_iface = DT_INST_ENUM_IDX(n, microchip_interface_type), \
530530
RESET_GPIO(n) \
531531
INTERRUPT_GPIO(n) \
532532
}; \

dts/bindings/ethernet/microchip,ksz8081.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ compatible: "microchip,ksz8081"
88
include: ethernet-phy.yaml
99

1010
properties:
11-
mc,reset-gpio:
11+
reset-gpios:
1212
type: phandle-array
13-
specifier-space: gpio
1413
description: GPIO connected to PHY reset signal pin. Reset is active low.
15-
mc,interrupt-gpio:
14+
int-gpios:
1615
type: phandle-array
17-
specifier-space: gpio
1816
description: GPIO for interrupt signal indicating PHY state change.
19-
mc,interface-type:
17+
microchip,interface-type:
2018
type: string
2119
required: true
2220
description: Which type of phy connection the phy is set up for

0 commit comments

Comments
 (0)