Commit Graph

276 Commits

Author SHA1 Message Date
hlb194802
2a1c09c089 usb driver: dwc3-thead: fix wrong regulator disable in dwc3_thead_pm_suspend regulater mismatch in dwc3_thead_pm_suspend with hub1v2 vs hubswitch
Change-Id: I33243a3cae63751f6b2c985a85d50916e85afdcd
2024-07-21 00:17:45 +08:00
huaming.jiang
745c35085c driver:dw_i2c:detect rx fifo over and do retry
1. dw_i2c for hw not enable IC_EMPTYFIFO_HOLD_MASTER_EN,RX FIFO may
over if SW not read RX FIFO day timely.So enabel RX OVER INT,when
receive RX OVER ,i2c_dw_xfer return -EAGAIN,to trigger retry.
2. for large i2c read, set DW_IC_RX_TL to rx_fifo_depth / 2, to make more
efficient irq process.
3.skip isr once rx over by disable INT
4. merge fix from upstream
commit 301c8f5c32c8fb79c67539bc23972dc3ef48024c
Author: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Date:   Tue Sep 27 16:56:44 2022 +0300

    i2c: designware: Fix handling of real but unexpected device interrupts

    Commit c7b79a752871 ("mfd: intel-lpss: Add Intel Alder Lake PCH-S PCI
    IDs") caused a regression on certain Gigabyte motherboards for Intel
    Alder Lake-S where system crashes to NULL pointer dereference in
    i2c_dw_xfer_msg() when system resumes from S3 sleep state ("deep").

    I was able to debug the issue on Gigabyte Z690 AORUS ELITE and made
    following notes:

    - Issue happens when resuming from S3 but not when resuming from
      "s2idle"
    - PCI device 00:15.0 == i2c_designware.0 is already in D0 state when
      system enters into pci_pm_resume_noirq() while all other i2c_designware
      PCI devices are in D3. Devices were runtime suspended and in D3 prior
      entering into suspend
    - Interrupt comes after pci_pm_resume_noirq() when device interrupts are
      re-enabled
    - According to register dump the interrupt really comes from the
      i2c_designware.0. Controller is enabled, I2C target address register
      points to a one detectable I2C device address 0x60 and the
      DW_IC_RAW_INTR_STAT register START_DET, STOP_DET, ACTIVITY and
      TX_EMPTY bits are set indicating completed I2C transaction.

    My guess is that the firmware uses this controller to communicate with
    an on-board I2C device during resume but does not disable the controller
    before giving control to an operating system.

    I was told the UEFI update fixes this but never the less it revealed the
    driver is not ready to handle TX_EMPTY (or RX_FULL) interrupt when device
    is supposed to be idle and state variables are not set (especially the
    dev->msgs pointer which may point to NULL or stale old data).

    Introduce a new software status flag STATUS_ACTIVE indicating when the
    controller is active in driver point of view. Now treat all interrupts
    that occur when is not set as unexpected and mask all interrupts from
    the controller.

Change-Id: If81c92a03b9be8699742184b46c03df34f922a28
2024-07-21 00:17:45 +08:00
Han Gao
39a7c4f518 config: enable CONFIG_SCHED_MC
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
o_bianhq
99a0ff503d enable CONFIG_SCHED_MC
Change-Id: I46b9d8ba6e327106f130f8ea40fa1af1a55b9ca5
2024-07-21 00:17:45 +08:00
Song Shuai
483521ff86 riscv: Kconfig: enable SCHED_MC kconfig
RISC-V now builds the sched domain based on the simple possible map.

Enable SCHED_MC to make the building based on cpu_coregroup_mask()
which also takes care of the NUMA and cores with LLC.

Signed-off-by: Song Shuai <suagrfillet@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230310110336.970985-1-suagrfillet@gmail.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Raul Xiong <huanyi.xj@alibaba-inc.com>
Change-Id: I9729fcd884478e369957d9b96421598cdafe3a51
(cherry picked from commit dc55601c64f5635c75cb3cdf9cd40cb43593e966)
2024-07-21 00:17:45 +08:00
yjd01941629
9ffddd4172 For AIC8800 (WIFI/BT chip): The AIC8800 driver must be unloaded before entering STR (Suspend to RAM); otherwise, upon waking from STR, initialization will fail.
1.broken-cd: The default non-removable attribute fails to recognize the AIC8800, thus it is set to rely on a software card detection signal instead of hardware, always treating the card slot as if a card is present.
2.keep-power-in-suspend: The SDIO of TH1520 does not support keeping power when entering STR, and the driver of AIC8800 does not support SDIO with this function. Therefore, this node is added here to meet the driver requirements of AIC8800.
3.support_power_ctrl:The newly added device node is used to control the WL-REG-ON signal (which controls the power of AIC8800) after waking up from STR.

Change-Id: Ia33309da9f3e6bdf291f408d26909f11afd24842
2024-07-21 00:17:45 +08:00
Han Gao
a8a3aef9b9 Revert "temp fix: disable poweron pin for aic8800 to make it work"
This reverts commit 6f712a1d7f.
2024-07-21 00:17:45 +08:00
hlb194802
3bff12eab2 virtio_vdmabuf: dma skip cpu sync if buf flag has VIRTIO_VDAMBUF_NONCACHED optimize cpu usage for nonecached dma buf used in g2d gpu vpu etc.
Change-Id: I191ebe6ad748dc9cb8f1946d1e51f6d606bde182
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
Han Gao
8e7282e217 vidmem:kernel: fixup unsafe release of allocater and dmabuf
This commit fixup unsafe release of allocater and dmabuf.
have merged
vidmem:kernel: update dmabuf release not free by allocate release.

Prev commit add release of dmabuf may caused mem node list
removed racing.Here have moved the exported node to global
list.

Signed-off-by: xianbing Zhu <xianbing.zhu@linux.alibaba.com>
Change-Id: I8c2a83b60f7d6ff26771550cc691db6b27b73609
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
Han Gao
d2247b2403 vidmem: implement dma_buf_ops release to free buffers
This commit implement dma_buf_ops release to free buffer
in function _dmabuf_release(struct dma_buf *dmabuf).

Default use  pr_debug for dynamic debug in macro DEBUG_PRINT.

Signed-off-by: xianbing Zhu <xianbing.zhu@linux.alibaba.com>
Change-Id: Id0a5841ccf8459c469034866dd2878e8698a57a4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
Han Gao
3ef68d010b sync: SDK 1.5.4 video_memory
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
Han Gao
930b7d92fd vc8000e-kernel: fixup vcmdbuf release leak issue
This issue is reported in TLV-299.
This commit fixed allocate_cmdbuf may infinite loop
and leak of release the cmdbuf only reserved but not
link_and_run.
If cmdbuf not run done when release,do not firstly abort,
instead wait done event reduce abort failed.

Add cmdbuf id and line info for error log.
Fixed busy count record idle twice in read module all
regs issue.

Signed-off-by: xianbing Zhu <xianbing.zhu@linux.alibaba.com>
Change-Id: Ia006f8123e38022400959bed838ef76f7aef14a0
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
Han Gao
9ee78c8b51 vc8000d-kernel: fixup vcmdbuf release leak issue
This issue is reported in TLV-299.
This commit fixed allocate_cmdbuf may infinite loop
and leak of release the cmdbuf only reserved but not
link_and_run.
If cmdbuf not run done when release,do not firstly abort,
instead wait done event reduce abort failed.

Add cmdbuf id and line info for error log.
Fixed busy count record idle twice in read module all
regs issue.

Signed-off-by: xianbing Zhu <xianbing.zhu@linux.alibaba.com>
Change-Id: Ieb0b751d18a1ed65fe198e3d75a6953dabf15ef8
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-07-21 00:17:45 +08:00
Haaland Chen
719387f851 arch: riscv: thead: milkv-meles: increase HDMI pin drive strength
Fixed the issue where HDMI maximum resolution is 1024x768.
With this commit added, the maximum HDMI resolution is 4K.

Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-07-06 19:24:41 +08:00
Carlos Giraldo
93090f65c3 config: enable required flags for k3s
check-config.sh script of k3s kubernetes light distribution flags the following configs as missing:

CONFIG_NETFILTER_XT_MATCH_COMMENT
CONFIG_NETFILTER_XT_MATCH_MULTIPORT
CONFIG_IP_SET
CONFIG_INET_XFRM_MODE_TRANSPORT
2024-07-06 19:16:38 +08:00
Haaland Chen
32bd505b1d riscv: dts: thead: add DDR-16GB meles
Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-07-06 19:16:10 +08:00
0x754C
e3d0728cb3 Update th1520-lpi4a-plastic.dts
update screen timing
2024-07-06 19:15:14 +08:00
Lu
9cc3fa38f8 lpi4a: add pocket4a & plastic4a initial support 2024-07-06 19:15:14 +08:00
Haaland Chen
2dec144313 riscv: dts: thead: update milkv meles for sdk v1.5.4
Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-06-01 00:25:15 +08:00
Han Gao
72467de009 dts: meles: sync sdk 1.5.4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
76b3ac7dce trace_point: fix: move header file to events
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
0bc9468e57 img: gpu: sync sdk 1.5.4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
15d74b941d vdec: 8000d: sync sdk 1.5.4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
a7fac880e0 venc: 8000e: sync sdk 1.5.4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
7053584b25 ddr-pmu: sync sdk 1.5.4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
b77432028f fix: remove trace include path for nna
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
e0da9d9718 nna: sync SDK 1.5.4
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
f06f585cf1 fix: remove th1520-b-dsi
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
Han Gao
a1bca3a513 sync: sync 7210&8156 code
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-05-30 01:07:11 +08:00
thead_admin
7563179071 Linux_SDK_V1.5.4
Signed-off-by: thead_admin <occ_thead@service.alibaba.com>
2024-05-30 01:07:11 +08:00
Icenowy Zheng
89d6663712 add orientation of lichee console 4a panel
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
2024-04-13 07:42:21 -05:00
Han Gao
7f7fc491ac feat: trans EXPORT_SYMBOL_NS{_GPL}(*, ANDROID_GKI_VFS_EXPORT_ONLY) to EXPORT_SYMBOL{_GPL}(*)
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-04-03 12:27:32 -05:00
Han Gao
9e89f40c76 feat: remove ANDROID_GKI_VFS_EXPORT_ONLY for all
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-04-03 12:27:32 -05:00
Han Gao
58b9ba8b4d feat: remove VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver for all
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-04-03 12:27:32 -05:00
Han Gao
e15402b7ab chore: use none for deb compress
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
bbf24fc7fa chore: in riscv64 force use -j32
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
2030eb1b71 chore: cleanup install step
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
bc4c98ebd7 feat: use revyos-kernel-builder for build
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
1b0b255060 chore: rename perf-thead to perf-vendor-th1520
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
8b9aa1faa1 chore: modify deb package version
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
aee62929de feat: enable riscv64 native build
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
3478bb910d chore: add localversion=th1520
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Han Gao/Revy/Rabenda
e95535c32a ci: cleanup board martix
Signed-off-by: Han Gao/Revy/Rabenda <gaohan@iscas.ac.cn>
2024-04-03 11:09:47 -05:00
Icenowy Zheng
90bcc90cb8 drm/verisilicon: add format_mod_supported to plane
Otherwise IN_FORMATS blob is corrupted.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
2024-04-02 02:49:08 -05:00
Lu Hui
833d4accd7 arch: riscv: dts: thead: th1520-lpi4a: change dc-charger pin, add compatible field 2024-04-01 04:41:33 -05:00
Haaland Chen
fa953236e1 scripts: add more options like -@ to build dtbo
It fixes the issue that u-boot failed to load dtbo like this:

  Retrieving file: /dtbs/linux-image-5.10.113-lpi4a/thead/overlays/meles-wifibt-external-antenna.dtbo
  715 bytes read in 4 ms (173.8 KiB/s)
  failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
  base fdt does did not have a /__symbols__ node
  make sure you've compiled with -@
  Failed to apply overlay /dtbs/linux-image-5.10.113-lpi4a/thead/overlays/meles-wifibt-external-antenna.dtbo, skipping
  ERROR: Did not find a cmdline Flattened Device Tree
     Loading Ramdisk to 1fa22000, end 1ffff820 ... OK
  Device tree not found or missing FDT support
  ### ERROR ### Please RESET the board ###

Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-03-27 04:06:20 -05:00
Haaland Chen
71b7c456fa arch: riscv: thead: add antenna selection for Meles
Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-03-27 04:06:20 -05:00
Haaland Chen
84b184c6c3 revyos_defconfig: enable CONFIG_INPUT_JOYDEV
Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-03-27 04:06:20 -05:00
Haaland Chen
1223f3c597 riscv: dts: thead: meles: add usb power enable pin
Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-03-27 04:06:20 -05:00
Haaland Chen
1881bc9051 riscv: dts: thead: meles: rename regulator-usb-select node
Signed-off-by: Haaland Chen <haaland@milkv.io>
2024-03-27 04:06:20 -05:00