linux.git
6 years agoMLK-20790-2 rpmsg: imx_rpmsg: use unregister/register virtio device instead of rpmsg...
Robin Gong [Fri, 18 Jan 2019 09:58:49 +0000 (17:58 +0800)]
MLK-20790-2 rpmsg: imx_rpmsg: use unregister/register virtio device instead of rpmsg device

Currently, issue RPMSG_NS_DESTROY before kick off ready notification to
m4 to let m4 side go through all the stale message in vring buffer without
doing anything after m4 reset, that's not good enough. The better way is to
clear vring buffer after m4 reset, thus everything will be done as the
first time of kernel/m4 bootup. So unregister/register virtio device
instead of rpmsg device if m4 partition reset.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
6 years agoMLK-20790-1: rpmsg: imx_rpmsg: dynamic allocate ivdev instead
Robin Gong [Fri, 18 Jan 2019 00:53:27 +0000 (08:53 +0800)]
MLK-20790-1: rpmsg: imx_rpmsg: dynamic allocate ivdev instead

Allocate ivdev dynamically instead of static, so that ivdev could
be re-initialized by kzalloc() such as 'struct virtio_device', otherwise,
the later patch that unregister/register virtio device instead of rpmsg
device will cause kernel complain such as 'kobject: tried to init an
initialized' and finally register virtio device failure after m4 partition
reset.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
6 years agoMLK-20776-2 RPMSG: imx: add the imx8mq rpmsg variant
Richard Zhu [Fri, 18 Jan 2019 07:51:46 +0000 (15:51 +0800)]
MLK-20776-2 RPMSG: imx: add the imx8mq rpmsg variant

Add the imx8mq/mm rpmsg variant in the driver.
No function changes.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-20706 rpmsg: imx_rpmsg: fix building error on i.mx6/7 legancy chip
Robin Gong [Thu, 10 Jan 2019 11:10:03 +0000 (19:10 +0800)]
MLK-20706 rpmsg: imx_rpmsg: fix building error on i.mx6/7 legancy chip

Fix building error caused by commit c6cd4096c224f("MLK-20691-1:
rpmsg: imx_rpmsg: add new partition reset interrupt") because
of no scu functions on i.mx6sx/7d legancy chip.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-20691-3 rpmsg: imx_rpmsg: add partition reset support
Robin Gong [Wed, 9 Jan 2019 14:59:01 +0000 (22:59 +0800)]
MLK-20691-3 rpmsg: imx_rpmsg: add partition reset support

unregister all rpmsg devices and kick off ready notifyication
again to restore back rpmsg communications after M4 partion
reset.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-20691-1: rpmsg: imx_rpmsg: add new partition reset interrupt
Robin Gong [Tue, 8 Jan 2019 09:41:34 +0000 (17:41 +0800)]
MLK-20691-1: rpmsg: imx_rpmsg: add new partition reset interrupt

Add new partition reset interrupt group to know M4 reset and restore
back at rpmsg level later.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-20637-2 rpmsg: imx: alloc share mem from per dev dma pool
Richard Zhu [Tue, 11 Dec 2018 01:44:31 +0000 (09:44 +0800)]
MLK-20637-2 rpmsg: imx: alloc share mem from per dev dma pool

- reserve one per dev dma pool, and alloc the share memory
from it.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-20653 rpmsg: virtio_rpmsg_bus: fix unexpected huge vmap mappings
Fugang Duan [Mon, 10 Dec 2018 11:34:24 +0000 (19:34 +0800)]
MLK-20653 rpmsg: virtio_rpmsg_bus: fix unexpected huge vmap mappings

If RPMSG dma memory allocate from per-device mem pool by calling .dma_alloc_coherent(),
the size is bigger than 2M bytes and alignment with 2M (PMD_SIZE), then kernel dump by
calling .vmalloc_to_page().

Since per-device dma pool do vmap mappings by __ioremap(), __ioremap() might use
the hugepage mapping, which in turn will cause the vmalloc_page failed to return
the correct page due to the PTE not setup.

For exp, when reserve 8M bytes per-device dma mem pool, __ioremap() will use hugepage
mapping:
 __ioremap
ioremap_page_range
ioremap_pud_range
ioremap_pmd_range
pmd_set_huge(pmd, phys_addr + addr, prot)

Commit:029c54b09599 ("mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge
vmap mapping") ensure that vmalloc_to_page() does not go off into the weeds trying
to dereference huge PUDs or PMDs as table entries:
rpmsg_sg_init ->
vmalloc_to_page->
WARN_ON_ONCE(pmd_bad(*pmd));

In generally, .dma_alloc_coherent() allocate memory from CMA pool/DMA pool/atomic_pool,
or swiotlb slabs pool, the virt address mapping to physical address should be lineal,
so for the rpmsg scatterlist initialization can use pfn to find the page to avoid to
call .vmalloc_to_page().

Kernel dump:
[    0.881722] WARNING: CPU: 0 PID: 1 at mm/vmalloc.c:301 vmalloc_to_page+0xbc/0xc8
[    0.889094] Modules linked in:
[    0.892139] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.78-05581-gc61a572 #206
[    0.899604] Hardware name: Freescale i.MX8QM MEK (DT)
[    0.904643] task: ffff8008f6c98000 task.stack: ffff000008068000
[    0.910549] PC is at vmalloc_to_page+0xbc/0xc8
[    0.914987] LR is at rpmsg_sg_init+0x70/0xcc
[    0.919238] pc : [<ffff0000081c80d4>] lr : [<ffff000008ac471c>] pstate: 40000045
[    0.926619] sp : ffff00000806b8b0
[    0.929923] x29: ffff00000806b8b0 x28: ffff00000961cdf0
[    0.935220] x27: ffff00000961cdf0 x26: 0000000000000000
[    0.940519] x25: 0000000000040000 x24: ffff00000961ce40
[    0.945819] x23: ffff00000f000000 x22: ffff00000961ce30
[    0.951118] x21: 0000000000000000 x20: ffff00000806b950
[    0.956417] x19: 0000000000000000 x18: 000000000000000e
[    0.961717] x17: 0000000000000001 x16: 0000000000000019
[    0.967016] x15: 0000000000000033 x14: 616d64202c303030
[    0.972316] x13: 3030306630303030 x12: 3066666666206176
[    0.977615] x11: 203a737265666675 x10: 62203334394c203a
[    0.982914] x9 : 000000000000009f x8 : ffff00000806b970
[    0.988214] x7 : 0000000000000000 x6 : ffff000009690712
[    0.993513] x5 : 0000000000000000 x4 : 0000000080000000
[    0.998812] x3 : 00e8000090800f0d x2 : ffff8008ffffd3c0
[    1.004112] x1 : 0000000000000000 x0 : ffff00000f000000
[    1.009416] Call trace:
[    1.011849] Exception stack(0xffff00000806b770 to 0xffff00000806b8b0)
[    1.018279] b760:                                   ffff00000f000000 0000000000000000
[    1.026094] b780: ffff8008ffffd3c0 00e8000090800f0d 0000000080000000 0000000000000000
[    1.033915] b7a0: ffff000009690712 0000000000000000 ffff00000806b970 000000000000009f
[    1.041731] b7c0: 62203334394c203a 203a737265666675 3066666666206176 3030306630303030
[    1.049550] b7e0: 616d64202c303030 0000000000000033 0000000000000019 0000000000000001
[    1.057368] b800: 000000000000000e 0000000000000000 ffff00000806b950 0000000000000000
[    1.065188] b820: ffff00000961ce30 ffff00000f000000 ffff00000961ce40 0000000000040000
[    1.073008] b840: 0000000000000000 ffff00000961cdf0 ffff00000961cdf0 ffff00000806b8b0
[    1.080825] b860: ffff000008ac471c ffff00000806b8b0 ffff0000081c80d4 0000000040000045
[    1.088646] b880: ffff0000092c8528 ffff00000806b890 ffffffffffffffff ffff000008ac4710
[    1.096461] b8a0: ffff00000806b8b0 ffff0000081c80d4
[    1.101327] [<ffff0000081c80d4>] vmalloc_to_page+0xbc/0xc8
[    1.106800] [<ffff000008ac4968>] rpmsg_probe+0x1f0/0x49c
[    1.112107] [<ffff00000859a9a0>] virtio_dev_probe+0x198/0x210
[    1.117839] [<ffff0000086a1c70>] driver_probe_device+0x220/0x2d4
[    1.123829] [<ffff0000086a1e90>] __device_attach_driver+0x98/0xc8
[    1.129913] [<ffff00000869fe7c>] bus_for_each_drv+0x54/0x94
[    1.135470] [<ffff0000086a1944>] __device_attach+0xc4/0x12c
[    1.141029] [<ffff0000086a1ed0>] device_initial_probe+0x10/0x18
[    1.146937] [<ffff0000086a0e48>] bus_probe_device+0x90/0x98
[    1.152501] [<ffff00000869ef88>] device_add+0x3f4/0x570
[    1.157709] [<ffff00000869f120>] device_register+0x1c/0x28
[    1.163182] [<ffff00000859a4f8>] register_virtio_device+0xb8/0x114
[    1.169353] [<ffff000008ac5e94>] imx_rpmsg_probe+0x3a0/0x5d0
[    1.175003] [<ffff0000086a3768>] platform_drv_probe+0x50/0xbc
[    1.180730] [<ffff0000086a1c70>] driver_probe_device+0x220/0x2d4
[    1.186725] [<ffff0000086a1dc8>] __driver_attach+0xa4/0xa8
[    1.192199] [<ffff00000869fdc4>] bus_for_each_dev+0x58/0x98
[    1.197759] [<ffff0000086a1598>] driver_attach+0x20/0x28
[    1.203058] [<ffff0000086a1114>] bus_add_driver+0x1c0/0x224
[    1.208619] [<ffff0000086a26ec>] driver_register+0x68/0x108
[    1.214178] [<ffff0000086a36ac>] __platform_driver_register+0x4c/0x54
[    1.220614] [<ffff0000093d14fc>] imx_rpmsg_init+0x1c/0x50
[    1.225999] [<ffff000008084144>] do_one_initcall+0x38/0x124
[    1.231560] [<ffff000009370d28>] kernel_init_freeable+0x18c/0x228
[    1.237640] [<ffff000008d51b60>] kernel_init+0x10/0x100
[    1.242849] [<ffff000008085348>] ret_from_fork+0x10/0x18
[    1.248154] ---[ end trace bcc95d4e07033434 ]---

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Suggested-and-reviewed-by: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-16704-3 ARM64: configs: defconfig: add imx8_wdt
Robin Gong [Fri, 27 Oct 2017 02:04:23 +0000 (10:04 +0800)]
MLK-16704-3 ARM64: configs: defconfig: add imx8_wdt

Enable imx8_wdt driver by default.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 7d0c8ce50a9afd3a9319ee6449469953e0848927)

6 years agoMLK-20965 watchdog: imx8_wdt: remove watchdog action set
Robin Gong [Fri, 22 Feb 2019 10:43:35 +0000 (18:43 +0800)]
MLK-20965 watchdog: imx8_wdt: remove watchdog action set

The default watchdog action is partition reset now, so no need kernel
to take care. Besides, scfw full test case may set other watchdog
action but kernel may set it back later to default partition reset
which scfw wouldn't expect, so avoid touching watchdog action.
Please modify scfw code in case changing watchdog action to board
reset.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
(cherry picked from commit d9189e251995cc91efcac62a8d1c59ff32cdb8dc)
(cherry picked from commit 13445b41c617042b309fb4cc5159a6d6ab9182fe)

6 years agoMLK-20723 watchdog: imx8_wdt: enable partition reset for watchdog
Robin Gong [Mon, 14 Jan 2019 13:55:05 +0000 (21:55 +0800)]
MLK-20723 watchdog: imx8_wdt: enable partition reset for watchdog

Change to partiton reset instead of board reset since SCFW is ready
now.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 2a3fe06f582c85be1669a9231da5a8c51d2a37fe)

6 years agoMLK-17154 watchdog: imx8_wdt: align timeout value with imx2_wdt
Robin Gong [Tue, 12 Dec 2017 06:33:14 +0000 (14:33 +0800)]
MLK-17154 watchdog: imx8_wdt: align timeout value with imx2_wdt

Align timeout value with imx2_wdt.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 6417e1a8039a16f7b1a76ea250237567ee3a72f5)

6 years agoMLK-16988 watchdog: imx8_wdt: stop watchdog while suspend
Robin Gong [Mon, 27 Nov 2017 03:12:42 +0000 (11:12 +0800)]
MLK-16988 watchdog: imx8_wdt: stop watchdog while suspend

Since watchdog on i.mx8 is a software watchdog in scfw side, it should be
stopped while kernel enter system suspend if watchdog fired. Otherwise,
unexpected watchdog reset will happen. Restore back if watchdog fired too.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit b77f789b470b61ab95a8c9fd0a01cebe1e342141)

6 years agoMLK-16891 watchdog: imx8_wdt: add pre_timeout notification
Robin Gong [Tue, 14 Nov 2017 09:03:02 +0000 (17:03 +0800)]
MLK-16891 watchdog: imx8_wdt: add pre_timeout notification

Add pre_timeout set and notification for i.mx8qm/qxp.

BuildInfo:
    - SCFW 36ff24f3, IMX-MKIMAGE 05d3d4a7, ATF 93dd1cc
    - U-Boot 2017.03-00684-g28c5243

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 28367d5317e0132483d93656731ab4b8ebf5a99a)

6 years agoMLK-16704-1 watchdog: imx8_wdt: add watchdog driver for i.mx8QM/QXP
Robin Gong [Fri, 27 Oct 2017 01:40:30 +0000 (09:40 +0800)]
MLK-16704-1 watchdog: imx8_wdt: add watchdog driver for i.mx8QM/QXP

This watchdog driver is a virtual driver in Linux and call ATF interface
where call SCFW eventually. In SCFW, it's done by SCU timer tick instead
of hardware watchdog.This is why we have to call ATF because such system
resource owned by secure patition.Currently, booard reset happen if not
ping this software watchdog in time in linux side, may change to partition
reboot once SCFW support this feature in the future.
 BuildInfo:
   - SCFW 93c142a9, IMX-MKIMAGE 2522fd70, ATF f2547fb
   - U-Boot 2017.03-00097-gd7599cf

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 3582decf35940566ed5eb43393c422315931f183)

6 years agoMLK-19580 net: fec: read MAC address from fuse
Fugang Duan [Thu, 21 Mar 2019 06:28:36 +0000 (14:28 +0800)]
MLK-19580 net: fec: read MAC address from fuse

uboot fdt_fixup_ethernet() already add the "local-mac-address" property
for each net node when boot from net, the mac address read from fuse in
default. But for non-net boot or net is disabled in uboot, then kernel
also needs to read the MAC address from fuse. The patch add i.MX8MM platform
to read fuse from MAC in kernel in such case.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-16585 net: fec: fixup: correct i.MX8QXP MAC address fuse mapping
Fugang Duan [Thu, 21 Mar 2019 06:26:38 +0000 (14:26 +0800)]
MLK-16585 net: fec: fixup: correct i.MX8QXP MAC address fuse mapping

i.MX8QXP has different fuse address with i.MX8QM, correct i.MX8QXP
MAC fuse word address.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21208 net: fec: add sleep mode support for i.MX8QM/QXP
Fugang Duan [Thu, 21 Mar 2019 06:14:20 +0000 (14:14 +0800)]
MLK-21208 net: fec: add sleep mode support for i.MX8QM/QXP

commit ae136b3cfe7c(MLK-18483-04 net: fec: close the mu ipc channel
when it is not used) merge part of code from commit 379ede4dfd95
(MLK-18483-02 net: fec: add sleep mode support for i.MX8QM/QXP),
but miss the commit.

So add the feature support for i.MX8QM/QXP by merge the commit 379ede4dfd95
(MLK-18483-02 net: fec: add sleep mode support for i.MX8QM/QXP)

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21213-2 arm64: dts: fsl-imx8qm-lpddr4-arm2: Suppress DTC warnings related to...
Liu Ying [Thu, 21 Mar 2019 06:03:08 +0000 (14:03 +0800)]
MLK-21213-2 arm64: dts: fsl-imx8qm-lpddr4-arm2: Suppress DTC warnings related to LVDS

This patch suppresses DTC warnings which are related to LVDS as below:
Warning (graph_endpoint): /i2c@57247000/lvds-to-hdmi-bridge@4c/port/endpoint:
graph connection to node '/ldb@572410e0/lvds-channel@0/port@1/endpoint'
is not bidirectional

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21213-1 arm64: dts: fsl-imx8qm/qxp-mek: Suppress DTC warnings related to LVDS
Liu Ying [Thu, 21 Mar 2019 06:01:11 +0000 (14:01 +0800)]
MLK-21213-1 arm64: dts: fsl-imx8qm/qxp-mek: Suppress DTC warnings related to LVDS

This patch suppresses DTC warnings which are related to LVDS like below:
Warning (graph_endpoint): /i2c@57247000/lvds-to-hdmi-bridge@4c/port/endpoint:
graph connection to node '/ldb@572410e0/lvds-channel@0/port@1/endpoint'
is not bidirectional

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21123-2 arm64: fsl-imx8dx.dtsi: Correct DPU endpoint names
Liu Ying [Thu, 21 Mar 2019 05:52:00 +0000 (13:52 +0800)]
MLK-21123-2 arm64: fsl-imx8dx.dtsi: Correct DPU endpoint names

This patch corrects DPU endpoint names to suppress DTC warnings like below:
Warning (graph_endpoint): /dpu@56180000/port@0/lvds0-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@0/lvds1-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@0/mipi-dsi-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@1/lvds0-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@1/lvds1-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@1/mipi-dsi-endpoint: graph endpont node name should be 'endpoint'

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21123-1 arm64: fsl-imx8qm-device.dtsi: Correct DPU endpoint names
Liu Ying [Thu, 21 Mar 2019 05:43:15 +0000 (13:43 +0800)]
MLK-21123-1 arm64: fsl-imx8qm-device.dtsi: Correct DPU endpoint names

This patch corrects DPU endpoint names to suppress DTC warnings like below:
Warning (graph_endpoint): /dpu@56180000/port@0/hdmi-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@0/mipi-dsi-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@1/lvds0-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@56180000/port@1/lvds1-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@57180000/port@0/mipi-dsi-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@57180000/port@1/lvds0-endpoint: graph endpont node name should be 'endpoint'
Warning (graph_endpoint): /dpu@57180000/port@1/lvds1-endpoint: graph endpont node name should be 'endpoint'

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21190 arm64: dts: imx8mq: fix DTS warnings
Laurentiu Palcu [Tue, 19 Mar 2019 13:19:10 +0000 (15:19 +0200)]
MLK-21190 arm64: dts: imx8mq: fix DTS warnings

This patch fixes the folowing DTS warnings:

 Warning (graph_endpoint): /dcss@0x32e00000/port@0/hdmi-endpoint: graph endpont node name should be 'endpoint'
 Warning (graph_endpoint): /dcss@0x32e00000/port@0/mipi_dsi: graph endpont node name should be 'endpoint'
 Warning (graph_endpoint): /lcdif@30320000/port@0/mipi-dsi-endpoint: graph endpont node name should be 'endpoint'
 Warning (graph_endpoint): /mipi_csi1@30a70000/port/endpoint1: graph endpont node name should be 'endpoint'
 Warning (graph_endpoint): /mipi_csi1@30a70000/port/endpoint2: graph endpont node name should be 'endpoint'
 Warning (graph_endpoint): /mipi_csi2@30b60000/port/endpoint1: graph endpont node name should be 'endpoint'
 Warning (graph_endpoint): /mipi_csi2@30b60000/port/endpoint2: graph endpont node name should be 'endpoint'
 Warning (interrupts_property): /dcss@0x32e00000:#interrupt-cells: size is (64), expected multiple of 12

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
6 years agoMLK-21113 ASoC: ak4458: replace codec API with component API
Viorel Suman [Tue, 19 Mar 2019 09:37:28 +0000 (11:37 +0200)]
MLK-21113 ASoC: ak4458: replace codec API with component API

Replace codec API with recent component API.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
6 years agoMLK-18205-14 cpufreq: imx8mq: add pmic voltage scaling support
Anson Huang [Fri, 4 May 2018 10:29:45 +0000 (18:29 +0800)]
MLK-18205-14 cpufreq: imx8mq: add pmic voltage scaling support

i.MX8MM shares same cpu-freq driver with i.MX8MQ, but
its EVK board has a PMIC which can scale VDD_ARM voltage
according to voltage defined in dtb, add support for it.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit bb958ff65e9caeaddf180e66482c3013bb8fae67)

6 years agoMLK-16710 cpufreq: imx8mq: avoid duplicated OPP table initialization
Anson Huang [Fri, 27 Oct 2017 15:40:15 +0000 (23:40 +0800)]
MLK-16710 cpufreq: imx8mq: avoid duplicated OPP table initialization

On i.MX8MQ, since the OPP table is initialized in cpu-freq platform
device register according to chip type, so no need to redo the OPP
table initialization in cpu-freq driver, this patch adds check for
OPP table initialization to avoid below warning during boot up:

[    1.468378] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 1501
[    1.468388] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 1301
[    1.468417] cpu cpu0: _of_add_opp_table_v1: Failed to add OPP 1300000000
[    1.468425] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 1001
[    1.468434] cpu cpu0: _opp_add: duplicate OPPs detected. Existing: freq: 8001
[    1.468443] cpu cpu0: _of_add_opp_table_v1: Failed to add OPP 800000000

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit ae4cd299d229b8debe8223a1569ffef42b938f6a)

6 years agoMLK-16165-2 cpufreq: imx8mq: remove non-necessary opp table initialization
Anson Huang [Fri, 25 Aug 2017 05:06:24 +0000 (13:06 +0800)]
MLK-16165-2 cpufreq: imx8mq: remove non-necessary opp table initialization

For i.MX8MQ, suspend freq can use policy->max after cpu freq
table is validated, so no need to get OPP number and MAX
frequency for suspend freq now, also add necessary resource free
when probe failed.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 5542b5a931eaac90ae38624700cdfca723a08073)

6 years agoMLK-16121-1 cpufreq: imx8mq: add gpio regulator support
Anson Huang [Wed, 2 Aug 2017 06:39:18 +0000 (14:39 +0800)]
MLK-16121-1 cpufreq: imx8mq: add gpio regulator support

i.MX8MQ can run at over-drive mode which needs
increasing VDD_ARM voltage, add gpio regulator support
for over-drive mode.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 86f48a3c4b9558454d82cea732d53348e37ef574)

6 years agoMLK-16477 cpufreq: imx8: switch cpufreq governor to schedutil for multi-cluster
Anson Huang [Mon, 18 Sep 2017 04:41:40 +0000 (12:41 +0800)]
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>
(cherry picked from commit 88c5933f17117451e7eb10242ca903624e86a9ff)

6 years agoMLK-16372-2 cpufreq: imx8: add cpu-freq cooling support
Anson Huang [Tue, 5 Sep 2017 09:31:43 +0000 (17:31 +0800)]
MLK-16372-2 cpufreq: imx8: add cpu-freq cooling support

Register cpu-freq cooling device if device tree
supports cooling-cells, different cluster can
have its own cooling device settings.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 12fe2995aa5034d8119fd82be5247f655552d5df)

6 years agoMLK-16093-3 cpufreq: imx8mq: add cooling device support
Anson Huang [Fri, 28 Jul 2017 02:30:35 +0000 (10:30 +0800)]
MLK-16093-3 cpufreq: imx8mq: add cooling device support

Add i.MX8MQ cooling device support, when temperature
exceeds passive threshold, cpu-freq will drop to lowest
set-point, and once temperature drops below passive
threshold, cpu-freq will restore.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 463d125f15f111a364db1e2f1cf816a7fd1e9597)

6 years agoMLK-15342-4 arm64: defconfig: enable i.mx8mq cpufreq support
Anson Huang [Wed, 5 Jul 2017 08:05:33 +0000 (16:05 +0800)]
MLK-15342-4 arm64: defconfig: enable i.mx8mq cpufreq support

Enable CONFIG_ARM_IMX8MQ_CPUFREQ by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 207a30c915365d74ffdb0144df6be6600273ca14)

6 years agoMLK-15342-3 cpufreq: add i.mx8mq support
Anson Huang [Wed, 5 Jul 2017 08:00:22 +0000 (16:00 +0800)]
MLK-15342-3 cpufreq: add i.mx8mq support

Add i.MX8MQ cpufreq support, current version of
EVK board does NOT support voltage scale, but next
version will add this support, so this driver only
supports cpu frequency scale, voltage scale will
be added later once new board available.

A53 CPU clock normally is from ARM_PLL, but during
ARM_PLL relock window, it will be switched to
SYS1_PLL_800M to avoid clock missing, and after
arm pll relock done, it will be switched back.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 83f79d713471aece5a08397f1917c90935da994a)

6 years agoMLK-16165-1 cpufreq: imx8: remove non-necessary opp table initialization
Anson Huang [Fri, 25 Aug 2017 05:03:23 +0000 (13:03 +0800)]
MLK-16165-1 cpufreq: imx8: remove non-necessary opp table initialization

For i.MX8QM/8QXP, suspend freq can use policy->max after cpu
freq table is validated, so no need to get OPP number and MAX
frequency for suspend freq now, also add necessary resource free
when probe failed.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit d1096697124beb82bea739b66c3bff11c498868f)

6 years agoMLK-16244-2 cpufreq: imx8: add SIP cpu-freq support
Anson Huang [Wed, 23 Aug 2017 05:00:47 +0000 (13:00 +0800)]
MLK-16244-2 cpufreq: imx8: add SIP cpu-freq support

Add SIP cpu-freq support, the CPU hardware frequency
scale will be performed by ARM Trusted Firmware,
and add cpu-freq suspend support, MAX frequency will
be used during suspend.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 665a985c8103ae2e1f6417cca3ae62e50a6681c7)

Conflicts:
include/soc/imx/fsl_sip.h

6 years agoMLK-14534-3 arm64: defconfig: enable i.MX8 cpufreq
Anson Huang [Tue, 28 Mar 2017 16:10:50 +0000 (00:10 +0800)]
MLK-14534-3 arm64: defconfig: enable i.MX8 cpufreq

Enable i.MX8 cpu-freq by default for defconfig.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 263d6fa34177707b03456c75556ba0ce30d600b0)

6 years agoMLK-14534-1 cpufreq: imx8: add cpu-freq support
Anson Huang [Tue, 28 Mar 2017 16:07:57 +0000 (00:07 +0800)]
MLK-14534-1 cpufreq: imx8: add cpu-freq support

Add multi-clusters cpu-freq driver support for i.MX8,
only support cpu-freq get now.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 636ede1c1443f20b2d664e7cdfcd617176f60a2d)

6 years agoMLK-21102 driver: thermal: fix the tmu out of range issue on imx8mm
Jacky Bai [Thu, 28 Feb 2019 07:03:20 +0000 (15:03 +0800)]
MLK-21102 driver: thermal: fix the tmu out of range issue on imx8mm

Per design team's feadback, the 'V' bit is NOT very safe enough for
checking the validation of the temp value. So just check if the
temp value is in the sensor's valid measurment range.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 324525467aac8bdea6bb5e9ac83149b3a194369e)

6 years agoMLK-18428-04 ARM64: config: enable imx8mm thermal driver by default.
Bai Ping [Thu, 21 Jun 2018 02:30:32 +0000 (10:30 +0800)]
MLK-18428-04 ARM64: config: enable imx8mm thermal driver by default.

enable the i.MX8MM thermal driver by default.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 37ca0ee7ed59af640dec383e68ab66e4c4199ffd)

6 years agoMLK-18428-02 doc: binding: Add binding doc for imx8mm tmu
Bai Ping [Mon, 25 Jun 2018 05:50:12 +0000 (13:50 +0800)]
MLK-18428-02 doc: binding: Add binding doc for imx8mm tmu

Add dts binding doc for i.MX8MM TMU.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 6fd7255a0e73a28dda83e0574b62a264449d04e5)

6 years agoMLK-18428-01 driver: thermal: add tmu driver on imx8mm
Bai Ping [Mon, 11 Jun 2018 08:45:50 +0000 (16:45 +0800)]
MLK-18428-01 driver: thermal: add tmu driver on imx8mm

add thermal driver on i.MX8MM

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 719cb8604dd253ec9484a39a40251f49e5300752)

6 years agoARM: dts: imx6ull: add gpio-ranges property to iMX GPIO controllers
Vipul Kumar [Wed, 20 Mar 2019 06:54:56 +0000 (12:24 +0530)]
ARM: dts: imx6ull: add gpio-ranges property to iMX GPIO controllers

As per 'commit bb728d662bed ("ARM: dts: add gpio-ranges property to iMX
GPIO controllers")', added gpio-ranges property for imx6ULL board.

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoARM: dts: imx6ull: add GPIO clocks
Vipul Kumar [Wed, 20 Mar 2019 06:51:10 +0000 (12:21 +0530)]
ARM: dts: imx6ull: add GPIO clocks

As per 'commit bc36b2aac4f5 ("ARM: dts: imx6ul: add GPIO clocks")'
i.MX6ULL has GPIO clock gates in CCM CCGR, add
clock property for GPIO driver to make sure all
GPIO banks work as expected.

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoarm: dts: imx6ul: Adding missing clock source
Vipul Kumar [Mon, 18 Mar 2019 11:52:18 +0000 (17:22 +0530)]
arm: dts: imx6ul: Adding missing clock source

This patch added missing clock source under cpu node. Without these
sources, getting following error at boot time:

cpu cpu0: Failed to get clk 'pll1_bypass': -2
imx6q-cpufreq: probe of imx6q-cpufreq failed with error -2

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoRevert "MLK-12623-03 ARM: imx: Add cpu speed grading check for imx6ul"
Vipul Kumar [Mon, 18 Mar 2019 11:39:42 +0000 (17:09 +0530)]
Revert "MLK-12623-03 ARM: imx: Add cpu speed grading check for imx6ul"

This reverts commit 301ac2d01008323ff30f7c5e24dc40ba699b3cad.
As per 'commit 5028f5d2b38e ("cpufreq: imx6q: add 696MHz operating point
for i.mx6ul")', cpu speed grading check for imx6ul is already upstream,
so removing duplicate code.

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agomedia: v4l: capture: ov5640: Add device tree support
Arulpandiyan Vadivel [Tue, 12 Mar 2019 15:05:29 +0000 (20:35 +0530)]
media: v4l: capture: ov5640: Add device tree support

Add device tree support to ov5640 sensor driver. This change helps to
load driver module on booting when it is compiled as loadable module.

Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
6 years agoMLK-14798: arm: dts: imx6ul: Fix wm8960 codec master mode
Daniel Baluta [Mon, 8 May 2017 15:39:47 +0000 (18:39 +0300)]
MLK-14798: arm: dts: imx6ul: Fix wm8960 codec master mode

Commit 65e6b5f1b4a7 ("ASoC: wm8960: Fix playback in CPU DAI master
mode") broke wm8960 codec master mode by choosing "bad" SYSCLK values.

This patch partially reverts commit mentioned above by restoring the
SYSCLK values. It turns out that using params_physical_width instead of
params_width in the previous patch it is enough to fix CPU DAI mode.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
6 years agoMLK-21078-3 soc: imx: enable RX interrupt for IPC response
Anson Huang [Sat, 9 Mar 2019 01:25:23 +0000 (09:25 +0800)]
MLK-21078-3 soc: imx: enable RX interrupt for IPC response

For IPC communication, CPU will be busy polling MU RX channel
after sending IPC message if IPC response is needed, such
mechanism wastes too much CPU resource if SCU takes long time
to finish the IPC request, so now enable RX interrupt for IPC
response.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
6 years agoMLK-21078-2 arm64: dts: imx8qm/imx8qxp: remove early_power_on property
Anson Huang [Fri, 8 Mar 2019 14:44:02 +0000 (22:44 +0800)]
MLK-21078-2 arm64: dts: imx8qm/imx8qxp: remove early_power_on property

Since RPMSG switches to use LSIO's MU instead of M4's MU,
the LSIO MU's irq is inside GIC IRQ domain, NOT in intmux
irq domain, so no need to power on intmux early during system
resume.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
6 years agoMLK-21078-1 soc: imx: remove early power on operation
Anson Huang [Sat, 9 Mar 2019 01:23:12 +0000 (09:23 +0800)]
MLK-21078-1 soc: imx: remove early power on operation

Previously, RPMSG uses M4 domain's MU which is inside
intmux irq domain, and RPMSG irq has IRQF_EARLY_RESUME
set, so intmux needs to be powered up at syscore phase
before irqchip resume. Now RPMSG switches to use LSIO's
MU which is inside GIC irq domain, so no need to have
early power on operation for intmux, remove it.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
6 years agoMLK-21153 driver: tty: Fix resume dump caused by uart clock
Jacky Bai [Fri, 15 Mar 2019 04:44:37 +0000 (12:44 +0800)]
MLK-21153 driver: tty: Fix resume dump caused by uart clock

Fix the uart clock disable mismatch when doing system
suspend & resume.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
6 years agoMLK-21152-2 rtc: imx-sc: fix RTC set time fail
Anson Huang [Fri, 15 Mar 2019 03:02:53 +0000 (11:02 +0800)]
MLK-21152-2 rtc: imx-sc: fix RTC set time fail

The RTC set time MUST be done from secure EL3 mode, so
need to use SMC call to trap to ATF for calling RTC
set time SCU API, also add check for non RTC event
in SC MU IRQ notifier.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
6 years agoMLK-21152-1 arm64: dts: imx8qxp: correct isi irq type setting
Anson Huang [Fri, 15 Mar 2019 02:53:35 +0000 (10:53 +0800)]
MLK-21152-1 arm64: dts: imx8qxp: correct isi irq type setting

GIC irqchip driver introduces the warning when IRQ type is
set to IRQ_TYPE_NONE while it is NOT belonging to GIC_IRQ_TYPE_PARTITION,
the ISI irqs' setting trigger below WARNING during kernel boot
up, set ISI irqs type to IRQ_TYPE_LEVEL_HIGH to avoid such
warning during kernel bootup, the GIC driver ONLY supports
IRQ_TYPE_LEVEL_HIGH and IRQ_TYPE_EDGE_RISING for SPIs actually.

drivers/irqchip/irq-gic-v3.c:
WARN_ON(*type == IRQ_TYPE_NONE &&
    fwspec->param[0] != GIC_IRQ_TYPE_PARTITION);

[    0.543404] WARNING: CPU: 1 PID: 1 at drivers/irqchip/irq-gic-v3.c:975
 gic_irq_domain_translate+0xa8/0x110
[    0.552725] Modules linked in:
[    0.555770] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.26-03309-g4fed199-dirty #230
[    0.563756] Hardware name: Freescale i.MX8QXP MEK (DT)
[    0.568883] pstate: 00000005 (nzcv daif -PAN -UAO)
[    0.573663] pc : gic_irq_domain_translate+0xa8/0x110
[    0.578619] lr : irq_create_fwspec_mapping+0x64/0x33c
[    0.583650] sp : ffff00000805b890
[    0.586950] x29: ffff00000805b890 x28: ffff80083be9d440
[    0.592249] x27: 0000000000000000 x26: 0000000000000001
[    0.597548] x25: ffff80083be9d440 x24: ffff0000094b8000
[    0.602848] x23: 0000000000000000 x22: ffff00000805b908
[    0.608147] x21: ffff80083ff93188 x20: ffff0000094b8000
[    0.613446] x19: ffff80083c81c000 x18: 000000000000000e
[    0.618746] x17: 0000000000000001 x16: 0000000000000019
[    0.624045] x15: 0000000000000033 x14: 000000000000004c
[    0.629344] x13: 00000000000002fd x12: 0000000000000000
[    0.634644] x11: 0000000000000020 x10: 0101010101010101
[    0.639943] x9 : 0000000000000001 x8 : 7f7f7f7f7f7f7f7f
[    0.645242] x7 : 0000000000000000 x6 : 0000000000000051
[    0.650542] x5 : ffff000008485f14 x4 : ffff000008f9a388
[    0.655841] x3 : ffff00000805b8cc x2 : 0000000000000000
[    0.661141] x1 : 00000000a110c8ee x0 : 0000000000000000
[    0.666442] Call trace:
[    0.668879]  gic_irq_domain_translate+0xa8/0x110
[    0.673481]  irq_create_of_mapping+0x80/0xa8
[    0.677741]  of_irq_get+0x70/0xe4
[    0.681039]  of_irq_to_resource+0x38/0xfc
[    0.685036]  of_irq_to_resource_table+0x4c/0x68
[    0.689555]  of_device_alloc+0x120/0x1b8
[    0.693461]  of_platform_device_create_pdata+0x7c/0x11c
[    0.698674]  of_platform_bus_create+0x140/0x388
[    0.703191]  of_platform_bus_create+0x1a0/0x388
[    0.707711]  of_platform_populate+0x50/0xd4
[    0.711882]  of_platform_default_populate_init+0xbc/0xd0
[    0.717181]  do_one_initcall+0x58/0x168
[    0.721004]  kernel_init_freeable+0x1b4/0x274
[    0.725347]  kernel_init+0x10/0x104
[    0.728821]  ret_from_fork+0x10/0x18
[    0.732387] ---[ end trace 7132294cf9624401 ]---

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
6 years agoMLK-15328-2 arm64: Kconfig: select KEYBOARD_SNVS_PWRKEY for i.mx8mq
Anson Huang [Tue, 4 Jul 2017 03:23:03 +0000 (11:23 +0800)]
MLK-15328-2 arm64: Kconfig: select KEYBOARD_SNVS_PWRKEY for i.mx8mq

Select KEYBOARD_SNVS_PWRKEY for i.MX8MQ by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 0e61b7f0240ac2111a64da416666c28e34727e74)

6 years agoMLK-15328-1 input: keyboard: add i.mx8mq snvs onoff button support
Anson Huang [Tue, 4 Jul 2017 03:22:15 +0000 (11:22 +0800)]
MLK-15328-1 input: keyboard: add i.mx8mq snvs onoff button support

i.MX8MQ use SNVS ONOFF button, add support for it.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 76be69050848a8f3a1438056c0b48aeecc4c1c86)

6 years agoMLK-21149-02 arm64: dts: imx: fix the build warning of endpoint on imx8mm
Jacky Bai [Fri, 15 Mar 2019 02:31:55 +0000 (10:31 +0800)]
MLK-21149-02 arm64: dts: imx: fix the build warning of endpoint on imx8mm

Fix the build warning of endpoint to follow the device tree spec.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
6 years agoMLK-21149-01 arm64: dts: imx: update the usdhc compatible string on imx8mm
Jacky Bai [Fri, 15 Mar 2019 01:52:32 +0000 (09:52 +0800)]
MLK-21149-01 arm64: dts: imx: update the usdhc compatible string on imx8mm

The usdhc controller on i.MX8MM is compatible with i.MX7D, so update
the compatible property.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
6 years agoMLK-18617-3 pwm: imx: Use 32k clock if it is supplied
Liu Ying [Fri, 15 Jun 2018 06:09:47 +0000 (14:09 +0800)]
MLK-18617-3 pwm: imx: Use 32k clock if it is supplied

The PWM in i.MX8qxp MIPI subsystem needs to use the
'32k' clock to work properly.  This patch gets this
clock in the PWM driver and uses it if it is supplied.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit a343cc44ee9aa4be408c51b02176c8d0970a698d)

Conflicts:
drivers/pwm/pwm-imx.c

6 years agoMLK-18627 pwm: imx: Add clk_ipg for imx8qm
Leonard Crestez [Mon, 18 Jun 2018 16:26:16 +0000 (19:26 +0300)]
MLK-18627 pwm: imx: Add clk_ipg for imx8qm

As part of converting the imx pwm driver to an atomic apply function the
code handling ipg clock was dropped. Add it back because on imx8qm it is
indeed required.

This fixes the same issue as imx_4.9.y commit
ce627dbfd76e ("MLK-16973-4 pwm: imx: Use ipg and per clks in ->config, ->enable and ->disable")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reported-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Tested-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Reviewed-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21148-3 arm64: defconfig: enable i.MX SC RTC
Anson Huang [Fri, 15 Mar 2019 01:38:59 +0000 (09:38 +0800)]
MLK-21148-3 arm64: defconfig: enable i.MX SC RTC

Select i.MX SC RTC by default.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
6 years agoMLK-21148-2: soc: imx: enable SCU notifier
Anson Huang [Fri, 15 Mar 2019 01:37:53 +0000 (09:37 +0800)]
MLK-21148-2: soc: imx: enable SCU notifier

Enable i.MX8 SCU notifier for handling general MU
irq event.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
6 years agoMLK-21148-1 arm64: dts: imx8qm: correct isi irq type setting
Anson Huang [Fri, 15 Mar 2019 00:49:00 +0000 (08:49 +0800)]
MLK-21148-1 arm64: dts: imx8qm: correct isi irq type setting

GIC irqchip driver introduces the warning when IRQ type is
set to IRQ_TYPE_NONE while it is NOT belonging to GIC_IRQ_TYPE_PARTITION,
the ISI irqs' setting trigger below WARNING during kernel boot
up, set ISI irqs type to IRQ_TYPE_LEVEL_HIGH to avoid such
warning during kernel bootup, the GIC driver ONLY supports
IRQ_TYPE_LEVEL_HIGH and IRQ_TYPE_EDGE_RISING for SPIs actually.

drivers/irqchip/irq-gic-v3.c:
WARN_ON(*type == IRQ_TYPE_NONE &&
fwspec->param[0] != GIC_IRQ_TYPE_PARTITION);

[    0.650117] WARNING: CPU: 3 PID: 1 at drivers/irqchip/irq-gic-v3.c:975
 gic_irq_domain_translate+0xa8/0x110
[    0.659434] Modules linked in:
[    0.662478] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.19.26-04846-g3ebadee #216
[    0.669944] Hardware name: Freescale i.MX8QM MEK (DT)
[    0.674984] pstate: 00000005 (nzcv daif -PAN -UAO)
[    0.679759] pc : gic_irq_domain_translate+0xa8/0x110
[    0.684717] lr : irq_create_fwspec_mapping+0x64/0x33c
[    0.689747] sp : ffff00000806b890
[    0.693049] x29: ffff00000806b890 x28: ffff8008f81264c0
[    0.698349] x27: 0000000000000000 x26: 0000000000000001
[    0.703647] x25: ffff8008f81264c0 x24: ffff0000094b8000
[    0.708946] x23: 0000000000000000 x22: ffff00000806b908
[    0.714246] x21: ffff8008fff77d00 x20: ffff0000094b8000
[    0.719545] x19: ffff8008f9824000 x18: ffff00000923a000
[    0.724844] x17: ffff000009239000 x16: ffff000009239948
[    0.730144] x15: 0000000000000001 x14: ffffffffffffffff
[    0.735443] x13: 000000000000030f x12: 0000000000000000
[    0.740742] x11: 0000000000000030 x10: 0101010101010101
[    0.746042] x9 : 0000000000000006 x8 : 7f7f7f7f7f7f7f7f
[    0.751341] x7 : 0000000000000000 x6 : 0000000000000092
[    0.756641] x5 : ffff000008485f14 x4 : ffff000008f9a0a0
[    0.761940] x3 : ffff00000806b8cc x2 : 0000000000000000
[    0.767240] x1 : 00000000a110c8ee x0 : 0000000000000000
[    0.772542] Call trace:
[    0.774976]  gic_irq_domain_translate+0xa8/0x110
[    0.779580]  irq_create_of_mapping+0x80/0xa8
[    0.783841]  of_irq_get+0x70/0xe4
[    0.787138]  of_irq_to_resource+0x38/0xfc
[    0.791134]  of_irq_to_resource_table+0x4c/0x68
[    0.795655]  of_device_alloc+0x120/0x1b8
[    0.799562]  of_platform_device_create_pdata+0x7c/0x11c
[    0.804774]  of_platform_bus_create+0x140/0x388
[    0.809289]  of_platform_bus_create+0x1a0/0x388
[    0.813806]  of_platform_populate+0x50/0xd4
[    0.817983]  of_platform_default_populate_init+0xbc/0xd0
[    0.823280]  do_one_initcall+0x58/0x168
[    0.827104]  kernel_init_freeable+0x1b4/0x274
[    0.831446]  kernel_init+0x10/0x104
[    0.834921]  ret_from_fork+0x10/0x18
[    0.838482] ---[ end trace 52dbd1b75308ae5a ]---

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
6 years agoMLK-21109 arm64: Kconfig: All imx8 HAVE_IMX_RPMSG
Leonard Crestez [Tue, 12 Mar 2019 15:16:04 +0000 (17:16 +0200)]
MLK-21109 arm64: Kconfig: All imx8 HAVE_IMX_RPMSG

This was skipped during initial boot-to-prompt porting

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-11 arm64: defconfig: Enable more drivers from imx_4.14.y
Leonard Crestez [Mon, 11 Mar 2019 19:20:28 +0000 (21:20 +0200)]
MLK-21080-11 arm64: defconfig: Enable more drivers from imx_4.14.y

The initial import of imx_4.14.y arm64 defconfig was ahead of actually
enabling imx for arm64 so many drivers were disabled.

Import again to enable more drivers.

Following are still disabled:

 * SND_SOC_AK4497: Does not compile
 * SND_SOC_IMX_DSP: Does not compile
 * EXTCON_PTN5150: Does not compile
 * SPI_FSL_FLEXSPI: Does not compile
 * REGULATOR_BD71837: Does not compile
 * KEYBOARD_IMX_SC_PWRKEY: Does not compile
 * RTC_DRV_IMX_SC: Does not compile
 * VIDEO_MXC_CSI_CAMERA: Does not link
 * CRYPTO_DEV_FSL_CAAM: Abort on probe

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-10 PCI: imx: Simplify PCI_IMX6 depends on
Leonard Crestez [Mon, 11 Mar 2019 16:56:02 +0000 (18:56 +0200)]
MLK-21080-10 PCI: imx: Simplify PCI_IMX6 depends on

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64.

Simplify PCI_IMX6 "depends on" to just "ARCH_MXC || COMPILE_TEST" and
make it actually build on imx8.

Fixes: 2c3ecbe0d6a4 ("MLK-15064-4 PCI: imx: enable pcie support on imx8")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-09 net: fec: Replace ARCH_MXC_ARM64 with HAVE_IMX_SC
Leonard Crestez [Mon, 11 Mar 2019 16:52:07 +0000 (18:52 +0200)]
MLK-21080-09 net: fec: Replace ARCH_MXC_ARM64 with HAVE_IMX_SC

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64.

Update the FEC driver to check for CONFIG_HAVE_IMX_SC around
SCFW-dependent code.

Fixes: 800ae684d992 ("MLK-16022 net: fec: get mac address from fuse")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-08 irqchip: imx-irqsteer imx-intmux: Replace ARCH_MXC_ARM64
Leonard Crestez [Mon, 11 Mar 2019 18:02:12 +0000 (20:02 +0200)]
MLK-21080-08 irqchip: imx-irqsteer imx-intmux: Replace ARCH_MXC_ARM64

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64 so the current condition is never enabled.

Copy upstream Kconfig instead for irqsteer and intmux.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-07 nvmem: imx-scu-ocotp: Depend on HAVE_IMX_SC
Leonard Crestez [Mon, 11 Mar 2019 18:00:21 +0000 (20:00 +0200)]
MLK-21080-07 nvmem: imx-scu-ocotp: Depend on HAVE_IMX_SC

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64 so the current condition is never enabled.

Make it depend on HAVE_IMX_SC instead because it depends on SCFW API.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-06 thermal: imx_sc: Depend on HAVE_IMX_SC
Leonard Crestez [Mon, 11 Mar 2019 17:57:21 +0000 (19:57 +0200)]
MLK-21080-06 thermal: imx_sc: Depend on HAVE_IMX_SC

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64 so the current condition is never enabled.

Make it depend on HAVE_IMX_SC instead because it depends on SCFW API.

Fixes: 166ac38501ae ("MLK-14972-02 driver: thermal: Add i.MX8QM/QXP thermal support")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21080-05 gpio: Kconfig: Make GPIO_MXC_PAD_WAKEUP depend on HAVE_IMX_SC
Leonard Crestez [Mon, 11 Mar 2019 17:22:55 +0000 (19:22 +0200)]
MLK-21080-05 gpio: Kconfig: Make GPIO_MXC_PAD_WAKEUP depend on HAVE_IMX_SC

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64 so the current condition is never enabled.

Make it depend on HAVE_IMX_SC instead because it depends on SCFW API.

Fixes: e972661a45c5 ("MLK-19305-2 gpio: mxc: add gpio PAD wakeup support")
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21051 dt-bindings: pinctrl: Sync SCFW header to commit ef4a5057
Leonard Crestez [Fri, 8 Mar 2019 13:07:33 +0000 (15:07 +0200)]
MLK-21051 dt-bindings: pinctrl: Sync SCFW header to commit ef4a5057

Replace manually added pads with defines from SCFW export package.

Fixes: 197e0b941b37 ("MLK-21052-23 dt-bindings: pads-imx8qm: Add pads missing from SCFW API")
Fixes: 14f4ea8d1a1c ("MLK-21052-14 dt-bindings: pads-imx8qxp: Add pads missing from SCFW API")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 21dc9c9834783b13999fcdd1d9dbe50c4ae730ae)

6 years agoMLK-20958-2 imx8: Replace SC_R_LAST with SC_R_NONE in DTB
Leonard Crestez [Wed, 27 Feb 2019 19:50:44 +0000 (21:50 +0200)]
MLK-20958-2 imx8: Replace SC_R_LAST with SC_R_NONE in DTB

We are currently using SC_R_LAST as a marker for imx8 power domain tree
nodes without a resource attached. This value is compiled into dtb as
part of the linux build and used by uboot.

The SC_R_LAST constant changes frequently as SCFW resources are added
(by design) and every time we need to update linux and uboot headers
together or boot can fail.

Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE
defined to be 0xFFF0.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f573dbd5ce119740ad30b663e3599cb75e6f67ed)

6 years agoMLK-20099-2 PCI: imx: use ext osc as pcie refclk on 8mm
Richard Zhu [Fri, 8 Mar 2019 07:26:47 +0000 (15:26 +0800)]
MLK-20099-2 PCI: imx: use ext osc as pcie refclk on 8mm

Use the external osc as the pcie refclk on 8mm evk board.
- Do not turn off the over ride of rc's clkreq#, when
L1SS is not enabled.
NOTE: L1SS_EN would be set at both RC and EP by
pcie_config_aspm_link when the L1SS is supported
by the link.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMMIOT-152 Update Secure Data Path physical address
Olivier Masse [Tue, 22 Jan 2019 16:19:14 +0000 (17:19 +0100)]
MMIOT-152 Update Secure Data Path physical address

Change-Id: I5837a5d54e2e27503b532b811d477f1d142b2b99
Signed-off-by: Olivier Masse <olivier.masse@nxp.com>
(cherry picked from commit 3ba5908a9e5efa3b5698da3a5c57572e2155f621)

6 years agoMMIOT-152: imx8mm RDC configuration update
Olivier Masse [Thu, 27 Sep 2018 13:11:12 +0000 (15:11 +0200)]
MMIOT-152: imx8mm RDC configuration update

Change-Id: I8fb3b2515b6fa02cbb7c6849fd0661e4f3f66ee7
Signed-off-by: Olivier Masse <olivier.masse@nxp.com>
(cherry picked from commit 4b862c5dadd165310e1bdae7894b8f8f6f7b4f7e)

6 years agoMMIOT-152: imx8mm: update SDP physical memory space
Olivier Masse [Wed, 26 Sep 2018 16:09:17 +0000 (18:09 +0200)]
MMIOT-152: imx8mm: update SDP physical memory space

Change-Id: I410909ce69f79846c8956c185570af2e933c829a
Signed-off-by: Olivier Masse <olivier.masse@nxp.com>
(cherry picked from commit b46e3b88cb3c2353201463c46cb634babc01f0ab)

6 years agoMMIOT-152 imx8mm drm device tree
Olivier Masse [Tue, 25 Sep 2018 13:58:07 +0000 (15:58 +0200)]
MMIOT-152 imx8mm drm device tree

Change-Id: Ic43bc3086562edc513f125605d416fe928c12135
Signed-off-by: Olivier Masse <olivier.masse@nxp.com>
(cherry picked from commit 0879ae0289bb034ecf3d990b2e35024ad5464645)

6 years agoMLK-20998 ARM: dts: imx7ulp: move testing features to EVKB.
Shenwei Wang [Thu, 28 Feb 2019 15:08:57 +0000 (09:08 -0600)]
MLK-20998 ARM: dts: imx7ulp: move testing features to EVKB.

Move the emmc/lpuart/sdcard/sensor/spi-slave testing features
from EVK to EVKB board.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
(cherry picked from commit d8a1f7ccec0154bea139ae58dde9e1b181e0b9d8)

6 years agoMLK-20416-4 ARM: dts: imx7ulp-evkb: add dtb for RK055IQH042 panel support
Fancy Fang [Tue, 20 Nov 2018 08:11:22 +0000 (16:11 +0800)]
MLK-20416-4 ARM: dts: imx7ulp-evkb: add dtb for RK055IQH042 panel support

On IMX7ULP-EVKB board, add a new dtb 'imx7ulp-evk-rm68191
-qhd.dts' to enable the 'RK055IQH042' MIPI panel display
on this platform.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 32a1254ac9f224a496c8504ed423646b471c758c)

6 years agoMLK-20416-3 ARM: dts: imx7ulp-evkb: add dtb for RK055AHD042 panel support
Fancy Fang [Tue, 20 Nov 2018 07:45:05 +0000 (15:45 +0800)]
MLK-20416-3 ARM: dts: imx7ulp-evkb: add dtb for RK055AHD042 panel support

On IMX7ULP-EVKB board, add a new dtb 'imx7ulp-evk-rm68200
-wxga.dts' to enable the 'RK055AHD042' MIPI panel display
on this platform.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 21f585f7ba2e46a0660f4d9cf4a187dfb2e21bfa)

6 years agoMLK-20397 dts: arm: imx7ulp: add SOMB and EVKB revA board support
Andy Duan [Fri, 16 Nov 2018 03:59:50 +0000 (11:59 +0800)]
MLK-20397 dts: arm: imx7ulp: add SOMB and EVKB revA board support

The main difference for EVKB(SOMB REVA + EVKB RevA) comparing with
EVK(SOM RevB2 + BB RevB1):
- SOMB REVA change: WIFI module Cypress 1DX replace with QCA 1PJ
- BB EVKB RevA change: MIPI connector

The EVKB board focus on default functions on board without rework,
WIFI/BT, and MIPI feature test. Currently, the patch don't consider
other functions with rework needed.

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 84e25f0ec7ae0cbb216b05bfae7fde4cde56e8ee)

6 years agoMLK-20724: uapi: add RGBA to exend V4L2 standard format for android usage
Guoniu.Zhou [Mon, 14 Jan 2019 06:23:03 +0000 (14:23 +0800)]
MLK-20724: uapi: add RGBA to exend V4L2 standard format for android usage

Android has RGBA format output but V4L2 framework do not have this format
.In order to support this in our mem2mem driver, we need to extend V4L2
format.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 24c970a517e1e4a860967255b0cca62c6e2f3c2e)
Only add uapi part to help yocto build
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoASoC: fsl: refine the asrc driver for imx8qm
Viorel Suman [Sun, 30 Apr 2017 15:11:00 +0000 (18:11 +0300)]
ASoC: fsl: refine the asrc driver for imx8qm

The clock source of ASRC in imx8qm is changed.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit b791083c0c38b324dc0544532c1e2398a5fd0e66)
Port early because uapi diffs could break yocto
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21085 uapi: Add missing imx8 headers
Srikanth Krishnakar [Sun, 3 Mar 2019 11:39:46 +0000 (17:09 +0530)]
MLK-21085 uapi: Add missing imx8 headers

Copy missing uapi headers from rel_imx_4.14.98_2.0.0_ga_rc1 to help
userspace build.

VPU code will be ported later.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoARM: dts: imx6ull: Add imx6ull-tempmon property
Vipul Kumar [Wed, 6 Mar 2019 12:51:08 +0000 (18:21 +0530)]
ARM: dts: imx6ull: Add imx6ull-tempmon property

As per 'commit 2067b757e972 ("ARM: dts: imx6ul: Add imx6ul-tempmon")'
added tempmon property.

Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
(cherry picked from commit 56e54055c129fcbf8e4971e73e583c3f14e95da0)

6 years agoMLK-21084 arm64: dts: Copy all imx8 dts
Leonard Crestez [Thu, 7 Mar 2019 14:22:26 +0000 (16:22 +0200)]
MLK-21084 arm64: dts: Copy all imx8 dts

Copy all from rel_imx_4.14.98_2.0.0_ga_rc1 in order to help external
build systems.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21060 i2c: lpi2c: Fix clk fetch
Leonard Crestez [Wed, 6 Mar 2019 13:08:16 +0000 (15:08 +0200)]
MLK-21060 i2c: lpi2c: Fix clk fetch

During porting commit ede264acf031 ("MLK-14982-1 imx8: lpi2c: add ipg
clk for lpi2c driver") which replaced the single clk
with clk_ipg and clk_per was skipped.

Part of the code was later added in commit 96dbdd8c3d0b ("MLK-16713 i2c:
imx-lpi2c: add runtime pm support") except the "clk" field was kept and
clk_get calls were not updated.

Fix imx7ulp boot by fetching both clocks.

Fixes: 96dbdd8c3d0b ("MLK-16713 i2c: imx-lpi2c: add runtime pm support")

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21059-5 arm64: defconfig: Enable imx8mm
Leonard Crestez [Tue, 5 Mar 2019 22:57:11 +0000 (00:57 +0200)]
MLK-21059-5 arm64: defconfig: Enable imx8mm

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21059-4 arm64: Kconfig: Add imx8mm support
Leonard Crestez [Tue, 5 Mar 2019 22:35:25 +0000 (00:35 +0200)]
MLK-21059-4 arm64: Kconfig: Add imx8mm support

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21059-3 arm64: dts: Add imx8mm support
Leonard Crestez [Tue, 5 Mar 2019 22:35:41 +0000 (00:35 +0200)]
MLK-21059-3 arm64: dts: Add imx8mm support

Copy from rel_imx_4.14.98_2.0.0_ga_rc1

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21059-2 pinctrl: Add imx8qmm support
Leonard Crestez [Tue, 5 Mar 2019 22:39:29 +0000 (00:39 +0200)]
MLK-21059-2 pinctrl: Add imx8qmm support

Copy from rel_imx_4.14.98_2.0.0_ga_rc1

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21059-1 clk: Add imx8mm support
Leonard Crestez [Tue, 5 Mar 2019 22:40:56 +0000 (00:40 +0200)]
MLK-21059-1 clk: Add imx8mm support

Copy from rel_imx_4.14.98_2.0.0_ga_rc1

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21054-6 arm64: defconfig: Enable imx8mq
Leonard Crestez [Mon, 4 Mar 2019 21:26:35 +0000 (23:26 +0200)]
MLK-21054-6 arm64: defconfig: Enable imx8mq

Also disable fbdev dcss (does not build and is not needed) and enable
SERIAL_IMX_CONSOLE for debugging on 8m.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21054-5 arm64: Kconfig: Add imx8mq support
Leonard Crestez [Mon, 4 Mar 2019 21:41:47 +0000 (23:41 +0200)]
MLK-21054-5 arm64: Kconfig: Add imx8mq support

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21054-4 arm64: dts: Add imx8mq support
Leonard Crestez [Mon, 4 Mar 2019 21:54:59 +0000 (23:54 +0200)]
MLK-21054-4 arm64: dts: Add imx8mq support

Copy from rel_imx_4.14.98_2.0.0_ga_rc1

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21054-3 pinctrl: Enable imx8mq support
Leonard Crestez [Mon, 4 Mar 2019 22:00:36 +0000 (00:00 +0200)]
MLK-21054-3 pinctrl: Enable imx8mq support

Copy pin header from rel_imx_4.14.98_2.0.0_ga_rc1 and enable
compilation. The C code of the driver was already accepted in v4.19 in
an acceptable form so we use that.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21054-2 clk: Add imx8mq support
Leonard Crestez [Mon, 4 Mar 2019 21:45:47 +0000 (23:45 +0200)]
MLK-21054-2 clk: Add imx8mq support

Copy from rel_imx_4.14.98_2.0.0_ga_rc1

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21054-1 soc: imx: Add gpc-psci
Leonard Crestez [Tue, 5 Mar 2019 13:10:20 +0000 (15:10 +0200)]
MLK-21054-1 soc: imx: Add gpc-psci

Copy from rel_imx_4.14.98_2.0.0_ga_rc1

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
6 years agoMLK-21057 serial: imx: Restore proper init of shadow registers
Leonard Crestez [Tue, 5 Mar 2019 17:24:11 +0000 (19:24 +0200)]
MLK-21057 serial: imx: Restore proper init of shadow registers

Upstream commit 3a0ab62f43de ("serial: imx: implement shadow registers
for UCRx and UFCR") made the imx_uart_readl/writel functions use a
"cache" to avoid reads/writers to hardware for some registers.

Those values need to be initialized once at probe time using real reads
from hardware; using imx_uart_readl for this is obviously non-functional

Fixes: 372312842fe7 ("tty: serial: imx: use imx_uart_writel() and imx_uart_readl()")

This is required for imx8mq to boot and likely fixes other things.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Andy Duan <fugang.duan@nxp.com>
6 years agoMLK-17597-1: i.MX8MQ workaround affecting other SoCs
Nitin Garg [Thu, 15 Feb 2018 21:30:51 +0000 (15:30 -0600)]
MLK-17597-1: i.MX8MQ workaround affecting other SoCs

Fix iMX8MQ workaround to be specific to that
machine.

Signed-off-by: Nitin Garg <nitin.garg@nxp.com>
(cherry picked from commit 5fc3246190546c455f47fa3094ee717bd84a167c)