From patchwork Fri Jun 16 06:10:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Binbin Zhou X-Patchwork-Id: 693431 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 98719EB64D7 for ; Fri, 16 Jun 2023 06:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242492AbjFPGLI (ORCPT ); Fri, 16 Jun 2023 02:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242181AbjFPGLB (ORCPT ); Fri, 16 Jun 2023 02:11:01 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3557610F7 for ; Thu, 15 Jun 2023 23:10:58 -0700 (PDT) Received: from loongson.cn (unknown [112.20.112.76]) by gateway (Coremail) with SMTP id _____8AxGurx_Itk6tsFAA--.12604S3; Fri, 16 Jun 2023 14:10:57 +0800 (CST) Received: from localhost.localdomain (unknown [112.20.112.76]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxReTv_ItkFPEcAA--.17020S2; Fri, 16 Jun 2023 14:10:56 +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 0/6] LoongArch: Add built-in dtb support Date: Fri, 16 Jun 2023 14:10:37 +0800 Message-Id: X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-CM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vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x02 67AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUxYiiDUUUU 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. Binbin Zhou (6): 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: DeviceTree for Loongson-2K0500 LoongArch: DeviceTree for Loongson-2K1000 LoongArch: DeviceTree for Loongson-2K2000 .../devicetree/bindings/loongarch/boards.yaml | 31 + .../devicetree/bindings/loongarch/cpus.yaml | 65 ++ arch/loongarch/Kconfig | 16 + arch/loongarch/Makefile | 10 +- arch/loongarch/boot/dts/Makefile | 7 +- arch/loongarch/boot/dts/loongson_2k0500.dts | 311 ++++++++++ arch/loongarch/boot/dts/loongson_2k1000.dts | 565 ++++++++++++++++++ arch/loongarch/boot/dts/loongson_2k2000.dts | 417 +++++++++++++ arch/loongarch/kernel/setup.c | 9 +- 9 files changed, 1425 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.dts create mode 100644 arch/loongarch/boot/dts/loongson_2k1000.dts create mode 100644 arch/loongarch/boot/dts/loongson_2k2000.dts