Commit Graph

54 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
fbeb453ba9 Add evdev support to TI ADC/touchscreen driver
Add generic evdev support to touchscreen part of ti_adc: two absolute
coordinates + button touch to indicate pen position. Pressure value
reporting is not implemented yet.

Tested on: Beaglebone Black + 4DCAPE-43T + tslib
2016-09-11 19:08:21 +00:00
Luiz Otavio O Souza
522f50c5a0 Remove unused USB ethernet driver from BEAGLEBONE/AM335x kernel. 2016-07-23 17:36:17 +00:00
Ian Lepore
3a86bcdd17 Remove HZ=<various> from all armv6 configs, put HZ=1000 in std.armv6.
All armv6 processors are plenty fast enough for HZ=1000.

No changes are made for older arm systems, because some chips are a bit
wimpy for 1000 while others do fine, so it has to be set on a per-config
basis.
2016-07-09 21:14:59 +00:00
Ian Lepore
7651aa600b Consolidate debugging options from all arm kernel configs to std.arm[v6]. 2016-07-09 20:42:57 +00:00
Andrew Turner
59c3cb81c1 Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-04-15 16:05:41 +00:00
Svatopluk Kraus
86816217ff Rework am33xx interrupt controller for INTRNG and enable it
on BEAGLEBONE by default.

Reviewed by:	gonzo
Differential Revision:	https://reviews.freebsd.org/D5805
2016-04-04 09:23:21 +00:00
Luiz Otavio O Souza
191004d586 Enable SPI1 on Beaglebone Black.
SPI1 was chosen because SPI0 shares the gpio pins with I2C1.

Sponsored by:	Rubicon Communications (Netgate)
2016-03-30 17:32:14 +00:00
Bjoern A. Zeeb
eeaf6acbfd Now that the PMU implementation is independent of HWPMC
as of r288992 use it to manage the CCNT.

Use the CNNT for get_cyclecount() instead of binuptime() when device pmu
is compiled in; if it fails to attach, fall back to the former method.

Enable by default for the BeagleBoneBlack configuration.

Optained from:		Cambridge/L41
Sponsored by:		DARPA/AFRL
Reviewed by:		andrew
Differential Revision:	https://reviews.freebsd.org/D3837
2015-11-09 17:57:32 +00:00
Oleksandr Tymoshenko
9d94145b96 Enable gpiobacklight in BEAGLEBONE config to support LCD capes by
4DSYSTEMS out of box
2015-10-18 23:58:05 +00:00
Andrew Turner
7f8d3ff0b8 Enable KDTRACE_HOOKS by default on all armv6 kernels to get more testing. 2015-08-23 21:10:20 +00:00
Ian Lepore
4159fbab87 Add a new PPS driver for AM335x (beaglebone) timer hardware. This can be
used as a module or compiled-in.
2015-08-13 15:19:30 +00:00
Rui Paulo
7b80d5ad13 BEAGLEBONE: remove dtrace from MODULES_EXTRA.
This config is already building all modules, so we don't need the
MODULES_EXTRA definition.  It was also causing problems to users who
rely on MODULES_OVERRIDE to do the right thing.

Discussed with:	ian
2015-08-04 19:04:02 +00:00
Mark Johnston
32cd0147fa Implement the lockstat provider using SDT(9) instead of the custom provider
in lockstat.ko. This means that lockstat probes now have typed arguments and
will utilize SDT probe hot-patching support when it arrives.

Reviewed by:	gnn
Differential Revision:	https://reviews.freebsd.org/D2993
2015-07-19 22:14:09 +00:00
Oleksandr Tymoshenko
224fba2b43 Add HDMI support to Beaglebone Black:
- Add driver for TDA19988 HDMI framer
- Add simple interface to communicate with HDMI sink: read EDID and set videomode
- Add event-based API to notify LCD controller when HDMI sink is available
- Add HDMI framer node and add refernce to it to lcdc node. This part of
    DTS tree is custom and does not match Linux DTS because Linux uses
    combination of pseudo-node in DTS and hardcoded driver information
    that does not map to our model.
2015-06-18 00:57:52 +00:00
Ian Lepore
eb6e1a0277 Ensure that all arm kernel configs contain ALT_BREAK_TO_DEBUGGER and not
BREAK_TO_DEBUGGER if they have a serial console (most do).  A burst of
serial line noise (such as unplugging a usb serial adapter) can look like
a break and drop a working system into the debugger.  The alt break sequence
(<CR>~^B) works fine on both serial and non-serial consoles.
2015-05-25 23:27:13 +00:00
Oleksandr Tymoshenko
5b03aba6c8 Switch TI platform support code from using FreeBSD's custom-baked DTS
files to vendor-provided ones. It should make easier to adopt platform
code to new revisions of hardware and to use DTS overlays for various
Beaglebone extensions (shields/capes).

Original dts filenames were not changed, they're now wrappers over dts
files provided by TI. So make sure you update .dtb files on your
devices as part of kernel update

GPIO addressing was changed: instead of one global /dev/gpioc0 there
are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for
instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25
on /dev/gpioc3

On Pandaboard serial console devices was changed from /dev/ttyu0 to
/dev/ttyu2 so you'll have to update /etc/ttys to get login prompt
on serial port in multiuser mode. Single user mode serial console
should work as-is

Differential Revision:	https://reviews.freebsd.org/D2146
Reviewed by:	rpaulo, ian, Michal Meloun, Svatopluk Kraus
2015-05-22 03:16:18 +00:00
Andrew Turner
d667b90d53 Clean up the ARM kernel configs to use 'include<space><tab>"file"'. 2015-05-07 12:38:23 +00:00
Andrew Turner
5c1bbeb74b Move the first batch of common armv6 options to std.armv6. 2015-05-05 17:59:02 +00:00
Ian Lepore
65c3de4e62 Create std.arm and std.armv6 config files and include the right one from
each of the existing kernel configs.  This gives a place to put config
that applies to the entire arch.

Add the ARM_NEW_PMAP option to std.armv6.  This is working well in early
testing and it's time for wide exposure, but it's still nice to be able
to fall back to the old implementation for testing when a problem comes
along.  Eventually the option and the old implementation will go away.

The opportunity now exists to move a whole lot of boilerplate from all the
arm kernel config files into std.arm*, but that's a commit for another day.
2015-05-05 16:09:25 +00:00
Luiz Otavio O Souza
1263958474 In preparation for the next cycle of official ARM images, add ARM_NEW_PMAP
to supported kernels.

This is a temporary solution and should be reverted when ARM_NEW_PMAP is
enabled by default.
2015-05-04 20:59:23 +00:00
Ian Lepore
f61d8cc6fe Remove the static DTB config and instead build modules/dtb/am335x.
Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around
build problems that have long since been fixed correctly.

PR:		198460
2015-03-09 21:54:27 +00:00
Warner Losh
601e4171b4 Add the DTrace modules to the build, rather than only build the dtrace
modules.
2015-03-09 15:43:33 +00:00
Ruslan Bukin
32c282c74a Fix style. 2015-03-06 16:23:30 +00:00
George V. Neville-Neil
fcb5606706 Initial version of DTrace on ARM32.
Submitted by:	Howard Su based on work by Oleksandr Tymoshenko
Reviewed by:	ian, andrew, rpaulo, markj
2015-02-10 19:41:30 +00:00
Luiz Otavio O Souza
2566c5264a Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p.
To cut off the power we need to start the shutdown sequence by writing
the OFF bit on PMIC.

Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE
pin when it is ready for the PMIC to cut off the power.  This is done by
triggering the ALARM2 interrupt on SoC RTC.

The RTC driver only works in power management mode which means it won't
provide any kind of time keeping functionality.  It only implements a way
to trigger the ALARM2 interrupt when requested.

Differential Revision:	https://reviews.freebsd.org/D1489
Reviewed by:	rpaulo
MFC after:	2 weeks
2015-01-12 03:23:16 +00:00
John Baldwin
3e32dff52c Remove "New" label from NFSCL/NFSD now that they are the only NFS
client/server.  While here, remove duplicate NFSCL from sys/conf/NOTES.

Approved by:	rmacklem
2015-01-06 16:15:57 +00:00
Andrew Turner
afa6f59cca Fix the indentation to simplify comparing the ARM config files. 2014-12-21 11:55:40 +00:00
Andrew Turner
0c08f78521 tart to clean up the armv6 kernel configs by reducing the diff between
them in the first sections and the later FDT support.

Differential Revision:	https://reviews.freebsd.org/D1346
Reviewed by:	rpaulo (earlier version)
2014-12-21 11:37:00 +00:00
Rui Paulo
b79090d6db Make the ti_mbox and ti_pruss drivers optional.
MFC after:	1 week
2014-10-18 17:00:55 +00:00
Rui Paulo
2ffc65f982 Add a driver for the TI watchdog.
The TI watchdog timer is present on BeagleBone's.  Since 2014, U-Boot
has been booting the BeagleBone with the watchdog enabled.  We need to
disable it on boot to avoid a spurious reset.
The timer isn't exactly precise, but it will do as a watchdog.  This
is also a reflection of the watchdog(9) API.

In the future, we could handle interrupts, but the watchdog(9) API
needs to be a bit smarter before that can happen.

Differential Revision:	https://reviews.freebsd.org/D965
Reviewed by:	andrew
MFC after:	1 week
Relnotes:	yes
2014-10-18 16:59:21 +00:00
Andrew Turner
56f4208d56 Remove the need for files.beaglebone and std.beaglebone by moving the one
option they defined into files.am335x.
2014-10-13 16:16:32 +00:00
Warner Losh
877c97e5bd Resync comments about scbus and pass for life after AHCI joined CAM.
Sponsored by: Netflix
2014-09-01 03:49:21 +00:00
Andrew Turner
8166c218e6 Reduce the diff between the PandaBoard and BeableBone kernel configs to
help with the creation of a more generic Ti kernel config.
2014-05-25 10:17:26 +00:00
Andrew Turner
f37128c048 Move the Ti SoCs to use the ARM platform. This should help allowing a
single kernel to work on both PandaBoard and BeagleBone.
2014-05-17 18:35:22 +00:00
Luiz Otavio O Souza
855feb6867 Adds the ADC driver for TI AM3xxx SoC family.
The ADC has a 12bit resolution and its raw output can be read via sysctl(8)
interface.

The driver allows the setup of ADC clock, samples average and open delay
(the number of clock cycles to wait before start the conversion).

The TSC_ADC module is set in the general purpose mode (no touchscreen
support).

Tested on Beaglebone-black.

Written based on AM335x TRM.

Reviewed by:	rpaulo
Approved by:	adrian (mentor)
Tested by:	me, Brian J. McGovern, Sulev-Madis Silber (ketas)
2014-03-24 20:06:27 +00:00
Warner Losh
d4f95c889d In kernel config files, it is supposed to be 'options<space><tab>' not
'options<tab><tab>', per long standing (but recently not so strictly
enforced) convention.
2014-03-18 14:41:18 +00:00
Warner Losh
2299abfac5 Make all the comments '# ' and align to same column. This fixes the
rampently incosnsitent usage which made cut and paste from one file
to another look ugly.
2014-03-16 15:22:46 +00:00
Ian Lepore
6f5f9035f7 Strip arm/conf/DEFAULTS down to just items that are mandatory for running
the architecture.  Move the other contents into each of the individual
config files.

Requested by:	imp
2014-03-07 21:36:49 +00:00
Ian Lepore
e8a3a237fc Add option TMPFS to arm/conf/DEFAULTS, remove it from the few configs
that have it individually.  Concensus on freebsd-arm@ is that it should
be included in all ARM kernels.
2014-03-07 00:25:23 +00:00
Luiz Otavio O Souza
62564a0858 Make the gpioled(4) work out of the box on BBB.
Add gpioled(4) to BEAGLEBONE kernel and add the description of the four
on-board leds of beaglebone-black to its DTS file.

Approved by:	adrian (mentor, implicit)
2014-02-13 18:51:37 +00:00
Ian Lepore
27ce8f8368 Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes. 2013-11-20 16:42:01 +00:00
Ian Lepore
59769a581f Make the standard sdhci(4) driver work for the TI OMAP family SoCs.
The MMCHS hardware is pretty much a standard SDHCI v2.0 controller with a
couple quirks, which are now supported by sdhci(4) as of r254507.

This should work for all TI SoCs that use the MMCHS hardware, but it has
only been tested on AM335x right now, so this enables it on those platforms
but leaves the existing ti_mmchs driver in place for other OMAP variants
until they can be tested.

This initial incarnation lacks DMA support (coming soon).  Even without it
this improves performance pretty noticibly over the ti_mmchs driver,
primarily because it now does multiblock IO.
2013-08-20 12:33:35 +00:00
Ian Lepore
2a21affc5e Enable VFP support for BeagleBone. 2013-08-17 19:29:51 +00:00
David E. O'Brien
0e6a0799a9 Back out r253779 & r253786. 2013-07-31 17:21:18 +00:00
David E. O'Brien
99ff83da74 Decouple yarrow from random(4) device.
* Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option.
  The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow.

* random(4) device doesn't really depend on rijndael-*.  Yarrow, however, does.

* Add random_adaptors.[ch] which is basically a store of random_adaptor's.
  random_adaptor is basically an adapter that plugs in to random(4).
  random_adaptor can only be plugged in to random(4) very early in bootup.
  Unplugging random_adaptor from random(4) is not supported, and is probably a
  bad idea anyway, due to potential loss of entropy pools.
  We currently have 3 random_adaptors:
  + yarrow
  + rdrand (ivy.c)
  + nehemeiah

* Remove platform dependent logic from probe.c, and move it into
  corresponding registration routines of each random_adaptor provider.
  probe.c doesn't do anything other than picking a specific random_adaptor
  from a list of registered ones.

* If the kernel doesn't have any random_adaptor adapters present then the
  creation of /dev/random is postponed until next random_adaptor is kldload'ed.

* Fix randomdev_soft.c to refer to its own random_adaptor, instead of a
  system wide one.

Submitted by: arthurmesh@gmail.com, obrien
Obtained from: Juniper Networks
Reviewed by: obrien
2013-07-29 20:26:27 +00:00
Rui Paulo
e3542928e3 Revert ROOTDEVNAME change from previous commit. 2013-07-25 03:44:12 +00:00
Rui Paulo
54d04d168c Enable modules for the BeagleBone and for the Raspberry Pi. 2013-07-25 03:31:27 +00:00
Oleksandr Tymoshenko
9afdeb10e4 - Add USFS driver as an example of device mode for AM335x-based devices 2013-07-07 04:24:38 +00:00
Rui Paulo
613c4afd62 Revert r250692. We'll use 1 kernel config file for the BeagleBone models. 2013-05-17 15:20:45 +00:00
Tim Kientzle
de52ceebca Tweaks to standard BEAGLEBONE config, as recently discussed
on FreeBSD-ARM.
2013-02-02 06:01:57 +00:00