summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2023-03-29Revert "clk: imx: pll14xx: Add pr_fmt"Max Krummenacher
This reverts commit 90722e5666993df76bb203e0ad60b42cd4111781. This series broke our 10" capacitive LVDS panel. Revert until fixed. Upstream-Status: Inappropriate [revert of backport] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-03-29Revert "clk: imx: pll14xx: Support dynamic rates"Max Krummenacher
This reverts commit e3b41fa9c03182c51c93f54dfd2f31c87aec8a49. This series broke our 10" capacitive LVDS panel. Revert until fixed. Upstream-Status: Inappropriate [revert of backport] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-03-29Revert "drm/imx: imx8mp-ldb: fix check on LDB valid clock"Max Krummenacher
This reverts commit fd34ae5146f2df6d4f9f2a0046b697ff6b5a267e. This series broke our 10" capacitive LVDS panel. Revert until fixed. Upstream-Status: Inappropriate [revert of backport] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-03-23drm/bridge: lt8912b: return EPROBE_DEFER if bridge is not foundMatheus Castello
Returns EPROBE_DEFER when of_drm_find_bridge() fails, this is consistent with what all the other DRM bridge drivers are doing and this is required since the bridge might not be there when the driver is probed and this should not be a fatal failure. Cc: <stable@vger.kernel.org> Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Upstream-Status: Submitted [https://lore.kernel.org/all/20230322143821.109744-1-francesco@dolcini.it/] Signed-off-by: Matheus Castello <matheus.castello@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230322143821.109744-1-francesco@dolcini.it
2023-03-22PCI: imx6: Fix PERST# start-up sequenceFrancesco Dolcini
According to the PCIe standard the PERST# signal (reset-gpio in fsl,imx* compatible dts) should be kept asserted for at least 100 usec before the PCIe refclock is stable, should be kept asserted for at least 100 msec after the power rails are stable and the host should wait at least 100 msec after it is de-asserted before accessing the configuration space of any attached device. From PCIe CEM r2.0, sec 2.6.2 T-PVPERL: Power stable to PERST# inactive - 100 msec T-PERST-CLK: REFCLK stable before PERST# inactive - 100 usec. From PCIe r5.0, sec 6.6.1 With a Downstream Port that does not support Link speeds greater than 5.0 GT/s, software must wait a minimum of 100 ms before sending a Configuration Request to the device immediately below that Port. Failure to do so could prevent PCIe devices to be working correctly, and this was experienced with real devices. Move reset assert to imx6_pcie_assert_core_reset(), this way we ensure that PERST# is asserted before enabling any clock, move de-assert to the end of imx6_pcie_deassert_core_reset() after the clock is enabled and deemed stable and add a new delay of 100 msec just afterward. Link: https://lore.kernel.org/all/20220211152550.286821-1-francesco.dolcini@toradex.com Link: https://lore.kernel.org/r/20220404081509.94356-1-francesco.dolcini@toradex.com Fixes: bb38919ec56e ("PCI: imx6: Add support for i.MX6 PCIe controller") Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Richard Zhu <hongxing.zhu@nxp.com> Upstream-Status: Backport - This patch is already backported to stable linux 5.15.y but was overwritten by NXP patches. Do backport it again from upstream commit a6809941c1f17f455db2cf4ca19c6d8c8746ec25 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2023-03-21drm/imx: imx8mp-ldb: fix check on LDB valid clockRafael Beims
Remove wrong mode-fixup on the LDB driver that limited the pixel clocks to 74.25MHz in single channel mode and 148.5MHz in dual channel mode. According to the iMX8MP Reference manual, the LDB peripheral supports: " - Single channel (4 lanes) output at up to 80MHz pixel clock and LVDS clock. This supports resolutions up to 1366x768p60. - Dual asynchronous channels (8 data, 2 clocks). This is intended for a single panel with two interfaces, transferring across two channels (even pixel/odd pixel). This is supported at up to 160MHz pixel clock, which is up to 80MHz LVDS clock (due to 2 pixels per LVDS clock). This supports resolutions above 1366x768p60, up to 1080p60. " We contacted NXP trying to find the real reason for this seemingly random limitation, but we didn't get any response. The forced pixel clock values were removed and now it's possible to drive LVDS displays that have pixel clock requirements out of the previously limited range, but that are still within the hardware limitations. A check was added to ensure that clocks out of range are denied. With this change, it is now possible to use this display: - LVDS display (CMT1210A07R00 800x600 - 40MHz pixel clock) Also, the Toradex 10" Capacitive touch display (68.93MHz pixel clock) continues to work. Upstream-Status: Pending The file where this change was applied doesn't exist upstream. Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: Support dynamic ratesSascha Hauer
The pll1443x PLL so far only supports rates from a rate table passed during initialization. Calculating PLL settings dynamically helps audio applications to get their desired rates, so support for this is added in this patch. The strategy to get to the PLL setting for a rate is: - First try to only adjust kdiv which specifies the fractional part of the PLL. This setting can be changed without glitches on the output and is therefore preferred - When that isn't possible then the rate table is searched for suitable rates, so for standard rates the same settings are used as without this patch - As a last resort the best settings are calculated dynamically The code in this patch is based on patches from Adrian Alonso <adrian.alonso@nxp.com> and Mads Bligaard Nielsen <bli@bang-olufsen.dk> Upstream-Status: Backport [b09c68dc57c9d44071d83bb935b733f53ea2b2b4] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-9-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: Add pr_fmtSascha Hauer
Print all messages from within the pll14xx driver with a common prefix using pr_fmt. No need to print function names anymore, so drop them from the messages. Upstream-Status: Backport [80cbc80612a01461a257f2c2eb9976cbadfb7be2] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-8-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: explicitly return lowest rateSascha Hauer
clk_pll14xx_round_rate() returns the lowest rate by indexing into the rate table with the variable i. i is actually pll->rate_count as this is the value we come out of the loop with. Use pll->rate_count explicitly to make it a bit more clear what is being done. While at it fix a typo in the comment. No functional change. Upstream-Status: Backport [5ff50031cb8852bfcf587d003ba6bad3c2336852] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-7-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: name variables after usageSascha Hauer
In clk_pll1443x_set_rate() 'tmp' is used for the content of different registers which makes it a bit hard to follow. Use different variables named after the registers to make it clearer. No functional change intended. Upstream-Status: Backport [052d03a043afebb8e26ec17de52e8cdc8b217ef9] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-6-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: consolidate rate calculationSascha Hauer
The PLL driver has support for two different PLLs: The pll1416x and the pll1443x. The latter has support for an additional kdiv value. recalc_rate can be the same calculation when kdiv is assumed to be zero for the PLL which doesn't support that value. Upstream-Status: Backport [53990cf9d5b489fc0ec08e5c4df7139fc311a824] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-5-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> [Rafael: fixed conflicts in the clk_pll1443x_recalc_rate function caused by some additions on the downstream branch in commit 9425151a59a4. The changes in the downstream branch implement the same functionality of this commit but without the other improvements in the patch series. Additionally, the change in the downstream branch adds a function to change the "k" value of the PLL which gets exposed through sysfs. This function was also fixed to be compatible with the changes in the patch series.] Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: Use FIELD_GET/FIELD_PREPSascha Hauer
Linux has these marvelous FIELD_GET/FIELD_PREP macros for easy access to bitfields in registers. Use them and remove the now unused *_SHIFT defines. Upstream-Status: Backport [58f4980ccbecf633df1fcb113e2a9f04842eccc6] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-4-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: Drop wrong shiftingSascha Hauer
The code tries to mask the bits in SDIV_MASK from 'tmp'. SDIV_MASK already contains the shifted value, so shifting it again is wrong. No functional change though as SDIV_SHIFT is zero. Upstream-Status: Backport [d77461a616b659bd88dc153e3a86dba5bf78aa8a] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-3-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-21clk: imx: pll14xx: Use register defines consistentlySascha Hauer
The driver has defines for the registers, but they are mostly unused. Use the defines consistently throughout the driver. While at it rename DIV_CTL to DIV_CTL0 because that's the name in the reference manual. Upstream-Status: Backport [485b4ff57c2777c15bfe2e6e6a204200b040e131] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Link: https://lore.kernel.org/r/20220304125256.2125023-2-s.hauer@pengutronix.de Signed-off-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
2023-03-17usb: misc: usb3503: support usb3803 and bypass modeEmanuele Ghidoli
Add support for USB3803 and bypass mode, with this change is also possible to move the component out of bypass mode. In bypass mode the downstream port 3 is connected to the upstream port with low switch resistance R_on. Controlling mode of operations: | RESET_N | BYPASS_N | Mode | -------------------------------- | 0 | 0 | standby | | 1 | 0 | bypass | | 1 | 1 | hub | Upstream-Status: Submitted [https://lore.kernel.org/all/20230313165039.255579-1-francesco@dolcini.it/] Datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/00001691D.pdf Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20230313165039.255579-4-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [fdolcini: backport: fixed error path on IS_ERR(hub->bypass)] Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-03-17usb: misc: usb3503: refactor code to prepare for usb3803 additionEmanuele Ghidoli
Refactor code to simplify adding support for USB3803 and bypass mode. Remove static usb3503_reset() and move it to usb3503_switch_mode(), with the addition of the bypass mode we need to drive the various control signals to the expected configuration, not just to assert/release the reset. In addition to that the usb3503_connect() needs to be called only for HUB mode. No functional changes expected nor intended because of this change. Upstream-Status: Submitted [https://lore.kernel.org/all/20230313165039.255579-1-francesco@dolcini.it/] Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20230313165039.255579-3-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-16gpio: fxl6408: add I2C GPIO expander driverEmanuele Ghidoli
Add minimal driver for Fairchild FXL6408 8-bit I2C-controlled GPIO expander using the generic regmap based GPIO driver (GPIO_REGMAP). The driver implements setting the GPIO direction, reading inputs and writing outputs. In addition to that the FXL6408 has the following functionalities: - allows to monitor input ports for data transitions with an interrupt pin - all inputs can be configured with pull-up or pull-down resistors Upstream-Status: Submitted [https://lore.kernel.org/all/20230313170950.256964-1-francesco@dolcini.it/] Datasheet: https://www.onsemi.com/download/data-sheet/pdf/fxl6408-d.pdf Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Co-developed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> [Bartosz: order includes alphabetically] Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-02-17Bluetooth: hci_mrvl: Add serdev support for 88W8997Stefan Eichenberger
Add serdev support for the 88W8997 from NXP (previously Marvell). It includes support for changing the baud rate. The command to change the baud rate is taken from the user manual UM11483 Rev. 9 in section 7 (Bring-up of Bluetooth interfaces) from NXP. Upstream-Status: Submitted [https://lore.kernel.org/linux-bluetooth/20230213120926.8166-1-francesco@dolcini.it/] Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-02-17Bluetooth: hci_mrvl: use maybe_unused macro for device tree idsStefan Eichenberger
Use the maybe_unused macro for the device tree ids instead of #ifdef CONFIG_OF. This makes it easier to add support for new devices. Upstream-Status: Submitted [https://lore.kernel.org/linux-bluetooth/20230213120926.8166-1-francesco@dolcini.it/] Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2023-02-15rtc: allow rtc_read_alarm without read_alarm callbackAlexandre Belloni
.read_alarm is not necessary to read the current alarm because it is recorded in the aie_timer and so rtc_read_alarm() will never call rtc_read_alarm_internal() which is the only function calling the callback. Upstream-Status: Submitted [https://lore.kernel.org/all/20230214222754.582582-1-alexandre.belloni@bootlin.com/] Reported-by: Zhipeng Wang <zhipeng.wang_1@nxp.com> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Fixes: 7ae41220ef58 ("rtc: introduce features bitfield") Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2023-01-28drm/imx: lcdif: crtc increase pixel clock tolerance to 10%Stefan Eichenberger
Set a pixel clock tolerance of 10% for the DSI interface of the i.MX 8MM SoCs. There are some resolutions e.g. 1280x1024@60 Hz that do not work without this commit. Upstream-Status: Pending This driver is not upstream and probably never will. It looks like the function will become part of mxsfb. They don't verify the pixel clock frequency there. Related-to: ELB-4728 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
2023-01-28drm/imx: lcdifv3: crtc increase pixel clock tolerance to 10%Stefan Eichenberger
Set a pixel clock tolerance of 10% for the DSI interface of the i.MX 8MP SoCs. There are some resolutions e.g. 1280x1024@60 Hz that do not work without this commit. Upstream-Status: Pending This driver is not upstream and probably never will. It looks like the function will become part of mxsfb. They don't verify the pixel clock frequency there. Related-to: ELB-4728 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
2023-01-28drm/imx: dw_hdmi-imx: increase pixel clock tolerance to 10%Stefan Eichenberger
Set a pixel clock tolerance of 10% for the native HDMI interface of the i.MX 8MP SoCs. There are some resolutions e.g. 1280x1024@60 Hz that do not work without this commit. Upstream-Status: Pending The dw_hdmi-imx.c file is available upstream but they do not verify the pixel clock frequency. Adding this check would harm more than it solves. Related-to: ELB-4728 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
2022-12-21drm: imx8: fix hdmi firmware loadStefan Eichenberger
Loading the hdmi firmware from kernel is broken. The firmware is loaded from filesystem but never sent to the hdmi controller. This commit fixes it by waiting for the firmware load to complete and afterwards transfer it to the controller. Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Upstream-Status: Pending Downstream specific, i.MX 8 HDMI subsystem not yet in upstream. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-12-07imx8mp: native hdmi: allow pixelclocks being slightly offMax Krummenacher
The HDMI PHY driver currently can only generate a discrete set of pixelclock frequencies. Any mode read from a monitor's EDID with a non matching frequency is rejected. Change that to find the closest possible frequency and accept the mode if it deviates less than 6%. 6% is chosen as with that any pixelclock in the range of 22.25Mhz - 297MHz should be accepted. Related-to: ELB-4015 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit c6944a48583f6dc2d698df387fd648075491bf81) Upstream-Status: Inappropriate [Downstream specific, i.MX 8M Plus HDMI subsystem not yet ready] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-12-07tty: serial: fsl_lpuart: set rxiden in non dma caseMax Krummenacher
In the case of not using edma set the RXIDEN field. This sets the RDRF flag even if there are received characters in the FIFO and the receiver has been idle for the specified number of characters. Related-to: ELB-3517 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 35a34002c3c946195d72a12aa7cae91a21cdfb0a) Upstream-Status: Inappropriate [Downstream specific, it requires additional patches on fsl_lpuart not available in upstream] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-12-07tty: serial: lpuart: Disable transmitter on setting modem registerPhilippe Schenker
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Conflicts: drivers/tty/serial/fsl_lpuart.c Upstream-Status: Inappropriate [Downstream specific, it requires additional patches on fsl_lpuart not available in upstream] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-12-07tty: serial: lpuart: Make sure watermark stuff doesn't touch rs485Philippe Schenker
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit e35977dc853918aa9ff58a54df1073eb20160c57) Upstream-Status: Inappropriate [Downstream specific, it requires additional patches on fsl_lpuart not available in upstream] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-12-07Input: colibri-vf50-ts - don't depend on VF610_ADCMax Krummenacher
Any IIO ADC can be used with the driver, so do not depend on VF610_ADC. Upstream-Status: Backport [8a32cff217b7a0f1ab3b744fc9cd0626f08f7f15] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20220712101619.326120-2-francesco.dolcini@toradex.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-12-06i2c: imx: Remove unnecessary clock reconfigurationAlexander Stein
The I2C clock is already reconfigured within the clock notifier. This also fixes an ABBA locking deadlock if some other I2C device reconfigures clocks it provides, e.g. tlv320aic32x4 during probe. Fixes: 4f7ad5de1107 ("MLK-20368 i2c-imx: Coverity: fix divide by zero warning") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
2022-12-06Revert "serial: fsl_lpuart: Reset prior to registration"Max Krummenacher
This reverts commit 4199425b11325e893661d03f92330dd1adae03b0. The lpuart_global_reset() uses fields set by the registration to find out if we are a console or not. Executing it before registration may make it fail. E.g. on a imx8qm-mek the kernel stops booting without any visable output when the switch to a console is done. [ 1.219604] mxs-dma 5b810000.dma-apbh: initialized [ 1.228743] Bus freq driver module loaded [ 1.241522] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 1.252161] 5a060000.serial: ttyLP0 at MMIO 0x5a060010 (irq = 69, base_baud = 5000000) is a FSL_LPUAR[ 1.261335] printk: console [ttyLP0] enabled [ 1.261335] printk: console [ttyLP0] enabled [ 1.269756] printk: bootconsole [lpuart32] disabled [ 1.269756] printk: bootconsole [lpuart32] disabled While at it also remove the second call to uart_add_one_port() which sneaked in during merging of stable patches. Also, since we now reset after uart_add_one_port() call sport->port.rs485_config() explicitely again. The reset may have reverted the effects of the uart_add_one_port -> sport->port.rs485_config call chain. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-11-30drm/bridge: lt8912b: Add hot plug detectionStefan Eichenberger
Enable hot plug detection when it is available on the HDMI port. Without this connecting to a different monitor with incompatible timing before the 10 seconds poll period will lead to a broken display output. Upstream-Status: Submitted [https://lore.kernel.org/all/20221128112320.25708-1-francesco@dolcini.it/] Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
2022-11-16mmc: sdhci-esdhc-imx: use the correct host caps for MMC_CAP_8_BIT_DATAHaibo Chen
commit f002f45a00ee14214d96b18b9a555fe2c56afb20 upstream. MMC_CAP_8_BIT_DATA belongs to struct mmc_host, not struct sdhci_host. So correct it here. Upstream-Status: Backport [from 5.15.79, commit 29100c674208] Fixes: 1ed5c3b22fc7 ("mmc: sdhci-esdhc-imx: Propagate ESDHC_FLAG_HS400* only on 8bit bus") Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Cc: stable@vger.kernel.org Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/1667893503-20583-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-11-15usb: dwc3: imx8mp: Add support for setting SOC specific flagsAlexander Stein
The i.MX8MP glue layer has support for the following flags: * over-current polarity * PWR pad polarity * controlling PPC flag in HCCPARAMS register * permanent port attach for usb2 & usb3 port Allow setting these flags by supporting specific flags in the glue node. In order to get this to work an additional IORESOURCE_MEM and clock is necessary. For backward compatibility this is purely optional. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20220218152707.2198357-4-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Upstream-Status: Backport [9d52107185b646d449b682e10e95e6b3037b79cf]
2022-11-15usb: dwc3: imx8mp: rename iomem base pointerAlexander Stein
Until now the iomem used is not USB glue as the name suggests, but HSIO BLK_CTL. Rename the struct member accordingly. This is a preparing patch for when USB glue is actually used. Reviewed-by: Li Jun <jun.li@nxp.com> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20220218152707.2198357-2-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Upstream-Status: Backport [81915384b5d127c67bfb4d19a62ec193e12eaaef]
2022-11-15usb: dwc3: drd: Add support for usb-conn-gpio based usb-role-switchAlexander Stein
usb-conn-gpio devices are a subnode of the USB interface controller, which needs to be populated. This allows having a non-type-c connector providing dual-role. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20220105071407.2240302-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Upstream-Status: Backport [a102f07e4edf0f1cf06bf9825ab10e26a29dd945]
2022-11-15Revert "drm/panel-simple: drop use of data-mapping property"Max Krummenacher
This reverts commit d021d751c14752a0266865700f6f212fab40a18c. Re-enable the data-mapping property which was already used in the 5.4-2.3.0 downstream kernel. In addition to the revert set bpc from the data-mapping value as a WARN_ON is printed if missing. Additionally fix mapping variable used uninitialized. If a panel-dpi node does not have the data-mapping property defined an uninitalized pointer is used with strcmp resulting in a kernel crash during boot. (backtrace from upstream 6.0 kernel) [ 6.509726] 8<--- cut here --- [ 6.513351] Unable to handle kernel NULL pointer dereference at virtual address 00000013 [ 6.522189] [00000013] *pgd=00000000 [ 6.526111] Internal error: Oops: 5 [#1] SMP ARM [ 6.530833] Modules linked in: [ 6.533983] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.0.0-6.0.0-devel+git.4fe89d07dcc2 #1 [ 6.542483] Hardware name: Freescale i.MX6 Ultralite (Device Tree) [ 6.548768] PC is at strcmp+0x0/0x34 [ 6.552449] LR is at panel_dpi_probe+0xc4/0x1f0 [ 6.557092] pc : [<c0640e50>] lr : [<c0760dc4>] psr: 60000013 [ 6.563470] sp : f083dcc0 ip : 00000001 fp : c15004d0 [ 6.568791] r10: 00000000 r9 : ef7f4d08 r8 : c2178000 [ 6.574115] r7 : c230b740 r6 : c256d100 r5 : 00000013 r4 : c256b4c0 [ 6.580757] r3 : 00000000 r2 : c2178000 r1 : c12bd7f0 r0 : 00000013 [ 6.587399] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 6.594659] Control: 10c5387d Table: 8000406a DAC: 00000051 [ 6.600507] Register r0 information: non-paged memory [ 6.605676] Register r1 information: non-slab/vmalloc memory [ 6.611457] Register r2 information: slab task_struct start c2178000 pointer offset 0 [ 6.619488] Register r3 information: NULL pointer [ 6.624296] Register r4 information: slab kmalloc-128 start c256b480 pointer offset 64 size 128 [ 6.633208] Register r5 information: non-paged memory [ 6.638367] Register r6 information: slab kmalloc-192 start c256d0c0 pointer offset 64 size 192 [ 6.647278] Register r7 information: slab kmalloc-256 start c230b700 pointer offset 64 size 256 [ 6.656191] Register r8 information: slab task_struct start c2178000 pointer offset 0 [ 6.664207] Register r9 information: non-slab/vmalloc memory [ 6.669981] Register r10 information: NULL pointer [ 6.674876] Register r11 information: non-slab/vmalloc memory [ 6.680738] Register r12 information: non-paged memory [ 6.685987] Process swapper/0 (pid: 1, stack limit = 0xaf192ddd) [ 6.692202] Stack: (0xf083dcc0 to 0xf083e000) [ 6.696672] dcc0: 00000000 c0e2f724 00000000 c12b606c 00000013 c0a01820 f083dd08 00000001 [ 6.705001] dce0: 00000000 c2178000 c17eea20 c0a06930 c230b7f4 c2178000 00000000 9fb7a78a [ 6.713328] dd00: c230b740 c2112810 c1e74008 c2178000 00000000 c13c9e68 c1802000 c076116c [ 6.721654] dd20: c21787a0 9fb7a78a c2178000 c2178000 c156455c f083dd50 2e266000 c1799dd4 [ 6.729980] dd40: 00000000 60000093 00000000 c018a198 00000001 00000080 00000000 00000001 [ 6.738303] dd60: c21787c0 c0e236f8 c2178000 c21787c0 00000001 c0181cac c2178000 c1799dd4 [ 6.746629] dd80: c2178000 c156455c c0e2f724 c17de9e0 a0000013 c0186f08 c0a0167c 00000001 [ 6.754952] dda0: 00000001 c2178000 c156a29c c021e0e8 a0000013 c1799dc4 a0000013 c1799dc4 [ 6.763277] ddc0: c0f7e79c c0e2f724 c0f7e860 9fb7a78a c0f7e79c 00000000 c2112810 c1766a80 [ 6.771602] dde0: 00000000 c17eea20 c13c9e68 c1802000 c15004d0 c079113c 00000000 c2112810 [ 6.779927] de00: c1766a80 00000000 c17eea20 c078e168 c21129bc c079e2c0 c2112810 c1766a80 [ 6.788250] de20: c2112810 00000000 c256b358 c078e534 c0f7e79c 9fb7a78a c0f7e860 c1e76200 [ 6.796577] de40: c2112810 c2112810 00000000 c256b358 c13c9e68 c078e6d4 c2112854 c2112810 [ 6.804900] de60: c1766a80 c2178000 c256b358 c078eedc 00000000 c1766a80 c078ee30 c2178000 [ 6.813226] de80: c256b358 c078c094 c20a98e4 c20a98b0 c2242054 9fb7a78a c20a98e4 c1766a80 [ 6.821550] dea0: c256b300 00000000 c1767dd8 c078d50c c12be0c8 c0e2f660 00000000 c1766a80 [ 6.829875] dec0: 00000000 c17ddb00 c1608fcc 00000000 c13c9e68 c078fe98 c2178000 c1532458 [ 6.838198] dee0: c17ddb00 c1532468 c2178000 c01022a4 c21f6067 c21f605a c21f6059 c014be00 [ 6.846523] df00: c2001300 c21f6000 00000129 c12f2658 c15004d0 00000000 c2178000 00000006 [ 6.854846] df20: 00000006 00000000 c2178000 c17ddb00 c1608fcc c1549870 c1549854 9fb7a78a [ 6.863171] df40: c15638d4 00000007 c21f6000 c1549874 c1549854 c13c9e68 c1802000 c1501328 [ 6.871494] df60: 00000006 00000006 00000000 c15004d0 00000000 00000129 00000000 c1608f80 [ 6.879820] df80: c0e24474 00000000 00000000 00000000 00000000 00000000 00000000 c0e24488 [ 6.888142] dfa0: 00000000 c0e24474 00000000 c0100128 00000000 00000000 00000000 00000000 [ 6.896465] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 6.904788] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [ 6.913110] strcmp from panel_dpi_probe+0xc4/0x1f0 [ 6.918132] panel_dpi_probe from panel_simple_probe+0x27c/0x604 [ 6.924279] panel_simple_probe from platform_probe+0x58/0xbc [ 6.930162] platform_probe from really_probe+0xd8/0x410 Upstream-Status: denied [Alternative solution being discused] https://lore.kernel.org/all/20220628181838.2031-1-max.oss.09@gmail.com/ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-11-15media: mxc mipi csi: fix device tree node order dependencyMarcel Ziswiler
Explicitly get endpoint 1 being the sensor one as using overlays may reverse node order in the final device tree blob. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Conflicts: drivers/media/platform/mxc/capture/mxc_mipi_csi.c Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (cherry picked from commit ad9b05bd70583805170e27ba98015502fe5517e0) Upstream-Status: Inappropriate [NXP downstream camera stack]
2022-11-15mwifiex: Add SD8997 SDIO-UART firmwareAndrejs Cainikovs
With a recent change now it is possible to detect the strapping option on SD8997, which allows to pick up a correct firmware for either SDIO-SDIO or SDIO-UART. This commit enables SDIO-UART firmware on SD8997. Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220422090313.125857-3-andrejs.cainikovs@toradex.com Upstream-Status: Backport [562354ab9f0aa4fcd8f2184506dcb9c18a792182]
2022-11-15mwifiex: Select firmware based on strappingAndrejs Cainikovs
Some WiFi/Bluetooth modules might have different host connection options, allowing to either use SDIO for both WiFi and Bluetooth, or SDIO for WiFi and UART for Bluetooth. It is possible to detect whether a module has SDIO-SDIO or SDIO-UART connection by reading its host strap register. This change introduces a way to automatically select appropriate firmware depending of the connection method, and removes a need of symlinking or overwriting the original firmware file with a required one. Host strap register used in this commit comes from the NXP driver [1] hosted at Code Aurora. [1] https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/net/wireless/nxp/mxm_wifiex/wlan_src/mlinux/moal_sdio_mmc.c?h=rel_imx_5.4.70_2.3.2&id=688b67b2c7220b01521ffe560da7eee33042c7bd#n1274 Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220422090313.125857-2-andrejs.cainikovs@toradex.com Upstream-Status: Backport [255ca28a659d3cfb069f73c7644853ed93aecdb0]
2022-11-15drm/bridge: lt8912b: clarify lvds output statusFrancesco Dolcini
Add comments on the lt8912_write_lvds_config() config to document the current settings and to make it clear that this is a hardcoded configuration not relevant for the HDMI output (could be removed without affecting the HDMI port). No changes on the actual register writes. Upstream-Status: Backport [fc44f3636a4db6544fd1532280e8adcd1ef13ba2] Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2022-11-15drm/panel: panel-simple: set bpc for logictechno lt161010 and lt170410Max Krummenacher
Set bits per component (BPC) for LOGIC Technologies, Inc LT161010 and LT170410 to avoid the following warning: [ 1.780308] panel-simple panel-lvds: supply power not found, using dummy regulator [ 1.793608] ------------[ cut here ]------------ [ 1.803632] WARNING: CPU: 1 PID: 8 at drivers/gpu/drm/panel/ panel-simple.c:748 panel_simple_probe+0x2e4/0x4d0 Upstream-Status: Submitted [https://lore.kernel.org/all/20220831141622.39605-1-francesco.dolcini@toradex.com/] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-11-15sec_mipi_dsim-imx: properly clean up if probe failsPhilippe Schenker
It is possible that component_add() does return -EPROBE_DEFER if something else is not ready. At that stage of the probe sec_dsim_of_parse_resets() has already been called so the resets need to be cleaned up to leave it in a clean state for the next try. Upstream-Status: Pending [downstream graphics stack] Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2022-11-14drivers/soc/imx/gpcv2.c: complete patch revertMax Krummenacher
The revert resolution of commit c0ce75395f8d ("soc: imx: gpcv2: allow domains without power-sequence control") left a unused error label: | drivers/soc/imx/gpcv2.c: In function ‘imx_pgc_domain_probe’: | drivers/soc/imx/gpcv2.c:519:1: warning: label ‘out_genpd_remove’ defined but not used [-Wunused-label] | 519 | out_genpd_remove: | | ^~~~~~~~~~~~~~~~ Looks like we can savely remove this, but should return 'ret', rather than '0' to report a possible error. Fixes: c706fb45b357 ("Revert "soc: imx: gpcv2: allow domains without power-sequence control"") Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-11-08Merge tag 'v5.15.77' into 5.15-2.1.x-imxDaiane Angolini
This is the 5.15.77 stable release Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
2022-11-08Merge tag 'v5.15.76' into 5.15-2.1.x-imxDaiane Angolini
This is the 5.15.76 stable release Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
2022-11-08Merge tag 'v5.15.75' into 5.15-2.1.x-imxDaiane Angolini
This is the 5.15.75 stable release Conflicts: arch/arm/boot/dts/imx6dl.dtsi arch/arm/boot/dts/imx6q.dtsi arch/arm/boot/dts/imx6sl.dtsi arch/arm/boot/dts/imx6sll.dtsi arch/arm/boot/dts/imx6sx.dtsi arch/arm/boot/dts/imx7d-sdb.dts drivers/char/hw_random/imx-rngc.c drivers/dma/mxs-dma.c drivers/gpu/drm/bridge/adv7511/adv7511_drv.c drivers/tty/serial/fsl_lpuart.c drivers/usb/host/xhci.h Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
2022-11-08Merge tag 'v5.15.74' into 5.15-2.1.x-imxDaiane Angolini
This is the 5.15.74 stable release Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
2022-11-08Merge tag 'v5.15.73' into 5.15-2.1.x-imxDaiane Angolini
This is the 5.15.73 stable release Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
2022-11-08Merge tag 'v5.15.72' into 5.15-2.1.x-imxDaiane Angolini
This is the 5.15.72 stable release Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>