Commit graph

1231353 commits

Author SHA1 Message Date
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 543decb1f97a50ae4171eaa33e50629d90b979d8)
2025-04-14 13:53:40 +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
weijinmei
05f361d2fa ccu: add MN clocks and init MN src clock rate
Change-Id: I82cd39a91a06fe7605a9a1dec2c3345e66fc12f3
2025-04-02 08:59:27 +08:00
weijinmei
90e444627a clock:dt-bindings: add MN clock index
Change-Id: Idf7b6d317b384a49e843df20787a95f502bf3808
2025-04-02 08:44:29 +08:00
Lee Jones
c5486bbc46 leds: core: Omit set_brightness error message for a LED supporting hw trigger only
If both set_brightness functions return -ENOTSUPP, then the LED doesn't
support setting a fixed brightness value, and the error message isn't
helpful. This can be the case e.g. for LEDs supporting a specific hw
trigger only.

Pinched the subject line and commit message from Heiner:
Link: https://lore.kernel.org/all/44177e37-9512-4044-8991-bb23b184bf37@gmail.com/

Reworked the function to provide Heiner's required semantics whilst
simultaneously increasing readability and flow.

Cc: Pavel Machek <pavel@ucw.cz>
Cc: linux-leds@vger.kernel.org
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Change-Id: If8d66258ea3a728ae5da6d736941d8da25715a35
2025-03-31 19:51:47 +08:00
weijinmei
e81e5e1e3d ccu: add ssp3 clk src 1MHz
Change-Id: Iea30e5159d8457f5ffdbe6f330aa9e85eb858cd2
2025-03-31 16:51:20 +08:00
zhangmeng
820a4c8d2c Merge remote-tracking branch 'origin/k1-dev' into k1-release
Change-Id: Ib54fe5c6c4d59d33bbdf0b7412df8de3262d9b3b
2025-03-28 15:32:44 +08:00
wanlong
6a4f6d85f1 mmc: sdhci-of-k1x: avoid disable auto clock multiple times during switch sequence
some sdio device's signal level is already 1.8V before voltage switch,
so we should avoid generating clock multiple times during the 10ms.

Change-Id: Icfeaa8e3131e60c994ff89a49b9bb4f04781135e
2025-03-28 15:31:17 +08:00
Junzhong Pan
729c116715 usb: phy-k1x-ci-usb2: select parallel path
Change-Id: Ibf799e087800c1b8eb04be5134283e75f41d37c6
2025-03-27 09:27:31 +08:00
Junzhong Pan
d5563acb46 usb: k1x_udc_core: cleanup codes
1. Use dev_xxx instead of pr_xxx.
2. Reduce checkpatch.pl warnings.

Change-Id: Ib28cab103831bdd7b180e084d860a690ec4f0d9a
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-26 15:57:33 +08:00
Junzhong Pan
bb1d73d83f usb: k1x_udc_core: support platform ciu qos and reserved dma
Change-Id: I1d1a97b589d6159095d037338c697a6bff51dd5d
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-26 15:57:29 +08:00
Junzhong Pan
8a6f1385c1 usb: k1x_udc_core: use semaphore to prime new dtds
According to datasheet:

ATDTW: Add dTD TripWire – RW. Default = 0b.

This bit is used as a semaphore to ensure the to proper addition
of a new dTD to an active (primed) endpoint’s linked list. This
bit is set and cleared by software. This bit shall also be
cleared by hardware when its state machine is in a hazard region
for which adding a dTD to a primed endpoint may go unrecognized.

This logic is already implemented in mv_udc_core.c, fsl_udc_core.c
and chipidea/udc.c

Change-Id: Ide5b5f3ff0ca04216fa0e6889eb18eb9cd3f7819
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-26 15:57:23 +08:00
Junzhong Pan
54b14a1c20 usb: k1x_udc_core: add req_queueue and registers debugfs support
Change-Id: I5c0b4724e4bfe958b3a22540b93d16ac33c3b2f0
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-26 15:57:14 +08:00
zhangmeng
d0c3a314af Merge remote-tracking branch 'origin/k1-dev' into k1-release
Change-Id: I8429ca3d133dfb42f976775170b8972ef581db0f
2025-03-24 17:55:08 +08:00
zhenglilang
75effd66cd k1:display: add debounce functionality for detecting HDMI connection status
Change-Id: I1ca0b0a6fcefcf85d314960dfd70df96bbd743f9
2025-03-24 17:31:16 +08:00
Junzhong Pan
f558219bdb dts: k1-x_MUSE-Paper2: enable monitor-vbus on dwc3
HDC app on openharmony determine when to renew session relying
on udc return -ECONNRESET, if udc doesn't return -ECONNRESET on
the queued requests at disconnecting, the HDC app would do two
enumuration during reconnect.

Change-Id: Ia853b62430d87937d6c45cc6f0e507a6524528e5
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-24 17:05:50 +08:00
Junzhong Pan
6eea4cbce3 dts: k1-x_ZT001H: let charger notify disconnect to udc
HDC app on openharmony determine when to renew session relying
on udc return -ECONNRESET, if udc doesn't return -ECONNRESET on
the queued requests at disconnecting, the HDC app would do two
enumuration during reconnect.

Change-Id: I7bad10082b5c5ab3ad29b279e9b7a815d11c146e
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-24 16:59:13 +08:00
Junzhong Pan
a03dcb21c0 usb: k1x_udc_core: support power-supply notify vbus disconnect
USB Device disconnect detection rely on vbus detection, this is done
by using extcon or otg driver based on internal ID/VBUS circuit. But
for some boards, the vbus is connected to a charger, thus no way to
obtain vbus status directly.

Most application works fine without the disconnect since there is
a bus reset after reconnection. But if the f_fs application rely
on the -ECONNRESET on usb request to do some software reinit, it
may cause problem.

To fix problems with this case, we add a notifier connected to power
supply driver similar to extcon.

Change-Id: I58c07dd42419589ef77d0a3b4b2efddd2ab8293a
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-24 16:58:54 +08:00
Nell
26febcfa2d k1:syssuspend: we should flush the local cache when the last cpu enter
suspend

Change-Id: I4a8213e3690ae44543e88d5460b609756bb3bb81
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
2025-03-24 15:34:21 +08:00
yanhaodong
6a9c5d11f7 k1: dts: fix k1-x_MUSE-Pi-Pro.dts model name
Change-Id: I598a9b033223b322f09c47073e2acdc3bde98fce
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-03-24 09:02:00 +08:00
Nell
51935b0360 k1:soc-timer: fix compling error
error like this blow:

drivers/clocksource/timer-k1x.c:302:12: error: conflicting types for 'timer_shutdown'; have 'int(struct clock_event_device *)'
  302 | static int timer_shutdown(struct clock_event_device *dev)
      |            ^~~~~~~~~~~~~~
In file included from ./include/linux/workqueue.h:9,
                 from ./include/linux/rhashtable-types.h:15,
                 from ./include/linux/ipc.h:7,
                 from ./include/uapi/linux/sem.h:5,
                 from ./include/linux/sem.h:5,
                 from ./include/linux/sched.h:15,
                 from ./include/linux/hardirq.h:9,
                 from ./include/linux/interrupt.h:11,
                 from drivers/clocksource/timer-k1x.c:10:
./include/linux/timer.h:188:12: note: previous declaration of 'timer_shutdown' with type 'int(struct timer_list *)'
  188 | extern int timer_shutdown(struct timer_list *timer);

Change-Id: I2ee903478e121f0428d7820bcd47025d0fe37c8b
Signed-off-by: Nell <xianbin.zhu@spacemit.com>
2025-03-24 09:00:36 +08:00
Nell
2018056833 Revert "k1:emac: enable async suspend"
we can't put the emac suspend callback into the suspend_noirq process
which need irq enabled

This reverts commit 6901b9e2db.

Change-Id: Iefceb2aad7d4b3286eb219601c46a9943de719d2
2025-03-24 08:59:53 +08:00
Nell
0e2cbf39d1 Revert "k1:emac: Modify the operation sequence of the EMAC IRQ."
This reverts commit c214b5bbf9.

Change-Id: I68305fb66a948fdd467540c4734c5110b25f54a7
2025-03-24 08:59:41 +08:00
huzhen
d5a8e5e540 net:ethernet: add support for LED's on RTL8168
Change-Id: I9be1cb1ab3b5b3bb6b7010fb23dd8d336b6cc576
2025-03-20 16:43:07 +08:00
zhenglilang
baa1e38363 k1:display: solve HDMI display issue on login screen
During startup, frequent hot-plug events in a short
period cause HDMI initialization failures, leading
to HDMI screen display issues and slow initialization.

Change-Id: Ieb71fb1df9ee8858c77148e94be114c2f2c10ccb
2025-03-20 11:31:12 +08:00
yanhaodong
43fa19bee4 k1: watchdog: fix use reboot_lock without init
Change-Id: I1b9d64482ed7c7c499d7505e627d8a8ed5d8240a
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-03-19 09:09:40 +08:00
yanhaodong
df25cf87dd k1: dts: rename k1-x_MUSE-Pi2 to k1-x_MUSE-Pi-Pro
Change-Id: Ie863d1e43a6e11d227e56332dfcb2515455e9b08
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-03-19 08:42:22 +08:00
huzhen
84bd13804f k1_defconfig: set CONFIG_R8168 to m, for RTL8168
Change-Id: I17f4c2378c9ec4dad344623f4aa43b25a90c89ac
2025-03-18 14:00:11 +08:00
huzhen
c7f15d0ad2 net:ethernet: adding the the driver of RTL8168 Gigabit Ethernet
Change-Id: Ib0e893c42b147796a31c19e436775d3568fd81b6
2025-03-18 13:52:16 +08:00
zhangmeng
0501fd4db5 Merge remote-tracking branch 'origin/k1-dev' into k1-release
Change-Id: Ic932fc7f1d6112bda61ffcbe08dfa76eb785967d
2025-03-18 11:41:01 +08:00
Junzhong Pan
156d1fad36 k1_defconfig: enable cdc_acm to support more uart devices
Change-Id: Ie02e149ae52877634d2c1027875889aa515b2e34
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-18 10:10:18 +08:00
Junzhong Pan
5f20154870 k1_defconfig: enable rndis_host to support usb network sharing device
Change-Id: Ic92d512ca8b2def2153041401ac8c5fae9bdc102
Signed-off-by: Junzhong Pan <junzhong.pan@spacemit.com>
2025-03-18 10:09:30 +08:00
lizhirong
69bda66908 camera:isp: fix BUG_ON error in fe_isp_dma_irq_handler sometimes
Change-Id: I9c9fc1f020e0172bf7090d22825f4df11b3e5fd7
2025-03-17 19:54:17 +08:00
yanhaodong
3ab6308f60 net: can: flexcan use mailbox directly
x60 handle rcpu flexcan irq through mailbox instead of
rpmsg can save more time.

Change-Id: I5611e307756e07257bd092a687dd9baf132f1503
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-03-17 19:53:56 +08:00
yanhaodong
270d6a5fd3 esos: spacemit: update builtin firmware for rcan
Change-Id: If59ec1a68f703097bff51f1a4b27480b7c4b4d7d
Signed-off-by: yanhaodong <haodong.yan@spacemit.com>
2025-03-17 19:53:11 +08:00
Nell
cea00486f2 k1:dtsi:rproc: add apb clk refence in rcpu node
Change-Id: I31b68c38c5d6f9ca5e8e050d8b9b9f2e7244377d
2025-03-17 19:52:48 +08:00
Nell
fa8c7501e2 k1:rporc: support setting apb clk of rcpu to 122M for rcan useage
Change-Id: I6a8f3c6dbc508d8c107a8319ca4c5e5d025133e2
2025-03-17 19:52:30 +08:00
weijinmei
3b0fcb1fbf ccu: enable dma_clk when init
can not access secure region when dma_clk is disabled,
so dma_clk should be enabled by default.

Change-Id: I9de553378b2a0a4408a661a960c24481f527f6ff
2025-03-14 09:12:09 +08:00
weijinmei
d831f490ea k1:ccu: add audio bus clocks
Change-Id: I76a7c007e40d13721a1416d739c167d2d94ca33e
Signed-off-by: weijinmei <jinmei.wei@spacemit.com>
2025-03-13 19:54:19 +08:00
weijinmei
2717da92b7 k1:dt-bindings: add clk index to clock dt-bindings
Change-Id: I184d41799f297db76d06a4e40eff1a2f6cc8acff
2025-03-13 19:54:01 +08:00
weijinmei
e6e8025deb k1:dts: add reg base audpmu to ccu
Change-Id: Ic740c7a43637a6e1d9c8b9bada60637cd483ef6c
2025-03-13 19:53:41 +08:00
zhangmeng
d7bce33596 riscv: fix some failure when process ai instruction trap
when run a program which conatain matrix instruction in docker,
the sched_setaffinity(current->pid, cpumask) maybe failed because
of the namespace, sometimes, sched_setaffinity() can't find the
task with current->pid. So, use sched_setaffinity(0, cpumask),
sched_setaffinity()  will use 'current' task directly.
When try to bind the program to a ai core, the affinity should be
check, if the program has been bind to none-ai core already, auto
bind will be ignored.

Change-Id: I81817cf81aa8923a7ad44fb25b76230b5c448e2c
Signed-off-by: zhangmeng <zhangmeng.kevin@spacemit.com>
2025-03-13 19:50:11 +08:00