mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/7] MIPS: Loongson64: Add Loongson-7A watchdog support
@ 2026-12-02 11:19 Rong Zhang
  2026-12-02 11:19 ` [PATCH v4 1/7] MIPS: Loongson64: env: Don't warn if UART has clocks node when fixing up FDT Rong Zhang
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Rong Zhang @ 2026-12-02 11:19 UTC (permalink / raw)
  To: Keguang Zhang, Wim Van Sebroeck, Guenter Roeck, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Huacai Chen, Jiaxun Yang
  Cc: Rong Zhang, Yao Zi, Icenowy Zheng, linux-mips, linux-watchdog,
	devicetree, linux-kernel, Rong Zhang, Conor Dooley

The Loongson-7A has a watchdog compatible with the one on Loongson
2K0300. It uses an internal 50MHz clock source of the PCH, which is also
shared among other miscellaneous peripherals in the PCH.

Add a 50MHz fixed-clock node with label "pch_misc_clk" to represent the
miscellaneous clock, and migrate existing miscellaneous peripherals
(namely, ls7a_uart*) to use it rather than clock-frequency.

With that, add "loongson,ls7a-wdt" compatible to dt-bindings and the
corresponding watchdog node to ls7a-pch.dtsi. Afterward, enable
LOONGSON1_WDT in defconfig to make it work by default.

Tested on Loongson-LS3A4000-7A1000-NUC-SE and Lenovo KaiTian M530Z.

Since the series modifies ls7a-pch.dtsi here and there, it also fixes
the weird semi-dec-semi-hex style in ranges and reg properties and add
the missing #address-cells = <0> properties to interrupt-controller
nodes.

Signed-off-by: Rong Zhang <rongrong@oss.cipunited.com>
---
Changes in v4:
- pch_misc_clk: Move `compatible' on top (thanks Yao Zi)
- Link to v3: https://patch.msgid.link/20261117-mips-ls7a-wdt-v3-0-2e88f7e1d6c5@oss.cipunited.com

Changes in v3:
- Do not add #address-cells to the lpc node (thanks Sashiko)
- Strip applied material (rebase on top of watchdog-next)
- Link to v2: https://patch.msgid.link/20261113-mips-ls7a-wdt-v2-0-e8abd6b2f77c@oss.cipunited.com

Changes in v2:
- Add a fixed-clock node to represent the clock source for miscellaneous
  peripherals instead of introducing a new clock-frequency node (thanks
  Guenter Roeck, Conor Dooley)
- With the above change, "loongson,ls7a-wdt" is now compatible with
  "loongson,ls2k0300-wdt" (ditto)
- Replace pre-existing clock-frequency nodes by utilizing the new
  fixed-clock node (thanks Conor Dooley)
  - Suppress warnings in lefi_fixup_fdt_serial() when the UART has a
    clocks node
- Fix weird semi-dec-semi-hex style addresses and ranges (ditto)
  - Also fix pre-existing ones, as their context (clock-frequency) is
    touched by the series due to the previous change
- Rephrase commit messages (ditto)
- Add missing #address-cells to interrupt controllers, as its absence
  causes a flood of warning when verifying my changes
- Link to v1: https://patch.msgid.link/20261110-mips-ls7a-wdt-v1-0-968bb85122e6@oss.cipunited.com

---
Rong Zhang (7):
      MIPS: Loongson64: env: Don't warn if UART has clocks node when fixing up FDT
      MIPS: Loongson64: dts: ls7a-pch: Add missing #address-cells to pic node
      MIPS: Loongson64: dts: ls7a-pch: Use hex in ranges and reg properties
      MIPS: Loongson64: dts: ls7a-pch: Add miscellaneous clock node
      MIPS: Loongson64: dts: ls7a-pch: Bind UART nodes to miscellaneous clock
      MIPS: Loongson64: dts: ls7a-pch: Add watchdog node
      MIPS: loongson3_defconfig: Enable LOONGSON1_WDT by default

 arch/mips/boot/dts/loongson/ls7a-pch.dtsi | 49 +++++++++++++++++-----------
 arch/mips/configs/loongson3_defconfig     | 54 ++++++-------------------------
 arch/mips/loongson64/env.c                |  6 ++++
 3 files changed, 46 insertions(+), 63 deletions(-)
---
base-commit: df146790ce61af674924e65a80b71a98484cfc7a
change-id: 664fad58-mips-ls7a-wdt-1e614643b33d

Thanks,
Rong

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-12-02 12:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 11:19 [PATCH v4 0/7] MIPS: Loongson64: Add Loongson-7A watchdog support Rong Zhang
2026-12-02 11:19 ` [PATCH v4 1/7] MIPS: Loongson64: env: Don't warn if UART has clocks node when fixing up FDT Rong Zhang
2026-12-02 11:19 ` [PATCH v4 2/7] MIPS: Loongson64: dts: ls7a-pch: Add missing #address-cells to pic node Rong Zhang
2026-12-02 11:19 ` [PATCH v4 3/7] MIPS: Loongson64: dts: ls7a-pch: Use hex in ranges and reg properties Rong Zhang
2026-12-02 11:19 ` [PATCH v4 4/7] MIPS: Loongson64: dts: ls7a-pch: Add miscellaneous clock node Rong Zhang
2026-12-02 11:19 ` [PATCH v4 5/7] MIPS: Loongson64: dts: ls7a-pch: Bind UART nodes to miscellaneous clock Rong Zhang
2026-12-02 11:19 ` [PATCH v4 6/7] MIPS: Loongson64: dts: ls7a-pch: Add watchdog node Rong Zhang
2026-12-02 11:19 ` [PATCH v4 7/7] MIPS: loongson3_defconfig: Enable LOONGSON1_WDT by default Rong Zhang
2026-12-02 12:37 ` [PATCH v4 0/7] MIPS: Loongson64: Add Loongson-7A watchdog support Jiaxun Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®