From patchwork Wed Oct 4 15:37:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wang X-Patchwork-Id: 14924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp220087vqb; Wed, 4 Oct 2023 08:38:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBaiwmFUnSZIlri4OOI6rQPBTz1eOBU9oRwj0oLE6nR8UiPhP5qe4UQQKHSNWdjw9vMT6A X-Received: by 2002:a05:6a20:8e08:b0:138:836c:5370 with SMTP id y8-20020a056a208e0800b00138836c5370mr3532431pzj.42.1696433895123; Wed, 04 Oct 2023 08:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696433895; cv=none; d=google.com; s=arc-20160816; b=nn20I9TZrdO5V93qf0RldDahB5r1yZKrUfoeSfLVDt9o7NuyCm8lR15AR8xcyysNmV LUpJtWUJCBiUPYiuV1ew0eYU3sVrem9vrMDdoAlI810ON3VmGPIIKbL9JTQIcVJYQXvE em4T6fTtb11JBkCWCOJDMGudqhI/7YU2fksfQNdo5tpkGEXGoJds+ZbZ2xwY5thLu4Oa Da5m7NV0S0dWyMq2Ce5M3KqpnZSIMWe1Rw856WONb58Me5wOHNfLcIFW90KWdRREPwEo 9FehDen4l8PuxLPEQtLhpu8pyQjJI03Ow6uF4LjqF4ya3YtDzTngys/wsoD348wVrO8l r8nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nJqHnUlx2VOSGtYh5XeNz8W9/poCSBylKJ6mcsi9iaI=; fh=KMXUl7ON9f56QcO+HDHFtLwinFBqneHVKFh989UtKzs=; b=ACa+2dutxpdGabCEKTuRdsI10GWnyIS3lhtQSA2gma83NM9++Ke1B7ONTTYIILmWao fi6ZDOu64Ko889chbzvdzmgWP9T4GIJtQZtNtHgubq6Ooz3h5Qlqe5QyfTCggrfDxnqp no+7TU5c8jxDlmcWSdVpRTtYmaJCxKyk5cCvlegNj+SL11lXVsBImFBMuKK0tTaVil9a AZ7bYz1lCPhmP+0rY0UuXkUZC8OdONK2uioZXUKe60Mmn+niGR4AUwwbdCLxGXogkacu ohRJms5xnWvwwcAq4iZ3yTX5mxR50xO/xn8esX03OQCIOSEPP2AZfYDr8Dl9tkFp0cnF ZAxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Dbso4P39; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t32-20020a634460000000b0056a1ed17deasi3843349pgk.675.2023.10.04.08.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:38:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Dbso4P39; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 8010181AB509; Wed, 4 Oct 2023 08:38:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233616AbjJDPiA (ORCPT + 18 others); Wed, 4 Oct 2023 11:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233518AbjJDPh7 (ORCPT ); Wed, 4 Oct 2023 11:37:59 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29602D8; Wed, 4 Oct 2023 08:37:55 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6c646b5028dso1471967a34.3; Wed, 04 Oct 2023 08:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696433874; x=1697038674; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nJqHnUlx2VOSGtYh5XeNz8W9/poCSBylKJ6mcsi9iaI=; b=Dbso4P39VkOv83VscHH2oerun4R8jq9RiQbdIdYhqPdz5a5X93ALav9lPerCppBb8e aIMvZA1JULNC5c68Mkm65mIeMmO/FWHo8CzACxfVYViYV1e7pcRUKcDvd5piwqhijqjD k1YVC4LuCNjCORrmHHLMGqzpkaHbII0qo9T6cJ7QDiP7mrk8ertoXGL+krwpVogkCTrz jvFY9Nj5fMtFwdfy6dJA4+E5+DggmNrZmSmdA9CS11d7kYmRrINZN/upjUWOxOjvGTwA n0+LeqLCI6scj2jtslT+XmoJ01JUkHwPuf8IHUoqA79woiYRqcOd87Ba+AQXfZxCxsnG cxvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696433874; x=1697038674; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nJqHnUlx2VOSGtYh5XeNz8W9/poCSBylKJ6mcsi9iaI=; b=u1Q7YzP4tNjaatKlMr/GXlo45HyDW0CuZoLwwufYWyI5QW7gc7dVXyywNnAv4ACAP0 tS87eDjaT/p9y1rFFleBIr54rmmLjRqFFuTVe0GtVzA5ZsGLsr+obCvfjvWizDDTC1T9 yWueOajbobAzDL8RKiW/JsSlHeNWqGD7O+qwVdQLhDcfWkAHmt/bpBataae0R4AWMGkb 44K7JAPfQF6DVaywxouzgTSfIVlLmxtowL330xAAc3SmS25VF7I1R44CzGwRa/WEZ1v1 Px48EWmPwulY7dpFobum3Y3zhFEg4DrIdpcLrwsAmSqurwAPhxB8QPwy+vcLWchBY8cu uTzg== X-Gm-Message-State: AOJu0YwzfG/Zt39E2wPX1OjcFdQ3UJ0HZlson2MPblwOFNvNLPO7EYlS meeXyK8vx92pBPAGDdQ4c0o= X-Received: by 2002:a9d:6b14:0:b0:6bd:11b:39bf with SMTP id g20-20020a9d6b14000000b006bd011b39bfmr2730083otp.4.1696433874320; Wed, 04 Oct 2023 08:37:54 -0700 (PDT) Received: from localhost.localdomain ([122.8.183.87]) by smtp.gmail.com with ESMTPSA id m2-20020a9d6ac2000000b006b96a4287d4sm490199otq.5.2023.10.04.08.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:37:54 -0700 (PDT) From: Chen Wang To: aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org, devicetree@vger.kernel.org, guoren@kernel.org, jszhang@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org, xiaoguang.xing@sophgo.com, apatel@ventanamicro.com Cc: Chen Wang Subject: [PATCH v4 00/10] Add Milk-V Pioneer RISC-V board support Date: Wed, 4 Oct 2023 23:37:20 +0800 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 08:38:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778839867821403544 X-GMAIL-MSGID: 1778839867821403544 From: Chen Wang Milk-V Pioneer [1] is a developer motherboard based on SOPHON SG2042 [2] in a standard mATX form factor. Add minimal device tree files for the SG2042 SOC and the Milk-V Pioneer board. Now only support basic uart drivers to boot up into a basic console. Thanks, Chen Acked-by: Chen Wang --- Changes in v4: The patch series is based on v6.6-rc1. You can simply review or test the patches at the link [6]. - Update bindings files for sg2042 clint as per intput from reviewers: - rename filename from sophgo,sg2042-clint-mswi/sg2042-clint-mtimer to thead,c900-aclint-mswi/thead,c900-aclint-mtimer. - rename compatible strings accordingly. - Update dts as per input from reviewers: don't use macro for cpus's isa properties; use new compatible strings for mtimer/mswi of clint. - Use only one email-address for SoB. Changes in v3 [v3]: The patch series is based on v6.6-rc1. You can simply review or test the patches at the link [5]. - add new vendor specific compatible strings to identify timer/mswi for sg2042 clint - updated maintainers info. for sophgo devicetree - remove the quirk changes for uart - updated dts, such as: - add "riscv,isa-base"/"riscv,isa-extensions" for cpus - update l2 cache node's name - remove memory and pmu nodes - fixed other issues as per input from reviewers. Changes in v2 [v2]: The patch series is based on v6.6-rc1. You can simply review or test the patches at the link [4]. - Improve format for comment of commitments as per input from last review. - Improve format of DTS as per input from last review. - Remove numa related stuff from DTS. This part is just for optimization, may add it later if really needed. Changes in v1: The patch series is based on v6.6-rc1. Due to it is not sent in thread, I have listed permlinks of the patchset [v1-0/12] ~ [v1-12/12] here for quick reference. You can simply review or test the patches at the link [3]. [1]: https://milkv.io/pioneer [2]: https://en.sophgo.com/product/introduce/sg2042.html [3]: https://github.com/unicornx/linux-riscv/commits/milkv-pioneer-minimal [4]: https://github.com/unicornx/linux-riscv/commits/milkv-pioneer-minimal-v2 [5]: https://github.com/unicornx/linux-riscv/commits/milkv-pioneer-minimal-v3 [6]: https://github.com/unicornx/linux-riscv/commits/milkv-pioneer-minimal-v4 [v1-0/12]:https://lore.kernel.org/linux-riscv/20230915070856.117514-1-wangchen20@iscas.ac.cn/ [v1-1/12]:https://lore.kernel.org/linux-riscv/20230915071005.117575-1-wangchen20@iscas.ac.cn/ [v1-2/12]:https://lore.kernel.org/linux-riscv/20230915071409.117692-1-wangchen20@iscas.ac.cn/ [v1-3/12]:https://lore.kernel.org/linux-riscv/20230915072242.117935-1-wangchen20@iscas.ac.cn/ [v1-4/12]:https://lore.kernel.org/linux-riscv/20230915072333.117991-1-wangchen20@iscas.ac.cn/ [v1-5/12]:https://lore.kernel.org/linux-riscv/20230915072358.118045-1-wangchen20@iscas.ac.cn/ [v1-6/12]:https://lore.kernel.org/linux-riscv/20230915072415.118100-1-wangchen20@iscas.ac.cn/ [v1-7/12]:https://lore.kernel.org/linux-riscv/20230915072431.118154-1-wangchen20@iscas.ac.cn/ [v1-8/12]:https://lore.kernel.org/linux-riscv/20230915072451.118209-1-wangchen20@iscas.ac.cn/ [v1-9/12]:https://lore.kernel.org/linux-riscv/20230915072517.118266-1-wangchen20@iscas.ac.cn/ [v1-10/12]:https://lore.kernel.org/linux-riscv/20230915072558.118325-1-wangchen20@iscas.ac.cn/ [v1-11/12]:https://lore.kernel.org/linux-riscv/20230915072624.118388-1-wangchen20@iscas.ac.cn/ [v1-12/12]:https://lore.kernel.org/linux-riscv/20230915072653.118448-1-wangchen20@iscas.ac.cn/ [v2]:https://lore.kernel.org/linux-riscv/cover.1695189879.git.wangchen20@iscas.ac.cn/ [v3]:https://lore.kernel.org/linux-riscv/cover.1695804418.git.unicornxw@gmail.com/ --- Chen Wang (8): riscv: Add SOPHGO SOC family Kconfig support dt-bindings: vendor-prefixes: add milkv/sophgo dt-bindings: riscv: add sophgo sg2042 bindings dt-bindings: riscv: Add T-HEAD C920 compatibles dt-bindings: interrupt-controller: Add Sophgo SG2042 PLIC riscv: dts: add initial Sophgo SG2042 SoC device tree riscv: dts: sophgo: add Milk-V Pioneer board device tree riscv: defconfig: enable SOPHGO SoC Inochi Amaoto (2): dt-bindings: timer: Add Sophgo sg2042 CLINT timer dt-bindings: interrupt-controller: Add Sophgo sg2042 CLINT mswi .../sifive,plic-1.0.0.yaml | 1 + .../thead,c900-aclint-mswi.yaml | 43 + .../devicetree/bindings/riscv/cpus.yaml | 1 + .../devicetree/bindings/riscv/sophgo.yaml | 28 + .../timer/thead,c900-aclint-mtimer.yaml | 43 + .../devicetree/bindings/vendor-prefixes.yaml | 4 + MAINTAINERS | 7 + arch/riscv/Kconfig.socs | 5 + arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/sophgo/Makefile | 3 + arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi | 2000 +++++++++++++++++ .../boot/dts/sophgo/sg2042-milkv-pioneer.dts | 19 + arch/riscv/boot/dts/sophgo/sg2042.dtsi | 325 +++ arch/riscv/configs/defconfig | 1 + 14 files changed, 2481 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-mswi.yaml create mode 100644 Documentation/devicetree/bindings/riscv/sophgo.yaml create mode 100644 Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml create mode 100644 arch/riscv/boot/dts/sophgo/Makefile create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-cpus.dtsi create mode 100644 arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts create mode 100644 arch/riscv/boot/dts/sophgo/sg2042.dtsi base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d