If autostop mode is enabled, such as RK3588, autostop mode requires
statistics on the transmission length; for tx only mode, the device
address is also counted as one byte, so the judgment conditions become
different.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I91c0b68fabb60952f630a98133423aa4cb1b9b48
The SYSCON driver was designed for using memory areas (registers)
that are used in several subsystems. We can use bits in one
register for various purposes and thus should be handled by
various kernel subsystems.
In Rockchip RK3328, the output only GPIO_MUTE pin, originally for
codec mute control, can also be used for general purpose. It is
manipulated by the GRF_SOC_CON10 register in GRF. Aside from the
GPIO_MUTE pin, the HDMI pins can also be set in the same way.
Therefore, we need to enable this feature in rockchip_defconfig.
Change-Id: I0036bb8d3fb007f0ccab5d340d179886926a98ed
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
The SYSCON driver was designed for using memory areas (registers)
that are used in several subsystems. We can use bits in one
register for various purposes and thus should be handled by
various kernel subsystems.
In Rockchip RK3328, the output only GPIO_MUTE pin, originally for
codec mute control, can also be used for general purpose. It is
manipulated by the GRF_SOC_CON10 register in GRF. Aside from the
GPIO_MUTE pin, the HDMI pins can also be set in the same way.
Therefore, we need to enable this feature in rockchip_linux_defconfig.
Change-Id: If83f232121fb9fe54b6ff362d7911edf229d3878
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Fixes: 006505ca76 ("misc: add rockchip standard EP function driver")
Signed-off-by: Xiao Ya peng <yp.xiao@rock-chips.com>
Change-Id: I602323f9cedc6edf94f951b9b9c9787b3a271550
This patch drop the unused config src/dst_interleace_size.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I78dba866c6d7c6c755c77d1558a8449716bcc1aa
This patch use the interleaved dma transfer API for multi-dais
data, now, let's drop the legacy implementation.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8f217e25ae68017eff3eaedfe1d3475cbbaccde6
This patch add support for interleaved transfer which used
for interleaved audio or 2d video data transfer.
for audio situation, we add 'nump' for number of period frames.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I502ea9c86c8403dc5b1f38abf40be8b6ee13c1dc
for compatiblility between arm32 and arm64, giv2 and giv3,using 64-bits
variable to manage the cpu's affinity.
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: Ic5ce758d4711c039be9dc52df8f0ebbbdfcc1244
for rpmsg, it needs to set pending reg between different os, so allow to
config pending function between different os.
Fixes: 2e7658ef57 ("irqchip/gic: support config amp os irqs")
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Change-Id: I4b06f8a692e34c339d4facb40b8120fdbe1d7bcd
It will be more safer for regulator consumer devices to power on
after their power suppliers are stable. And regulator consumer devices
need to completely shut down, then power up for a reset cycle.
Therefor, regulator providers need to be make sure shutdown completely.
- startup-delay-us can be used to wait regulator providers be powered on
good, according their power-up time.
- off-on-delay-us can be used to wait regulator providers be shut down
completely.
1. cameraN_vcc12v_buck have a approximate ~1ms power on rise time
and ~13-~14ms power off fall time
2. vcc5v0_buck uses MPQ4317 which have a approximate ~1.5ms
EN(on)->PG(high) delay and ~0.8ms EN(off)->PG(low)
Change-Id: I8f23a6a4b53c8760f62c64758a481ad86be4da16
Signed-off-by: Cody Xie <cody.xie@rock-chips.com>
3d fp mode pixel clock needs to be doubled. mode->crtc_clock
is already a doubled clock, don't have to multiply it by 2.
At the same time, this error will cause the audio cts calculation
error so that hdmi has no sound output. This commit can also
fix the problem.
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I7d080f9779a640649c149f4b21072597cf0c0cf7
Avoid extra 120ms delay during system resume.
The xHC controller may signal wake up to 120ms before showing which usb
device caused the wake on the xHC port registers.
The xhci driver therefore checks for port activity up to 120ms during
resume, making sure that the hub driver can see the port change, and
won't immediately runtime suspend back due to no port activity.
This is however only needed for runtime resume as system resume will
resume all child hubs and other child usb devices anyway.
Fixes: 253f588c70 ("xhci: Improve detection of device initiated wake signal.")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20230428140056.1318981-3-Basavaraj.Natikar@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 1c024241d0)
Change-Id: Icf4e8c97b3d5f6e9550fcad0e748c7badf1b22df
Add rockchip_hardlock_notify to save pc of the cpu that is hard lock,
the pc is used for minidump cpu hard lock stack.
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ie542d981f3f12ac1eb3a2f425b76780a04f220cf
1. save more data of cpu sp and general registers
2. save hardlock cpu pc to note section
3. save hang task context to note section
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I52bfc419aeff1c049c5c88e77ed29d7be56601b7
Before sending the stop command, there may still be some
valid data in the fifo that has not been transmitted to
the TF card. Therefore, it is necessary to increase the
determination of fifo count and reset the controller
before send the stop command.
Fixes: 6eca689b99 ("mmc: dw_mmc: Workaround for RV1106/1103 sdmmc")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I766673b25157a77018ac127e2ad9fb3f9672904b
Add support for dual lvds with hdmi output
Change-Id: I8b6e294e6e96b2c65c27da346868a4f051d24ab2
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Should use update_bits instead of write directly which
will override the other configs on AUD_CONF0.
Fixes: 19820cc653 ("drm/bridge: synopsys: Recover sound for XRUN routine")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie64cdce700a30f1b4a64fc9d437d34bd0496aa30
healthd will voltage_now/1000 cause batteryVoltageMillivolts too small
which cause BatteryStatsHistory.setBitField() error
Signed-off-by: Huang Chaoqun <chaoqun.huang@rock-chips.com>
Change-Id: I8da022a2b7461ac62f0cdcb34a2488a333967523
It will lead the device pull down Data0 sometimes, which makes the insmod
process very long based on different eMMCs. The biggest will be 4s.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I2dbf76f62c9cbaa31db101ed91765ecb7eaf6633
The vdd is the power supply of pvtpll, if mem volt less than vdd volt,
there will not be enough voltage margin.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I15b57904c20b74d16ac8113f3e49e3410bcf02af
1.fix mipi timing bug when hsfreq is 1250Mbps
2.add continue mode config from dts
Change-Id: I62b6d8effe43b1915bbdf55eb377ce6f0d004b14
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
Test on RK3588 EVB1 with dwc3_of_simple_driver_init in
initcall_blacklist like this:
bootargs = "earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 initcall_blacklist=dwc3_of_simple_driver_init";
Kernel halt in ehci_bus_resume when read the intr_enable
register of the ehci controller. It's because that the
ehci controllers depend on the aclk_usb which only be
managed by DWC3 controller driver right now.
The clock dependency when access ehci/ohci controller registers:
CPU -> hclk_vo1usbtop -> aclk_usb -> hclk_usb -> ehci/ohci
This patch adds the aclk_usb for all ehci and ohci controllers.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I66a622d7156d52451273423c4d6ca2cd965fe55a
If two cpu die at the same time, the first cpu get die_lock,
calls minidump die notify and saves regs, then panics.
But the second cpu would hardlock because it can't get the die_lock.
And nothing is saved to minidump, so we have the patch.
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I38cda3a6cee160ba1293a2e18c7238c96cf2e755