From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90DE8EE4996 for ; Mon, 21 Aug 2023 12:49:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235037AbjHUMtd (ORCPT ); Mon, 21 Aug 2023 08:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232461AbjHUMtd (ORCPT ); Mon, 21 Aug 2023 08:49:33 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0CB6B1 for ; Mon, 21 Aug 2023 05:49:30 -0700 (PDT) Received: from loongson.cn (unknown [112.20.109.102]) by gateway (Coremail) with SMTP id _____8AxqOhYXeNkNpcaAA--.18417S3; Mon, 21 Aug 2023 20:49:28 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.109.102]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx3yNWXeNkqYJfAA--.61781S2; Mon, 21 Aug 2023 20:49:27 +0800 (CST) From: Binbin Zhou To: Binbin Zhou , Huacai Chen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Cc: Huacai Chen , loongson-kernel@lists.loongnix.cn, Xuerui Wang , loongarch@lists.linux.dev, Jiaxun Yang , Hongliang Wang , Binbin Zhou Subject: [PATCH v3 0/7] LoongArch: Add built-in dtb support Date: Mon, 21 Aug 2023 20:49:16 +0800 Message-Id: X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Bx3yNWXeNkqYJfAA--.61781S2 X-CM-SenderInfo: p2kr3uplq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FwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2 KfnxnUUI43ZEXa7IU8uuWJUUUUU== Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi all: This patchset introduces LoongArch's built-in dtb support. As we know, the Loongson-2K family supports DT. Inevitably, some systems do not provide a useful device tree to the kernel at boot time. Chasing around bootloaders for these systems is a headache, so we just keep a device tree table in the kernel, keyed by the dts filename, that contains the relevant DTBs. Thanks. ----- 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/cover.1692088166.git.zhoubinbin@loongson.cn/ 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/cover.1686882123.git.zhoubinbin@loongson.cn/ 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/boards.yaml | 34 ++ .../devicetree/bindings/loongarch/cpus.yaml | 63 +++ arch/loongarch/Kconfig | 16 + arch/loongarch/Makefile | 10 +- arch/loongarch/boot/dts/Makefile | 7 +- .../boot/dts/loongson-2k0500-ref.dts | 88 ++++ arch/loongarch/boot/dts/loongson-2k0500.dtsi | 254 ++++++++++++ .../boot/dts/loongson-2k1000-ref.dts | 171 ++++++++ arch/loongarch/boot/dts/loongson-2k1000.dtsi | 375 ++++++++++++++++++ .../boot/dts/loongson-2k2000-ref.dts | 72 ++++ arch/loongarch/boot/dts/loongson-2k2000.dtsi | 291 ++++++++++++++ arch/loongarch/kernel/env.c | 33 ++ arch/loongarch/kernel/setup.c | 9 +- 13 files changed, 1417 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/loongarch/boards.yaml create mode 100644 Documentation/devicetree/bindings/loongarch/cpus.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 -- 2.39.3