Enable the DP driver used on Rockchip RK3588 SoC.
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I4d645edebf90ceaa35b52b0ccf029c17d1a51e67
To use tsadc_shut function, tsadc must switch to cru_shut_mode,
because tsadc_shut signal have to go through the cru to get to
tsadc_shut signal.
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I9bc816db35bdf1c107db4e301d9f3353cb651dcf
rk3588 boards may have different pcie3-phymode, default as below id not
set:
rockchip,pcie30-phymode = <PHY_MODE_PCIE_AGGREGATION>;
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: If158eb47f679d0c7b184b6bd64262d0f764b97f3
rk3588 boards may have different pcie3-phymode.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I76825c09014481a06af4c04d0b9b1cc0fee89a8d
Restore usbotg0 dr_mode to "otg" that Type-C controller can switch the
mode via "role_switch" callback for RK3588 EVB1, EVB3 and EVB4.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I6e7d83acb468d50e31ffdfdee6adcd7c5330d776
use helper functions to send dsi picture parameter set data
type packets, the size of struct drm_dsc_picture_parameter_set
is 128 bytes, it may be greater than the size of pps panel required,
so the redundant part should default to zero.
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I8b937b052cc0d579dd78859ef1aa04aea818d694
drivers/gpu/drm/rockchip/dw-dp.c:1911 dw_dp_audio_infoframe_send()
error: hdmi_audio_infoframe_pack() '&buffer[4]' too small (26 vs 30)
Fixes: 9548fbb10c ("drm/rockchip: Add support for Synopsys DesignWare Cores DPTX")
Change-Id: I34142ae76b428c4ada3debfe80698af63ffd8f1f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Need to add additional symbol in execution path to ABI list.
Bug: 176077958
Change-Id: I676b4f9a016c825572d10de49b6062a90078f2f2
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
This reverts commit 20285dc271, which
causes serious performance downgrade because the calculated cpu
frequency will be much lower than before due to change of cpu util.
Bug: 205915994
Test: build pass
Change-Id: I68dced7a58547a3324fcfeebea6c02bb30c4182d
Signed-off-by: Rick Yiu <rickyiu@google.com>
sem->count will be negative after writer is killed
if flag RWSEM_FLAG_HANDOFF is not set, we shouldn't clean again
CPU2 CPU4
task A[reader] task B[writer]
down_read_killable[locked]
sem->count=0x100
down_write_killable
sem->count=0x102[wlist not empty]
up_read
count=0x2
sig kill received
down_read_killable
sem->count=0x102[wlist not empty]
goto branch out_nolock:
list_del(&waiter.list);
wait list is empty
sem->count-RWSEM_FLAG_HANDOFF
sem->count=0xFE
list_empty(&sem->wait_list) is TRUE
sem->count andnot RWSEM_FLAG_WAITERS
sem->count=0xFC
up_read
sem->count-=0x100
sem->count=0xFFFFFFFFFFFFFFFC
DEBUG_RWSEMS_WARN_ON(tmp < 0, sem);
Bug: 204595609
Link: https://lore.kernel.org/all/a630a9aa-8c66-31c9-21a0-3d30bde2c9df@redhat.com/T/
Signed-off-by: mazhenhua <mazhenhua@xiaomi.com>
Change-Id: Ife64c179335d74768a3d68e402c72d10148f3e7e
Some vendor drivers rely on flow control by toggling
enable/disable virtual irq if using legacy interrupt.
It can certainly change the behaviour by function
drivers, but adding corresponding operations would make
RC driver more flexible.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Idf3e6a0ca9c4ebde369745713a88db53e3f72ea5
Add a new driver for Synopsys DesignWare Cores DPTX IP used
in Rockchip RK3588 SoC. The DPTX is compliant with the
DisplayPort Specification Version 1.4.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I0588aae8b3c9ae19ab7ee5d2c86673aa35cee2ff
Enable the DP driver used on Rockchip RK3588 SoC.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I9b6c817746c74bc3f50df302dfbdae1e80324fb8
in order to switch dsi2 working mode, operation DSI2_PWR_UP from
power on to power off and then power on, it may trigger dsi2 host
to send unexpected cmd to panel, resulting in panel abnormality,
therefore, do not operate DSI2_PWR_UP when switching the working
mode.
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I78d969dbc16262c9f7367fe5c25688d84cb1f935
1 rk3588_udphy_cfgs is used to define const data, remove
dp lane map grf register from it;
2 fix the dp lane mapping mismatch issue.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I3c179596c0c9c961afb0f0ee46a3b5f0f01d23a1
In usbdp-phy, the DP function can use all or only part of
the phy lanes. This info need notify DP controller.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ib943532d7a764602392837f9a9163af00e8e7918
When enter DP mode, exit DP mode, disconnect device, the data
is NULL. And only check the hpd is connect, set the gpio.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I7a3558c5ee5f954055fdd5edbbd50b5079d8f323
According the dp lane mapping, set the swing and pre-emphasis
to phy lane.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I77bec31a8a7b026db7e799991157114273ab0d4c
rk3588 has 2 usbdp phy, usbdp phy use aliased id to identify
the 2 usbdp phy devices.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I59c634eb2c74ac48bbf067883c6ed12fd0e3e5eb
+CONFIG_WL_ROCKCHIP=y
+CONFIG_WIFI_BUILD_MODULE=y
+CONFIG_AP6XXX=m
+CONFIG_BCMDHD_PCIE=y
-# CONFIG_NET_VENDOR_REALTEK is not set
+CONFIG_R8168=y
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Icb986d4e419054beb5bb271f37f965e9120348ce
1. set hp-det pin pcfg_pull_none all evbs
2. enable headset for rk3588s-tablets
3. add "everest,es8323" string to es8388 compatible property for rk3588s-tablets
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: I85ae0bc78c2058d38ed768da7233d86cdb0c301f
In order to adapt to the mpu6500 in the rk3588
evb3 board, a new layout was added.
Change-Id: I9283e05e7b8b3ec04ee887e36898c4c49e4efa51
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
If the port is going to send Discover_Identity Message, vdm_sm_running
flag was intentionally set before entering Ready States in order to
avoid the conflict because the port and the port partner might start
AMS at almost the same time after entering Ready States.
However, the original design has a problem. When the port is doing
DR_SWAP from Device to Host, it raises the flag. Later in the
tcpm_send_discover_work, the flag blocks the procedure of sending the
Discover_Identity and it might never be cleared until disconnection.
Since there exists another flag send_discover representing that the port
is going to send Discover_Identity or not, it is enough to use that flag
to prevent the conflict. Also change the timing of the set/clear of
vdm_sm_running to indicate whether the VDM SM is actually running or
not.
Change-Id: Id282f7b694cb608a5632db43dafd82dade77340f
Fixes: c34e85fa69 ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work")
Cc: stable <stable@vger.kernel.org>
Cc: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210826124201.1562502-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit ef52b4a9fc)
Commit a20dcf53ea ("usb: typec: tcpm: Respond Not_Supported if no
snk_vdo"), stops tcpm_pd_data_request() calling tcpm_handle_vdm_request()
when port->nr_snk_vdo is not set. But the VDM might be intended for an
altmode-driver, in which case nr_snk_vdo does not matter.
This change breaks the forwarding of connector hotplug (HPD) events
for displayport altmode on devices which don't set nr_snk_vdo.
tcpm_pd_data_request() is the only caller of tcpm_handle_vdm_request(),
so we can move the nr_snk_vdo check to inside it, at which point we
have already looked up the altmode device so we can check for this too.
Doing this check here also ensures that vdm_state gets set to
VDM_STATE_DONE if it was VDM_STATE_BUSY, even if we end up with
responding with PD_MSG_CTRL_NOT_SUPP later.
Note that tcpm_handle_vdm_request() was already sending
PD_MSG_CTRL_NOT_SUPP in some circumstances, after moving the nr_snk_vdo
check the same error-path is now taken when that check fails. So that
we have only one error-path for this and not two. Replace the
tcpm_queue_message(PD_MSG_CTRL_NOT_SUPP) used by the existing error-path
with the more robust tcpm_pd_handle_msg() from the (now removed) second
error-path.
Change-Id: I5ccff5715cf08e2f8ba825eae4fc7cbdf43f1970
Fixes: a20dcf53ea ("usb: typec: tcpm: Respond Not_Supported if no snk_vdo")
Cc: stable <stable@vger.kernel.org>
Cc: Kyle Tso <kyletso@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Kyle Tso <kyletso@google.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210816154632.381968-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 5571ea3117)
pcie30phy will need to reference to pipe-grf.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I31e55c33c22fa4a2bcf424ad4730e057a6fbca28
rk3588 pcie3 phy has a pcie3_phymode to decide how to use the four
lanes, add support in dts so that we can customize in dts.
The phy has two port and each port has two lane:
pcie30_phy_mode[2:0]
2: aggregation
1: bifurcation for port 1
0: bifurcation for port 0
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I0546329cc53df05f0779a7b34d948158bbc5ebcd
Add support for RK3588 PCIe3.0 phy, and make it more
flexible for later platforms.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ied29cfcdf69d84ab2a6d653259170b9d2c484a06
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>