From patchwork Thu Jan 26 04:57:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 4549 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp98921wrn; Wed, 25 Jan 2023 20:58:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvip0pmeUzYCQTWj5l8FBW+7D4AOmq4hwU3A6bPu4X9t6VWepKORnnPRDPtI98idQ9gHHIz X-Received: by 2002:a17:906:7101:b0:870:4f04:7ad0 with SMTP id x1-20020a170906710100b008704f047ad0mr34145961ejj.45.1674709130976; Wed, 25 Jan 2023 20:58:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674709130; cv=none; d=google.com; s=arc-20160816; b=a1FHjPJYBbrRu851VgyIMI6SVKYrIrImOkWqnZLsDoVhvyP+myoveriwCC431dS3eo u0RJP/SGkQ+8dflA9jl9MCvKekqpOVBEcqyF2Fab/YRI2c092yS4nIN7/Q5cDJW36Uvs ewfD4hDZeUGvI2+KEXwL0nCVS2cF4vfRSkymxpGXrpVrT5AnsAXE8rx8Nfx2ANY+em8i XVZyqqmE+2sD9I1gs14WAMeROVY0kHhmozMRBkawaLh0xtZMXqdCbaMznVDHZNBu1D+x 5f5InLCXTD5FD7WSuSr2yWkdhLtpO0Oco8p4qtIUIC1DEJohPIW7MmH0IaDnNxDWhVP5 JYzA== 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:feedback-id:dkim-signature :dkim-signature; bh=1AV7+tKxCnaIrwhMWoEs1PWFIx0nCKGXy0BDPsy2f4g=; b=lxqTb7ZAFgPop6vrzgGv610fCjjNrCU1MxZsh14NN8bi0bO7MsrBdDl1sFbOYgut3g qfC9UgzSgiftQ3c5rRXBcnsGcnzfFA0G09XUHoXzOawlzT/yOK7zlf/ixICj4nCPHwBf OJxD9KQzMugqA9FodhKR08fqNxnuNIXGzPXGFXIpW1K5dxoHXKbfiRqajWivvOnZ6p6N cl09pX9KVzjhHx4UxIuepjGoruOZ4dmY2mLcfr6X5+RtS8rVNV3C+iKR6bECCzD+5yWj inDRaY6+B2Q2xFq4bJjaQqKGUZDEm8c1YyfoW04bFN0mtAcjgLEW99tQDGF0cgenbjPh dCiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=STDsQzj0; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="Lty/DH7X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a17090651c800b00877e43918cbsi22952ejk.805.2023.01.25.20.58.27; Wed, 25 Jan 2023 20:58:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm1 header.b=STDsQzj0; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="Lty/DH7X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235811AbjAZE56 (ORCPT + 99 others); Wed, 25 Jan 2023 23:57:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbjAZE5n (ORCPT ); Wed, 25 Jan 2023 23:57:43 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A6D354232; Wed, 25 Jan 2023 20:57:41 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8C2295C013C; Wed, 25 Jan 2023 23:57:37 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 25 Jan 2023 23:57:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t=1674709057; x=1674795457; bh=1AV7+tKxCnaIrwhMWoEs1PWFI x0nCKGXy0BDPsy2f4g=; b=STDsQzj0bJLwPDRBXF5j/HZBXl9m0ysK2UojW1RDO 933BtriP9ncRv8j8FI6QQgCHy5GLLD2yOewpxa1GuGemupLyB4swP/MZ1GZzvoeM wTwli04Gz5U4C8RJVm21SbCCJhYmJoojB5FNuPt8fIAfJd3kECF9qjfB4g5kTkIw Ol0KEsb6wOqoa5jbt/5y2yu3f4i4jnbyQzH8VlYA9y0pXVOSRj9n1MxxD8FocUT3 irb5fopLmW16ungbuD95gYY5m/QRk9/G8vkvsUszjNGaW5YjsVWIojblylMbHsyG gUB4zq66HluwQBsw8cOsBeorFlYmidMNsSSNoyllnd1SA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1674709057; x=1674795457; bh=1AV7+tKxCnaIrwhMWoEs1PWFIx0nCKGXy0B DPsy2f4g=; b=Lty/DH7XsXFIzp0XwlA5QmxND0IfHheyoy/UYgyN3gUc0f2/JZF DFvOFj3CUQa6dHJHD4jXxINMp+Gc/0bWc3jkdo1H85NKmOtmvyh8AoFw6JD/UCS8 UtjBq7JtuCYrpQIba5Tym7P1XrGf9LNAVgfn5oK8jwtjAsySFPsS7/gvP6AwE8e1 kgv9kZg8ic8m2sp/qUj6pRKxMCF7S1dj3zsjI75YtGfC+J2tIVNDxaX1Jul6osI1 LH/NqSykBJ7snICPknb/Pc4ivL52fp7c6VXrjlaWzCe20dRqfW+DxArRlS7l8av2 r4esibNKmbL4az4qD+qTqLhv0wfqmp6hriQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepkeevlefhjeeuleeltedvjedvfeefteegleehueejffehgffffeekhefh hfekkeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jan 2023 23:57:36 -0500 (EST) From: Samuel Holland To: Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev Cc: linux-riscv@lists.infradead.org, Heiko Stuebner , Palmer Dabbelt , Conor Dooley , Jisheng Zhang , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Przywara , Rob Herring , linux-arm-kernel@lists.infradead.org, Samuel Holland Subject: [PATCH v5 00/11] riscv: Allwinner D1/D1s platform support Date: Wed, 25 Jan 2023 22:57:27 -0600 Message-Id: <20230126045738.47903-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756059802020174560?= X-GMAIL-MSGID: =?utf-8?q?1756059802020174560?= This series adds the Kconfig/defconfig plumbing and devicetrees for a range of Allwinner D1 and D1s-based boards. Many features are already enabled, including USB, Ethernet, and WiFi. This version drops all boards/nodes with missing YAML bindings, so at least some support can get merged for v6.3. $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-musl- dtbs_check LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-dongshan-nezha-stu.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dtb DTC_CHK arch/riscv/boot/dts/allwinner/sun20i-d1s-mangopi-mq.dtb $ Note that validation requires dt-schema v2022.12 or newer. I thoroughly tested earlier versions of this series (DMIC, Ethernet, LEDs, MMC, PMIC, touch, and USB, where available) on several boards. v4/v5 have trivial changes, and I boot-tested them on sun20i-d1-nezha. Changes in v5: - Drop system LDOs because the binding is still not merged - Drop the configuration for LDOA and LDOB - Drop the ClockworkPi and DevTerm DTS, since it needs the system LDOs Changes in v4: - Rebase on v6.2-rc1 + soc2arch-immutable - Drop the now-redundant 'select SIFIVE_PLIC' Changes in v3: - Drop dummy DCXO clock-frequency property - Decrease the PLIC's riscv,ndev property to 175 - Fix `make W=1 dtbs` warnings (unnecessary #address/#size-cells) - Drop mmc aliases - Change LED_FUNCTION_BACKLIGHT to LED_FUNCTION_STATUS (the backlight regulator is disconnected by default, so this is a standalone LED) - Fix `make W=1 dtbs` warnings (missing reg properties) - ARCH_SUNXI depends on MMU && !XIP_KERNEL Changes in v2: - Add MangoPi MQ (non-Pro) board - Split into separate files for sharing with D1s/R528/T113 - Use SOC_PERIPHERAL_IRQ macro for interrupts - Rename osc24M to dcxo and move the frequency to the board DTs - Drop analog LDOs due to the missing binding - Correct tcon_top DSI clock reference - Add DMIC, DSI controller, and DPHY (bindings are in linux-next) - Add CPU OPP table - Common regulators moved to MangoPi MQ patch, removed analog LDOs - Removed LRADC (depends on analog LDOs) - Added XR829 host-wake interrupt - Added DMIC sound card to Lichee RV dock and Lichee RV 86 Panel - Removed LRADC (depends on analog LDOs) - Added LED (GPIO shared between onboard LED and backlight regulator) - Sort Kconfig as if we had done s/SOC_/ARCH_/ for future-proofing Samuel Holland (11): MAINTAINERS: Match the sun20i family of Allwinner SoCs dt-bindings: vendor-prefixes: Add Allwinner D1/D1s board vendors dt-bindings: riscv: Add Allwinner D1/D1s board compatibles riscv: dts: allwinner: Add the D1/D1s SoC devicetree riscv: dts: allwinner: Add MangoPi MQ devicetree riscv: dts: allwinner: Add Allwinner D1 Nezha devicetree riscv: dts: allwinner: Add Sipeed Lichee RV devicetrees riscv: dts: allwinner: Add MangoPi MQ Pro devicetree riscv: dts: allwinner: Add Dongshan Nezha STU devicetree riscv: Add the Allwinner SoC family Kconfig option riscv: defconfig: Enable the Allwinner D1 platform and drivers .../devicetree/bindings/riscv/sunxi.yaml | 69 ++ .../devicetree/bindings/vendor-prefixes.yaml | 4 + MAINTAINERS | 2 +- arch/riscv/Kconfig.socs | 9 + arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/allwinner/Makefile | 9 + .../allwinner/sun20i-common-regulators.dtsi | 28 + .../sun20i-d1-dongshan-nezha-stu.dts | 117 +++ .../sun20i-d1-lichee-rv-86-panel-480p.dts | 29 + .../sun20i-d1-lichee-rv-86-panel-720p.dts | 10 + .../sun20i-d1-lichee-rv-86-panel.dtsi | 119 +++ .../allwinner/sun20i-d1-lichee-rv-dock.dts | 97 ++ .../dts/allwinner/sun20i-d1-lichee-rv.dts | 87 ++ .../allwinner/sun20i-d1-mangopi-mq-pro.dts | 142 +++ .../boot/dts/allwinner/sun20i-d1-nezha.dts | 166 ++++ arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi | 66 ++ .../dts/allwinner/sun20i-d1s-mangopi-mq.dts | 128 +++ arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi | 76 ++ .../boot/dts/allwinner/sunxi-d1-t113.dtsi | 15 + .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 826 ++++++++++++++++++ arch/riscv/configs/defconfig | 22 +- 21 files changed, 2020 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/riscv/sunxi.yaml create mode 100644 arch/riscv/boot/dts/allwinner/Makefile create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-common-regulators.dtsi create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-dongshan-nezha-stu.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel-480p.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel-720p.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-86-panel.dtsi create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv-dock.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-lichee-rv.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-mangopi-mq-pro.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1-nezha.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1.dtsi create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1s-mangopi-mq.dts create mode 100644 arch/riscv/boot/dts/allwinner/sun20i-d1s.dtsi create mode 100644 arch/riscv/boot/dts/allwinner/sunxi-d1-t113.dtsi create mode 100644 arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi Acked-by: Conor Dooley