From patchwork Fri Aug 4 09:00:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Botka X-Patchwork-Id: 131049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp138343vqb; Fri, 4 Aug 2023 02:33:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/xu2qEM50UcuwNCPu8flaYgxRDtJQaWDGZWG3oHvfJ794/qwbUlobOo3Q12F/FK9wSCL8 X-Received: by 2002:a05:6a20:7f85:b0:13e:427e:ff18 with SMTP id d5-20020a056a207f8500b0013e427eff18mr1504499pzj.62.1691141639201; Fri, 04 Aug 2023 02:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691141639; cv=none; d=google.com; s=arc-20160816; b=sFxiYisD2s4bTVcfrkYLe0WWLxLMTNAKts+jGiNxqjSBotv+YMeYcVDnOYbmhhBXYy XKiZZEm8oFevOuqtTSrPhqi0tlwmd8YTpSzNdX42PwEu69hrbUAFBWgdGN0yRVD2zcYt gv5ngNWX847DkmygfvZKXwQtpxwGGaFMUNC6UX40AqVGaWMQYd8Y0e9QE/4Sm7h+EcRq rIFrAI/BBQFp4R3BZY90OQwnlyMVbSCQLo/iQinwdj5BLIXi3dGnMXPKHTqSvpNrxTXI /bT3plYVjoq96jSAz0bNn2V2+ujcMLW52pjyT6sLzp2qIQGH1mJ/4uwwK5CtFEyC3Dtu 2Ugw== 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=BXFUbvZvZy3aiIGANo/QIT5geUFli3L/HkMpNAYXsLY=; fh=FoE5eKfirOTz+pVu+6KkamnuyxyVCuLGv4cW5wWOYcE=; b=WxRU3K9hJAtUXpQbaHl0/gGO7DSp7F8w9BdkCO0+WGbqwSqsj7H7Qh3JtP9mL/tePH BQEL6MJrtiUETF9O4LCweOQ/z/2nKE9jdkmZgc0feB4UrYybvhlB0264Qw+hUULOIbG/ Qiz2TjNA8+VhI0u41PPi074LSIvDbFBr7AbPng/ZjCyHx2l0G/VuXQR6DPN4voU2RRaU x3VqAogQK2ZwzzgbuNsKKpo/VUmbcqwLuZMzN1Evq0zwFWHndWuX19hDRF6lOmECxxUK f54ES98pgRKQ+5efBwKXq53JiBiqntWRh5Cj0IkHv2v5pnIRLKDttwcLmfB1vaiKrOwl xv3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@biqu3d.com header.s=tfld2305 header.b=JRrP5jXp; 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 n49-20020a056a000d7100b006765f19e46bsi1404089pfv.147.2023.08.04.02.33.44; Fri, 04 Aug 2023 02:33:59 -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=JRrP5jXp; 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 S229837AbjHDJGy (ORCPT + 99 others); Fri, 4 Aug 2023 05:06:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbjHDJGP (ORCPT ); Fri, 4 Aug 2023 05:06:15 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C957055AF for ; Fri, 4 Aug 2023 02:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=biqu3d.com; s=tfld2305; t=1691139809; bh=BXFUbvZvZy3aiIGANo/QIT5geUFli3L/HkMpNAYXsLY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=JRrP5jXpHk/Ue3yWX9UkoNIuAyfibjVCs23sHDBODNHB1qU/xuhsG00a6Y/IfFipY xVcJaT+ScwhowAoFkRuxzH8tyeWDHUPc/Rkj2vDw/axdM67Bxy1TNa/Pp2bEyrEohX UJTcY8nQqrFga0gYdooov9lVByR5uVzSguWx3MYM= X-QQ-mid: bizesmtp65t1691139767tq4i37au Received: from localhost.localdomain ( [178.41.211.221]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 04 Aug 2023 17:02:32 +0800 (CST) X-QQ-SSF: 01400000000000404000000A0000000 X-QQ-FEAT: ed3fCvOSdPtJDkZ/c3tNaOzkym+MgZuZlMJAJbbrgUA1gld8FFB1m+uXrhgAm rb1MFqSWKqyx8Wmna6eUnIakQcpPquRSLI3ulqB6qr2z12nGJW6Dv3TgirjQBGNxsbnVK+v XeQsOHac68ESqqvgZaf1wOV0nLeQAAVeRam38KKLFIXIAfzDE4UjGcwUjMgcqk9aOx8nZGY V/5e38+vz2yDKSzMsQTy0y2Ck8zXy7G3c07hEwVhu5S2EqZ3B1tDvNb0rTTbRk0DBza4StB Z9sHwe3Px02mjNs6/9ORDkUoI1ddO0Toi0D2FGvp0sRHufuQK89da8mlmogDc71lo87w18H J9+d+mkg2Mtiz/aoWZjnT4KDtvjQ1L5FfJHj+6Vr++VMjmTIyEP8c3Y9FVKlOpmEPPouBwk X-QQ-GoodBg: 2 X-BIZMAIL-ID: 226659804070956941 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 , Andrew Lunn , Icenowy Zheng , Ludwig Kormann , 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 v2 4/4] arm64: dts: allwinner: h616: Add BigTreeTech Pi support Date: Fri, 4 Aug 2023 11:00:32 +0200 Message-ID: <92B0AD8F9717BDE3+20230804090102.273029-5-martin@biqu3d.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230804090102.273029-1-martin@biqu3d.com> References: <20230804090102.273029-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: 1773290535935678542 X-GMAIL-MSGID: 1773290535935678542 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 --- Changes in V2: - Add UART alongside aliases and chosen for it - Add model string - Enable IR receiver - Enable SPI0 for ADXL345 connector arch/arm64/boot/dts/allwinner/Makefile | 1 + .../allwinner/sun50i-h616-bigtreetech-pi.dts | 68 +++++++++++++++++++ 2 files changed, 69 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..cbeedf147ab6 --- /dev/null +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-pi.dts @@ -0,0 +1,68 @@ +// 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"; +} + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_ph_pins>; + status = "okay"; +};