From the datasheet, the built-in codec interrupt number
should be 64 = 96 - 32.
Change-Id: I8078949fe57ce3c87867a8f2853efba8fce0a634
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
The function of ddr standby influence memory stability,
so disable it for the present.
Change-Id: I9df7381944687da8819665009b162c387eb06ceb
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Because USB OTG id irq is disabled during system suspend
and enabled after resume, so the usb2 phy doesn't notice
any id status change upon resume. It may cause two issues:
1. Plug in OTG cable and USB device when system enter
suspend, it will fail to detect the OTG cable and
USB device after resume.
2. Plug out OTG cable and USB device when system enter
suspend, and then connect USB to PC or USB charger
after resume, it will fail to detect USB charge type.
This patch restores the OTG id status before enter suspend,
and check the id status upon resume, and set the extcon
state and vbus if id status has changed.
Change-Id: Iaca14841cc287e7d82e1cffd64ff18bba86d3ba4
Signed-off-by: William Wu <william.wu@rock-chips.com>
Add missing power on to pair with the power off in suspend.
Change-Id: I676b57dd8ba9aff108a3b57c4350d272d54ca996
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
We're using devm_regulator_get, no need to put it manually.
Change-Id: Ida960d938d7557d0174c53e952d80161650ccf1a
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Enable the alias for ethernet in rk3399 and order the items
in alphabetical order.
Change-Id: I7862593ad99028eba75102fb684987cec8762d1c
Signed-off-by: Randy Li <randy.li@rock-chips.com>
There is only one snd_soc_card instance, the parameters that
include card name are overwritten, so that the DUT will be
hung during suspend that dues to snd_power_wait enter twice
because it find the incorrect node name "/vad-sound":
[ 14.129501] snd_power_wait, state: 0x0000, np name: /vad-sound
...
[ 14.133063] snd_power_wait, state: 0x0300, np name: /vad-sound
Then the "rockchip,rk3308-vad" has been off (SNDRV_CTL_POWER_D3 0x0300),
and enter endless loop in snd_power_wait().
Therefore, we need create independent snd_soc_cards
for multi-codecs, and find the corrent card name
during suspend:
[ 8.939576] snd_power_wait, state: 0x0000, card name: /vad-sound
...
[ 8.941472] snd_power_wait, state: 0x0000, card name: /acodec-sound
Change-Id: Id30e25eaa4bf5c39284e32e772dca2e9c3cb96b1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Add 3 types boards for rk3308 voice modules:
// Only core board:
rk3308-voice-module-board-v10-aarch32.dts // only supports 2ch amic
// There are core board + main board:
rk3308-voice-module-amic-mainboard-v10-aarch32.dts // using max 4ch amic
rk3308-voice-module-pdm-mainboard-v10-aarch32.dts // using max 4ch pdm mic
Change-Id: Ieed43dbc246e03a6579da160281f858668841ec4
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
In previous code, driver will update the power supply status before
power_supply_register, so it will cause kernel panic. So we put the
bq25700_power_supply_init before bq25700_init_usb to fix this issue.
Change-Id: Id9d206dbecfdadbd968b5c9d24f85f66ef321b9d
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
According to gt1x_generic.h, the GTP_POWER_CTRL_SLEEP is for
"turn off power on suspend" case.
And we're turning off TS's power on suspend actually.
Change-Id: I2a8ec852a96beb01d6e4d6cfd4f3e94ef0185608
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
The MIPI_DSI_TURN_ON_PERIPHERAL and MIPI_DSI_SHUTDOWN_PERIPHERAL packets
are required for some panels, for example the Panasonic VVX10F034N00.
Change-Id: Ib005eb3e464399a9bb83834d31beff146f56116a
Signed-off-by: Werner Johansson <werner.johansson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit 6e8c9e3376)
Don't ignore UFP_D data, so that we can get
right DP pin cap from DISCOVERY_MODES.
Fix commit 4258959427
mfd: fusb302: add DP UFP_D support
Change-Id: I6a6250d26c1a847c9b75c676b14f47a37bfcc1f9
Signed-off-by: zain wang <wzz@rock-chips.com>
The new Rockchip socs have optional half divider,
so we use "branch_half_divider" + "COMPOSITE_NOMUX_HALFDIV \
DIV_HALF \ COMPOSITE_HALFDIV \ CMPOSITE_NOGATE_HALFDIV"
to hook that special divider clock-type into our clock-tree.
Change-Id: I79e3f0e8265ccb6a9839cd83a7a3ee0ca825a020
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Indeed, "2EE" is hardcoded, it's not a good way.
But I could not find a way to get the number of EE(s) at runtime right now.
Change-Id: I15afe580d194c0d8354953fe877ac1d2882826c5
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
We need to close ADC or DAC mclk if they are not working,
it may reduce a bit of power consumption for runtime.
And, power off and close pclk_acodec during suspend. But
the acodec may be needed by VAD during suspend, we can
use the property 'rockchip,no-deep-low-power' to keep
codec during suspend.
The following is a comparison of power consumption before
and after the modification on RK3308 EVB v10:
[default] VCC_1V8_CODEC(V*mA=mW) VCC_3V3_CODEC(V*mA=mW)
idle 1.794*0.9=1.614 3.354*2.8=9.3912 // the ADC and DAC mclk are opened
playback 2ch 1.793*7.9=14.1647 3.354*2.8=9.3912 // the ADC and DAC mclk are opened
capture 8ch 1.789*27.8=49.7342 3.324*2.8=9.3072 // the ADC and DAC mclk are opened
suspend 1.8*0.7=1.26 3.356*2.8=9.3968 // the ADC and DAC mclk are opened
[modified] VCC_1V8_CODEC(V*mA=mW) VCC_3V3_CODEC(V*mA=mW)
idle 1.794*0.8=1.4352 3.354*2.8=9.3912 // just close ADC and DAC + close ADC / DAC mclk
playback 2ch 1.793*7.8=13.9854 3.354*2.8=9.3912 // open DAC mclk, close ADC mclk
capture 8ch 1.789*27.7=49.5553 3.323*2.8=9.3044 // open ADC mclk, close DAC mclk
suspend 1.799*1=1.799 3.355*0.3=1.0065 // close 2 micbiases, close mclk tx/rx and pclk_acodec
It seems that the light low power (close ADC and DAC mclk) can't
bring us much help to reduce power (only ~1mA@VCC_1V8_CODEC),
but the deep lower power can help us to reduce ~8mW@VCC_3V3_CODEC
during suspend. However, it's that the power is increased
~0.5mW@VCC_1V8_CODEC in deep low power, it needs to EE's to
help us to check this.
Change-Id: I7982b4e20bcb894e1895f772816b2b188bcc314d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
rk3308 has a new nandc, driver need modify to support.
Change-Id: I1b30f5ac106759873cd0a14b6340b49232f5106c
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>