- Apr 17, 2019
-
-
Clark Wang authored
For some chips may need long time to get the response from M4 sometimes, enlarge timeout to 500ms. Add a judgement to check if the received data is the current transfer wanted. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit 222e201b)
-
Clark Wang authored
I2c_lock_bus function in i2c-core-base will not stop the transfer to different devices on different buses at the same time. Since the multiple rpmsg i2c buses share one rpmsg channel, so it has to add mutex to protect rpmsg resource accessing. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit d592afe9)
-
Peng Fan authored
The alias ID must be defined in device tree, because that will be used as BUS ID to Cortex M4. If the alias ID not defined, linux kernel will automatically allocate one ID which might not be the same number used in Cortex M4 and Cortex M4 will not send msg to I2C controller. So let's add BUG_ON to catch issue as earlier as possible to avoid wasting efforts. Signed-off-by:
Peng Fan <peng.fan@nxp.com> Reviewed-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit b9ff2035)
-
Clark Wang authored
Add virtual i2c driver to send SRTM i2c messages to M4. Each virtual I2C bus has a specal bus id, which is abstracted by M4. Each SRTM message include a bus id for the bus which the device is on. Virtual i2c rpmsg bus will bind rpbus nodes with compatible string "fsl,i2c-rpbus". And "rpmsg-i2c-channel" will probe only one rpmsg channel for all rpbuses. This virtual i2c driver depends on CONFIG_I2C and CONFIG_RPMSG. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit 9feeac93)
-
Liu Ying authored
It is only used in this file, so staticize it. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit e293f867)
-
Liu Ying authored
Unstable/low quality input video signal is likely to cause the transmitter to fail to wait for input video stable, and thus, no HDMI/DVI video output. It turns out resetting LVDS part logics may help prevent the issue from happening. Cc: Sandor Yu <Sandor.yu@nxp.com> Cc: Jason Liu <jason.hui.liu@nxp.com> Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 5d09098e)
-
Liu Ying authored
The it6263 bridge contains two I2C devices on the same I2C bus to control HDMI and LVDS modules respectively. However, they have different I2C addresses. Thus, one of the two devices should be registered as dummy device and bound with dummy driver. This is what the helper i2c_new_dummy() is designed for. The HDMI I2C device is normally registered as a real I2C device and bound with a real driver, so the LVDS I2C device should be dummy. This patch fixes the issue to access the LVDS I2C device's sys nodes, like /sys/kernel/debug/regmap/2-0033/name. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit f6b31315)
-
Liu Ying authored
It turns out the following display modes are not well supported by the bridge - 1600x900@60, 1280x1024@60, 1280x720@30/25/24 and 1152x864@75. Fortunately, they are not that widely used. So, list them as the known bad display modes and filter them out in ->mode_valid(). Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit c44ed03cf3b85d7f5bc8325ffeec9fd07f66aa87) (cherry picked from commit 20e29dd9)
-
Leonard Crestez authored
There are some issues with the HDMI connection on it6263 being slow to come up. There is a hack there which reads the register multiple times but it doesn't seem to be sufficient. This is particularly a problem when inside a xen guest. Improve this workaround by reading the status multiple times every few 5-10ms and returning connector_status_connected if any of those reads sees HPDETECT. Signed-off-by:
Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by:
Peng Fan <peng.fan@nxp.com> (cherry picked from commit 699ccad2)
-
Robert Chiras authored
When CONFIG_OF_DYNAMIC is used, and this driver is enabled in devicetree, but fails to probe a physical i2c client, it should disable it's remote endpoint, so that the DRM master device won't fail to bind the other available devices. Usually, the remote endpoint of this device is a DRM encoder. If a DRM encoder fails to bind, the DRM master device will also fail to bind. This is why, we should disable the encoder node dynamically in devicetree. Signed-off-by:
Robert Chiras <robert.chiras@nxp.com> Reviewed-by:
Laurentiu Palcu <laurentiu.palcu@nxp.com> (cherry picked from commit de618474)
-
Oliver Brown authored
This addresses a problem with colors that are sometimes incorrect after startup. Now the AVI packet is initialized with RGB color space rather than relying on the default. Signed-off-by:
Oliver Brown <oliver.brown@nxp.com> (cherry picked from commit c1f73434)
-
Liu Ying authored
We call the helper drm_detect_hdmi_monitor() to check if the EDID blob read from a monitor indicates the monitor is connected via HDMI or not. We pass an edid structure to the helper. However, the structure has been freed before we use it. This patch moves the helper up before the structure is freed to fix the issue. Fixes: a5c01aa91842 ("MLK-15001-25 drm/bridge: Add ITE IT6263 LVDS to HDMI transmitter support") Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 3522359b)
-
Liu Ying authored
There is cable detection failure issue on i.MX8qxp MEK platform at boot time when we use single LVDS to HDMI display. The workaround is to read the cable detection status for even more times. Based on experiments, it looks reading for 90 times works. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 5ac4dfb7)
-
Liu Ying authored
A low pulse whose width is at least 40ms on pin SYSRSTN may reset the bridge, according to the chip maker. This patch adds gpio reset support for the bridge. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 2e120abc)
-
Liu Ying authored
There is cable detection failure issue on i.MX8qxp arm2 platform at boot time when we avoid imx-drm deferral probe entirely(i2c bus driver probe needs to be before the it6263 driver probe). The workaround is to read the cable detection status multiple times. Based on experiments, it looks reading for 40 times works. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit fb719c95)
-
Liu Ying authored
This patch adds IT6263 video support. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit bf1acefa)
-
Liu Ying authored
s/in pratical/in practice Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 15bcff90)
-
Liu Ying authored
The JDI TX26D202VM0BWA panel works in data enable(DE) mode. Apparently, the panel's data enable signal is active high according to the panel spec. This patch corrects the DE signal polarity from active low to active high. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit ed0230ec)
-
Liu Ying authored
This patch adds support for Japan Display Inc. 10.1" TX26D202VM0BWA WUXGA(1920x1200) TFT LCD panel with LVDS interface. The panel has dual LVDS channels. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 6e097872)
-
Liu Ying authored
When the master imx-drm-core binding fails, component_bind_all() in imx-drm-core ->bind() callback will unbind all bound components first and then call drm_mode_config_cleanup(). Since the encoder and connector(located in imx_ldb.imx_ldb_channel) are freed after the ldb ->unbind() callback, drm_mode_config_cleanup() would accidentally access the freed encoder and connector again. To fix this issue, we should cleanup the encoder and connector, i.e., remove them from the global encoder and connector lists, in the ->unbind() callback, so that, drm_mode_config_cleanup() won't find them again in the lists. However, we have to make sure they exist before the cleanup in the ->unbind() callback, because imx-drm-core ->unbind() calls drm_mode_config_cleanup() first and then unbinds all components via component_unbind_all(). Moreover, the connector isn't created at the first place if a bridge exists, so the check before the cleanup makes sense for this reason as well. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit a39bb207)
-
Liu Ying authored
The return value of sc_misc_set_control() should be checked in ldb_pixel_link_init(), instead of being ignored. This patch fixes this issue. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 7c902e39)
-
Liu Ying authored
Unlike i.MX6qdl and i.MX53 LDB variants, the i.MX8 LDB variants(i.MX8qxp and i.MX8qm) in existence don't have frontend mux, thus, we should split the logic to program the ch0/1_mode for variants w/wo the mux. It turns out LDB_CH0_MODE_EN_TO_DI0 can be used for channel0 in both LDB single mode and LDB split mode for the i.MX8 LDB variants. However, based on test results, for i.MX8qm LDB channel1, LDB_CH1_MODE_EN_TO_DI1 has to be used in single mode, while, i.MX8qxp may work with LDB_CH1_MODE_EN_TO_DI0 or LDB_CH1_MODE_EN_TO_DI1. With LDB_CH1_MODE_EN_TO_DI0, i.MX8qm LDB channel1 would output wrong image in single mode(it looks like color is wrong based on test results). The i.MX8 LDB variants channel1 mode can still be LDB_CH1_MODE_EN_TO_DI0 in split mode(the patch doesn't touch this). In essence, this patch fixes the channel1 single mode for i.MX8qm LDB by correcting the ch1_mode, while all other features should work as before. Note that due to hardware issue, we didn't test the channel1 single mode for i.MX8qm. We need to populate several resistors to enable the connectors driven by channel1 in single mode for either ARM2 platform or MEK board. Tests are done with IT6263 LVDS to HDMI transmitter driven by LDB0 channel1 after r206, r207, r208 and r209 are populated on the i.MX8qm MEK board. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit d9b35ed0)
-
Liu Ying authored
i.MX8dx/dxp/qxp use two LDBs(one primary, one auxiliary) to support dual channel mode. This patch adds the dual channel mode support for i.MX8dx/dxp/qxp. Note that the drivers contain specific sequence needed by this mode - LDB VSYNC polarity and channel selection settings should be configured into the register a bit earlier in ->atomic_mode_set instead of in ->enable, and DC subsystem pixel link enablement is moved from the DPU driver to the LDB driver to make sure it happens later than LDB clocks enablement in ->enable. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 3b6fc6c9)
-
Liu Ying authored
i.MX8qxp uses two LDB(one primary, one auxiliary) to support dual channel mode. This patch adds DT property descriptions for those properties needed by this case. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit d07d63c1)
-
Liu Ying authored
When an external display device works in data enable(DE) mode, it usually provides video mode(s) without HSYNC and VSYNC polarities via display flags. In this case, the controller(LDB) and the LVDS PHY still need to align the two signal polarities with each other respectively. Otherwise, polarities generated by default register values may cause mismatch polarities and display artifacts. With the DE mode JDI TX26D202VM0BWA panel, we see vertical lines(very likely, only one) at the left boundary are missing sometimes, which is caused by this mismatch. This patch replaces the default polarity status with explicit active high in DE mode to fix the issue. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 69f6ca59)
-
Liu Ying authored
The system power management operations should get correct driver data before going on to further handling. When the component is unbinded, driver data should be set to NULL so that the system power management may be bypassed(return early). This way, we may prevent the system power management from using any invalid driver data. Fixes: 915ac0ad7369 ("MLK-16581-7 drm/imx: ldb: Add system power management support") Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 91033d87)
-
Liu Ying authored
This patch adds system power management support for imx-ldb drm driver by proper PHY power/exit/init handling where necessary and pixel link re-initialization in the resume operation. The driver depends on the imx-drm core driver to handle ldb bridge power management operations. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 1e83202a)
-
Liu Ying authored
Due to i.MX8 clock issue, we need to get bypass and pixel clock rates before setting their rates when system resumes back from PM sleep mode, otherwise, we'll fail to set the clock rates. So, this is a workaround and it can be removed when the clock issue is properly fixed. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 17b68807)
-
Liu Ying authored
In dual mode, we return too early from ->bind when we get the auxiliary channel's PHY. This causes we miss the logics to set driver data, get ldb alias id and initialize pixel link(if necessary). This patch fixes the issue here by tweaking the driver logic to do component binding properly. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 94bf9cef)
-
Liu Ying authored
To enable or disable a display safely, we need to validate pixel link after the relevant ldb channel is enabled and invalidate pixel link before the channel is disabled. These operations are recommended by the design team. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 5fab9a74)
-
Liu Ying authored
This patch specifies the existing pixel link quirks is initialization related. This may help us distinguish between the pixel link quirks and another one up-coming which is validation and invalidation related. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 8433571e)
-
Leonard Crestez authored
This code is enabled in upstream imx_v6_v7_defconfig but fails to build because of sc api calls. Fix this by adding ifdef checks to pixel_link code. Check for CONFIG_HAVE_IMX8_SOC becuase it is selected by both 8qm and 8qx. These calls are already guarded at runtime with checks for devtype pixel_link_valid_quirks so the empty ifdefed functions will never get called anyway. Signed-off-by:
Leonard Crestez <leonard.crestez@nxp.com> It might make sense to add a dedicated config option for SC api like CONFIG_HAVE_IMX_SCU, right now drivers/soc/imx/sc is guarded by CONFIG_ARCH_FSL_IMX8QM which means you can't build 8qxp separately. (cherry picked from commit a928239d)
-
Liu Ying authored
This patch adds i.MX8qxp LDB support. Logics are added to make i.MX8qxp LDB cope with Mixel LVDS combo PHY. Also, logics are added to handle pixel link quirks for i.MX8qxp LDB. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit 086248a0)
-
Liu Ying authored
This patch adds i.MX8qm LDB support. Logics are added to make i.MX8qm LDB cope with Mixel LVDS PHY. Also, logics are added to handle pixel link padding quirks for i.MX8qm LDB. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit d8e089c7)
-
Liu Ying authored
Due to i.MX8 clock issue, we need to get PHY clock rate before setting it's rate when system resumes back from PM sleep mode, otherwise, we'll fail to set the clock rate. So, this is a workaround and it can be removed when the clock issue is properly fixed. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit fca3d4b1)
-
Liu Ying authored
Due to i.MX8 clock issue, we need to get PHY clock rate before setting it's rate when system resumes back from PM sleep mode, otherwise, we'll fail to set the clock rate. So, this is a workaround and it can be removed when the clock issue is properly fixed. Signed-off-by:
Liu Ying <victor.liu@nxp.com> (cherry picked from commit f9709fbf)
-
Liu Ying authored
Fast-forward dpu KMS driver from imx_4.14.y. Signed-off-by:
Liu Ying <victor.liu@nxp.com>
-
Liu Ying authored
Fast-forward dpu common driver from imx_4.14.y. Signed-off-by:
Liu Ying <victor.liu@nxp.com>
-
Liu Ying authored
Fast-forward imx8_pc driver from imx_4.14.y. Signed-off-by:
Liu Ying <victor.liu@nxp.com>
-