Register gpio chip after rpmsg channel ready, otherwise consumer
might use gpio before rpmsg channel ready, and cause issue.
Late register the gpio chip could let consumer use defer probe
correclty.
Reported-by: Elven Wang <elven.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Need to change compatible to basler,basler-camera-vvcam to prevent breaking
exiting basler camera compatibility.
Signed-off-by: Oliver F. Brown <oliver.brown@nxp.com>
Some of i.MX8M SoCs have MU clock, they need to be managed in runtime
to make sure the MU domain can be off in runtime, add runtime PM
callback to handle MU clock.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
The call flow:
devm_regmap_init_mmio_clk
- clk_prepare()
- clk_pm_runtime_get()
Cause the power domain of ipg clock always be enabled.
which impact the power consumption.
so we can't bind clock with regmap, but explicitly enable
clock when using.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
The call flow:
devm_regmap_init_mmio_clk
- clk_prepare()
- clk_pm_runtime_get()
Cause the power domain of mem clock always be enabled.
which impact the power consumption.
so we can't bind clock with regmap, but explicitly enable
clock when using.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
With imx-pcm-dma, the dma channel is created in probe, when
there is power domain attached with dma device, the power
domain will be enabled when channel is created, then the
power of the domain will be always enabled from beginning.
So switch to imx-pcm-dma-v2, then the dma channel will be
created when playback or capture really started.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
The call flow:
devm_regmap_init_mmio_clk
- clk_prepare()
- clk_pm_runtime_get()
Cause the power domain of bus clock always be enabled.
which impact the power consumption.
So we can't bind clock with regmap, then explicitly enable
clock when using.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
This patch builds in i.MX8qm/qxp/mp LDB encoder drivers by default.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
This patch builds in Mixel LVDS (combo) PHY drivers by default.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
This patch creates platform specific LDB encoder drivers for
i.MX53, i.MX6qdl, i.MX8qm, i.MX8qxp and i.MX8mp. The encoders
would attach the bridge added in Freescale i.MX LVDS display
bridge driver. This way, the platform specific things can be
handled in different drivers, like special phy settings, clocks
and SCU misc settings, etc.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
This patch adds Freescale i.MX LVDS display bridge driver.
The driver would add a common drm bridge which can be attached
to platform specific LDB encoder drivers.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Instead of looking at ldb_ctrl to determine whether split mode is
enabled or not, we may cache it in struct imx_ldb directly so that
it can be accessed easily.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Both of the two LVDS channels should be disabled for split mode
in enc->disable().
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
No one is using the LVDS_BIT_MAP_SPWG/JEIDA enums, so remove them.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
Add sdma_get_firmware_wait() since sdma firmware have to be ready after
runtime resume. That could be done for runtime feature on i.mx8mp since
the only sdma client audio driver request sdma channel after rootfs
mounted which means no any block in sdma_get_firmware_wait() as
sdma_get_firmware().
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Add runtime suspend/resume support on i.mx8mp. So sdma will be initialized
and firmware will be loaded at first channel requested, sdma will be off
once no any channel is running.For the legacy chips just keep sdma on
always as before.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Split sdma_init_sw and sdma_init_hw from sdma_init, so that sdma_init_hw
could be delayed in channel allocate phase and it's easier for implementing
runtime suspend/resume in the next.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
It is possible that the regulator_get will return defer probe error if
the regulator is not ready when cpufreq doing probe. cpufreq need to
defer probe again if regulator_get return '-EPROBE_DEFER', so fix it.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
Initialize the variable value to fix build warning.
CC drivers/pci/controller/dwc/pci-imx6.o
drivers/pci/controller/dwc/pci-imx6.c: In function ‘imx6_pcie_probe’:
drivers/pci/controller/dwc/pci-imx6.c:2676:5: warning: ‘ret’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Since the typec port data role is separated from power role,
so check the port data capability when setting data role.
Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/1581666828-2063-1-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6ecc632d4b)
Fix the warn dump of the device driver bound link.
Indroduced by kernel updates "515db266a9dace92b0cbaed9a6044dd5304b8ca9"
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
The function snvs_reader uses a switch case with intentionnal
fall through which is an error displayed at compilation.
This patch uses the keyword "fallthrough" to fix the issue.
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Move clock management and registers reads/writes into
runtime PM callbacks.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
Provide dev in clk_register in order to allow subsequent
power domain management.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>
A power domain associated with a device may be disabled in
a separate thread by "genpd_power_off_work_fn" function in
case the device has no PM runtime enabled at that moment.
This will stop the parent clock of "bus" clk and hang
the probe in regmap read/write operation. In order to avoid
this PM runtime must be enabled before any regmap read/write
ops. Aside of this replace clk bus clocks with
pm_runtime_get/put_sync calls.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Fixes: c2641e1974 ("MLK-23618-9: ASoC: fsl_sai: Don't bind clock with regmap")
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Set regmap to use regcache only in probe in order to avoid
issue on cat /sys/kernel/debug/regmap/30cc0000.xcvr/registers
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Due to limited video PLL frequency points on i.MX8mp, the exact pixel clock
rate of a panel's video mode is likely unsupported by the clock tree.
The driver would take a slightly fixed up pixel clock rate to match with
the clock tree capability and the panel should still work with that.
This should work based on the agreement that the chosen panel should work
with the existing PLL frequency points.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
The lvds-channel@0 fsl,data-mapping property is wrongly moved
out from lvds-channel@0 node to the parent ldb node by a previous
commit. This patch fixes the property.
Fixes: 46552dfa17 ("MLK-23694-12 arm64: dts: imx8mp-evk: integrate LVDS bridge display in")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
For kernel 5.4, we use community driver for ov5640, so correct some
properties to satify the need of ov5640 driver.
Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
set media axi clock to 500MHz and apb clock to 200MHz for 4K
Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.zhou <guoniu.zhou@nxp.com>
When do suspend test, cmd id 0x5b timeout during suspend:
Timeout cmd id (615.964367) = 0x5b, act = 0x1
It is not necessary to download 0x5b command after disconnect
to AP, sometimes this command has no response and causes timeout.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Before using resource table, check whether this is a valid header.
M4 image might not publish a valid header, so let's catch it to avoid
kernel panic.
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
add compatible string "fsl,imx8-vipsi" to identify the vip core
for PM Qos
Signed-off-by: minjie.zhuang@nxp.com
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
The issue is GPU will crash when do dsp suspend test, and only
meet this issue when load GPU as module.
The reason is that dsp framework's global data set size little
than actul size. So dsp will touch the memory that not owned
dsp, then caused GPU crash.
Signed-off-by: Zhang Peng <peng.zhang_8@nxp.com>
Support HBR and 6 channel.
For HBR, it only support compressed bitstream, sample rate
is 192kHz, and 8 channels.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
gcc 10 will default to -fno-common, which causes this error at link
time:
(.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here
This is because both dtc-lexer as well as dtc-parser define the same
global symbol yyloc. Before with -fcommon those were merged into one
defintion. The proper solution would be to to mark this as "extern",
however that leads to:
dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
26 | extern YYLTYPE yylloc;
| ^~~~~~
In file included from dtc-lexer.l:24:
dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
127 | extern YYLTYPE yylloc;
| ^~~~~~
cc1: all warnings being treated as errors
which means the declaration is completely redundant and can just be
dropped.
Signed-off-by: Dirk Mueller <dmueller@suse.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-pick from upstream]
Cc: stable@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit e33a814e77)
Enlarge timeout delay to 50ms, 20ms seems not enough. it is easy
to timeout using 20ms when m4 enter VLLS mode.
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This provides a virtio transport driver over the Inter-VM shared memory
device as found in QEMU and the Jailhouse hypervisor.
...
Note: Specification work for both ivshmem and the virtio transport is
ongoing, so details may still change.
Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This adds a UIO driver the ivshmem device, found in QEMU and the
Jailhouse hypervisor. It exposes the MMIO register region and all shared
memory section to userspace. Interrupts are configured in one-shot mode
so that userspace needs to re-enable them after each event via the
Interrupt Control register. The driver registers all possible MSI-X
vectors, coalescing them into the single notifier UIO provides.
Note: Specification work for the interface is ongoing, so details may
still change.
Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This allows to tag memory regions read-only, denying userspace to map
them writable. Default remains read/write.
Acked-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>