MLK-16522-3 usb: cdns3: do not disable interrupt during role switch
After "MLK-16522-1 usb: cdns3: change cdns3_role_start work flow", the
software maintained role is current role which is doing role_start, so
it should handle its initialization routine well, just like we only has
one role and the interrupt is enabled at that time.
And disable interrupt causes one timeout problem during remove hcd, the
last command takes about 5 seconds to finish. See below for detail:
[ 84.894639] xhci...
MLK-16522-2 usb: cdns3: host: change remove sequence for hcd
At probe, the main hcd is added first, then shared_hcd is added later,
so when we tries to remove hcds, the shared_hcd needs to remove first.
BuildInfo:
- SCFW 1f59442e, IMX-MKIMAGE fb52c576, ATF
- U-Boot 2017.03-imx_v2017.03+g34be5a2
Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
MLK-16522-1 usb: cdns3: change cdns3_role_start work flow
When it goes to start new role, the interrupt may be occurred before
role_start returns, but at this time, the cdns->role is still the old
role, so the interrupt handler will make mistake.
In this commit, we set desired role before role_start, if the role_start
has failed and the desired role is different with current one, it tries
to back current role.
BuildInfo:
- SCFW 1f59442e, IMX-MKIMAGE fb52c576, ATF
- U-Boot 2017.03-imx_v2017...
MLK-16532 usb: chipidea: do not call WARN_ON if controller is going to suspend twice
At current PM framework, the dev->runtime_suspend may be called after
dev->system_suspend is called, and the dev->runtime_resume may be called
before dev->system_suspend is called. So, we need to delete WARN_ON to
avoid before dump:
[ 466.712978] [<ffff200008c49cdc>] ci_hdrc_imx_runtime_suspend+0x2c/0xa8
[ 466.719619] [<ffff2000088c29e8>] pm_generic_runtime_suspend+0x48/0x68
[ 466.726168] [<ffff2000088d4...
MLK-16469: clk-imx8qxp: Fix GPT clock hierarchy
This is a change similar to:
'commit 01fdf7bf572b ("MLK-16281-2: clk-imx8qm: Fix GPT clock hierarchy")'
There are five gpt modules on imx8qm (gpt0 .. gpt4).
Of these, gpt2 and gpt4 clock hierarchies are inconsistent
with the rest.
Having the per clocks (gpt_hf_clk and gpt_clk) as children of the
peripheral access clock (ipg_s) and bus sync slave clock
(ipg_slv_clk)
ensures that the latter are enabled when the driver...
MLK-16527 mmc: cqhci: fix function cqhci_set_irqs()
When we want to use some certain cqhci irq, we use the following
function to enable certain irq by pass the value to parameter 'set',
void cqhci_set_irqs(struct cqhci_host *cq_host, u32 set)
Currently, driver use '|=' to set the ISGE and ISTE. But when we
want to clear all cqhci irq, by send 0 to the parameter 'set',
'|=' operation do not work.
This patch change to directly write the parameter 'set' to register
ISGE and ISTE, to fix th...
MLK-16524 drm/bridge: it6263: Fix incorrect colors
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>
MLK-16375-3 video: fbdev: dcss: add '__maybe_unused' to 'fill_db'
The function 'fill_db()' is not used at this moment
which caused gcc compiler generate the build warning:
"‘fill_db’ defined but not used [-Wunused-function]"
So add attribute '__maybe_unused' to 'fill_db()' functon
definition to avoid this build warning.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
MLK-16375-2 Revert "MLK-16349 video: fbdev: dcss: reset dcss domains before clock source config"
The reverted patch is to workaround a hang issue which is caused
by DCSS reset control bug in 'Block Control' submodule. But this
workaround may cause another issue on some boards. So revert it.
This reverts commit 2d22e932664dc0347dc279a5588834a29aec47ce.
(cherry picked from commit 6f1ae20eb4a12af5179d859890fa32d5042a17cd)
MLK-16375-1 Revert "MLK-16255-2 video: fbdev: dcss: use 'db' of ctxld to config DTG"
For A0 soc, on some boards, using double buffer to load
DTG configs may cause ctxld timeout. This may be an IC
bug, so revert this patch to avoid trigger this timeout
isssue.
This reverts commit b9ea3e85d40da5d260b7558a7d3df4ae24db4e8b.
(cherry picked from commit 800911f4befc1ce6bc92e01e2494e61ac69b46e5)
MLK-16526-2 thermal: qoriq: add buffer for passive cooling mechanism
On i.MX8MQ, When temperature exceeds passive point,
the cooling mechanism will be trigger and temperature
will begin to drop, to avoid back and forth surrounding
the passive point, here adds 10 C buffer for passive point,
that means when cooling mechanism is trigger, only after
the temperature drop to 10 C below the passive point,
the cooling mechanism will exit.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by...
MLK-16526-1 thermal: imx_sc: add buffer for passive cooling mechanism
On i.MX8QM/8QXP, When temperature exceeds passive point,
the cooling mechanism will be trigger and temperature
will begin to drop, to avoid back and forth surrounding
the passive point, here adds 10 C buffer for passive point,
that means when cooling mechanism is trigger, only after
the temperature drop to 10 C below the passive point,
the cooling mechanism will exit.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Revie...
MLK-16359-3: Added i.MX8 CAST IP JPEG Encoder/Decoder Linux V4L2 driver v2
mxc-jpeg driver creates two v4l2 file handles in /dev/ which allows them to be used
by v4l2 programs. Supports encode and decode of various formats.
Note: Output data is not correct but matches validation result because IP Bug
TKT340836
v2: Split patches, added copyright
Signed-off-by: Zhengyu Shen <zhengyu.shen_1@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
MLK-16359-2: Change clock power domain for JPEG Encoder/Decoder to match DTS
Clocks use power domains from DTS.
Signed-off-by: Zhengyu Shen <zhengyu.shen_1@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
MLK-16359-1: Added i.MX8 CAST IP JPEG Encoder/Decoder Linux to DTS
Adds device tree files for JPEG decoder and encoder to device tree.
Signed-off-by: Zhengyu Shen <zhengyu.shen_1@nxp.com>
Reviewed-by: Sandor Yu <sandor.yu@nxp.com>
MLK-16285-6 usb: cdns3: add more operatons at cdns3_remove
Add PHY shutdown and clock disable operations at cdns3_remove.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Li Jun <jun.li@nxp.com>
MLK-16285-5 extcon: extcon-ptn5110: only sends EXTCON_USB_HOST event
Since Type-C port only has two data roles, we just need use
one event to stand for USB host and USB device.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Li Jun <jun.li@nxp.com>
MLK-16285-4 usb: cdns3: change controller role state machine
Since the USB Type-C port only has two data roles, host and device,
the controller driver can only receive above two events, it can't
remain 'disconnection' state alone at controller driver due to there
is no such event from Type-C.
Due to above, we delete the controller state "CDNS3_ROLE_END" which
stands for 'disconnection' state before. Instead, when we use
"CDNS3_ROLE_GADGET" stands for it, and this state is the default
state ...
MLK-16285-3 usb: cdns3: core: move INIT_WORK before cdns3_register_extcon
At the extcon notifier, it will queue a work item, so we need to
make sure the work is initialized before it is used.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Li Jun <jun.li@nxp.com>
MLK-16285-2 staging: typec: tcpci: add optional reset pin support
Some USB3 differential channel switch chips need to do reset before
functional, we add this support here.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Li Jun <jun.li@nxp.com>
MLK-16285-1 staging: typec: tcpci: move request interrupt to the end of probe
The tcpci_irq may visit tcpci->port if unexpected interrupt occurs
(eg, board design issue causes GPIO status is incorrect) and cause
NULL pointer dereference issue.
Besides, delete clear TCPC_ALERT and TCPC_ALERT_MASK code which are
already done at tcpci_init.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Li Jun <jun.li@nxp.com>
MLK-16482: dma: fsl-edma-v3: Fix RCU issue while playing Audio
That's caused by commit 593034f1b908 ("MLK-16437: dma: fsl-edma-v3:
fix kernel crash while edma interrupt trigger after channel disabled").
Because fsl_chan->vchan.lock will be hold always and trigger RCU report
as below:
1571.3 Playing WAVE '/mnt/nfs/vte_mx82/../test_stream/esai_stream/48k16bit-six.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Channels 6
1571.5 [ 4642.698771] INFO: rcu_preempt detected stalls on CPUs/tas...
MLK-16484 dts: imx8qxp: add pcie disable pin
Since i.MX8QXP MEK board PCIe has disable pin that is reseverd for future
use, we should add the disable pin.
(BuildInfo: SCFW 3e70523d, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16485 PCI: imx6: Defer probing if .of_get_named_gpio() returns -EPROBE_DEFER
Driver should do defer probing if .of_get_named_gpio() returns -EPROBE_DEFER.
And moving epdev_on regulator to be common for all platforms.
(BuildInfo: SCFW 3e70523d, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16483 ARM64: dts: imx8mq-evk-pcie1-m2: add pcie1 M.2 interface support
Add pcie1 M.2 interface support.
Tested with Murata 1CQ bt-wifi old EVB card, we still don't get
new EVB card. To disable usdhc2 port that old MEK board use SD2_nRST
as wifi wlreg_on.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16475-01 ARM64: dts: imx8mq-evk: pull up uart pins in default
Pull up uart pins in default.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16357 tty: serial: lpuart: avoid report NULL interrupt
The current driver register irq in .startup() and free the irq in
.shutdown(), then user will see the NULL interrupt output from
'cat /proc/interrupts' after the uart port test completed:
...
41: 515 0 0 0 GICv3 257 Level fsl-lpuart
42: 2 0 0 0 GICv3 258 Level
...
It is better to register all the irqs during probe function via devm_request_irq()
to a...
MLK-16471-02 arm64: dts: imx8qm/imx8qxp: remove ptp clock from assigned-clocks
Since IMX8QXP_ENET0_ROOT_DIV clock is included in assigned-clocks list,
and who is the parent of IMX8QXP_ENET0_PTP_CLK (ptp clock), so remove
ptp clock from assigned-clocks list.
(BuildInfo: SCFW 3e70523d, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16479 mmc: fix potential dead lock when get mmc host index
When open some kernel debug options including LOCKDEP, hot plug sd
will meet the following dump message:
[ 883.769343] BUG: sleeping function called from invalid context at /home/b29397/work/projects/linux-imx/kernel/locki
ng/mutex.c:620
[ 883.781212] in_atomic(): 1, irqs_disabled(): 0, pid: 1497, name: kworker/0:2
[ 883.788307] 4 locks held by kworker/0:2/1497:
[ 883.792697] #0: ("events_freezable"){.+.+.+}, at: [<ffff200...
MLK-16468-2: ASoC: fsl_hifi4: add multi-codec support for hifi4
The previous hifi4 driver and framework code can't support
multi-codec decoding or encoding together, so change the driver
code to support this feature.
Currently, the hifi4 driver and framework can support at most
5 codec working together.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
MLK-16468-1: include: uapi: add multi-codec support for hifi4
update the mxc_hifi4.h header file to support multi-codec
decoding or encoding together for hifi4 dsp.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
MLK-16477 cpufreq: imx8: switch cpufreq governor to schedutil for multi-cluster
For multi-cluster platforms like i.MX8QM, the best cpufreq
governor is schedutil, as common cpufreq framework decides
default cpufreq governor in static compile, so this patch
adds dynamic switch of cpufreq governor according to cluster
number, changing it via sysfs interface, although it is
ugly, but it realizes dynamic cpufreq governor select for
users.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
MLK-16461-2 ARM64: dts: fsl-imx8mq.dtsi: set property fsl,strobe-dll-delay-target
On some i.MX8MQ-EVK A0/A1 board, we may meet eMMC read data CRC error in
HS400 mode. This is because the delay cell set for the strobe pad
is not correct. Before this patch, usdhc driver default set this delay
cell to value 7, but for some board, only value 3~6 can pass read
operation in HS400 mode, some board, the pass value is 2~10, and
some board, the pass value is 3~8. So the default value 7 can't
make sure...
MLK-16461-1 mmc: sdhci-esdhc-imx: add strobe-dll-delay-target support
strobe-dll-delay-target is the delay cell add on the strobe line.
Strobe line the the uSDHC loopback read clock which is use in HS400
mode. Different strobe-dll-delay-target may need to set for different
board/SoC. If this delay cell is not set to an appropriate value,
we may see some read operation meet CRC error after HS400 mode select
which already pass the tuning.
This patch add the strobe-dll-delay-target setting in ...
MLK-14409-02 ARM: dts: imx: Add 900MHz setpoint on i.mx6ull
Add 900MHz/1.25V setpoint according the latest datasheet(Rev.1,2/2017),
we add a 25mV voltage margin to cover the IR frop and board tolerance.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
MLK-14409-01 ARM: imx: Add speed grading fuse check for 900MHz on i.mx6ull
According to the latest datasheet(Rev.1,02/2017), when the internal LDO
is enabled, the ARM core can run at 900MHz. We need to check the
speed grading fuse to determine the max ARM core frequency.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
MLK-14747 driver: cpufreq: Correct dc regulator voltage on imx6ull
On i.MX6ULL EVK board, when the overdrive mode(900MHz/800MHz) is
enable, the DC regulator voltage should not be changed. Keep the
DC regulator to default 1.4V.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit e4b51b651ae95226c0ae0447673c64b23b079ee6)
Conflicts:
drivers/cpufreq/imx6q-cpufreq.c
MLK-16470 thermal: imx_thermal: fix wrong thermal grade register read for MX7D
From MX7D Fuse Map v2.9, the thermal grade register is 0x440[7:6],
not 0x480[7:6] as before.
Fixes: 2045abb4391a ("MLK-11518-01 thermal: imx: add thermal support for imx7")
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
MLK-16437: dma: fsl-edma-v3: fix kernel crash while edma interrupt trigger after channel disabled
edma interrupt may come after channel terminated, so should ignore
interrupts, else kernel crash as below since fsl_chan->edesc set
to NULL when terminate.
606.837306] Unable to handle kernel NULL pointer dereference at virtual address 00000060
[ 606.845411] pgd = ffff000009295000
[ 606.848814] [00000060] *pgd=00000008bfffe003[ 606.852906] , *pud=00000008bfffd003
, *pmd=0000000000000000[ ...
MLK-16450-2: ASoC: fsl_hifi4: free unused memory when closing device
free unused memory which is allocated in fsl_hifi4_open() function
when closing the hifi4 device.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>