MLK-16564-03 ARM: imx_v7_defconfig: enable rpmsg gpio driver
Enable CONFIG_GPIO_IMX_RPMSG to support rpmsg gpio driver in default.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
MLK-16564-02 dts: imx7ulp-evk: add rpmsg gpio PTA and PTB support
Add rpmsg gpio PTA and PTB support.
Since currently M4 image support dynamical channel allocation,
and reserve below memory for kernel service and app channel:
* --0x9FF00000~0x9FF0FFFF: pmic,pm,audio,keys,gpio
* --0x9FF10000~0x9FF1FFFF: pingpong,virtual tty
Change the rpmsg instances of A core part to sync with M core.
Test M4 image built from Wayne Feng, M4 image commit ID: b1321d4aca82
Reviewed-by: Richa...
MLK-16564-01 gpio: imx-rpmsg: add rpmsg virtual gpio driver
Add rpmsg virtual gpio driver support.
i.MX7ULP GPIO PTA and PTB resource are managed by M4 core, setup one
simple protocol with M4 core based on RPMSG virtual IO to let A core
access such GPIOs that is what the driver do.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
MLK-16533: ARM64: dts: imx8qm-mek: Enable wm8960 codec
wm8960 can be found on i.mx8 QM MEK CPU board. It uses SAI1 as
a digital audio interface and also ASRC for rate conversion.
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16563-3: ARM64: dts: support AUDIO IO board with imx8qxp-mek
AUDIO IO board (SCH-501-1-005960-A1) has CS42888 codec and connect
to MCIMX-8X-BB via PCIe.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16563-2: ASoC: imx-cs42888: support 12.288MHz mclk of codec
The esai and cs42888 can use different mclk, which has different
frequency. But machine driver thought they are same frequency, which
may cause issue in some case.
Base on above conclusion, the codec can support 12.288MHz mclk.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16563-1: ASoC: cs42xx8: reset the codec in the beginning of probe
In AUDIO IO board for imx8qxp mek, after board reset, the codec
failed to probe, system can't find codec device on i2c bus.
The reason is not clear, but add reset operation in the beginning of
probe can fix this issue.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16545-2: ASoC: fsl_hifi4: add support to reset hifi4 codec
add cases to support resetting the hifi4 codec when receiving
HIFI4_RESET_CODEC command from the user space.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16545-1: uapi: mxc_hifi4: add reset command for hifi4
add reset command declaration into mxc_hifi4.h file,
this command is used to reset hifi4 codec when seeking
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
MLK-16558: ASoC: fsl_hifi4: add reference counter for hifi4 device
When abnormal situation occurs and the current process terminates
abnormally, the hifi4 driver can't get the HIFI4_CODEC_CLOSE CMD
from user space to release the multi-codec resource, so the current
resource can't be used again.
Have found that the fsl_hifi4_close() function can be called
implicitly when process terminates abnormally, so add a reference
counter in fsl_hifi4_open() and fsl_hifi4_close() to check this
abnormal...
MLK-16530-3 rpmsg: imx: init mu and limit the pingpong cycles
- Init mu power and clk.
- Change the cycles of the pingpong demot refer to
the limitation of M4 side.
When the received data larger than 100, the
pingpong of M4 side would be finished.
BuildInfo: SCFW 9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16530-1 ARM64: dts: imx8: enable rpmsg support
enable imx8qm rpmsg support, and validated the
pingpong demo.
add the mu power and clk on imx8qxp.
BuildInfo: SCFW 9e9f6ec6, IMX-MKIMAGE 0, ATF 0
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
MLK-16538-3: hdmi/dp: Add imx8qm hdmi/dp driver
Add hdmi/dp drm architecture driver.
HDMI and DP driver can work in imx8qm ARM2 board.
The driver support basic hotplug function.
Default working mode is 1080p60.
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
MLK-16538-2: hdmi api: Relocate hdmi api soure code
-Relocate hdmi api source code from drivers/video/fbdev/mxc/cdn_hdp
to drivers/mxc/hdp.
-Add displayport and hdcp api function.
-Move t28hpc_hdmitx function from api source code folder
to hdmi fb driver folder.
-Update imx8 hdmi fb driver according api source code change.
-Sync api source code with CDN_API_1_0_33 release.
Acked-by: Robby Cai <robby.cai@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
MLK-16225: imx8 pm: Check of_device_is_available
This patch causes imx8-pd nodes marked with status = "disabled" to be
ignored. This is very common in devicetree handling.
When running with xen the hypervisor will convert all xen,passthrough
properties to status = "disabled" before passing dtb to dom0. This patch
allows power domains to be marked this way and have them be ignored by
the host automatically.
The alternative is to remove the power domain nodes and references using
/delete-nod...
MLK-16225: clk: imx8qm: Add fsl,lpcg_base_offset property
Right now the imx8qm clock provider hardcodes physical addresses. In
virtualization scenarios the intermediate physical addresses visible
from a guest can be different. In theory a 1:1 mapping could be done but
that in xen it would overlap with hardcoded guest ram starting at
0x40000000.
Solve this by adding a property with a common offset for all lpcg
areas. This should be set in the guest dts.
In theory each lpcg block could be re...
MLK-16225: clk: imx8: Do not register clocks for unowned resources
Registering clocks for unowned resources can result in lots of pointless
scfw errors and potential faults when attempting to use LPCG.
Solve this by checking ownership via sc_rm_is_resource_owned and
returning -ENODEV from clock registration functions. The top-level clock
provider is also modified so that it accepts such errors silently.
This is intended for xen but could also be useful for SCFW partitioning.
Signed-off-by...
MLK-16225: clk: imx8qm: Add LPCG_ADDR macro
All this does is replace the cast from physical address with a macro in
order to make later changes easier.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
MLK-16225: clk: imx8qm: Ignore imx8qm-acm node missing
This can happen in virtualization scenarios, so just skip registering
the associated clocks instead of failing to boot.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
MLK-16442-3: dts: imx8qm: Add clock parents for DC clocks.
Adds dt settings for the dpu driver to set the default clock
parents
- PLL1 (dc0_pll0_clk) for dispay0 and PLL2(dc0_pll1_clk) for display1.
Functionality is not changed from dpu driver perspective as the same
parents for the display clocks were used before.
The resulting clock topology for dc0_disp1 is:
dc0_pll1_div 1 1 1188000000 0 0
dc0_pll1_clk 2 2 1188000000 0 0
dc0_d...
MLK-16442-2: clk: imx8qm: Add mux for DC clocks.
DC clocks can choose their clock source between PLL1, PLL2 and
bypass input.
This patch introduces a multiplexer in the dc clock topology to
allow this choice and introduces one set of parents that will be used
for both display0 and display1 clocks.
Clock paths tested:
1. PLL2(dc0_pll1_clk)->DC0_DISP1(dc0_disp1_clk)->LVDS
2. BYP(dc0_bypass0_clk)->DC0_DISP1(dc0_disp1_clk)->LVDS
(BuildInfo: SCFW 9e9f6ec6, IMX-MKIMAGE 0, ATF 0)
Signed-...
MLK-16442-1: clk: clk-mux-scu: Add new mux type.
Display clocks can choose their parrent between various clock sources
(ex pll1, pll2, bypass).
This patch adds a new mux type that uses the underlying support in scfw
to set/get a parent.
(BuildInfo: SCFW 9e9f6ec6, IMX-MKIMAGE 0, ATF 0)
Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
Reviewed by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
MLK-16536-16 video: fbdev: dcss: change 'refcount' to 'struct kref' type
Use 'struct kref' type for 'refcount' field instead of
'atomic_t' to take advantage of 'kref_*()' interface
series. The benefit to do so can improve the defered
cfifo flush performance, since this defered flush does
not need to wait to be done until next vsync happens.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-15 video: fbdev: dcss: improve cfifo wrapping handling
After changing the strategy to 'flush cfifo once per frame',
the cfifo wrapping handling should also be changed accordingly.
Now, when it is found that the cfifo has no enough room from 'in'
to the buffer end to hold the current commit, the 'commit_cfifo'
will cancel this commit and flush the cfifo workqueue before
restart the commit again.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-14 video: fbdev: dcss: correct ret value for 'dcss_wait_for_vsync()'
The correct return value for 'dcss_wait_for_vsync()' when
it executes successfully should be '0'. But this current
value now gets from 'wait_event_interruptible_timeout()'
which returns non-zero value when the wait is not timeout.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-13 video: fbdev: dcss: improve 'kfifo_to_end_len()' macro
The macro 'kfifo_to_end_len()' is used to get the length
between the current kfifo 'in' and the kfifo end. Previous
implementation has a short-coming under the new strategy
that multiple commits are combined into one cfifo flush.
For a simple example, commits 'A' and 'B' are going to be
combined into one flush, and the last byte of 'A' exactly
occupy the last byte of fifo coincidently. Then when handling
the 'B' commit, the...
MLK-16536-12 video: fbdev: dcss: flush cfifo once per frame
Change the cfifo flush to be once per frame to combine
possible multiple flush requests in one frame into one
flush to improve performance. And during one frame, only
flush requests from different channels can be combined,
and the different requests from the same channel cannot
be combined into one flush.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-11 video: fbdev: dcss: add '__maybe_unused' to 'dtg_irq_mask()'
The function 'dtg_irq_mask()' is not used at this
moment which caused gcc compiler generate the build
warning:
"‘dtg_irq_mask’ defined but not used [-Wunused-function]"
So add attribute '__maybe_unused' to 'dtg_irq_mask()'
functon definition to avoid this build warning.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-10 video: fbdev: dcss: unmask 'IRQ_TC_LINE1' by default
Unmask the 'IRQ_TC_LINE1' when initialize it by default,
since the vsync count can be used as a reference count or
timestamp.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-9 video: fbdev: dcss: remove undesired variables in 'dcss_set_par()'
The variables 'cinfo' and 'chan_info' both refer to the
same 'struct dcss_channel_info' data. So remove 'chan_info'
and its related variables to make code more clean.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-8 video: fbdev: dcss: move 'ctxld_list' field to 'struct ctxld_fifo'
The 'ctxld_list' is more closely related to 'struct ctxld_info'
structure. So moving its definition to this structure is more
reasonable.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-6 video: fbdev: dcss: split 'commit_to_fifo' into three parts
This commit split the function 'commit_to_fifo' into three
parts: 'alloc_cc()', 'commit_cfifo()' and 'flush_cfifo()'.
So that each of the three parts can be used as required,
but not used all together.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-5 video: fbdev: dcss: move 'ctxld_wq' to 'struct ctxld_fifo'
The 'ctxld_wq' is more closely related to 'struct ctxld_info'
structure. So moving its definition to this structure is more
reasonable.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-4 video: fbdev: abstract cfifo 'in' operation
Abstract the process that copy data from 'cb' to 'cfifo'
to a separate function from 'commit_to_fifo()'. This is
a refinement.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-3 video: fbdev: dcss: replace 'kfifo_esize()' by 'esize'
When doing ctxld config, the 'esize' variable is already
assigned to the value derived from 'kfifo_esize()'. So
using the exsiting value instead of deriving it again.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-2 video: fbdev: dcss: refine 'esize' obtainment
The 'esize' is better be got by 'kfifo_esize()'
instead of using 'sizeof' to make the code more
compatible and easier to unserstand.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16536-1 video: fbdev: dcss: use kfifo 'out' to be next read offset
The kfifo 'out' points to the first byte of data to be
consumed next time. So use it to get the data offset to
be accessed by CTXLD and remove unused field 'fifo_in'
from 'struct ctxld_commit'.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
MLK-16551 ARM64: dts: fsl-imx8qxp-mek: enable USB2 port
Both host and device mode are support, and the port is at base board.
Below rework is needed:
Remove R145, R143, R1390, and install R144, R142, R1389.
BuildInfo:
- SCFW 1f59442e, IMX-MKIMAGE fb52c576, ATF
- U-Boot 2017.03-imx_v2017.03+g34be5a2
Acked-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
MLK-16522-4 ARM64: dts: fsl-imx8qxp-mek: add USB3 support
Add TCPCI device NXP PTN5110 as well as USB3 port support, they are
disabled by default due to board rework is needed, it needs to
replace U182 from NTB0104 to NTS0104, please consult hardware team
for detail.
Without rework, but enable USB3 will cause endless of PTN5110 interrupts
due to voltage of ALERN_N from PTN5110 is incorrect.
BuildInfo:
- SCFW 1f59442e, IMX-MKIMAGE fb52c576, ATF
- U-Boot 2017.03-imx_v2017.03+g34be5a2
Acked-...