allwinner: add sun8i-emac driver

最近看到网上有个H3芯片的一些板子挺便宜的。尝试了一下,编译了openwrt的固件,发现没有支持内置的网卡和声卡。但是在网上下载了一些厂家的镜像却发现,在发行版的系统里是支持网卡和声卡的。

今天是2016年7月31号。如果是要编译openwrt的话,trunk版本对h3支持的比较好。

在 http://linux-sunxi.org/ 上溜达。搜索 "sun8i emac" ,在github上有这个支持的链接了。在github上可以找到 linux-sun8i-emac-wip-v2,看了一下里面确实包含了H3的dtsi和dts文件了。往下还没仔细看内容,先发个博文标记一下。


另外参看https://lwn.net/Articles/694927/

内容如下:

From: LABBE Corentin <clabbe.montjoie@gmail.com>
To: robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, davem@davemloft.net
Subject: [PATCH v2 0/5] net-next: ethernet: add sun8i-emac driver
Date: Wed, 20 Jul 2016 10:03:15 +0200
Message-ID: <1469001800-11615-1-git-send-email-clabbe.montjoie@gmail.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, LABBE Corentin <clabbe.montjoie@gmail.com>
Archive-link: ArticleThread

Hello

This patch series add the driver for sun8i-emac which handle the Ethernet MAC present on Allwinner H3/A83T/A64 SoCs.

It supports 10/100/1000 Mbit/s speed with half/full duplex.It can use an internal PHY (MII 10/100) or an external PHY via RGMII/RMII.

This patch series enable the driver only for the H3 SoC since A83T and A64 doesn't have the necessary clocks present in mainline.

This patch series enable the driver only for the OrangePiPC board since other board with H3 use external PHY which need optional regulators that will be
supported later.

The driver have been tested on the following boards:
- H3 Orange PI PC, Orange PI Plus, BananaPI-M2+
- A64 Pine64
- A83T BananaPI-M3

I would like to thanks Chen-Yu Tsai for his help on developing this driver.

Regards

Changes since v1
- Implement NAPI
- Sorted and reworded all define
- Reworked ethtools stats strings
- Removed all unneeded __packked and __aligned
- Added tuning of RX/TX ring size via ethtool
- Corrected use of sk/skb naming
- Added some wmb when needed
- Moved irq claim/free to emac_open/close
- Lots of code refactoring

LABBE Corentin (5):
  ethernet: add sun8i-emac driver
  MAINTAINERS: Add myself as maintainers of sun8i-emac
  ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac
  ARM: dts: sun8i-h3: add sun8i-emac ethernet driver
  ARM: dts: sun8i: Enable sun8i-emac on the Orange PI PC

 .../bindings/net/allwinner,sun8i-emac.txt          |   65 +
 MAINTAINERS                                        |    6 +
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |   11 +
 arch/arm/boot/dts/sun8i-h3.dtsi                    |   14 +
 drivers/net/ethernet/allwinner/Kconfig             |   13 +
 drivers/net/ethernet/allwinner/Makefile            |    1 +
 drivers/net/ethernet/allwinner/sun8i-emac.c        | 2127 ++++++++++++++++++++
 7 files changed, 2237 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/allwinner,sun8i-emac.txt
 create mode 100644 drivers/net/ethernet/allwinner/sun8i-emac.c


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值