1
0
Fork 0
Commit Graph

718300 Commits (d43f529edd73b31d754340510fe32dc8a03ec654)

Author SHA1 Message Date
Peter Chen d43f529edd MLK-16065-5 extcon: ptn5150: add PTN5150 Type-C CC logic chip
Add NXP PTN5150 Type-C CC logic chip, this chip supplies CC flip
function automatically, and the driver will notify extcon
consumer (USB controller driver) attach and detach events.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Peter Chen 33dca19f2a MLK-16065-4 ARM64: dts: fsl-imx8qm: add fsl-imx8qm-lpddr4-arm2-usb3.dts
This dts is dedicated for USB3 Type-C port, the Type-C CC logic
chip PTN5150 is conflict with other peripherals which use
i2c1 pins (I2C1_SDA/I2C1_SCL) from GTP blocks.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Peter Chen e0f01ed5e9 MLK-16065-3 ARM64: dts: fsl-imx8qxp-lpddr4-arm2.dts: enable USB3 Type-C port
At imx8qxp arm2 board, the USB3 controller is at one Type-C port, and
the CC logic at this Type-C port is controlled by PTN5150. Enable
USB3 Type-C port at this commit.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Peter Chen 100df054a6 MLK-16065-2 ARM64: dts: fsl-imx8qxp.dtsi: add Cadence USB3 support
Add Cadence USB3 controller and phy, the phy uses generic USB PHY
driver.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Peter Chen e526b6f3ed MLK-16065-1 ARM64: dts: fsl-imx8qm.dtsi: add Cadence USB3 support
Add Cadence USB3 controller and phy, the phy uses generic USB PHY
driver.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 82236d6298 MLK-16202-03 ARM64: dts: add separate node for each domain on imx8mq
Use separate node for each domain, so we can easily handle the clock
and supply specific to each domain.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 6edc9a1308 MLK-16202-02 driver: soc: refact the gpc power domain driver for imx8mq
Enhance the power domain driver for i.mx8mq. We may need to make sure
clock is enabled for some power domain. And also when a power domain
is down, the external supply for this power domain need to be turn off
to save power.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Robin Gong aca724f7cb MLK-16202-01 driver: regulator: add enable/disable for switch for pfuze100
Add enable/disable support for switch regulator on pfuze100.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 05b825da6d MLK-16209 ARM: dts: imx: add 'regulator-always-on' property for pmic sw4
Add 'regulator-always-on' for PMIC SW4 switch regulator.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan bf7daa15de MLK-16204-5: arm64: defconfig: build nvmem and ocotp
Build NVMEM and OCOTP driver

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 03fb1ed5af MLK-16204-4: nvmem: imx-ocotp: add i.mx8mq support and fix read
Add i.MX8MQ support and Fix read.

When offset is not 4 bytes aligned, directly shift righty by 2 bits
will cause reading out wrong data. Since imx ocotp only supports
4 bytes reading once, we need handle offset is not 4 bytes aligned
and enlarge the bytes to 4 bytes aligned. After finished reading,
copy the needed data from buffer to caller and free buffer.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 55bddc9061 MLK-16204-3: clk: imx8mq: add ocotp clock
Add OCOTP clock support.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 78b6f455bb MLK-16204-2 arm64: dts: add ocotp node
Add ocotp node.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 8bf00ee3af MLK-16204-1 nvmem: add imx-scu-ocotp driver
Add imx-scu-ocotp driver to support i.MX8QM/QXP.

The usage, add an entry in ocotp node, such as the test_1 entry:
	ocotp: ocotp {
               #address-cells = <1>;
               #size-cells = <1>;
               compatible = "fsl,imx8qm-ocotp", "syscon";

               test_1: test_1@40 {
                       reg = <0x41 0x8>;
                       bits = <4 40>;
               };
       };

Then in your device node, add this:
       node: node {
	        .....
                nvmem-cells = <&test_1>;
                nvmem-cell-names = "test_1";
       };

Then in your driver, using the following piece code:

       +#include <linux/nvmem-consumer.h>

       struct nvmem_cell *cell;
       u8 *val;
       size_t len;
       int i;
       cell = devm_nvmem_cell_get(&pdev->dev, "test_1");
       if (IS_ERR(cell)) {
               if (PTR_ERR(cell) == -EPROBE_DEFER)
                       return -EPROBE_DEFER;
       }
       val = nvmem_cell_read(cell, &len);

The val points the contents that you need.

After shutdown or driver remove, use this:
       devm_nvmem_cell_put(&pdev->dev, cell);

Note: we not reuse the imx-ocotp driver, because mix scu api with
legacy code will cost many maintenance efforts. When we have common
api support, we could merge the two.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang a40cc07820 MLK-16123 video: fbdev: dcss: change a print level to be debug
Change a 'dev_info' call to 'dev_dbg' call to avoid
possible too many kernel messages printed out.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 231c79b49c MLK-16205 video: fbdev: dcss: handle cfifo wrapping case
As time goes on, the cfifo buffer is close to be
exausted. And since the cfifo is a ring buffer,
so at this moment, the cfifo needs to be wrapped
to the buffer beginning. In this driver, the fifo
wrapping condition is that the free size to buffer
end is less than the commit size. And before the
buffer wrapping, the 'ctxld_wq' workqueue needs to
be flushed to make sure all the previous commited
jobs to be finished. Besides, this commit uses the
spinlock in the 'cqueue' workqueue to replace the
'wlock'.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying d0637aa9a4 MLK-16207-4 arm64: dts: fsl-imx8qxp-mek: Add LVDS2HDMI it6263 bridge(s) support
This patch adds LVDS to HDMI it6263 bridge(s) support on the i.MX8qxp MEK
platform.  Since the platform supports up to two it6263 bridge(s) via
daughter cards plugged into mini-SAS connectors, this patch introduces
several DT sources so that users may choose relevant DT blob to use
single or dual it6263 display.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 97abfe249f MLK-16207-3 arm64: dts: fsl-imx8qxp-mek: Enable dpu1
This patch enables dpu1 DT node.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 6e9cab3daf MLK-16207-2 drm/bridge: it6263: 2nd time to workaround cable detection failure
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>
2018-10-29 11:10:38 +08:00
Liu Ying 40b6d100a7 MLK-16207-1 drm/bridge: it6263: Add gpio reset support
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>
2018-10-29 11:10:38 +08:00
Fancy Fang 77bb6a7264 MLK-16197-13 video: fbdev: dcss: workaround to make fifo commit to be synchronous
Add a workaround to make the fifo commit operation to be
synchronous, since for now, there is no interface which
can be called by user space to do synchronization.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang db9205cf53 MLK-16197-12 video: fbdev: dcss: refine 'dtg_channel_timing_config'
Add 'blank' parameter to 'dtg_channel_timing_config' interface
to set or clear the channel display window according to the
blank state.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 2d54c268eb MLK-16197-11 video: fbdev: dcss: remove (un)blank calls in 'dcss_set_par'
Remove the possible 'dcss_blank' calls in 'dcss_set_par',
since the context loader can change the DCSS sub-modules
configuration on the fly.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 8c1e8c5248 MLK-16197-10 video: fbdev: dcss: improve 'dcss_blank' logic
Do the following improvements about 'dcss_blank':

    1. move DPR trigger on config from 'dcss_blank' to
       'dcss_dpr_config'.
    2. move SCALER trigger on config from 'dcss_blank'
       to 'dcss_scaler_config'.
    3. remove duplicate code in 'dcss_blank'.
    4. save the blank state for each channel in 'dcss_blank'.

All the above improvements focus on making fb blank/unblank
logic more simple and more clear.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang a97b208be5 MLK-16197-9 video: fbdev: dcss: improve dtg config logic
Do the following improvements about DTG config:

    1. move db and sb loading position config from
       'dcss_dtg_config' to 'dcss_dtg_start'.
    2. Only one DTG trigger config is required which
       is put in 'dcss_dtg_start'.
    3. move 'dcss_dtg_config' call from 'dcss_blank'
       to 'dcss_set_par'.
    4. add default background color configs for both
       graph and video layers in 'dcss_dtg_start'.
    5. remove channel enable and disable function in
       'dcss_channel_blank'.

All the above improvements focus on making dtg config
logic more simple and more clear.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 70bf351273 MLK-16197-8 video: fbdev: dcss: move subsam config to probe
Move the SUBSAM config to probe stage to generate
display timings as soon as the graphic layer unblank.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang a3006f2ee4 MLK-16197-7 video: fbdev: dcss: use display mode for subsam config
The SUBSAM module is used to generate the output timings
to display monitor. So use display mode to config SUBSAM
is more suitable and can reduce coupling degree between
SUBSAM config and graphic layer initialization.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 4adf7204b5 MLK-16197-6 video: fbdev: dcss: move 'dcss_dtg_start' call to probe
Move the 'dcss_dtg_start' calling to probe stage which
can service the fifo commits generated in probe stage
in time.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 659eb6e66e MLK-16197-5 video: fbdev: dcss: use display mode for 1st frame dtg config
For the first frame timings generated by DTG, the display mode
is better to be used to configure this timings which can reduce
the coupling degree between first frame dtg config and the graphic
layer initialization process.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang d4cc356d0d MLK-16197-4 video: fbdev: dcss: improve hp/lp data count settings
For now, all the DCSS register configuration should be put
in the high priority single buffer by default in context
loader. So improve the high and low priority data counts
calculation and setting.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 255f016e9c MLK-16197-3 video: fbdev: dcss: add fifo commit in dcss_set_par().
In dcss_set_par(), it will config the parameters related
with DEC400D/DTRC, DPR, SCALER, HDR10 and etc. So commit
all the registers configuration at the end of this function
to avoid mixing with later configurations which may cause
duplicating settings in one commit.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 19543f1a0b MLK-16197-2 video: fbdev: dcss: init dcss irqs earlier
Initialize the DCSS interrupt system earlier to make
it enabled before any cfifo commit.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 9cb68649b5 MLK-16197-1 video: fbdev: dcss: use non-cacheable mapping for cfifo buffer.
The kernel direct mapping for cfifo buffer is cacheable which
requires cache flush and is easier to bring in strange issue.
So use coherent dma mapping for cfifo buffer access. But the
kfifo dma sgl interface using the direct mapping to get the
phyiscal page via dma mapping virtual addr. So record fifo 'in'
for each commit which is used for context loader sb and db addr
configurations.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Robby Cai 76e5110658 MLK-14720 epdc: correct WFE setting when bypass legacy process
set WFE (WFE_A on imx7d, and WFE_B on imx6ull/imx6sll) input address to
framebuffer start address, and set left/top coordinate since the framebuffer is
the original source of WFE (i.e., not from PXP output) when bypass legacy mode.
The patch also limits the condition to bypass legacy mode when not use
EPDC_FLAG_USE_ALT_BUFFER.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 7f19940705902623166777c675f5e10c9e7fc477)
2018-10-29 11:10:38 +08:00
Richard Zhu 7fee8b1a9f MLK-16176-2 PCI: imx: get the bus clock regulator correctly
In order to make sure that get the regulator correctly.
Check the return value of devm_regulator_get().
Return value directly if it is '-EPROBE_DEFER'

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan 7c6973620b MLK-16200 arm64: dts: imx8qxp-mek: enable UART port for Bluetooth 1FD and 1CQ
Enable lpuart port1 for Bluetooth HCI interface, tested pass on
Murata module 1FD and 1CQ on imx8qxp MEK board.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan b39676c986 MLK-16199 tty: serial: lpuart: don't clear idle flag in eeop mode
In DMA EEOP mode idle flag can trigger DMA major loop stop. The idle
flag should be cleared by HW. So others cannot clear idle flag in the
mode enabled.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 428496e015 MLK-16196: [i.MX8MQ/Hantro]: enhance power management for suspend/resume
Add operations to reset control block registers in resume functions,
otherwise system will crash

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Adriana Reus 15f07ad5ae MLK-16172: dts: imx8qm: Add pwm entries
Add entries for imx8qm pwms.
DT settings were tested on zebu.

Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang c56a287f31 MLK-16201 arm64: dts: freescale: imx8mq: add dcss and hdmi power domain
On i.MX8MQ, DCSS and HDMI are in display mix power domain,
assgin them to display mix power domain.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 034ba9f72f MLK-16194 ARM64: defconfig: enable pm test config by default for imx8
Enable PM debug config in default config for imx8 SOC.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Gao Pan 7db9cf37f7 MLK-16189 arm64: dts: enable i2c bus expander for imx8qxp-mek
enable i2c bus expander for imx8qxp-mek

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
2018-10-29 11:10:38 +08:00
Gao Pan cb806c41be MLK-16191 arm: dts: add i2c bus recovery for imx6qp-sdb board
Add i2c bus recovery support to recover i2c2 bus from dead lock status.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu 6f826eec9f MLK-16184: hdmi: Add timeout check to hdmi initialize
Add timeout check for hdmi FW alive function to avoid
kernel booting hang for that board without HDMI FW.

CDN_API_General_Test_Echo_Ext_blocking is the first
function that calling mailbox.
Add timeout to the function to avoid kernel booting hang
for that board without HDMI ROM patch.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Viorel Suman 8d56670ccc MLK-13975: ASoC: fsl: amix: remove primary SAI power on/off
The intention of currently implemented primary SAI power-on/off
on BE startup/shutdown was to make sure the primary SAI is
powered-on when the playback is started on the secondary SAI.
However in a such scenario the primary SAI is powered-on when
the primary SAI output is recorded.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2018-10-29 11:10:38 +08:00
Viorel Suman 09ceec22d2 MLK-13975: ASoC: fsl: Assign audio clocks within it's own power domain
In order to leverage the power domain clocks rate store/restore
functionality all clocks used by device must be specified
within the device specific power domain.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 47af099d7c MLK-16171: [i.MX8MQ/Hantro]: Refine coding style of hantro driver
Remove error reported by Linux coding style script
Remove unnecessary macro: MULTI_CORE,CLK_CFG,VSI
Remove unnecessary variables: base_port,elements,irq_x,mmp_timer_xxx

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
2018-10-29 11:10:38 +08:00
Mihai Serban c789d6670a MLK-16177: soc: imx: Fix resources release in pm-domains detach_dev function
Because of a typo the resources allocated in imx8_attach_dev were not
correctly released by imx8_detach_dev.

Fixes: a0fb334819bb ("MLK16147-2 soc:imx Add support to save/restore clock rates")
Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-10-29 11:10:38 +08:00
Han Xu 7e80bbd4a9 MLK-16150: arm64: config: enable JFFS2 in defconfig
enable JFFS2 support in default configuration

Signed-off-by: Han Xu <han.xu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 9fac5d762e MLK-16183 drm/bridge: it6263: Workaround cable detection failure at boot time
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>
2018-10-29 11:10:38 +08:00