Commit Graph

1060875 Commits

Author SHA1 Message Date
Caesar Wang
a6ca525f8e arm64/configs: rockchip_linux_defconfig: enable wifi configure
+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
2021-11-16 18:26:43 +08:00
Kever Yang
55f515881d arm64: dts: rockchip: rk3588: Use apb for pcie controller name
The apb address is better identified than dbi address for pcie
controller.

Before patch:
[    4.302098][  T127] rk-pcie a40800000.pcie: PCIe Linking... LTSSM is 0x3
[    4.302141][  T123] rk-pcie a40c00000.pcie: PCIe Linking... LTSSM is 0x3
[    4.302167][  T124] rk-pcie a41000000.pcie: PCIe Linking... LTSSM is 0x3
[    4.328750][  T125] rk-pcie a40000000.pcie: PCIe Linking... LTSSM is 0x3
[    4.328767][  T126] rk-pcie a40400000.pcie: PCIe Linking... LTSSM is 0x2
After patch:
[    4.301712][  T123] rk-pcie fe180000.pcie: PCIe Linking... LTSSM is 0x3
[    4.301727][  T125] rk-pcie fe150000.pcie: PCIe Linking... LTSSM is 0x3
[    4.301779][  T127] rk-pcie fe170000.pcie: PCIe Linking... LTSSM is 0x3
[    4.301799][  T124] rk-pcie fe190000.pcie: PCIe Linking... LTSSM is 0x3
[    4.328473][  T126] rk-pcie fe160000.pcie: PCIe Linking... LTSSM is 0x2

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Idabe2da42dd3f9bd1ff55d18c490d95fa48795fd
2021-11-16 18:05:54 +08:00
Kever Yang
9892e3a80c arm64: dts: rockchip: rk3588: Fix the pcie1ln setting
pcie1l0_sel pcie1l0->combPHY1
pcie1l1_sel pcie1l1->combPHY2

Fixes: a44f986d11 ("arm64: dts: rockchip: rk3588: Add pcie1ln setting for comboPHY")
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I604fec8563c7a82279eaa5e943af1ae69639f862
2021-11-16 18:03:20 +08:00
Cai YiWei
6d3eff78e5 media: rockchip: isp: fix isp30 fbc config
Change-Id: I8e3ec6bbd46c77c95085c36740a35776b69f81fc
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-11-16 17:10:12 +08:00
Shunhua Lan
3e819876dd arm64: dts: rockchip: rk3588 board: modify configs for sound cards and headset
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
2021-11-16 17:09:20 +08:00
Mark Huang
7a058412d9 arm64: dts: rockchip: add rk3588 nvr demo spi nand Board
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
Change-Id: I435b856239605ea9845e9f1782c0193ddab84836
2021-11-16 17:01:15 +08:00
Jianqun Xu
cc6a4c9133 arm64: dts: rockchip: rk3588s-pinctrl define hdmi pins one by one
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I747f3c5fb7316514458c24384a14997287bc106e
2021-11-16 16:58:45 +08:00
Wang Jie
c7edd31125 arm64: dts: rockchip: rk3588-evb3: enable sensor(mpu6500)
Change-Id: I2dab72855f2f31ac021611397bbed2548c20f9f1
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2021-11-16 16:53:00 +08:00
Wang Jie
aec3ade8ca input: sensor: add new layout 9
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>
2021-11-16 16:52:39 +08:00
Kyle Tso
2b5787ea0b UPSTREAM: usb: typec: tcpm: Raise vdm_sm_running flag only when VDM SM is running
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)
2021-11-16 16:43:16 +08:00
Hans de Goede
2d408a1113 UPSTREAM: usb: typec: tcpm: Fix VDMs sometimes not being forwarded to alt-mode drivers
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)
2021-11-16 16:42:52 +08:00
Kever Yang
5c15a7a446 arm64: dts: rockchip: rk3588: add pipe-grf for pcie30phy
pcie30phy will need to reference to pipe-grf.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I31e55c33c22fa4a2bcf424ad4730e057a6fbca28
2021-11-16 16:40:20 +08:00
Kever Yang
39e58a61a5 phy: phy-rockchip-snps-pcie3: Add pcie3_phymode setting
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
2021-11-16 16:23:36 +08:00
Shawn Lin
2ec9a85e36 phy: phy-rockchip-snps-pcie3: support RK3588
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>
2021-11-16 16:16:43 +08:00
William Wu
61b9414d71 phy: rockchip: inno-usb2: keep utmi clk on during charge detection
The utmi clk is provided by the USB PHY for the USB controller.
And the utmi clk is disabled if the USB PHY enter suspend mode.
The current charge detection sets the USB PHY in suspend mode
at first, then take about hundreds of milliseconds to do charge
detection, in other words, the utmi clk will be disabled hundreds
of milliseconds. It may cause the USB controller work abnormally
during the charge detection.

Actually, the conditions for charger detection is:
1. Set the utmi_opmode in non-driving mode.
2. Set the utmi_xcvrselect to FS speed.
3. Set the utmi_termselect to FS speed.
4. Enable the DP/DM pulldown resistor.

This patch adds a new chg_mode to set the PHY in charge detection
mode according to the above conditions, and set the PHY in normal
mode to keep the utmi clk at the same time.

Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: I1cbf565d5145bdae5bc91132bc5fbff23a5cc443
2021-11-16 16:14:28 +08:00
Zefa Chen
11258c2028 media: rockchip: cif change image offset to match isp unite
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I00b658f7ac2cf551fab4c94fd914c62893891b47
2021-11-16 16:11:20 +08:00
Zefa Chen
334a27b6c1 media: rockchip: cif fixes id_use_cnt error
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I43ed7aaa07a210da283e6ec6b50e329770972080
2021-11-16 16:10:09 +08:00
Zefa Chen
7844ec4b7b arm64: dts: rockchip: rk3588: Add dphy node
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I0d5796c64a723a27a7b92e07e16dbac1863849ad
2021-11-16 16:06:38 +08:00
Zefa Chen
4dbc12fe3d phy: rockchip: csi2-dphy: support rk3588 dphy driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2d512525ed95ab7f8bf0f9f614e0f817f2fa841f
2021-11-16 15:55:35 +08:00
Caesar Wang
73b6b224a4 arm64: dts: rockchip: add rk3588-evb3-lp5-v10-edp-linux.dts
This dts for rk3588 evb3 board with edp panel.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Ib5f93f7b0a060807858d70396632fa0d84f1a87a
2021-11-16 15:05:30 +08:00
Andy Yan
7754506494 drm/rockchip: vop2: Don't turn off a parent pd if this module is not enabled
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I610af0ac0e0a31becee62be5a5e5bc9b2a61381f
2021-11-16 14:18:55 +08:00
Andy Yan
d9d2ad0648 drm/rockchip: vop2: Not backup dsc registers
DSC registers can only be accessed after DSC_PD
power on.
We don't want to power on PD at vop_initial.
We will enable PD when a corresponding module
is enabled.

And enable all PD at vop_inital make it more
complicated for the nest pd(PD_CLUSTER0/1/2/3)

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I362ace6837b24a0ebed5b8486c4ba46680d0e693
2021-11-16 14:18:55 +08:00
Andy Yan
7cac99fca4 drm/rockchip: vop2: Invert HDMI V/HSYNC polarity for rk3588
HDMI on rk3588 have a inverted V/HSYNC polarity than
other platform.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I84fc369c211a6f8715c77421c0938fe05516fca6
2021-11-16 14:18:55 +08:00
Zefa Chen
f50cc40593 arm64: dts: rockchip: rk3588: Add dcphy rx node
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ib00a670cb021125076eb0e3c8d81a456bed7becd
2021-11-16 11:54:28 +08:00
Zefa Chen
ae17b4eb19 phy: rockchip: csi2-dphy: support rk3588 dcphy combo driver
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I37c373592e09425ab148ac44b31093a4e7e62e99
2021-11-16 11:53:58 +08:00
Bin Yang
bcfc68937f arm64: dts: rockchip: add WIFI/BT/Ethernet for rk3588 evb1
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
Change-Id: Iba936e1cc5a91f6a92f6a2c6f950be580fec7c1a
2021-11-16 11:35:31 +08:00
Alex Zhao
5b3273fa20 net: r8168: add r8168 support
This is the Linux device driver released for RealTek RTL8168B/8111B,
RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, RTL8168DP/8111DP,
and RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface.

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: I54634ade9602706d1230bb2551f1da7157943814
2021-11-16 11:30:41 +08:00
Alex Zhao
62c06ae47f net: wireless: rockchip_wlan: update bcmdhd driver
1.version: 101.10.361.11 (wlan=r892223-20210630-1)
2.both wifi5 and wifi6 are supported

Signed-off-by: Alex Zhao <zzc@rock-chips.com>
Change-Id: Ia0724ebc628ba40afed947275d34ff5c47a410b4
2021-11-16 11:22:35 +08:00
Elaine Zhang
54143c6ee3 clk: rockchip: link: use of_iomap get base
of_iomap allowed to map the same address repeatedly.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I670e2f3ed564c159eed825bc388f4a9ae3a65f76
2021-11-16 10:42:01 +08:00
Elaine Zhang
6431bb7291 arm64: dts: rockchip: rk3588: init clk_gpu to 200M
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ib2e94009e68ed9834c4dbde8c0f3bb096d3734bd
2021-11-15 19:17:34 +08:00
Elaine Zhang
150255a2ec clk: rockchip: pll: fix up rk3588 pll setting
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ibf78a3c9d141da2bbb17026096aadbe26ddfd293
2021-11-15 18:06:15 +08:00
Elaine Zhang
dbf2588e39 arm64: dts: rockchip: rk3588: modify aclk_center to 700M
for high performance.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ifa48adf1b81fa5e52666090542b955900ae375b8
2021-11-15 18:02:00 +08:00
Jon Lin
d76a1073a7 mtd: spinand: Fix hyf devices read id information
Change to SPINAND_READID_METHOD_OPCODE_ADDR

Change-Id: I1114895634c03496e28d392ed06f5add3c19f4d9
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-15 17:58:31 +08:00
Jon Lin
1b6a02851b mtd: spinand: Fix etron devices read id information
Change to SPINAND_READID_METHOD_OPCODE_ADDR

Change-Id: Ie159a0ede287d2c157890d768b2c73238ed53608
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-15 17:58:31 +08:00
Jon Lin
ab64e61f7f mtd: spinand: Fix XTX devices read id information
Change to SPINAND_READID_METHOD_OPCODE_ADDR

Change-Id: I1a1f444dc7e4f6431efc0ba2dea20b2a5629803d
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-15 17:58:31 +08:00
Ding Wei
63ae61dd8e arm64: dts: rockchip: rk3588-evb: Add video codec refers node
Change-Id: Ifc586c6558986bc76dcd7602cfbab779e0d8b1d5
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-11-15 17:21:51 +08:00
Jianqun Xu
10e18d6585 ANDROID: dma-buf: system_heap: reorder pages for scatterlist
Reorder system heap pages by bit[14:12] of pages' physical address, it
benefit for dram do access in different banks once time.

Signed-off-by: Simon Xue <xxm@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I686c9e54f456d3b7f373ab1b0586125e70f891ec
2021-11-15 17:17:08 +08:00
Andy Yan
d43135dfce drm/rockchip: vop2: Add axi id configuration
Two axi bus:
AXI0 is a read/write bus with a higher performance.
AXI1 is a read only bus.

Every window on a AXI bus must assigned two unique
read id(yrgb_id/uv_id, valid id are 0x1~0xe).

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I867df219797da33f89fec6fba639bcdf55cb54b3
2021-11-15 16:42:37 +08:00
Jianqun Xu
21f2fd663e dma-buf: system_heap: support cpu access partial dma-buf
Support the system_heap to allow cpu access partial dma-buf.

Change-Id: I8250c0bb26b776b8c8f5e4c3ee0cb71e26445743
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-11-15 16:24:23 +08:00
Jianqun Xu
1aef8d5550 dma-buf: add DMA_BUF_IOCTL_SYNC_PARTIAL support
Add DMA_BUF_IOCTL_SYNC_PARTIAL support for user to sync dma-buf with
offset and len.

Change-Id: I03d2d2e10e48d32aa83c31abade57e0931e1be49
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-11-15 16:24:13 +08:00
Huang zhibao
5057b5e32d arm64: dts: rockchip: rk3588-nvr-demo: set sata pm reset to hi
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I06708ed22f1f2199eb3288ebe80f551a6603cb8c
2021-11-15 16:17:08 +08:00
Wang Jie
761ac1cb3f arm64: dts: rockchip: rk3588s-tablet: enable sensor(mpu6500)
Change-Id: Ibbdd7022fb32afafa9ad433ffa7db1f89d2b91ea
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2021-11-15 16:13:48 +08:00
Huibin Hong
fef814f8c8 fiq_debugger: fix bt bug when EL0_SP is 0xffffff8000000000
Bt command think if EL0_SP is less than 0xffffffcxxxxxxxxx
 it is user mode, but EL0_SP may be 0xffffff8xxxxxxxxx.
According to ARM-V8, the virtual address bit63 determine
TTBR0 OR TTBR1. So if EL0_SP is less than 0x8000000000000000,
it is user mode.

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ib97b405df6e669e3806161c97801847e2f5d247a
2021-11-15 15:10:33 +08:00
Caesar Wang
bd5f70e66c arm64/configs: rockchip_linux_defconfig: Enable CONFIG_MALI_CSF_SUPPORT
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I38b3ac58e9a68f39d5d6812beca5456b70471ea9
2021-11-15 15:09:31 +08:00
Simon Xue
e3bc123a22 iommu/rockchip: fix v2 pte read/write permission bit
Change-Id: I9f799d5ef116b4a2ed62a39d62b439e30d41c155
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-11-15 14:39:26 +08:00
Kever Yang
a44f986d11 arm64: dts: rockchip: rk3588: Add pcie1ln setting for comboPHY
The controller must route to the comboPHY when it works.

pcie1l0_sel
Select the signal form PHY to PCIe1l0
1'b0: Select comb PHY
1'b1: Select PCIE3 PHY

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I5e7faf71fdd22958c757f884f75ec9a00aeb2fb9
2021-11-15 14:35:18 +08:00
Kever Yang
e984bc2a96 phy: rockchip: naneng-combphy: Add config option for pcie1ln-sel
Add dts decode to support the pcie2x1l0 and pcie2x1l1 setting, which is
in PHP_GRF_PCIESEL_CON.
pcie1l0_sel
Select the signal form PHY to PCIe1l0
1'b0: Select comb PHY
1'b1: Select PCIE3 PHY

Usage in dts:
rockchip,pcie1ln-sel-bits = <0x100 0 0 0>;

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: I5fb177f37b23c5f3cdaadf8c103f8e6487ea6a76
2021-11-15 14:32:33 +08:00
Kever Yang
7a6e007af7 arm64: dts: rockchip: rk3588: Enable gic its
rk3588 has two its:
- its0: pcie2x1l0, pcie2x1l1, pcie2x1l2
- its1: pcie3x4, pcie3x2

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Change-Id: Ie0dc4a79bdd8708c4be06b3175d48b7a9a927f6d
2021-11-15 14:27:09 +08:00
Tao Huang
d097bd0240 Revert "arm64: dts: rockchip: Temporarily disable its for rk3588"
This reverts commit 92ce906652.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I69dd18fcaeb72a3736e34ea90e977cf28d484b1c
2021-11-15 14:27:05 +08:00
Sugar Zhang
6658d3e5c3 arm64: dts: rockchip: rk3588-evb: Fixed property clk for i2s0~3
Currently, the datasheet and pcb design has removed all the
pin {bclk, lrck}_rx, and use the pin {bclk, lrck}_tx only
to simpilify design.

  - Remove pin {bclk, lrck}_rx
  - Rename pin {bclk, lrck}_tx to [bclk, lrck]

So, we do the same thing by default.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ide90500b766fa39d6f032b0edf309e001939b579
2021-11-15 14:16:18 +08:00