Commit Graph

838 Commits

Author SHA1 Message Date
Emmanuel Vadot
3995097fde Import DTS files for riscv from Linux 5.4
Requested by:	 mhorne
2019-12-03 09:12:53 +00:00
Emmanuel Vadot
007ac39ba3 Import DTS files from Linux 5.4
MFC after:	2 months
2019-11-28 19:30:41 +00:00
Emmanuel Vadot
0a457350fd arm: dts: ti: Fix mmc3 instance by setting it to disabled
DTS Import of Linux 5.3 added a patch that rework the L3 mmc instance
in the AM335x SoC but removed the status = 'disabled' on the node.
This cause the kernel to probe the device even if the board doesn't
have this mmc used and since we don't correctly activate the clock
for this module we panic with an external data abort.
Beaglebone(s) don't have this device anyway so simply disabling it.
Patch for the DTS was sent upstream.
https://patchwork.kernel.org/patch/11176921/

PR:		241089
Reported by:	phk
2019-10-07 08:11:49 +00:00
Emmanuel Vadot
046afb591f Import DTS files from Linux 5.3 2019-09-28 23:08:19 +00:00
Emmanuel Vadot
b2cdb732b2 Import DTS files from Linux 5.2 2019-09-28 22:54:56 +00:00
Emmanuel Vadot
216cad16b6 arm: dts: am33xx: Fix the region for uart0
The region for uart0 is declared to be 0x2000 in size but the parent
node only declare 0x1000.
As the parent only declare a size of 0x1000 in the ranges for it's children
this cause the device to not be mappable.

https://patchwork.kernel.org/patch/11056769/
2019-08-07 13:11:53 +00:00
Emmanuel Vadot
09001efbbe dts: Import files from Linux 5.1
MFC after:	2 months
2019-05-08 19:27:30 +00:00
Emmanuel Vadot
394b62b7ab Import DTS files from Linux 5.0
MFC after:	2 months
2019-04-10 18:15:36 +00:00
Brooks Davis
9e23ca1c94 Correct my previous correction to the license. It now matches the text
in https://spdx.org/licenses/GPL-2.0.html
2019-03-07 22:34:45 +00:00
Brooks Davis
b1329b31f7 Correct license boilerplate, to match the SPDX tag.
The GPL-2.0 tag is a deprecated tag which means that same thing as
GPL-2.0-only.
2019-03-07 22:20:20 +00:00
Matt Macy
8ea23c2b5b add GPL text in addition to SPDX tags as requested by core
MFC after:	1 week
2019-03-07 03:53:48 +00:00
Matt Macy
5426539c71 gcov support
add gcov support and export results as files in debugfs

Reviewed by:	hps@
MFC after:	1 week
Sponsored by:	iX Systems
Differential Revision:	https://reviews.freebsd.org/D19260
2019-02-23 21:14:00 +00:00
Emmanuel Vadot
1f041ae141 Import DTS from Linux 4.20
MFC after:	2 months
2019-01-11 09:40:34 +00:00
Emmanuel Vadot
3dd1a009cd Import DTS includes from 4.19
This was missed in r340337

MFC after:	3 days
2019-01-11 09:20:18 +00:00
Emmanuel Vadot
5cc57c208a Update our devicetree to 4.19 for arm and arm64
MFC after:	2 months
2018-11-10 21:02:32 +00:00
Emmanuel Vadot
c3f6b2cf9f dts: Import DTS for arm64
- Most of the boards are using U-Boot, u-boot embed a DTB that isn't
compiled with -@ (overlay ready) so we cannot use overlays. We want
overlays, overlays are nice.
 - The DTS life is going to linux, then sometimes it's imported in
U-Boot but it depend on the SoC family, U-Boot doesn't batch import
every DTS like we do. So sometimes to U-Boot DTS are very old. Or when
an interesting patch in commited upstream it is in Linux X+2 (roughly 4
months from now), we then have to wait for U-Boot to catch up, that
give us between 4 and 6 months to have an update.
 - Some boards like the Marvell ones have 3 DTS, the one in the
vendor U-Boot made by Marvell themselves, the one in u-boot mainline
and the one in Linux. I found that the DTS in the Marvell U-Boot have
some problem with FreeBSD (especially the macchiatobin that declare
node with the same address but not the same size, that is not something
that the rman code can handle, it could be modified, I don't know the
code well enough). Also some compatible are used when they shouldn't,
for example they declare the gpio being orion-gpio while this binding
requires interrupts supports, which the node doesn't have.
 - The above situation is mostly the same with RockChip SoCs (possibly
others, those are the only SoCs I work on that have this problem).

 Note that importing the DTS doesn't mean that every board will use
them, I don't intend to copy the DTB to the GENERIC memstick image for
the Overdrive 1000/3000 for example, the ones provided by the firmware
works fine.
 RPI3 will still stay an exception as we use the DTB provided by the
rpi-firmware package, so they come from the rpi foundation linux fork.
2018-08-23 13:21:01 +00:00
Emmanuel Vadot
2421576ca3 Import DTS files from Linux 4.18 2018-08-13 06:40:20 +00:00
Emmanuel Vadot
63e12418fd dts: Update our copy to Linux 4.17 2018-06-14 07:12:10 +00:00
Emmanuel Vadot
c712135a32 gnu/dts: Update our copy of arm dts from Linux 4.16 2018-04-20 19:37:08 +00:00
Landon J. Fuller
ded5af888d bwn(4): txpid2g/txpid5g[lh] are not defined after sromrev 7; the default
indices into the TX power gain table should be used instead.

This enables use of bwn(4) with later BCM4321 revisions.

Reported by:	Trev Roydhouse
2018-02-13 17:43:54 +00:00
Emmanuel Vadot
dc9b494e2b dts: Update our device tree sources files from Linux 4.15 2018-02-10 15:29:46 +00:00
Landon J. Fuller
d177c19903 bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.
- Remove the shim interface that allowed bwn(4) to use either siba_bwn or
  bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents.
- Drop the legay, now-unused siba_bwn bus driver.
- Clean up bhnd(4) board flag defines referenced by bwn(4).

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13518
2018-02-05 23:38:15 +00:00
Pedro F. Giffuni
ac2fffa4b7 Revert r327828, r327949, r327953, r328016-r328026, r328041:
Uses of mallocarray(9).

The use of mallocarray(9) has rocketed the required swap to build FreeBSD.
This is likely caused by the allocation size attributes which put extra pressure
on the compiler.

Given that most of these checks are superfluous we have to choose better
where to use mallocarray(9). We still have more uses of mallocarray(9) but
hopefully this is enough to bring swap usage to a reasonable level.

Reported by:	wosch
PR:		225197
2018-01-21 15:42:36 +00:00
Pedro F. Giffuni
0cee6dcdb0 misc geom and gnu: make some use of mallocarray(9).
Focus on code where we are doing multiplications within malloc(9). None of
these ire likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.

Differential revision: https://reviews.freebsd.org/D13837
2018-01-15 21:23:16 +00:00
Landon J. Fuller
8d14ca9c99 Introduce bwn(4) support for the bhnd(4) bus.
Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support
for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi
adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect
found in post-2009 Broadcom Wi-Fi hardware, are not supported by
siba_bwn(4).

The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port)
provides a unified kernel interface to a superset of the hardware supported
by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern
PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as
Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their
SSB or BCMA backplane.

This diff introduces opt-in bwn(4) support for bhnd(4) by providing:

 - A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via
   bhnd(4) instead of siba_bwn(4).
 - A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally
   probes at a higher priority than the siba_bwn(4) PCI driver.
 - A set of compatibility shims that perform translation of bwn(4)'s
   siba_bwn function calls into their bhnd(9) API equivalents when bwn(4)
   is attached via a bhnd(4) bus parent. When bwn(4) is attached via
   siba_bwn(4), all siba_bwn function calls are simply passed through to
   their original implementations.

To test bwn(4) with bhnd(4), place the following lines in loader.conf(5):

  hw.bwn_pci.preferred="1"

  if_bwn_pci_load="YES
  bwn_v4_ucode_load="YES"
  bwn_v4_lp_ucode_load="YES"

To verify that bwn(4) is using bhnd(4), you can check dmesg:

  bwn0: <Broadcom 802.11 MAC/PHY/Radio, rev 15> ... on bhnd0

... or devinfo(8):

pcib2
  pci2
    bwn_pci0
      bhndb0
        bhnd0
          bwn0
          ...

bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently
supported by bwn(4), including:

  - BCM4312
  - BCM4318
  - BCM4321

With minimal changes to the DMA code (not included in this commit), I was
also able to test support for newer BCMA devices by bringing up basic
working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets:

  - BCM43224
  - BCM43225

Approved by:	adrian (mentor, implicit)
Sponsored by:	The FreeBSD Foundation & Plausible Labs
Differential Revision:	https://reviews.freebsd.org/D13041
2017-12-02 02:21:27 +00:00
Emmanuel Vadot
518cc4989e Update our copy of DTS from the ones from Linux 4.14 2017-11-18 15:46:48 +00:00
Emmanuel Vadot
749885aa20 dts: Update our device tree sources file fomr Linux 4.13 2017-10-21 15:47:40 +00:00
Emmanuel Vadot
6f42f6a89a Update DTS files from Linux 4.12
Notable changes:

Allwinner:
  * H3/H5 were merged into a common dtsi file
  * include/dt-bindings/sun4i-a10.h is not included anymore
  in a lot of dts files
  * Add sun8i-h3-nanopi-neo-air board DTS file
2017-07-09 13:53:32 +00:00
Emmanuel Vadot
d1f30066f0 Update the GNU DTS file from Linux 4.11 2017-06-20 03:13:49 +00:00
Adrian Chadd
01c914420d [mips] [rt2880] Add oldest Ralink MIPS SOC RT2880 support code.
* Target module have ic plus etherswitch ip175c.
* Also add etherswitch support code on rt driver.

Reviewed by:	mizhka
Differential Revision:	https://reviews.freebsd.org/D10336
2017-05-06 06:20:34 +00:00
Emmanuel Vadot
d7d085358c Update our device tree files to a Linux 4.10 2017-03-07 13:56:49 +00:00
Ruslan Bukin
609a6315b7 Import latest vendor DTS files for Intel Arria 10. 2017-03-03 14:17:07 +00:00
Ruslan Bukin
f7d224a9d1 Add Ingenic X1000 DTS files (unofficial).
This is based on JZ4780 due to missing original X1000 parts.

Sponsored by:	DARPA, AFRL
2016-11-19 15:03:49 +00:00
Ruslan Bukin
72180f17a7 Import Ingenic CI20 (jz4780) DTS files.
Submitted by:	kan
Sponsored by:	DARPA, AFRL
2016-11-17 11:31:13 +00:00
Warner Losh
fad63e2d45 Revert and redo r306083.
Update the device tree source files to a Linux 4.7-RC.

The dts tree currently can't be merged w/o specific revisions.

Note: due to a stupid bug in the commit checking script, I couldn't
just remove the svn:keyword tag from the new files, I had to add
fbsd:nokeywords to all the files (including ones that didn't need it)
2016-09-22 15:17:36 +00:00
Andrew Turner
bc116e04c0 Update the device tree source files to a Linux 4.7-RC.
MFC after:	2 weeks
Sponsored by:	ABT Systems Ltd
2016-09-21 08:54:08 +00:00
Ian Lepore
62e4e3735a Revert changes for local testing, inadvertantly commited in r300811. 2016-05-26 23:59:42 +00:00
Ian Lepore
128e3872b9 Add a PPS driver that takes the timing pulse from a gpio pin. Currently
supports only ofw/fdt systems.  Some day, hinted attachment for non-fdt
systems should be possible too.
2016-05-26 23:56:12 +00:00
Stanislav Galabov
4e5f11e0b9 Bring ralink/mediatek DTS files in sync with LEDE
This is the last sync with LEDE Project dts files before 11.0.

Obtained from:	LEDE Project
Sponsored by:	Smartcom - Bulgaria AD
2016-05-25 06:39:48 +00:00
Adrian Chadd
0d1a968876 [bwn] convert another PHY-N workaround to the freebsd bwn format.
These were hidden behind an #ifdef that we weren't setting.

I don't have the hardware in question to check.
2016-05-23 04:17:27 +00:00
Adrian Chadd
1230b0df52 [bwn] typo. 2016-05-19 05:06:12 +00:00
Adrian Chadd
e6162ef26a [bwn] disable rfon checks so the 2056/2057 radios are programmed.
This was the big missing piece for getting the BCM94322MC NIC
to work at all.

Tested:

* BCM4322, STA mode (2g, 5g)
2016-05-19 04:48:13 +00:00
Adrian Chadd
10c523f115 [bwn] improve N-PHY debuggability a little bit. 2016-05-19 04:46:21 +00:00
Adrian Chadd
d06fe9105e [bwn] add opt_wlan.h and opt_bwn.h to each of the phy_n source files. 2016-05-19 04:45:50 +00:00
George V. Neville-Neil
bde75b9b3e Kill off ReiserFS as it is no longer supported, for obvious reasons. 2016-05-17 15:36:40 +00:00
Adrian Chadd
dbf8e132e1 [bwn] add initial bwn(4) N-PHY code, ported from Linux b43.
This is a GPLv2 PHY-N implementation based on the Linux b43 driver,
ported over to work in bwn(4).

I've tested this on the BCM4321 11abgn device, in 11bg and 11a modes.
The b43 PHY code only supports 11abg, no 11n, and 20MHz only wide
channels.

Yes, this is a GPLv2 driver, so it won't be included in the
default builds.

Tested:

* BCM4321 11abgn device (Apple!), 11bg and 11a STA mode.

Obtained from:	Linux b43
2016-05-17 07:09:24 +00:00
Stanislav Galabov
179f14534e Import LEDE dts files for Ralink/Mediatek
This is an import of the reworked LEDE dts files. Besides other things
they make it easier for us to reuse.

The only diffs left are for the following SoCs:
MT7620A (fbsd-mt7620a.dtsi)
MT7621 (fbsd-mt7621.dtsi)
MT7628 (fbsd-mt7628an.dtsi)
RT3883 (fbsd-rt3883.dtsi)

So we include the fbsd-*.dtsi files at the end of the original LEDE dtsi
files, using '#include "fbsd-xxxx.dtsi"'.
For example, for MT7621, the LEDE dtsi file is mt7621.dtsi. At the end of
it we add:
#include "fbsd-mt7621.dtsi"

Approved by:	adrian (mentor)
Obtained from:	LEDE project
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D6394
2016-05-17 06:42:24 +00:00
Stanislav Galabov
f3baf36388 Change OpenWRT imported dtsi files
Change '#include <fbsd-*>' to '/include/ "fbsd-*"' in [rm]t*.dtsi

Basically the pre-import work on OpenWRT's dts/dtsi files boils down to:

for f in `ls [mr]t*.dtsi`; do
printf '\n/include/ "fbsd-$f"\n' >> $f
done

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5993
2016-04-20 14:29:03 +00:00
Stanislav Galabov
cf83b43296 Import Mediatek/Ralink dts files from OpenWRT
Import original OpenWRT dts files after executing the following script
on them:

for f in `ls [mr]t*.dtsi`; do
	printf "\n#include <fbsd-$f>\n" >> $f
done

Approved by:	adrian (mentor)
Obtained from:	OpenWRT
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5971
2016-04-16 20:01:08 +00:00
Andrew Turner
2668945977 Update our copy of the Linux dts files to be in sync with Linux 4.5-rc1. We
now uave a full copy of the arm device tree sources to help when adding
support for newer boards.

Sponsored by:	ABT Systems Ltd
2016-02-09 16:42:32 +00:00