summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-30net: phy: micrel.c: add rgmii interface delay possibility to ksz9131Philippe Schenker
The KSZ9131 provides DLL controlled delays on RXC and TXC lines. This patch makes use of those delays. The information which delays should be enabled or disabled comes from the interface names, documented in ethernet-controller.yaml: rgmii: Disable RXC and TXC delays rgmii-id: Enable RXC and TXC delays rgmii-txid: Enable only TXC delay, disable RXC delay rgmii-rxid: Enable onlx RXC delay, disable TXC delay Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit bd734a742d5533fb9190ecd8cf25befc1f759a5b) Replace phy_modify_mmd with phy_read_mmd and phy_write_mmd. Related-to: ELB-2581 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-30Revert "ARM64: dts: verdin-imx8mm: Add rxc txc dll 2ns delay"Philippe Schenker
This reverts commit 118d904a302114b323e3464bceab64bfc26868e2. There is now a mainline solution for that. Drop this solution in favor of the upstream one. We will use "rgmii-id" tag now to declare that delays. Related-to: ELB-2581 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-30Revert "dt-bindings: micrel-ksz90x1: Add rxc-dll and txc-dll properties"Philippe Schenker
This reverts commit 4bdc5d8f4f1e6ec472074a6a4fc2e2061cdb1c8d. There is now a mainline solution for that. Drop this solution in favor of the upstream one. We will use "rgmii-id" tag now to declare that delays. Related-to: ELB-2581 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-30Revert "net: phy: micrel: Add KSZ9131 rxdll txdll bypass dt properties"Philippe Schenker
This reverts commit f49da0d7dbf67030f7e12a94fd18a7f1a0b845e0. There is now a mainline solution for that. Drop this solution in favor of the upstream one. We will use "rgmii-id" tag now to declare that delays. Related-to: ELB-2581 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-26ARM64: boot: dts: verdin-imx8mm: support non-wifi moduleOleksandr Suvorov
Add support of non-wifi Toradex Verdin iMX8MM module on the Development board. Related-to: ELB-2322 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-26ARM64: boot: dts: verdin-imx8mm: rename wifi dev configurationOleksandr Suvorov
Add the mark of wi-fi version of Toradex Verdin iMX8MM module to a devicetree file name. Related-to: ELB-2322 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-26ARM64: boot: dts: verdin-imx8mm: add board layerOleksandr Suvorov
Split the common devicetree file to two layers: - Toradex Verdin iMX8MM WB; - Toradex Verdin Development board. Related-to: ELB-2322 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-26ARM64: boot: dts: verdin-imx8mm: add wifi layerOleksandr Suvorov
Move the on-module Wi-Fi part of a Toradex Verdin iMX8MM module to a separate file. Related-to: ELB-2322 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-26ARM64: boot: dts: verdin-imx8mm: fix code formattingOleksandr Suvorov
Fix the minor code formatting issue. Related-to: ELB-2322 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-26MLK-23681 arm64: dts: imx: enable pcieb on 8qm mek baseboardRichard Zhu
Based on imx_4.1x kernel, enable the PCIEB on i.MX8QM MEK baseboard. Regarding to the base board HW limitation(two Disable#) are not connected. Only the standard PCIe EP device is supported on PCIEB port. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> (cherry picked from commit d0331d84e5a14d6e2520d04540d1e893d75bd678)
2020-03-25arm64: defconfig: enable building backports-5.4Oleksandr Suvorov
The mwifiex Wi-Fi driver in kernel-4.14-2.3.x-imx works unstable. The same driver in backports-5.4 works well. Backports-5.4 requires the undocumented build option CRYPTO_HASH_INFO. This option is selected by enabled ASYMMETRIC_PUBLIC_KEY_SUBTYPE. This makes able to build and use the Wi-Fi driver mwifiex_sdio, that works stable unlike the original driver in 4.14-2.3.x-imx. Related-to: ELB-2388 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-25colibri imx6ull: defconfig: enable building backports-5.4Oleksandr Suvorov
The mwifiex Wi-Fi driver in kernel-4.14-2.3.x-imx works unstable. The same driver in backports-5.4 works well. Backports-5.4 requires the undocumented build option CRYPTO_HASH_INFO. This option is selected by enabled ASYMMETRIC_PUBLIC_KEY_SUBTYPE. This makes able to build and use the Wi-Fi driver mwifiex_sdio, that works stable unlike the original driver in 4.14-2.3.x-imx. Related-to: ELB-2388 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-24MLK-23220:mxc:vpu_malone:kfifo_alloc failure in VPU driver when memory fragmentMing Qian
Suggest to use vmalloc for fifo entity. Then use kfifo_init to init the fifo structure. Then we do not have to require contiguous memory from buddy, especially in a high pressure of memory resource. Signed-off-by: Ming Qian <ming.qian@nxp.com> (cherry picked from commit 0cd3c661b95ecb273da5ee76fe7353ab7abd38c9)
2020-03-23hwmon: (sht3x) add devicetree supportWojciech Slenska
Signed-off-by: Wojciech Slenska <wojciech.slenska@gmail.com> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2020-03-23ARM: dts: colibri_imx6: fix analogue camera adapter detectionMarcel Ziswiler
Out-of-the-box the analogue camera adapter fails detecting with the following error: [ 6.503046] adv7280 2-0021: adv7280_probe:Analog Device adv7280 not detected -6! Unfortunately, the camera seems to be held in reset due to the BL_ON pin not being serviced. Fix this by hogging the camera_nreset aka BL_ON pin to output high. Related-to: ELB-2580 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-03-18ARM: dts: verdin-imx8mm: Change naming to contain WBPhilippe Schenker
Related-to: ELB-2316 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-16ARM64: dts: colibri-imx8x: enable dpu g2d also for lcdif dtbMax Krummenacher
The dprX_channelY, pixel-combiner and prgX nodes need to be enabled to use the g2d functionality. Thus move those nodes into the common fsl-imx8qxp-colibri-eval-v3.dtsi, so that fsl-imx8qxp-colibri-eval-v3.dts also gets them enabled. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-03-12ARM64: boot: dts: verdin-imx8mm: add ctrl_wake1_micoMax Krummenacher
Add CTRL_WAKE1_MICO# as a wakeup source. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-03-11rtc: ds1307: add OF and ACPI entries for Epson RX8130Bastian Stender
Make Epson RX8130 device tree and ACPI aware. Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE") Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> (cherry picked from commit 47dd47292828a552d62d0e68b7cd6bdc99d9e0aa)
2020-03-11ARM: dts: imx6qdl: Fix SPDIF regressionFabio Estevam
Commit 833f2cbf7091 ("ARM: dts: imx6: change the core clock of spdif") changed many more clocks than only the SPDIF core clock as stated in the commit message. The MLB clock has been added and this causes SPDIF regression as reported by Xavi Drudis Ferran and also in this forum post: https://forum.digikey.com/thread/34240 The MX6Q Reference Manual does not mention that MLB is a clock related to SPDIF, so change it back to a dummy clock to restore SPDIF functionality. Thanks to Ambika for providing the fix at: https://community.nxp.com/thread/387131 Fixes: 833f2cbf7091 ("ARM: dts: imx6: change the core clock of spdif") Cc: <stable@vger.kernel.org> # 4.4.x Reported-by: Xavi Drudis Ferran <xdrudis@tinet.cat> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Xavi Drudis Ferran <xdrudis@tinet.cat> Signed-off-by: Shawn Guo <shawnguo@kernel.org> (cherry picked from commit f065e9e4addd75c21bb976bb2558648bf4f61de6) This fix was correct, but overwritten by commit 833f2cbf7091099baee28136dc68678e974c0ac5. MLB (Media Local Bus) Clock is in fact not related to SPDIF according to the MX6Q Reference Manual. Tested playback and record on pulseaudio with 44.1kHz samples. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 58e5313d36b969029d76b1ef45d3224c8557af75)
2020-03-09ARM64: boot: dts: verdin-imx8mm: Remove unsupported rgmii dly from fecPhilippe Schenker
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM64: boot: dts: apalis-imx8qm: Correct comment from 3.3V to 1.8VPhilippe Schenker
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM64: dts: verdin-imx8mm: Add rxc txc dll 2ns delayPhilippe Schenker
This patch enables both RXC and TXC 2ns dll delay lines on the KSZ9131 PHY. Both are neede because the i.MX8MM SoC is RGMII v1.3 compliant. This means we need the TXC delay of the PHY. Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09dt-bindings: micrel-ksz90x1: Add rxc-dll and txc-dll propertiesPhilippe Schenker
This commit adds two properties to control the RX DLL and TX DLL 2ns delay on RXC/TXC RGMII clock lines. This is especially needed if the MAC does not provide TXC delay by itself. Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09net: phy: micrel: Add KSZ9131 rxdll txdll bypass dt propertiesPhilippe Schenker
With this patch one is able to control the rx dll and tx dll bypass bits, hence the 2ns delay on rxc and txc lines in devicetree. Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM64: dts: apalis-imx8qm-v1.1: Remove RXC delay in MACPhilippe Schenker
The RXC delay is provided in both PHYs used (KSZ9031 and KSZ9131) on the PHY itself so it is not needed on the MAC. Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM: mach-imx6q: add ksz9131rn_phy_fixupPhilippe Schenker
The MAC of the i.MX6 SoC is compliant with RGMII v1.3. The KSZ9131 PHY is like KSZ9031 adhering to RGMII v2.0 specification. This means the MAC should provide a delay to the TXC line. Because the i.MX6 MAC does not provide this delay this has to be done in the PHY. This patch adds by default ~1.4ns delay to the TXC line. This should be good for all boards that have all RGMII signals routed with the same length. The KSZ9131 has relatively high tolerances on skew registers from MMD 2.4 to MMD 2.8. Therefore the new DLL-based delay of 2ns is used and then as little as possibly subtracted from that so we get more accurate delay. This is actually needed because the i.MX6 SoC has an asyn skew on TXC from -100ps to 900ps. Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09dt-bindings: net: add support for Microchip KSZ9131Yuiko Oshino
Add support for Microchip Technology KSZ9131 10/100/1000 Ethernet PHY Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit bff5b4b3737219195ca0caef4ff7884303cb5dc1) Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09net: phy: micrel: add Microchip KSZ9131 initial driverYuiko Oshino
Add support for Microchip Technology KSZ9131 10/100/1000 Ethernet PHY Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit bff5b4b3737219195ca0caef4ff7884303cb5dc1) Backport: Added the line: '.config_aneg = genphy_config_aneg,' to KSZ9131 data structure Related-to: ELB-1299 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09perf: Make perf able to build with latest libbfdChangbin Du
libbfd has changed the bfd_section_* macros to inline functions bfd_section_<field> since 2019-09-18. See below two commits: o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html This fix make perf able to build with both old and new libbfd. Signed-off-by: Changbin Du <changbin.du@gmail.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> (cherry picked from commit 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015)
2020-03-09spi: spidev: fix a showing of speed setting messageOleksandr Suvorov
The debug message of max device speed setting is shown when an error in spi_setup() occurs. It should be shown when the setup call is succeeded instead. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09spi: spidev: fix debug message valueOleksandr Suvorov
The debug message in spidev_message() shows wrong xfer speed: ... [ 1227.702714] spidev spi0.0: setup mode 0, 32 bits/w, 20000000 Hz max --> 0 (real speed sets to 20000000Hz) [ 1227.731801] spidev spi0.0: xfer len 4096 tx 32bits 0 usec 10000000Hz (debug message shows 10000000Hz that is the original max speed of this spidev set from DT) ... Fix the data source for the debug message. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09Revert "spi: spidev: fix setting of max speed"Oleksandr Suvorov
This is wrong approach to fix the speed issue. This reverts commit 6eb4142030916c2db5c3dd0a4301dbd1141593e2. Related-to: ELB-2387 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09ARM64: dts: verdin-imx8mm: add ctrl_sleep_mociMarcel Ziswiler
Add CTRL_SLEEP_MOCI required for e.g. the Dahlia carrier board. Related-to: ELB-2520 Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-03-09spi: spidev: fix setting of max speedOleksandr Suvorov
spi->max_speed_hz always sets to the previous value. Fixing the logic allows IOCTL command SPI_IOC_WR_MAX_SPEED_HZ to store the new requested value to spi->max_speed_hz. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09spi: fsl-lpspi: remove unneeded arrayOleksandr Suvorov
- replace the array with the shift operation - remove the extra comparing operation. Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09ARM64: dts: verdin-imx8mm: Add off-on-delay to usdhc2Philippe Schenker
The hardware of verdin has some bypass caps after the switch that switches power to the sd-card. These caps are resulting in a slow discharge. Add off-on-delay to set a minimum off-time of the regulator so it can fully discharge until it turns on again. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM: dts: imx7-colibri: Fix frequency for eMMCOleksandr Suvorov
eMMC, used in Colibri iMX7D eMMC modules, supports 200Mhz mode with vccq=1.8v. Remove the max-frequency limit, it increases the performance significantly: == before fix ==== root@colibri-imx7-emmc:~# hdparm -t /dev/mmcblk1 /dev/mmcblk1: Timing buffered disk reads: `^H252 MB in 3.02 seconds = 83.54 MB/sec ================== === after fix ==== root@colibri-imx7-emmc:~# hdparm -t /dev/mmcblk0 /dev/mmcblk0: Timing buffered disk reads: 408 MB in 3.00 seconds = 135.94 MB/sec ================== Related-to: ELB-1442 Fixes: f928a4a377e4 ("ARM: dts: imx7: add Toradex Colibri iMX7D 1GB (eMMC) support") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09ARM64: dts: apalis-imx8qm: V1.0 devicetree inherit from V1.1 dtsPhilippe Schenker
This commit basically deletes the devicetree for V1.0 Apalis iMX8 modules. It includes V1.1 devicetree then and only puts in the differences and deletes the nodes that are not used in V1.0. This is done to prevent code duplication and have better overview of what has changed. Related-to: ELB-1254 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM64: dts: apalis-imx8qm: add new v1.1-eval.dtsPhilippe Schenker
Related-to: ELB-1254 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM64: dts: apalis-imx8qm: changes to v1.1 modulePhilippe Schenker
Related-to: ELB-1254 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM64: dts: apalis-imx8qm: copy v1.0 devicetree to v1.1Philippe Schenker
This commit does no code changes it just copies fsl-imx8qm-apalis.dtsi to fsl-imx8qm-apalis-v1.1.dtsi. This is done to be able to track changes made between those versions. Related-to: ELB-1254 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-03-09ARM: dts: imx6q-apalis: Fix pin nameOleksandr Suvorov
The interface of Apalis modules is MXM3, not SODIMM. Just fix the name of the reset touch pin. Fixes: 96458caa3562 ("ARM: dts: imx6: Add touchscreens used on Toradex eval boards") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-03-09spi: imx: Use dynamic bursts only when bits_per_word is 8, 16 or 32Maxime Chevallier
commit 2801b2f5fad3d1e9ea0ac8484584051071065645 upstream The dynamic bursts mode allows to group together multiple words into a single burst. To do so, it's necessary that words can be packed into the 32-bits FIFO entries, so we can't allow using this mode with bit_per_words different to 8, 16 or 32. This prevents shitfing out extra clock ticks for transfers with bit_per_word values not aligned on 8 bits. With that , we are sure that only the correct number of bits is shifted out at each transfer, so we don't need to mask out the remaining parts of the words. Related-to: ELB-1418 Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-09Merge remote-tracking branch 'fslc/4.14-2.3.x-imx' into toradex_4.14-2.3.x-imxMarcel Ziswiler
Conflicts: arch/arm64/boot/dts/freescale/Makefile arch/arm64/boot/dts/freescale/fsl-imx8qm-device.dtsi
2020-03-08Merge pull request #61 from toradex/4.14-2.3.x-imxOtavio Salvador
4.14 2.3.x imx: net: sch_generic compilation fix, rel_imx_4.14.98_2.3.1_patch and v4.14.170 stable
2020-03-08Merge tag 'v4.14.170' into 4.14-2.3.x-imxMarcel Ziswiler
This is the 4.14.170 stable release Conflicts: drivers/net/phy/phy_device.c drivers/tty/serial/imx.c include/linux/platform_data/dma-imx-sdma.h net/wireless/util.c
2020-03-08Merge tag 'rel_imx_4.14.98_2.3.1_patch' into 4.14-2.3.x-imxMarcel Ziswiler
2020-03-08net: sch_generic: fix compilingMarcel Ziswiler
This fixes the following error upon compiling: /fslc/4.14-2.3.x-imx/net/sched/sch_generic.c: In function ‘attach_one_default_qdisc’: /fslc/4.14-2.3.x-imx/net/sched/sch_generic.c:771:23: error: ‘ARPHRD_CAN’ undeclared (first use in this function); did you mean ‘ETH_P_CAN’? else if(dev->type == ARPHRD_CAN) ^~~~~~~~~~ ETH_P_CAN /fslc/4.14-2.3.x-imx/net/sched/sch_generic.c:771:23: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [/fslc/4.14-2.3.x-imx/scripts/Makefile.build:326: net/sched/sch_generic.o] Error 1 make[2]: *** [/fslc/4.14-2.3.x-imx/scripts/Makefile.build:585: net/sched] Error 2 make[2]: *** Waiting for unfinished jobs.... Fixes: fb1d29ab844c ("net: sch_generic: Use pfifo_fast as fallback scheduler for CAN hardware") Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-03-06MLK-23396: crypto: caam - ensure CAAM context is not sharing the cachelineIuliana Prodan
In caam_hash_state struct, caam_ctx buffer needs to have a separate cacheline, not sharing it with "update" callback. On imx8, the cacheline size is 64 and the MAX_CTX_LEN, from caam_ctx buffer, is (8 + 64). Therefore, add a ____cacheline_aligned to the update callback, in caam_hash_state struct, to ensure that caam_ctx buffer is not sharing the cacheline. Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com> Reviewed-by: Horia Geantă <horia.geanta@nxp.com>