From patchwork Thu Nov 21 14:14:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 910 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 B93833F069 for ; Thu, 21 Nov 2019 15:15:14 +0100 (CET) Received: by mail-pf1-f197.google.com with SMTP id z2sf2175298pfg.6 for ; Thu, 21 Nov 2019 06:15:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574345713; cv=pass; d=google.com; s=arc-20160816; b=vwoSCpi/xH+MTLUd9w8DjQniNFo/k9VNJfvb6jCZHr6w0KK/wcWnZY/oWV562bpkii LJzKl5CwJi6AcbP1KTmCwJaeeqpi2s+IVMECwn/S9ITJS7DIyXXGiHS2dCKLcaN4LB7x bQYZ2LnjG9p1TVCUashHfZpsqZ356hi+nMCZ5YcWdlgi1ItldldQ/HXqNc+ruuV3Yq1L Pb8OET09m8jrwqLLqqdZayoioJas9HhvLVo/7VQ10lxhSeqzHmX6Sq/p+y+Y8cSTynfQ YMmTJsLvfJS+pygL7YiuX+iOiXu5F407CFb1fANGRlSJ3hDr01sylSfUNZcqXF9BIRB/ vEXg== 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=fT/mVJHqseBe1e+/SRezIHV0nKk5aHd3CIoCI43FgQg=; b=j+UmWI0Un8wUH0/B6N93JbIc3/UkY6ENX1OpLJ7Yxy6DxC+7bUT9xckXrhqbtIjLoC lsHxtTk8Xvm78IdJ9gk3gNFJQBMNR19Lb8N2e5J9eo9xXfDYU2+o1iINTgXzlToN7S7F UE5hiVJFu/6jsLeM/Hacf5UyuwXmZkKKEJlcR+XYo2w7nSV342sdkOmrnNPZ3jbPac/R 8UXHgfiudBzcGzwoMKR+cu/nOpgwAiFEwwXl+HXmMxTc4v+ouljAU+N43hiisMUib+PL vZEa6s+FxnAo+eVmyQ/lA8eMt6zFMel2v9bIkJESnmKxayOacWoEaEMTsU5oreJuwcfN XW7A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VwPHYE3j; 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=fT/mVJHqseBe1e+/SRezIHV0nKk5aHd3CIoCI43FgQg=; b=ISUOFs13PuPcuSTHySxF9liiOVxyhTqw/3RkufdRJrKck1Nf/AU3fRvCw1XI71jwMS 4aAFQrs7uipuIigdeUoFMTHWRkOfVcdqK8SG6nnh4eocUHyV3N01Kc6GI8OlwCItDp02 RAg8pCQZQbZ2SfwCy8GZur6tMmfxv/nanaJqA= 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=fT/mVJHqseBe1e+/SRezIHV0nKk5aHd3CIoCI43FgQg=; b=YIT45nKep5EwEpE+2YI4nSKF/UAuMKUezHpFnQba6h3YDZ5mXGjYLG5bye96GrHhC8 dZC8DcYee4iHcBVAKc0XjTSQML5VL4yxBykJoUrbeuYISuI+wbQj2r1lKsr5SMPpXSmq CgIEwF1kKNnoDWRjaMNUlStVmCQvN9mGyXCXacimrskKxBId1TokVOwKI+LXVXu9Oz+J qegYpF0KUBgneUfg/CEDBrAwPyPt46veYKWoYlZ7AQGuJjCviFTy8FVH1Wjxrvz690aD Z2PEbwqr3Md7KF6NKB74QMWKufzyNIeA3F6EFah4UjWRGg+LBSG13b0yyvmanXr7yglg OOUw== X-Gm-Message-State: APjAAAXkmKZ07e/bURqJjqEK4zjCQCjOHwHe92T5HN6/KqRbL8bwP+Ak llELcSSnE+D5Des+hXSGzm/+Fhli X-Google-Smtp-Source: APXvYqzxUH4cRPqm/+5L/+IPysSIZyu1fpRckoZeWt8M98lgo90m6vtsuMx8M4bgR5JqeF7XGXnFRA== X-Received: by 2002:a62:c1c1:: with SMTP id i184mr10991006pfg.65.1574345713408; Thu, 21 Nov 2019 06:15:13 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:b042:: with SMTP id z2ls1390342pgo.16.gmail; Thu, 21 Nov 2019 06:15:13 -0800 (PST) X-Received: by 2002:a63:a5b:: with SMTP id z27mr10094794pgk.416.1574345712696; Thu, 21 Nov 2019 06:15:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574345712; cv=none; d=google.com; s=arc-20160816; b=ZzNTrgH57R3qqBRToMZt598P66ph9y42jxBhiDrL4hFseH/OAuwhpc3JY1bfqfsiQt Cr3f34QgN76g7fgYc5cftl6mI3c+1wIZmxRevRNNnorSczBC5GqVc5R9Wdy1Lj+f8ymD iVw+5EUqkRcKPikSsmIbwqyN81jo8yXkmV7n3Lo/3yml4kEHvVu7/VPqSF5DBVv8AqGd WIsBLZutzs5/Linbgp8Kqg1hxpgxvvXKJAKd11zgLoX1XFRVeUfdxDqqwikV0ybZK1Ka aXeJS+H17EUa2XQq8xufrwZPA8L2cyzDyEuD5KzeE8khCIuUygX+ZFV9aBS8qigxuxBW wX1g== 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=/A5/uXN75VZpmKEMyrzzussJWPL/C/gsWUw7gU7PWrs=; b=RZVdLIiwEtXNnKl5nU2LkhjF0HZKZyXnON/Vxkcw8eKLeharLTEto/wjT06WjyR4av JmG2IHthprRbfISww2B+tBiAGWLIZfYIo6Yz7sLG9FumbAPWXPZTOTDXbwRucx1LsHP7 1tG+7+/1+V5xgWmmLJPFT29sEtn0bHdRk2qTwSbMfwI5nwvTMtfXQO8Xa4lfqywKENXn J79Pn5+Nj2yPd7GhJIfBQLQcBYijiyvVLHlK2H9h7z0jQ5AagNepTnNW4krqrO9PlKua VcNwJMOlgvx4fzdztmPDhii6LecuEfCuSSgv5pZJzZLgGwUaZsZEesH4/u9BCuUM8Vh0 s+TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VwPHYE3j; 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 g69sor3161638pfb.20.2019.11.21.06.15.12 for (Google Transport Security); Thu, 21 Nov 2019 06:15:12 -0800 (PST) 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:a62:7dd2:: with SMTP id y201mr11386869pfc.90.1574345712298; Thu, 21 Nov 2019 06:15:12 -0800 (PST) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id w138sm4072304pfc.68.2019.11.21.06.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 06:15:11 -0800 (PST) From: Jagan Teki To: Heiko Stuebner , Rob Herring , Mark Rutland Cc: Manivannan Sadhasivam , Akash Gajjar , Tom Cubie , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 2/5] arm64: dts: rockchip: Add VMARC RK3399Pro SOM initial support Date: Thu, 21 Nov 2019 19:44:42 +0530 Message-Id: <20191121141445.28712-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191121141445.28712-1-jagan@amarulasolutions.com> References: <20191121141445.28712-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=VwPHYE3j; 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: , VMARC RK3399Pro SOM is a standard SMARC SOM design with Rockchip RK3399Pro SoC, which is designed by Vamrs. Specification: - Rockchip RK3399Pro - PMIC: RK809-3 - SD slot, 16GiB eMMC - 2xUSB-2.0, 1xUSB3.0 - USB-C for power supply - Ethernet, PCIe - HDMI, MIPI-DSI/CSI, eDP Add initial support for VMARC RK3399Pro SOM, this would use with associated carrier board. Signed-off-by: Jagan Teki --- Changes for v2: - add vin-supply for vcc5v0_sys - use vcc_lan from regulator tree - drop comments from tsadc node .../dts/rockchip/rk3399pro-vmarc-som.dtsi | 333 ++++++++++++++++++ 1 file changed, 333 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi diff --git a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi new file mode 100644 index 000000000000..0a516334f15f --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi @@ -0,0 +1,333 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd + * Copyright (c) 2019 Vamrs Limited + * Copyright (c) 2019 Amarula Solutions(India) + */ + +#include +#include +#include + +/ { + compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro"; + + clkin_gmac: external-gmac-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "clkin_gmac"; + #clock-cells = <0>; + }; + + vcc12v_dcin: vcc12v-dcin-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc12v_dcin"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <12000000>; + regulator-max-microvolt = <12000000>; + }; + + vcc5v0_sys: vcc5v0-sys-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc12v_dcin>; + }; +}; + +&cpu_l0 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_l1 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_l2 { + cpu-supply = <&vdd_cpu_l>; +}; + +&cpu_l3 { + cpu-supply = <&vdd_cpu_l>; +}; + +&emmc_phy { + status = "okay"; +}; + +&gmac { + assigned-clocks = <&cru SCLK_RMII_SRC>; + assigned-clock-parents = <&clkin_gmac>; + clock_in_out = "input"; + phy-supply = <&vcc_lan>; + 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>; +}; + +&i2c0 { + clock-frequency = <400000>; + i2c-scl-rising-time-ns = <180>; + i2c-scl-falling-time-ns = <30>; + status = "okay"; + + rk809: pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + interrupt-parent = <&gpio1>; + interrupts = ; + #clock-cells = <1>; + clock-output-names = "rk808-clkout1", "rk808-clkout2"; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_int_l>; + rockchip,system-power-controller; + wakeup-source; + + vcc1-supply = <&vcc5v0_sys>; + vcc2-supply = <&vcc5v0_sys>; + vcc3-supply = <&vcc5v0_sys>; + vcc4-supply = <&vcc5v0_sys>; + vcc5-supply = <&vcc_buck5>; + vcc6-supply = <&vcc_buck5>; + vcc7-supply = <&vcc5v0_sys>; + vcc8-supply = <&vcc3v3_sys>; + vcc9-supply = <&vcc5v0_sys>; + + regulators { + vdd_log: DCDC_REG1 { + regulator-name = "vdd_log"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-initial-mode = <0x2>; + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vdd_cpu_l: DCDC_REG2 { + regulator-name = "vdd_cpu_l"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1350000>; + regulator-ramp-delay = <6001>; + regulator-initial-mode = <0x2>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_ddr: DCDC_REG3 { + regulator-name = "vcc_ddr"; + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x2>; + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + vcc3v3_sys: DCDC_REG4 { + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-initial-mode = <0x2>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; + }; + }; + + vcc_buck5: DCDC_REG5 { + regulator-name = "vcc_buck5"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <2200000>; + regulator-max-microvolt = <2200000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <2200000>; + }; + }; + + vcca_0v9: LDO_REG1 { + regulator-name = "vcca_0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v8: LDO_REG2 { + regulator-name = "vcc_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <1800000>; + }; + }; + + vcc_0v9: LDO_REG3 { + regulator-name = "vcc_0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <900000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; + }; + }; + + vcca_1v8: LDO_REG4 { + regulator-name = "vcca_1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <1850000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* + * As per BSP, but schematic not showing any regulator + * pin for LD05. + */ + vdd1v5_dvp: LDO_REG5 { + regulator-name = "vdd1v5_dvp"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc_1v5: LDO_REG6 { + regulator-name = "vcc_1v5"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_3v0: LDO_REG7 { + regulator-name = "vccio_3v0"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vccio_sd: LDO_REG8 { + regulator-name = "vccio_sd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + /* + * As per BSP, but schematic not showing any regulator + * pin for LD09. + */ + vcc_sd: LDO_REG9 { + regulator-name = "vcc_sd"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc5v0_usb2: SWITCH_REG1 { + regulator-name = "vcc5v0_usb2"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <5000000>; + }; + }; + + vccio_3v3: vcc_lan: SWITCH_REG2 { + regulator-name = "vccio_3v3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; +}; + +&io_domains { + status = "okay"; + bt656-supply = <&vcca_1v8>; + sdmmc-supply = <&vccio_sd>; + gpio1830-supply = <&vccio_3v0>; +}; + +&pmu_io_domains { + status = "okay"; + pmu1830-supply = <&vcc_1v8>; +}; + +&sdhci { + bus-width = <8>; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + non-removable; + status = "okay"; +}; + +&tsadc { + status = "okay"; + rockchip,hw-tshut-mode = <1>; + rockchip,hw-tshut-polarity = <1>; +}; + +&pinctrl { + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = + <1 RK_PC2 0 &pcfg_pull_up>; + }; + }; +};