Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp123832pxb; Tue, 17 Nov 2020 23:21:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyc0VZfJFHqQ5vcGWrdkqTavbvQnOP0u911jDGNWNTQ+aZowIYITah7+a7c/LvDxxBOIntw X-Received: by 2002:a17:906:9459:: with SMTP id z25mr23369132ejx.88.1605684087695; Tue, 17 Nov 2020 23:21:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605684087; cv=none; d=google.com; s=arc-20160816; b=XenRC2EF5KWamwMrPJB+2pZRmZzN7g5AMOnYqO5vtP6k9HZ7RgbxK9A6p9SWOf/7fN xeh8meN+0Kb1+149+WNlhzPQhvFAmFQHjvqiOh3Ahv3VzW03f+9+Xebe8lQ+P2SfddlT oGybl2WGyzapmATzCkKOAQHM2dCZusZYcDz5gfWTMXnDW1WgZFCXE10UP2wZmSav+I6Q E2i0LQF3LIdDJGN22bCoIonGRwXaIWGevbkDtRBmZj2fyZs3p3h74k6O0k40ArBmVqSr 6UT9oNv4Dea0//bQn/ERSxn/FGBHswZGH8c2QXeuyv6PxrVfYJBqTlpMsfFeuqqEtcGP 5lLg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=L2XhMHY5CEBI3M4A1plXHpsTMUH4CBLHPVHk7Vb6Vsc=; b=P1Utgha8R0c6f6F9lJhxh+7CMjy2jDNuzicNtT+bxCiingm2+2Rx1ep/dcO1xX29+Y 9RPKL5LDDEID0eudNLiYHdipNpPDh1SEZVesxfTqLjJ4dO3/MVRQpvpnd8F1G3A/7l/q C8CU+iaTBeil222aLBUiQKdWuqRTTyctWRfbBMwuGySLwASJJub0WoRTDzFRADPr/+Oe dm59LZvcFut/HEkKFvs4h49Nb7rcIUoODMvrAwpuLAqOV3xN47tn1effhCo6pZ/ysbbr aJlx3813SOmGC1XJVG17ZvXyPsB0giZU4tLKEY1qOyhN/uIh4VBV49c3zS3qVsdx+Nsg /IzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kl0OBN5c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si864273ejs.704.2020.11.17.23.21.05; Tue, 17 Nov 2020 23:21:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kl0OBN5c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbgKRHRh (ORCPT + 99 others); Wed, 18 Nov 2020 02:17:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:54528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbgKRHRf (ORCPT ); Wed, 18 Nov 2020 02:17:35 -0500 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 473CF2467A; Wed, 18 Nov 2020 07:17:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605683854; bh=AQ/Sx1u+bYD4zoGriANF0/uI3pWLqX2+CyXLECxBBZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kl0OBN5c7oqPQZtM5/3Y8jkB2MPA6nc0A6hfq6bRrXp342xtQ+lYfotLa7gUu3ZXZ HHdqly/VpzlbJnRQDshj7AqjXy07krYR4xCD4LS6wIGu5f3329+AtIdpvNOfIwMwcr xORywiOSYczE3Yh/f9XTuI1YxDi5GsgYSHvX9ObI= Received: by wens.tw (Postfix, from userid 1000) id 9F9715FF27; Wed, 18 Nov 2020 15:17:31 +0800 (CST) From: Chen-Yu Tsai To: Shawn Lin , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Heiko Stuebner Cc: Chen-Yu Tsai , Robin Murphy , Johan Jonker , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 4/4] arm64: dts: rockchip: rk3399: Add NanoPi M4B Date: Wed, 18 Nov 2020 15:17:24 +0800 Message-Id: <20201118071724.4866-5-wens@kernel.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201118071724.4866-1-wens@kernel.org> References: <20201118071724.4866-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai The NanoPi M4B is a minor revision of the original M4. The differences against the original Nanopi M4 that are common with the other M4V2 revision include: - microphone header removed - power button added - recovery button added Additional changes specific to the M4B: - USB 3.0 hub removed; board now has 2x USB 3.0 type-A ports and 2x USB 2.0 ports - ADB toggle switch added; this changes the top USB 3.0 host port to a peripheral port - Type-C port no longer supports data or PD - WiFi/Bluetooth combo chip switched to AP6256, which supports BT 5.0 but only 1T1R (down from 2T2R) for WiFi Add a new dts file for the new board revision that shows the difference against the original. Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3399-nanopi-m4b.dts | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4b.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 5a53979b7057..fd47414e40eb 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -32,6 +32,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-kobol-helios64.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-leez-p710.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4b.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4b.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4b.dts new file mode 100644 index 000000000000..72182c58cc46 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4b.dts @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * FriendlyElec NanoPi M4B board device tree source + * + * Copyright (c) 2020 Chen-Yu Tsai + */ + +/dts-v1/; +#include "rk3399-nanopi-m4.dts" + +/ { + model = "FriendlyElec NanoPi M4B"; + compatible = "friendlyarm,nanopi-m4b", "rockchip,rk3399"; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1500000>; + poll-interval = <100>; + + recovery { + label = "Recovery"; + linux,code = ; + press-threshold-microvolt = <18000>; + }; + }; +}; + +/* No USB type-C PD power manager */ +/delete-node/ &fusb0; + +&i2c4 { + status = "disabled"; +}; + +&u2phy0_host { + phy-supply = <&vcc5v0_usb2>; +}; + +&u2phy0_otg { + phy-supply = <&vbus_typec>; +}; + +&u2phy1_otg { + phy-supply = <&vcc5v0_usb1>; +}; + +&vbus_typec { + enable-active-high; + gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; +}; -- 2.29.1