When remove sound card build config, there will be error
drivers/built-in.o: In function `mxc_hdmi_register_audio':
vf610_adc.c:(.text+0xd64f8): undefined reference to `_snd_pcm_stream_lock_irqsave'
vf610_adc.c:(.text+0xd6518): undefined reference to `snd_pcm_stream_unlock_irqrestore'
drivers/built-in.o: In function `mxc_hdmi_abort_stream':
vf610_adc.c:(.text+0xd65a4): undefined reference to `_snd_pcm_stream_lock_irqsave'
vf610_adc.c:(.text+0xd65d0): undefined reference to `snd_pcm_stream_unlock_irqrestore'
make: *** [vmlinux] Error 1
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
On imx7ulp-evk board, the SD slot on base board is conflict with BT/WiFi.
This patch seperate the usdhc1 from imx7ulp-evk.dts, and create new dts.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
According to API definition, Set the voltage for the regulator within the
range specified, the driver should select the voltage closest to min_uV.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Since commit commit 560a64749d1dd0ff ("ENGR00318936-2 input: keyboard: imx:
remove usless release interrupt enabled) the following problem happens:
- Keep any keypad key pressed
- Enter low power mode via "echo mem > /sys/power/state"
- Then we are no longer able to wake-up the system via the keypad
The reason for this behaviour is that the KRIE (Release Interrupt) is not
enabled.
In order to fix this problem, we should enable KRIE when a key is pressed
(KPKD bit is set) or enable KDIE when no key is pressed (KPKR is set).
This way we will always have a valid source of keypad interrupt no matter if
the system entered low power mode while a keypad key was pressed or not.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
(cherry picked from commit 5a7ab47e67d1045cb2f5d408c112617dff48dee2)
(cherry picked from commit f75c35512bd3df7dbb26f4a35cf17dcbb6ffb724)
Remove useless code for release interrupt enabled, because we check status by
timer rather than release interrupt. Remove the code which may disable depress
interrupt. Also make sure enable depress interrupt in suspend function.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 806ed5b9769efff2c9d8c66ed19315b48ec6fd57)
(cherry picked from commit 307d613b1f363f802433cd2debbb2b28ddc17a06)
There is a small window after system suspend but timer scan function
didn't finish timely, in this case, system enter suspend without kpp
interrupt enabled and failed to resume back if key depressed.We add
pm_stay_awake and pm_relax to make sure system suspend flow abort in
this case.
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 3868f06af8f39673f270643ada63dd88e2f5699e)
(cherry picked from commit 529dee44f7da0ad6d57a3e8ccd942af944f6723b)
For all imx Socs later than imx6 (including imx6), the USB_nSBUSCFG.AHBBRST
will be set as 0 at dtsi file, so the non-burst setting needs to be
set at non-core register, or there will be no burst for USB AHB/AXI
transfer.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
At imx7ulp, if the system enters idle, it will close some clocks and affect
USB transfer. In order to avoid it, we request pmqos to avoid system
entering idle when the USB is in use.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
imx7ulp non core register mapping is similar with imx7d, and the
initialization is the same, but lacks of USB charger detection support.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
commit 916e43e1d6fb ("MLK-13570-3 usb: chipidea: core: change extcon
usage for imx_4.1.y") is directly cherry-picked from 4.1.y, but which
is not valid anymore on 4.y kernel, so revert most part and only keep
the irq check after resume.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
At v4.1 kernel, we can't get cable type at notifier, but at
extcon-usb-gpio.c notifies both VBUS and ID event, we had to
do special handling for ID event, and omit VBUS event. Current
implementation only supports ID extcon event.
If wakeup event occurs by extcon, it needs to call ci_irq again since the
first ci_irq calling at extcon notifier only wakes up controller, but
do noop for event handling.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
At imx7ulp, the USB related analog register is located in PHY register
region too, so we need to control PLL at PHY driver directly.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Add USBOTG1 support, we use GPIO as ID function for dual-role switch.
Besides, #define <dt-bindings/gpio/gpio.h> to imx7ulp.dtsi since
lots of boards may need it.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
The input MCLK is 12.288MHz, The desired output sysclk is 11.2896MHz
the sample rate is 44100Hz, with the pllprescale=2, postscale=sysclkdiv=1,
some chip may have wrong bclk and lrclk output in master mode. then there
will be no sound.
With the pllprescale=1, postscale=2, the output clock is correct. so use
this configuration to workaround this issue.
Tested 8k/11k/16k/22k/32k/44k/48kHz case.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Before suspend, the sysclock select pll out as source, after resume
sysclock select the mlck as the source, so the sample rate is changed
the sound's pitch is shifted.
The issue is caused by the commit c1845da3d08de6cf2642fec74f7a46d05de6314d
Which removed the wm8960_configure_clocking() when bias level changes
from STANDBY to PREPARE, this patch is to add it back.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
When ENET wake up is enabled by wake-on-lan (WOL), the weak 2P5
ldo needs to keep power up even for LPDDR2 due to the ENET_PLL is
feed by the weak 2p5 ldo during DSM. If the weak 2P5 ldo is power
down the ENET module is power off hence it is not able to sense the
WOL interrupt and trigger the system resume.
Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
Add support for SCM i.MX6DQ 1Gb QWKS rev3
Support the next features for 1Gb qwks rev3 boards:
- Support for fix lpddr2 mode
- hdcp and enetirq
- bluetooth and wifi for Murata ZP SDIO dongle
Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
For some SD Ultra (40MB/s) the drive strength/speed settings
on the iomux ctrl pads for SD3 is not enougn causing some
error by transfering data as below:
mmcblk2: error -84 transferring data, sector 2250553, nr 151,
cmd response 0x900, card status 0x0
Updating the DSE and Speed on the pad ctrl fixes the issue.
Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
This patch fixes below build warning:
CC arch/arm/mach-imx/clk-imx7ulp.o
LD init/built-in.o
arch/arm/mach-imx/clk-imx7ulp.c:42:20: warning: 'cm4_periph_plat_sels' defined but not used [-Wunused-variable]
LD arch/arm/mach-imx/built-in.o
CC kernel/module.o
GZIP kernel/config_data.gz
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
On i.MX7ULP, the resume entry and parameter are saved
in DGO_GP registers, it has two power domains, one
is normal domain, the other is SNVS domain, if M4 also
enters VLLS mode, DGO needs to be updated into SNVS
domain to avoid power lost and lead to resume fail.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Add fsl,wdog_b and pinmux settings.
We need to use wdog_b to trigger pmic reset, when we trigger
wdog_b reset, we should not trigger wdog_reset_b_deb.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 0400ecd8fb3a3772dfb3a68c55960419a63f1650)
set ABF0 of MU_CR to let M4 know MU is ready, thus MU can initialize rpmsg
later.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 4969903fc8d32c5e6dfc4fe5f2f68e52aef080bc)
Enable rpmsg/mu support on i.mx7ulp, since some mu register and
rmpsg buffer different as before
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Audio is in M4 domain, so we need an indepenent dts for audio.
M4 domain is controled by RTOS, this dts is for demo purpose in
linux
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
In imx7ulp1, the sai can support two TX channel and two RX
channels, So the usage need to be updated.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Add system reboot for i.MX7ULP. As there is no other way to reboot the
system, so use wdog restart handler to trigger the system reboot.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
There is no card-detection pad connected for sd3 on the i.mx6 SX
EVB board. The card is assumed to be non-removable, hence, there is
no need to redetect the card during the pm callbacks. This can be
reached by including the pm-ignore-notify option on the usdhc3 device
on the dtb file.
Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
The usb otg2, on the SXSCM EVB board is powered up directly by the
GEN_V5 signal from the PMIC, so there is no gpio assigned.
The wrong assignation was preventing the busfreq driver to switch
to any other frequency, since the usb otg2 looks to be always
active.
Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>