From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Marko Date: Thu, 8 Oct 2020 22:05:12 +0200 Subject: [PATCH 4/6] IPQ40xx: Add support for MDIO In-Reply-To: <20201008200514.2256778-1-robert.marko@sartura.hr> References: <20201008200514.2256778-1-robert.marko@sartura.hr> Message-ID: <20201008200514.2256778-5-robert.marko@sartura.hr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Lets add the necessary DTS node and pinctrl properties for newly added MDIO driver. Signed-off-by: Robert Marko Cc: Luka Perkov --- arch/arm/dts/qcom-ipq4019.dtsi | 28 +++++++++++++++++++++++++ arch/arm/mach-ipq40xx/pinctrl-ipq4019.c | 4 ++++ 2 files changed, 32 insertions(+) diff --git a/arch/arm/dts/qcom-ipq4019.dtsi b/arch/arm/dts/qcom-ipq4019.dtsi index 936ef74f94..031691e5d2 100644 --- a/arch/arm/dts/qcom-ipq4019.dtsi +++ b/arch/arm/dts/qcom-ipq4019.dtsi @@ -103,6 +103,34 @@ u-boot,dm-pre-reloc; }; + mdio: mdio at 90000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "qcom,ipq4019-mdio"; + reg = <0x90000 0x64>; + status = "disabled"; + + ethphy0: ethernet-phy at 0 { + reg = <0>; + }; + + ethphy1: ethernet-phy at 1 { + reg = <1>; + }; + + ethphy2: ethernet-phy at 2 { + reg = <2>; + }; + + ethphy3: ethernet-phy at 3 { + reg = <3>; + }; + + ethphy4: ethernet-phy at 4 { + reg = <4>; + }; + }; + usb3_ss_phy: ssphy at 9a000 { compatible = "qcom,usb-ss-ipq4019-phy"; #phy-cells = <0>; diff --git a/arch/arm/mach-ipq40xx/pinctrl-ipq4019.c b/arch/arm/mach-ipq40xx/pinctrl-ipq4019.c index 1f283516cb..3e365f8cc8 100644 --- a/arch/arm/mach-ipq40xx/pinctrl-ipq4019.c +++ b/arch/arm/mach-ipq40xx/pinctrl-ipq4019.c @@ -21,6 +21,10 @@ static const struct pinctrl_function msm_pinctrl_functions[] = { {"blsp_spi0_0", 1}, /* Only for GPIO:12,13,14,15 */ {"blsp_spi0_1", 2}, /* Only for GPIO:54,55,56,57 */ {"blsp_spi1", 2}, + {"mdio_0", 1}, /* Only for GPIO6 */ + {"mdio_1", 2}, /* Only for GPIO53 */ + {"mdc_0", 1}, /* Only for GPIO7 */ + {"mdc_1", 2}, /* Only for GPIO52 */ }; static const char *ipq4019_get_function_name(struct udevice *dev, -- 2.28.0