Binbin Zhou
b846085eed
dt-bindings: interrupt-controller: loongson,liointc: Document address-cells
...
The Loongson local I/O interrupt controller can be referenced in
interrupt-map properties (e.g. in
arch/loongarch/boot/dts/loongson-2k1000.dtsi), thus the nodes should
have address-cells property.
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn >
Link: https://patch.msgid.link/fb3811b6bc387aa23adfc0aaf9a0a31c2d468e79.1767505859.git.zhoubinbin@loongson.cn
Signed-off-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:19 +08:00
maoxiaochuan
b75aa49c40
rtc: loongson: Add Loongson-2K0300 support
...
The Loongson-2K0300's rtc hardware design is similar to that of the
Loongson-1B, but it does not support the alarm feature.
Introduce `LOONGSON_RTC_ALARM_WORKAROUND`, which indicates a chip that
does not support the alarm feature, and rewrite the related logic in
`loongson_rtc_alarm_setting()`.
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn >
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn >
Link: https://patch.msgid.link/abff68dda2fe6a6601a9e58b31e278d941297fce.1768616276.git.zhoubinbin@loongson.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:19 +08:00
Binbin Zhou
5f88366873
dt-bindings: rtc: loongson: Document Loongson-2K0300 compatible
...
Add "loongson,ls2k0300-rtc" dedicated compatible to represent the RTC
interface of the Loongson-2K0300 chip.
Its hardware design is similar to that of the Loongson-1B, but it does
not support the alarm feature.
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn >
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/0c6a4fd221b5bf05f06cae9bb543a5bf7ea59f57.1768616276.git.zhoubinbin@loongson.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:19 +08:00
Binbin Zhou
d6ddf0dfe0
dt-bindings: rtc: loongson: Correct Loongson-1C interrupts property
...
The `interrupts` property indicates an RTC alarm interrupt, which is
required for RTCs that support the alarm feature, which is not supported
by the Loongson-1C RTC. We exclude it for a more accurate description.
Changing the `allowed` property is ABI-breaking behavior, but
throughout the existing Loongson DTS{i}, the description of the RTC
nodes conforms to the modified bingding rules.
Thus, the existing Loongson DTS{i} will not be affected.
Fixes: 487ef32caebe ("dt-bindings: rtc: Split loongson,ls2x-rtc into SoC-based compatibles")
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn >
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn >
Acked-by: Conor Dooley <conor.dooley@microchip.com >
Link: https://patch.msgid.link/b6295c907410f6708115cba4df0959ee6629f8a5.1768616276.git.zhoubinbin@loongson.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:18 +08:00
John Garry
d2beb9456a
MIPS: Loongson: Make cpumask_of_node() robust against NUMA_NO_NODE
...
The arch definition of cpumask_of_node() cannot handle NUMA_NO_NODE - which
is a valid index - so add a check for this.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn >
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:18 +08:00
Bibo Mao
9238506cb9
crypto: virtio: Replace package id with numa node id
...
With multiple virtio crypto devices supported with different NUMA
nodes, when crypto session is created, it will search virtio crypto
device with the same numa node of current CPU.
Here API topology_physical_package_id() is replaced with cpu_to_node()
since package id is physical concept, and one package id have multiple
memory numa id.
Signed-off-by: Bibo Mao <maobibo@loongson.cn >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Message-Id: <20260113030556.3522533-4-maobibo@loongson.cn >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:18 +08:00
Bibo Mao
cf56dcee94
crypto: virtio: Remove duplicated virtqueue_kick in virtio_crypto_skcipher_crypt_req
...
With function virtio_crypto_skcipher_crypt_req(), there is already
virtqueue_kick() call with spinlock held in function
__virtio_crypto_skcipher_do_req(). Remove duplicated virtqueue_kick()
function call here.
Fixes: d79b5d0bbf2e ("crypto: virtio - support crypto engine framework")
Cc: stable@vger.kernel.org
Signed-off-by: Bibo Mao <maobibo@loongson.cn >
Acked-by: Jason Wang <jasowang@redhat.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Message-Id: <20260113030556.3522533-3-maobibo@loongson.cn >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:18 +08:00
Bibo Mao
181aef9b99
crypto: virtio: Add spinlock protection with virtqueue notification
...
When VM boots with one virtio-crypto PCI device and builtin backend,
run openssl benchmark command with multiple processes, such as
openssl speed -evp aes-128-cbc -engine afalg -seconds 10 -multi 32
openssl processes will hangup and there is error reported like this:
virtio_crypto virtio0: dataq.0:id 3 is not a head!
It seems that the data virtqueue need protection when it is handled
for virtio done notification. If the spinlock protection is added
in virtcrypto_done_task(), openssl benchmark with multiple processes
works well.
Fixes: fed93fb62e05 ("crypto: virtio - Handle dataq logic with tasklet")
Cc: stable@vger.kernel.org
Signed-off-by: Bibo Mao <maobibo@loongson.cn >
Acked-by: Jason Wang <jasowang@redhat.com >
Acked-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Message-Id: <20260113030556.3522533-2-maobibo@loongson.cn >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:18 +08:00
Brian Masney
4fd65e99a7
clk: loongson1: convert from divider_round_rate() to divider_determine_rate()
...
The divider_round_rate() function is now deprecated, so let's migrate
to divider_determine_rate() instead so that this deprecated API can be
removed.
Note that when the main function itself was migrated to use
determine_rate, this was mistakenly converted to:
req->rate = divider_round_rate(...)
This is invalid in the case when an error occurs since it can set the
rate to a negative value.
Fixes: bb40a2ef4fc9 ("clk: loongson1: convert from round_rate() to determine_rate()")
Reviewed-by: Keguang Zhang <keguang.zhang@gmail.com >
Tested-by: Keguang Zhang <keguang.zhang@gmail.com > # on LS1B & LS1C
Signed-off-by: Brian Masney <bmasney@redhat.com >
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:17 +08:00
tao89959
b8583f1a4c
loongson: 2k1000: default defconfig not enable RT
...
Changelog: 2k1000 默认配置默认不使能RT
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:17 +08:00
tao89959
c8a87714ac
loongson: watchdog: fix ping watchdog failed when watchdog close
...
Changelog: 修复loongson看门狗驱动当关闭时,无法喂狗的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:17 +08:00
tao89959
8604389b03
drivers: watchdog: support setup watchdog timeout when close enable watchdog
...
Changelog: 看门狗驱动支持在关机调用看门狗时设置超时时间
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:17 +08:00
tao89959
45ccfb6664
loongson: 2k1000: dtsi: sata dma mask setup 64bit
...
Changelog: 2k1000 的sata的dma位数声明为64bit
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:17 +08:00
tao89959
83af579180
defconfig: 2k1000: enable spidev driver
...
Changelog: 2k1000 defconfig使能spidev
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:16 +08:00
tao89959
4dde2cee54
2k300: g2k03z0: core dtsi disable emmc clk stable
...
Changelog: g2k03z0核心板的emmc时钟取消时钟稳定延迟机制
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:16 +08:00
tao89959
b24cfe5860
dts: loongson: update format
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:16 +08:00
tao89959
04486e25a8
loongson: dts: enable yt8531 pll enable
...
Chnagelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:16 +08:00
tao89959
7d6aacdf8d
net: phy: yt8531h: fix pll enable setup bug
...
Changelog: 修复yt8531h的pll设置失败问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:16 +08:00
tao89959
42fcf753ac
Revert "net: phy: motor yt8531 add soft reset func"
...
This reverts commit 9d4f7df5bb4f327c46c340436487c5ea335e48b1.
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:15 +08:00
tao89959
bf325c3f96
mmc: loongson: support setup clk stable delay time
...
Changelog: 龙芯mmc驱动支持设置时钟稳定的延时时间
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:15 +08:00
tao89959
ccce94639e
net: phy: motor yt8531 add soft reset func
...
Changelog: yt8531添加 soft reset 函数
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:15 +08:00
tao89959
6d348e033d
loongson: 2k1000: defconfig: enable numa
...
Changelog: 2k1000 配置使能numa
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:15 +08:00
tao89959
a5565c47ec
loongson: 2k1000: dp: update spi0 node
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:15 +08:00
tao89959
dce6bf6c01
loongarch: numa: fix compile error
...
Changelog: 修复编译错误
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:14 +08:00
tao89959
b5202d7a7a
loongson: 2k1000: defconfig: add watchdog support
...
Changelog: 2k1000添加看门狗编译支持
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:14 +08:00
tao89959
71b15acd63
loongson: 2k1000: dtsi: add wtd dts node
...
2k1000 dtsi添加看门狗节点
Changelog:
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:14 +08:00
tao89959
7c746d35e3
2k300: defconfig: add sd2078support
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:14 +08:00
tao89959
379c54c559
rtc: sd2078: add sd2078 rtc driver
...
Changelog: 添加sd2078 rtc驱动支持
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:14 +08:00
tao89959
76d8262350
loongson: 2k1000: dtsi: fix spi cells size
...
Changelog: 修复2k1000的spi的dts节点cells的属性
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:13 +08:00
tao89959
c08629e3b1
loongson: drivers: spi: fix spi bus freq error bug
...
Changelog: 修复loongson spi的总线频率错误的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:13 +08:00
tao89959
0276e0d4ee
loongson: 2k1000: defconfig: add gpio-fan enable
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:13 +08:00
tao89959
9ab0328ed4
loongson: 2k1000: dts: fix 2k1000 dp dts unused aliases
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:13 +08:00
tao89959
d4fe24e70a
loongson: 2k1000: pinctrl: fix compile warning
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:12 +08:00
tao89959
a553b37120
loongson: 2k1000: 2k1000 pinctrl driver add new compatible
...
Changelog: 2k1000的引脚复用配置驱动添加新的compatible
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:12 +08:00
tao89959
3fea94d29b
loongson: 2k1000: defconfig: add no dc defconfig
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:12 +08:00
tao89959
113e401007
loongson: 2k1000: defconfig: disable apb dma drivers
...
Changelog: 2k1000 defconfig 禁用 apb dma 驱动
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:12 +08:00
tao89959
671fe4879a
loongson: 2k1000: defconfig: disable pca9555 irq enable
...
Changelog: 2k1000配置禁用pca95xx中断
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:11 +08:00
tao89959
1cd903920d
loongson: 2k1000: sdio: add sdio desc
...
Changelog: 2k1000 dts添加sdio的描述
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:11 +08:00
tao89959
704dc7d41a
loongson: 2k1000: dts: fix uart default as 4 line mode
...
Changelog: 2k1000 uart0默认为4线模式
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:11 +08:00
tao89959
eefb94b54d
loongson: 2k1000: dts: fix otg compatible
...
Changelog: 修复2k1000dts otg无法使用的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:11 +08:00
tao89959
51cc2f3e5a
loongson: 2k1000: dts: fix gpio interrupt error
...
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:11 +08:00
tao89959
129b30cc4d
loongson: 2k1000: dts: dma use new driver
...
Changelog: 2k1000dts使用新的dma驱动
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:10 +08:00
tao89959
b425f5b590
loongson: 2k1000: i2c: add clock desc
...
Changelog: 2k1000dts添加时钟描述
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:10 +08:00
tao89959
c6c04e3c05
loongson: 2k1000: dts: add aliases
...
Changelog: 2k1000的dts添加默认的aliases
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:10 +08:00
tao89959
f2dac8034e
loongson: i2c: support multi bus clock generate mode
...
Changelog: 支持多种总线时钟生成模式
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:10 +08:00
tao89959
ddc84e010f
loongson: i2c: support clock and bus freq from dts or acpi
...
Changelog: 龙芯i2c驱动支持输入时钟和总线时钟从dts或acpi获取
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:10 +08:00
tao89959
5b79993616
loongson: ls2kmci: disable redundant code about cd-gpio setup
...
Changelog: ls2kmci禁用多余的检测gpio的配置代码
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:09 +08:00
tao89959
530690a32b
loongson: ls2kmci: delete multi debug info
...
Changelog: ls2kmci驱动删除重复调试信息
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:09 +08:00
tao89959
634f00fcb9
loongson: ls2kmci: fix deponds dma error option
...
Changelog: 修复ls2kmci依赖错误
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:09 +08:00
tao89959
05fd58fbf7
loongson: 2k1000: update pinmux config driver to support multi option
...
Changelog: 更新2k1000的配置库支持更多配置项
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn >
2026-08-24 14:17:09 +08:00