History log of /freebsd-10.3-release/sys/arm/ti/ti_gpio.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 278786 14-Feb-2015 loos

MFC r274670, r274671, r276168:

Moves all the duplicate code to a single function.

Verify for invalid modes and unwanted flags before pass the new flags to
driver.

Make gpio_default_map_gpios() static. No functional changes.

Improves the GPIO API description a little bit.

gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.


# 278782 14-Feb-2015 loos

MFC r273799:

Make the GPIO children attach to the first unit available and not only to
unit 0.

This fix a bug where a GPIO controller could fail to attach its children
(gpioc and gpiobus) if another GPIO driver attach first.


# 266152 15-May-2014 ian

MFC r261410

Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.


# 266148 15-May-2014 loos

MFC r259125, r264019, r264083, r264153, r264197

r259125:
Fix a few typos on the scm (control module) pin mux definitions.

r264019:
Fix some of the style(9) problems on ti_gpio.

Remove redundant code and declarations.

r264083:
Move the GPIO bank initialization to a new function to make easier to detect
errors.

Reset the GPIO module during the initialization. This is guaranteed to be
the same as a hardware reset. Tested on AM335x (BBB) and checked against
the omap3 and omap4 TRM.

Do a better job freeing resources when there are errors and on
ti_gpio_detach().

r264153:
- Fix the setup of interrupts for banks 2 and 3 on AM335x.

On AM335x each one of the four GPIO banks has two physical interrupt
lines, so we now allocate resources and setup our interrupt handler for
all the (8) available interrupts.

On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6
banks, 6 interrupts), but there are two set of registers where the
first one is used to setup the delivery of interrupts to the MPU and
the second set, setup the delivery of interrupts to the DSP.

On AM335x, each set of registers controls each one of the interrupt
lines.

- Remove nonexistent registers for OMAP4 and AM335x, replace their use with
the correct ones for these SoCs.

- Remove stray whitespace.

r264197:
Partially revert r264083.

While it is the recommended initialization procedure, it hangs on the reset
of the second GPIO module on pandaboard.

Removes the module reset for now as more investigation is needed.


# 266105 15-May-2014 loos

MFC r258046, r258047, r258050, r259035, r259036, r259037, r261842, r261843,
r261844, r261845, r261846, r262194, r262522, r262559

r258046:
Fix a typo on a comment in ofw_bus_if.m, the default method will return -1
when a node doesn't exist.

r258047:
Move the KASSERT() check to the point before the increase of number of pins.

r258050:
Fix gpiobus to return BUS_PROBE_GENERIC insted of BUS_PROBE_SPECIFIC (0) so
it can be overriden by its OFW/FDT version.

Give a chance for GPIO devices that implement the device_identify method to
attach.

r259035:
Remove unnecessary includes and an unused softc variable. While here apply
two minor style(9) fixes.

r259036:
Move the GPIOBUS_SET_PINFLAGS(..., ..., pin, GPIO_PIN_OUTPUT) to led(4)
control callback function. This makes gpioled(4) works even if the pin
is accidentally set to an input.

r259037:
Fix the pin value reading on AM335x. Because of the inverted logic it was
always returning '0' for all the reads, even for the outputs. It is now
known to work with gpioiic(4) and gpioled(4).

r261842:
Add an OFW GPIO compatible bus. This allows the use of the DTS files to
describe GPIO bindings in the system.

Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between
the OFW and the non OFW versions of GPIO bus.

Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.

r261843:
Add OFW support to the in tree gpio compatible devices: gpioiic(4) and
gpioled(4).

Tested on RPi and BBB (using the hardware I2C controller and gpioiic(4) for
the I2C tests). It was also verified for regressions on RSPRO (MIPS/ar71xx)
used as reference for a non OFW-based system.

Update the gpioled(4) and gpioiic(4) man pages with some details and
examples about the FDT/OFW support.

Some compatibility details pointed out by imp@ will follow in subsequent
commits.

r261844:
Allow the use of OFW I2C bus together with iicbb(4) on OFW-based systems.

This change makes ofw_iicbus attach to iicbb(4) controllers in addition to
the already supported i2c host bridges (iichb).

On iicbb(4) allow the direct access of the OFW parent node by its children,
so they can be directly attached to iicbb(4) node on the DTS without the
need of describing the i2c bus.

r261845:
Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this
change the gpio children can be described as directly connected to the GPIO
controller without the need of describing the OFW GPIO bus itself on the
DTS file.

With this commit the OFW GPIO bus is fully functional on BBB and RPi.

GPIO controllers which want to use the OFW GPIO bus will need similar
changes.

r261846:
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.

r262194:
Remove an unnecessary header.

r262522:
Fix make depend for iicbus.

r262559:
Inspired by r262522, fix make depend. This fixes the build of gpio modules.


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 247391 27-Feb-2013 gonzo

Fix typo


# 247390 27-Feb-2013 gonzo

- Initialize GPIO_OE register based on pinmux configuration

Although AM335x TRM states that GPIO_OE register is not used and just
reflects pads configuration in practice it does control pin behavior
and shoiuld be set in addition to pinmux setup


# 247259 25-Feb-2013 gonzo

Fix off-by-one error in sanity checks


# 247252 25-Feb-2013 gonzo

- Fix off-by-one error when returning max pin number
- Fix GPIOGET for output pins. Requesting state for
output pin is valid operation, get the state from
TI_GPIO_DATAOUTX register


# 239281 15-Aug-2012 gonzo

Merging of projects/armv6, part 10

- Support for Texas Instruments SoCs:
- AM335x
- OMAP4

- Kernel configs, DTS for Beaglebone and Pandaboard

Submitted by: Ben Gray, Damjan Marion