Other Parts Discussed in Thread: AM6442, TPS65220
Tool/software:
Dear community,
I'm working on a custom board based on a TI AM6442 SOC with two PHYs DP83822 connected. For power management we use a PMIC TI TPS65220.
The reset (NRESET) of each PHY is routed to a GPIO at the AM6442 (external pull-up to 1.8V). Since reset of the PHYs are high (= no reset) at startup, and the AVD changes during boot (2.5V initial at LDO4 -> 1.8V after PMIC configuration), we must reset the PHYs after changing the power, so that they will reinitialize completely, including the bootstrapping pins.
I looked at some examples and the documentation (ethernet-phy.yaml), but I was not able to trigger a reset, preferably via sysfs.
My device tree node looks like the following:
mdio1_pins_default: mdio1-default-pins {
bootph-all;
pinctrl-single,pins = <
AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */
AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */
>;
};
cpsw1_rst_default: cpsw1_rst_default_pins {
pinctrl-single,pins = <
AM64X_IOPAD (0xBC, PIN_OUTPUT, 7) /* (U8) PRU0_GP_1 / GPIO0_46 */
>;
};
cpsw2_rst_default: cpsw2_rst_default_pins {
pinctrl-single,pins = <
AM64X_IOPAD (0xE8, PIN_OUTPUT, 7) /* (U9) PRU0_GPO_2 / GPIO0_57*/
>;
};
&cpsw3g_mdio {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio1_pins_default>, <&cpsw1_rst_default>, <&cpsw2_rst_default>;
cpsw3g_phy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
reset-names = "phy";
reset-gpios = <&main_gpio0 46 GPIO_ACTIVE_LOW>;
reset-assert-us = <1000>;
reset-deassert-us = <2000>;
rx-internal-delay-ps = <1>;
tx-internal-delay-ps = <1>;
};
cpsw3g_phy1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
reset-names = "phy";
reset-gpios = <&main_gpio0 57 GPIO_ACTIVE_LOW>;
reset-assert-us = <1000>;
reset-deassert-us = <2000>;
rx-internal-delay-ps = <1>;
tx-internal-delay-ps = <1>;
};
};
So my question is, how can I trigger a complete reset of the PHYs?
Any help is appreciated.
BR Benjamin
