From patchwork Thu Sep 27 19:03:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 147731 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2386200lji; Thu, 27 Sep 2018 12:04:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV61UhIDwJdZob0N49mC1B1k9alOLM0A7NWUYwoHsPo2b8A5WbjaG97J3Nh2CWTqateq4cshq X-Received: by 2002:a17:906:66cd:: with SMTP id k13-v6mr2295466ejp.152.1538075083577; Thu, 27 Sep 2018 12:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538075083; cv=none; d=google.com; s=arc-20160816; b=mO1JLZ/fTNUYkqpdJs0HPpmm+zB9MQAzSbztbeCL9WFYIum4zx2toCSLU6rsNZXm/q Canfi1Pi5XSPxYXpdbWr897FJ5EHthQtJ69IPtCe6retL+/A/YVRQ7SrUqfqXbuJTfjL S+bTZ8kctsDrOqZY8Sa8lkX9BQDHcSwFb9pQur4B//vDSi2T5YmnLIV1pX5z9qPIQgGt pBf7907xd6mqCwA4eT5Bhrj0Naxmwx4HWhOPXEtqNW+yWM4LgatGFjGPGAcW6FgydyWq DNXPESjhsLKsVTRR8i5IjKQpfykIYNp78s/qjVdV1e8TUvNVA58Xk8ow0pYg0QwSKicO zP7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=dun2gy+RIIBDiRVDlpXrZeammQ2nLWI9a//rP3VI0BY=; b=MeSuNKHdgKgQvN+W/N98+pKbM/+5bmDEDc+IGJPC5PBkyenB+gHvEQBsJ06V7GKXOu 7YjwftyJ57WSbQBwGpvlNCqivzfOk/KQvtLp6yDUdu8QFLykaStg8y764ksTUNUcB96/ 6EUGodQNZUup+wM7iumAW4aArcyc2WaFLwZngi2PmUp1s3dfrRHsv/BoNM9uDl2KsVbe OAaqyVsM6loncYxBlSuzGDL9S0hgXYfitvJQyw/c6B9Zhxe/YD/g9konChgWD2Z/luux lO1m6rcfOq6tgZcSJldpGMzp1HbK/JpsfXLfk4IGTyF8jKaGFB4WOr0oyMjkIMMpaIhu oUGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cRncxsSc; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id 19-v6si815239ejz.315.2018.09.27.12.04.43; Thu, 27 Sep 2018 12:04:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=cRncxsSc; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 3484BC21C93; Thu, 27 Sep 2018 19:04:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 38F76C21DA6; Thu, 27 Sep 2018 19:04:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 33064C21D83; Thu, 27 Sep 2018 19:03:49 +0000 (UTC) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lists.denx.de (Postfix) with ESMTPS id D446CC21DA2 for ; Thu, 27 Sep 2018 19:03:44 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id g2-v6so2606984pgu.11 for ; Thu, 27 Sep 2018 12:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xj9F6ndpcZTTVT+dDF9S6LZc1ad2nZImHrIPc0d/Sfg=; b=cRncxsScWrtwV5M8XDB+d1eRfCGgtRl00notNIwpAqgYLNLyQqU41SjvIwyqcGWPGV N0DCxyhxbFslO8yUazxJ67SPJ5ld3+FjFEbh90olXz5BxzeFwxO/LUfq3UF5flbAuoej u22+Ghn7GThPpu/0bO+Cn6RRCL5dUT9shNRhM= 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; bh=Xj9F6ndpcZTTVT+dDF9S6LZc1ad2nZImHrIPc0d/Sfg=; b=KuSHd0SQNj9AF7qvY/3IWTu/og93Q1pEPwjd9mtykwodCBWb9ZH3KfYFbYon2QoD95 NomLt06+Yfap+Bf2Ic42BR5aIoM2U6f7cL3wuPZnxg9KC8B0dIxWVxjsTzyuJD1FcqvP bArovcolSoNzL2Uq7H0aYj9C36cBVz5klshDNC3cmGRmu1A5Z2thBzJMBmHVsAWilgEK HwvpVl7X3JNMmvHg4kB4fG01BMQTtHGcoyTjy1NE2e5yqyvSda8FIiMlq1JnxBmBgGyd BOaPjzjTnhYfh26gtwsFCmDKm6NKxYoS/hq601+wGEo/ZNA1YWGQIF+u9WLr8tyzgtkX THiA== X-Gm-Message-State: ABuFfoieYocp59Bt2oRMUkRnQ2mXnHAxhTtsRn3HM5tHkANRQXEdtgIa 8E434Teo9b7FIONQBoJn4Gjx X-Received: by 2002:a63:db44:: with SMTP id x4-v6mr11615208pgi.285.1538075023307; Thu, 27 Sep 2018 12:03:43 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:620c:e606:55b5:4f81:aee3:95c7]) by smtp.gmail.com with ESMTPSA id v8-v6sm4408895pff.120.2018.09.27.12.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Sep 2018 12:03:42 -0700 (PDT) From: Manivannan Sadhasivam To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com Date: Fri, 28 Sep 2018 00:33:01 +0530 Message-Id: <20180927190301.9642-5-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927190301.9642-1-manivannan.sadhasivam@linaro.org> References: <20180927190301.9642-1-manivannan.sadhasivam@linaro.org> Cc: tom@vamrs.com, daniel.lezcano@linaro.org, amit.kucheria@linaro.org, dev@vamrs.com, u-boot@lists.denx.de, Manivannan Sadhasivam , stephen@vamrs.com Subject: [U-Boot] [PATCH v3 4/4] rockchip: rk3399: Add Ficus EE board support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add board support for Ficus EE board from Vamrs. This board utilizes common Rock960 family support. Following peripherals are tested and known to work: * Gigabit Ethernet * USB 2.0 * MMC Signed-off-by: Ezequiel Garcia [Reworked based on common Rock960 family support] Signed-off-by: Manivannan Sadhasivam Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich --- Changes in v3: Modified the DRAM config header from LPDDR3 to DDR3 Changes in v2: None arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-ficus.dts | 78 ++++++++++++++++++++++++++++++++++ configs/ficus-rk3399_defconfig | 71 +++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 arch/arm/dts/rk3399-ficus.dts create mode 100644 configs/ficus-rk3399_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 9b891826b73..e2bd9822aa2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3288-veyron-minnie.dtb \ rk3288-vyasa.dtb \ rk3328-evb.dtb \ + rk3399-ficus.dtb \ rk3368-lion.dtb \ rk3368-sheep.dtb \ rk3368-geekbox.dtb \ diff --git a/arch/arm/dts/rk3399-ficus.dts b/arch/arm/dts/rk3399-ficus.dts new file mode 100644 index 00000000000..4af0e4e3834 --- /dev/null +++ b/arch/arm/dts/rk3399-ficus.dts @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Collabora Ltd. + * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd. + * + * Schematics available at https://dl.vamrs.com/products/ficus/docs/hw + */ + +/dts-v1/; +#include "rk3399-rock960.dtsi" +#include "rk3399-sdram-ddr3-1600.dtsi" + +/ { + model = "96boards RK3399 Ficus"; + compatible = "vamrs,ficus", "rockchip,rk3399"; + + chosen { + stdout-path = "serial2:1500000n8"; + }; + + clkin_gmac: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "clkin_gmac"; + #clock-cells = <0>; + }; +}; + +&gmac { + assigned-clocks = <&cru SCLK_RMII_SRC>; + assigned-clock-parents = <&clkin_gmac>; + clock_in_out = "input"; + phy-supply = <&vcc3v3_sys>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 50000>; + tx_delay = <0x28>; + rx_delay = <0x11>; + status = "okay"; +}; + +&pcie0 { + ep-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; +}; + +&pinctrl { + gmac { + rgmii_sleep_pins: rgmii-sleep-pins { + rockchip,pins = + <3 15 RK_FUNC_GPIO &pcfg_output_low>; + }; + }; + + pcie { + pcie_drv: pcie-drv { + rockchip,pins = + <1 24 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb2 { + host_vbus_drv: host-vbus-drv { + rockchip,pins = + <4 27 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&vcc3v3_pcie { + gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; +}; + +&vcc5v0_host { + gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>; +}; diff --git a/configs/ficus-rk3399_defconfig b/configs/ficus-rk3399_defconfig new file mode 100644 index 00000000000..e890bc25238 --- /dev/null +++ b/configs/ficus-rk3399_defconfig @@ -0,0 +1,71 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SYS_TEXT_BASE=0x00200000 +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x4000 +CONFIG_ROCKCHIP_RK3399=y +CONFIG_TARGET_ROCK960_RK3399=y +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 +CONFIG_DEBUG_UART_BASE=0xFF1A0000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_SPL_STACK_R_ADDR=0x80000 +CONFIG_DEFAULT_DEVICE_TREE="rk3399-ficus" +CONFIG_DEBUG_UART=y +CONFIG_FIT=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_STACK_R=y +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 +CONFIG_SPL_ATF=y +CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_TIME=y +CONFIG_SPL_OF_CONTROL=y +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_NET_RANDOM_ETHADDR=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=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_RGMII=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_PINCTRL_ROCKCHIP_RK3399=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_RK8XX=y +CONFIG_REGULATOR_PWM=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_REGULATOR_RK8XX=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM=y +CONFIG_SPL_RAM=y +CONFIG_BAUDRATE=1500000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYSRESET=y +CONFIG_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_STORAGE=y +CONFIG_USE_TINY_PRINTF=y +CONFIG_ERRNO_STR=y