From patchwork Mon Jul 20 15:30:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11674165 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 679C913B4 for ; Mon, 20 Jul 2020 15:31:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B117A22C9D for ; Mon, 20 Jul 2020 15:31:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VQMV0Lit"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="LujNyF7x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B117A22C9D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=rBr2Omg4HFZwq9Jb579UnN9H+J0x0n7hr7tqQiQM914=; b=VQMV0LitGW8kZFdUrMwa+Ycrsl +5IhWg4iOBoG+ne+emiN3FgWMvJbxNlyLZ+sIjLrDRKT8j6ZDIfxaAdDPDs0WTKpDNtXOwqRGc5nI ZTIZtemN9L6HG14njRi46IfZA/2ddTUzUPYkwKLq8YZYBFMVJMTg0Es51/2owFbAtz7w1lz2jIcJl AYZK12LTKrbwzKNs1kF+o7iiHr6rs/6mZL/fo+CQAsM4aF3lU8Cau9x8l0uFdt42tT8s87jkmWsZA 9cvugsZHE7rAPvY7AIdRc07kVHZvEV8HrNMhS1DvBzK9wdMAgvqh5bJ+KSiKXmU0gzt8Jb/S5737e GJSRMKrA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxXlP-0001Pi-TP; Mon, 20 Jul 2020 15:31:35 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxXlL-0001Oi-JO for linux-rockchip@lists.infradead.org; Mon, 20 Jul 2020 15:31:35 +0000 Received: by mail-pf1-x441.google.com with SMTP id s26so9207759pfm.4 for ; Mon, 20 Jul 2020 08:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jLZnEVP6sKzO7p5NTKCwHlIcD7EJd2Xc+Cehzh/M/2c=; b=LujNyF7xuUA0X3Gt3/kRfy85vOQnVMMz7v7f2BoiroLeSh5zD5KGbhB3/KG8TCKCss hPAI2aU/t4mvGAopQ2Pqou1VG4y1T91tCOq+jJkfCbF/D9yCVwyosdv0xQk0RZEvPvk/ k8qVD3vpTbtAHcx2UG/rurEMZEBPMylNMoiw8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jLZnEVP6sKzO7p5NTKCwHlIcD7EJd2Xc+Cehzh/M/2c=; b=Wd1krha3b5u6cTUtLVaykjieXJGVZVmI5T1INWuK2kwSeqQyblfhxUFWyc8NHdjKaz rMNUXTvgYAXoI2bgcbv8E0h7ZCtdCnS3Sapr6vQ3yirXbKgE+G3tKOmDTubGAasFdTBA B7sjZFGMuW5PXDLp69Z8aQfueEoFzHs6n0RS8BwipPmxbltkepFwda/DHI2xQC2DjEf/ 4tq5waX1WRAltaVsv4oxNVswK6fl9oqc9dLXJ3vvmRF3twAUwOgh1AfYwK3UUd6cpDo8 as8q+IJelJQUReY27WnQvd3PNvlgHv5QO36pdiX6hKWRO2SXQSeAs5YUbS8OeHhvcJo3 /uVw== X-Gm-Message-State: AOAM533jdg/fUKvPMrir0HDTKAhBfk42I1KsEcffINfdVyBiHKVvTD05 7gSAVkyfHkkcFiMCne4nEGJVAQ== X-Google-Smtp-Source: ABdhPJyXkKB54eEOPkQMOa87g8ydd3KsC2l0QcH2yYSHGUmVovI4Yno2mOcGcGKgPF75nVaS30EX7A== X-Received: by 2002:a63:fc01:: with SMTP id j1mr19550150pgi.0.1595259088824; Mon, 20 Jul 2020 08:31:28 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id c14sm1353279pgb.1.2020.07.20.08.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 08:31:27 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Subject: [PATCH 1/2] arm64: dts: rockchip: Add ROCKPi 4A/4B support Date: Mon, 20 Jul 2020 21:00:55 +0530 Message-Id: <20200720153056.530739-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_113131_756340_7F25B37C X-CRM114-Status: GOOD ( 16.04 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki , Suniel Mahesh Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Rock PI 4 has 3 variants of hardware platforms called RockPI 4A, 4B, and 4C. - Rock PI 4A has no Wif/BT. - Rock PI 4B has AP6256 Wifi/BT, PoE. - Rock PI 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enable GPIO pin change compared to 4B, 4C So move common nodes, properties into dtsi file and include on respective variant dts files. Use 4B dts into default rock-pi-4 defconfig until we find any solution for dynamic detection of these variants. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Note: Linux dts changes on mailing-list https://lkml.org/lkml/2020/7/20/443 https://lkml.org/lkml/2020/7/20/444 arch/arm/dts/Makefile | 3 +- ...99-rock-pi-4.dts => rk3399-rock-pi-4.dtsi} | 26 ------------ arch/arm/dts/rk3399-rock-pi-4a.dts | 13 ++++++ arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi | 6 +++ arch/arm/dts/rk3399-rock-pi-4b.dts | 42 +++++++++++++++++++ configs/rock-pi-4-rk3399_defconfig | 4 +- 6 files changed, 65 insertions(+), 29 deletions(-) rename arch/arm/dts/{rk3399-rock-pi-4.dts => rk3399-rock-pi-4.dtsi} (95%) create mode 100644 arch/arm/dts/rk3399-rock-pi-4a.dts create mode 100644 arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-rock-pi-4b.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 82e9b18cb8..bcd89af6a5 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -136,7 +136,8 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ rk3399-puma-haikou.dtb \ rk3399-roc-pc.dtb \ rk3399-roc-pc-mezzanine.dtb \ - rk3399-rock-pi-4.dtb \ + rk3399-rock-pi-4a.dtb \ + rk3399-rock-pi-4b.dtb \ rk3399-rock960.dtb \ rk3399-rockpro64.dtb \ rk3399pro-rock-pi-n10.dtb diff --git a/arch/arm/dts/rk3399-rock-pi-4.dts b/arch/arm/dts/rk3399-rock-pi-4.dtsi similarity index 95% rename from arch/arm/dts/rk3399-rock-pi-4.dts rename to arch/arm/dts/rk3399-rock-pi-4.dtsi index 3923ec01ef..1c55a4645b 100644 --- a/arch/arm/dts/rk3399-rock-pi-4.dts +++ b/arch/arm/dts/rk3399-rock-pi-4.dtsi @@ -11,9 +11,6 @@ #include "rk3399-opp.dtsi" / { - model = "Radxa ROCK Pi 4"; - compatible = "radxa,rockpi4", "rockchip,rk3399"; - chosen { stdout-path = "serial2:1500000n8"; }; @@ -587,17 +584,6 @@ pinctrl-names = "default"; pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; sd-uhs-sdr104; - status = "okay"; - - brcmf: wifi@1 { - compatible = "brcm,bcm4329-fmac"; - reg = <1>; - interrupt-parent = <&gpio0>; - interrupts = ; - interrupt-names = "host-wake"; - pinctrl-names = "default"; - pinctrl-0 = <&wifi_host_wake_l>; - }; }; &sdmmc { @@ -666,18 +652,6 @@ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; - status = "okay"; - - bluetooth { - compatible = "brcm,bcm43438-bt"; - clocks = <&rk808 1>; - clock-names = "ext_clock"; - device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; - host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>; - }; }; &uart2 { diff --git a/arch/arm/dts/rk3399-rock-pi-4a.dts b/arch/arm/dts/rk3399-rock-pi-4a.dts new file mode 100644 index 0000000000..d96dd3ebd3 --- /dev/null +++ b/arch/arm/dts/rk3399-rock-pi-4a.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Akash Gajjar + * Copyright (c) 2019 Pragnesh Patel + */ + +/dts-v1/; +#include "rk3399-rock-pi-4.dtsi" + +/ { + model = "Radxa ROCK Pi 4A"; + compatible = "radxa,rockpi4", "rockchip,rk3399"; +}; diff --git a/arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi b/arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi new file mode 100644 index 0000000000..85ee5770ad --- /dev/null +++ b/arch/arm/dts/rk3399-rock-pi-4b-u-boot.dtsi @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki + */ + +#include "rk3399-rock-pi-4-u-boot.dtsi" diff --git a/arch/arm/dts/rk3399-rock-pi-4b.dts b/arch/arm/dts/rk3399-rock-pi-4b.dts new file mode 100644 index 0000000000..4ca970acac --- /dev/null +++ b/arch/arm/dts/rk3399-rock-pi-4b.dts @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Akash Gajjar + * Copyright (c) 2019 Pragnesh Patel + */ + +/dts-v1/; +#include "rk3399-rock-pi-4.dtsi" + +/ { + model = "Radxa ROCK Pi 4B"; + compatible = "radxa,rockpi4", "rockchip,rk3399"; +}; + +&sdio0 { + status = "okay"; + + brcmf: wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + interrupt-parent = <&gpio0>; + interrupts = ; + interrupt-names = "host-wake"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_host_wake_l>; + }; +}; + +&uart0 { + status = "okay"; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>; + }; +}; diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig index 98f71a50a5..1d34476825 100644 --- a/configs/rock-pi-4-rk3399_defconfig +++ b/configs/rock-pi-4-rk3399_defconfig @@ -9,7 +9,7 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_DEBUG_UART=y # CONFIG_ANDROID_BOOT_IMAGE is not set -CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4.dtb" +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock-pi-4b.dtb" CONFIG_MISC_INIT_R=y CONFIG_DISPLAY_BOARDINFO_LATE=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set @@ -24,7 +24,7 @@ CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y -CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4" +CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock-pi-4b" CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y