when pd on or resume, need run hack code first.
Change-Id: Ic61a301ec7b34a29b2fb3fe09b557dad4fab8dc7
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Auto Hiber8 is working fine with a default 150ms gap since we don't
overwrite hba->ahit. However we consider to disable refclk, so adding
our own rpm callback and enabling all PM capabilities if possible.
Also adding device_reset() hook for better error recovery as well as
putting device into deep sleep if supported.
BTW we also attach genpd for ufs, so RPM works fine with genpd control.
With ufs into auto runtime suspend
usb off-0 0
/devices/platform/2a2d0000.ufs suspended 0
/devices/platform/23000000.usb suspended 0
exit runtime suspend if accessing ufs
usb on 0
/devices/platform/2a2d0000.ufs active 0
/devices/platform/23000000.usb suspended 0
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I91e293d2da968090a524c5aef1e963bff7295127
1.lsc table ram only one, need change to load from ddr
2.rgbir luma_point idx16 is 11 bit, other 10 bit
Change-Id: Ida169b7d34eefc73765baf2ff6b380be8c280caa
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
Since RK3576 dwc3 integrate in a single node, so check
its own node and set autosuspend delay for NO_GKI desired.
In addition, this also cleanup the related codes for the
rockchip platform.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I1ef762559ab98cb5e80c1bd787c5a4cfe1429220
Since the mailbox register is changed in the new controller, refactor
the driver to make compatible for it.
There is only one channel in a mailbox, besides, write cmd register
can trigger the interrupt support.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I0df6923cfd6db5b450b78ee8d42df949b7d80bdd
This adds the following properties.
- "rockchip,rk3576-mbox" : update compatible property.
- rockchip,enable-cmd-trigger : enable write cmd register to
trigger interrupt.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ieb2e9d248b0eac387f7a6f862461d11aefb4905b
1.Add pinctrl config in rockchip_pwm_set_capture().
2.Add input_sel flag to select the input of io or cru.
Change-Id: I95953bdb0dc6b939acc0db5d335a5bcfcc7b884c
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
1.Add pinctrl config in rockchip_pwm_set_freq_meter().
2.Add input_sel flag to select the input of io or cru.
3.Use usleep_range() instead of readl_relaxed_poll_timeout,
because there is no need to poll interrupt status.
Change-Id: I6ea4456539fe143baf2bfce70386c51f801a00a3
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
1.Select pinctrl state in capture mode.
2.Use usleep_range() instead of readx_poll_timeout, because
there is no need to poll capture_cnt and the read
of capture_cnt may be interrupted.
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: I9360a42aca374ed5eb089befd05571c4d32038f2
1.Add pinctrl config in rockchip_pwm_global_ctrl().
2.Config the dclk for grant channel in PWM_GLOBAL_CTRL_ENABLE
and PWM_GLOBAL_CTRL_DISABLE commands.
3.Add flag is_clk_enabled to confirm the status of dclk.
Change-Id: I9a377d6a72d2f242f9df5e707c42d86db0c13f69
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Using macro will be more efficient if related function
is called frequently.
In addition, remove unused parameter cntr in struct
rockchip_pwm_regs for pwm v1.
Change-Id: I7a1d5aa6e08845afc9501756dadacef09f527a13
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>