From patchwork Fri Apr 22 10:31:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Penny Chiu X-Patchwork-Id: 8909191 Return-Path: X-Original-To: patchwork-linux-clk@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2279ABF29F for ; Fri, 22 Apr 2016 10:34:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A95920221 for ; Fri, 22 Apr 2016 10:33:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 521F9201BB for ; Fri, 22 Apr 2016 10:33:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbcDVKcl (ORCPT ); Fri, 22 Apr 2016 06:32:41 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:4585 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793AbcDVKci (ORCPT ); Fri, 22 Apr 2016 06:32:38 -0400 Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com id ; Fri, 22 Apr 2016 03:32:30 -0700 Received: from HQHUB101.nvidia.com ([172.20.12.94]) by hqnvupgp08.nvidia.com (PGP Universal service); Fri, 22 Apr 2016 03:32:27 -0700 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Fri, 22 Apr 2016 03:32:27 -0700 Received: from HQMAIL102.nvidia.com (172.18.146.10) by HQHUB101.nvidia.com (172.20.187.24) with Microsoft SMTP Server (TLS) id 8.3.406.0; Fri, 22 Apr 2016 03:32:37 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL102.nvidia.com (172.18.146.10) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Fri, 22 Apr 2016 10:32:37 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server id 15.0.1130.7 via Frontend Transport; Fri, 22 Apr 2016 10:32:37 +0000 Received: from pchiu-i7.nvidia.com (Not Verified[10.19.120.104]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,5,8150) id ; Fri, 22 Apr 2016 03:32:37 -0700 From: Penny Chiu To: , , , , , , CC: , , , , , , , , Penny Chiu Subject: [PATCH 08/11] arm64: tegra: Add PWM regulator for CPU rail on Jetson TX1 Date: Fri, 22 Apr 2016 18:31:08 +0800 Message-ID: <1461321071-6431-9-git-send-email-pchiu@nvidia.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461321071-6431-1-git-send-email-pchiu@nvidia.com> References: <1461321071-6431-1-git-send-email-pchiu@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The CPU rail on Jetson TX1 is supplied by a Open Voltage Regulator (OVR) which is controlled by PWM signals, and the PWM signals are generated by DFLL PWM controller. So this patch adds DFLL_PWM device-tree node and a PWM regulator node for the OVR. Signed-off-by: Penny Chiu --- arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 40 ++++++++++++++++++++++ arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts | 23 +++++++++++++ 2 files changed, 63 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi index 316c92c..9d02db2 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi @@ -42,4 +42,44 @@ clock-frequency = <32768>; }; }; + + pwm_dfll: pwm@70110000 { + compatible = "nvidia,tegra210-dfll-pwm"; + reg = <0x0 0x70110000 0x0 0x400>; + clocks = <&tegra_car TEGRA210_CLK_DFLL_REF>; + clock-names = "ref"; + #pwm-cells = <2>; + pwm-regulator = <&cpu_ovr_reg>; + status = "disable"; + }; + + pwm_regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + cpu_ovr_reg: pwm-regulator@0 { + status = "okay"; + reg = <0>; + compatible = "pwm-regulator"; + pwms = <&pwm_dfll 0 2500>; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <708000>; + regulator-max-microvolt = <1322400>; + regulator-always-on; + regulator-boot-on; + voltage-table = + <708000 0>, <727200 1>, <746400 2>, + <765600 3>, <784800 4>, <804000 5>, + <823200 6>, <842400 7>, <861600 8>, + <880800 9>, <900000 10>, <919200 11>, + <938400 12>, <957600 13>, <976800 14>, + <996000 15>, <1015200 16>, <1034400 17>, + <1053600 18>, <1072800 19>, <1092000 20>, + <1111200 21>, <1130400 22>, <1149600 23>, + <1168800 24>, <1188000 25>, <1207200 26>, + <1226400 27>, <1245600 28>, <1264800 29>, + <1284000 30>, <1303200 31>, <1322400 32>; + }; + }; }; diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts index 683b339..c9fd59a 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2371-2180.dts @@ -6,4 +6,27 @@ / { model = "NVIDIA Jetson TX1 Developer Kit"; compatible = "nvidia,p2371-2180", "nvidia,tegra210"; + + pinmux: pinmux@700008d4 { + dvfs_pwm_active_state: dvfs_pwm_active { + dvfs_pwm_pbb1 { + nvidia,pins = "dvfs_pwm_pbb1"; + nvidia,tristate = ; + }; + }; + + dvfs_pwm_inactive_state: dvfs_pwm_inactive { + dvfs_pwm_pbb1 { + nvidia,pins = "dvfs_pwm_pbb1"; + nvidia,tristate = ; + }; + }; + }; + + pwm_dfll: pwm@70110000 { + status = "okay"; + pinctrl-names = "dvfs_pwm_enable", "dvfs_pwm_disable"; + pinctrl-0 = <&dvfs_pwm_active_state>; + pinctrl-1 = <&dvfs_pwm_inactive_state>; + }; };