Skip to content

LoongArch: Add built-in dtb support

Binbin Zhou linux-devicetree loongarch 6 versions – Applied

Status from this message: Applied to loongarch-next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest7 patches 11 repliesApplied
  2. v57 patches 9 repliesSuperseded
  3. v47 patches 11 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v37 patches4 repliesSuperseded
v27 patches15 repliesSuperseded
v16 patches16 repliesSuperseded

Changes in v6 from the cover letter

patch(3/7):
- Update cmdline handling;
patch(5/7):
- Drop bootargs;
- Drop cpu-map;
- Add dma-controller node;
patch(4/7)(6/7):
- Drop bootargs;
- Drop cpu-map;
patch(7/7):
- Initialize loongson_sysconf.cores_per_package.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/7dt-bindings: loongarch: Add CPU bindings for LoongArchDocumentation/devicetree/bindings/loongarch/cpus.yaml+61 -00 replies
2/7dt-bindings: loongarch: Add Loongson SoC boards compatiblesDocumentation/devicetree/bindings/loongarch/loongson.yaml+34 -00 replies
3/7LoongArch: Allow device trees to be built into the kernelarch/loongarch/Kbuild arch/loongarch/Kconfig arch/loongarch/Makefile +2 more+31 -60 replies
4/7LoongArch: dts: DeviceTree for Loongson-2K0500arch/loongarch/boot/dts/Makefile arch/loongarch/boot/dts/loongson-2k0500-ref.dts arch/loongarch/boot/dts/loongson-2k0500.dtsi+356 -00 replies
5/7LoongArch: dts: DeviceTree for Loongson-2K1000arch/loongarch/boot/dts/Makefile arch/loongarch/boot/dts/loongson-2k1000-ref.dts arch/loongarch/boot/dts/loongson-2k1000.dtsi+676 -10 replies
6/7LoongArch: dts: DeviceTree for Loongson-2K2000arch/loongarch/boot/dts/Makefile arch/loongarch/boot/dts/loongson-2k2000-ref.dts arch/loongarch/boot/dts/loongson-2k2000.dtsi+373 -10 replies
7/7LoongArch: Parsing CPU-related information from DTSarch/loongarch/kernel/env.c arch/loongarch/kernel/smp.c+36 -10 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchConor Dooley
1/7R-b
2/7R-b
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/7] LoongArch: Add built-in dtb support

Hi all:

This patchset introduces LoongArch's built-in dtb support.

During the upstream progress of those DT-based drivers, DT properties are changed a lot so very different from those in existing bootloaders. It is inevitably that some existing systems do not provide a standard, canonical device tree to the kernel at boot time. So let's provide a device tree table in the kernel, keyed by the dts filename, containing the relevant DTBs.

We can use the built-in dts files as references. Each SoC has only one built-in dts file which describes all possible device information of that SoC, so the dts files are good examples during development.

And as a reference, our built-in dts file only enables the most basic bootable combinations (so it is generic enough), acts as an alternative in case the dts in the bootloader is unexpected.

In the past while, we resolved the DTC_CHK warning for the v4 patchset, and the relevant patchset has either been applied or had the Reviewed-by tag added.

Now, we need to rely on the following patch sets:
1. liointc
https://lore.kernel.org/all/[email protected]/
Reviewed-by tag has been added.
2. pmc
https://lore.kernel.org/all/[email protected]/
has been applied by Daniel.
3. dmac
https://lore.kernel.org/all/[email protected]/
has been applied by Vinod.

Thanks.

-----
V6:
patch(3/7):
- Update cmdline handling;
patch(5/7):
- Drop bootargs;
- Drop cpu-map;
- Add dma-controller node;
patch(4/7)(6/7):
- Drop bootargs;
- Drop cpu-map;
patch(7/7):
- Initialize loongson_sysconf.cores_per_package.

Link to V5:
https://lore.kernel.org/all/[email protected]/

V5:
patch(1/7):
- Add reviewed-by tag.
patch(3/7):
- Rewrite commit message to describe the reason for needing the build-in DTB.
patch(4/7):
- Add Power-Manager node.
patch(5/7):
- Add Power-Manager node.
- Add spi node.
- Add pmc node.
patch(6/7):
- Add Power-Manager node.

Link to V4:
https://lore.kernel.org/all/[email protected]/

V4:
patch(1/7):
- Drop device_type property.
patch(2/7):
- Rename board.yaml to loongson.yaml.
patch(4/7):
- Keep the ranges attribute after compatible;
- Add bootargs = "ttyS0,115200", which is needed for reference board;
patch(5/7):
- Keep the ranges attribute after compatible;
- Add bootargs = "ttyS0,115200", which is needed for reference board;
- Change node name global-utilities to chipid.
patch(6/7):
- Keep the ranges attribute after compatible;
- Add bootargs = "ttyS0,115200", which is needed for reference board.

Link to V3:
https://lore.kernel.org/all/[email protected]/

V3:
patch(1/7):
- Add reference to the common cpu schema.
patch(2/7):
- Add reviewed-by tag.
patch(4/7):
- Drop bootargs;
- Move the cpus node to dtsi, which is part of the SoC.
patch(5/7):
- Drop bootargs;
- Move the cpus node to dtsi, which is part of the SoC;
- Fix gmac0/1-mdio node: compatible is always the first property;
- Drop i2c-gpio node.
patch(6/7):
- Drop bootargs;
- Move the cpus node to dtsi, which is part of the SoC.
- Changes liointc to liointc-1.0, for Loongson-2K2000 has 32 interrupt sources.

Link to V2:
https://lore.kernel.org/all/[email protected]/

V2:
patch(1/7):
- Drop model and clock-frequency properties;
- Add clocks property;
- Rewrite the description.
patch(2/7):
- Add the proper compatibles for boards.
patch(4/7)(5/7)(6/7):
- Format commit message head;
- Drop undocumented compatible, such as pci_bridge compatible;
- Distinguish the attributes, put SoC-related into DTSI and

    board-related into DTS;

- Check DTS with 'make dtbs_check W=1'.
patch(7/7)
- New patch;
- Parses Molde name and CPU MHz from the DTS attribute.

Link to V1:
https://lore.kernel.org/loongarch/[email protected]/

Binbin Zhou (7):
dt-bindings: loongarch: Add CPU bindings for LoongArch
dt-bindings: loongarch: Add Loongson SoC boards compatibles
LoongArch: Allow device trees to be built into the kernel
LoongArch: dts: DeviceTree for Loongson-2K0500
LoongArch: dts: DeviceTree for Loongson-2K1000
LoongArch: dts: DeviceTree for Loongson-2K2000
LoongArch: Parsing CPU-related information from DTS

 .../devicetree/bindings/loongarch/cpus.yaml   |  61 +++
 .../bindings/loongarch/loongson.yaml          |  34 ++
 arch/loongarch/Kbuild                         |   1 +
 arch/loongarch/Kconfig                        |  18 +
 arch/loongarch/Makefile                       |   3 +-
 arch/loongarch/boot/dts/Makefile              |   5 +-
 .../boot/dts/loongson-2k0500-ref.dts          |  88 ++++
 arch/loongarch/boot/dts/loongson-2k0500.dtsi  | 266 ++++++++++
 .../boot/dts/loongson-2k1000-ref.dts          | 183 +++++++
 arch/loongarch/boot/dts/loongson-2k1000.dtsi  | 492 ++++++++++++++++++
 .../boot/dts/loongson-2k2000-ref.dts          |  72 +++
 arch/loongarch/boot/dts/loongson-2k2000.dtsi  | 300 +++++++++++
 arch/loongarch/kernel/env.c                   |  34 +-
 arch/loongarch/kernel/setup.c                 |  12 +-
 arch/loongarch/kernel/smp.c                   |   3 +
 15 files changed, 1565 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/loongarch/cpus.yaml
 create mode 100644 Documentation/devicetree/bindings/loongarch/loongson.yaml
 create mode 100644 arch/loongarch/boot/dts/loongson-2k0500-ref.dts
 create mode 100644 arch/loongarch/boot/dts/loongson-2k0500.dtsi
 create mode 100644 arch/loongarch/boot/dts/loongson-2k1000-ref.dts
 create mode 100644 arch/loongarch/boot/dts/loongson-2k1000.dtsi
 create mode 100644 arch/loongarch/boot/dts/loongson-2k2000-ref.dts
 create mode 100644 arch/loongarch/boot/dts/loongson-2k2000.dtsi
Signature · 1 line
2.39.3