From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH 5/6] dts: sunxi: v3s: enable emac support
Date: Wed, 19 May 2021 22:44:30 +0100 [thread overview]
Message-ID: <20210519224430.5a976e19@slackpad.fritz.box> (raw)
In-Reply-To: <20210519194208.515548-6-rehn.andreas86@gmail.com>
On Wed, 19 May 2021 21:42:07 +0200
Andreas Rehn <rehn.andreas86@gmail.com> wrote:
Hi,
> h3 and v3s have internal phys and can share the same driver.
> Furthermore sun8i-v3s-emac is not available, use sun8i-h3-emac instead
> - add emac pins
> - enable emac for licheepi-zero-dock as it provides a ethernet port
So first, this is not how we handle DT changes in U-Boot. They would
need to go through the Linux tree first, then can be synced back to
U-Boot. Sorry.
Looking more into the details:
>
> Signed-off-by: Andreas Rehn <rehn.andreas86@gmail.com>
> ---
> arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts | 11 +++++++++++
> arch/arm/dts/sun8i-v3s.dtsi | 10 +++++++++-
> 2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts b/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts
> index db5cd0b857..083ac11b94 100644
> --- a/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts
> +++ b/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts
> @@ -49,6 +49,10 @@
> compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
> "allwinner,sun8i-v3s";
>
> + aliases {
> + ethernet0 = &emac;
> + };
> +
> leds {
> /* The LEDs use PG0~2 pins, which conflict with MMC1 */
> status = "disabled";
> @@ -94,3 +98,10 @@
> voltage = <800000>;
> };
> };
> +
> +&emac {
> + allwinner,leds-active-low;
> + status = "okay";
> + pinctrl-names = "default";
> + pinctrl-0 = <&emac_rgmii_pins>;
I don't think this is correct. If I understand correctly, the V3s does
not expose any MAC pins, instead relies entirely on the internal PHY.
Those pins are not muxed, so don't need any pinctrl properties.
> +};
> diff --git a/arch/arm/dts/sun8i-v3s.dtsi b/arch/arm/dts/sun8i-v3s.dtsi
> index 0c73416769..35cc4d63f7 100644
> --- a/arch/arm/dts/sun8i-v3s.dtsi
> +++ b/arch/arm/dts/sun8i-v3s.dtsi
> @@ -342,6 +342,14 @@
> function = "csi";
> };
>
> + emac_rgmii_pins: emac-rgmii-pins {
> + pins = "PD0", "PD1", "PD2", "PD3", "PD4",
> + "PD5", "PD7", "PD8", "PD9", "PD10",
> + "PD12", "PD13", "PD15", "PD16", "PD17";
> + function = "emac";
> + drive-strength = <40>;
> + };
This is wrong (and not needed): The V3s does not expose MAC pins. If I
understand correctly, the V3 and V3s share the same die, so the pin
controller has those registers, but the whole port is connected nowhere.
> i2c0_pins: i2c0-pins {
> pins = "PB6", "PB7";
> function = "i2c0";
> @@ -468,7 +476,7 @@
> };
>
> emac: ethernet at 1c30000 {
> - compatible = "allwinner,sun8i-v3s-emac";
> + compatible = "allwinner,sun8i-h3-emac";
You can't just change the compatible string this way, the original one
is there for a reason. In this case the difference is that the V3s does
not support Gigabit Ethernet - because the only MAC pins connected are
the internal MII ones. I believe the MAC itself could probably still
handle GBit, but it can't talk to the outside in this mode.
Instead just add the v3s compatible string to the sun8i-emac driver.
Assign a new type and add this new type wherever you see H3_EMAC, but
not in the RGMII part.
Cheers,
Andre
> syscon = <&syscon>;
> reg = <0x01c30000 0x10000>;
> interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
next prev parent reply other threads:[~2021-05-19 21:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 19:42 [PATCH 0/6] arm: sunxi: v3s: add ethernet support Andreas Rehn
2021-05-19 19:42 ` [PATCH 1/6] dts: sunxi: add licheepi-zero-dock Andreas Rehn
2021-05-19 21:42 ` Andre Przywara
2021-05-19 21:55 ` Andreas Rehn
2021-05-19 19:42 ` [PATCH 2/6] clk: sunxi: v3s: Implement EMAC clocks/resets Andreas Rehn
2021-05-19 21:43 ` Andre Przywara
2021-05-19 19:42 ` [PATCH 3/6] clk: sunxi: v3s: fix tabs / spaces Andreas Rehn
2021-05-19 21:43 ` Andre Przywara
2021-05-19 21:59 ` Andreas Rehn
2021-05-22 23:17 ` [PATCH v2 " Andreas Rehn
2021-05-26 23:16 ` Andre Przywara
2022-01-15 17:36 ` Sean Anderson
2021-05-19 19:42 ` [PATCH 4/6] net: sun8i-emac: add v3s pinmux setting Andreas Rehn
2021-05-19 21:44 ` Andre Przywara
2021-05-22 23:22 ` [PATCH v2 4/6] net: sun8i-emac: add v3s variant Andreas Rehn
2021-05-25 6:53 ` Ramon Fried
2021-05-26 23:24 ` Andre Przywara
2021-12-07 6:13 ` Jagan Teki
2021-05-19 19:42 ` [PATCH 5/6] dts: sunxi: v3s: enable emac support Andreas Rehn
2021-05-19 21:44 ` Andre Przywara [this message]
2021-05-19 19:42 ` [PATCH 6/6] net: sun8i-emac: v3s: fix soft reset timeout Andreas Rehn
2021-05-19 21:44 ` Andre Przywara
2021-05-19 22:10 ` Andreas Rehn
2021-05-19 22:46 ` Andre Przywara
2021-05-20 0:18 ` Andre Przywara
2021-05-21 20:14 ` Andreas Rehn
2021-06-03 13:56 ` Andre Przywara
2021-06-03 14:43 ` Heinrich Schuchardt
2021-06-03 15:29 ` Andreas Rehn
2021-05-22 23:23 ` [PATCH v2 " Andreas Rehn
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=20210519224430.5a976e19@slackpad.fritz.box \
--to=andre.przywara@arm.com \
--cc=u-boot@lists.denx.de \
/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