summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-09ARM: dts: vfxxx: Add device tree node for OCOTPSanchayan Maity
Add device tree node for the OCOTP peripheral on Vybrid. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-09mfd: syscon: Introduce syscon_regmap_read_from_offsetSanchayan Maity
Currently syscon does not provide an abstraction to access a register from syscon reference like below ocotp-cfg1 = <&ocotp 0x20> syscon_regmap_read_from_offset provides a generic abstraction to access a register from syscon reference as above. It allows to specify the node and node name of phandle reference, reading the offset from the node entry and providing the value from the offset in the register map. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
2016-03-03fbcon: logo: allow easy integration of a custom Linux boot logoMarcel Ziswiler
This patch allows for easy integration of a custom Linux boot logo to replace the Tux' being shown by default. Use gimp or the like to create a raw PPM in your desired resolution. Reduce the number of colours in the image to 224: user@host:~$ ppmquant 224 Toradex-640x480.ppm > \ Toradex-640x480-224.ppm ppmquant: making histogram... ppmquant: 370 colors found ppmquant: choosing 224 colors... ppmquant: mapping image to new colors... Convert it from raw PPM to ASCII format: user@host:~$ pnmnoraw Toradex-640x480-224.ppm > \ Toradex-640x480-ascii-224.ppm Copy it into the Linux sources: cp Toradex-640x480-ascii-224.ppm linux-toradex/drivers/video/logo/\ logo_custom_clut224.ppm Activate exclusively custom Linux logo in the kernel configuration: Device Drivers -> Graphics support -> Bootup logo -> Custom 224-color Linux logo And re-compile the kernel. (cherry picked from commit fa2371bff9ac03581881849d8f95678ef3992719) Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-03ARM: dts: vf610: Add device trees for dual Ethernet boardBhuvanchandra DV
Add a device trees for the dual Ethernet Colibri Carrier Board. The Carrier Board has a second Ethernet PHY on board and connects it to the second Ethernet Controller of Vybrid. Therefor the Carrier Board is only usable with Vybrid based modules (Colibri VF50/VF61). Furthermore, the Carrier Board has two additional UARTs beside the three default Colibri UARTs. The schemata of the Ethernet part of a dual Ethernet Carrier Board for Vybrid can be found online at: http://docs.toradex.com/102058-colibri-vfxx-2nd-ethernet-rmii Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-03Merge branch 'fusion_f0710a-4.4' into toradex_vf_4.4-nextStefan Agner
2016-03-03colibri-vf: Enable Fusion Touch driverBhuvanchandra DV
Enable TouchRevolution multitouch controller driver Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2016-03-03ARM: dts: vf610-colibri: add TouchRevolution multitouch controllerStefan Agner
Add TouchRevolution multitouch controller driver which is connectable over I2C bus. The driver is tested with 7" and 10" multitouch panels by TouchRev. PWM_B, PWM_C pins are used as pen down and reset interrupt, to avoid pin conflicts the PWM functionality on these pins has to be disabled and the relevant GPIO functionality should be enabled and assigned to the touch driver. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2016-03-03touchscreen: fusion_F0710A: Reset controller if clear interrupt operation failsSanchayan Maity
Add support for resetting the controller using the gpio reset pin if interrupt could not be cleared. If clearing the interrupt fails, the interrupt line stays high and no further interrupts are generated resulting in a non functioning touchscreen until next reboot, when we reset the controller again in probe. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2016-03-02input: touchscreen: fusion: implement multitouch with slot handlingStefan Agner
According to multi-touch-protocol.txt the kernel knows two type of devices: - Type A: devices which provide anonymous contacts - Type B: devices which are capable of tracking individual contacts The Fusion touch screen is a Type B device: The Touch ID field allows to differentiate between 2 different fingers. This updates the driver to properly allocate a slot for each identified contact and use the helper functions available from the input core system. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2016-03-02input: touchscreen: fusion: use level triggered interruptStefan Agner
Use level triggered interrupt which makes sure that even we miss a rising edge (due to latencies in the kernel), the interrupt still will be handled later, and doesn't freeze the input device. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-02input: touchscreen: fusion: add device tree integrationMax Krummenacher
Add device tree integration and add the device to the dtb. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> [Add devicetree binding documentation] Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2016-03-02input: touchscreen: fusion: platform independent GPIO descriptionStefan Agner
Use platform independent description for requested GPIOs. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-02input: touchscreen: fusion: fix error handlingStefan Agner
Fix chip reset by sleeping long enought after reset. Do proper error handling (free GPIO on failure). Use dev_* for message logging to get similar messages for all fusion driver related errors and warnings. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-02input: touchscreen: fusion: use new I2C PM functionsStefan Agner
To avoid warnings use the new I2C power management function for suspend and resume. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> [Use __maybe_unsed instead of ifdefs] Signed-off-by: Bhuvanchandr DV <bhuvanchandra.dv@toradex.com>
2016-03-02input: touchscreen: added platform data for Fusion touchscreenStefan Agner
Added platform data struct to define interrupt and reset GPIO. This allows to initialize the touchscreen controller inside the driver rather than in each platform and use the driver as a module. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-02input: touchscreen: fix race condition in Fusion driverStefan Agner
When the next interrupt request apeares between the confirmation of the previous (a write via I2C, fusion_F0710A_write_complete) and the reenable of the GPIO interrupt, the driver hangs and no more touch inputs are reported. This patch moves the confirmation after the reenabling of the GPIO interrupt. Stefan Agner <stefan.agner@toradex.com>
2016-03-02input: touchscreen: add ABS_X/ABS_Y axis for Fusion touchscreenStefan Agner
Recent evdev X-Server input driver implementation complain when only multitouch axes have been reported ("found only multitouch-axes. That shouldn't happen."). Therefor also report the primary touch detection with default axis. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-03-02input: touchscreen: add Fusion 7 and 10 multi-touch driverMax Krummenacher
This patch adds the multi-touch input driver for the TouchRevolution Fusion 7 and 10 panels (See Fusion 7 and 10 drivers for Linux.pdf and Linux Drivers Fusion 10.zip) as downloaded in 07.2014 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
2016-02-25Merge branch 'vf610-ac97-sai-v4.4' into toradex_vf_4.4-nextStefan Agner
2016-02-25ASoC: wm9712: remove unused DAPM widgetsStefan Agner
Remove DAPM widgets which are not used. It seems they have never been used, so won't be missed by anybody. This fixes two kernel log errors: wm9712-codec wm9712-codec: ASoC: mux Differential Source has no paths wm9712-codec wm9712-codec: ASoC: mux Capture Phone Mux has no paths Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ARM: dts: vf610: do not control reset line on warm resetStefan Agner
When entering and resuming from suspend-to-RAM (LPSTOP2), the current pinmux and the automatic restore of the last GPIO state lead to an "uncontrolled" hard reset. The wm9712 driver tries to warm reset the codec, which succeeds due to the previous hard reset. Since the warm reset succeeded, the wm9712 driver will not restore the codecs registers, hence those will accidentially stay in reset state. To avoid this extra hard reset we need to leave the pad floating during suspend (the external pull-down will make sure that the line has a defined state). After suspend snd_soc_ac97_warm_reset will request the pinctrl states "ac97-warm-reset" and "ac97-running", we need to make sure that both states do not change the state of the reset line since it would introduce a similar "uncontrolled" hard reset. Therefor, remove pinctrl configurations for those states. With this change, we disable the output driver of the reset signal when entering suspend mode ("sleep" pinctrl state). Current Colibri VF61 1.2A module have an external pull-down, hence the reset signal will be low during suspend. With this change, the reset signal will stay low during resume even when the GPIO state gets restored (since the output driver is still disabled). This will keep the codec in reset, and the wm9712 drivers warm reset will fail. The driver will fall back to an explicit cold reset and due to the cold reset restore the registers properly. Future Colibri VF61 modules could use an external pull-up. This would mean that the warm reset on resume will succeed, and the driver would not need to restore the registers. Note: pinctrl with the AC97 pin states is rather delicate. It seems that when playing audio, the stack always selects the "default" state. Before, the "running" state has been used as "default" state. However, the "running" state is harmful during boot for initial cold reset (maybe test mode?). Therefor we use a minimalistic "default" pinmux. Only when the stack explicitily requests "running", we actually mux the real functions on the affected pins. Note 2: If there is a pull-up, we relly on the pull-up after suspend and resume since the cold reset function does not explicitly set the GPIO again... Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: mark DAI always as activeStefan Agner
The function snd_soc_register_card in soc-core.c selects the sleep pinctrl state if a DAI is not marked as active. Since an AC97 controller needs the link also for bus control, we should not use the sleep pinctrl state during normal operation. Work around this by increment the active field on probe. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: add timeout for AC97 register read/writesStefan Agner
If the DMA has been activated but has not yet been started (e.g. due to missing bit clock), a read or write would loop forever. Avoid this by using a timeout counter. The AC97 core does opportunistic reads in some cases (e.g. when trying to determine if a cold reset is necessary, by just reading the ID register after the warm reset). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: do not rely on RX/TX DMA running in syncStefan Agner
Do not rely on RX/TX DMA running synchrounous. This allows to wait until the answer frame has been received or timeout after 10 frames. In the write case, we wait until the write request has been transmitted to the TX FIFO. This changes should make AC97 read/write more robust. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: mark FIFO register as preciousStefan Agner
Mark the RX FIFO register as precious to avoid AC97 to get asynachrounous (e.g. when reading regmap sysfs debug files). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_clk: add suspend/resume supportStefan Agner
Implement suspend and resume function which disable/enable generated master clock explicitly and handle the audio clock too. Use regmap cache to restore the register content on resume from lowest power modes. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: restore register contents for LPSTOP modesStefan Agner
Lowest power modes loose the content of the registers. Use regmap cache to restore the register entries on resume from lowest power modes. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: allow capture and playback simultanouslyStefan Agner
Allow playback and capture simultanously by handling two independent instances of imx_pcm_runtime_data. Move the atomic triggers outside of imx_pcm_runtime_data. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: add audio capture supportStefan Agner
This adds initial audio capture support. A capturing sampling rate between 8 to 48kHz is supported. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_wm9712: add machine driver for WM9712 codecStefan Agner
Add machine driver for Wolfson WM9712 AC97 codec connected to Freescale SAI SoC audio transceiver. This combination needs software emulated AC97 which is done by the fsl_sai_ac97 driver. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: add suspend/resume supportStefan Agner
Add suspend/resume support for SAI AC97. Currently, both DMA directions (RX/TX) will be disabled on suspend and completely reinitialized on resume. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-25ASoC: fsl_sai_ac97: preliminary AC97 SAI driverStefan Agner
Initial support for AC97 using SAI peripheral. The SAI peripheral does not support AC97 completely: Only the frame synchronization and different slot length is taken care of, but all AC97 slots are concatenated in one stream in a single FIFO. Hence the AC97 control slots need to be handled completely in software. To do this in a efficient manor the driver uses a ring buffer and prepares a whole buffer at a time. Due to the nature how variable sample rates are handled in AC97, this software AC97 only supports AC97 native sample rate which is 48000Hz. However, the device announces this circumstances and the upper stack should handle that correctly. Measurements showed a overhead of about 3% CPU when playing a file with 44.1kHz sample rate. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-24ASoC: fsl_sai_clk: clock driver for SAIStefan Agner
This adds a clock driver to use the bitclock (TX_BCLK) as a master clock. [4.4: added clk_prepare_enable call for mclk1] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-24ARM: dts: vf610: add SAI0/SAI2 and AC97 soundStefan Agner
Activate SAI0/SAI2 according to our needs and create a sound node which enables the Wolfson WM9712 compatible AC97 codec. [4.4: squashed capture audio routing fix] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-24ARM: dts: vf610: add remaining SAI instacesStefan Agner
This adds the remaining SAI instances SAI0, SAI1 and SAI3. All instances are very similar, except that the DMA channel of SAI3 is available on MUX1 (compared to MUX0 for SAI0-SAI2). Also, SAI3 has a slightly different memory map due to a deeper FIFO, however in practice the current driver works for SAI3 fine. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Shawn Guo <shawnguo@kernel.org> (cherry picked from commit 4b336f1be2adc6dd2a1ad7d6fa7d4e16b2cd74e1)
2016-02-23Merge branch 'vf610-lpuart-4.4-fixes' into toradex_vf_4.4-nextStefan Agner
2016-02-23tty: serial: fsl_lpuart: implement module parameter to disable DMAStefan Agner
The DMA implementation has been and is still affected by bugs and race conditions. To bridge the time until those have been addressed, add fsl-lpuart.nodma module parameter which allows to disable the UART DMA using a kernel argument. Let the DMA to be disabled by default. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-23tty: serial: fsl_lpuart: fix clearing of receive flagStefan Agner
Commit 8e4934c6d6c6 ("tty: serial: fsl_lpuart: clear receive flag on FIFO flush") implemented clearing of the receive flag by reading the status register only. It turned out that even though we flush the FIFO afterwards, a explicit read of the data register is still required. This leads to a FIFO underrun. To avoid this, follow the advice in the overrun "Operation section": Unconditionally clear RXUF after using RXFLUSH. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-23tty: serial: fsl_lpuart: consider TX FIFO too in tx_emptyStefan Agner
Currently the tx_empty callback only considers the Transmit Complete Flag (TC). The reference manual is not quite clear if the TC flag covers the TX FIFO too. Debug prints on real hardware have shown that from time to time the TC flag is asserted (indicating Transmitter idle) while there are still data in the TX FIFO. Hence, in this case the serial core will call the shutdown callback even though there are data remaining in the TX FIFO buffers. Avoid early shutdowns by considering the TX FIFO empty flag too. Also avoid theoretical race conditions between DMA and the driver by checking whether the TX DMA is in progress too. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-18ARM: dts: colibri-vf: Add pinmux for UART_0 aka UART_A RTS/CTS pinsBhuvanchandra DV
Add pinmux for UART_A RTS, CTS pin's. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Shawn Guo <shawnguo@kernel.org> (cherry picked from commit 6914a64eef2c6a03768738525ed0ebbe637234a0)
2016-02-17pinctrl: freescale: imx: implement gpio_disable_free for VybridStefan Agner
The Freescale Vybrid SoC has GPIO capabilities as part of the IOMUXC. To enable GPIO's, the gpio_request_enable callback has been implemented, however the corsponding gpio_disable_free callback is missing. So far, disabling (unexporting) a GPIO left the pin in its last state. Implement a proper gpio_disable_free function which clears the three enable bits which influence the state (IBE, OBE and PUE). Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-17clocksource: vf_pit_timer: Fix suspend resumeSanchayan Maity
Specify suspend resume functions for the PIT block. Without these functions which take care of enabling the PIT block and restoring the clock value, suspend resume does not work when using PIT as the clocksource instead of the ARM Global Timer. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-17ARM: dts: vf610: Add alias for ethernet controllerStefan Agner
Add alias for FEC ethernet on Vybrid to allow bootloaders (like U-Boot) patch-in the MAC address using this alias. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Shawn Guo <shawnguo@kernel.org> (cherry picked from commit ba734935937cfe29463b4e03906238944876b6de)
2016-02-17ARM: dts: vf610: add performance monitoring unitStefan Agner
All Freescale Vybrid SoC include a Cortex-A5 core which supports ARM's standard PMU (performance monitoring unit). Include the monitoring unit into the Cortex-A5 base device tree vf500.dtsi. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-16ARM: dts: vf-colibri: disable write-protection for SD-cardStefan Agner
The Colibri standard does not define a pin for SD-Card write- protection. Use the disable-wp property to indicate that there is no physical WP line present. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-16ARM: vf610: PM: fix iounmap in error handlingStefan Agner
The calls to iounmap require a pointer to __iomem. The element vbase is already a pointer to __iomem, there is no need to dereference the pointer again. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-16ARM: vf610: PM: do not return error if L2 cache is missingStefan Agner
The current probe code ignores a missing L2 cache, but still returns ENODEV. Avoid returning ENODEV if a L2 cache is missing by setting ret to 0. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-16regulator: core: avoid unused variable warningArnd Bergmann
The second argument of the mutex_lock_nested() helper is only evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we get this build warning for the new regulator_lock_supply function: drivers/regulator/core.c: In function 'regulator_lock_supply': drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable] To avoid the warning, this restructures the code to make it both simpler and to move the 'i++' outside of the mutex_lock_nested call, where it is now always used and the variable is not flagged as unused. We had some discussion about changing mutex_lock_nested to an inline function, which would make the code do the right thing here, but in the end decided against it, in order to guarantee that mutex_lock_nested() does not introduced overhead without CONFIG_DEBUG_LOCK_ALLOC. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 9f01cd4a915 ("regulator: core: introduce function to lock regulators and its supplies") Link: http://permalink.gmane.org/gmane.linux.kernel/2068900 Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit fa731ac7ea04a7d3a5c6d2f568132478c02a83b3) Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-16arm: irq: l2c: do not print error in case of missing l2c from dtbAndi Shyti
In some architectures the L2 cache controller is integrated in the processor's block itself and it doesn't use any external cache controller. This means that an entry in the board's dtb related to the l2c is not necessary. Distinguish between error codes and do not print anything in case l2x0_of_init() doesn't find any L2C DTB entry and returns -ENODEV. This patch mutes the following error message: L2C: failed to init: -19 on boards like odroid-xu4, cortex A7/A15, which don't have external cache controller. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-02-16ARM: colibri_vf: initial defconfig for 4.4 kernelStefan Agner
Add Linux 4.4 default kernel configuration for Colibri VF50/VF61 modules. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>