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: 1516 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C6EDC3F03F for ; Mon, 20 Jul 2020 17:31:32 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id s28sf12956768pfd.19 for ; Mon, 20 Jul 2020 08:31:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595259090; cv=pass; d=google.com; s=arc-20160816; b=OhHob9My76lxMhjzBVRRncmOKlm3MxrpPMmPs3O9nL0RGecKoBrze7+rA0cp5g41ZB YLlBD2ixhk/FfKB1w/V+7oGE3wv/5a/NTITa4oB0diJ8QoZ+R+rVxpjNHM0Vi7Nv7H7f RA+qTNuGqxlZpgPA5YkiZI2VLsXsC+/ceYZqP3+fVq6v8PDLZ7JA0VeVPk2TnsqDz2Mo yGxkPgSn6+WRra1u3r3BjYxHj2GglgDhzep3b3lN8pDaHxRO/cq8ubD3tzezmH0DEFaG dQdiBFjs7clmTf//9NZWIOGLB0fkEq3W4ii67DPC7U9dh86J4kKvlqY4guJD0bTRxKYz Zhpg== 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=1evP/xau7tApDmyFlkCzxxuOy360p9lAdF//9D3gsMQ=; b=aV1CFhs4/LaDEzr9YI3Y6g7JUWCK4xG5EalMASkZqffq+q9lS7/7GwVk/3Nvd6JH6i lI4RvELf66fNv5b7AEJ4ngqMFJFMkZT7Q34TtYSX5quneQ3soO84WrAi/7aHyCliPrrH yGddSDMapQWb3DQtxxMlrAOCpHFKUYsMG1bg2IRKETEFsnS3HdOlUoz0GF9RlOC3ud0Q N1p74EDdZFIs4dzUXqq2WY3lxzaxYRtJgITdxgH8jvrUbgiIIT71Q/9mBieT8BV/7OXu vvCD/zEDGuqPQ7Ynr8/w3TPs532fxgPK6Htn7XYzIXb8t+cfVnu1FhMwVTLnCHs9dojH uE8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LujNyF7x; 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=1evP/xau7tApDmyFlkCzxxuOy360p9lAdF//9D3gsMQ=; b=IDvvVwGnG43kKIAa812dHR6U+e/ZSf+Q2Bt1quBjhHfRqsL78K6ymCNByM+048ub8u 7JErtxkp+3a4Q+F9429+f3CKlNAIKusiShcMjGowXbXJPUVvUZ2u+OlHkBF+Kb2UZuAW DpthSGngadaxyn9HRV/ZwgIyVDERNzKgHKJiQ= 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=1evP/xau7tApDmyFlkCzxxuOy360p9lAdF//9D3gsMQ=; b=pZBQpfzxObDwt2baXzK89zXHXAOmv7ivBhopSy3Cd2Kl/w6g5HhPQ1TdI5Eo8N5QAU MbTXG3atT13uucVSW64k+SHvYy4epg63PpSfXJ51ExdT+omi5Z3HISwRBhZcv57ZfNXa QENSEsX2kMpPWiM0mkxwcQIortbICan6mvESdxGdwSiUo9rr1sZ8Cqlyr6TL5p1Wz3Xw c2ZVGFc4syxRVa7uHscX5Bb7ysswloCVBMBgpMlPgOQta6zpGEqobFCfBP5huW98Q/oy rK1oA6gXjXD/7HsDSKtlAGVbErs6dnPOW2dgQ/uW9cAZtsm8854cIajyqpEUW3W8VaFh 5+5Q== X-Gm-Message-State: AOAM530UZQacvOAuMi4cvx1wmfF7YhkRsbAEQWLVnCA4QAFanG2+savj f6AhWefLX2w6oNV+HuQmVcpPr965 X-Google-Smtp-Source: ABdhPJyNOazEiMQXGOE9uwSSLX+9H/BldEoZNlWYY9ask0QFmlmdpmFC3rRBPv53EBIB02ZFIIuSKg== X-Received: by 2002:a17:902:a70e:: with SMTP id w14mr19395520plq.259.1595259090435; Mon, 20 Jul 2020 08:31:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:134a:: with SMTP id k10ls4758445pfu.11.gmail; Mon, 20 Jul 2020 08:31:30 -0700 (PDT) X-Received: by 2002:a63:e00c:: with SMTP id e12mr19175758pgh.413.1595259089906; Mon, 20 Jul 2020 08:31:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595259089; cv=none; d=google.com; s=arc-20160816; b=sRKMUwwzIGspocDUl8FhbaO928JagdLjR2O1A10jz0PTrtt2e8OflDzI8sGJRggRSQ O9OkCDvRT+D6mOH9ZuOapI7fVnJS5W+oycEws8EMOXlPE4iE5Vgi5Ba7rzwPLbXZb/64 szSYz07oj8ZncjzrxYrEoMVhyrVKr32p45hgH7VyUloUFMWlfC/zffAV+eUd9O9KGKQE 5JNswH9ZlH1uwgL8ROQpysHLOvQiMnplBGXyQ54RplewRc7O8KvT08FyZeNYvHLKLH79 V7cWJRtECLBqBvL+DcMzBCm229gMDS97fvqJqLzZZqNd5n5A3K/EC1XP7iouQ+Q3oIKi iltw== 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=jLZnEVP6sKzO7p5NTKCwHlIcD7EJd2Xc+Cehzh/M/2c=; b=Isd7/4l+zXiyBOEmEK3+e4LB5kBTwykh0noMV+rd7Bo28ADkhU7SM71wpVC3puPTpM enkrjCw4OwZYqunBEq3fr7slYqixrFELUOBZTHbjBk7+aTU+G4/2+kkPuNQ/v/I8MOH/ vYBhG44iXMtiTOd8GmgPhtKUjcwahprIHdzqnvgCPYB72fvRgc/lHauUHsrBX6pb93mW rBllZRd1EPreSXBEqpr773phHxhI6OFZ6M5N2HCUjoVeAIJCfWY9sG0m5QJajciQ6QYl BcggYm3ZO5ybHnTnuCx/+Z8GmUbvitEznyWKbhj/vQeI4rSa2VvJ8eh02kWdtKJ9kc8n aZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LujNyF7x; 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 m16sor20578478pgg.4.2020.07.20.08.31.29 for (Google Transport Security); Mon, 20 Jul 2020 08:31:29 -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: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 Cc: Suniel Mahesh , U-Boot-Denx , linux-rockchip@lists.infradead.org, linux-amarula , Jagan Teki 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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LujNyF7x; 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 --- 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 From patchwork Mon Jul 20 15:30:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1517 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-yb1-f200.google.com (mail-yb1-f200.google.com [209.85.219.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A80A53F03F for ; Mon, 20 Jul 2020 17:31:41 +0200 (CEST) Received: by mail-yb1-f200.google.com with SMTP id u12sf22270610ybj.0 for ; Mon, 20 Jul 2020 08:31:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595259100; cv=pass; d=google.com; s=arc-20160816; b=UmzhI6Qtv26JpnXm9cxNLJjbymQ3OG0glypZmkSCpWjv2xgQJ1VKjkOUlQnY0PIqh9 VRArIjk7dniiJiVFAUZ76QEmTVHLA69caYs1xlM036esnyy+drsZQdTbtj7l8F4/dslE fbVPgk4jYnbke1GliWi29D0s08QEVde8T40pVbv9vIrbsuJeWeUyoOclDZUqwn+d+B8d XBtRgchQZrlzAFUdoNAawT0iYe5bjeUifkiroztqizvrtURXeJ28cVmT4IXxg4hi3xUR MLfoeZTnNm5SyICmZtEiyH0iy3bpSQ96cXg6MJsWJEjsdqwyHSFUkCm8tT/XYi9KcwHk Q3cQ== 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=TwiI4t+Ag+M/cwXQfsZr6QbgeVuprRM+UVgPaQzAZxI=; b=bDfwu83wqORQ9lCw1f/d/cyN2n5yHJPgN1bIdX2EvZE2MVORA3EFUjtqVafyXXuJLz 39SjlZwe8/ALNnXWl5KakXW3XkerCC/WAFEa8ew/12HjmCaSCTnkqJ/w41zoFkp+GliU X9ntbnRWg4AVbIbqG0xZ8GfG0Z5+Fsi9IDFQfIeFXJlAlBgeUWlwNM59uSo2z/UI5lYB z0FkvP7X0JdjcVeONN1a3ylUAraQhYvH9d2BoYfnr31Hyx2QLmkIaM63Vn0qlOJqtZit PIQAemLl54b4dFNxke84Rk+yGUqaY2p0UdWWfFywTOyQ2hAXSz2sekcqKvakel854lcu c9kQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZiDEUZcP; 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=TwiI4t+Ag+M/cwXQfsZr6QbgeVuprRM+UVgPaQzAZxI=; b=WebifmKslceaNe4FzGAX24oWTf+fG2rEXOEtdQJyUIsjPrVFn/e8pXbzSt68aB+oJN nHfD9nlq4iOg6Y4ED6tYyocvlWcFUTfLsojYZb6VjcE3UIcsdoq3chCE/SXnTERuMc3b sZBeBPU/ZhYU3SY1PYtMfEi/SJe7q8oNcTv1g= 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=TwiI4t+Ag+M/cwXQfsZr6QbgeVuprRM+UVgPaQzAZxI=; b=pW8NSLYDKLcnvvJs6+WsvxG4B0PE5BMJ8Bd0gxTF05oW3Izbg9Aml9AOneLcRZQ5fh wBleHZKm73n4i8fe9Dyr1aYNWdUfKqJtDOaRol5z6i8VFH/lsXNxxvC097lCSwtdeNjb xxDOfRxxZ36zWIGdHn7PPBiq4/xtMk4LQvRiGkf8HIulxrPBO+ZYGsQBtM50cvEDE1Om Y0kBj9WKvR3Z0dAnMlOQEo29JWaEaClNtniOvcls9QQEVz2CETaOvuf9wc3yxwB3fry0 Yq2pArmYRyGgjyMHW13F1Nutfezk+UGhDblLLbGsdTbBegCxpd/Q9hnXrRVUTnjze3EN Gm1w== X-Gm-Message-State: AOAM530Zu0Hax95lYmsATVYszexEra32uU5boDwXlScfImBCiG4aJ8jn SjgJTD4m8q5QStdEbvloOp3DZHKz X-Google-Smtp-Source: ABdhPJw5a27UJjd1UPOsIsoZsvoLlvoYKCJ3j+3ocsdT2SD9+zjYNmIEXCGOG3QCtBjsiZeWQ+d31Q== X-Received: by 2002:a25:df05:: with SMTP id w5mr36342343ybg.354.1595259100111; Mon, 20 Jul 2020 08:31:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a25:aa48:: with SMTP id s66ls77154ybi.3.gmail; Mon, 20 Jul 2020 08:31:39 -0700 (PDT) X-Received: by 2002:a25:aa2d:: with SMTP id s42mr36475866ybi.496.1595259099592; Mon, 20 Jul 2020 08:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595259099; cv=none; d=google.com; s=arc-20160816; b=JYshalQMSR4UX2gAReAcT6N3hPKqqjpfwT2i54ZVDEiXp1e1ruwpfFXw8rBfGYv2qA kB3uJvsJ2A/uIAzOtQC+OMNjieOzMhIkLno78Vx78aGlr1V1gTFZnr91i8waoOodqZBH Ph0YCUIHlZCt2izCyRyAuthWvRMK4bxALuxBFMX1mehsGLACrlg45/1ThtcLzN9iX00L mX+e7xmMql0OJUzWPqUlHt9T4/uE2tHF2rYBk6fME3ehLsVoBo1Ag2LEnMBOU2MKyysQ xzXYij1O8k6G8sygSc5KYmcfszGIGh0l/jpvlLzi3NXlJBvn8B1WO54tZTE/GgzK68cZ FquQ== 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=IKocNXBF6Jj5vWQu7FxYCJp6LgXI4BY30vXxZi7p5BU=; b=M4k/Zdy1u/ZrJXKgFF5t+E9x/ziMEOWSkOn4Z+vt3eUyYFByLu4tz1NLfjZFr3pYJ4 v0uhrMbZ9mVL7AuIbccJO98LAby+0BofIH72L8ALh4FA5JcOJeCAPFcrLh+4liiKQc1Y zgjCl49sgwNX04oyiAKLBDWQI/Nl0vFrd78DJhOMJde42au5xUFxT/y1qTFl6n1f77H6 Q8XhLXNBQWwbpdoKCoxih/ViL330pZMetKn1rmI58AX2QYw/dlaiYIOap6eakKnqT0II VlYKAiyb0F0RMmYGoS4hESrA/gS6dHscl0th1KC8+uKspArmyhxfFXftw9VHTkpRnzzV 4ahg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZiDEUZcP; 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 m13sor12531116ybf.131.2020.07.20.08.31.38 for (Google Transport Security); Mon, 20 Jul 2020 08:31:38 -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:24ed:: with SMTP id i100mr26012827pje.22.1595259098528; Mon, 20 Jul 2020 08:31:38 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 08:31:37 -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 2/2] arm64: dts: rockchip: Add Radxa ROCK Pi 4C support Date: Mon, 20 Jul 2020 21:00:56 +0530 Message-Id: <20200720153056.530739-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200720153056.530739-1-jagan@amarulasolutions.com> References: <20200720153056.530739-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=ZiDEUZcP; 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 --- Note: Linux dts changes on mailing-list https://lkml.org/lkml/2020/7/20/445 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..1d34476825 --- /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-4b.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-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 +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