From: linus.luessing@c0d3.blue (Linus Lüssing)
To: linus-amlogic@lists.infradead.org
Subject: [RFC PATCH] ARM: meson: Add Ethernet for Odroid C1/C1+
Date: Tue, 26 Sep 2017 03:08:47 +0200 [thread overview]
Message-ID: <20170926010847.30219-2-linus.luessing@c0d3.blue> (raw)
In-Reply-To: <20170926010847.30219-1-linus.luessing@c0d3.blue>
This patch adds the necessary DT bindings to enable the
Realtek RTL8211F chip used in the Odroid C1/C1+.
---
Do not apply, this patch does not work yet!
---
arch/arm/boot/dts/meson8b-odroidc1.dts | 26 ++++++++++++++++++++++++++
arch/arm/boot/dts/meson8b.dtsi | 31 +++++++++++++++++++++++++++++--
2 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
index 9ff6ca4..071a568 100644
--- a/arch/arm/boot/dts/meson8b-odroidc1.dts
+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
@@ -77,6 +77,32 @@
pinctrl-names = "default";
};
+ðmac {
+ status = "okay";
+ pinctrl-0 = <ð_rgmii_pins>;
+ pinctrl-names = "default";
+ phy-handle = <ð_phy0>;
+ phy-mode = "rgmii";
+
+ snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
+ snps,reset-delays-us = <0 10000 1000000>;
+ snps,reset-active-low;
+
+ amlogic,tx-delay-ns = <2>;
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eth_phy0: ethernet-phy at 0 {
+ /* Realtek RTL8211F (0x001cc916) */
+ reg = <0>;
+ eee-broken-1000t;
+ };
+ };
+};
+
&gpio_ao {
/*
* WARNING: The USB Hub on the Odroid-C1/C1+ needs a reset signal
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index b9b6600..259ef0f 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -184,6 +184,28 @@
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_cbus 0 0 130>;
};
+
+ eth_rgmii_pins: eth-rgmii {
+ mux {
+ groups =
+ "eth_rxd1",
+ "eth_rxd0",
+ "eth_rx_clk",
+ "eth_rx_dv",
+ "eth_txd0_1",
+ "eth_txd1_1",
+ "eth_ref_clk",
+ "eth_tx_en",
+ "eth_mdio_en",
+ "eth_mdc",
+ "eth_txd1_0",
+ "eth_txd0_0",
+ "eth_txd3",
+ "eth_txd2",
+ "eth_tx_clk";
+ function = "ethernet";
+ };
+ };
};
};
@@ -195,8 +217,13 @@
};
ðmac {
- clocks = <&clkc CLKID_ETH>;
- clock-names = "stmmaceth";
+ compatible = "amlogic,meson8b-dwmac", "snps,dwmac";
+ reg = <0xc9410000 0x10000
+ 0xc1108140 0x4>;
+ clocks = <&clkc CLKID_ETH>,
+ <&clkc CLKID_FCLK_DIV2>,
+ <&clkc CLKID_MPLL2>;
+ clock-names = "stmmaceth", "clkin0", "clkin1";
};
&hwrng {
--
2.1.4
next prev parent reply other threads:[~2017-09-26 1:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 1:08 [RFC PATCH 0/1] ARM: meson: Add Ethernet for Odroid C1/C1+ Linus Lüssing
2017-09-26 1:08 ` Linus Lüssing [this message]
2017-09-26 1:17 ` Linus Lüssing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170926010847.30219-2-linus.luessing@c0d3.blue \
--to=linus.luessing@c0d3.blue \
--cc=linus-amlogic@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox