aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/freescale
Commit message (Collapse)AuthorAgeFilesLines
* Add support for audio transmitting, include drivers for:Ruslan Bukin2015-01-2411-1/+1896
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=277644
* Add pinctrl driver support for the encoded input register config wordsIan Lepore2015-01-231-3/+28
| | | | | | | | that the linux guys made up on the fly (but didn't document) last August. This type of encoded config now appears in the imx6 fdt data. Notes: svn path=/head/; revision=277568
* Enable all the mmc/sd controllers, because there's no telling which onesIan Lepore2015-01-231-1/+1
| | | | | | | | | any given board will be using. Yes, changing source is an unusually primitive power control implementation. Notes: svn path=/head/; revision=277555
* Rename bus_space-v6.c to bus_space_base.c, because it's not v6-specificIan Lepore2015-01-214-4/+4
| | | | | | | | and now some v5 Marvell systems are using it. Only define fdt_bus_tag if option FDT is defined. Notes: svn path=/head/; revision=277472
* Rename gic_init_secondary to arm_init_secondary_ic to help with the mergeAndrew Turner2015-01-111-1/+1
| | | | | | | of the arm_intrng project branch. Notes: svn path=/head/; revision=276984
* Add 64-bit DMA support in the XHCI controller driver.Hans Petter Selasky2015-01-051-0/+1
| | | | | | | | | | - Fix some comments and whitespace while at it. MFC after: 1 month Submitted by: marius@ Notes: svn path=/head/; revision=276717
* Remove -Wa,-march=armv7a from arm kernel configs, it makes clang 3.5 sadIan Lepore2015-01-014-4/+4
| | | | | | | and apparently isn't needed now that we're using the integrated assembler. Notes: svn path=/head/; revision=276520
* Switch i.MX to use the platform code to help with a single Freescale kernel.Andrew Turner2014-12-243-50/+62
| | | | | | | | Differential Revision: https://reviews.freebsd.org/D1349 Reviewed by: ian, rpaulo Notes: svn path=/head/; revision=276177
* Add -march=armv7a to the kernel compile for all ARM systems which are v7a.Ian Lepore2014-12-214-0/+4
| | | | | | | Submitted by: Michal Meloun <meloun@miracle.cz> Notes: svn path=/head/; revision=276047
* Moves all the duplicate code to a single function.Luiz Otavio O Souza2014-11-182-19/+0
| | | | | | | | Verify for invalid modes and unwanted flags before pass the new flags to driver. Notes: svn path=/head/; revision=274670
* opt_global.h is included automatically in the build. No need toWarner Losh2014-11-181-2/+0
| | | | | | | | | explicitly include it in these places. Sponsored by: Netflix Notes: svn path=/head/; revision=274668
* Allow i2c bus speed to be configured via hints, FDT data, and sysctl.Ian Lepore2014-11-181-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current support for controlling i2c bus speed is an inconsistant mess. There are 4 symbolic speed values defined, UNKNOWN, SLOW, FAST, FASTEST. It seems to be universally assumed that SLOW means the standard 100KHz rate from the original spec. Nothing ever calls iicbus_reset() with a speed of FAST, although some drivers would treat it as the 400KHz standard speed. Mostly iicbus_reset() is called with the speed set to UNKNOWN or FASTEST, and there's really no telling what any individual driver will do with those. The speed of an i2c bus is limited by the speed of the slowest device on the bus. This means that generally the bus speed needs to be configured based on the board/system and the components within it. Historically for i2c we've configured with device hints. Newer systems use FDT data and it documents a clock-frequency property for i2c busses. Hobbyists and developers are likely to want on the fly changes. These changes provide all 3 methods, but do not require any existing drivers to change to use the new facilities. This adds an iicbus method, iicbus_get_frequency(dev, speed) that gets the frequency for the requested symbolic speed. If the symbolic speed is SLOW or if there is no speed configured for the bus, the returned value is 100KHz, always. Otherwise, if bus speed is configured by hints, fdt, tunable, or sysctl, that speed is returned. It also adds a helper function, iicbus_init_frequency() that any bus driver subclassed from iicbus can initialize the frequency from some other source of info. Initial driver implementations are provided for Freescale and TI. Differential Revision: https://reviews.freebsd.org/D1174 PR: 195009 Notes: svn path=/head/; revision=274641
* Fix the reversed sense of the PADCONF_NONE test.Ian Lepore2014-11-121-1/+1
| | | | Notes: svn path=/head/; revision=274414
* Bugfixes for the imx5/imx6 iomux fdt_pinctrl driver.Ian Lepore2014-11-121-3/+21
| | | | | | | | | | | | | | | | I originally overlooked a couple flag bits defined in the fdt binding docs. One flag suppresses the pad configuration (pullup/pulldown/etc). The other one requires that the SION (set input on) flag be set in the mux register. Also, it appears from the data involved that if the input register address in the config tuple is zero, there is no input configuration. The old code was writing to register zero, which contains a collection of misc control bits (having nothing to do with input configuration) that probably shouldn't get overwritten arbitrarily. The bindings doc doesn't explictly mention this. Notes: svn path=/head/; revision=274412
* Make the GPIO children attach to the first unit available and not only toLuiz Otavio O Souza2014-10-282-4/+4
| | | | | | | | | | | | unit 0. It seems that this 'simplification' was copied to all GPIO drivers in tree. This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first. Notes: svn path=/head/; revision=273799
* Install a temporary workaround to avoid problems in fdt data with linux'sIan Lepore2014-10-231-1/+35
| | | | | | | | | | | | | workaround for an imx6 chip erratum. Linux works around the bug with changes in fdt data that we can't currently handle, so to enable running with standard vendor-supplied fdt data, this watches for an attempt to map the gpio1_6 interrupt and remaps it back to the standard ethernet interrupt. This can be undone when the intrng project is completed and our gpio drivers can also be interrupt controllers. Notes: svn path=/head/; revision=273561
* Unconditionally enable the clocks for all imx6 devices that we have driversIan Lepore2014-10-231-0/+24
| | | | | | | | | | | for, or that are required to run the chip (such as busses). Turn off all the devices we don't yet have drivers for. Some day we will have a fully functional imx6 clock driver so that we can manage clocks based on fdt data. This will have to do until then. Notes: svn path=/head/; revision=273514
* Attach the imx6 CCM driver during BUS_PASS_CPU. It controls the clocksIan Lepore2014-10-201-1/+2
| | | | | | | | for most on-chip devices and needs to be available before other drivers start attaching and asking to have their clocks enabled. Notes: svn path=/head/; revision=273353
* The imx6 hardware is fast enough to make good use of however muchIan Lepore2014-10-201-1/+1
| | | | | | | | | timecounter resolution is available, so ask for a 1 GHz frequency. It won't actually get one that fast, but that'll get the fastest available clock and use a divisor of 1 (probably 132 or 66mhz on current hardware). Notes: svn path=/head/; revision=273352
* Attach this driver during BUS_PASS_BUS and move the cpu init code to aIan Lepore2014-10-191-7/+38
| | | | | | | | | | | | | bus_new_pass() handler so it doesn't happen until BUS_PASS_CPU. This allows the anatop driver to outbid the generic simplebus driver (which the FDT data describes as compatible). Some day when we handle power regulators, this driver may actually become a functional simplebus and attach the regulators as children, as described in the FDT data. Notes: svn path=/head/; revision=273283
* Use gic_decode_fdt() rather than a local routine to parse fdt interruptIan Lepore2014-09-142-1/+13
| | | | | | | | properties. Move fdt_pic_table and fdt_fixup_table into imx6_machdep.c, which means imx6 doesn't need imx_common.c anymore. Notes: svn path=/head/; revision=271607
* Add a comment giving an overview of the driver. Remove leftover debugging.Ian Lepore2014-09-141-7/+23
| | | | Notes: svn path=/head/; revision=271591
* Replace the imx5 and imx6 iomux drivers with a single common driver thatIan Lepore2014-09-1311-2036/+275
| | | | | | | uses the new fdt_pinctrl interface. Notes: svn path=/head/; revision=271550
* Fixthe spelling of ehciAndrew Turner2014-09-061-1/+1
| | | | Notes: svn path=/head/; revision=271198
* Implement the imx_iomux_get/set_gpr() interface for imx6.Ian Lepore2014-09-041-0/+36
| | | | Notes: svn path=/head/; revision=271102
* Implement the same public interface in imx51 and imx6 iomux; use the commonIan Lepore2014-09-045-83/+13
| | | | | | | | header file for both. Remove some unused code from imx51_iomux. The iomux drivers are required, not optional, adjust the files.* entries accordingly. Notes: svn path=/head/; revision=271100
* Add a basic iomux driver for imx6.Ian Lepore2014-09-044-1/+996
| | | | | | | Submitted by: bsam@ Notes: svn path=/head/; revision=271097
* Fix typo in variable name.Ian Lepore2014-09-041-3/+3
| | | | Notes: svn path=/head/; revision=271094
* The imx5x and imx6 chips have an onboard IOMUX device which also contains aIan Lepore2014-09-042-0/+78
| | | | | | | | | | few "general purpose registers" whose values control chip behavior in ways that have nothing to do with IO pin mux control. Define a simple API that other soc-specific code can use to read and write the registers, and provide the imx51 implementation of them. Notes: svn path=/head/; revision=271084
* Add a function to get the frequency of the AHB bus. Another stopgapIan Lepore2014-09-033-0/+14
| | | | | | | function until we have full clock support for imx6. Notes: svn path=/head/; revision=271055
* The anatop driver controls power and PLLs and needs to be available beforeIan Lepore2014-09-021-5/+19
| | | | | | | | just about anything else (other than octop which provides it config info), so make it an EARLY_DRIVER_MODULE(). Notes: svn path=/head/; revision=270956
* The ocotp driver provides access to registers containing chip configurationIan Lepore2014-09-021-1/+2
| | | | | | | | data that is needed by other drivers, so make it an EARLY_DRIVER_MODULE() that loads before just about anything else. Notes: svn path=/head/; revision=270955
* sdhci.h has grown a dependency on sysctl.h, include the latter where needed.Ian Lepore2014-09-011-0/+1
| | | | Notes: svn path=/head/; revision=270948
* Rename OF_xref_phandle() to OF_node_from_xref() and add a new functionIan Lepore2014-09-011-1/+1
| | | | | | | | | that provides the inverse translation, OF_xref_from_node(). Discussed with: nwhitehorn Notes: svn path=/head/; revision=270945
* Move the imx6 sysctl temperature info to hw.imx6 where all the otherIan Lepore2014-08-161-4/+2
| | | | | | | | | | soc-wide info lives. It was under dev.imx6_anatop.0. What does anatop mean anyway? Nobody seems to know, so it's probably not where somebody will think to look for imx6 hardware info. Notes: svn path=/head/; revision=270065
* Fix two files forgotten in r269783 (vt_generate_cons_palette)Jean-Sébastien Pédron2014-08-101-5/+5
| | | | | | | | | Reported by: bz MFC after: 1 week MFC with: 269783 Notes: svn path=/head/; revision=269791
* Add a missing clock register definition.Ian Lepore2014-08-081-0/+1
| | | | Notes: svn path=/head/; revision=269698
* Cache the imx6 SoC type in a static var so that it only has to be figuredIan Lepore2014-08-051-5/+14
| | | | | | | out by sniffing hardware registers once. Notes: svn path=/head/; revision=269607
* Enable Freescale i.MX I2C driver for i.MX6.Ruslan Bukin2014-07-222-3/+9
| | | | Notes: svn path=/head/; revision=268977
* Rename i.MX I2C driver file.Ruslan Bukin2014-07-225-4/+4
| | | | Notes: svn path=/head/; revision=268973
* Rename gpio driver file.Ruslan Bukin2014-07-184-3/+3
| | | | Notes: svn path=/head/; revision=268835
* o Enable GPIO device driver for i.MX6.Ruslan Bukin2014-07-182-5/+10
| | | | | | | | | | | It was originally written for i.MX5 and compatible with newer chip. o Extend device tree information o style(9) fixes Discussed with: ian Notes: svn path=/head/; revision=268834
* Pending interrupt status is cleared by writing to the ISR, not the data reg.Ian Lepore2014-07-101-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=268495
* Use named constant rather than '0' to access the reset controller register.Ian Lepore2014-07-081-1/+1
| | | | Notes: svn path=/head/; revision=268401
* Pull in r267961 and r267973 again. Fix for issues reported will follow.Hans Petter Selasky2014-06-281-7/+4
| | | | Notes: svn path=/head/; revision=267992
* Revert r267961, r267973:Glen Barber2014-06-271-4/+7
| | | | | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory Notes: svn path=/head/; revision=267985
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifHans Petter Selasky2014-06-271-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=267961
* Add very basic driver for 12-bit Analog to Digital Converter (ADC).Ruslan Bukin2014-06-153-0/+276
| | | | Notes: svn path=/head/; revision=267507
* Add a driver for Serial Peripheral Interface (SPI).Ruslan Bukin2014-06-112-0/+294
| | | | Notes: svn path=/head/; revision=267354
* Remove extra semicolons.Kevin Lo2014-06-061-1/+1
| | | | Notes: svn path=/head/; revision=267171