From patchwork Mon Jul 20 18:55:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1535 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3045C3F03F for ; Mon, 20 Jul 2020 20:56:17 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id a25sf13321413pfl.2 for ; Mon, 20 Jul 2020 11:56:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595271376; cv=pass; d=google.com; s=arc-20160816; b=Qe1cyb/BklAZUFd3bGBm79DwDdUSsyoDj0qatfCAAcA4WPJ6aExD9+7mBjiIVih3bc aGw8j9Tjxlp4o7wND+1NocqKVNURmTUpsBVyjsFQUlGhA3CWaBhGTQeHvdmT9+oxUQyT H0uFzoFvTNxMRU67/g9CRMP4lMzDgTFiMx60v0cixLyKBezx1EU3iJ3WNwfUnJ08bGTt 7PNgbQbO8/4uyu8S9xreBIct2MSzqUYxPWAjxMkTJUl3VMaBdgq7yh/v5STcLt23qdkz gUO/aPGUhdsXlatvPJK+F207OeBfX3Ve8a4NP+Sdps9UMiAvbF0XB9iq2BZXm7yONP9r ecow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=hjBsiI8b5taLCSabScVJZtXzlpP80C8tGTmxO0l7fcw=; b=JDiRFNu2LIunjbAzqojQzSDn1HwUGQWeewGPEtA0D9v93mYzn5Xl0m2auDhsobsccv Af0mTf4Y5mFkQFhVQzhNxafU95GJ2SsGxHJGBQM1+V4M88CgSFzzxykJDhbJT5mmDRS+ mkj+v5+mqujDcW7F0beEhYz3LSu8TeM7OWuJRU7Ftnj6KCM9fq6XYUKjRqFpW6fF+SeE 6mTufwS3jJ/B/rWGkM8VuPnCM2ctw/4k12+ELYC+YdQ1SHfuLw2vEyFdq9kFwXeIkebo pAzJ7mDl83Mu+7rm2y7RUAVFV4V3NaR2+hErPwzYHy5/WS0UjO7/QxnpRsO9w+y2AZZJ dutg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oRPmZ92L; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=hjBsiI8b5taLCSabScVJZtXzlpP80C8tGTmxO0l7fcw=; b=QV1VsmFclDwsZP8cg7141ihdQdQRFPlrZSQz9Ptct0l8s7mDIzC5Lm2OOBNIQUw1vo O+Zc/iraTZ3irt2VH6dCVonxOcmnoDBzCT7jifm4ymGkWRPZNyXDfSg/es+EhifY4iCV eLXpcD1ZZxz8kFUNEJ/Iud6HPauOIezZVVvs8= 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=hjBsiI8b5taLCSabScVJZtXzlpP80C8tGTmxO0l7fcw=; b=VDduN5j92Asvr7EysiwUksfrWggoDI9y1Wj0vKGULlwX6Y+m+PkIDM9xaJaxxjN4FJ DoBvxJ+13B2VbTl0OEvjijtYV6RPLEyxWpXl4HvuYbn627H2arqHjwIEzKNQLJbo3JqB MOtuMd2kwi+luyYNpRo3LuuMRap22GkyVVGkP3vQBCQhcx2ZveV7ab+qxaVGc9C8SygO vUFoHqRMVcyfZZAc+5WFHuSVAIDBj322ftrp1UbXqrClVySATf2YWPT6MqlII0B8TshH vXQzJbPvxpS2jvyHBEfrMQ1qnQNi+wj5UON/FMxdHhzifDGw9MDPq5kLDssdoW7p/TSH RyYA== X-Gm-Message-State: AOAM53052SAvHzMvZSnJ5a2zyoJL7YiKVMWHL5AnxKPOGswZybhluRL9 FBPyNihaBjuIUguG6sbXoAjzrYac X-Google-Smtp-Source: ABdhPJzPzMlpdO83mK7kZbepKtunqpjXtK7I4M6uKm6gSZkvUWK0jiD1gihXF9oNon676c+Db0gNMw== X-Received: by 2002:a63:5d1:: with SMTP id 200mr20204517pgf.59.1595271375831; Mon, 20 Jul 2020 11:56:15 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a65:6891:: with SMTP id e17ls2102216pgt.3.gmail; Mon, 20 Jul 2020 11:56:15 -0700 (PDT) X-Received: by 2002:a63:5806:: with SMTP id m6mr19778192pgb.362.1595271375420; Mon, 20 Jul 2020 11:56:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595271375; cv=none; d=google.com; s=arc-20160816; b=sL0qoyYFIasC/+Aw0Ij41eEyR8JZFEV4a/mH3C1qd3Ra1AtSSEPfCC7L/daT2SN8hz g1bKKJf4CFc8wYKuO9J7HODBsRH0RNjn3DyCrMwv0NGaXwQwInNBzsFWZ0Kpq09kk9TG cutmsUH6zYQbM7LLikUae2zlI20GDuWazhuAwMszrzcsr8MQT9oLCShtL0cU9s6ElnbC 7M+MgLThJboCvVZNthydUG1Zmd2I3uKtcHwdthFU9F2qjZxqAja8gu7p/O18ww9ylM1J VWqyPX2yn5EN1gSLTrDgif3BhwYM+SsGMbrJRR/RePyxnv+t4YkJ8xsSzN5JxjYU8S5n sDWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Vf6AGLB95WNFyq1kuujotm85CpWfHSpAr2DRU+d3NIA=; b=FVxs9my1lIVRfmxfdTlpfYHHZN3xbwcu2+q+CzJmz/tJq6m8xKTafKh/+LWMMfkuZx tVI/u6Sspb3nu4QH6pmvoUh0ok6xtoctk8OhDNF8nwqoHz2YXXiv8RzZjEKsj2OOK7qH jFfAQvkSMqamm0x2xrGNBX5B4zEcatbdCZ5/xGjlJ4dJZG+mkNPG8+/PlvtoZyeOHjJi M6KFVnF0CbhNZMoNU8uvQdtflahOzE5jqasK/rA2yXjoyo9FO7wkTeIweoKRRzKCMFHy muj67V/tUL7HF/wzzI1ThCgTbexZHwDSDYgULN+9O6An6i56zhX5BioQ86PiG7g6udjG 22CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oRPmZ92L; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w14sor21682864pfu.31.2020.07.20.11.56.15 for (Google Transport Security); Mon, 20 Jul 2020 11:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a05:6a00:f:: with SMTP id h15mr20713877pfk.193.1595271374977; Mon, 20 Jul 2020 11:56:14 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id l9sm330318pjy.2.2020.07.20.11.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 11:56:14 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH v2 1/2] arm64: dts: rockchip: Add ROCKPi 4A/4B support Date: Tue, 21 Jul 2020 00:25:48 +0530 Message-Id: <20200720185549.671360-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oRPmZ92L; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- Changes for v2: - none 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 From patchwork Mon Jul 20 18:55:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1536 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5ED9B3F03F for ; Mon, 20 Jul 2020 20:56:28 +0200 (CEST) Received: by mail-pj1-f72.google.com with SMTP id w23sf370618pjy.7 for ; Mon, 20 Jul 2020 11:56:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595271387; cv=pass; d=google.com; s=arc-20160816; b=DQQ7Q68bth4qkZkn7W2NyL9ZvIUrFV6XZqzV/ZXF5tX3RKdbHlx8mGs4RM/5VM9Ywf sLrobwbHPYL2wc2EZ1NnxmLtFbdTAqlSfoAsFc/PvGitP66lnaoLxicN3yDHqE9qgFWf CjlqzkYQHfkixFRW+0FcrHfWxCNpIlXljLRL7BHJC5nWPgCr7cyXvgxWaCFzs8ep4qJ4 CeriLCZMUuOWBD6zBjAgdvVWjBpirFNu+XH9z4sOZteQ2aa6i4Dp4geR/zCMkq113qV5 zWb3eDr/6uu/jEwggjn/5XMsSBPzbnZQk9M430vCcWD+VDJ7Hg6UTkZet8AGHoyOmYIu U97A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=7kEweegTLwjy72qVF/nDBkSibNl1XW/EbB7FcUQ99YA=; b=mLYpF96dO6sW2UVu3WYHl4yfsjhEb5JXtxUqRpghDaq0w8cYeLF3EaTil3Pi60ucpU D6mCQvchpim4X9luMwdkM4cCwwU4MOcV1HTiNu8D8HqMML3Z0xh+fsWGSdGd+CC4Es3v 0iuLMikEDK7+Q4LcEgQnSg0bxP+IYpBNdgqoN86DE58jXZKJC0+bDTLBIHL5cb0uxLpZ To/9uyTuY+HQDnSQDqcvwS5tkKwqCDPYlQ50G7EKvD6JhdQ3sp+MCLiaFn2k7Ig2UJkV BJFWWRwnsbyScCRrtpl1Se9g4pf8Sw4/F+XueARcmbSnod6AEOX6pRuu8udK/nc9HACk F8RA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="OJH/5//a"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=7kEweegTLwjy72qVF/nDBkSibNl1XW/EbB7FcUQ99YA=; b=Te06jh+6YwK3cJQUWpS1PdvN5rAr8DgcUJDl7BlVLnbjA2mmKKHmxupUFbGiyR8rvM zvTFLE13BiH1ThOI5zVF+Z8FadQxKOqc+JApRpnSgT5+GVmVCnHg7+sydCiqy1DZxNOf +fkMztq9BxX1i2nvrKOoMPQtyCbhKdk+UAlRI= 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:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=7kEweegTLwjy72qVF/nDBkSibNl1XW/EbB7FcUQ99YA=; b=ffADw92S+svuM6wKBBgF88FDfV2MGJ9dty+R/IGzLQKMGqOZklNZ4VUlwNj2/CHMuX 7yD3Bzfz9HAltOGAs4kJRMTPPKxPiJQ0/pzdz1AMjekcry3NwXNlHu90fcsRarJgcqtj 6woWqRdUIPp4eSrQM3aFvoBWlTN1sRZXlCUzaZjp32A1xAuFOTBhZ6StvPJsyTnm6T9J 7ZQ1btXYLhZKlybKcT1LEgeYOIZvDlibZJS7iJliXJV2u7UL3ek5mkKhI+NlUtMnoJtf lfBjtM9fbcZ0rVmDaEtvi4zOyvKhFIjIX6TB8l388OeBq4G6uSYiocKYKHUDZdIVRf4F H+xA== X-Gm-Message-State: AOAM532cpxUZ3LN6GrGK0O8n4D2FCSDbE3ZZrvoA+H1bMyHQf10YAF3T 4FveBnmC/CGjclJrZZMTOzxA/ek2 X-Google-Smtp-Source: ABdhPJwluP1Gdo66Un6W6UBFIRBeVdq4oyjZ7RrKzgVkPJSgb5lMiezGtrmTvQgTZTkMYneENuQyog== X-Received: by 2002:a63:5d1:: with SMTP id 200mr20204954pgf.59.1595271387085; Mon, 20 Jul 2020 11:56:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:ea0e:: with SMTP id w14ls135436pjy.3.canary-gmail; Mon, 20 Jul 2020 11:56:26 -0700 (PDT) X-Received: by 2002:a17:90b:4d0f:: with SMTP id mw15mr825251pjb.68.1595271386555; Mon, 20 Jul 2020 11:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595271386; cv=none; d=google.com; s=arc-20160816; b=RynZZEN1vt8J71gilXWb95D30amrbCwllUypGAWS/ILxPHhObjYk1paQAnfS+FTmg+ PCFov6nFRrdy92CIO2wMSJ9O2qo7XKnbaToJYnrHdXAL4JUtjn4H2NfFxVqadLsKxLqz whQRv4MUEfEzuGPppRc6V8aPSp2L39xMPbILXsrBJvfzJ4zBPiV0wLefxjK3wDNUu3E8 IpTlao89jPwWdsnSl1sntiqaGCzdWZcZrXucODR8O+F1wWV/NOaLYMf7JJ3fXEuA6I9x J3LvLSYJoLzLvqkL3tQqOil20PHkS6D0oK/0hXVELdEE2DGaA4QT6M0bCgkvR4vvaPuT UqhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cNx+HKsUxwJBDdIwR//b6CzEuE0Uu6THpawXitAGPZI=; b=JJSuQaNikN18n+NRwwJdV82vTHNnnftnaGFqG8VN/upd2qudzjrqn4d+C10ciSrNuI lgLxjZm/GRhMNGc7K0RQ3MJPXLG31qllRD6j4J0S9kbXPPKngPw4wMi6KzJpCL7iUA8m W0yKMnK2nLmiHv1vQR2E5ypRtACeQlHnr3bEFarCsGq9pEx9WdHuMp9O3rda2d4N5SXl BFRNRp2TPv0VHiZ4KdyMCIMzml7RSDCswZeazO/pelkCO4GU2phoMI4eXrSTjfrFBouL RmN+cieUyjXzzl2BEofydLV/XAorA0GRYDv7lyTK6Fxpsmmc02W3HSrZ5jw70vllrna0 DcIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="OJH/5//a"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a8sor567226pjs.16.2020.07.20.11.56.26 for (Google Transport Security); Mon, 20 Jul 2020 11:56:26 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:90a:e511:: with SMTP id t17mr827365pjy.87.1595271386139; Mon, 20 Jul 2020 11:56:26 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id l9sm330318pjy.2.2020.07.20.11.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 11:56:25 -0700 (PDT) From: Jagan Teki To: Kever Yang , Philipp Tomsich , Simon Glass Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki Subject: [PATCH v2 2/2] arm64: dts: rockchip: Add Radxa ROCK Pi 4C support Date: Tue, 21 Jul 2020 00:25:49 +0530 Message-Id: <20200720185549.671360-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200720185549.671360-1-jagan@amarulasolutions.com> References: <20200720185549.671360-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="OJH/5//a"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Rock PI 4C has AP6256 Wifi/BT, PoE, miniDP, USB Host enabled GPIO pin change compared to 4B, 4C. So, add or enable difference nodes/properties in 4C dts by including common dtsi. Signed-off-by: Jagan Teki Reviewed-by: Kever Yang --- Changes for v2: - s/4b/4c arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi | 6 ++ arch/arm/dts/rk3399-rock-pi-4c.dts | 51 +++++++++++++++ board/rockchip/evb_rk3399/MAINTAINERS | 2 + configs/rock-pi-4c-rk3399_defconfig | 74 ++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi create mode 100644 arch/arm/dts/rk3399-rock-pi-4c.dts create mode 100644 configs/rock-pi-4c-rk3399_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index bcd89af6a5..5726156a2d 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -138,6 +138,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \ rk3399-roc-pc-mezzanine.dtb \ rk3399-rock-pi-4a.dtb \ rk3399-rock-pi-4b.dtb \ + rk3399-rock-pi-4c.dtb \ rk3399-rock960.dtb \ rk3399-rockpro64.dtb \ rk3399pro-rock-pi-n10.dtb diff --git a/arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi b/arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi new file mode 100644 index 0000000000..85ee5770ad --- /dev/null +++ b/arch/arm/dts/rk3399-rock-pi-4c-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-4c.dts b/arch/arm/dts/rk3399-rock-pi-4c.dts new file mode 100644 index 0000000000..9d07ebd1ec --- /dev/null +++ b/arch/arm/dts/rk3399-rock-pi-4c.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd + * Copyright (c) 2019 Radxa Limited + * Copyright (c) 2019 Amarula Solutions(India) + */ + +/dts-v1/; +#include "rk3399-rock-pi-4.dtsi" + +/ { + model = "Radxa ROCK Pi 4C"; + 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>; + }; +}; + +&vcc5v0_host { + gpio = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>; +}; + +&vcc5v0_host_en { + rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; +}; diff --git a/board/rockchip/evb_rk3399/MAINTAINERS b/board/rockchip/evb_rk3399/MAINTAINERS index 578638a58b..4c889e06a6 100644 --- a/board/rockchip/evb_rk3399/MAINTAINERS +++ b/board/rockchip/evb_rk3399/MAINTAINERS @@ -68,6 +68,8 @@ M: Jagan Teki S: Maintained F: configs/rock-pi-4-rk3399_defconfig F: arch/arm/dts/rk3399-rock-pi-4-u-boot.dtsi +F: configs/rock-pi-4c-rk3399_defconfig +F: arch/arm/dts/rk3399-rock-pi-4c-u-boot.dtsi ROCK-PI-N10 M: Jagan Teki diff --git a/configs/rock-pi-4c-rk3399_defconfig b/configs/rock-pi-4c-rk3399_defconfig new file mode 100644 index 0000000000..5e4eb6a368 --- /dev/null +++ b/configs/rock-pi-4c-rk3399_defconfig @@ -0,0 +1,74 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SYS_TEXT_BASE=0x00200000 +CONFIG_ENV_OFFSET=0x3F8000 +CONFIG_ROCKCHIP_RK3399=y +CONFIG_TARGET_EVB_RK3399=y +CONFIG_NR_DRAM_BANKS=1 +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-4c.dtb" +CONFIG_MISC_INIT_R=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set +CONFIG_SPL_STACK_R=y +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000 +CONFIG_TPL=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y +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-4c" +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 +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MISC=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ROCKCHIP=y +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_NVME=y +CONFIG_PCI=y +CONFIG_PHY_ROCKCHIP_INNO_USB2=y +CONFIG_PHY_ROCKCHIP_TYPEC=y +CONFIG_PMIC_RK8XX=y +CONFIG_REGULATOR_PWM=y +CONFIG_REGULATOR_RK8XX=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM_RK3399_LPDDR4=y +CONFIG_DM_RESET=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYSRESET=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GENERIC=y +CONFIG_USB_KEYBOARD=y +CONFIG_USB_GADGET=y +CONFIG_USB_HOST_ETHER=y +CONFIG_USB_ETHER_ASIX=y +CONFIG_USB_ETHER_ASIX88179=y +CONFIG_USB_ETHER_MCS7830=y +CONFIG_USB_ETHER_RTL8152=y +CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_DISPLAY_ROCKCHIP_HDMI=y +CONFIG_SPL_TINY_MEMSET=y +CONFIG_ERRNO_STR=y