Commit Graph

9 Commits

Author SHA1 Message Date
Mateusz Guzik
50cedfede3 arm64: clean up empty lines in .c and .h files 2020-09-01 21:18:06 +00:00
Mike Karels
349eddbd07 Add support for bcm54213PE in brgphy.
This chip is used in the Rasperry Pi 4, and is supported by the if_genet
driver. Currently we use the ukphy mii driver, this patch switches over
to the brgphy mii driver instead. To support the rgmii-rxid phy mode,
which is now the default in the Linux dtb, we add support for clock
skewing.

These changes are taken from OpenBSD and NetBSD, except for the bailout
in brgphy_bcm54xx_clock_delay() in rgmii mode, which was found necessary
after testing.

Submitted by:	Robert Crowston, crowston at protomail.com
Differential Revision:	https://reviews.freebsd.org/D25251
2020-06-18 23:57:10 +00:00
Mike Karels
51cefda170 genet: workaround for problem with ICMPv6 echo replies
The ICMPv6 echo reply is constructed with the IPv6 header too close to
the beginning of a packet for an Ethernet header to be prepended, so we
end up with an mbuf containing just the Ethernet header.  The GENET
controller doesn't seem to handle this, with or without transmit checksum
offload.  At least until we have chip documentation, do a pullup to
satisfy the chip.  Hopefully this can be fixed properly in the future.
2020-05-30 02:09:36 +00:00
Mike Karels
0add2a5229 genet: fix issues with transmit checksum offload
Fix problem with ICMP echo replies: check only deferred data checksum
flags, and not the received checksum status bits, when checking whether
a packet has a deferred checksum; otherwise echo replies are corrupted
because the received checksum status bits are still present.

Fix some unhandled cases in packet shuffling for checksum offload.
2020-05-30 02:02:34 +00:00
Mike Karels
2cd0c52978 Add genet driver for Raspberry Pi 4B Ethernet
Add driver for Broadcom "GENET" version 5, as found in BCM-2711 on
Raspberry Pi 4B. The driver is derived in part from the bcmgenet.c
driver in NetBSD, along with bcmgenetreg.h.

Reviewed by:	manu
Obtained from:	in part from NetBSD
Relnotes:	yes, note addition
Differential Revision:	https://reviews.freebsd.org/D24436
2020-04-22 00:42:10 +00:00
Wojciech Macek
36c1a37655 Add MDIO PHY driver for NS2 ARM64 platform.
Obtained from:         Semihalf
Authored by:           Kornel Duleba <mindal@semihalf.com>
Approved by:           wma
Differential Revision: https://reviews.freebsd.org/D21335
2020-04-06 05:48:58 +00:00
Oleksandr Tymoshenko
745c4aa5e8 Make BRCM2837 port conform FreeBSD/ARM64 guidelines
- Rename SOC_BCM2837 to SOC_BRCM_BCM2837, put it to opt_soc.h
- do not use files.XXX files, just move required sources to
    conf/files.arm64 and make them depend on soc_brcm_bcm2837

Suggested by: andrew
2016-10-14 22:23:03 +00:00
Oleksandr Tymoshenko
65de32210c Remove redundant kern_clocksource.c. It is already in conf/files.arm64
Reported by:	andrew
2016-10-14 17:40:48 +00:00
Oleksandr Tymoshenko
563193fd0c Add initial Raspberry Pi 3 support
RPI3 kernel config builds kernel compatible with latest upstream device
tree and firmware: https://github.com/raspberrypi/firmware/tree/master/boot
As of today it's 597c662a613df1144a6bc43e5f4505d83bd748ca

Default console is PL01x, so pi3-disable-bt dt overlay should be configured
in config.txt and stock U-Boot should be patched to use proper serial port.

Yet unsupported: SMP, VCHIQ, RNG driver. RNG requires some work due to
upstream device tree incompatibility.

Multiple people contributed to this work over time: db@, loos@, manu@
2016-10-14 03:37:35 +00:00