From db40f15b53e430d697efa6229b1bced30894d0d3 Mon Sep 17 00:00:00 2001 From: David Wu Date: Thu, 10 Aug 2017 22:01:08 +0800 Subject: ARM: dts: rk3228-evb: Enable the integrated PHY for gmac This patch enables the integrated PHY for rk3228 evb board by default. To use the external 1000M PHY on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- arch/arm/boot/dts/rk3228-evb.dts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'arch/arm/boot') diff --git a/arch/arm/boot/dts/rk3228-evb.dts b/arch/arm/boot/dts/rk3228-evb.dts index 58834330a5ba..456ddf7f11bb 100644 --- a/arch/arm/boot/dts/rk3228-evb.dts +++ b/arch/arm/boot/dts/rk3228-evb.dts @@ -50,6 +50,16 @@ device_type = "memory"; reg = <0x60000000 0x40000000>; }; + + vcc_phy: vcc-phy-regulator { + compatible = "regulator-fixed"; + enable-active-high; + regulator-name = "vcc_phy"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; }; &emmc { @@ -60,6 +70,30 @@ status = "okay"; }; +&gmac { + assigned-clocks = <&cru SCLK_MAC_SRC>; + assigned-clock-rates = <50000000>; + clock_in_out = "output"; + phy-supply = <&vcc_phy>; + phy-mode = "rmii"; + phy-handle = <&phy0>; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + phy@0 { + compatible = "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"; + reg = <0>; + clocks = <&cru SCLK_MAC_PHY>; + resets = <&cru SRST_MACPHY>; + phy-is-integrated; + }; + }; +}; + &tsadc { status = "okay"; -- cgit v1.2.3 From 901c5d2fbfcdc5d1d49a7a835b9ce9be5eee6393 Mon Sep 17 00:00:00 2001 From: David Wu Date: Tue, 22 Aug 2017 17:24:25 +0800 Subject: ARM: dts: rk3228-evb: Fix the compiling error This patch solves the following error: arch/arm/boot/dts/rk3228-evb.dtb: ERROR (phandle_references): Reference to non-existent node or label "phy0" Fixess db40f15b53e4 ("ARM: dts: rk3228-evb: Enable the integrated PHY for gmac") Signed-off-by: David Wu Reported-by: Stephen Rothwell Signed-off-by: David S. Miller --- arch/arm/boot/dts/rk3228-evb.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm/boot') diff --git a/arch/arm/boot/dts/rk3228-evb.dts b/arch/arm/boot/dts/rk3228-evb.dts index 456ddf7f11bb..1be9daacc4f9 100644 --- a/arch/arm/boot/dts/rk3228-evb.dts +++ b/arch/arm/boot/dts/rk3228-evb.dts @@ -76,7 +76,7 @@ clock_in_out = "output"; phy-supply = <&vcc_phy>; phy-mode = "rmii"; - phy-handle = <&phy0>; + phy-handle = <&phy>; status = "okay"; mdio { @@ -84,7 +84,7 @@ #address-cells = <1>; #size-cells = <0>; - phy@0 { + phy: phy@0 { compatible = "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"; reg = <0>; clocks = <&cru SCLK_MAC_PHY>; -- cgit v1.2.3