From: Stefan Wahren <stefan.wahren@i2se.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/3] net: Add support for Broadcom GENETv5 Ethernet controller
Date: Mon, 23 Dec 2019 19:42:53 +0100 [thread overview]
Message-ID: <f595eb44-a5b7-fcec-e6c7-3b4fe7bc8bed@i2se.com> (raw)
In-Reply-To: <2142da8a-fd2f-8c58-4a67-1ff06f1a57cd@i2se.com>
Am 20.12.19 um 20:29 schrieb Stefan Wahren:
> Hi Andre,
>
> Am 18.12.19 um 12:59 schrieb Andre Przywara:
>> From: Amit Singh Tomar <amittomer25@gmail.com>
>>
>> The Broadcom GENET Ethernet MACs are used in several MIPS based SoCs
>> and in the Broadcom 2711/2838 SoC used on the Raspberry Pi 4.
>> There is no publicly available documentation, so this driver is based
>> on the Linux driver. Compared to that the queue management is
>> drastically simplified, also we only support version 5 of the IP and
>> RGMII connections between MAC and PHY, as used on the RPi4.
>>
>> Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
>> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
>> [Andre: heavy cleanup and a few fixes]
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>> drivers/net/Kconfig | 7 +
>> drivers/net/Makefile | 1 +
>> drivers/net/bcmgenet.c | 702 +++++++++++++++++++++++++++++++++++++++++
>> 3 files changed, 710 insertions(+)
>> create mode 100644 drivers/net/bcmgenet.c
>>
> ...
>> +
>> +/* We only support RGMII (as used on the RPi4). */
>> +static int bcmgenet_interface_set(struct bcmgenet_eth_priv *priv)
>> +{
>> + phy_interface_t phy_mode = priv->interface;
>> +
>> + switch (phy_mode) {
>> + case PHY_INTERFACE_MODE_RGMII:
>> + writel(PORT_MODE_EXT_GPHY, priv->mac_reg + SYS_PORT_CTRL);
>> + break;
> This doesn't match the current Linux upstream kernel / DTS. We consider
> the PHY mode in the downstream DTS as wrong. It should be
> PHY_INTERFACE_MODE_RGMII_RXID. So please add this to keep compatibility
> to the upstream devicetree.
>
> Please following this series [1] for more information.
>
> Thank you a lot for this work
>
> Stefan
>
> [1] - https://marc.info/?l=linux-netdev&m=157350191805462&w=2
Except of this, i noticed another issue with current u-boot. It
complains about misaligned access:
U-Boot 2020.01-rc5-00007-g5111518-dirty (Dec 23 2019 - 19:25:49 +0100)
DRAM: 948 MiB
RPI 4 Model B (0xc03112)
MMC: sdhci at 7e300000: 0, emmc2 at 7e340000: 1
Loading Environment from FAT... Card did not respond to voltage select!
In: serial
Out: serial
Err: serial
Net: eth0: ethernet at 7d580000
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
213 bytes read in 73 ms (2 KiB/s)
## Executing script at 02400000
Card did not respond to voltage select!
Wrong Image Format for bootm command
ERROR: can't get kernel image!
SCRIPT FAILED: continuing...
30395 bytes read in 53 ms (559.6 KiB/s)
ethernet at 7d580000 Waiting for PHY auto negotiation to complete.. done
BOOTP broadcast 1
CACHE: Misaligned operation at range [3b3ed1c0, 3b3ed316]
CACHE: Misaligned operation at range [3b3ed1c0, 3b3ed316]
DHCP client bound to address 192.168.1.171 (15 ms)
*** Warning: no boot file name; using 'C0A801AB.img'
Using ethernet at 7d580000 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.171
Filename 'C0A801AB.img'.
Load address: 0x200000
Loading: CACHE: Misaligned operation at range [3b3ec640, 3b3ec66a]
next prev parent reply other threads:[~2019-12-23 18:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 11:59 [PATCH 0/3] Ethernet support for Raspberry Pi 4 Andre Przywara
2019-12-18 11:59 ` [PATCH 1/3] net: Add support for Broadcom GENETv5 Ethernet controller Andre Przywara
2019-12-19 11:32 ` Daniel Schwierzeck
2019-12-19 11:42 ` Andre Przywara
2019-12-19 12:58 ` Daniel Schwierzeck
2019-12-20 15:47 ` Andre Przywara
2019-12-21 3:41 ` Florian Fainelli
2019-12-19 17:29 ` Matthias Brugger
2019-12-20 19:29 ` Stefan Wahren
2019-12-23 18:42 ` Stefan Wahren [this message]
2019-12-23 22:24 ` André Przywara
2019-12-24 18:30 ` Sascha Dewald
2019-12-27 11:15 ` Amit Tomer
2019-12-18 11:59 ` [PATCH 2/3] rpi4: Update memory map to accommodate scb devices Andre Przywara
2019-12-18 11:59 ` [PATCH 3/3] rpi4: Enable GENET Ethernet controller Andre Przywara
2019-12-19 8:27 ` [PATCH 0/3] Ethernet support for Raspberry Pi 4 Sascha Dewald
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=f595eb44-a5b7-fcec-e6c7-3b4fe7bc8bed@i2se.com \
--to=stefan.wahren@i2se.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