Commit Graph

1231493 Commits

Author SHA1 Message Date
linjunyan
e25c7f169c tools/perf: pmu-events: fix X60 L2 cache events
The previous names and descriptions of L2 cache events on SpacemiT X60
are incorrect, now fix them.

Change-Id: I847eac354dc493f195d2f02bc1598bffb13ff74d
Signed-off-by: linjunyan <junyan.lin@spacemit.com>
2025-05-15 09:53:44 +08:00
lijuan
242c03e7a6 dts: add k1-x_som dts
Change-Id: I1a5288a14f90b51010f49f852009268803b282d0
Signed-off-by: lijuan <juan.li@spacemit.com>
2025-05-15 09:47:48 +08:00
lizhirong
de2fadaed8 virtual_camera: sync code from oh to perfect code core
Change-Id: I7abf23710d4b8e4383acee1c64ef8d636a973d48
2025-05-14 10:24:14 +08:00
lizhirong
74a8534480 dma-heap: support standard v4l2 by sharing dmabuf in K1
Change-Id: I57bd412111f21a252c42c762649c20bac5ced841
2025-05-14 10:05:04 +08:00
lijuan
eda1141990 dts: cma-memory: Fix the conflict between dtb memory and cma reserved memory
1. Dtb memory is allocated by grub/uboot and passed to the kernel

Change-Id: I411c1b9b9c4cbf4f3afdf078321d2bd094b087fa
Signed-off-by: lijuan <juan.li@spacemit.com>
2025-05-14 08:54:48 +08:00
dengbo
208bd98a19 fix: prevent chromium crash on bianbu cloud via driver loading order adjustment
Change-Id: I06a78e0648901d68548fce58bc090e5d4e7c8a99
2025-05-13 16:37:42 +08:00
yanhaodong
d4aecb45b8 k1: uart: fix baudrate may set failed
write DLH-->read DLH-->write DLL may cause set baudrate failed
such as: switch baud from 9600 to 115200,real baud still 9600

Fix the usage to "write DLL-->read DLL-->write DLM"

Change-Id: I766b4c2cafcf79668a9324c970ff653420cf076c
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-05-13 08:31:34 +08:00
huanghaiqiang
f78bfaed06 enable ethercat at rt-defconfig
Change-Id: I4d94bdf9b1ec024fc85621ca09d0b8867f39a10f
2025-05-12 19:24:07 +08:00
lilijun
df943bf825 k1:display: drm support yuv444 format
Change-Id: I3bdd1bf1168aa3a579d2db8b10510ff3b4afc47e
2025-05-09 15:30:05 +08:00
zhenglilang
f395570826 k1:display: disable planes when crtc is powered off
Change-Id: Ie2f43fe18c4296ccb9290020d730f161475a6d05
2025-05-09 15:17:17 +08:00
wanlong
e0c792f27b wireless: aic8800: Don't set sdio clock according to feature
Change-Id: I61a4cf6c18c7dbd8303895228f5b412d1013f9ad
Signed-off-by: wanlong <long.wan@spacemit.com>
2025-05-09 11:00:55 +08:00
fanxiaogang
aaee0b484a k1-x MINI PC dts:modules_usrload: change the driver modules from rtl8852bs to rtl8852be
Change-Id: Ib3e6f00c27b089ba057a933cbea04596aa161486
2025-05-07 16:19:46 +08:00
Nell
18607ad9a9 k1:rcpu: move the memroy-region attribute into k1-x.dtsi
Change-Id: I6da4ada6ddbdb56a91cf80f40858b7d4788c62d0
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
2025-05-07 09:08:16 +08:00
huzhen
fe677b15cb PCI: k1x: Fix register bit operations
Signed-off-by: huzhen <george.hu@spacemit.com>
Change-Id: I5a6617cf666fd1b925cd304941cf7b3bb9099508
2025-04-30 15:18:59 +08:00
huzhen
c9450296e5 net: phy: realtek: Add checking the PHY status
When the PHY has entered suspend mode, accessing PHY registers will
cause a system hang.

Change-Id: I45a1196c2d45489278f4cbbb650f44129deed86a
Signed-off-by: huzhen <george.hu@spacemit.com>
2025-04-29 10:09:32 +08:00
lilijun
d233ddfe28 k1: v2d: fix the issue of overflow when Dmabuf physical address is greater than 4G
Change-Id: I2234427baab3bd2279e4a391eb2fdf164b908c6a
2025-04-27 13:46:17 +08:00
huzhen
223fc2a2d8 k1:spi: fix the issue of failing to set the max speed hz for the spi dev
Change-Id: I32a9d43a81bb1341250eb3983b77bfe0f3124af6
Signed-off-by: huzhen <george.hu@spacemit.com>
2025-04-24 13:59:01 +08:00
Nell
388db7efc3 rootfs: update the esos firmware which included in rootfs.gz
esos synced with commit-id(master):cad6ba5aff34ff550113788f5798f23f0aa0d777

Change-Id: I9d6767d761fa0407eeab113cb0ff19c9380d8466
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
2025-04-23 21:20:38 +08:00
zhangmeng
52f463cca4 Merge remote-tracking branch 'origin/k1-dev' into k1-release
Change-Id: I8b344c6c2d77d95b1a0391f073c28cd7a0955553
2025-04-23 21:10:20 +08:00
huanghaiqiang
9a7768df88 k1-x_uav: change tx_delaycode to 0xbf
Change-Id: I6ddf0be9c8bcf1f1449b56111bdfa7635b62cfe9
2025-04-23 21:01:54 +08:00
Nell
4d8ffb6df8 remoteproc: print the version id of esos firmware before bring it up
Change-Id: Ibd5c955f488f2bd8c721c4869487a631206616e3
2025-04-22 17:32:15 +08:00
Nell
264b921fc7 ramfs: update the esos.elf file in ramfs
synced with commit-id(master): cc2686f65d032138fd396e9e6949aef835861295

Change-Id: I5a33408d89f065ea1ccbba827c4e3dc80981a718
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
2025-04-19 15:14:30 +08:00
weijinmei
d5d5da121b ccu: fix mux clk update childs by old freq when clk_set_rate
Change-Id: Ifebf947d73f25aaa74f700b7fe59506cf525b9ea
2025-04-18 15:48:40 +08:00
huzhen
c9b1a8ba29 k1: dtsi: correct the DMA channel IDs for spi0 and spi1
Change-Id: I23b9351924cd1d35e09029210f36e7178c9aab37
Signed-off-by: huzhen <george.hu@spacemit.com>
2025-04-18 15:39:25 +08:00
Junzhong Pan
61efb27879 k1_defconfig: enable HIDRAW
Some hid device requires custom userspace drivers to control
their device.

Change-Id: I8d07932960d6e325b99f62114c3b82a563dc7c64
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-18 15:38:08 +08:00
Junzhong Pan
ce3c7671b9 k1: MUSE-Pi-Pro: disable drd for usbdrd3, fixed host mode
Change-Id: I691d0b5433db77916df7dc864778066a67429730
2025-04-18 15:37:51 +08:00
Junzhong Pan
95ad59b281 dts: spacemit: milkv-jupiter: set vbus_delay_ms of vl817 to 200ms
Tests shows Sandisk Ultra Flair USB3.0 (CZ series) udisk have issue with
VL817.

According to VL817 vendor, the Sandisk udisk have fast boot time, once
vbus is on, it will immediate fails SuperSpeed handshake and enter
HighSpeed mode because VL817's internal SS circuit isn't ready, after a
while, the SS reset is performed.

Since we didn't ultilize USBPE function of VL817 in the harware which
could control VBUS output to fit VL817's power sequence requirements,
this could varies from chip version and firmware. We suggest setting all
vbus_delay_ms of VL817 to 200ms, it could increase 200ms boot time delay
and resume delay of usb, but it's async and acceptable if 200ms is less
than current bottleneck.

Change-Id: Ie93c4be8ed09b4b0ed8e5924c461587ec70f51e3
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-18 15:37:27 +08:00
Junzhong Pan
e36a56a282 dts: k1-x_MINI-PC: set vbus_delay_ms of vl817 to 200ms
Tests shows Sandisk Ultra Flair USB3.0 (CZ series) udisk have issue with
VL817.

According to VL817 vendor, the Sandisk udisk have fast boot time, once
vbus is on, it will immediate fails SuperSpeed handshake and enter
HighSpeed mode because VL817's internal SS circuit isn't ready, after a
while, the SS reset is performed.

Since we didn't ultilize USBPE function of VL817 in the harware which
could control VBUS output to fit VL817's power sequence requirements,
this could varies from chip version and firmware. We suggest setting all
vbus_delay_ms of VL817 to 200ms, it could increase 200ms boot time delay
and resume delay of usb, but it's async and acceptable if 200ms is less
than current bottleneck.

Change-Id: I66236316804944b496523875aa5641221a4f93e4
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-18 15:37:15 +08:00
Junzhong Pan
9f27169e05 dts: k1-x_deb2: set vbus_delay_ms of vl817 to 200ms
Tests shows Sandisk Ultra Flair USB3.0 (CZ series) udisk have issue with
VL817.

According to VL817 vendor, the Sandisk udisk have fast boot time, once
vbus is on, it will immediate fails SuperSpeed handshake and enter
HighSpeed mode because VL817's internal SS circuit isn't ready, after a
while, the SS reset is performed.

Since we didn't ultilize USBPE function of VL817 in the harware which
could control VBUS output to fit VL817's power sequence requirements,
this could varies from chip version and firmware. We suggest setting all
vbus_delay_ms of VL817 to 200ms, it could increase 200ms boot time delay
and resume delay of usb, but it's async and acceptable if 200ms is less
than current bottleneck.
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>

Change-Id: Ib34dc4c35efd48188ae335583b799557ca1a52fa
2025-04-18 15:36:56 +08:00
Junzhong Pan
5425026344 dts: k1-x_deb1: set vbus_delay_ms of vl817 to 200ms
Tests shows Sandisk Ultra Flair USB3.0 (CZ series) udisk have issue with
VL817.

According to VL817 vendor, the Sandisk udisk have fast boot time, once
vbus is on, it will immediate fails SuperSpeed handshake and enter
HighSpeed mode because VL817's internal SS circuit isn't ready, after a
while, the SS reset is performed.

Since we didn't ultilize USBPE function of VL817 in the harware which
could control VBUS output to fit VL817's power sequence requirements,
this could varies from chip version and firmware. We suggest setting all
vbus_delay_ms of VL817 to 200ms, it could increase 200ms boot time delay
and resume delay of usb, but it's async and acceptable if 200ms is less
than current bottleneck.

Change-Id: I7cb9e4d12736db166dd8c69396a1da4742312f6c
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-18 15:36:48 +08:00
Junzhong Pan
ee723e33d8 dts: k1-x_MUSE-Pi-Pro: set vbus_delay_ms of vl817 to 200ms
Tests shows Sandisk Ultra Flair USB3.0 (CZ series) udisk have issue with
VL817.

According to VL817 vendor, the Sandisk udisk have fast boot time, once
vbus is on, it will immediate fails SuperSpeed handshake and enter
HighSpeed mode because VL817's internal SS circuit isn't ready, after a
while, the SS reset is performed.

Since we didn't ultilize USBPE function of VL817 in the harware which
could control VBUS output to fit VL817's power sequence requirements,
this could varies from chip version and firmware. We suggest setting all
vbus_delay_ms of VL817 to 200ms, it could increase 200ms boot time delay
and resume delay of usb, but it's async and acceptable if 200ms is less
than current bottleneck.

Change-Id: I08f23c9183fa56891763626495c4e8dc7cc91171
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-18 15:36:34 +08:00
Junzhong Pan
0efd651fe4 usb: spacemit_onboard_hub: use LATE_SYSTEM_SLEEP_PM_OPS
Make sure hub is initialized after usb async suspend and before usb
async resume.

Change-Id: I5de39b09fe18ba7c8b30ff49c6309babfec833ed
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-18 15:36:01 +08:00
huzhen
db156844ff PCI: k1x: Update PCIe controller driver code:
1. Remove invalid code
  2. Fix register bit operations"

Change-Id: Ibe2a09c7760c3205800567342198ca93df0266ad
Signed-off-by: huzhen <george.hu@spacemit.com>
2025-04-18 15:34:52 +08:00
Nell
14e33343d1 rproc: don't build esos into the kernel due to license issues
Change-Id: I60b1ca7154a31cb768c3b33896eaee5f7f368ad4
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
(cherry picked from commit 543decb1f9)
2025-04-14 13:53:40 +08:00
Nell
543decb1f9 rproc: don't build esos into the kernel due to license issues
Change-Id: I60b1ca7154a31cb768c3b33896eaee5f7f368ad4
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
2025-04-14 12:27:43 +08:00
zengyu
d1afb6cf6b add leds for the phy of eth0 in k1-x_FusionOne.dts
Change-Id: I730b9038fba89436f319a9e5468f21db2da4a319
2025-04-14 09:28:57 +08:00
weijinmei
18e6c5ec00 LX-V10:es8326: change ADC source to Analog MIC
Change-Id: I45334a12bb305213c2427f9d2ad82e8c303fc88b
2025-04-10 18:55:34 +08:00
Junzhong Pan
6fd9dfef76 k1: usb: f_ncm: set bMaxBurst to 0 for spacemit k1
It's observed large bMaxBurst on spacemit k1 cause some XHCI host
having issue when doing iperf3 test.

An Error scene of epin on bus trace looks like this:
  Host TP ACK SeqN=22 NumP=8 Retry=N
  Dev  DP     SeqN=23 Data=1024B **(Not Acked DP)**
  Host TP ACK SeqN=23 NumP=7 (Asked for DP SeqN=23)
  Dev  DP	    SeqN=24 Data=600B **(Aborted DPP)**
  Host TP ACK SeqN=23 NumP=7 Retry=Y (Asked for DP SeqN=23 Again)
  Dev  TP NRDY
  Dev  TP ERDY        NumP=16
  ITPs ...
And epout looks like this:
  Dev ERDY, Host DP, Dev TP ACK, Host DP, Dev TP ACK, ITPs...

It seems the host fails to send ACK again on the epin and fails to
send more data on the epout. Setting bMaxBurst=0 could mitigate the
issue, host error is not excluded. More investigation will be
performed, for better compatibility, disable bursting for now.

The networking throughput is not decreasing compared to bMaxBurst=15.

Change-Id: I16f5adba4871874a56932a705772ec35a088c344
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-10 18:55:02 +08:00
Junzhong Pan
ee97d65919 usb: gadget: f_ncm: workaround for No-ZLP ncm host
The Windows 10 ncm host make us keep printing these every
serveral seconds when doing iperf3 test:

[  174] configfs-gadget.0: Wrong NTH SIGN, skblen 14768
[  174] HEAD:00000000b1a72bfc: 3f 98 a6 8e 17 f8 bb 29 07 b8 da 13 7f 20 80 8e 77 ca 32 07 ac 71 b8 8d 84 03 d7 1b 96 9b c4 fa

It's observed that Windows 10 ncm driver won't send ZLP when the
OUT transfer size is less than dwNtbOutMaxSize. Then when we have
two 16K usb_requst in the queue, when the requests giveback to us,
there are chances that two NTB are separated across two requests
like this:

USB_REQUEST #1
 ------------------------from OUT Transfer #1:-------------------
 [Offset 0x0000] A **NTH32 Header** with wSequence=5765, dwNdpIndex=0x3D90
 [Offset 0x0012] Datagram blocks
 [Offset 0x3D90] A **NDP32** describing 10 Datagram blocks plus one zero length item and padding, len = 112 Bytes.
 --------------------from OUT Transfer #2:-------------------
 [Offset 0x3E00/15872] A **NTH32 Header** with wSequence=5766, dwNdpIndex=0x3B48
 [Offset 0x3E00+???] Datagram block piece from next NDP (wSequence=5766)

USB_REQUEST #2
 --------------------from OUT Transfer #2:-------------------
 [Offset 0x0000]  Datagram block piece from NTB of wSequence=5766
                  3f 98 a6 8e 17 f8 bb 29 07 b8 da 13 7f 20 80 8e 77 ca 32 07 ac 71 b8 8d 84 03 d7 1b 96 9b c4 fa
 [Offset 0x????] A **NDP32** describing Datagram blocks

Workaround it by introducing a temporary buffer to merge two request
then do the unwrap job.

Change-Id: I30edb0039489a82b9cdc0b9894c8fdd12ef695c8
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-04-10 18:54:48 +08:00
huzhen
5c37fb884f k1: dtsi: Add support for eMMC pin configuration
Change-Id: I77cfb71a1de95fc2aec7163e4a0b5a51aad2aa79
2025-04-03 18:59:27 +08:00
huzhen
091ea4a428 pinctrl: k1x: add support for eMMC pin configuration
Change-Id: I5b9ab7bf1f11bf9e52da78cdece118a284567020
Signed-off-by: huzhen <george.hu@spacemit.com>
2025-04-03 18:59:14 +08:00
zhangmeng
b2cba3663e Merge remote-tracking branch 'origin/k1-dev' into k1-release
Change-Id: I7d5ccb7ea24180e6b242b99b38070dcb1328cf39
2025-04-02 17:09:23 +08:00
lilijun
c695cbb289 dts: k1-x_LX-V10.dts: remove wifi and enable uart and eeprom
Change-Id: I0a9862909aa6c06a5d7a8c36ea2a7fd1de77f10f
2025-04-02 17:02:00 +08:00
wanlong
abcc8d50ed k1: MUSE-Pi-Pro: update sdio tx delaycode
Change-Id: Ieb3ec6ded6597ca7747b529dc2649daad304e950
2025-04-02 16:56:12 +08:00
zhenglilang
72b3be0730 k1:display: express error message differently
Change-Id: I59730ad8ca6fa16492668da8986862668bb413a9
2025-04-02 16:45:27 +08:00
zhenglilang
4d7c7a4925 k1:touchscreen: express error message differently
Change-Id: I94d554314a0837476427b564134ff8392abef42c
2025-04-02 16:44:59 +08:00
lizhirong
7bb596d9a0 camera:vi: dump buffer utc timestamp for aviation application
Change-Id: Id7a5a0c27262e8672e6e34e01fffc94214810c38
2025-04-02 16:18:52 +08:00
yanhaodong
be0ac4d764 k1: dtsi: add aliases and node for uart1/r_uart0/r_uart1
Change-Id: Iee08a164ea95efedd23adcec5f0c136bba8696a6
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-04-02 16:12:28 +08:00
yanhaodong
9854881550 k1: uart: support ruart0&1 through rpmsg
Change-Id: Ic26fc89d620a2e36986ac3fe2edf0c618ed4618f
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-04-02 16:12:15 +08:00
yanhaodong
e2a77564c1 esos: spacemit: update builtin firmware for ruart
sysn with commit-id(master): Iccb16a602763dd5d39b432c539e6227227e155f2

Change-Id: I3dfe53ba82de29233ef396499e331bbbe73ae21e
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-04-02 11:05:36 +08:00