summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-03pinctrl: tegra: clean-upMarcel Ziswiler
Cosmetic clean-up to bring it more in-line with mainline driver in order to be able to easily assess whether it is all kosher. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-09-27ARM: tegra: Select appropriate DMA options for LPAEPaul Kocialkowski
This automatically selects options for zone DMA and 64 bit DMA addresses when LPAE is enabled on ARM Tegra platforms. These options are required for proper operation with LPAE enabled. The ZONE_DMA option is required to ensure that drivers that allocate DMA memory get buffers from the first 4 GiB. This is necessary because a lot of the controllers only support addressing 32 bits. As for ARCH_DMA_ADDR_T_64BIT, there are situations where devices that do support addresses of more than 32 bits (such as the display controller or the GPU) can run without translating addresses through an IOMMU on a device with more than 4 GiB of system memory. Note that both of these options are stop-gap solutions required only until the IOMMU can be properly integrated with the DMA mapping API and drivers use that properly and consistently. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> [treding@nvidia.com: specify rationale for options] Signed-off-by: Thierry Reding <treding@nvidia.com> (backported from commit 6aa26c5d66595494e810c791602d87a572c78808)
2017-09-20dp.c: fix compilation with gcc 7Max Krummenacher
With gcc 7 the following compile time error occurs: | drivers/video/tegra/dc/dp.c:1178:12: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] | cr_done ? : ({ret = -EINVAL; goto fail; }); | ^ | drivers/video/tegra/dc/dp.c:1186:12: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] | lt_done ? : ({ret = -EINVAL; goto fail; }); | ^ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20tegra11_soctherm.c: fix compilation with gcc 7Max Krummenacher
With gcc 7 the following compile time error occurs: | arch/arm/mach-tegra/tegra11_soctherm.c:2978:40: error: the omitted middle operand in ?: will always be 'true', suggest explicit middle operand [-Werror=parentheses] | s->sensor_enable = s->sensor_enable ?: therm->zone_enable; | ^ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20dsi.c: fix compilation with gcc 7Max Krummenacher
With gcc 7 the following compile time error occurs: | drivers/video/tegra/dc/dsi.c:766:34: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] | drivers/video/tegra/dc/dsi.c:757:1: | (platform_t_phy_ps) ? ( \ | ~~~~~~~~~~~~~~~~~~~ | kernel-source/drivers/video/tegra/dc/dsi.c:766:34: | dsi->info.phy_timing.t_tlpx_ns * 1000, | drivers/video/tegra/dc/dsi.c:757:2: note: in definition of macro 'SELECT_T_PHY' | (platform_t_phy_ps) ? ( \ | ^~~~~~~~~~~~~~~~~ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20powergate-t12x.c: fix compilation with gcc 7Max Krummenacher
With gcc 7 the following compile time error occurs: | arch/arm/mach-tegra/powergate-t12x.c:814:10: error: statement will never be executed [-Werror=switch-unreachable] | return true; | ^~~~ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20tegra_udc.c: fix compilation with gcc 7Max Krummenacher
With gcc 7 the following compile time error occurs: | .../drivers/usb/gadget/tegra_udc.c:2565:17: error: 'out' directive writing 3 bytes into a region of size between 2 and 11 [-Werror=format-overflow=] | sprintf(name, "ep%dout", i); | ^~~~~~~~~ | .../drivers/usb/gadget/tegra_udc.c:2565:3: note: 'sprintf' output between 7 and 16 bytes into a destination of size 14 | sprintf(name, "ep%dout", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ The last end point will never be greater than 32 but the compiler can not find this out from the code. Work around this by passing a format specifier to interpreat i as a signed char. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20apalis-tk1: activate pwm pin muxing for pwm3Marcel Ziswiler
Activate PWM pin muxing for Apalis PWM3. Note that the same PWM3 is already active on pu6 being Apalis BKL1_PWM as well. Therefore exporting that one for raw sysfs access will fail and one has to revert to using the pwm backlight. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-09-20apalis-tk1: enable large physical address extension lpaeMarcel Ziswiler
Enable support for the Large Physical Address Extension aka LPAE. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-09-20mfd: apalis-tk1: fix NULL pointer dereferenceDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20spi: tegra: fix warning when using controller-dataDominik Sliwa
Tegra spi driver was using devm_kzalloc before dev was bound. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20apalis-tk1: fix pcie reset for reliable gigabit ethernet operationMarcel Ziswiler
It turns out that the current PCIe reset implementation is not quite working reliably due to some Intel i210 errata. Fix this by making sure the i210's +V3.3_ETH rail is properly disabled during its reset sequence. Also further improve on the bringing up the PCIe switch as found on the Apalis Evaluation board. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-09-20apalis-tk1: update defconfig for wifiDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20ARM: dts: tegra124: fix m41t0 rtc compatible stringBhuvanchandra DV
Toradex Carrier boards use the ST M41T0 RTC (not M41T00). The RTC is almost the same, but the M41T0 needs some special handling in case the oscillator fails. Now that support for this difference is available, using the new compatible string to make use of it. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-09-20rtc: ds1307: support m41t0 variantBhuvanchandra DV
The m41t0 variant is very similar to the already supported m41t00 variant, with the notable exception of the oscillator fail bit. The data sheet notes: If the oscillator fail (OF) bit is internally set to a '1,' this indicates that the oscillator has either stopped, or was stopped for some period of time and can be used to judge the validity of the clock and date data. The bit will get cleared with a regular write of the system time, so no changes are needed to clear it. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> (backported from commit 8566f70c8a90f3914b06e934852596ba94aaa381)
2017-06-30apalis-tk1: snapd squashfs configurationApalis-TK1_LXDE-Image_2.7b3-20170630Marcel Ziswiler
Prepare for snapd integration. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-06-30apalis-tk1: improve spi2 clocking aka for k20Marcel Ziswiler
Change SPI2 clock parent to clk_m being 12 MHz which is anyway the maximum frequency the K20 micro controller's SPI peripheral can be run. This further allows for the EzPort to be run at exactly 2 MHz which is the maximum allowed as well. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-06-30apalis-tk1: add multitouch hid supportStefan Agner
Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 15e73283a975a1b899d7f6807aa882ef885573dd) Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-06-30apalis-tk1-k20: can and spi improvementsDominik Sliwa
This patch includes CAN driver and improvements in SPI communications for Apalis TK1 k20 based MFD. Requires firmware version 0.9. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-06-30video: tegra: sor: set drive current for lane4WayneWWW
Drive current for LANE4 was not set if configured as 24bpp LVDS out. Fix it by programming proper drive current register if using 24bpp out. https://devtalk.nvidia.com/default/topic/1003030 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-04-10apalis-tk1: default to lp1 sleepApalis-TK1_LXDE-Image_2.7b2-20170410Dominik Sliwa
Due to problems with LP0 sleep, make LP1 the default option. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04apalis-tk1: video: use new modedb based settingsBhuvanchandra DV
Use modedb to set mode on Apalis TK1 frame buffer/display controller. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04tegra: video: use modedb to specify frame buffer resolutionBhuvanchandra DV
Allow to specify framebuffer videomode using kernel command line parameters. NVIDIAs binary X driver later on picks up those settings and start X with current mode settings, if no EDID data are available. Reused some of the implementation from Stefan's work for modedb support[1] on Tegra20/30 [1] http://git.toradex.com/cgit/linux-toradex.git/commit/?h=tegra-next&id=1d3625dd9903bcc59e2df56836565ebb682948c1 Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04apalis-tk1: use soc uid insteadBhuvanchandra DV
Instead of providing revision, SKU and PID information via soc_id pass SoC's unique ID. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04regmap: irq: dispose all virtual irq before removing domainLaxman Dewangan
It is require to dispose all virtual irq of hwirq on chip created on given irq domain before removing this irq domain. Hence dispose all mapped irqs before deleting the irq domains in regmap_del_irq_chip(); Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-04regmap: irq: Remove domain on exitMark Brown
irqdomain now supports removal of domains on exit so we can properly clean up on deletion of a regmap irqchip. Signed-off-by: Mark Brown <broonie@linaro.org>
2017-04-04regmap-irq: set IRQF_ONESHOT flag to ensure IRQ requestValentin Rothberg
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. The %irq_flags flag is used to request the threaded IRQ and is also a parameter of the caller. Hence, we cannot be sure that IRQF_ONESHOT is set. This change avoids the potentially missing flag by setting IRQF_ONESHOT when requesting the threaded IRQ. Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-04media: ov5640: set continuous clock for all modesWojciech Bieganski
Signed-off-by: Wojciech Bieganski <wbieganski@antmicro.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04media: tegra_camera: add continuous clk supportWojciech Bieganski
Signed-off-by: Wojciech Bieganski <wbieganski@antmicro.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04media: three csi2 inputs: tc378743 (csia/b), adv7280m (csie)Wojciech Bieganski
Signed-off-by: Wojciech Bieganski <wbieganski@antmicro.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04media: fix pal supportWojciech Bieganski
Signed-off-by: Wojciech Bieganski <wbieganski@antmicro.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04media: fix simultaneous captureWojciech Bieganski
Signed-off-by: Wojciech Bieganski <wbieganski@antmicro.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04Reapply "media: tegra_camera: introduce 2 kthreads for capture"Mariusz Glebocki
This reverts commit b2f6b2abc791802631ff1c85488cdf3c1f0a97e2. Signed-off-by: Mariusz Glebocki <mglebocki@antmicro.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04apalis-tk1: add wake-on-lan gpioDominik Sliwa
Configure GPIO connected to i210 wake-up pin as a wake-up source in the device tree. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04apalis-tk1: fix lp1 sleepDominik Sliwa
Fix suspend and resume for LP1 sleep. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04igb: integrate igb driver 5.3.5.4Marcel Ziswiler
Integrate latest igb driver version 5.3.5.4 (igb-5.3.5.4.tar.gz from e1000.sf.net). While this fixes a build time warning using later gcc compilers it should not have any further impact. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-04-04apalis-tk1: fix cpu and gpu thermal throttlingMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2017-04-04apalis-tk1: fix sdio freezeDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-04-04apalis-tk1: mfd touch screen fixes and improvementsDominik Sliwa
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-01-11apalis_tk1: Support for K20 based MFDApalis_TK1_LinuxImageV2.7Beta1_20170112Dominik Sliwa
On Apalis TK1 boards K20 MCU is used for CAN, GPIO, ADC and touch screen. This patch includes support for core MFD device, GPIO, ADC and touch screen. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-01-11apalis-tk1: support i2c rtcMarcel Ziswiler
Integrate support for the carrier board level I2C RTC. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21mmc: tegra: apalis-tk1: no longer do card detect polling on v1.1 hwApalis_TK1_LinuxImageV2.6.1Beta2_20161122Marcel Ziswiler
Now with the working card detect pin in place on the latest V1.1 HW polling is no longer required. Therefore make it an optional define for V1.0 samples. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: working sd card detect on v1.1 hwMarcel Ziswiler
Add sd card detect SD1_CD# applicable for V1.1 modules using GPIO_PV2. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: adjust pin muxing for v1.1 hwMarcel Ziswiler
Configure Apalis MMC1 D6 GPIO on SDMMC3_CLK_LB_IN as reserved function without any pull-up/down. Configure GPIO_PV2 as SD1_CD# according to latest V1.1 HW. Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output driver enabled aka not tristated and input driver enabled as well as it features some magic properties even though the external loopback is disabled and the internal loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being set to 0xfffd according to the TRM! This pin is now a not-connect on V1.1 HW in order to avoid any interference. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: temp alert pull-upMarcel Ziswiler
Pull-up GPIO_PI6 connected to TMP451's ALERT#/THERM2#. While at it improve some comments. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21sdhci: tegra: add 200 mhz tuning dataMarcel Ziswiler
As we limit the clock to 200 MHz also add tap hole coefficients to allow for successful UHC-I tuning on SDMMC1. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21pinctrl: tegra: fix some mistakes in Tegra124Stephen Warren
A couple of pairs of pin group names were swapped in the table. This caused the wrong register to be programmed. Luckily, this had little effect, if any, since the swapped pins were likely to be programmed identically. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> (cherry picked from commit 0ffdd4b61b1326b2b8a7c4fdf3c061d807be1a74)
2016-11-21apalis-tk1: fix pcie clock and reset not conforming to specificationMarcel Ziswiler
Fix PCIe clock and reset not conforming to specification by moving PCIe reset handling including the PLX PEX 8605 errata 5 workaround from the board platform data into the right places timing wise in the PCIe driver itself. Also add a kernel command line argument to allow using the Apalis GPIO7 as a regular GPIO rather than for above mentioned PLX PEX 8605 workaround: pex_perst=0 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com> (cherry picked from tegra-next commit a2f63805703b43d55d91ae17f10d0049bf0f625e)
2016-11-21apalis-tk1: configure IPv6 SIT driver as moduleStefan Agner
SIT tunnels (IPv6 over IPv4) are not often used hence configure the driver as a module. This also gets rid of the extra network interface sit0 by default. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-11-21Revert "media: tegra_camera: introduce 2 kthreads for capture"Marcel Ziswiler
This reverts commit ff5bccb61c1f8da1f63451fda88bd1f65dbee5b2. This makes Antmicro's OV5640 camera module work again as described on their blog here: http://antmicro.com/Blog/2015/09/jetson-tk1-cameras/ Further investigation pending. Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>