From patchwork Mon Aug 7 14:53:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Botka X-Patchwork-Id: 132224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1565218vqr; Mon, 7 Aug 2023 09:29:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkBzUD2fxtgTw3pdF1y2khiD5FVS6/oqvOFmE6OtJco3X+K45ksw35B07g280mMxN4LhLh X-Received: by 2002:a05:6a21:9988:b0:10f:52e2:49ec with SMTP id ve8-20020a056a21998800b0010f52e249ecmr10748664pzb.53.1691425746907; Mon, 07 Aug 2023 09:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691425746; cv=none; d=google.com; s=arc-20160816; b=SOqN5qGG9yRzPTMS3DsJg88I9QDVE4u2NP0gNnrwGwOzpce7zRYJW8zOh4iXoXgMzI rhAIXwas1idQ17bq2PoGdk8gp0C2uR2chaLhHL0WNR/28ALTG31dTaepcJRLK04zEk+6 m23hootB44/NBux1bbXmD7VXPzsXslSQcwc2M5JaR2nvBQUwaHLUKADU8qGH4EAhKHkS NsCX8OPr3G1oEHQCYKm9ogcuYzE/VIphnuD/JbyK2Zg0n6v4WJarO5AlML1C4SFiAkVH /lrbu7u7YWrjKO/XOlJY7eM0XUonxVH+Aub+myS70sxRQEa8oWZhaTTWsLEuTn5e3zhy ljvA== 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=zdefhG/PFLyxArKbSW/UaOYL24HZ3WlFssmQfy8avxA=; fh=M+/I5Gr2M+AvLVEHHKrT//+4E16I/fBBRcAy74clGQo=; b=ktYzjQ1KLAoMslZwQBp91D2SbgCSAofH1pu1DWwSt4GweZoVtD35yNGLUuZLqckoP7 x0quFA0yupIBs2BTrOheZ3LUZERtR2OLEPa0ombHXWvaIDeBzNuWn7XEV1y9SePRZ6zF L5MFdR4mSSJSK0W0GUGjvizL/sLNzASaUxxstPZVNWTR1M11BOLN25nsNohdHSfVdoHr 0JHMo5J8JupBxZBY3dUXJnVecdNyLfDxVJJSD8b/49sqnkWCJtvaGXTyT2ZTKPtBlUSO F+P8yKUhFOFEMIkXvDYGenQ3sth7FG/1xRYVEJYDgbo63RWohLd8yvGKnyAKpr/cicR/ UN4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@biqu3d.com header.s=tfld2305 header.b=Xs+ZTvRt; 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 q24-20020a63d618000000b0055c853ecc4dsi5858858pgg.693.2023.08.07.09.28.54; Mon, 07 Aug 2023 09:29:06 -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=Xs+ZTvRt; 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 S230253AbjHGO6U (ORCPT + 99 others); Mon, 7 Aug 2023 10:58:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231600AbjHGO6K (ORCPT ); Mon, 7 Aug 2023 10:58:10 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.65.254]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8989107 for ; Mon, 7 Aug 2023 07:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=biqu3d.com; s=tfld2305; t=1691420276; bh=zdefhG/PFLyxArKbSW/UaOYL24HZ3WlFssmQfy8avxA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Xs+ZTvRtESLuskNuTQUiDTKZ15kWcBXIn7rYzPJ7PNWy3bB3ZvsUoO9TLUYxbj4Zb gehMX6jVx1u4892s96/6kda7Vd7BYjNhzOhiDy1GPmHy26azJFoA1q91GzTP/5fFW4 o1hfmGqV6sNgZNDG3ndMoMN+kLbauc/+s4PgQ6v4= X-QQ-mid: bizesmtp83t1691420175tsc30ojk Received: from localhost.localdomain ( [178.41.211.221]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 07 Aug 2023 22:56:00 +0800 (CST) X-QQ-SSF: 01400000000000803000000A0000000 X-QQ-FEAT: 3M0okmaRx3jZHxKYQ/DeWo6+UfcXXqdJWPtzGFOeVGhgk+tOjxxmIMX5G6RUb m9k4dxRIOcSLP8+NV1WPuw/XkK7wW5DUWf50DrBGhIFllnVqehqg3q+n2iMWf52RqQlnx+X QJvKDFn52FdxS8dce/sI1x0AhZMveSDYPfeJL08PBubcsrE5fDfINVBvo60dYWJEv8rKyKS vy+D/faF17P0ANh93CAiF+isOfLUprjH8H2o1xzA3igqUK6fBHPz51RQGc4e5ijTldZxcSr hJX8pnelLxs9r0fkIsRYB4obHEElMHf38+EPcpAEj6dIeSeO/wMjnk94YF75UBEmApU1hp6 AajoLp/dHM83GnzpQhyV8at4CS6dwMRZlsAgBN+TmIrOE9ggQgRIrfOb7Q5ltaJZvQVYlN4 y+Yn0UjpMOA= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 14459560589698925010 From: Martin Botka To: Martin Botka 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 , Andrew Lunn , Icenowy Zheng , 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 v4 4/4] arm64: dts: allwinner: h616: Add BigTreeTech Pi support Date: Mon, 7 Aug 2023 16:53:24 +0200 Message-ID: <09BFA974F83AB0E8+20230807145349.2220490-5-martin@biqu3d.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230807145349.2220490-1-martin@biqu3d.com> References: <20230807145349.2220490-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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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: INBOX X-GMAIL-THRID: 1773588443567516617 X-GMAIL-MSGID: 1773588443567516617 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"; +};