Skip to content

Commit

Permalink
Switch TI platform support code from using FreeBSD's custom-baked DTS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gonzoua committed May 22, 2015
1 parent 721376a commit ef6ca43
Show file tree
Hide file tree
Showing 55 changed files with 3,985 additions and 3,852 deletions.
13 changes: 13 additions & 0 deletions UPDATING
Expand Up @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)

20150521:
TI platform code switched to using vendor DTS files and this update
may break existing systems running on Beaglebone, Beaglebone Black,
and Pandaboard:

- dtb files should be regenerated/reinstalled. Filenames are the
same but content is different now
- GPIO addressing was changed, now each GPIO bank (32 pins per bank)
has its own /dev/gpiocX device, e.g. pin 121 on /dev/gpioc0 in old
addressing scheme is now pin 25 on /dev/gpioc3.
- Pandaboard: /etc/ttys should be updated, serial console device is
now /dev/ttyu2, not /dev/ttyu0

20150501:
soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soelim.
If you need the GNU extension from groff soelim(1), install groff
Expand Down
3 changes: 3 additions & 0 deletions sys/arm/conf/BEAGLEBONE
Expand Up @@ -133,5 +133,8 @@ device axe # ASIX Electronics USB Ethernet
device usb_template # Control of the gadget
device usfs

# Pinmux
device fdt_pinctrl

# Flattened Device Tree
options FDT # Configure using FDT/DTB data
2 changes: 2 additions & 0 deletions sys/arm/conf/PANDABOARD
Expand Up @@ -57,6 +57,7 @@ options DDB # Enable the kernel debugger
#options BOOTP_NFSV3
#options BOOTP_WIRED_TO=ue0

device fdt_pinctrl
# Interrupt controller
device gic

Expand All @@ -81,6 +82,7 @@ device pl310 # PL310 L2 cache controller

# GPIO
device gpio
device gpioled

# The following enables MFS as root, this seems similar to an initramfs or initrd
# as used in Linux.
Expand Down
11 changes: 8 additions & 3 deletions sys/arm/ti/aintc.c
Expand Up @@ -69,14 +69,19 @@ static struct resource_spec ti_aintc_spec[] = {
{ -1, 0 }
};


static struct ti_aintc_softc *ti_aintc_sc = NULL;

#define aintc_read_4(_sc, reg) \
bus_space_read_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg))
#define aintc_write_4(_sc, reg, val) \
bus_space_write_4((_sc)->aintc_bst, (_sc)->aintc_bsh, (reg), (val))

/* List of compatible strings for FDT tree */
static struct ofw_compat_data compat_data[] = {
{"ti,am33xx-intc", 1},
{"ti,omap2-intc", 1},
{NULL, 0},
};

static void
aintc_post_filter(void *arg)
Expand All @@ -92,9 +97,9 @@ ti_aintc_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);


if (!ofw_bus_is_compatible(dev, "ti,aintc"))
if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
return (ENXIO);

device_set_desc(dev, "TI AINTC Interrupt Controller");
return (BUS_PROBE_DEFAULT);
}
Expand Down

0 comments on commit ef6ca43

Please sign in to comment.