summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-12-27phy: micrel: do not use power down modeStefan Agner
Some Micrel KSZ8041NL PHY chips exhibit continous RX errors after using the power down mode bit (0.11). If the PHY is taken out of power down mode in a certain temperature range, the PHY enters a weird state which leads to continously reporting RX errors. In that state, the MAC is not able to receive or send any Ethernet frames and the activity LED is constantly blinking. Since Linux is using the suspend callback when the interface is taken down, ending up in that state can easily happen during a normal startup. Micrel confirmed the issue, caused by abnormal clock recovery when using power down mode. Even the latest revision (A4, Revision ID 0x1513) seems to suffer that problem. Remove the suspend/resume callback to avoid using the power down mode completely. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit a76182f34d2963ee5dca3bc026cbddb44b19be7c)
2018-12-27net: phy-micrel: check return code in flp center functionMax Uvarov
Fix obvious typo that first return value is set but not checked. Signed-off-by: Max Uvarov <muvarov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit a0da456bbf95d2a9294799bb05c61bfb24736bb7) Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 5f0a65495d895df2be2ddd681662f877f1a05b7f)
2018-12-27Input: atmel_mxt_ts - fix reset-gpio for level based irqsSebastian Reichel
The current reset-gpio support triggers an interrupt storm on platforms using the maxtouch with level based interrupt. The Motorola Droid 4, which I used for some of the tests is not affected, since it uses a edge based interrupt. This change avoids the interrupt storm by enabling the device while its interrupt is disabled. Afterwards we wait 100ms. This is important for two reasons: The device is unresponsive for some time (~22ms for mxt224E) and the CHG (interrupt) line is not working properly for 100ms. We don't need to wait for any following interrupts, since the following mxt_initialize() checks for bootloader mode anyways. This fixes a boot issue on GE PPD (watchdog kills device due to interrupt storm) and does not cause regression on Motorola Droid 4. Fixes: f657b00df22e ("Input: atmel_mxt_ts - add support for reset line") Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Reviewed-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit ca1cd36cef00260db6b35b32d863e0c580c0488d) (cherry picked from commit 6d7ffbea51c1f314a4435065147b36159169571f)
2018-12-21tty: serial: imx: fix merge inconsistencyMarcel Ziswiler
Missing commit 688f897ddd96 ("Merge remote-tracking branch 'linux-fslc/4.9-1.0.x-imx' into toradex_4.9-1.0.x-imx-next"). Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-12-09mmc: sdhci: Use sdhci-caps-mask and sdhci-caps to change the caps read ↵Zach Brown
during __sdhci_read_caps The sdhci capabilities register can be incorrect. The sdhci-caps-mask and sdhci-caps dt properties specify which bits of the register are incorrect and what their values should be. This patch makes the sdhci driver use those properties to correct the caps during __sdhci_read_caps. During __sdhci_read_caps Use the sdhci-caps-mask property to turn off the incorrect bits of the sdhci register after reading them. Use the sdhci-caps to turn on bits after using sdhci-caps-mask to turn off the incorrect ones. Signed-off-by: Zach Brown <zach.brown@ni.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 92e0c44b92e463a47746b520ea9aa9ef154f27e7)
2018-12-09mmc: fix idx assigning for not aliased sdhci host controllersMax Krummenacher
Forward porting of 35928d6c6a to 6e9e049fa introduced a bug for host controllers which are not aliased in the device tree. Instead of instantiating the driver it fails with: sdhci-esdhc-imx 2194000.usdhc: sdhci_pltfm_init failed -12 sdhci-esdhc-imx: probe of 2194000.usdhc failed with error -12 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-09Input: atmel_mxt_ts - add support for reset lineSebastian Reichel
Provide support for controlling reset pin. If this is not driven correctly the device will be held in reset and will not respond. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit f657b00df22e231da217ca0162a75db452475e8f) Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
2018-12-09Input: atmel_mxt_ts - use more managed resourcesSebastian Reichel
Switch mxt_data and interrupt to resource managed allocation methods, which cleans up the driver slightly and prepares for adding reset GPIO support. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> (cherry picked from commit 8cc8446b9b62ef954b630ed30e53bd1553e916a6) Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com>
2018-12-09drivers/firmware: Expose psci_get_version through psci_ops structureWill Deacon
Entry into recent versions of ARM Trusted Firmware will invalidate the CPU branch predictor state in order to protect against aliasing attacks. This patch exposes the PSCI "VERSION" function via psci_ops, so that it can be invoked outside of the PSCI driver where necessary. Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked commit from a6df699da786079b7e2249df3f3211be7862f0e1) Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
2018-12-09Revert "PCI: Do not allocate more buses than available in parent"Marcel Ziswiler
This reverts commit 9a4bf05126f42c2632729ab0da503021d74ed454. With this commit the PCIe enumaration fails. A follow up commit further addresses the issue. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-12-09serial: imx: add RS-485 device tree propertiesStefan Agner
Add device tree properties to influence RTS polarity and whether the receiver is enabled during transmission (rs485-rts-active-low, rs485-rx-during-tx). This aligns with behavior with upstream Linux, where RTS is active high by default (SER_RS485_RTS_AFTER_SEND) and the receiver is disabled by default when using RS485 (SER_RS485_RX_DURING_TX). Note that for Toradex hardware both properties are required, hence using RS-485 on Toradex Carrier Boards requires the following properties being specified in the device tree: linux,rs485-enabled-at-boot-time; rs485-rts-active-low; rs485-rx-during-tx; Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-12-09rpmsg: imx: Disable character echoing by defaultAndri Schmidt
Signed-off-by: Andri Schmidt <a.schmidt@scewo.ch> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-12-09pci-imx6.c: address compiler warningMax Krummenacher
pci-imx6.c:303:20: warning: unused variable 'pp' [-Wunused-variable] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-09mmc: sdhci: Always allow tuning to fall back to fixed samplingAdrian Hunter
SDHCI falls back to fixed sampling if there is an error during tuning. However it also reports an error unless there is periodic re-tuning. That is not the best option because: a) there is a reasonable chance that fixed sampling will work, especially at room temperature. b) re-tuning will be done again anyway if there are CRC errors. Change to return no error always when falling back to fixed sampling. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 0760c355525c08dd598e86edb2a310688ac8af4c)
2018-12-09Revert "MLK-14498-2 ARM: imx7d: clk: select uart clock parent and rate"Stefan Agner
This seems to limit possible baud rates due to lower input clock. Since Toradex modules do not use UART5/6 as console, do not set clock explicitly. This reverts commit 4f447cb8bccb1d40973e46478d7b11aa61961c90. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-09Revert "MLK-15120 ARM: imx7d: clk: select uart3 clock parent and set rate"Stefan Agner
This seems to limit possible baud rates due to lower input clock. Since Toradex modules do not use UART3 as console, do not set clock explicitly. This reverts commit 89869792e2f59c81354f9a53280c4eb6e95f4a9a. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-09video: fbdev: mxsfb: allow setting display timings via kernel command lineBhuvanchandra DV
Add support to allow configuring the display timings via kernel command line. e.g.: video=mxsfb:800x480M-16@60,pixclockpol=1,outputen=1 Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 22db6beb45cba5a67cab9e9a55cd60d7471591d9) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Conflicts: drivers/video/fbdev/mxsfb.c
2018-12-09imx_thermal.c: unregister all ressources in error pathMax Krummenacher
This was seen in code inspection. While at it, fix error text. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-09ARM: imx7d: clk: make sure OCOTP clock is always onStefan Agner
Some device make use of the OCOTP via syscon. While the OCOTP node specifies a clock, in newer kernels the access via syscon does not enable the clock! During the main boot phase this is not usually a problem since the clock is initially on. However, after unused clocks get disabled, any access leads to a freeze. This has been observed when the i.MX Thermal driver probe has been deferred: The driver tried to read the calibration data from OCOTP via syscon and caused a system freeze. In upstream Linux this has recently been resolved using the NVMEM framework, see: Commit ae6215576d6b ("thermal: imx: Add support for reading OCOTP through nvmem") Commit a6c856e9a8cd ("ARM: dts: imx6sx: Use nvmem-cells for tempmon") Use a simpler work around by just adding the clock to the list of clocks which should kept on. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-12-09cpufreq: imx7s: add i.MX 7SoloStefan Agner
The i.MX 7Solo currently does not have multiple operating points, however, in order for the i.MX Thermal driver to successfully probe a cpufreq device is required. Add i.MX 7Solo to the devices which use the generic device tree cpufreq driver. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2018-12-09usb: gadget: configfs: use hexadecimal values and new lineStefan Agner
Other unsigned properties return hexadecimal values, follow this convention when printing b_vendor_code too. Also add newlines to the OS Descriptor support related properties, like other sysfs files use. Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> (cherry picked from commit e800e8cbdf42c73602b90258f82a2cfe86ec53a7)
2018-12-09usb: gadget: configfs: make qw_sign attribute symmetricStefan Agner
Currently qw_sign requires UTF-8 character to set, but returns UTF-16 when read. This isn't obvious when simply using cat since the null characters are not visible, but hexdump unveils the true string: # echo MSFT100 > os_desc/qw_sign # hexdump -C os_desc/qw_sign 00000000 4d 00 53 00 46 00 54 00 31 00 30 00 30 00 |M.S.F.T.1.0.0.| Make qw_sign symmetric by returning an UTF-8 string too. Also follow common convention and add a new line at the end. Reviewed-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> (cherry picked from commit 76180d716f91f035d9c8639497cf5459b44e1a51)
2018-12-09pci-imx6: fix reboot bugTroy Kisky
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit df7b30b5b521fad21e682f318ee703be2144358b) (cherry picked from commit 62785dfc6e934d8947b8367bf553dd2c81f5fb21) Conflicts: drivers/pci/host/pci-imx6.c
2018-12-09PCI: imx6: fix PCIe EP device self-initialisationMarcel Ziswiler
This fixes PCIe EP device self-initialisation in case only a regular reset EP GPIO is used as PERST# which is e.g. the case on our Ixora carrier board by always waiting 20 milliseconds after releasing PERST#. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 3eaf56fc694e8b960a29e0205f40380cf59f9fc9) (cherry picked from commit 826486c65363059986fa12fa1eeb7c0e50c3af48)
2018-12-09pcie-imx6: improve reset function for reseting EPMax Krummenacher
If the reset gpio for a PCIe switch is invalid, but a gpio for reseting downstream EP devices is valid no reset pulse for the EP devices is generated. (i.e. in the device tree reset-gpio is not defined but reset-ep-gpio is defined) The patch fixes this. Original patch from Juha Kokkonen, Huoltamoeletroniikka Ky Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit f593ebc9921013a992c1d096bf4cbad17c1af01b) (cherry picked from commit 8437c2f0e4fafb9a31dd260704cc6b7a22bf33f8) Conflicts: drivers/pci/host/pci-imx6.c (cherry picked from commit fc0d0a29ab0e6fc0de72b63fba80845cc554d543)
2018-12-09pcie-imx6: add reset function for reseting downstream EPMax Krummenacher
With the following dtb node one can define a gpio to reset downstream endpoints. reset-ep-gpio = <...>; Currently the logic is 1 for reset asserted and 0 for reset deasserted. Some pcie switches require their downstream endpoints to be kept in reset for an additonal millisecond after their reset has been deasserted. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 94a60e7f645965b1e422e4e80aa8ccb9e0ec845c) (cherry picked from commit f2bb337d37acd680404371d2530a486bfe821ce2) Conflicts: drivers/pci/host/pci-imx6.c (cherry picked from commit 557f0276856f1731264492ad82fe2f13e2d64831)
2018-12-09rpmsg: imx: return ENOTTY if no tty connectedStefan Agner
Return ENOTTY if no reader is using the TTY. Note that the VirtIO transport used by RPmsg currently does not use the return value of this callback, hence currently will not influence operation in any way. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-12-09ARM: imx: clk: enable OCOTP clock by defaultStefan Agner
For some reason USDHC and USB access crashes the kernel if the OCOTP clock is not enabled. It seems not to be software related since there is no direct access from the USDHC/Chipidea USB driver to the OCOTP IP. It might be that the hardware checks the fuses to determine if the particular SoC is supposed to let user access a certain peripheral... Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit bce5146373372651052654b84cd3b773ac4d1882)
2018-12-09mtd: gpmi: fsl,legacy-bch-geometry independent of nand-on-flash-bbtMax Krummenacher
The device tree property fsl,legacy-bch-geometry was only evaluated when nand-on-flash-bbt was also defined. This looks wrong. In mainline (as of 4.12) fsl,legacy-bch-geometry doesn't exist, its functionality seems to be taken over by the fsl,use-minimum-ecc property and it is used independent of nand-on-flash-bbt. The move of code gets also rid of the following compiler warning: drivers/mtd/nand/gpmi-nand/gpmi-nand.c:2274:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (of_property_read_bool(this->dev->of_node, ^~ drivers/mtd/nand/gpmi-nand/gpmi-nand.c:2278:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if' if (of_property_read_bool(this->dev->of_node, ^~ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit c8f0033be80ccb23230b6b572c328d1c02e4ad04)
2018-12-09regulator: pfuze100: Apalis iMX6: Fix poweroff does not release ↵Sanchayan Maity
POWER_ENABLE_MOCI Poweroff failed powering off the carrier board side of things and did not deassert POWER_ENABLE_MOCI on poweroff. Fix this. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 090138a21869fe2a4b1efa725e6f962ecdff86e5)
2018-12-09mxc_ipuv3_fb: Use the mode_string from command line as isBhuvanchandra DV
Using the mode_str passed via device tree as default fall back, fb_find_mode fails while finding the mode, so avoid using the non standard mode_str passed via device tree and use the mode_str from command line as is. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 50e26af30f04d24f4783dae15206c5dba889fd2b)
2018-12-09ov5640_mipi: Revert the hackBhuvanchandra DV
Revert the hack for reset GPIO request failure. (Remove the used pins from /usr/bin/gpio-export.sh) Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit d826eb44e78b5103c96c3e1c28ede8ec224e5371)
2018-12-09tty: serial: imx: Add support for enabling RS485 via device treeBhuvanchandra DV
Add support to enable RS485 via device tree Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit b8e5d21a1351bc0e45ae1762f0799b428d9993ea)
2018-12-09net: can: flexcan: Fix wakeup on CAN from suspend issueSanchayan Maity
Do not disable peripheral while entering suspend mode. Disabling the peripheral does not allow waking up from suspend on a CAN frame reception. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Acked-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit f972815d2a4db5c93ded76bd11b660261e41f28c)
2018-12-09iio: adc: remove event advertismentStefan Agner
The driver currently advertise events, however, the required callback read_event_config is not implemented. This leads to a stack trace when trying to read the even files in sysfs: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = 80e04000 [00000000] *pgd=10a57831, *pte=00000000, *ppte=00000000 Internal error: Oops: 80000007 [#1] SMP ARM Modules linked in: CPU: 0 PID: 175 Comm: cat Not tainted 4.1.39-00001-g52349f183498 #41 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: 80e4e800 ti: 80a38000 task.ti: 80a38000 PC is at 0x0 LR is at iio_ev_state_show+0x4c/0x70 pc : [<00000000>] lr : [<80613704>] psr: a0070013 sp : 80a39aa0 ip : 807f1a74 fp : 80a39ab4 r10: 00000001 r9 : 8809d000 r8 : 80e74800 r7 : 80da0c18 r6 : 807cae38 r5 : 00000000 r4 : 8809d000 r3 : 00000002 r2 : 00000000 r1 : 807f1730 r0 : 80da0c00 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5387d Table: 10e0404a DAC: 00000015 Process cat (pid: 175, stack limit = 0x80a38210) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit b6798bb5050a786f7cdd2a47db8029fee74e36fe)
2018-12-09iio: adc: support IIO_CHAN_INFO_SCALEStefan Agner
Add support to read back raw value scale. This allows to calculate actual voltages from the raw values. Also combine the value acquisition and implement error handling closer the way used in other IIO ADC drivers. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 7a751b2238383593fef0b3549fcf5a04558a0d3e)
2018-12-09apalis-imx6: use stopmode for poweroffMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 051ee1a1c24058db62f10a177b1271daebbd2ebe)
2018-12-09colibri-imx6: use stopmode for poweroffMax Krummenacher
After the system has been shutdown with PMIC_ON_REQ and VCC_BATT is supplied from a battery it will never restart either by RESET or power cycle. So use the PMIC_STBY_REQ after shutdown to switch off power rails. Conflicts: arch/arm/mach-imx/pm-imx6.c drivers/regulator/pfuze100-regulator.c (cherry-picked from commit c8b186404065c4502b485820ad4a51515924795c) (cherry-picked from commit ee4c5c4da3b32f65528a2d523ca4bce574dee3c5) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 29ff2389ecf7cb4e30924c80b8d42165cf306936)
2018-12-09iio: adc: fix removeStefan Agner
Removing the device (e.g. using unbind) leads to a NULL pointer dereference stack trace. There is no need to manually unregister the platform device, so remove this obsolete code. This fixes unbinding the device e.g. using: # echo 2-0041 > /sys/bus/i2c/drivers/stmpe-i2c/unbind Also make sure the respective block is disabled in case we only unbind the ADC block: # echo stmpe-adc > /sys/bus/platform/drivers/stmpe-adc/unbind Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 091594ee53e9f6ae330f40c3528bf93f181b4cd5)
2018-12-09ARM: imx: clk: do not force clock frequency of M4Stefan Agner
Let the M4 handle the clock frequency by itself. We also don't need to take care to make sure clocks stay on, the per domain CCM clock gate control registers can be used to let the CCM know that the M4 runs on that PLL: CCM_ControlGate(CCM, ccmPllGateSysDiv2, ccmClockNeededRun); Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 98adbbaef78b8a401350a0bf27c3ddc1881ec34d)
2018-12-09mmc: sdhci-esdhc-imx: make sure runtime PM is suspended in system suspendStefan Agner
Use force suspend/resume to trigger runtime PM when entering system suspend. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit c6634703d092bffee980cbe5c0459074f94d9299)
2018-12-09mtd: gpmi: make sure runtime PM is suspended in system suspendStefan Agner
Use force suspend/resume to trigger runtime PM when entering system suspend. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 2df675a89358549e656592c3eb9781860e909cd4)
2018-12-09video: fbdev: mxsfb: make sure runtime PM is suspended in system suspendStefan Agner
Use force suspend/resume to trigger runtime PM when entering system suspend. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit ebf45652f2e9ec2ab19831d852363deadeb6407e)
2018-12-09net: fec: make sure runtime PM is suspended in system suspendStefan Agner
Use force suspend/resume to trigger runtime PM when entering system suspend. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit a2ccbd22f2b1da9b152039538fb3b5cb2cfc55c7)
2018-12-09drivers: soc: Add new sysfs attribute to expose SoC unique IDBhuvanchandra DV
Add new 'unique_id' sysfs attribute to expose SoC unique ID Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 8a098f2f1b8ae277a38ee0c5e0b974d5baa8dd01)
2018-12-09ARM: imx7d: clk: add root clock for keypad portStefan Agner
The keypad port (KPP) module is clocked by the IPG root clock through clock gate CCM_CCGR170. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 7b51b6365ebcf65b1054337a5bb0e1879397aae6)
2018-12-09rpmsg: imx: do not push data when no reader is availableStefan Agner
Pushing data while there is no reader seems to lock/crash the TTY layer in some way. Especially when a reader gets attached again, the kernel crashes with Unable to handle kernel paging request at virtual address 00002248 Also use tty_insert_flip_string which handels the copying and TTY buffer resizing if necessary. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 5aba75e2c61d4044bed21730b7c471822860fac1)
2018-12-09ARM: imx: define buffer count per VirtIO queueStefan Agner
Let RPMSG_NUM_BUFS to be the number of buffers per VirtIO queue, so that each queue (TX/RX) has 256 buffers. The change does not affect the number of buffers. But specifing per VirtIO queue aligns better with the way buffer sizes are specified on the FreeRTOS side (in platform_info.c). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 1db9a161430d3975b4b3822b91b2a14c5b8193ba)
2018-12-09gpio: mxc: clear interrupt mask/status optionallyStefan Agner
Add a kernel parameter ("gpio-mxc.noclearirq") to disable unconditional interrupt mask/clearing. This is useful when a second CPU (the Cortex-M4) is accessing the same GPIO bank. Using the same GPIO bank from the Cortex-A7 and M4 sounds risky, but it seems to work quite well. Most registers are write only (e.g. interrupt status register can be cleared with a single write), which makes them safe for concurrent access. However, sharing a single GPIO bank between two cores does not allow to use the Resource Domain Controller. Hence for secure applications assigning a dedicated GPIO bank is still preferable. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 4cfa939c693b20ca213f054c1dfe5583d966beb4)
2018-12-09video: mxc: ldb: Add support for LVDS configuration via kernel boot argumentsBhuvanchandra DV
Add support for LVDS frame buffer configuration via kernel boot arguments. Fix use of the device tree native-mode property. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 122acb64708ac40faa8c5755624a0bcfbebcb9e8) (cherry picked from commit 735d4f8addae71ef4a70eb16a9639bd6204fd2b9)