[U-Boot] [PATCH v7 00/11] rockchip: Add gmac Ethernet support

Simon Glass sjg at chromium.org
Thu Jan 12 06:08:30 CET 2017


Hi,

On 11 January 2017 at 03:46, Romain Perier <romain.perier at collabora.com> wrote:
> >From Romain:
> This is a resent of Simon's v4 series. I have changed what was suggested
> by David Wu about the driver name (rename gmac_rk3288 to gmac_rockchip).
> I have also tested the whole series on a rock2 square board, updated the
> configuration files for rock2 board. I have fixed a build failure caused
> by recent changes in config_distro_defaults (CMD_PXE is no longer enabled,
> so I enabled DISTRO_DEFAULTS for Rockchip platforms by default). I have also
> added few Signed-off-by tags.
>
> >From Simon:
> This v3 patch is an update on Sjoerd's original v2 series from Feburary.
> I have dealt with the changes requested at the time, and adjusted the way
> that the speed change is handled.
>
> Tested on firefly-rk3288, rock2.
>
> Original cover letter:
> To add support I've taken a slightly different approach then some of the
> other boards with a designware IP block, by creating a new driver to
> take care of the platfrom glue which subclasses the main designware driver
> instead of adding the compatibility string the designware driver
> directly and doing the SoC specific setup in the board files. This seems
> quite a bit more elegant in a device model based world.
>
> I've only tested this series on a Radxa Rock 2 board, it would be great
> if someone could test this on other boards with the designware IP
> especially for those with the reset GPIO in devicetree (e.g. some of the
> Allwinner boards).
>
> Compared to the first one round the pinctrl related bits were dropped as
> RK3288 now has a full pinctrl driver. Furthermore the started hook in the
> designware driver was renamed to fix_mac_speed in line with what linux
> uses and moved to the dw_link_adjust function.
>
> Changes in v7:
> - Fixed build failure caused by recent changes in config_distro_defaults.h
>   (CMD_PXE is no longer enabled so BOOTENV_DEV_PXE is expanded to
>   BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE). The
>   fix itself consists in enabling DISTRO_DEFAULTS by default for Rockchip
>   platforms.
> - Added a new commit for enabling ETH address randomization on the rock2,
>   otherwise we cannot use ethernet interface and we get an error at
>   bootup.
>
> Changes in v6:
> - Changed Acked-by to Signed-off-by for Romain in commits from
>   [PATCH 01/09] to [PATCH 06/09]
>
> Changes in v5:
> - Changed the name of the driver gmac_rk3288 to gmac_rockchip, as
>   suggested by David Wu. Also I rewrote the commit message
> - Added my Acked-by to commits from [PATCH 01/09] to [PATCH 06/09]
> - Updated configuration files for rock2 and firefly with the new
>   Kconfig symbol
>
> Changes in v4:
> - Fix commit message to say 'rk3399'
>
> Changes in v3:
> - Add a few new patches
> - Add comments for struct gmac_rk3288_platdata
> - Add new patch to adjust dw_adjust_link() to return an error
> - Add new patch to enable networking on evb-rk3399
> - Add new patch to export the operation functions
> - Add new patch to split the link init into a separate function
> - Adjust binding to use r/tx-delay instead of r/tx_delay
> - Drop the 'net: designware: Add a fix_mac_speed hook' patch
> - Sort includes
> - Use debug() instead of printf() for error
> - Use function calls instead of fix_mac_speed() hook
> - Use new clk interface
>
> Changes in v2:
> - Adjust to new hook name
> - Fix various coding style nits
>
> Romain Perier (2):
>   Enable DISTRO_DEFAULTS for Rockchip platforms
>   rockchip: Enable ETH address randomization for the rock2
>
> Simon Glass (4):
>   net: designware: Adjust dw_adjust_link() to return an error
>   net: designware: Split the link init into a separate function
>   net: designware: Export the operation functions
>   rockchip: evb-rk3339: Enable DHCP
>
> Sjoerd Simons (5):
>   net: designware: Export various functions/struct to allow subclassing
>   net: gmac_rockchip: Add Rockchip GMAC driver
>   rockchip: Enable networking support on rock2 and firefly
>   rockchip: Add PXE and DHCP to the default boot targets
>   rockchip: Drop Ethernet from the TODO
>
>  Kconfig                           |   1 +
>  configs/evb-rk3399_defconfig      |   3 +
>  configs/firefly-rk3288_defconfig  |   4 +
>  configs/rock2_defconfig           |   5 ++
>  doc/README.rockchip               |   1 -
>  drivers/net/Kconfig               |   7 ++
>  drivers/net/Makefile              |   1 +
>  drivers/net/designware.c          |  57 ++++++++++----
>  drivers/net/designware.h          |  13 ++++
>  drivers/net/gmac_rockchip.c       | 154 ++++++++++++++++++++++++++++++++++++++
>  include/configs/rockchip-common.h |   4 +-
>  11 files changed, 232 insertions(+), 18 deletions(-)
>  create mode 100644 drivers/net/gmac_rockchip.c
>
> --
> 2.9.3
>

I have tested this on a gigabit link and it does not work. I wonder if
the clocks are wrong?

However it works fine on 100Mbps which is better than what we have, so
I'm going to apply this. Thank you for your work, Romain.

Regards,
Simon


More information about the U-Boot mailing list