From patchwork Wed Nov 20 11:39:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 904 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1CBC43F069 for ; Wed, 20 Nov 2019 12:41:07 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id z10sf15829160pff.1 for ; Wed, 20 Nov 2019 03:41:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574250064; cv=pass; d=google.com; s=arc-20160816; b=Rrc3Sn/yRS3X0jqPK5lu7vDN27bdnNDKlVGcGdXCIj/yEErEHwCkzdxzaeCpfgaZHC 25ZwnWntRdcV2zuAjiNxxMHD1EenqQmGZ2eYY5rU35py58P7bxwTj6Oob33SbifZK2Ex ptT/T2iMwvdsfwukMUAQkQirBZOCW7gp0Vox/w3WURl7ldaqI8zMIipeTRWCzuTJ+XBV iZhZ1XaG6YbVHofEHEnc7JLEhPpbhpCdmnzMHMTx/XodXjAH6Nr7c8nFy3Vq8VH2Yu0N 8O0yLS7umiNYdKHBSyPIUb6tGUR/9iJvw6SygTOfHyGfQAy3ktaCidEt+HhyrJV7DXVA frjw== 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=z03jxr3rHy8jYDu80wktcPhMSLNDKkVvAlS9IWZiv0k=; b=lbYC3qJk0HFnDdlO+2eo4n6WazHkSarjPQ7WSwtOxKrvBPlNktp381g/tp3BsYnUTK 6GB+ci8CjpQfGkiiZz6NjpnUgpiAW3GFzn/gml6DvZ9+fRj53b8s/gk5irGzbPJr51qu czsjU4a1jF45H+6ZX1hkwOGa5Mqp1VXjzQyiLwhdq1gInzZizpGdni/OGLj4jZW1GsOX /qtu+04o6zR9RkeKxDTenuuU/KY6yYoq8Q7HpASxeMOHgfo5zKWTlThmxSM5WD5OHMk3 oNENKNIuIMjSQaZh7iFfRvuSo0BNeuphAcBm294lLhX/5W9XytsIfxzjsjWrbxcEGq4F zTKg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LfLs19Rp; 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=z03jxr3rHy8jYDu80wktcPhMSLNDKkVvAlS9IWZiv0k=; b=bfIOHSBZ5r4xkz3EJCfb6BngQxdd+3XtJuzjNnrLWBygncPtEP4y/+WkM1BU/ESuUy hZroOanKM3KBA4KjR3Wy9woYdZnHTZsHNBIVhaYcstWqkbvczmdjyBr7hC8CbHh9+d06 RUp7uKtvEVlFB3rFLZZ1I8iWqYOA5jnHueZLI= 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=z03jxr3rHy8jYDu80wktcPhMSLNDKkVvAlS9IWZiv0k=; b=IUdGB1y8CD4a3vGSxPIQFL/r9T5530Re9cex7DQepegWHxm+QDzY+KRp/kI4C6whCl pzmIJRWrWIX5r4vfcZaC18IilOu0nj173JU8Bjskb26LncCe+QgEfagsnei0YF6n2PD/ WlKZ8weTfIaXrgVemzwSeKp3x+CsyOw6r6kUY0i6nAFMH3lthyoJiZUH8Q1hVCmZDXd+ EGjh8S5TDrD2ZFHmG6+7pXPqgg5gqi9XzWVoPveXdfJkwVV+k8EhHm9qtmmRdRZy0KXK CTiIeE4y6dVC0kjTP4mAdcnJaCiUkFSQBDTntYCLyPYti5dGLSP8/xvKwnLA2I90Ttvp 7qBg== X-Gm-Message-State: APjAAAUZUNvs5FMwqN5FtZrg5UPrEw9efrsYv82HjoTloO1WvO4X5T7I vfg+utDodzvlq6UjQ22qoaRMOWZG X-Google-Smtp-Source: APXvYqwHrSGpQLWBj/UsW0ea8yl81GteXn1z5oURVtCPVzbr4gvF8ryxmO6FdRFHYKI/zChJJrx+wA== X-Received: by 2002:a63:77c4:: with SMTP id s187mr2755151pgc.304.1574250064001; Wed, 20 Nov 2019 03:41:04 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:1581:: with SMTP id 123ls491572pfv.11.gmail; Wed, 20 Nov 2019 03:41:03 -0800 (PST) X-Received: by 2002:a62:20e:: with SMTP id 14mr3420998pfc.153.1574250063484; Wed, 20 Nov 2019 03:41:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574250063; cv=none; d=google.com; s=arc-20160816; b=OsY4JbJz5QBdoLCdolh+EpHK4hhUQvEkZF5LI9BRztg3wR8pZSlxyWPVjm/yvQSDyh 9V7k/koue/ck6Kd6+uDKcpBgWxSyHH/LDO8y5xqmY4tYeDk5x13ofjAs/Jvy08UZe0QD +1Ha3nb27tEuClq6lQACswD8CvQ9zG4fIzmjs9yIihAUpo2I5ucRRC6m3zIlnJ//2acv yOkNQxdXxYIlr7MYZ8q/u8q6h1tUVfYnsxpkUIqVNGSbSwcBUG78d+reckmS6aeolFLr oN+RBbevxbH4ihzZgD5jm9rKxt0XYI9ESm62SRp1t1CztcpygQ9w1P1hcdbTkg1R6e4T EX2g== 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=nF00ZBR6JJhCumUPuq72z3StUegVUvji1D96neG8DQw=; b=FlA15+cl93c34qb3vh0m70MaJF1ZsQ49efBPpeww+SnuwO2tBdFqqGccW3iLsz94R6 In+tbTpx07tzAcxSLo1cpaaE/RMCwcbHgjofRctWVFLE6O6eoYvnC/uGA9zA6AxkcPNB IrqrOHujXnVoZu4wVTkiy4FlR8BF/aWSRYGc0JMkVMm1qM+utIQBoV/Jm6VRqE+UCYjO XSq18agKW+VZtwpKQvo8crYrFwjFqaqOXVl5iugEswxmntlwxWFMGotEf1Y5P4RURj2s nuD7GF+8pBpm74CQbymwa7Gh1i28+Eqjt1DZehIIRHgYyqWPbYYDq1iBzggRAvJnh4es 4rqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LfLs19Rp; 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 p21sor29222342pli.12.2019.11.20.03.41.03 for (Google Transport Security); Wed, 20 Nov 2019 03:41:03 -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:a17:902:b715:: with SMTP id d21mr2490558pls.312.1574250062998; Wed, 20 Nov 2019 03:41:02 -0800 (PST) Received: from localhost.localdomain ([115.97.180.31]) by smtp.gmail.com with ESMTPSA id h185sm13492850pgc.87.2019.11.20.03.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 03:41:02 -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 2/5] arm64: dts: rockchip: Add VMARC RK3399Pro SOM initial support Date: Wed, 20 Nov 2019 17:09:20 +0530 Message-Id: <20191120113923.11685-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20191120113923.11685-1-jagan@amarulasolutions.com> References: <20191120113923.11685-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=LfLs19Rp; 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 --- .../dts/rockchip/rk3399pro-vmarc-som.dtsi | 339 ++++++++++++++++++ 1 file changed, 339 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..ddf6ebc9fbe3 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi @@ -0,0 +1,339 @@ +// 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>; + }; + + 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>; + }; + + vcc_lan: vcc3v3-phy-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_lan"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; +}; + +&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: 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"; + + /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-mode = <1>; + /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-polarity = <1>; +}; + +&pinctrl { + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = + <1 RK_PC2 0 &pcfg_pull_up>; + }; + }; +};