Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2915144pxb; Sun, 15 Nov 2020 23:59:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsiqSM+JroaWjR1bR2gm8/WeKlOLhgdXz7QchiUtcW7q5LJ7i5kDyRwl+tNaBDwhDYLoEg X-Received: by 2002:a17:907:420d:: with SMTP id oh21mr13682957ejb.429.1605513598601; Sun, 15 Nov 2020 23:59:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605513598; cv=none; d=google.com; s=arc-20160816; b=EjQKeB0GHZX26DLrNNjZCnySNmFBYd21586ApIqFX8PduIdCbmSVUjNNbRcd59n+Dv lzFsFeWs0os5BJVINaQ8dFuUDzCKYC6ldPEqEftpTqL22XHwd2E0fI/0BJGWSargaOkT OJpaOE/5j28yxVo/dgzP/8n4lpPRDDqWJJNArTYXaJkGANJ9tsqM1KSHhZNBdq7VqAl7 W4oHG5pLWJlkkYfJ//l8ZzfFaaaURLRjorlFGpWw/reQrgV4/1a80LOTsd+NIYju+tAW GbD30VLEibWpNNoc5bh+uyQHeAh7i2xRTApgLe4VZUZnpMjN1D/U6Hgb/2w/KrRXDwH/ NJFA== 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=eTJRflbwf/LPJc3351ngK6/8Jv1RO4BkFQnES28DsfUR2RPZaEkQJy95VEFQOUJk2t ptK4PW8rbVW1d56omvHkQk5VJNfZGpwJ9SyJlJnuMc+2MgyIz7KVJ+i8fxSXnpnpKZLD 7WKDHpx+F7LtiVSesJQLcRHXO/gwaQBOEd0tfjMkPW5DPHXzf8vZGc6dOXmAifWbxuw3 1Veif51E0shWDIP29PPynlVyubKDW/o1lERDfU7WT9HuzZJ6Ysn8ggBf94tArYhBCiXL FfZguToWMy0bd/sQTXT4WU4WVYC5vkyVfcQUIb5woRe/hxpMvGrN5SnwAxh7ngXLH3LG OZQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="vwO/bi8H"; 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 ho36si12447854ejc.640.2020.11.15.23.59.36; Sun, 15 Nov 2020 23:59:58 -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="vwO/bi8H"; 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 S1728047AbgKPHzB (ORCPT + 99 others); Mon, 16 Nov 2020 02:55:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:48802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727895AbgKPHyv (ORCPT ); Mon, 16 Nov 2020 02:54:51 -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 9AE6F222B9; Mon, 16 Nov 2020 07:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605513290; bh=AQ/Sx1u+bYD4zoGriANF0/uI3pWLqX2+CyXLECxBBZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vwO/bi8HxpZmfmGN+1TNtSuJ0TKhs3RpajY7obUPsQc+fyHhgCYQiZiRmakfE/dXl sZLGXowQYfbzG1Df9LaM7jdluA7TKQ2pOLZnB5I1vCKOWztcQPTJ5xbtT5RZGX8rOx IKv+XDU4rAde5JPL7KmlWWrJA/XL+RF+MJGhSseU= Received: by wens.tw (Postfix, from userid 1000) id CC6FF5FD01; Mon, 16 Nov 2020 15:54:47 +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 4/4] arm64: dts: rockchip: rk3399: Add NanoPi M4B Date: Mon, 16 Nov 2020 15:52:15 +0800 Message-Id: <20201116075215.15303-5-wens@kernel.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201116075215.15303-1-wens@kernel.org> References: <20201116075215.15303-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