Skip to content

Commit

Permalink
arm64: dts: renesas: rzg2: Convert EtherAVB to explicit delay handling
Browse files Browse the repository at this point in the history
Some EtherAVB variants support internal clock delay configuration, which
can add larger delays than the delays that are typically supported by
the PHY (using an "rgmii-*id" PHY mode, and/or "[rt]xc-skew-ps"
properties).

Historically, the EtherAVB driver configured these delays based on the
"rgmii-*id" PHY mode.  This was wrong, as these are meant solely for the
PHY, not for the MAC.  Hence properties were introduced for explicit
configuration of these delays.

Convert the RZ/G2 DTS files from the old to the new scheme:
  - Add default "rx-internal-delay-ps" and "tx-internal-delay-ps"
    properties to the SoC .dtsi files, to be overridden by board files
    where needed,
  - Convert board files from "rgmii-*id" PHY modes to "rgmii", adding
    the appropriate "rx-internal-delay-ps" and/or "tx-internal-delay-ps"
    overrides.

Notes:
  - RZ/G2E does not support TX internal delay handling.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200819134344.27813-8-geert+renesas@glider.be
  • Loading branch information
Geert Uytterhoeven committed Nov 10, 2020
1 parent 9b81018 commit a5200e6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@
pinctrl-0 = <&avb_pins>;
pinctrl-names = "default";
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
rx-internal-delay-ps = <1800>;
tx-internal-delay-ps = <2000>;
status = "okay";

phy0: ethernet-phy@0 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pinctrl-0 = <&avb_pins>;
pinctrl-names = "default";
phy-handle = <&phy0>;
phy-mode = "rgmii-txid";
tx-internal-delay-ps = <2000>;
status = "okay";

phy0: ethernet-phy@0 {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/renesas/r8a774a1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,8 @@
power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
resets = <&cpg 812>;
phy-mode = "rgmii";
rx-internal-delay-ps = <0>;
tx-internal-delay-ps = <0>;
iommus = <&ipmmu_ds0 16>;
#address-cells = <1>;
#size-cells = <0>;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/renesas/r8a774b1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,8 @@
power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
resets = <&cpg 812>;
phy-mode = "rgmii";
rx-internal-delay-ps = <0>;
tx-internal-delay-ps = <0>;
iommus = <&ipmmu_ds0 16>;
#address-cells = <1>;
#size-cells = <0>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/renesas/r8a774c0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@
power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
resets = <&cpg 812>;
phy-mode = "rgmii";
rx-internal-delay-ps = <0>;
iommus = <&ipmmu_ds0 16>;
#address-cells = <1>;
#size-cells = <0>;
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/renesas/r8a774e1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,8 @@
power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
resets = <&cpg 812>;
phy-mode = "rgmii";
rx-internal-delay-ps = <0>;
tx-internal-delay-ps = <0>;
iommus = <&ipmmu_ds0 16>;
#address-cells = <1>;
#size-cells = <0>;
Expand Down

0 comments on commit a5200e6

Please sign in to comment.