Some times, we need to enable/disable ADC grps or DAC
directly to debug.
Change-Id: I53b9fa94733d84f7101e299d3fcb6f9160e36112
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
In general, the kernel dts hadn't defined the rockchip_suspend parameters.
The ARM Trusted Firmware (ATF) had a configure been used by default.
As far, the rockchip_suspend can be configured in kernel when someone need
configure it by themselevs.
Change-Id: Id1b4b79609c3ce345aad946e07105d96f62c04f8
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
for multi camera board, connect npu by pcie,
depend on rockchip,dma_trx_enabled = <1> on dts
Change-Id: I244fdeddd0e64ab35bdb5a63655a3216292bbf34
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
The "OTG wakelock" should be destroyed if otg port was initialized
failed, in case of its memory allocate for other module and the
"wakeup_sources" list would be broken.
Change-Id: Ic478e7297e36def8e105a0736beb86c99ca6261d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
For the 'otg-mux' irq in SoC should include 'otg-bvalid', 'linestate',
and 'otg-id'. This change fix the previous error condition.
Change-Id: I8fe46c8c9efd6ce04eead89c276227d4cc70902e
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
The pins from GPIO2B0 to GPIO2B6 are located at GRF_GPIO2BL_IOMUX,
they are recalculated to get correct iomux.
Change-Id: I1e46697c4508c396b5e8140c32c4185925a040ea
Signed-off-by: David Wu <david.wu@rock-chips.com>
If there is no codec instance or headphone jack, we
should not request headphone jack from machine driver.
Change-Id: If05ac2f4bbfd3fc495a75c0701a44a325e5010cd
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Some of the RK3399 sapphire excavator boards have a
suspend/resume issue with the following error log:
dpm_run_callback(): usb_dev_suspend+0x0/0x30 returns -16
PM: Device usb6 failed to suspend async: error -16
PM: Some devices failed to suspend, or early wake event detected
If this error happens, the USB port can't recognize
any USB device with the failed log:
usb usb5-port1: connect-debounce failed
It's because that the Type-A USB3 port which belongs
to fe900000.dwc3 is in abnormal state. We can check
the link state easily via the debug node:
cat /sys/kernel/debug/fe900000.dwc3/link_state
The normal link state is Rx.Detect if no USB device plug
in. But after resume, the link state will change to Polling.
According to the USB 3.1 Spec, the link state can change
from Rx.Detect to Polling state if the USB3 PHY detect
the far end receiver termination. From that we infer that
the USB3 PHY affects the USB3 controller link state since
the USB3 PHY is in power on state when enter suspend.
Actually, it's a common problem if the DWC3 work as Host
mode in the following cases, and it only happens if system
enter suspend/resume without any USB device conneted.
Case1. Type-A USB 3.0 interface with dr_mode = "host";
Case2. Type-A USB 3.0 interface with dr_mode = "otg",
and set DWC3 to host mode via "dwc3_mode";
Case3. Type-C USB 3.0 interface with dr_mode = "host";
Case4. Type-C USB 3.0 interface with dr_mode = "otg",
and plug in Type-C to Host cable;
Case5. Type-C USB 3.0 interface with dr_mode = "otg",
and set DWC3 to host mode via "dwc3_mode";
This patch power off the USB3 PHY if no USB device connect
with the DWC3 Host port before enter suspend, and power on
the USB3 PHY again upon resum.
Fixes: 323ccc3640 ("usb: dwc3: rockchip: fix rk3399 dwc3 host power on fail")
Change-Id: Ifd7805e1f4accb281dd047445d97f4cc954eb5ac
Signed-off-by: William Wu <william.wu@rock-chips.com>
Some i2s bus GPIOs maybe designed multiplex, the default
is input, we need to configure IN/OUT dynamically.
Change-Id: I2e0f0f972d6f9fa3fc8e8fc9f5dfd5d4e6deaee1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
If the number of buffers in Import exceeds the original set of 30,
it will result in each import buffer kicking out the original stored
buffers, and all subsequent buffers need attachments.
Change-Id: I6e547e1f8943d54995077827ae0d1019e659d797
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
By default fsync option, if fsync is called frequently, and suddenly
lost power, the POR will consume too much memory at mounting, this
process may be very slow due to a large number of swapping.
Change-Id: I8235098cca062d7ab58af4ebed414aed9aba6c75
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
Test on RK3399
Fixes: f324dff252 ("drm/rockchip: dsi: Send turnaround request after a read request for dsi1")
Change-Id: Id1fad1e8c7c742291bdbd77082dd872093ad549e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
The RNDIS gadget function has USB class of 2 and subclass
of 2, which matches "USB\Class_02&SubClass_02" in the
usbser.inf file in the Windows system, so the device is
initially detected as a COM port instead of RNDIS. This
is why we need to install RNDIS manually.
Refer to Defined Class Codes [1] and rndis_host of Linux [2],
this patch sets the RNDIS gadget with base class of 0xE0h
(Wireless Controller) and subclass of 0x01h and protocol
of 0x03h.
[1] https://www.usb.org/defined-class-codes
[2] http://www.embedded-os.de/en/proto-rndis_host.shtml
Change-Id: Ida366749f378a0ce770d707b4ba56b87f9e188cf
Signed-off-by: William Wu <william.wu@rock-chips.com>
We need to export Headphone Jack snd ctl to userspace
on linux platform via multicodec machine driver.
Change-Id: I5664a0b29dfda2ed8cc450a5f0fd388d32dfdd48
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
We need to export Headphone Jack snd ctl to userspace
on linux platform via multicodec machine driver.
Change-Id: I1d042b080ab45f303f7c1a4100a2dd8014d923bc
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
We need to specify a pin description to create a
new soc jack kctl and report to userspace.
Change-Id: I46f665bd4009c0779a5c9cc3f6b9d43123b54883
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
For the legacy issues, we still need to call rk_headset
on some linux platform.
Change-Id: I395de2b8c1300b1cd7cb429dce852ef12bfe2f4c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Some legacy hardware reference designs are based on the
driver configuration of rk_headset, we need to open it
by default.
Change-Id: I15758e15da3a6c76f8cc021749ce9fee1905f72a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
rk3288 cif can work with mipi channel and switch work mode
Change-Id: Ie8a49cf787617ff5d98ef84cdac761c3ece761c9
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
txrx can be linked with isp or csi-host, so separate it
Change-Id: I41d81770c53008bdf9703f92834cc41d9724a563
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Link mipi with cif to work.
Meanwhile,replace isp node with rkisp1 node to use
rkisp driver and remove edp-panel enable pin due to
it conflicts with dvp pwdn pin on rk3288-evb-v11.
Change-Id: If8125d2173c7340d7d702294ab55ee2f0c433663
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
drm_dp_cec_register_connector() is called when registering each DP
connector in DRM, while sounds a good idea register CEC adapters as
earlier as possible, it causes some driver initialization delay
trying to do DPCD transactions in disconnected connectors.
This change will cause no regressions as drm_dp_cec_set_edid() will
still be called in further detection of connected connectors with a
valid edid parameter.
This change reduced the module load of i915 by average 0.5sec in a
machine with just one DP port disconnected while reducing more than
3sec in a machine with 4 DP ports disconnected.
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181011004439.4482-1-jose.souza@intel.com
(cherry picked from commit 7323001549)
Change-Id: I815948f733719705bbc576fc1ca723fb5a59fe6b
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
If aux->transfer == NULL, then just return without doing
anything. In that case the function is likely called for
a non-(e)DP connector.
This never happened for the i915 driver, but the nouveau and amdgpu
drivers need this check.
The alternative would be to add this check in those drivers before
every drm_dp_cec call, but it makes sense to check it in the
drm_dp_cec functions to prevent a kernel oops.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-2-hverkuil@xs4all.nl
(cherry picked from commit 5ce70c799a)
Change-Id: I8a56122cc777e17c2b303120372f7087a94c5083
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>