1
0
Fork 0
Commit Graph

96804 Commits (redonkable)

Author SHA1 Message Date
Liu Ying 549f1b74ba MLK-18162 gpu: imx: dpu: Abstract fetch unit concept
This patch abstracts fetch unit concept for all the fetch units
we have - fetchdecode, fetcheco, fetchlayer and fetchwarp.
They have some similar features and operations which are suitable
to be abstracted.  A lot of boilerplate code is removed.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Weiguang Kong a8393121b0 MLK-17747: dsp: use the name of dsp instead of hifi
In order to avoid the name problem going forward with
integration with Qcom, Qcom has their own dsp and hifi
is competitor, so the hifi name should not be used in
our code.

So use the name of dsp instead of hifi to fix this
problem.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 53ebc26282 MLK-18123-1 gpu: imx: imx8_prg: Rename prg_put_auxilary() to prg_set_primary()
A cosmetic change to rename prg_put_auxilary() to prg_set_primary().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Yuchou Gan bac7f3e196 MLK-18101-5 gpu: imx: imx8_prg: Add prg_put_auxiliary() helper support
This patch adds prg_put_auxiliary() helper support so that users may
set a particular PRG not serve as an auxiliary one.

Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
2018-10-29 11:10:38 +08:00
Yuchou Gan 49d1822009 MLK-18101-1 include: soc: imx8: sc: types: Add SC_C_SEL0 for B0 imx8qxp board
Add SC_C_SEL0 for imx8qm/qxp B0.

Signed-off-by: yuchou gan <yuchou.gan@nxp.com>
2018-10-29 11:10:38 +08:00
Weiguang Kong 118061cbcd MLK-17635-1: ASoC: fsl_dsp: change dsp driver to support new dsp framework
The architecture of dsp framework has been changed, the role of
dsp driver is transferring messages between dsp framework and user space
application, so change dsp driver to support this function.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 75d6256ef9 MLK-18163-1: drm: edid: fix HDMI2.0 deep color depth parsing
The drm_parse_ycbcr420_deep_color_info() is called only for HDMI 2.0,
however the DC masks were incorrectly set. These were set according
to HDMI 1.4 specification.

This patch will set the deep color depth masks to the HDMI 2.x specs
(see Table 10-6 in HDMI 2.x specs for field descriptions).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
(cherry picked from commit e3a1cac6fdd88f4391180d89d5881748214a1b4f)
2018-10-29 11:10:38 +08:00
Robert Chiras 53b73e139c MLK-18106: drm/bridge: Fix nwl-dsi bridge handling
Since the drm_bridge_attach function now supports chained bridges, there
is no need for nwl_dsi_add_bridge and nwl_dsi_del_bridge functions, so
remove them.
Now, we can pass the existent bridge to drm_bridge_attach.

This fixes a bug created during kernel 4.14 rebase process.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Leonard Crestez 22052902da Revert "MLK-10919 net: phy: micrel: add ksz8081 resume function"
This reverts commit c961b277abd69175e1b1ad733ed6b2b911a61211.

This patched worked on 4.14.18 but on 4.14.34 it now causes a deadlock
because upstream changed phy locking:

commit 6bccf8962b ("net: phy: Restore phy_resume() locking assumption"):
6bccf8962b

Instead of fixing locking just revert this patch, a different fix was
already upsteamed for ksz8081 suspend/resume on 6ul-14x14-evk:

commit e6f4292ae0 ("ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties"):
e6f4292ae0
commit 79e498a9c7 ("net: phy: micrel: Restore led_mode and clk_sel on resume"):
79e498a9c7

After reverting this patch suspend/resume still works on imx6ul and
imx6ull evk boards.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang e920ac74ad MLK-18045-1 drm/imx: dcss: define 'struct dma_metadata' for dec400d config
Define a new struct 'dma_metadata' to hold the config parameters
for DEC400D. This struct data should be passed in from the fb's
first gem_obj's 'dma_buf' field.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying b188160b99 MLK-18009 drm/imx: dpu: plane: Support deinterlacing via fetchdecode & vscaler
Fetchdecode may work together with vscaler to do bob deinterlacing.
This patch adds the deinterlacing support for DPU DRM plane by using them.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 051ca3a81c MLK-17931-3 gpu: imx: dpu: common: Add dpu_has_prefetch_fixup() helper support
This patch adds dpu_has_prefetch_fixup() helper support.
Users may use it to tell if a DPU has fixups for prefetch
engines in silicon or not.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying e1e8c9f7ff MLK-17991-7 drm/imx: dpu: kms: Add basic fetchwarp2 support
This patch adds the first subsidiary layer0(out of layer0 to layer7)
support for the fetchwarp2 fetch unit to be the backend of DRM plane.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying b89c75f0d5 MLK-17991-5 gpu: imx: dpu: common: Add basic fetchwarp2 support
Fetchwarp is a type of dpu fetch unit with the additional
warping function.  Each fetchwarp contains 8 subsidiary layers.
Fetchwarp2 can work with fetcheco2 to fetch planar YUV pixel
formats.  Also, it may fetch RGB pixel formats.  This patch
adds basic fetchwarp2 fetch unit support in the dpu common driver
so that it may fetch frames in RGB pixel formats.  YUV pixel formats
and warping function could be supported later.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying f710ad2faf MLK-17991-4 drm/imx: dpu: kms: Add basic fetchlayer0/1 support
This patch adds the first subsidiary layer0(out of layer0 to layer7)
support for the fetchlayer0/1 fetch units to be the backend of DRM plane.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 112cebb4d2 MLK-17991-2 gpu: imx: dpu: common: Add some prefetch engine helpers support
This patch adds some prefetch engine helpers support
in the dpu common driver so that callers may deal with
the prefetch engines of the fetch units the callers
are interested in.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying d0f3617538 MLK-17991-1 gpu: imx: dpu: common: Add basic fetchlayer0/1 support
Fetchlayer is a type of dpu fetch unit.  Each fetchlayer
contains 8 subsidiary layers.  Fetchlayer cannot work with
fetcheco to fetch planar YUV pixel formats.  However, it may
fetch RGB pixel formats.  This patch adds basic fetchlayer0/1
fetch units support in the dpu common driver.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan bec9e9bb36 MLK-17877 ARM64: dts: imx8qxp: change enet to 1.8v timing setting for B0 silicon
i.MX8QXP B0 silicon config enet IO voltage as 2.5V setting in default,
but MEK and ARM2 board only support 1.8V IO. So change the IO voltage
as 1.8V setting.

Set the MAC RGMII timing as TX no delay and RX delay mode as the default
setting for MEK and ARM2 board.

Since i.MX8QXP B0 silicon ENET IO timing change, to reach better timing
and avoid CRC error, MEK base board and ARM2 cpu board should remove the
driver device for the secord enet port.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 16cc274873 MLK-17940-1 gpu: imx: imx8_prg: Add prg_set_blit() helper support
This patch adds prg_set_blit() helper support so that users may
set a particular PRG to be a part of a blit channel.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu b2de207cc1 MLK-17908: ARM64: dts: Add power domains for HDMI resources
Add power domain PD_HDMI_PLL_0/1 and PD_HDMI_I2S.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying efee8da9f7 MLK-17923 drm/imx: dpu: plane: Do not support fb x/y src offset for tile fmts
We don't have correct support for fb x/y source offset for tile formats.
The buffer address calculation is wrong when the offset is non-zero.
Also, finer offset needs a fix in silicon(TKT344978).  So, let's do not
support the offset currently.  We may add it back after we figure out
how the updated silicon supports the offset.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 96f958b789 MLK-17703-2: drm: change HDR metadata infoframe structure
According to ANSI-CTA-861-G specification:
 * EOTF is 8 bit, not 16;
 * metadata type is 8 bit, not 16;
 * There's no "Minimum Content Light Level"

This patch will change the HDR metadata structures to reflect that. Also, this
will fix problems seen on some TVs that were rejecting HDR metadata because
it's size was too big (more than 26 bytes).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Sandor Yu <sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan 14eecf0006 MLK-17837-01 input: misc: rpmsg_input: add rpmsg virtual sensor driver
NXP i.MX7ULP EVK boards all sensors connect with M4 core, A core
has to conmunicate with sensors by virtual io bus like rpmsg bus.
The driver implement the virtual sensor input driver to configure
sensors active/idle/delay actions and report the sensors' event to
user space.

Supply below sysfs for user to enable/disable detector and counter,
set poll delay:
	/sys/class/misc/step_counter/enable
	/sys/class/misc/step_detector/enable
	/sys/class/misc/step_counter/poll_delay

Reviewed-by: Elven Wang <elven.wang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Haibo Chen 1fb5c90b78 MLK-17621-2 mmc: add feature of setting slot index via devicetree alias
Add feature of setting slot index via devicetree alias, to hard code the
mmc/sd root device.

The patch requires additional alias_id fix or it won't work.

Note: minor device number keep independent with this device alias.

Refer to the commit 35928d6c6a76 ("mmc: Allow setting slot index via
devicetree alias").

Acked-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Guoniu.Zhou cbb4eb2537 MLK-17230-2: CI_PI: add power domain names for CI_PI ss
Add power domain macro names for CI_PI subsystem.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit fd8318f4455ceafda963681ce05effd0ad81d714)
2018-10-29 11:10:38 +08:00
Guoniu.Zhou f511fb1c39 MLK-17230-1: CI_PI: register clocks for CI_PI ss
Register clocks for CI_PI subsystem.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit d29308ec4fa29addd049c114520d7628e9e921d7)
2018-10-29 11:10:38 +08:00
Liu Ying 6bf594228b MLK-17803 drm/imx: dpu: kms: Correct the way to do DPR manual/auto mode switch
The DPR works in manual mode for the first frame and we need to
switch it to auto mode so that auto shadow load mechanism works.
The designers require us to switch the DPR manual mode to auto mode
directly for display controllers instead of using the DPR control
done irq handler, because the irq will not come in some cases(which
leads to shadow load failure).  Finer switch operations on DPR
register bits are needed for SW_SHADOW_LOAD_SEL, SHADOW_LOAD_EN,
RUN_EN and REPEAT_EN.  Also, for overlay planes, we need to wait for
a frame additionally in the "on-the-fly" cases to make sure the
switch is successful.  In all, this patch should be able to address
frame dropping and screen tearing issue(due to the shadow load
failure) when users play video on overlay planes.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Mirela Rabulea 6e06811d63 MLK-17684-2: drm/bridge: nwl-dsi: Let CRTC dictate the final bus format
Use the bus format that was established by CRTC in
crtc->mode.private_flags.
This will be available during enable phase.

The DSI host will be configured via interface_color_coding
and pixel_format (DPI-2 interface ports).
Previously the interface_color_coding was hardcoded to 24-bit.

Set the DSI pixel format before it is necessary in
nwl_dsi_get_bit_clock, during imx_nwl_dsi_enable.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
2018-10-29 11:10:38 +08:00
Oliver Brown f8852aa496 MLK-17729: ARM64: dts: Add power domains for display resources
Some resources are being enabled without the associated resource being
powered up.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 294c8f2723 MLK-17646 gpu: imx: dpu: Correct number of fg instances in plane group resource
The resources for a plane group are shared by the two display streams
of one DPU.  Thus, the two Framegen(fg) instances of one DPU should be
in the plane group resource.  The resource users may find the fg instance
onto which the resources are built via the stream id.  This patch corrects
the number of fg instances in a plane group resource from one to two.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Dave Airlie 4b3f1d875a drm: add connector info/property for non-desktop displays [v2]
This adds the infrastructure needed to quirk displays
using edid and to mark them a non-desktop.

A non-desktop display is one which shouldn't normally be included
as a part of a desktop environment.

This is meant to cover head mounted devices like HTC Vive.

v2: Change description from non-standard to non-desktop, add docs

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>

(Ported 66660d4cf2 from git://people.freedesktop.org/~airlied/linux)
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 2f26e8f35c MLK-17634-17: drm: imx: dcss: make P010 tiled formats work
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 2ccd87278f MLK-17634-14: drm: imx: dcss: Add basic HDR10 support
This patch adds basic HDR10 support. However, full support depends on
subsequent patches.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 6ac1f994cc MLK-17634-9: clk: imx8m: add VIDEO2_PLL2 clock tree
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 9b1cfbd3cf MLK-17634-8: drm: imx: dcss: read HDR10 LUTs/CSCs from FW file
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu d0d23ff782 MLK-17634-6: drm: imx: dcss: add P010 drm format
This is 10-bit per channel YUV420 semi-planar.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 24d51d0012 MLK-17634-4: drm: move hdr_panel_metadata to drm_hdmi_info
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Uma Shankar 562c69f7b0 drm: Enable HDR infoframe support
Enable Dynamic Range and Mastering Infoframe for HDR
content, which is defined in CEA 861.3 spec.

 The metadata will be computed based on blending
policy in userspace compositors and passed as a connector
property blob to driver. The same will be sent as infoframe
to panel which support HDR.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
2018-10-29 11:10:38 +08:00
Uma Shankar c7f3576464 drm: Parse Colorimetry data block from EDID
EA 861.3 spec adds colorimetry data block for HDMI.
Parsing the block to get the colorimetry data from
panel.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
2018-10-29 11:10:38 +08:00
Uma Shankar 9c7802fa3e drm: Add HDR capabilty field to plane structure
Hardware may have HDR capability on certain plane
engines. Enabling the same in drm plane structure
so that this can be communicated to user space.

Each drm driver should set this flag to true for planes
which support HDR.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
2018-10-29 11:10:38 +08:00
Uma Shankar fb47d77509 drm: Add HDR source metadata property
This patch adds a blob property to get HDR metadata
information from userspace. This will be send as part
of AVI Infoframe to panel.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
2018-10-29 11:10:38 +08:00
Peter Chen 6285bee2a8 MLK-17380-3 usb: move EH SINGLE_STEP_SET_FEATURE implement to core
Since other USB 2.0 host may need it, like USB2 for XHCI. We move
this design to HCD core.

Acked-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 122d5302ad MLK-17459-2: drm: imx: dcss: add cropping functionality and fix odd resolutions
This patch fixes playback for movies with unaligned widths/heights and
adds cropping functionality for tiled formats. Untiled formats will not
have this feature as cropping is a DTRC function.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying a35b9783dc MLK-17574 gpu: imx: dpu: Fix typos for scaler_scale_mode_t
Fix some typos for enum entry names of scaler_scale_mode_t.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Dong Aisheng 4ffaf007dc MLK-17491-46 clk: imx7ulp: add missing sosc_bus_clk/firc_bus_clk/spll_bus_clk clocks
Add missing sosc_bus_clk/firc_bus_clk/spll_bus_clk clocks which will be used
by other devices later.

All these clocks use the same divider as ddr_div, so ulp_div_table is used.
Besides that, all these clocks need to be controlled by M4, so
CLK_DIVIDER_READ_ONLY is also specified.

Fixes: aacf0b70af26 ("MLK-13441-6 ARM: imx: add i.mx7ulp clock driver")
Cc: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Dong Aisheng 8348172898 MLK-17491-35 clk: fractional-divider: add CLK_FRAC_DIVIDER_ZERO_BASED flag support
Adding CLK_FRAC_DIVIDER_ZERO_BASED flag to indicate the numerator and
denominator value in register are start from 0.

This can be used to support frac dividers like below:
Divider output clock = Divider input clock x [(frac +1) / (div +1)]
where frac/div in register is:
000b - Divide by 1.
001b - Divide by 2.
010b - Divide by 3.

Cc: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Dong Aisheng 3213cec014 MLK-17491-34 clk: clk-divider: add CLK_DIVIDER_ZERO_GATE clk support
For dividers with zero indicating clock is disabled, instead of giving a
warning each time like "clkx: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not
set" in exist code, we'd like to introduce enable/disable function for it.
e.g.
000b - Clock disabled
001b - Divide by 1
010b - Divide by 2
...

Set rate when the clk is disabled will cache the rate request and only
when the clk is enabled will the driver actually program the hardware to
have the requested divider value. Similarly, when the clk is disabled we'll
write a 0 there, but when the clk is enabled we'll restore whatever rate
(divider) was chosen last.

It does mean that recalc rate will be sort of odd, because when the clk is
off it will return 0, and when the clk is on it will return the right rate.
So to make things work, we'll need to return the cached rate in recalc rate
when the clk is off and read the hardware when the clk is on.

NOTE for the default off divider, the recalc rate will still return 0 as
there's still no proper preset rate. Enable such divider will give user
a reminder error message.

Cc: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Dong Aisheng fc24da6cdb MLK-17491-21 clk: imx7ulp: fix RTC OSC clock name
'CKIL' clock name is derived from MX6 SoC series which is invalid for
MX7ULP (can't find it from RM). Changing it to the correct 'ROSC'
which is defined in RM.

The exist 'OSC' name is also changed accordingly which should be SOSC
(System OSC).

Fixes: aacf0b70af26 ("MLK-13441-6 ARM: imx: add i.mx7ulp clock driver")
Cc: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 24bd117119 MLK-17473-4 drm/imx: dcss: handle tiled and compressed layout for primary plane
Add handling code to support tiled and compressed pixel source
layout. The tiled only layout will bypass DEC400D and be resolved
by DPR, since DEC400D is only responsible for decompression.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 18678a59ea MLK-17473-1 drm/fourcc: add modifier for vivante compressed tiled layout
Add a new fb modifier for Vivante compressed and tiled
pixle layout which can be decompressed by DEC400D module
in DCSS.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu 83be803443 MLK-17461-1: clk: define hdmi pixel select clock
Define hdmi pixel select clocks.
Define av_pll_bypass clock.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang 34db4e7440 MLK-16224-2: ASoC: dmaengine_pcm: add fifo_num to snd_dmaengine_dai_dma_data
In order to support multi-fifo sdma script, the audio driver need to send
the fifo number to dma driver through dma_slave_config, and the cpu_dai
driver should config fifo_num for the audio platform driver, then platform
driver can config fifo_num to dma.
So add new variable fifo_num for struct snd_dmaengine_dai_dma_data.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong<yibin.gong@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang 9749259c66 MLK-16224-1: dmaengine: add src_fifo_num and dst_fifo_num in dma_slave_config
In order to support multi-fifo sdma script, the audio driver need to send
the fifo number to dma driver through dma_slave_config, so add src_fifo_num
and dst_fifo_num two new variable for struct dma_slave_config.

src_fifo_num: bit 0-7 is the fifo number, bit:8-11 is the fifo offset;
dst_fifo_num: same as src_fifo_num

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Robin Gong<yibin.gong@nxp.com>
2018-10-29 11:10:38 +08:00
Robin Gong a8547abdc1 MLK-17385: dma: imx-sdma: update sdma script for multi fifo on SAI
update sdma script for multi fifo SAI on i.mx8MQ.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 4d6b0cdf1d MLK-17368-3: drm: imx: dcss: Add support for tiled formats
This patch effectively enables DTRC module in DCSS to decode tiled
formats from VPU:
 * uncompressed G1;
 * uncompressed G2;
 * compressed G2;

Compressed G2 formats need to pass on the decompression table offsets,
by using the 'dtrc_dec_ofs' property. This is a 64 bit value like below:

64--------48----------32---------16---------0
|<- chroma table ofs ->|<- luma table ofs ->|

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Bing Song 77c0d82611 MLK-17368-1: drm: add fourcc codes for Verisilicon tiled formats
These formats will be used by VPU and DCSS.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying ceef1e2783 MLK-17371 gpu: imx: dpu: framegen: Use better timeout value to wait for ENSTS
The DPU spec tells us that we need to wait for all pending frames to
be completed when a display stream is disabled.  It turns out
that the hardcoded 60-microsecond timeout value is not enough for
some low refresh rate video modes, e.g., 1920x1080@24, which makes
the display stream be disabled incorrectly(leave the hardware an
incorrect machine status).  The SoC design indicates that there are
two pending frames to complete in the worst case.  This patch waits
for at most three frame duration(which is enough for sure) so that
the hardware may flush out all the pending frames.  In case the clock
subsystem provides us a pixel clock with wrong rate and causes the
timeout value be unreasonably long, we truncate it to wait for at
most three seconds.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Oliver Brown 9d58cdc043 MLK-17369: soc:imx8qm/qxp: Add controls for display controller resets
"
commit cfdb9821531da523fd1f01536eb67c8b8451477f
Author: Oliver Brown <oliver.brown@nxp.com>
Date:   Tue Jan 2 07:46:06 2018 -0600

    dc: Add controls for display controller resets.
"

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2018-10-29 11:10:38 +08:00
Ranjani Vaidyanathan 0e739be173 MLK-17363-1 imx8: pm-domain: fix clock parent restore issue after suspend/resume
Currently the clock parent actually is failed to be restored in power
domain driver due to the set_parent will bail out early as the clk core
already cached the same old parent.

Implement a CLK_SET_PARENT_NOCACHE flag in clk core and register all
SC mux clocks with this flag to make sure the clk core won't bypass
the SC clock parent setting.

[ Aisheng: "Add commit message" ]

Reviewed-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-10-29 11:10:38 +08:00
Meng Mingming fe5d749ba8 MLK-17311-4 gpu: imx: dpu: Configure dprc to enable prefetch
Configure dprc to enable prefetch for dpu blit.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
2018-10-29 11:10:38 +08:00
Meng Mingming 4827d19ea5 MLK-17311-3 drm,imx: Add struct drm_imx_dpu_frame_info
Add struct drm_imx_dpu_frame_info.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu 0946abebfc MLK-17341-5: imx8x: Rename imx8 mipi csi i2c power domain
Rename imx8x mipi csi i2c power domain.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Weiguang Kong 7dc6869a34 MLK-17309-1: uapi: mxc_hifi4: provide new interface for user space
In order to avoid license problem of Cadence header files, these
license files has been wrappered into a library and new interface
has been abstracted to replace the interface of Cadence header
files.

So update the mxc_hifi4.h file to provide new interface for
user space to use.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang ee6fe2a325 MLK-17293-1 rtc: add rpmsg rtc support for i.MX7ULP
On i.MX7ULP B0 chip, SNVS is located on M4 domain,
all RTC related functions need to use RPMSG channel
to communicate with M4 to proceed hardware operation.

The RTC RPMSG channel index is 6.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 7a3c40db28 MLK-17257-2: drm: imx: dcss: use the WRSCL/RDSRC modules
This patch makes the necessary changes so that, for downscaling ratios
more than 3:1 and up to 7:1 (for video) and 5:1 (for graphics), the
WRSCL/RDSRC path will be used. This way the DRAM bandwidth will be lower
and spread evenly across the frame time.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Ye Li c16789985e MLK-17221 clk: imx8mq: Add shared gate for apbh-dma and gpmi clocks
The CCGR RAWNAND is shared by apbh-dma and gpmi clocks, so must use
imx_clk_gate2_shared2 to produce two clocks. Otherwise, apbh-dma clock
won't be enabled individually.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 1247ba53ae MLK-17188-1 clk: imx: imx8qxp: add uSDHC clock MUX
Add uSDHC clock MUX to allow uSDHC driver to select
parent, currently only support PLL0 and PLL1 as
uSDHC clock's parent.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Tested-by: Haibo Chen <haibo.chen@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 305d4e7232 MMFMWK-7806: drm: imx: dcss: check up/down scale ratios
When scaling up/down, DCSS has limits that cannot be exceeded. This
patch adds checks before the plane is updated and rejects those planes
that exceed the up/down scale limits.

Currently, the limit is 3:1 for downscaling and 1:3 for upscaling for
both video and graphics channels.

When support for WR_SCL/RD_SRC will be added, these limits will increase
to the following values:
 * video: 7:1 downscale, 1:7 upscale
 * graphics: 5:1 downscale, 1:5 upscale

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying aaf607a84b MLK-15110-22 drm/imx: dpu: crtc: Evade the first dumb frame for DPR/PRG errata
To workaround the errata TKT320950, DPR/PRG need to evade the first dumb frame
which is generated by DPU.  The way we achieve that is to bypass TCON(but set
the TCON sync signals and KA_CHUCK strobe signal up) before enabling the DPU
display controller, and then enable the display controller, wait for the frame
index starting to move and finally switch TCON to operation mode.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 2e2e57d588 MLK-15110-21 gpu: imx: dpu: framegen: Add timestamp support for frame index
This patch adds framegen timestamp support for the frame index feature.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying aff4bfbed1 MLK-15110-20 gpu: imx: dpu: fetcheco: Fixup stride when we use prefetch
When we use prefetch, we use DPR and PRG to do frame input cropping.
Thus, the stride of fetcheco is the stride of cropped frame, which means
the value of the stride is cropped_width * bytes_per_pixel.  Since the
pixel format has to be NV12 or NV21 when we use prefetch, we assume the
cropped_width stands for how many UV we have in bytes for one line, while
bytes_per_pixel should be 8bits for every U or V component.  Also, to
address TKT339017, when we use prefetch engine for fetcheco, we need to
round the stride up to the fetcheco burst size, i.e., burst length
multiplies 8 bytes.  According to TKT343664, the buffer base address has
to align to burst size, so we'll pick an appropriate burst size value in
fetcheco_source_stride().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 1b1881be86 MLK-15110-19 gpu: imx: dpu: fetchdecode: Fixup stride when we use prefetch
When we use prefetch, we use DPR and PRG to do frame input cropping.  Thus,
the stride of fetchdecode is the stride of cropped frame, which means the
value of the stride is cropped_width * bytes_per_pixel.  Also, to address
TKT339017, when we use prefetch engine for fetchdecode, we need to round
the frame stride up to the fetchdecode burst size, i.e., burst length
multiplies 8 bytes.  According to TKT343664, the buffer base address has
to align to burst size, so we'll pick an appropriate burst size value in
fetchdecode_source_stride().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 0e8ecbabd4 MLK-15110-18 gpu: imx: dpu: fetcheco: Add helper fetcheco_set_burstlength()
This patch adds helper fetcheco_set_burstlength() so that
the burst length of fetcheco can be set to appropriate value.
When we don't use prefetch engine, the burst length is set to
the maximal value - 16.  When we use prefetch engine, the burst
length should make the buffer base address align to burst size
but not greater than 16.  This alignment operation can address
the issue recorded by TKT343664.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying b0e6b51707 MLK-15110-17 gpu: imx: dpu: fetchdecode: Add helper fetchdecode_set_burstlength()
This patch adds helper fetchdecode_set_burstlength() so that
the burst length of fetchdecode can be set to appropriate value.
When we don't use prefetch engine, the burst length is set to
the maximal value - 16.  When we use prefetch engine, the burst
length should make the buffer base address align to burst size
but not greater than 16.  This alignment operation can address
the issue recorded by TKT343664.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 056aa94ef3 MLK-15110-16 gpu: imx: dpu: fetcheco: Add helpers to set/get fetcheco off pin
This patch adds some helpers to set/get fetcheco off pin.
We need to pin fetcheco off when the primary plane is disabled and the
relevant fetcheco is feed by prefetch engine.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 9d0d3bbfe7 MLK-15110-15 gpu: imx: dpu: fetchdecode: Add DPR support
This patch adds DPR support for fetchdecode in the DPU base driver.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 804c5c06fd MLK-15110-10 clk: imx: clk-imx8qxp: Add IMX8QXP_DC0_DPR1_APB/B_CLK support
This patch adds IMX8QXP_DC0_DPR1_APB_CLK and IMX8QXP_DC0_DPR1_B_CLK clocks
support.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 4fac9721a8 MLK-15110-5 gpu: imx: dpu: Name inner DPU interrupts explicitly
We will support DPR interrupts via DPU core driver.
In order to distinguish bewteen the inner DPU interrupts and the DPR
interrupts, let's rename some software stuffs which are related to
DPU interrupts so that they may show they are DPU inner explicitly.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 08d01abc07 MLK-15110-3 gpu: imx: Add i.MX8 DPR(Display Prefetch Resolve) support
The Display Prefetch Resolve(DPR) is a processor of fetching display data
before the display pipeline which needs data to drive pixels in the active
display region.  The data is transformed, or resolved from a variety of
tiled buffer formats into linear format.  The DPR transaction sequences are
issued with a high level of DRAM efficiency.  This patch adds the base
driver support for i.MX8qm/qxp DPR.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 2f10fa80db MLK-15110-2 gpu: imx: Add i.MX8 PRG(Prefetch Resolve Gasket) support
The Pretch Resolve Gasket(PRG) is a digital core function as a gasket
interface between RTRAM controller and DPU.  The main function of PRG
is to convert the AXI interface to RTRAM interface and remapping the
ARADDR to a RTRAM address.  This patch adds the base driver support
for i.MX8qm/qxp PRG.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying fac96bc989 MLK-15110-1 drm/fourcc: Add Amphion tiled layout format modifier
Amphion VPU has a tiled layout using 8x128 pixel vertical strips,
where each strip contains 1x16 groups of 8x8 pixels in a row-major layout.

Signed-off-by: Song Bing <bing.song@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 5fcf6c83c3 MLK-17083 soc: imx: limit VPU/CPU bandwidth for lcdif on i.MX8MQ
Config NOC to limit bandwidth to 4GB for both VPU
and CPU to avoid lcdif flickering only when lcdif is enabled.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 8ab89ebeb94a423792bf588bdf2354c5960d8f13)
2018-10-29 11:10:38 +08:00
Dong Aisheng 4d93231f63 MLK-17074-1 PM / Domains: support enter deepest state for multiple states domains
Currently the generic power domain suspend code pm_genpd_suspend_noirq
will try to power off a domain used by devices in genpd_sync_poweroff
if its status is not GPD_STATE_ACTIVE.

However, for power domains supporting multiple low power states, it may
already enter an intermediate low power state by runtime PM before system
suspend and the status is already GPD_STATE_POWER_OFF which results in
then the power domain stay at an intermediate low power state during
system suspend.

Let's give the power domain a chance to switch to the deepest state in
case it's already off but in an intermediate low power state.
Due to power domain is alway off, so no need to check device wakeup
case anymore.

Reviewed-by: Frank Li <frank.li@nxp.com>
Reviewed-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu 163b2ac979 MLK-16953: drm: imx: dcss: Add propriety to change global alpha priority
This patch adds 'use_global_alpha' property to the primary plane, so that
one can choose whether to use global alpha instead of per-pixel alpha,
when the framebuffer has per-pixel alpha.

Framebuffers that do not have per-pixel alpha will always use global
alpha.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Jens Wiklander 014ad31d14 tee: add TEE_IOCTL_PARAM_ATTR_META
Adds TEE_IOCTL_PARAM_ATTR_META with can be used to indicate meta
parameters when communicating with user space. These meta parameters can
be used by supplicant support multiple parallel requests at a time.

Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

Modified from: From: https://github.com/linaro-swg/linux.git
 Conflicts:
	drivers/tee/tee_core.c
(cherry picked from commit 66d81fcf145fdc55322c0a11764c76a43d90ecad)
2018-10-29 11:10:38 +08:00
Jens Wiklander c19fefaf82 tee: add tee_param_is_memref() for driver use
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 747f68059436ac55c330ebffc5176b79006aafcf)
2018-10-29 11:10:38 +08:00
Jens Wiklander 17565d8a54 tee: add kernel internal client interface **not for mainline**
Adds a kernel internal TEE client interface to be used by other drivers.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 860c46087c99c24073cc722b12c0017bb0ce0a79)
2018-10-29 11:10:38 +08:00
Etienne Carriere ddaa5e12c1 tee: new ioctl to a register tee_shm from a dmabuf file descriptor
This change allows userland to create a tee_shm object that refers
to a dmabuf reference.

Userland provides a dmabuf file descriptor as buffer reference.
The created tee_shm object exported as a brand new dmabuf reference
used to provide a clean fd to userland. Userland shall closed this new
fd to release the tee_shm object resources. The initial dmabuf resources
are tracked independently through original dmabuf file descriptor.

Once the buffer is registered and until it is released, TEE driver
keeps a refcount on the registered dmabuf structure.

This change only support dmabuf references that relates to physically
contiguous memory buffers.

New tee_shm flag to identify tee_shm objects built from a registered
dmabuf: TEE_SHM_EXT_DMA_BUF. Such tee_shm structures are flagged both
TEE_SHM_DMA_BUF and TEE_SHM_EXT_DMA_BUF.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
From: https://github.com/linaro-swg/linux.git
(cherry picked from commit 41e21e5c405530590dc2dd10b2a8dbe64589840f)
2018-10-29 11:10:38 +08:00
Robby Cai c1d6668c72 MLK-16919-3 driver: clk: add CLKO2 for iMX8MQ
Add CLKO2 for i.MX8MQ
Set parent for MIPI CSI1/2 CORE/PHY_REF/ESC

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras f8f8ce47c3 MLK-16918-5: drm: Implement NWL MIPI-DSI as a real drm_bridge
Currently, the Northwest Logic MIPI-DSI controller host specific code
resides under drm/bridge, but is not a real drm_bridge. It creates a
drm_bridge and adds itself to the drm_encoder that handles this file,
but this is wrong, since it does not implement the drm_bridge_funcs.

The correct way to implement a drm_bridge is to add the drm_bridge and
let other components (another bridge or a drm_encoder) to attach to this
bridge.
Since we are doing this, a new compatible strings can be used for this
driver: "nwl,mipi-dsi".

Since this was used by nwl_dsi-imx.c, update that driver to use this
bridge correctly.

This is needed in order to add support for MIPI-DSI on 8MQ. The IMX_NWL
driver will either add a DSI encoder to DRM, or a DSI bridge.
The encoder will be used by imx-drm-core driver, while the bridge
will be used by MXSFB driver (which creates a simple display pipe).

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras a36d9e0051 MLK-16540: include: mfd: Add MX8 MQ IOMUXC GPR header
Add header file for the i.MX8mq IOMUXC GPR register offsets definitions.
Also, include definition for the GPR_MIPI_MUX_SEL from GPR13, needed by
MIPI-DSI driver.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu b62804e39a MLK-16928: drm: dcss: fix modesetting issues
DTG needs to be completely stopped before changing the display
resolution through modesetting. If DTG is not stopped, any change in
resolution could result in unpredictable results, like split screen,
etc.

This patch fixes that by introducing a completion signaling mechanism so
that we can signal the DRM CRTC when DCSS core is done stopping DTG.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Robin Gong 5603f55621 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>
2018-10-29 11:10:38 +08:00
Bai Ping d0015d1318 MLK-16804-03 driver: clk: Add video pll2 output gate clk on imx8mq
The Video PLL2 has a output enable bit to do clk gate,
So we need to register this gate to save power.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2018-10-29 11:10:38 +08:00
Keith Packard 0ac23dcb77 drm: Add four ioctls for managing drm mode object leases [v7]
drm_mode_create_lease

	Creates a lease for a list of drm mode objects, returning an
	fd for the new drm_master and a 64-bit identifier for the lessee

drm_mode_list_lesees

	List the identifiers of the lessees for a master file

drm_mode_get_lease

	List the leased objects for a master file

drm_mode_revoke_lease

	Erase the set of objects managed by a lease.

This should suffice to at least create and query leases.

Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:

 * query ioctls only query the master associated with
   the provided file.

 * 'mask_lease' value has been removed

 * change ioctl has been removed.

Changes for v3 suggested in part by Dave Airlie <airlied@gmail.com>

 * Add revoke ioctl.

Changes for v4 suggested by Dave Airlie <airlied@gmail.com>

 * Expand on the comment about the magic use of &drm_lease_idr_object
 * Pad lease ioctl structures to align on 64-bit boundaries

Changes for v5 suggested by Dave Airlie <airlied@gmail.com>

 * Check for non-negative object_id in create_lease to avoid debug
   output from the kernel.

Changes for v6 provided by Dave Airlie <airlied@gmail.com>

 * For non-universal planes add primary/cursor planes to lease

   If we aren't exposing universal planes to this userspace client,
   and it requests a lease on a crtc, we should implicitly export the
   primary and cursor planes for the crtc.

   If the lessee doesn't request universal planes, it will just see
   the crtc, but if it does request them it will then see the plane
   objects as well.

   This also moves the object look ups earlier as a side effect, so
   we'd exit the ioctl quicker for non-existant objects.

 * Restrict leases to crtc/connector/planes.

   This only allows leasing for objects we wish to allow.

Changes for v7 provided by Dave Airlie <airlied@gmail.com>

 * Check pad args are 0
 * Check create flags and object count are valid.
 * Check return from fd allocation
 * Refactor lease idr setup and add some simple validation
 * Use idr_mutex uniformly (Keith)

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 62884cd386)
2018-10-29 11:10:38 +08:00
Keith Packard 1d29b99240 drm: Check mode object lease status in all master ioctl paths [v4]
Attempts to modify un-leased objects are rejected with an error.
Information returned about unleased objects is modified to make them
appear unusable and/or disconnected.

Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:

 * With the change in the __drm_mode_object_find API to pass the
   file_priv along, we can now centralize most of the lease-based
   access checks in that function.

 * A few places skip that API and require in-line checks.

Changes for v3 provided by Dave Airlie <airlied@redhat.com>

 * remove support for leasing encoders.
 * add support for leasing planes.

Changes for v4

 * Only call drm_lease_held if DRIVER_MODESET.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 7de440db20)
2018-10-29 11:10:38 +08:00
Keith Packard af33bde8c9 drm: Add drm_object lease infrastructure [v5]
This provides new data structures to hold "lease" information about
drm mode setting objects, and provides for creating new drm_masters
which have access to a subset of the available drm resources.

An 'owner' is a drm_master which is not leasing the objects from
another drm_master, and hence 'owns' them.

A 'lessee' is a drm_master which is leasing objects from some other
drm_master. Each lessee holds the set of objects which it is leasing
from the lessor.

A 'lessor' is a drm_master which is leasing objects to another
drm_master. This is the same as the owner in the current code.

The set of objects any drm_master 'controls' is limited to the set of
objects it leases (for lessees) or all objects (for owners).

Objects not controlled by a drm_master cannot be modified through the
various state manipulating ioctls, and any state reported back to user
space will be edited to make them appear idle and/or unusable. For
instance, connectors always report 'disconnected', while encoders
report no possible crtcs or clones.

The full list of lessees leasing objects from an owner (either
directly, or indirectly through another lessee), can be searched from
an idr in the drm_master of the owner.

Changes for v2 as suggested by Daniel Vetter <daniel.vetter@ffwll.ch>:

* Sub-leasing has been disabled.

* BUG_ON for lock checking replaced with lockdep_assert_held

* 'change' ioctl has been removed.

* Leased objects can always be controlled by the lessor; the
  'mask_lease' flag has been removed

* Checking for leased status has been simplified, replacing
  the drm_lease_check function with drm_lease_held.

Changes in v3, some suggested by Dave Airlie <airlied@gmail.com>

* Add revocation. This allows leases to be effectively revoked by
  removing all of the objects they have access to. The lease itself
  hangs around as it's hanging off a file.

* Free the leases IDR when the master is destroyed

* _drm_lease_held should look at lessees, not lessor

* Allow non-master files to check for lease status

Changes in v4, suggested by Dave Airlie <airlied@gmail.com>

* Formatting and whitespace changes

Changes in v5 (airlied)

* check DRIVER_MODESET before lease destroy call
* check DRIVER_MODESET for lease revoke (Chris)
* Use idr_mutex uniformly for all lease elements of struct drm_master. (Keith)

Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 2ed077e467)
2018-10-29 11:10:38 +08:00
Keith Packard b65bdf9c68 drm: Pass struct drm_file * to __drm_mode_object_find [v2]
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.

v2: Also fix up vboxvideo driver in staging

[airlied: merging early as this is an API change]

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 418da17214)
2018-10-29 11:10:38 +08:00
Keith Packard 78e05f5ae0 drm: Add new LEASE debug level
Separate out lease debugging from the core.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e7646f84ad)
2018-10-29 11:10:38 +08:00
Robert Chiras e8737a8816 MLK-16347-11: clk: imx: imx8qxp: Add missing MIPI DSI clocks
Add missing clocks for MIPI-DSI SS: RX_ESC and TX_ESC
Also added the posibility to select clock parents for MIPI-DSI versus
LVDS.
The SCFW was changed, so now the LVDS pixel and phy clocks need to
specify their parrents.
Also, the TX_ESC and RX_ESC clocks from MIPI-DSI need to specify their
parrents in DTS files.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras 31b60515e3 MLK-16347-3: drm/bridge: Add Northwest Logic DSI transmitter support
Add support for the NorthWest Logit MIPI-DSI controller found in mx8
platforms: i.MX8qm, i.MX8qxp and i.MX8mq.
The NWL MIPI-DSI driver is implemented as a DRM bridge.
The MIPI-DSI encoder will contain the platform specific changes and will
use this bridge.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras d413ce3138 MLK-16347-1: phy: add phy driver for mipi-dsi on mx8
Implement the DPHY from MIPI-DSI found on i.MX8 platforms (QM, QXP and MQ)
as a phy driver.

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Laurentiu Palcu d1979107be MLK-16675-1: drm: imx: add mscale DCSS core driver
This patch adds base suport for i.MX8M's Display Controller
subsystem(DCSS). It has built-in DPR, Scaler and HDR10 modules. Also, it
features a video Decompression and Tile to Raster Conversion (DTRC) unit,
as well as a graphics pixel decompression infrastracture (DEC400D).

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying fb442f3382 MLK-16771 drm/imx: dpu: kms: Change to use a better KMS
This patch improves DPU KMS by the following means:
1) Wait for shadow registers being loaded in ->atomic_flush()
   to make sure there is no intermediate register values being
   loaded when doing atomic update.
2) Improve CRTC enablement/disablement sequences/configurations
   according to spec.
3) Remove the FGDM__PRIM framegen display mode from ->mode_set_nofb()
   and always use FGDM__SEC_ON_TOP mode so that we may prepare
   for introducing a safety stream solution in the future.
4) Better vblank on/off and vblank event handling, though there
   should be no essential improvements.
5) Some fixes for adding correct CRTC/plane/connector states
   in the full atomic state in dpu_drm_atomic_check().
6) Remove CRTC and plane states from the full atomic state where
   possible to improve atomic update performance.
7) Introduce a plane group mutex to protect plane source mask and
   vproc source mask.  This is a little bit superfluous due to
   the protection provided by the atomic helper, but just one of
   the DPU core itself.

The changes are in a bundle to avoid any unexpected drawbacks
of introducing them at a smaller granularity.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 5046b96f18 MLK-16760 soc: imx: support i.MX8MQ new revision SoC
On i.MX8MQ, the new revision SoC does NOT update the
revision info in ANATOP_DIGPROG register, to support
dynamic SOC id/revision detection, only reading info
from ANATOP_DIGPROG is not working now, change to read
SOC id/revision from ATF which is in secure world.

The ATF will read the ANATOP_DIGPROG as well as ROM
version to decide the SOC revision.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu 4896d8ca1d MLK-16686-1 clk: imx8mq: add the mu clk
add the mu clock

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan fea941f4ef MLK-16746 imx8mq: support m4
Support M4/A53 work together
1. add imx_src_is_m4_enabled
2. introduce a new dts dedicated for m4
3. add more pwm nodes
4. Since clk initialization is at very early stage, add m4 enabled check
   in the beginning of clk code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 3fe4f63ff7 MLK-16689-03 driver: soc: Add busfreq driver for imx8mq
Add busfreq driver support on i.MX8MQ. The busfreq driver is
mainly used for dynamic DDR frequency change for power saving
feature. When there is no peripheral or DMA device has direct
access to DDR memory, we can lower the DDR frequency to save
power. Currently, we support frequency setpoint for LPDDR4:

    (1): 3200mts, the DDRC core clock is sourced from 800MHz
         dram_pll, the DDRC apb clock is 200MHz.

    (2): 400mts, the DDRC core clock is source from sys1_pll_400m,
         the DDRC apb clock is is sourced from sys1_pll_40m.

    (3): 100mts, the DDRC core clock is sourced from sys1_pll_100m,
         the DDRC apb clock is sourced from sys1_pll_40m.

In our busfreq driver, we have three mode supported:
    * high bus mode  <-----> 3200mts;
    * audio bus mode <-----> 400mts;
    * low bus mode   <-----> 100mts;

The actual DDR frequency is done in ARM trusted firmware by calling
the SMCC SiP service call.

    BuildInfo:
     - IMX-MKIMAGE: 05d3d4a7d7, ATF: 724cc2b890
     - SPL/Uboot: f72c10d2db;

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping 3321775b05 MLK-16689-01 driver: clk: add dram_core clock on imx8mq
On i.MX8MQ, the dram core clock can be sourced from dram_pll or
the dram_alt clock, when sourced from the dram_alt, it has a fix
divider(1/4). When the DDRC core clock is lower than 800MHz, we
can swith the core clock to dram_alt source.

The dram apb clock's mux option 2 should be sys1_pll_40m, so fixed it.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Robin Gong 5bcb37e571 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>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 239f70d7a2 MLK-16671-5 - [i.MX8QXP/Malone]: Add vpu malone decoder driver
Change statement from LGPL to GPL for malone header files

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 9e15be7678 MLK-16671-1 - [i.MX8QXP/Malone]: Add vpu malone decoder driver
Integrate amphion release kernel functions

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
2018-10-29 11:10:38 +08:00
Dong Aisheng 8594e2f1ff MLK-16606-1 clk: imx8qm: add M4 I2C clocks
There're two M4 I2C instances in MX8QM.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu 5c502621b1 MLK-16586-3 rpmsg: imx: enable multi-core rpmsg
- Init multi-core mu power and clk.
- enable the multi-core rpmsg support

BuildInfo:
- SCFW a6fd9a48, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Tested-by: Andy Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu db4c578a14 MLK-16586-1 clk: imx8qm: add the cm41 ipg clk
Add the cm41 ipg clk

BuildInfo:
- SCFW a6fd9a48, IMX-MKIMAGE 0, ATF 0
- U-Boot 2017.03-imx_v2017.03_4.9.11_imx8_alpha+g258936c

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Tested-by: Andy Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan 715e587619 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>
2018-10-29 11:10:38 +08:00
Weiguang Kong 6ec23d0c62 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>
2018-10-29 11:10:38 +08:00
Richard Zhu 558204d601 MLK-16530-2 clk: imx8qm: add the cm40 ipg clk
Add the cm40 ipg clk
BuildInfo: SCFW 9e9f6ec6, IMX-MKIMAGE 0, ATF 0

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
2018-10-29 11:10:38 +08:00
Robert Chiras d7e080bb90 MLK-16056 clk: imx8qm: add new dsi clocks
Add clk for dsi0-i2c1, dsi1-i2c0 and dsi1-i2c1

Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
2018-10-29 11:10:38 +08:00
Adriana Reus 2593bdd319 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-off-by: Adriana Reus <adriana.reus@nxp.com>
Reviewed by: Ranjani Vaidyanathan <Ranjani.vaidyanathan@nxp.com>
2018-10-29 11:10:38 +08:00
Weiguang Kong 006c237759 MLK-16468-1: include: uapi: add multi-codec support for hifi4
update the mxc_hifi4.h header file to support multi-codec
decoding or encoding together for hifi4 dsp.

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Reviewed-by: Mihai Serban <mihai.serban@nxp.com>
2018-10-29 11:10:38 +08:00
Haibo Chen 3dfc1e9647 MLK-16461-1 mmc: sdhci-esdhc-imx: add strobe-dll-delay-target support
strobe-dll-delay-target is the delay cell add on the strobe line.
Strobe line the the uSDHC loopback read clock which is use in HS400
mode. Different strobe-dll-delay-target may need to set for different
board/SoC. If this delay cell is not set to an appropriate value,
we may see some read operation meet CRC error after HS400 mode select
which already pass the tuning.

This patch add the strobe-dll-delay-target setting in driver, so that
user can easily config this delay cell in dts file.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
2018-10-29 11:10:38 +08:00
Guoniu.Zhou 67ba643b77 MLK-16374-3: PxP: improve stride parameter setting compatible
In pxp lib, the unit of stride parameter is pixel and stride
is not equal with width parameter of out buffer in some cases.

In order to use latest pxp lib in old version rootfs, PXP_DEVICE_LEGACY
macro is used to distinguish pxp drvier version. Because the
new pxp driver define a new variable and pxp lib can know this
through PXP_DEVICE_LEGACY, and determine if use it.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 91da74e81c)
2018-10-29 11:10:38 +08:00
Fugang Duan 69bffaed6f MLK-15348-02 arm: dts: imx7ulp: add focaltech touch panel ft5246 support
Add focaltech new touch panel ft5246 support.
Set the ft5426 as default panel for dts. If want to use the old panel, then
it needs to boot with imx7ulp-evk-ft5416.dtb file.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit:963fea909ef5e42294cb2e656e5e3870a2171c01)
2018-10-29 11:10:38 +08:00
Meng Mingming a5a5d8268d MLK-15321-3 drm/imx: dpu: Add render feature support
Implement Blt engine as DRM renderer.
Add dpu ioctl to support imx-drm render feature.

Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
Signed-off-by: Marius Vlad <marius-cristian.vlad@nxp.com>
Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
2018-10-29 11:10:38 +08:00
Meng Mingming 6d6af5ad53 MLK-15321-2 gpu: imx: dpu: Add dpu blit engine driver
Implement Blt engine as DRM renderer.
Add dpu blit engine driver.

Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang d2c777f7f8 MLK-16351 rtc: imx-sc: use SIP to set RTC time
For system controller RTC, as it belongs SC_R_SYSTEM,
and SC_R_SYSTEM is assigned in ARM-Trusted-Firmware,
so here needs to use SIP to trap into ATF to do set
time, or system controller firmware will return
error since linux kernel does NOT own this system
resource.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 869ea1aeac MLK-16290 drm: Add drm_of_component_probe_with_match() helper
A component master may have both OF based and non-OF based components to be
bound with.  This patch adds a helper drm_of_component_probe_with_match()
similar to drm_of_component_probe() so that the new helper may get an
additional provided match pointer(contains match entries for non-OF based
components) to support this case.

Tested-by: Meng Mingming <mingming.meng@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 13a55ac6d4 MLK-16301-2 gpu: imx: dpu: common: Remove the list in dpu plane group
No one is using the list in the dpu plane group, so let's remove it and
the mutex lock which protects the list.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Adrian Hunter 5608e31e6e mmc: core: Add parameter use_blk_mq
Until mmc has blk-mq support fully implemented and tested, add a parameter
use_blk_mq, set to true if config option MMC_MQ_DEFAULT is selected, which
it is by default.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit c3d53d0da6)
2018-10-29 11:10:38 +08:00
Adrian Hunter bada58a654 mmc: core: Introduce host claiming by context
Currently the host can be claimed by a task.  Change this so that the host
can be claimed by a context that may or may not be a task.  This provides
for the host to be claimed by a block driver queue to support blk-mq, while
maintaining compatibility with the existing use of mmc_claim_host().

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 6c0cedd1ef)

Adjust for small imx changes in debugfs

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Adrian Hunter 3cb291bb84 mmc: core: Add support for handling CQE requests
Add core support for handling CQE requests, including starting, completing
and recovering.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 72a5af554d)
2018-10-29 11:10:38 +08:00
Anson Huang 5999a37717 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>
2018-10-29 11:10:38 +08:00
Peng Fan 55bddc9061 MLK-16204-3: clk: imx8mq: add ocotp clock
Add OCOTP clock support.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 47af099d7c 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>
2018-10-29 11:10:38 +08:00
Fancy Fang 2a5a92e7ad MLK-16136-1 clk: imx: imx8mq: define DCSS root clocks.
Define three root clocks for DCSS module:

    .IMX8MQ_CLK_DISP_AXI_ROOT
    .IMX8MQ_CLK_DISP_APB_ROOT
    .IMX8MQ_CLK_DISP_RTRM_ROOT

These root clocks share one clock gate along with
'IMX8MQ_CLK_DISP_ROOT' clock. So change its type
to be shared gate clock too.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Ranjani Vaidyanathan 294995d04d MLK16091-2 clk: imx8qxp: Add VPU encoder/decoder clock constants
Add VPU encoder/decoder clocks.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-10-29 11:10:38 +08:00
Li Jun 62ebe27822 MLK-16013-9 usb: typec: add interface to get port type and role
Add interface to get typec port type and default power role from
dt. To validate a correct setting is specified, add TYPEC_PORT_TYPE_UNKNOWN
and TYPEC_ROLE_UNKNOWN for typec_port_type and typec_role enum.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>

During 4.14 rebase renamed to typec_port_types_dt to avoid conflict with
sysfs values.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang 014e9f8ed7 MLK-16129: ASoC: fsl_hifi4: refine the copyright
As the fsl_hifi4.c uses the function from uboot/cmd/elf.c,
so need to add the copyright of elf.c, and change licence to
Dual BSD/GPL.
And mxc_hifi4.h is used by user space, so change license to BSD.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
2018-10-29 11:10:38 +08:00
Robin Gong 13f9c31be7 MLK-16104-2 dma: imx-sdma: add index for multi sdma devices case
On i.mx8mscale, there are two sdma instances here, and common dma
frameowrk will get channel dynamicly from any available channel whatever
it's from the first sdma device or the second sdma device. But actually,
some IP like SAI only work in sdma2 not sdma1. To make sure get sdma
channel from the right sdma device, add index to match.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu 8e076cc387 MLK-16062-1: Fix PXL mipi csi0/1 clock gate register address
mipi csi0/1 clock gate register address swapped.
It will cause mipi csi0/1 failed to work.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Cristina Ciocan e8844e120c MLK-15986-7: video: fbdev: Add MIPI DSI NORTHWEST support for 64bit platforms
This patch adds support for 64bit platforms, on top of existing 32bit
support. Among some noticeable differences that occurred for the MIPI DSI
Northwest controller: 4 lane support is added and power management differs.

MIPI DSI Northwest driver changes are added from Fancy Fang's commit
df47fccaf6 "MLK-15322-8 video: fbdev: imx_northwest_dsi: enable Northwest
mipi dsi driver".

Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang 87bb0eccd5 MLK-16077-2: clk: imx: update cm40 clock for imx8qxp
Add cm40 I2C clock for imx8qxp

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2018-10-29 11:10:38 +08:00
Liu Ying 0b6110d197 MLK-16075-19 gpu: imx: dpu: common: Add fetchecos support in dpu plane group
This patch adds fetchecos support in dpu plane group.
We currently supports fetcheco0 and fetcheco1.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 5945f5dda9 MLK-16075-17 gpu: imx: dpu: fetchdecode: Add helper fetchdecode_need_fetcheco()
This patch adds helper fetchdecode_need_fetcheco() so that users may
check if a fetchdecode needs to use fetcheco for a specific pixel format.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 11e86b5056 MLK-16075-16 gpu: imx: dpu: fetchdecode: Add helper fetchdecode_get_fetcheco()
This patch adds helper fetchdecode_get_fetcheco() so that users may
get the relevant fetcheco via fetchdecode.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 8fb5012229 MLK-16075-13 video: dpu: Add more sources for fetchdecode
This patch adds more sources for fetchdecode.
The new sources are fetchdecode0, fetchdecode1 and fetchwarp2,
which are valid only on DPU v2.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 80fb07bebb MLK-16075-12 gpu: imx: dpu: common: Add helpers dpu_vproc_has/get_fetcheco_cap()
This patch adds helpers dpu_vproc_has/get_fetcheco_cap() support
so that the users may check if a video processing mask has fetcheco
capability or get the fetcheco capability from the mask.
We currently only support fetcheco0 and fetcheco1.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 79d9ad555b MLK-16075-11 gpu: imx: dpu: Add basic fetcheco units support
This patch adds basic fetcheco units support.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying fd658f3e68 MLK-16075-1 gpu: imx: dpu: fetchdecode: Update funcs to enable/disable src buf
The bit to enable/disable source buffer is embedded in the register
LAYERPORPERTY0.  However, the other bits of the register may have
other functionalities.  So, using fetchdecode_layerproperty() to
enable/disable source buffer isn't appropriate.  This patch uses
new functions to enable/disable fetchdecode source buffer so that
the function names could be a bit specific about what they are doing.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 73ce6ab3d5 MLK-16030-2 soc: imx: gpc: add power domain names
Add power domain names for i.MX8MQ, currently only
11 power domains support runtime ON/OFF.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
2018-10-29 11:10:38 +08:00
Gao Pan 80333491f0 MLK-16028 clk: imx8qm: add clk for dsi0 i2c0
add clk for dsi0 i2c0

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
2018-10-29 11:10:38 +08:00
Jason Liu b8af55b27c MLK-16005-1 drivers: soc: refine the imx8 soc revision support
This patch is to refine the imx8 soc revision support. The imx8qm and
imx8qxp will go through the SCU API to get the silicon ID and REVISION.
imx8mq will go through the anatop interface to get the ID/REV.

Since the silicon ID/REV need be set as early as possible, thus refine it
by using the early_initcall for the early initialization. For the SCU API
interface, this need be called after the MU interface initialized.

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Reviewed-by: Anson Huang <anson.huang@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang a13e0499bb MLK-15960-6: ARM64: dts: add power domain for audio clocks
The mclk_out clock is used as codec's mclk, so need to add
its power domain to codec node.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2018-10-29 11:10:38 +08:00
Bai Ping 6125bef5e3 MLK-15953-01 driver: clk: Add tmu root clock for i.mx8mq
Add the tmu root clock for i.mx8mq.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 ea3472fee2 MLK-15356-2:[i.MX8MQ/Hantro] Add support for android platform
Add compat ioctl for 32 bit application
This is re-commit: only reserve hantro driver change
           remove mxc_ion change

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
2018-10-29 11:10:38 +08:00
Guoniu.Zhou cc872e02ac MLK-15337: pxp-v3: add pxp v3 crop feature
Add pxp v3 crop feature support.
Update the pxp_dma.h file.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 70a29aaaab MLK-15932-7 gpu: imx: dpu: common: Add scalers support in dpu plane group
This patch adds scalers support in dpu plane group.  A module parameter,
i.e., display_plane_video_proc, is introduced to enable or disable video
processing capability of display plane, since some video processing units
are shared with capture controllers.  By default, it is enabled.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 71d758e071 MLK-15932-6 gpu: imx: dpu: common: Introduce dpu_vproc_get_h/vscale_cap()
This patch introduces two helpers - dpu_vproc_get_h/vscale_cap().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 5227c0f109 MLK-15932-5 gpu: imx: dpu: common: Introduce dpu_vproc_has_h/vscale_cap()
This patch introduces two helpers - dpu_vproc_has_h/vscale_cap().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 93a48aa166 MLK-15932-4 gpu: imx: dpu: fetchdecode: Add scaler support
The output of FetchDecode can be the input of HScaler and/or VScaler.
If both of the two scalers are wanted, the two scalers can be connected
with each other by themselves as an united scaler unit.  This patch adds
basic scaling capability support for FetchDecode.  Three helpers are
introduced - fetchdecode_get_vproc_mask() and fetchdecode_get_h/vscaler().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 053d65f512 MLK-15932-3 gpu: imx: dpu: common: Add HScaler and VScaler support
This patch adds basic HScaler and VScaler support in the DPU core driver.
The two scaler units can be used in the display controller, blit engine
or capture controller.  Currently, we only support the display controller.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 46b96dfc07 MLK-15932-2 video: dpu: Remove the prefix 'lb_' for lb_pixengcfg_clken_t
There are several DPU units which have the same clock enable control bits
in their Dynamic registers, e.g., HScaler, VScaler, Rop, Fliter and Matrix,
etc.  So, let's remove the prefix 'lb_' from the enumerator name of
lb_pixengcfg_clk_t so that it can be a little bit generic.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 156683ebbb MLK-15932-1 video: dpu: Add prefix 'LB_' to member names of enum lb_mode_t
The member name 'NEUTRAL' of enum lb_mode_t is a little bit too generic,
since others DPU units have neutral modes as well, e.g., HScaler, VScaler,
Rop, CLuT and Matrix, etc.  So, let's add the prefix 'LB_' to member names
of enum lb_mode_t so that they can be specific to LayerBlends.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Weiguang Kong 45861465e3 MLK-15934-3: ASoc: fsl: add hifi4 firmware's status transfer support
1. add cases to receive error value from hifi4 firmware and
   return this error to hifi4 driver's caller.
2. add cases to receive input over indicator variable from
   hifi4 dirver's caller and pass this value to hifi4 firmware

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
2018-10-29 11:10:38 +08:00
Adriana Reus a6a19d542d MLK-15335 clk: imx7d-ccm: Remove ARM_M0 clock
IMX7d does not contain an M0 Core and this particular
clock doesn't seem connected to anything else.
Remove this entry from the CCM driver.

Signed-off-by: Adriana Reus <adriana.reus@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 24f036984b MLK-15925-3 drm/imx: dpu: kms: Avoid plane src hot migration between 2 disps
The DPU fetch units(backing DRM planes) are shared by two displays(a.k.a,
CRTCs).  Since the shadow trigger/load mechanism of each display(CRTC)
is independent from each other, on-the-fly/hot migration of plane source
is likely to cause resouce conflict issue when the shadow registers are
loaded.  This patch changes the way we assign fetch units for each DRM
planes so that we may avoid the migrations from happening.  Thanks to
the DRM atomic check nature, cold migrations still can be supported.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 9b0d0c0779 MLK-15925-2 gpu: imx: dpu: fetchdecode: Add a helper to report if fd is enabled
This patch adds a helper so that users may know if the fetchdecode is enabled
or not.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 6cb3c8e28b MLK-15925-1 gpu: imx: dpu: fetchdecode: Add get/set display stream id support
This patch adds two helpers so that users may get or set the display
stream id of fetchdecode.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 72238e2768 MLK-15354 clk: imx: imx8mq: add video_pll2 clock
Add video_pll2 SSCG PLL clock in anamix which can
be used by HDMI and DCSS.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang 5d7337ae56 MLK-15322-5 clk: imx: imx8mq: add ahb/ipg clocks for dsi
Add the ahb and ipg clocks for mipi dsi rxesc and txesc.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Bai Ping eda7bfe5f4 MLK-15149-01 driver: soc: add gpc power domain support on i.mx8mq
Add generic power domain driver support on i.mx8mq. The power
domain on/off operations need to use the SIP service call to
trap into secure monitor to handle it.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Weiguang Kong ffa3d69b43 MLK-15296-2: include: uapi: add consumed cycles
add a new structure element(cycles) to save the
consumed cycles that returned from dsp framework

Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan 0bb41feeb0 MLK-15309-01 net: phy: at803x: add EEE mode, 1.8V IO, led_act blinding workaround support
SmartEEE feature is enabled in default, add interface for user to disable
the feature for IEEE1588 high accurate convergence.

The phy support 1.8v RGMII VDDIO voltage, add interface for user to enable
VDDIO 1.8v support.

When phy/RJ45 power supply is not stable, LED_ACT may be busy on blinding,
add sw workaround to fix the issue.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Pandy Gao <pandy.gao@nxp.com>
2018-10-29 11:10:38 +08:00
Peng Fan 089402e195 MLK-15302 imx8mq: add wdog support
Add wdog nodes in dtsi.
Enable wdog1 for imx8mq evk board.
Enable imx wdt in defconfig.
Correct clock, offset 0x4550 is actually for wdog3.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Fugang Duan f68b095342 MLK-15147 arm64: imx8mq: fix iomux header file uart pin issue
imx8mq iomux header file uart part select_input config are
wrong that cause most of uart pin not work.
Add DCE and DTE string to distinguish the pin is for uart
which function, and clear all select_input for output pin.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang ce435cd8d2 MLK-15140-4: clk: clk-imx8mq: Add audio ipg clock
add audio ipg clock, sai ipg clock and correct some wrong
place in clock tree.

Signed-off-by: Mihai Serban <mihai.serban@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2018-10-29 11:10:38 +08:00
Robin Gong bed9fb6448 MLK-15135-3: clk: imx8mq: add sdma clock
add sdma clock and ipg clock on i.mx8mq.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
2018-10-29 11:10:38 +08:00
Zhou Peng-B04994 9bd9d1106d MLK-15132-3: Enable Hantro decoder on i.MX8MQ
Move hantrodec.h to uapi directory

Signed-off-by: Zhou Peng-B04994 <eagle.zhou@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 1d39faeaf1 MLK-15128-7 clk: imx: add i.mx8mq clock driver support
Add i.MX8MQ clock driver support.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 0b7ad8cd51 MLK-15128-6 soc: imx: add psci gpc support for i.mx8mq
Add i.MX8MQ PSCI GPC virtual driver support.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
2018-10-29 11:10:38 +08:00
Anson Huang 0657bcddc2 MLK-15128-1 dt-bindings: imx8mq: add clock and pinctrl head file
Add i.MX8MQ clock and pinctrl file.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu fe2f5f74fe MLK-15124-01: clk: imx8qm: Add mipi_csi local interrupter clock
Add mipi csi local interrupter clock
Rename image subsystem power domain name.
Rename mipi csi LIS clock name.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>

During 4.14 rebase squashed MLK-15124-01 and MLK-15124-02 because they
do not build separately.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-10-29 11:10:38 +08:00
Sandor Yu 84bed2a42b MLK-15124-01: pm: Add image subsystem power domain name
Add imx8 image subsystem power domain name.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
2018-10-29 11:10:38 +08:00
Richard Zhu 2e56ff43c7 MLK-15064-1 ARM: imx: pcie: enable imx8 pcie
- use one standalone hsio node to share the region to
pciea, pcieb and sata.
- axi master slave and dbi clks and pipe_clk are required
- enable pcieb
  change the pd of the pcieb, otherwise, clk is failed to enable
- add the cpu addr offset
  Bit[31:24]
  pciea 60 - 6f ---> 40 - 4f
  pcieb 70 - 7f ---> 80 - 8f

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 9477c47fd0 MLK-15001-22 phy: Add Mixel LVDS combo PHY support
This patch adds Mixel LVDS combo PHY support(MIPI DSI and LVDS combo).
This LVDS PHY supports one LVDS channel in single mode and two channels in
dual mode.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 37f8685843 MLK-15001-20 phy: Add Mixel LVDS PHY support
This patch adds Mixel LVDS PHY support.
This PHY supports two LVDS channels.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying aacdf95250 MLK-15001-10 gpu: Add dpu base driver
DPU is the display processing unit embedded in i.MX8qm and i.MX8qxp.
It was originally designed by Fujitsu.
The first revision has capture controller, display controller and blit engine.
The second revision is a lite one and has display controller and blit engine.
This patch adds a base driver for DPU, which provides a thin register wrapper,
interrurpt support and client platform device register for the upper layer to
use.  Currently, the driver only supports the display controller at the pixel
processing level and only the fetchdecodes are supported/tested as the fetch
units.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 22e2dddd3d MLK-15001-9 media: bus format: Add RGB101010_1X7X5_SPWG/JEIDA support
This patch adds 30bit RGB101010 LVDS pixel formats support for
the SPWG and JEIDA LVDS mapping standards.  Each pixel is transferred
on 5 lanes with 7bit respectively.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 572afbd778 MLK-15001-8 media: bus format: Add RGB666_1X30_PADLO support
This patch adds 30bit RGB666 with low padding support.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying fb76252b56 MLK-15001-7 media: bus format: Add RGB888_1X30_PADLO support
This patch adds 30bit RGB888 with low padding support.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Liu Ying 8dc9575dd4 MLK-15001-5 clk: imx8qxp: Add some clocks support for DC and MIPI-LVDS SSs
This patch adds some clocks support for DC and MIPI-LVDS subsystems.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang dbaf8cbfd0 MLK-15043-1: ASoC: soc-pcm: add dpcm_merged_chan in snd_soc_dai_link
According to commit b073ed4e21 ("ASoC: soc-pcm: DPCM cares BE format"),
Current DPCM only care FE channel, but it will set unsupported channel to
drivers.
So add dpcm_merged_chan, which is used to merge the BE's codec
channels configuration to FE if it exist in snd_soc_dai_link. And
dpcm_runtime_base_chan function is to get the channel configuration of BE,
which likes the dpcm_runtime_base_format function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 19ff1095d4)
2018-10-29 11:10:38 +08:00
Fugang Duan 6e05574a71 MLK-15005-01 clk: imx8qm: add lvds LIS ipg clock
Add lvds subsystem LIS ipg clock.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-10-29 11:10:38 +08:00
Shengjiu Wang c40be47a26 MLK-14997-2: include: uapi: add hifi header file
add hifi header file, which is used by user space.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2018-10-29 11:10:38 +08:00
Ranjani Vaidyanathan 4f5b7bc043 MLK-15951 imx8qm: Fix HDMI clocks
Ensure that both PLL and IPG clocks are enabled and set by
the HDMI irqsteer device tree entry.

Fix some HDMI clock names.

The HDMI irqsteer incorrectly assumed that the HDMI bus clock will
be enabled automatically by the SCFW when HDMI SS is powered up.
Fix HDMI clocks so that the HDMI IPG clock is enabled when required.
Also fix all the LPCG addresses by HDMI clocks.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
2018-10-29 11:10:38 +08:00
Viorel Suman 571ad5b670 MLK-13972-2 clk: imx8qxp: add audio clocks
Add audio clocks.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-10-29 11:10:38 +08:00
Viorel Suman 03ed535e79 MLK-13972-1 soc: scfw: imx8qxp: fix audio LPCGs
Cleanup audio LPCGs: add missing, fix names, remove unneeded.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-10-29 11:10:38 +08:00
Fancy Fang ed1e9196f8 MLK-14885 dma: pxp: fix potential multi-definition issue
When 'CONFIG_MXC_PXP_CLIENT_DEVICE' disabled, the
'register_pxp_device' and 'unregister_pxp_device'
may cause multiple definitions compiling error.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
2018-10-29 11:10:38 +08:00
Guoniu.Zhou 597f2d9d3e MLK-14844 pxp: Add RGB32 format to back-compatible.
The latest pxp_dma.h file change PXP_PIX_FMT_RGB32 to PXP_PIX_FMT_XRGB32 format,
but the userspace still use PXP_PIX_FMT_RGB32, so add back it and keep the same
with PXP_PIX_FMT_XRGB32 format.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
2018-10-29 11:10:38 +08:00