From patchwork Sat Aug 5 08:36:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Botka X-Patchwork-Id: 131483 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp457993vqr; Sat, 5 Aug 2023 06:30:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwhLvjHiSnOp6YdSDzs7Xmb0BAstgs+F+IR7rgfnnuf2r8+Yfhpc69PPBlxB6U5T4Hk4Y7 X-Received: by 2002:a17:906:1099:b0:99c:9e69:6a1c with SMTP id u25-20020a170906109900b0099c9e696a1cmr3904594eju.67.1691242256337; Sat, 05 Aug 2023 06:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691242256; cv=none; d=google.com; s=arc-20160816; b=hB+X0Zk5ISybMkUH6mZwyAA7ncUbi5w5GvQbnpop1ekq3lkwyVKtttgRBUu5y5NCQ1 c9JglGvCh65mm3waWzC7owpu3Wan9mZoKYY9uE/hVJ9FYuHffff55XUkPIEyUfx0wXkt XA7UVhwxcpzBLk+fVlEA58o8GMxWvvTG9mahdaX4qk0I4rlvLwE8pqTkixI8uO9nFPlD MthGes3ygGXtM6LiuTZq07B7lNVPeuSfGzvFXJHptSW0WZxlbVSWUb/RAtUI3ic8opSN +1gj1U0XL+ML2mHdDc1J+VPlMHd7X0zFcM9Mof1va6DnnnOX7A6I2mwNR8y0tXVQ1n0r 90jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vEKjizOztuDqy9KmC2c7ykzZ5vlzp6rvrwPfNSHRDN0=; fh=GtCKdzeI+THSXW5+4U5o2O9WQHjrcZGme9fXj9k9tmI=; b=iYKLQXhra+XkGiwjxmOueDBsk52D8qlvce8uWwYrlYAtyKgPC+umVkMcTeX6q1Jg1Y QRERzsw3dY2MjrTja/xcvPha9SHKXcq3DEgBd/bKpGq10s/+u9FXVA1BORdIWvueTyvm DqXXLNB+kPPnCKogqK+V0pEYWNl1PrXChZNhl58yiUUbEPW6ooye8Sp4T/h3+UgSWasd ABgbEXdYbHLfRuqK0TiNeLIAnUdSte0ZOisPz9wg4ZDeVF6u0wleaQO8CEd+ROeA2ErW sMmYd1YNGQJzEfyQqNGPvDPfzyNk5azz39GVlBPFqwL8z9DVQ9dpSbEQAGrtgvFAcCxh NP4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@biqu3d.com header.s=tfld2305 header.b=luzzkOD9; 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=biqu3d.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a1709066d0700b00977cb7af75asi2123083ejr.719.2023.08.05.06.30.30; Sat, 05 Aug 2023 06:30:55 -0700 (PDT) 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=@biqu3d.com header.s=tfld2305 header.b=luzzkOD9; 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=biqu3d.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbjHEIjp (ORCPT + 99 others); Sat, 5 Aug 2023 04:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbjHEIjj (ORCPT ); Sat, 5 Aug 2023 04:39:39 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2F2349F4 for ; Sat, 5 Aug 2023 01:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=biqu3d.com; s=tfld2305; t=1691224761; bh=vEKjizOztuDqy9KmC2c7ykzZ5vlzp6rvrwPfNSHRDN0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=luzzkOD9PCNnmq/3WzzeWXWmUUyLBKEL9mbCR4sCDf7GSBFewMgWVyql1lm4KLhni /Zixr4kuqMZ/FBLVVnoDrvjacNr7v/+FYVuA6UoFSYV7pf88ws1HiPWDyG7kpIV6DQ Rw4hsxwEZ0Apt7VsGaUfj6scHu6RgK9jlJ6qMZzU= X-QQ-mid: bizesmtp83t1691224702t71mm2ha Received: from localhost.localdomain ( [178.41.211.221]) by bizesmtp.qq.com (ESMTP) with id ; Sat, 05 Aug 2023 16:38:08 +0800 (CST) X-QQ-SSF: 01400000000000505000000A0000000 X-QQ-FEAT: 1aHTM9ylpVzwFs/GMn1DOEf1VJBKSJIxCwOFsZ9Y00L5UuchrD3isPwzzPlN+ 3Wo9Qi1UuuRj797v532ipG9iSNY5LPW5BPomnvxicYQSGGuQb+49QuGuSutMzIT7Ii2phhb dfMb+JCYTs773uVR3/n7OKDQIck34EXPeln1VjATTPQtL4hMHzN81CLRn/iuW0StaqOQ1m2 gfuDkb+/iU6f/yD8pIpXAfinPp9VBuO8VRYwE0ZGr+rZ0qkY+p/CrfVHDmLpgDO038PckP8 8v/LSkOE4RMqprCy5FMtp3fndoZpDxpf98Qg08KnN9Gr/ARyKtfEvmFcdKLPSRq5TgIz98R wz+LMzNMn1TbzYt+N6dtJw4eDxgiHNq4V2V7LJ2xF3acK/jwtmUmzd6uBR4u3kWN0jxIBTX X-QQ-GoodBg: 2 X-BIZMAIL-ID: 9226605885258819759 From: Martin Botka To: martin.botka1@gmail.com Cc: Konrad Dybcio , AngeloGioacchino Del Regno , Marijn Suijten , Jami Kettunen , Paul Bouchara , Martin Botka , Andre Przywara , Martin Botka , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Ludwig Kormann , Icenowy Zheng , Andrew Lunn , Heiko Stuebner , Shawn Guo , Bjorn Andersson , Chris Morgan , Jagan Teki , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/4] arm64: dts: allwinner: h616: Add BigTreeTech Pi support Date: Sat, 5 Aug 2023 10:36:07 +0200 Message-ID: <8022803C8A2B3898+20230805083636.788048-5-martin@biqu3d.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230805083636.788048-1-martin@biqu3d.com> References: <20230805083636.788048-1-martin@biqu3d.com> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:biqu3d.com:qybglogicsvrgz:qybglogicsvrgz5a-1 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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: INBOX X-GMAIL-THRID: 1773396039839503152 X-GMAIL-MSGID: 1773396039839503152 The BigTreeTech Pi is an H616 based board based on CB1. Just in Rpi format board. It features the same internals as BTT CB1 but adds: - Fan port - IR receiver - ADXL345 Accelerometer connector via SPI - 24V DC power supply via terminal plugs - USB to CAN module connector (The actual USB to CAN happens on the external module) List of currently working things is same as BTT CB1 but also: - IR receiver - ADXL345 connector Signed-off-by: Martin Botka Reviewed-by: Andre Przywara --- Changes in V2: - Add UART alongside aliases and chosen for it - Add model string - Enable IR receiver - Enable SPI0 for ADXL345 connector Changes in V3: - Add missing semicolons - Add pinctrl for SPI0 arch/arm64/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun50i-h616-bigtreetech-pi.dts | 70 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-pi.dts diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile index 7b386428510b..0b6232a7f328 100644 --- a/arch/arm64/boot/dts/allwinner/Makefile +++ b/arch/arm64/boot/dts/allwinner/Makefile @@ -39,5 +39,6 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-pi.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-pi.dts new file mode 100644 index 000000000000..b0d0386e8f13 --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-pi.dts @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +/* + * Copyright (C) 2023 Martin Botka . + */ + +/dts-v1/; + +#include "sun50i-h616-bigtreetech-cb1.dtsi" + +/ { + model = "BigTreeTech Pi"; + compatible = "bigtreetech,pi", "allwinner,sun50i-h616"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&ehci0 { + status = "okay"; +}; + +&ehci1 { + status = "okay"; +}; + +&ehci2 { + status = "okay"; +}; + +&ehci3 { + status = "okay"; +}; + +&ir { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; + +&ohci1 { + status = "okay"; +}; + +&ohci2 { + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&spi0 { + /* SPI connection for onboard connector for ADXL345 accelerometer */ + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ph_pins>; + status = "okay"; +};