Commit Graph

1059322 Commits

Author SHA1 Message Date
Tao Huang
f8d987fc13 media: remove unused camera head file
After commit cdc6f7d0b0 ("media: remove unused video drivers"),
these files are unused, so just remove them.

include/media/camsys_head.h
include/media/v4l2-chip-ident.h

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib561e90ec55f8f2b51c6d5fe3e03fe25836e511e
2021-08-06 19:36:13 +08:00
Caesar Wang
72f744d1ae ARM: dts: rockchip: support the sdmmc for kylin
Change-Id: If761bb4a1adf857f7315edebb17c31eb6ac08652
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-06 17:44:08 +08:00
Chris Zhong
80c6b48d02 ARM: dts: rk3066a-rayeager: add no- for mmc
Add no-sdio/no-sd for emmc; no-sdio/no-mmc for sdcard; no-sd/no-mmc for
sdio.

Change-Id: I13d3918f41f63ed9b27e9969e6f89d1006c9d45c
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
2021-08-06 16:52:58 +08:00
Simon Xue
cdfa3fbd8a PCI: rockchip: add checksum for dma trx
Change-Id: Ib51edd5527976a4aa66893937918911d9d1d20c1
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-08-06 15:05:18 +08:00
Steven Liu
cefaa94c1a ARM: dts: rockchip: Fix UART pull-ups on rk3188
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I660b0c7732305d73d4255be877aa48fa9c9afb01
2021-08-06 15:03:24 +08:00
Steven Liu
6b8a759d36 ARM: dts: rockchip: Fix UART pull-ups on rk3066a
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I7466ab47baa86c81bf1f2fe47556aa03fbe67671
2021-08-06 15:03:09 +08:00
Steven Liu
1b8cbf307c ARM: dts: rockchip: Fix UART pull-ups on rk3036
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I01e1effcc185fec6207cebb38b7f12701a7ebd35
2021-08-06 15:02:54 +08:00
William Wu
cce00a9f5f ARM: dts: rockchip: reconfig dwc2 device fifo size
According to the dwc2 programmer's guide v3.10a, in '2.1.3.2 Dedicated
FIFO Mode with No Thresholding', it suggested that:

Device RxFIFO =
- Scatter/Gather DMA mode:
(4 * number of control endpoints + 6) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(4 * 1 + 6) + ((1024 / 4) + 1) + (2 * 6) + 1 = 280

- Slave or Buffer DMA mode:
(5 * number of control endpoints + 8) + ((largest USB packet used / 4) +
1 for status information) + (2 * number of OUT endpoints) + 1 for Global NAK

on rockchip platforms:
(5 * 1 + 8) + ((1024 / 4) + 1) + (2 * 6) + 1 = 283

Device IN Endpoint TxFIFO =
The TxFIFO must equal at least one MaxPacketSize (MPS).

In addition to RxFIFO and TxFIFOs, refer to dwc2 databook v3.10a,
'Figure 2-13 Device Mode FIFO Address Mapping and AHB FIFO Access Mapping
(Dedicated FIFO)', it required that when the device is operating in non
Scatter Gather Internal DMA mode, the last locations of the SPRAM are used
to store the DMAADDR values for each Endpoint (1 location per endpoint).

When the device is operating in Scatter Gather mode, then the last locations
of the SPRAM store the Base Descriptor address, Current Descriptor address,
Current Buffer address, and status quadlet information for each endpoint
direction (4 locations per Endpoint). If an Endpoint is bidirectional , then
4 locations will be used for IN, and another 4 for OUT).

Considering that the total FIFO size of dwc2 otg is 0x3cc (972),
and we must reserve (4 * 13) = 52 locations for all Endpoints.
So reconfig dwc2 device fifo size as follows:

Device RxFIFO = 280
Device IN Endpoint TxFIFO
- FIFO #0 = (64 / 4) = 16 (Assuming this is used for EP0)
- FIFO #1 = (1024/4) = 256 (Assuming this is used for Isochronous)
- FIFO #2 = (512/4) = 128
- FIFO #3 = (512/4) = 128
- FIFO #4 = (256/4) = 64
- FIFO #5 = (128/4) = 32
- FIFO #6 = (64/4) = 16

After reconfig the dwc2 device fifo size, test mtp write on rockchip
platform (PC -> rockchip platform) on rk312x/rk3326/px30/rk3288 evb,
when mask the 'vfs_write' in f_mtp.c, the writing data rate can be
increased from 16MBps ~ 20MBps to 30MBps ~ 36MBps on different kinds
of rockchip evbs.

Change-Id: Icdf8a5dd95f96d174233e4ffc765c9a982b9f0b6
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-08-06 15:00:43 +08:00
Finley Xiao
d948da7499 arm: dts: rockchip: Change cpu opp-microvolt form one entry to three
Single entry is for target voltage and three entries are for
<target min max> voltages. Change cpu opp-microvolt form one entry to
three entries and set maximum acceptable voltage to a high value so that
regulator device can supply multiple consumers at the same time.

Fixes: 16e9353f89 ("arm: dts: rockchip: Change cpu opp-microvolt form one entry to three")

Change-Id: I96e5f87f2945e63e8f4a073fa0292f001830b13c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-06 14:58:20 +08:00
Sugar Zhang
865af3d109 arm: dts: rockchip: add reset properties for i2s
Change-Id: I4c04448a7f1630aec0f0a6e32edbcf9e6669efcb
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2021-08-06 14:55:52 +08:00
Yifeng Zhao
c15a5d1c91 mmc: sdhci-of-dwcmshc: support for rk3588
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I8a8eb4118ee1be392e48bd0715818cd664b868e3
2021-08-06 11:36:04 +08:00
Tao Huang
8d68c5cedd Revert "soc: rockchip: pm_test: add driver handling Rockchip pm_test"
This reverts commit 8c0aa0e3a3.

pm_test is unused.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I914e68dc412aea0ad5014be686c1f2579bd472a1
2021-08-06 11:32:32 +08:00
Simon Xue
905df02dc1 PCI: rockchip: rk: fix subsys_irq_handler logic
Clear irq status first then handle the udma interrupt.

Change-Id: I3638524b7bd09ad21a431bfebd3ba0b5bfbe7b8e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2021-08-06 11:31:28 +08:00
Wangqiang Guo
7a101ebabb Input: mh248 - register input device
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
Change-Id: I37b3a1be656dc94cefcecc5026a5838f898e4966
2021-08-06 11:21:22 +08:00
Tao Huang
08b823c049 Revert "OP-TEE: add optee driver from GitHub: optee_linuxdriver"
This reverts commit 8e4b2eda3f.

optee_linuxdriver is unused.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5d092293ccbc26e77e16a141ffaff85020bb9aaa
2021-08-06 09:44:54 +08:00
David Wu
cabb731e35 dt-bindings: net: rockchip-dwmac: Add gmac support for rk1808
This patch adds devicetree support to gmac of rk1808 with proper
devicetree compatible strings.

Change-Id: Id35523a10f987cbb9b9c33ad32ab23cb3c6d4e2b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:19:21 +08:00
David Wu
ca89ea7e07 ethernet: stmicro: stmmac: Add SGMII/QSGMII support for RK3568
After the completion of Clause 37 auto-negotiation, xpcs automatically
switches to the negotiated speed for 10/100/1000M.

Change-Id: Iab9dd6ee61a35bf89fd3a0721f5d398de501a7ec
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:19:02 +08:00
David Wu
b1532a1568 ethernet: stmicro: dwmac-rk: Add null pointer check for gmac ops
Change-Id: Ic00540c0f018ba5115ebc3dad62b007024f6a6ad
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:18:38 +08:00
David Wu
a0da19e42f ethernet: stmicro: stmmac: dwmac-rk: Support more ethernet mac address
The RK3568 has two gmac, but the driver only support one mac address
right now, define the more ethernet mac address at vendor storage to
support it.

Change-Id: If47df961136da6fe13ede1e5817717db2c0ad2f6
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:18:04 +08:00
David Wu
1d4790c731 net: ethernet: stmicro: stmmac: dwmac-rk: Add RK3568 support
Add constants and callback functions for the dwmac on RK3568 soc.
As can be seen, the base structure is the same, only registers
and the bits in them moved slightly.

Because there are two gmac controllers at rk3568, use
bus id to set the corresponding registers respectively.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I26e8dbc172c7c14df230f531251e2cd23d78a787
2021-08-06 09:17:26 +08:00
David Wu
776b29b677 net: ethernet: stmicro: stmmac: dwmac-rk: Add RV1126 support
Add constants and callback functions for the dwmac on RV1126 soc.
As can be seen, the base structure is the same, only registers
and the bits in them moved slightly.

Because the gmac driver does not know whether pinctrl is
configured with m0 or m1 at this time, so we configure the
delayline of m0 and m1 at the same time.

Change-Id: I3bf58f30584f91c53dd98f747b2d5a2e3f32c505
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:17:01 +08:00
David Wu
a316b31f17 net: ethernet: stmmac: dwmac-rk: Make the phy clock could be used for external phy
Use the phy_clk to prepare_enable and unprepare_disable related phy clock.

Change-Id: Idcf3ee00c03b4a5009a6a9385077b0a421dbc601
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:16:31 +08:00
Roger Chen
ea074eb627 net: phy: add sysfs node for reading PHY's registers
Change-Id: I76468dd235a39b6f79699b1cc931c2c7bb7bdbc5
Signed-off-by: Roger Chen <roger.chen@rock-chips.com>
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:14:19 +08:00
David Wu
c80c57be7f net: ethernet: stmmac: dwmac-rk: Don't configure has_gmac for gmac5.10a
The gmac5.10a configure has_gmac4 with true and has_gmac with false.
Others still stay has_gmac with true.

Change-Id: I0d0d1adef8551d2f7aac6702f963cb23a9861036
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:13:20 +08:00
David Wu
3128187e3a net: ethernet: stmmac: dwmac-rk: Add gmac support for rk1808
Add constants and callback functions for the dwmac on rk1808 soc.
As can be seen, the base structure is the same, only registers
and the bits in them moved slightly.

Change-Id: I39a75b89cd17331bb4373b9b249ae206e1420e71
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:12:36 +08:00
David Wu
76ef55c9e8 ethernet: stmmac: dwmac-rk: Add MAC driver support for rk3308
Add constants and callback functions for the dwmac on rk3308 soc.
The base structure is the same, but registers and the bits in
them moved slightly, and add the clk_mac_speed for the select
of mac speed.

Change-Id: Ieaea3ade9e51d5118f0eb855d8e02febfb2275d1
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:12:13 +08:00
David Wu
a19f9979e4 ethernet: stmmac: rockchip: Fix the correct clock for mdc divider
The MDC clock is divider from APB Clock for rockchip's socs, if it
was from mac_clk, the mdc clk range might not be between the frequency
range 1.0 MHz - 2.5 MHz.

Change-Id: I4e4fcb1be239a8d78a39fc1f4e2af5bb87258798
Signed-off-by: David Wu <david.wu@rock-chips.com>
2021-08-06 09:11:42 +08:00
Weiguo Hu
702c177bec ethernet: rockchip: get and save eth addr in vendor storage
Change-Id: I83d8bc81ca8d33e6f2575d0d90a3dc5978500a64
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2021-08-06 09:08:48 +08:00
Shuyu Wei
3b067ccc88 FROMLIST: net: arc/emac: Move arc_emac_tx_clean() into arc_emac_tx() and disable tx interrut
Doing tx_clean() inside poll() may scramble the tx ring buffer if
tx() is running. This will cause tx to stop working, which can be
reproduced by simultaneously downloading two large files at high speed.

Moving tx_clean() into tx() will prevent this. And tx interrupt is no
longer needed now.

Picked the Shuyu's patch up, the patch is sent on
https://patchwork.kernel.org/patch/8356821/, since that make sense for
rockchip platform.
Note: Many people feedback the cransh problems with rk3036/rk3188 emac when
download the heavy loading and this patch is indeed can fix the crash.

The crash log as the followings:
...
[ 2191.996127 ] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.0-rc6 #114
[ 2192.002475 ] Hardware name: Rockchip (Device Tree)
[ 2192.007174 ] Backtrace:
[ 2192.009658 ] [<c00134d4>] (dump_backtrace) from [<c0013680>]
    (show_stack+0x18/0x1c)
[ 2192.017220 ]  r7:c051c4f8 r6:ef463180 r5:c05b7000 r4:00000000
[ 2192.022948 ] [<c0013668>] (show_stack) from [<c0219d90>]
    (dump_stack+0x90/0xa0)
[ 2192.030176 ] [<c0219d00>] (dump_stack) from [<c00b2cd4>]
    (bad_page+0xdc/0x12c)
[ 2192.037302 ]  r5:c059a100 r4:c05f430c
[ 2192.040913 ] [<c00b2bf8>] (bad_page) from [<c00b606c>]
    (get_page_from_freelist+0x388/0x95c)
[ 2192.049166 ]  r9:00000008 r8:ef463180 r7:c051c4d0 r6:00000000
    r5:00000000 r4:c051c4e4
[ 2192.056982 ] [<c00b5ce4>] (get_page_from_freelist) from
[<c00b6880>] (__alloc_pages_nodemask+0xd8/0x8e8)
[ 2192.066362 ]  r10:c001b068 r9:00000000 r8:ee0b02b0 r7:60000113
    r6:00000003 r5:02095220
[ 2192.074254 ]  r4:c05ca1c0
[ 2192.076809 ] [<c00b67a8>] (__alloc_pages_nodemask) from
[<c00b7140>] (__alloc_page_frag+0xb0/0x160)
[ 2192.085757 ]  r10:c001b068 r9:00000000 r8:ee0b02b0 r7:60000113
    r6:02080020 r5:00000740
[ 2192.093650 ]  r4:eedbc884
[ 2192.096207 ] [<c00b7090>] (__alloc_page_frag) from [<c03273b4>]
    (__netdev_alloc_skb+0xa0/0x104)
[ 2192.104806 ]  r7:60000113 r6:eedbc884 r5:ee0b0000 r4:00000740
[ 2192.110525 ] [<c0327314>] (__netdev_alloc_skb) from [<c02aac00>]
    (arc_emac_poll+0x318/0x57c)
[ 2192.118865 ]  r9:00000000 r8:ee0b02b0 r7:0000019c r6:ee163780
    r5:00000670 r4:ee0b0000
[ 2192.126683 ] [<c02aa8e8>] (arc_emac_poll) from [<c0339ed8>]
    (net_rx_action+0x1f0/0x2ec)
[ 2192.134590 ]  r10:c0599df8 r9:c059a100 r8:00073760 r7:0000012c
    r6:00000028 r5:c02aa8e8
[ 2192.142483 ]  r4:ee0b04e0
[ 2192.145040 ] [<c0339ce8>] (net_rx_action) from [<c0026f5c>]
    (__do_softirq+0x134/0x258)
[ 2192.152860 ]  r10:c059a080 r9:40000003 r8:00000003 r7:00000100
    r6:c0598000 r5:c059a08c
[ 2192.160751 ]  r4:00000000
...

Change-Id: Ie7c161809d511bda5d65af7b48fefffff30c07e8
Signed-off-by: Shuyu Wei <sy.w@outlook.com>
Tested-by: Michael Niewoehner <linux@mniewoehner.de>
Tested-by: Xing Zheng <zhengxing@rock-chips.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Cc: netdev@vger.kernel.org
(am from https://patchwork.kernel.org/patch/9032581/)
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2021-08-06 09:08:18 +08:00
Tao Huang
2eca350640 Revert "soc: rockchip: add devinfo parser driver"
This reverts commit f19114808f.

devinfo is unused.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I177ecd227330250bb33fc350cbe850a8cca5a751
2021-08-05 21:31:48 +08:00
Tao Huang
3f7d8dcbd6 iommu: remove unused rockchip-iovmm.h
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idf395868b01250cb66dc8a6c6145ef5ec7a44330
2021-08-05 21:21:56 +08:00
Tao Huang
10ae725c75 input: remove unused rk_keys driver
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia545794ba2db53429faa31b0e65791dd75c8798c
2021-08-05 21:21:56 +08:00
Sugar Zhang
490314c276 arm64: dts: rockchip: split i2s mclk pinctrl from i2s bus
because currently mclk is handled by codec side, so the
associated pinctrl should be handled by codec too.

Change-Id: I55db6e9a0181cae0cb414b9dcacae7ff0214b50c
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-05 21:00:02 +08:00
Sugar Zhang
213b7f8cbd arm64: dts: rockchip: add reset properties for i2s - rk3399
Change-Id: I1bdc5a417b412d484ba0caccc9e57da6a928de54
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-08-05 21:00:02 +08:00
Steven Liu
55a413ecd1 arm64: dts: rockchip: Fix UART pull-ups on rk3399
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I0682ef0afce02947cfefef2e5cd2357692402e8c
2021-08-05 21:00:02 +08:00
ZiHan Huang
9e11838357 arm64: config: fix rockchip_linux_defconfig for adapter 5.10 kernel.
Signed-off-by: ZiHan Huang <zack.huang@rock-chips.com>
Change-Id: I014ac4315f91ba2a16e6f7c39034614e91bd415d
2021-08-05 20:56:06 +08:00
Finley Xiao
afe9de023f arm64: dts: rockchip: rk3568: Modify sustainable-power
The cpufreq cooling doesn't support calculating static power in 5.10
and the cpu and gpu opp table are changed.

Change-Id: Ia1abaf6d7614b874081159db7cc41e910bf47462
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-05 20:55:19 +08:00
Tao Huang
86bc3558a7 mmc: core: Remove mmc_set_blockcount() function again
Commit af02b05e59 ("mmc: add thunder boot support")
add this function wrong. So just remove it.

Fixes: af02b05e59 ("mmc: add thunder boot support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I9177c615163826e3df2ba692e63f9aadf48ef912
2021-08-05 20:29:57 +08:00
Steven Liu
54ce82775f serial: 8250_port: fix UART DL check when setting divisor.
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I907480ec39c6603bca7bb30e5f889bac3e57057c
2021-08-05 20:29:23 +08:00
Finley Xiao
be3327b6fb soc: rockchip: ipa: Fix getting error power model node
The power model node must be the child node of the device node.

Change-Id: Ib16e37c31e573f183ea304b072d2a7912e155197
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-05 18:34:49 +08:00
Algea Cao
d50861822f drm/rockchip: dw-hdmi: init hdmi subdev and register to rockchip_drm_sub_dev_list
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I91fe4412c1218b266d1cafc8dc92781dcaf23638
2021-08-05 16:52:41 +08:00
Sandy Huang
7c95c85b18 drm/bridge: synopsys: dw-hdmi: update for remove connector port
Change-Id: Ia0ca8c2fddf89f29bf4ac5703d8f4d0f68d6446a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-08-05 09:36:46 +08:00
Huicong Xu
b0c245000a drm/bridge/synopsys: restore bus_width as 8 when disable hdmi encoder
to modify bus width error sometime plug out hdmi and switch cvbs output

Change-Id: Iaa7914fbccc99991fbfbc5495ba647f97997c8ba
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2021-08-05 09:36:46 +08:00
Zheng Yang
4e961b2be6 drm/rockchip: dw-hdmi: fix 3328/3228 phy bus width
If HDMI output corlor mode is YCbCr422, the tmds clock is same
to YCbCr444 8bit, phy bus width should be set to 8.

Change-Id: I6e844e676a6315ae0cb88b0bd8456f0e27fa5e0c
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-05 09:36:45 +08:00
Algea Cao
1e3a5d3035 drm/rockchip: dw_hdmi: Support switch hdmi quantization range
Add property hdmi_quant_range to switch hdmi quantization range.

Change-Id: I084cd2e1ccb46ed9757fe39802b90eedfbe466b4
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-05 09:36:45 +08:00
Algea Cao
207a1ee79c drm/bridge: synopsys: dw-hdmi: Support set RGB quantization range
1.Filling the HDMI AVI infoframe quantization range information.
2.If output is limited enable color space conversion to convert.

Change-Id: I75f666424f00f3f6ec695047f7851824e89cd1a5
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-05 09:36:45 +08:00
xuhuicong
dd387a422c drm/bridge: dw-hdmi: fix display shaking when uboot to kernel show
Change-Id: I899bb0dde7111fe97dd2c89d20afb09562d31300
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2021-08-05 09:36:45 +08:00
Zheng Yang
66c05c1353 drm: dw-hdmi: fix RK3328/RK3229 phy abnormal enabling
Under the following conditions, phy will be abnormally enabled.

1. HDMI is enabled in uboot.

2. disabled/bridge_is_on/phy.enabled/mc_clkdis were updated to
   work when probe.

3. HDMI is disconnected.

4. drm_helper_probe_single_connector_modes update connector->status
   to disconnected and power off phy by dw_hdmi_update_power. But the
   polled type of HDMI is DRM_CONNECTOR_POLL_HPD, output_poll_execute
   will not process this disconnection, and dw_hdmi_bridge_disable is
   not called, hdmi->disabled is still false.

5. vop will be switch to Tv encoder, and dclk is 27MHz.

6. HDMI is connected.

7. dw_hdmi_update_power is called in dw_hdmi_irq, for hdmi->disabled
   is false, then phy is powered up with parameter of 27MHz, and
   bridge_is_on is set to on.

8. VOP switch to HDMI mode, set the new dclk rate.

9. dw_hdmi_bridge_enable is called, but the bridge_is_on is already on,
   phy will not set again, still maintain the parameters that do not
   conform to the new dclk rate.

This patch introduced an variable initialized to indicate hdmi is
initialized before probe, e.g. uboot. When power off hdmi, initialized
and disabled is updated.

Change-Id: I163967ac02e7f29ab586acbfd25d5a15679470c8
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2021-08-05 09:36:45 +08:00
Algea Cao
3df88e4c8b drm/bridge: synopsys: dw-hdmi: check if hdmi is enabled in uboot
Include the following commit:
1.update mc_clkdis in dw_hdmi_bind.
2.update more hdmi status in dw_hdmi_bind.
3.Fix hdmi can't display in android.
4.Update criteria to determine whether uboot logo is on.
5.disable phy in dw_hdmi_bind.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I4d1269062b0a4c01d0e82923bf9bb6dad3411387
2021-08-05 09:36:45 +08:00
Algea Cao
3187deef82 drm: bridge: dw-hdmi: using extcon instead of switch
Switch is no longer available in kernel 4.19, so
we use extcon instead.

the hdmi connect status node:

/sys/class/extcon/extconX/state

HDMI=0:
	hdmi is disconnected
HDMI=1:
	hdmi is connected

Change-Id: I806d8fd5b9b4b36f15aa6aec275fad2ecf122e91
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2021-08-05 09:36:45 +08:00