Commit Graph

193 Commits

Author SHA1 Message Date
Luiz Otavio O Souza
6a11fa4e31 Add the MMC/SD driver for Allwinner SoCs.
This is based on the patch sent by Alexander Fedorov with the following
fixes/improvements:

 - Better error handling;
 - Clock is derived from PLL6 (obtained from netbsd);
 - No more unnecessary busy loops on interrupt handler;
 - style(9) fixes and code cleanup.

I also want to thanks Martin Galvan who has sent an alternative
implementation with some interesting fixes.

Tested on CubieBoard2, Banana-Pi (thanks to netgate!) and Cubieboard1
(Pratik Singhal).

This is intended to pave the way for the upcoming GSoC work (and make
easier the build of images for the supported boards).

PR:		196081
Submitted by:	Alexander Fedorov <alexander.fedorov@rtlservice.com>
2015-05-21 17:39:42 +00:00
Ganbold Tsagaankhuu
37da2ff61a The RTC initialization values are based on the SoC which can be
determined at runtime so there's no need to set the values in
each DTS.
Tested on YYHD18 (aml8726-m3), VSATV102 (aml8726-m6), and
ODROIDC1 (aml8726-m8b).

Differential Revision:	https://reviews.freebsd.org/D2588
Submitted by:		John Wehle
2015-05-21 07:01:08 +00:00
Zbigniew Bodek
4d892e4f22 Introduce support for the Alpine PoC from Annapurna Labs
The Alpine Platform-On-Chip offers multicore processing
(quad ARM Cortex-A15), 1/10Gb Ethernet, SATA 3, PCI-E 3,
DMA engines, Virtualization, Advanced Power Management and other.

This code drop involves basic platform support including:
SMP, IRQs, SerDes, SATA. As of now it is missing the PCIe support.
Part of the functionality is provided by the low-level code (HAL)
delivered by the chip vendor (Annapurna Labs) and is a subject to
change in the future (is planned to be moved to sys/contrib directory).

The review log for this commit is available here:
https://reviews.freebsd.org/D2340

Reviewed by:    andrew, ian, imp
Obtained from:  Semihalf
Sponsored by:   Annapurna Labs
2015-05-15 18:25:48 +00:00
Luiz Otavio O Souza
6a4b96ad82 Add support for the power button on BeagleBone Black.
Shutdown and turn off the board when the power button is pressed.

Submitted by:	Michal Meloun <meloun@miracle.cz>
Relnotes:	yes
2015-05-13 01:10:28 +00:00
Ganbold Tsagaankhuu
2a77d72739 The interrupt-parent is set globally so it's unnecessary to also set it at each node.
Differential Revision:	https://reviews.freebsd.org/D2471
Submitted by:		John Wehle
2015-05-08 04:22:11 +00:00
Luiz Otavio O Souza
962940ce6c Add the SMP support for Raspberry Pi 2 (BCM2836).
Tested with the build of some ports and a buildworld.

Submitted by:	Daisuke Aoyama <aoyama@peach.ne.jp>
2015-05-07 22:11:44 +00:00
Luiz Otavio O Souza
b7ce14b99c Fix the gpio-leds node to match the LEDs on RPI2.
The 'pwr' LED is connected to GPIO pin 35 (active high) and the 'act' LED
is connected to GPIO pin 47 (active high).

Remove the GPIO pin 47 from reserved pins list, previously it was used to
signaling the SD Card presence and now it is used by act LED.
2015-04-23 18:36:36 +00:00
Luiz Otavio O Souza
b7dee41fd4 Enable the watchdog on RPI2.
The watchdog is used to reset the SoC on cpu_reset().

Without this, RPI2 will not reboot when asked to.
2015-04-23 14:58:39 +00:00
Luiz Otavio O Souza
88d1700334 Fix the SDHCI clock frequency for RPI2, the default clock (for the newer
firmware versions) is 250MHz.
2015-04-22 17:35:58 +00:00
Ganbold Tsagaankhuu
498c473a94 This modifies the FreeBSD Amlogic DTS files to use the GNU files
as the base.

Submitted by:	John Wehle
Reviewed by:	imp
2015-04-11 08:27:38 +00:00
Ganbold Tsagaankhuu
7a24f0a21f The GNU files don't include a DTS for the aml8726-m8b (which has
cortex-a5 cores unlike the aml8726-m8 which has cortex-a9 cores).

Submitted by:	John Wehle
Reviewed by:	imp
2015-04-11 08:25:53 +00:00
Ganbold Tsagaankhuu
edb96014a8 Add device tree files for Hardkernel Odroid-C1 and Visson ATV-102 devices.
Submitted by:	John Wehle
Approved by:	stas (mentor)
2015-03-31 11:55:56 +00:00
Andrew Turner
0006eaaf5f Add the Raspberry Pi 2 dtb, based on the existing rpi.dts, but with a
different base address for the devces.

MFC after:	1 week
2015-03-25 10:26:07 +00:00
Jayachandran C.
020a664210 Move PCI bus below simplebus for Broadcom XLP
This will enable us to do common allocation code for memory and
interrupts for SoC devices as well as PCI devices.
2015-02-27 02:21:52 +00:00
Jayachandran C.
5441635eb0 Remove run-time allocation of XLP IRQs
Follow the same static IRQ to Interrupt Table Entry mapping as the other
OS supported on XLP.
2015-02-26 02:22:47 +00:00
Jayachandran C.
70abc1ff8e Add netlogic,xlp-pic as interrupt controller for XLP
Add an empty driver for netlogic,xlp-pic to ensure that the device tree
is correct and has an interrupt controller.
2015-02-26 02:05:45 +00:00
Luiz Otavio O Souza
206b8a8d5b Set the #address-cells and #size-cells properties on I2C controllers of
Raspberry-pi.

This fixes the issues of dtc(1) while compiling I2C addresses set in "reg"
property.

MFC after:	2 weeks
2015-02-17 19:38:16 +00:00
Ruslan Bukin
8aaa1a77ec Add a generic way for hooking PMC interrupt. 2015-01-26 10:31:17 +00:00
Ruslan Bukin
f0583578a1 Add support for audio transmitting, include drivers for:
o Digital Audio Multiplexer (AUDMUX)
o Smart Direct Memory Access Controller (SDMA)
o Synchronous Serial Interface (SSI)

Disable by default as it depends on SDMA firmware.

Sponsored by:	Machdep, Inc.
2015-01-24 13:07:07 +00:00
Ganbold Tsagaankhuu
e2763dca83 Enable Synopsys DesignWare Mobile Storage Host Controller
driver on Rockchip boards. It currently supports PIO mode
and dma mode needs external dma controller to be used.

Submitted by:   jmcneill
Approved by:    stas (mentor)
2015-01-20 09:07:28 +00:00
Luiz Otavio O Souza
36bcb64f93 Fix the PMIC node name to match the PMIC i2c address.
Remove an extra blank line.

No functional changes.

MFC after:	3 days
2015-01-15 01:20:56 +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
Ruslan Bukin
e5df85ca42 Add driver for general-purpose I/O (GPIO).
Sponsored by:	DARPA, AFRL
2015-01-02 13:15:36 +00:00
Luiz Otavio O Souza
3681c8d718 Add interrupt support for GPIO pins on OMAP4 and AM335x.
This enables the use of GPIO pins as interrupt sources for kernel devices
directly attached to gpiobus (userland notification will be added soon).

The use of gpio interrupts for other kernel devices will be possible when
intrng is complete.

All GPIO pins can be set to trigger on:

- active-low;
- active-high;
- rising edge;
- falling edge.

Tested on:	Beaglebone-black
2014-12-25 17:28:26 +00:00
Ian Lepore
1dda8e90c9 Revert r276101, it didn't fix the problem and causes a compile error
(nested comment blocks).
2014-12-24 01:10:53 +00:00
Rui Paulo
df90fb1f9f Temporarily disable the cpus directive until I figure out what's wrong. 2014-12-23 03:00:18 +00:00
Rui Paulo
b9450e431d Driver for CPU frequency/voltage control on the Raspberry Pi.
Differential Revision:	https://reviews.freebsd.org/D1025
Submitted by:	Daisuke Aoyama aoyama@peach.ne.jp
Reviewed by:	ian (earlier version), rpaulo
MFC after:	1 month
Relnotes:	yes
2014-12-20 19:15:10 +00:00
Ruslan Bukin
49506d6809 Add configuration files for BERI soft-core synthesized on
Terasic SoCKit board (Altera FPGA).

Use virtio block as root filesystem device.

Sponsored by:	DARPA, AFRL
2014-12-17 11:36:31 +00:00
Ruslan Bukin
628920c43b Move memory node to the root, so fdt_get_mem_regions() can find it. 2014-12-17 11:05:44 +00:00
Ruslan Bukin
28dcb50c72 o Add PIO[2,3] devices information
o Enable Virtio Block
2014-12-17 10:48:53 +00:00
Ruslan Bukin
a8098016f1 o Add BERI Virtio Networking Frontend (if_vtbe)
o Move similar block/networking methods to common file
o Follow r275640 and correct MMIO registers width
o Pass value to MMIO platform_note method.

Sponsored by:	DARPA, AFRL
2014-12-09 16:39:21 +00:00
Ruslan Bukin
e8cf387c51 o Add PIO and vtblk mmio device info to the tree
o Add FPGA memory window to static dev mappings
o Fix whitespace
2014-11-25 16:06:19 +00:00
Brooks Davis
a9332fb303 Merge from CheriBSD:
commit 6d3c4c0922
    Add terasic_mtl vt(4) framebuffer driver

    terasic_mtl can be built with syscons(4) and vt(4) attachments, selected
    at compile time.

commit 33240259b4
    Clear terasic_mtl text buffer on attach

commit d188c2d241
    Update terasic vt(4) driver for FreeBSD r269783

commit d1cc54eee8
    Safety belt to ensure vt(4) fb parameters are correct

commit 76e6d468ef
    Improve terasic_mtl_vt fdt parsing

    - Use OF_getencprop to avoid need for explicit endian handling
      (submitted by ray@freebsd.org)
    - Check for expected length and correct pointer type

commit 3e2524b899
    Correct device_printf usage

commit 9e53e3c8e0
    Switch framebuffer to match host endianness

    Xorg and xf86-video-scfb work much better with a native-endian
    framebuffer.

commit 0f49259d59
    Switch DE4 to vt(4) and enable kbdmux

commit 5bc96ebc89
    Add missing \n in device_printf calls

Submitted by:	emaste
Sponsored by:	DARPA, AFRL
2014-11-21 21:34:19 +00:00
Brooks Davis
7db6c5cde6 Merge from CheriBSD (3422ebe71b):
Rename beripic to beripic0.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
2014-11-21 20:54:12 +00:00
Ruslan Bukin
2d3f1b38a9 Provide a character device allowing us to access BERI memory regions.
Sponsored by:	DARPA, AFRL
2014-10-22 11:30:03 +00:00
Ruslan Bukin
8b62915e24 Add driver for Micrel KSZ9021 Gigabit Ethernet Transceiver (PHY).
Sponsored by:	DARPA, AFRL
2014-10-21 09:14:16 +00:00
Ruslan Bukin
b0da449e60 Add driver for BERI soft processor 'ring buffer' device.
Ring device provides a way for communicate to BERI
peripherals such as BERI debug unit and console.

Sponsored by:	DARPA, AFRL
2014-10-19 16:26:49 +00:00
Rui Paulo
5aed7446fe AM335X FDT: use the oma3-wdt string for compatibility with Linux.
Submitted by:	andrew
MFC after:	1 week
2014-10-18 16:34:52 +00:00
Rui Paulo
b406729896 AM335x FDT: add an entry for the watchdog.
MFC after:	1 week
2014-10-18 07:40:38 +00:00
Ruslan Bukin
d4d630aebe o Add machine-dependent SMP part
o Enable SMP

Sponsored by:	DARPA, AFRL
2014-10-10 14:35:51 +00:00
Ruslan Bukin
41709d23c4 Add driver for Synopsys DesignWare Mobile Storage Host Controller.
Sponsored by:	DARPA, AFRL
2014-10-07 17:39:30 +00:00
Ruslan Bukin
5d43fd685b Add driver for Synopsys DesignWare 3504-0 Universal 10/100/1000
Ethernet MAC.

Sponsored by:	DARPA, AFRL
2014-09-25 18:03:14 +00:00
Ruslan Bukin
6ca0b78179 Add Reset Manager driver. This driver provides generic way to reset
and provides sysctl tunables for enable/disable FPGA<->HPS bridges.

Sponsored by:	DARPA, AFRL
2014-09-11 18:12:28 +00:00
Ruslan Bukin
34a0189341 Add FPGA Manager driver. This driver allows to program FPGA core
from FreeBSD userspace running on ARM core.

Sponsored by:	DARPA, AFRL
2014-09-06 08:48:57 +00:00
Ian Lepore
9cbece6f0d Stop setting the iomux device status to disabled, now that we have a driver. 2014-09-04 19:52:17 +00:00
Ruslan Bukin
9493c332a3 Add initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family.
Include board configuration for Terasic SoCKit (Altera Cyclone V).

Sponsored by:	DARPA, AFRL
2014-09-04 12:44:40 +00:00
Warner Losh
696a6f55d1 The proper compatibility string for the AHCI device is
allwinner,sun4i-ahci, so use that instead of the older string which
had become FreeBSD specific.
2014-09-02 16:38:00 +00:00
Warner Losh
d8f5c1e164 New DTS files to suppport the SAM9260EK eval board. Derived, in part,
from the SAM9G20EK dts files (so that file is GPL'd).
2014-08-19 03:51:05 +00:00
Ruslan Bukin
d440ef2d73 Rename files: keep codename only to make it shorter. 2014-08-01 15:10:55 +00:00
Ruslan Bukin
835b36e211 Add support for Chromebook2 -- next-generation 8-core
(4 in operation), 4GB ram (3.5 usable) ARM machine.

Support covers device drivers for:
- Serial Peripheral Interface (SPI)
- Chrome Embedded Controller (EC) - SPI-based version
- XHCI and USB 3.0 dual-role device PHY

Also:
- Add support for Exynos5420 in Pad module
- Move power-related functions to separate driver --
  Power Management Unit (PMU)
- Enable XHCI for Chromebook1

Special thanks to grehan@ for hardware, and to
hselasky@ for r269139.
2014-08-01 06:20:25 +00:00