Fancy Fang [Tue, 22 Aug 2017 08:56:24 +0000 (16:56 +0800)]
MLK-16242-7 video: fbdev: dcss: add non-blocking mode in pan display
Add non-blocking mode for pan display interface to
support very special cases to focus on the maximum
FPS display.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Tue, 22 Aug 2017 08:51:00 +0000 (16:51 +0800)]
MLK-16242-6 video: fbdev: dcss: refine cfifo synchronization logic
Remove the synchronization workaround in 'commit_to_fifo()'
and add ctxld wq flush calls in pan display, since the pan
display usually requires blocking mode behavior. But other
functions can also work in non-blocking mode, so perform
synchronization handling in 'commit_to_fifo' is not good
for the interfaces which doesn't require blocking mode.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Tue, 22 Aug 2017 08:43:50 +0000 (16:43 +0800)]
MLK-16242-5 video: fbdev: dcss: add 'FBIO_WAITFORVSYNC' support
Implement 'FBIO_WAITFORVSYNC' ioctl which is a non-standard
command to provide vsyc active wait function for user space
applications.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Tue, 22 Aug 2017 03:32:55 +0000 (11:32 +0800)]
MLK-16242-4 video: fbdev: dcss: realize 'fb_ioctl' interface
Realize the 'fb_ioctl' hook interface with a blank
function. Non-standard ioctl commands implementations
can be added later.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Mon, 21 Aug 2017 11:22:44 +0000 (19:22 +0800)]
MLK-16242-3 video: fbdev: dcss: add dtg irq handling
Add the 8th interrupt of DCSS handling for DTG
which is used to trigger the signal when the VSYNC
start point reaches. By default, this irq is masked
to avoid too many unnecessary interrupt handles.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Mon, 21 Aug 2017 11:07:57 +0000 (19:07 +0800)]
MLK-16242-2 video: fbdev: dcss: correct some irq indexes
The hw irq index for
DEC400D, DTRC2 and DTRC3 should
be '15', '16' and '17'. So correct the corresponding
macro definitions in DCSS driver.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Mon, 21 Aug 2017 10:02:04 +0000 (18:02 +0800)]
MLK-16242-1 ARM64: dts: imx8mq: add the 8th irq for DCSS
The 8th interrupt of DCSS comes from DTG module
and it is used as a general purpose timings
interrupt which can generate an interrupt at a
programmable X/Y corordinate. There are total
four such interrupts in DTG. And this one will
be used for a VSYNC Active interrupt.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Liu Ying [Tue, 22 Aug 2017 07:54:57 +0000 (15:54 +0800)]
MLK-16240 drm/bridge: it6263: Don't use freed edid structure in ->get_modes()
We call the helper drm_detect_hdmi_monitor() to check if the EDID blob read
from a monitor indicates the monitor is connected via HDMI or not. We pass
an edid structure to the helper. However, the structure has been freed
before we use it. This patch moves the helper up before the structure is
freed to fix the issue.
Fixes:
a5c01aa91842 ("MLK-15001-25 drm/bridge: Add ITE IT6263 LVDS to HDMI transmitter support")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Li Jun [Thu, 17 Aug 2017 13:34:08 +0000 (21:34 +0800)]
MLK-12606 ARM64: defconfig: Enable USB host CDC ACM
Build USB host cdc acm driver as module.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Li Jun [Tue, 8 Aug 2017 13:34:19 +0000 (21:34 +0800)]
MLK-16013-41 ARM64: imx8mq: remove dis_u2_susphy_quirk for usb
As the USB3 hotplug issue identified by IC team, the recommended
solution is to use FREECLK by clear COMMMONONN, so remove this
quick temp workaround.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Li Jun [Tue, 8 Aug 2017 13:24:21 +0000 (21:24 +0800)]
MLK-16013-40 phy: phy-fsl-imx8mq-usb: clear COMMONONN to keep FREECLK running
COMMONONN: This signal controls whether the high-speed Bias and PLL
blocks remain powered—consuming additional current during Suspend and
Sleep modes. As imx8mq USB3 ITP&SOF have to use FREECLK, so clear
COMMONONN to be 0(valid) to make FREECLK always running, this is the
recommended setting from design team.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Li Jun [Fri, 4 Aug 2017 16:19:56 +0000 (00:19 +0800)]
MLK-16013-39 ARM64: defconfig: enable typec and power delivery
Build-in typec, power delivery port manager and tcpci driver.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Daniel Baluta [Mon, 21 Aug 2017 12:48:45 +0000 (15:48 +0300)]
ASoC: codecs: fsl_mqs: Add PM support
Save the values of registers at suspend and restore
it at resume.
We don't need to implement runtime PM support because
MQS is already enabled in startup() and disabled in
shutdown().
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Jason Liu [Mon, 21 Aug 2017 21:00:02 +0000 (05:00 +0800)]
MLK-16239 clk: imx: imx8qm/qxp: Adding the missing sentinel value of match table
Need to put the sentinel value to the end of the of_device_id array.
This patch also fixes the following KASAN complains when KASAN is enabled:
[ 0.671315] ==================================================================
[ 0.678400] BUG: KASAN: global-out-of-bounds in __of_match_node+0x70/0xb8 at addr
ffff2000092958a8
[ 0.687321] Read of size 1 by task swapper/0/1
[ 0.691760] Address belongs to variable imx8qm_match+0xc8/0x260
[ 0.697666] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
4.9.11-03033-ge2e5fb2 #44
[ 0.704955] Hardware name: Freescale i.MX8QM ARM2 (DT)
[ 0.710081] Call trace:
[ 0.712528] [<
ffff20000808b438>] dump_backtrace+0x0/0x278
[ 0.717907] [<
ffff20000808b6c4>] show_stack+0x14/0x20
[ 0.722949] [<
ffff2000085311ec>] dump_stack+0xa4/0xc8
[ 0.727990] [<
ffff200008256cbc>] kasan_report_error+0x4c4/0x4d8
[ 0.733892] [<
ffff2000082570f8>] kasan_report+0x40/0x48
[ 0.739103] [<
ffff2000082552cc>] __asan_load1+0x4c/0x58
[ 0.744318] [<
ffff200008d7ac28>] __of_match_node+0x70/0xb8
[ 0.749791] [<
ffff200008d7aca8>] of_match_node+0x38/0x60
[ 0.755088] [<
ffff200008d7d870>] of_match_device+0x30/0x50
[ 0.760565] [<
ffff200008858dbc>] platform_match+0x6c/0x130
[ 0.766040] [<
ffff200008855dec>] __device_attach_driver+0x5c/0x138
[ 0.772205] [<
ffff200008852d18>] bus_for_each_drv+0xd0/0x130
[ 0.777852] [<
ffff2000088557fc>] __device_attach+0x13c/0x1a0
[ 0.783499] [<
ffff200008855f30>] device_initial_probe+0x10/0x18
[ 0.789406] [<
ffff200008854608>] bus_probe_device+0xe0/0xf0
[ 0.794965] [<
ffff200008851310>] device_add+0x5c8/0x818
[ 0.800176] [<
ffff200008d7dc3c>] of_device_add+0x5c/0x88
[ 0.805477] [<
ffff200008d7e854>] of_platform_device_create_pdata+0xb4/0x118
[ 0.812426] [<
ffff200008d7e8cc>] of_platform_device_create+0x14/0x20
[ 0.818771] [<
ffff200009913374>] arm_smmu_of_init+0x38/0x50
[ 0.824332] [<
ffff200009913298>] of_iommu_init+0xa4/0x100
[ 0.829715] [<
ffff200008083990>] do_one_initcall+0x90/0x1c8
[ 0.835278] [<
ffff2000098c1034>] kernel_init_freeable+0x290/0x330
[ 0.841361] [<
ffff20000905be28>] kernel_init+0x10/0x110
[ 0.846567] [<
ffff200008083680>] ret_from_fork+0x10/0x50
[ 0.851860] Memory state around the buggy address:
[ 0.856648]
ffff200009295780: fa fa fa fa 00 03 fa fa fa fa fa fa 00 00 00 00
[ 0.863854]
ffff200009295800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 0.871065] >
ffff200009295880: 00 00 00 00 00 fa fa fa fa fa fa fa 00 00 00 00
[ 0.878270] ^
[ 0.882792]
ffff200009295900: 02 fa fa fa fa fa fa fa 00 00 07 fa fa fa fa fa
[ 0.890003]
ffff200009295980: 00 00 00 00 01 fa fa fa fa fa fa fa 00 00 00 00
[ 0.897208] ==================================================================
Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Zhou Peng-B04994 [Mon, 21 Aug 2017 03:02:55 +0000 (11:02 +0800)]
MLK-16196-2: [i.MX8MQ/Hantro]: enhance power management for suspend/resume
in resume functions, vpu clock maybe not enabled at all,
so clk enable/disable are required by hw related operations in resume context
Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Fancy Fang [Fri, 18 Aug 2017 11:11:25 +0000 (19:11 +0800)]
MLK-16222-2 video: fbdev: dcss: use new coeffs from tables
The new coeff tables defined in 'imx_dcss_table.h' can
make common alpha blending operations to be correct.
So config the corresponding registers with these new
coeffs in the probe stage with only once and remove
the previous duplicate configurations. Besides, one
dtg config needs to be adjusted accordingly.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Fancy Fang [Fri, 18 Aug 2017 10:55:23 +0000 (18:55 +0800)]
MLK-16222-1 video: fbdev: dcss: define some tables in a header file
Define some data tables to list all the coefficients config
which only requires to be configured once. The tables include:
1. Scaler Coeffs
2. HDR10 Input Pipe LUT and CSC Coeffs
3. HDR10 Output Pipe Linear to Non_Linear Conversion
and CSC Coeffs.
Each table entry includes the register offset addr and the
value needs to be written to this register.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Richard Zhu [Thu, 17 Aug 2017 05:27:06 +0000 (13:27 +0800)]
MLK-16215 PCI: imx: refine pcie codes
- correct the msi address
- only do shutdown reset for imx6q pcie, since only
imx6qdl pcie doesn't have the reset mechanism.
- don't limit the max link speed of imx pcie to gen2
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Han Xu [Fri, 18 Aug 2017 16:32:33 +0000 (11:32 -0500)]
MLK-16226: arm64: dts: disable the NAND node in i.MX8QXP default device tree
NAND node was disabled in default device tree, the patch
4ad48e3cf
wrongly inserted usb node in the middle caused NAND enabled.
Signed-off-by: Han Xu <han.xu@nxp.com>
Gao Pan [Fri, 18 Aug 2017 10:35:11 +0000 (18:35 +0800)]
MLK-16203 enable runtime pm of i2c temporary when do system suspend
When we do system suspend, the runtime pm will be disabled, but we need
to control the PMIC to power on/off the regulator, if the runtime pm is
disabled, if will failed to request runtime wakeup. So data transfer will
failed.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Viorel Suman [Fri, 18 Aug 2017 09:13:38 +0000 (12:13 +0300)]
MLK-13975-2: ASoC: fsl: qxp: Make AMIX working for 8 channels and 96kHz rate
The patch mirrors commit
7c953daaf599 ("MLK-13975: ASoC: fsl: Make
AMIX working for 8 channels and 96kHz rate") for QXP.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Viorel Suman [Fri, 18 Aug 2017 09:09:14 +0000 (12:09 +0300)]
MLK-13975-1: ASoC: fsl: qxp: Assign audio clocks within it's own power domain
The patch mirrors commit
f154ceffe411 ("MLK-13975: ASoC: fsl: Assign audio
clocks within it's own power domain") for QXP.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Gao Pan [Thu, 10 Aug 2017 09:32:39 +0000 (17:32 +0800)]
MLK-16220 lpi2c: imx8: improve i2c driver probe priority
use subsys_initcall for i2c driver to improve i2c driver probe priority
Signed-off-by: Gao Pan <pandy.gao@nxp.com>
Guoniu.Zhou [Fri, 18 Aug 2017 02:09:08 +0000 (10:09 +0800)]
MLK-16217: PXP: fix pxp rotate yuv formate video issue
Because of IC limitation, pxp only can use rotation0 engine to
do rotation operation.
Correct coordinate settings of ps and out buffer.
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
Viorel Suman [Fri, 18 Aug 2017 08:39:07 +0000 (11:39 +0300)]
MLK-13975: ASoC: fsl: Make AMIX working for 8 channels and 96kHz rate
Double the master and related clocks frequencies for AMIX SAIs in order to
make AMIX working for 8 channels and 96k Hz rate.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Peter Chen [Wed, 2 Aug 2017 07:04:02 +0000 (15:04 +0800)]
MLK-16065-16 usb: cdns3: gadget: fix no one handled interrupt issue
If there are too many interrupts for non-control ep, the
no-one handled interrupt issue will occur due to without
return IRQ_HANDLED for them.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Wed, 2 Aug 2017 05:45:14 +0000 (13:45 +0800)]
MLK-16065-15 usb: cdns3: gadget: refine the enable endpoint operation
Move non-ep enable operation from set_configuration to ep_enable
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Wed, 16 Aug 2017 06:59:44 +0000 (14:59 +0800)]
MLK-16065-14 ARM64: dts: fsl-imx8qm-lpddr4-arm2.dts: add USB Type-C port support
Due to pin conflict with other modules, we can only enable
host mode for Type-C port. If the user wants to use both
host and device mode for Type-C port, please use
fsl-imx8qm-lpddr4-arm2-usb3.dts instead.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Tue, 25 Jul 2017 01:50:32 +0000 (09:50 +0800)]
MLK-16065-13 ARM64: defconfig: add USB testing driver and USB2 comliance client driver
Add USB testing driver and USB2 comliance client driver (used for
USB2 test in USB3 IP).
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Tue, 11 Jul 2017 01:34:54 +0000 (09:34 +0800)]
MLK-16065-12 ARM64: defconfig: add EXTCON_PTN5150 support
It is a Type-C CC logic chip, the USB driver will get external events
for detach and attach for kinds of Type-C cables.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Fri, 9 Jun 2017 06:09:20 +0000 (14:09 +0800)]
MLK-16065-11 ARM64: defconfig: enable cadence USB3
Enable both USB host and device function for Cadence USB3 IP.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Fri, 21 Jul 2017 03:15:45 +0000 (11:15 +0800)]
MLK-16065-10 usb: host: xhci-dbg: do not print reseverd registers for imx cdns host
When access reserved registers, the cdns host will trigger
an exception, and the synchronous external abort will occur
at ARM64 platforms.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Wed, 19 Jul 2017 08:30:58 +0000 (16:30 +0800)]
MLK-16065-9 usb: cdns3: host: add quirk for avoid access reverved registers
Add quirk for CDNS USB3 host.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Wed, 19 Jul 2017 08:27:02 +0000 (16:27 +0800)]
MLK-16065-8 usb: host: xhci: add XHCI_SKIP_ACCESS_RESERVED_REG quirk
The IMX XHCI host which uses cadence USB3 IP is not compatible with
xHCI spec, the controller will trigger an exception if
visiting reserved registers, but the xHCI spec does not forbid it,
so add one quirk for skipping access reserved registers.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Tue, 25 Jul 2017 01:39:40 +0000 (09:39 +0800)]
MLK-16065-7 usb: cdns3: add Cadence USB3 controller driver
Add Cadence USB3 IP driver, this is the 1st version for this driver,
so wrapper layer and PHY layer are still IP core file (core.c).
Below functions are supported:
- Basic host function
- Limited gadget function, only ACM (old g_seiral) are supported, and
mass_storage support is not very well.
- Role switch between host and device through extcon design
(Eg, Type-C application NXP PTN5150).
Below functions are missing:
- Multi-queue support at gadget function, without this feature, many
gadget function are missing.
- Low power mode support, including system PM and runtime PM
- Wakeup support
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Tue, 25 Jul 2017 01:38:25 +0000 (09:38 +0800)]
MLK-16065-6 doc: binding: cdns-usb3: add binding-doc for Cadence USB3
Add binding-doc for Cadence USB3
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Peter Chen [Mon, 24 Jul 2017 09:30:23 +0000 (17:30 +0800)]
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>
Peter Chen [Mon, 24 Jul 2017 09:16:54 +0000 (17:16 +0800)]
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>
Peter Chen [Mon, 24 Jul 2017 07:21:25 +0000 (15:21 +0800)]
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>
Peter Chen [Mon, 24 Jul 2017 07:14:21 +0000 (15:14 +0800)]
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>
Peter Chen [Mon, 24 Jul 2017 07:11:49 +0000 (15:11 +0800)]
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>
Bai Ping [Fri, 11 Aug 2017 05:50:56 +0000 (13:50 +0800)]
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>
Bai Ping [Fri, 11 Aug 2017 05:50:08 +0000 (13:50 +0800)]
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>
Robin Gong [Thu, 10 Aug 2017 09:03:45 +0000 (17:03 +0800)]
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>
Bai Ping [Thu, 17 Aug 2017 07:54:06 +0000 (15:54 +0800)]
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>
Peng Fan [Thu, 17 Aug 2017 08:09:25 +0000 (16:09 +0800)]
MLK-16204-5: arm64: defconfig: build nvmem and ocotp
Build NVMEM and OCOTP driver
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 18 Aug 2017 03:19:08 +0000 (11:19 +0800)]
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>
Peng Fan [Thu, 17 Aug 2017 07:59:00 +0000 (15:59 +0800)]
MLK-16204-3: clk: imx8mq: add ocotp clock
Add OCOTP clock support.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 17 Aug 2017 00:47:49 +0000 (08:47 +0800)]
MLK-16204-2 arm64: dts: add ocotp node
Add ocotp node.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 17 Aug 2017 09:06:21 +0000 (17:06 +0800)]
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>
Fancy Fang [Fri, 18 Aug 2017 01:49:36 +0000 (09:49 +0800)]
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>
Fancy Fang [Thu, 17 Aug 2017 08:08:04 +0000 (16:08 +0800)]
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>
Liu Ying [Thu, 17 Aug 2017 06:09:08 +0000 (14:09 +0800)]
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>
Liu Ying [Thu, 17 Aug 2017 06:13:45 +0000 (14:13 +0800)]
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>
Liu Ying [Thu, 17 Aug 2017 05:55:53 +0000 (13:55 +0800)]
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>
Liu Ying [Tue, 15 Aug 2017 07:59:44 +0000 (15:59 +0800)]
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>
Yuchou Gan [Thu, 17 Aug 2017 16:35:50 +0000 (00:35 +0800)]
MGS-3093 [#imx-701] Fix power-off random failure when GPU become idle
Workaround to fix this issue, gpu failed to power off because chip is not idle when tried to cut the power, tried and wait until gpu is idle and then tried to power off will help.
Date: Aug 15, 2017
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
Fancy Fang [Wed, 16 Aug 2017 11:36:28 +0000 (19:36 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 10:58:08 +0000 (18:58 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 10:28:15 +0000 (18:28 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 10:10:01 +0000 (18:10 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 09:36:21 +0000 (17:36 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 08:38:20 +0000 (16:38 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 08:26:35 +0000 (16:26 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 07:59:03 +0000 (15:59 +0800)]
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>
Fancy Fang [Wed, 16 Aug 2017 07:44:55 +0000 (15:44 +0800)]
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>
Fancy Fang [Fri, 11 Aug 2017 10:54:59 +0000 (18:54 +0800)]
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>
Fancy Fang [Wed, 9 Aug 2017 11:11:01 +0000 (19:11 +0800)]
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>
Fancy Fang [Fri, 11 Aug 2017 10:44:03 +0000 (18:44 +0800)]
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>
Fancy Fang [Wed, 9 Aug 2017 10:51:53 +0000 (18:51 +0800)]
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>
Robby Cai [Thu, 20 Apr 2017 09:17:42 +0000 (17:17 +0800)]
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)
Richard Zhu [Tue, 15 Aug 2017 09:18:17 +0000 (17:18 +0800)]
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>
Richard Zhu [Tue, 15 Aug 2017 09:15:50 +0000 (17:15 +0800)]
MLK-16176-1 ARM: dts: imx6qp: remove the duplicated node
The pcie dts node is dulicated, remove none-used one.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Fugang Duan [Mon, 14 Aug 2017 12:58:13 +0000 (20:58 +0800)]
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>
Fugang Duan [Mon, 14 Aug 2017 09:46:11 +0000 (17:46 +0800)]
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>
Zhou Peng-B04994 [Wed, 16 Aug 2017 03:45:00 +0000 (11:45 +0800)]
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>
Adriana Reus [Tue, 1 Aug 2017 09:31:34 +0000 (12:31 +0300)]
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>
Anson Huang [Wed, 16 Aug 2017 07:52:06 +0000 (15:52 +0800)]
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>
Peter Chen [Thu, 8 Jun 2017 06:37:25 +0000 (14:37 +0800)]
usb: core: hub: controller driver name may be NULL
The controller driver may be NULL if the controller device
is the middle device between platform device and roothub.
This middle device may not need a device driver due to all
hardware control can be at platform device driver, this
platform device is usually a dual-role USB controller device.
The benefit of using this middle device is we can keep both
controller device's private data (known as struct usb_hcd)
for USB core use, and platform device's private data for
platform driver use.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Peter Chen <peter.chen@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Peter Chen [Fri, 23 Jun 2017 06:39:27 +0000 (14:39 +0800)]
usb: chipidea: core: do not register extcon notifier if extcon device is not existed
This issue is detected when the system has another device driver
which registers USB connector extcon device, fix it by adding
extcon device check.
Signed-off-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Bai Ping [Tue, 15 Aug 2017 08:07:05 +0000 (16:07 +0800)]
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>
Gao Pan [Wed, 9 Aug 2017 08:47:05 +0000 (16:47 +0800)]
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>
Gao Pan [Thu, 10 Aug 2017 09:11:53 +0000 (17:11 +0800)]
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>
Bjorn Andersson [Sat, 8 Oct 2016 04:23:12 +0000 (21:23 -0700)]
rpmsg: Introduce a driver override mechanism
Similar to other subsystems it's useful to provide a mechanism to force
a specific driver match on a device, so introduce this.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Henri Roosen [Fri, 2 Jun 2017 11:36:04 +0000 (13:36 +0200)]
rpmsg: cleanup incorrect function in dev_err message
Trivial cleanup for incorrect function in dev_err message
Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Dan Carpenter [Sat, 21 Jan 2017 04:53:40 +0000 (07:53 +0300)]
rpmsg: unlock on error in rpmsg_eptdev_read()
We should unlock before returning if skb_dequeue() returns a NULL.
Fixes:
c0cdc19f84a4 ("rpmsg: Driver for user space endpoint interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Bjorn Andersson [Wed, 11 Jan 2017 14:35:12 +0000 (06:35 -0800)]
rpmsg: Driver for user space endpoint interface
This driver allows rpmsg instances to expose access to rpmsg endpoints
to user space processes. It provides a control interface, allowing
userspace to export endpoints and an endpoint interface for each exposed
endpoint.
The implementation is based on prior art by Texas Instrument, Google,
PetaLogix and was derived from a FreeRTOS performance statistics driver
written by Michal Simek.
The control interface provides a "create endpoint" ioctl, which is fed a
name, source and destination address. The three values are used to
create the endpoint, in a backend-specific way, and a rpmsg endpoint
device is created - with the three parameters are available in sysfs for
udev usage.
E.g. to create an endpoint device for one of the Qualcomm SMD channel
related to DIAG one would issue:
struct rpmsg_endpoint_info info = { "DIAG_CNTL", 0, 0 };
int fd = open("/dev/rpmsg_ctrl0", O_RDWR);
ioctl(fd, RPMSG_CREATE_EPT_IOCTL, &info);
Each created endpoint device shows up as an individual character device
in /dev, allowing permission to be controlled on a per-endpoint basis.
The rpmsg endpoint will be created and destroyed following the opening
and closing of the endpoint device, allowing rpmsg backends to open and
close the physical channel, if supported by the wire protocol.
Cc: Marek Novak <marek.novak@nxp.com>
Cc: Matteo Sartori <matteo.sartori@t3lab.it>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Sandor Yu [Thu, 10 Aug 2017 10:51:10 +0000 (18:51 +0800)]
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>
Viorel Suman [Fri, 11 Aug 2017 08:30:08 +0000 (11:30 +0300)]
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>
Viorel Suman [Fri, 11 Aug 2017 07:45:48 +0000 (10:45 +0300)]
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>
Zhou Peng-B04994 [Fri, 11 Aug 2017 03:45:25 +0000 (11:45 +0800)]
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>
Mihai Serban [Wed, 9 Aug 2017 13:54:45 +0000 (16:54 +0300)]
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>
Han Xu [Wed, 9 Aug 2017 22:00:19 +0000 (17:00 -0500)]
MLK-16150: arm64: config: enable JFFS2 in defconfig
enable JFFS2 support in default configuration
Signed-off-by: Han Xu <han.xu@nxp.com>
Liu Ying [Thu, 10 Aug 2017 07:26:09 +0000 (15:26 +0800)]
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>
Liu Ying [Wed, 9 Aug 2017 05:15:39 +0000 (13:15 +0800)]
MLK-16169 drm: Move imx-drm down after bridge in Makefile
We've got imx platforms which use bridges in imx-drm, e.g.,
the i.MX8qm and i.MX8qxp arm2 platforms use it6263 LVDS
to HDMI bridges in imx-drm. So, it would be straight
forward to put imx-drm down after bridge in Makefile to
avoid unnecessary deferral probe.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Liu Ying [Wed, 9 Aug 2017 05:01:35 +0000 (13:01 +0800)]
MLK-16168 gpu: Move imx up before drm in Makefile
We register dpu and ipu-v3 crtc platform devices in dpu and ipu-v3
base drivers for imx-drm to use, so it would be straight forward to
put imx before drm in Makefile.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Anson Huang [Thu, 10 Aug 2017 06:27:09 +0000 (14:27 +0800)]
MLK-16182 defconfig: enable ondemand as default cpu-freq governor
Enable ondemand as default cpu-freq governor to save power.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Shengjiu Wang [Wed, 9 Aug 2017 07:25:47 +0000 (15:25 +0800)]
MLK-16174: ASoC: fsl_hifi4: load firmware in device open phase.
Move the load firmware operation from probe function to open,
Then firmware can be loaded from rootfs.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Shenwei Wang [Wed, 9 Aug 2017 19:03:14 +0000 (14:03 -0500)]
MLK-16179 arm64: dts: imx8qxp-mek: enable the bcmdhd pcie driver
Enable the driver to support the Murata 1FD (BCM89359).
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Mihai Serban [Tue, 8 Aug 2017 17:41:07 +0000 (20:41 +0300)]
MLK-16163: WiFi: Fix compiler warning in bcmdhd driver
The mode the BUSTYPE macro is defined in
drivers/net/wireless/bcmdhd_1363/include/bcmdefs.h
will always trigger the below compiler warning when BCMBUSTYPE
is not defined.
Keep the comparison semantic but fix the warning by using a different
variable.
drivers/net/wireless/bcmdhd_1363/siutils.c: In function ‘si_doattach’:
drivers/net/wireless/bcmdhd_1363/siutils.c:520:14: warning:
self-comparison always evaluates to false [-Wtautological-compare]
if (bustype != BUSTYPE(bustype)) {
^~
Fixes:
b2290481a4f1 ("MLK-16042-1: Add bcmdhd v1.363 PCIE driver")
Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Reviewed-by: Octavian Purdila <octavian.purdila@nxp.com>