From patchwork Tue Jul 2 12:59:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 18239 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A0162391D for ; Tue, 2 Jul 2013 13:02:13 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id p12sf8174243vbe.7 for ; Tue, 02 Jul 2013 06:02:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=sviIsl3k4ZyLt20xFQEdGYocT8cXCIm4yBdOdLxIfiw=; b=jBo8iuTyPKku7ckzMhBYd714iGthTeqR7f35BOHgYiULUkqw1rB2l8J37J3yb40wGt 43OqNXMOkEjjpXhrt8PdnA0TaUQBwGBwDhJCU1ZjY6BjjmJOiEURyEhBeH8gYU2X/6EI aKoKlibCxTZM1YvDcBKzE/R1ZrbnVXjtnYzdkINd5Ei1mhJFFD0UNrjCqPkf8dBV9le5 WsE4oV3scvQtIaGsLF7IkRX4LgfGJq472aZZlBVz1xz3pN7Tuft2f3XlcwdHkgN2Y6Q0 s9KDoAMaJwYOa58aN0smmZrmTmWFQSK0aP1UEOChn4D6OW9SqjED1h+D5Xa5w4KgBRD6 9lxQ== X-Received: by 10.58.128.196 with SMTP id nq4mr3577765veb.25.1372770133282; Tue, 02 Jul 2013 06:02:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.94.20 with SMTP id cy20ls2732710qeb.11.gmail; Tue, 02 Jul 2013 06:02:13 -0700 (PDT) X-Received: by 10.58.15.193 with SMTP id z1mr11301071vec.40.1372770133168; Tue, 02 Jul 2013 06:02:13 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id u10si5938259vcj.128.2013.07.02.06.02.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 06:02:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id kw10so2729336vcb.19 for ; Tue, 02 Jul 2013 06:02:13 -0700 (PDT) X-Received: by 10.52.120.77 with SMTP id la13mr9460059vdb.23.1372770133004; Tue, 02 Jul 2013 06:02:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp9811veb; Tue, 2 Jul 2013 06:02:11 -0700 (PDT) X-Received: by 10.68.163.165 with SMTP id yj5mr28908964pbb.141.1372770131316; Tue, 02 Jul 2013 06:02:11 -0700 (PDT) Received: from mailout3.samsung.com (mailout3.samsung.com. [203.254.224.33]) by mx.google.com with ESMTP id pl17si13951211pab.237.2013.07.02.06.02.10 for ; Tue, 02 Jul 2013 06:02:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.33 as permitted sender) client-ip=203.254.224.33; Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MPB009YM87IJ8O0@mailout3.samsung.com> for patches@linaro.org; Tue, 02 Jul 2013 22:02:10 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id E0.0F.11618.15FC2D15; Tue, 02 Jul 2013 22:02:10 +0900 (KST) X-AuditID: cbfee691-b7fef6d000002d62-ef-51d2cf513660 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id EA.29.21068.15FC2D15; Tue, 02 Jul 2013 22:02:09 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.214.169]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MPB00KI385X2K70@mmp1.samsung.com>; Tue, 02 Jul 2013 22:02:09 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: u-boot-review@google.com, patches@linaro.org, Julius Werner , Simon Glass , Marek Vasut Subject: [PATCH 4/7] arm: exynos: Add methods to control power to USB 3.0 PHY Date: Tue, 02 Jul 2013 18:29:34 +0530 Message-id: <1372769977-7182-5-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1372769977-7182-1-git-send-email-gautam.vivek@samsung.com> References: <1372769977-7182-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrALMWRmVeSWpSXmKPExsWyRsSkRjfo/KVAg99tTBYdhx4zWbxpa2S0 mHL4C4vFty3bGC2Wv97IbvF2bye7A5vH7IaLLB7zZp1g8ViwqdTjzrU9bB5n7+xgDGCN4rJJ Sc3JLEst0rdL4Mo4fu4YU8E7/opzG3MbGHfydjFycEgImEjM703uYuQEMsUkLtxbzwZiCwks ZZSYe8gPIm4i0XPkAWMXIxdQfBGjRO/2zWwQzhQmiRXdL8A62AR0JZre7mIEsUUEJCR+9V8F 62AWmM4o8eD4OWaQ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FpTmpxYcY k4GumsgsJZqcD4zsvJJ4Q2MTc1NjU0sTCxMzS9KElcR5D7ZaBwoJpCeWpGanphakFsFsYeLg lGpgnBSxhTsz/+l2ycibL1Tf/FY2i2BTOO/xo/5BSZr2/edht/v/WO+fzOKoVpX/2Hi52kaB xoS1Zb3185q/VOzWrbH9XqWcN6HH9urTO382lfvd37M0OUR7UltV6ltZ7yV8RyYqJk1y8muO 81KLjGN/+ujTvxPySlkX6zb8CjmRE29ul7L8tG2EEktxRqKhFnNRcSIAJOwieOICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnEZ4b/vf/OjqYUGCirThV8mDAIwPQ+w9isILmp/u5o4o2eGMN12lEam1Awm/TZ8ml4EiRd X-Original-Sender: gautam.vivek@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Adding methods to turn on/off power to USB3.0 type PHY as and when required by the controller. Signed-off-by: Vivek Gautam Cc: Julius Werner Cc: Simon Glass Cc: Marek Vasut --- arch/arm/cpu/armv7/exynos/power.c | 22 ++++++++++++++++++++++ arch/arm/include/asm/arch-exynos/power.h | 5 +++++ 2 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c index 6375a81..f5e631b 100644 --- a/arch/arm/cpu/armv7/exynos/power.c +++ b/arch/arm/cpu/armv7/exynos/power.c @@ -75,6 +75,28 @@ void set_usbhost_phy_ctrl(unsigned int enable) exynos5_set_usbhost_phy_ctrl(enable); } +static void exynos5_set_usbdrd_phy_ctrl(unsigned int enable) +{ + struct exynos5_power *power = + (struct exynos5_power *)samsung_get_base_power(); + + if (enable) { + /* Enabling USBDRD_PHY */ + setbits_le32(&power->usbdrd_phy_control, + POWER_USB_DRD_PHY_CTRL_EN); + } else { + /* Disabling USBDRD_PHY */ + clrbits_le32(&power->usbdrd_phy_control, + POWER_USB_DRD_PHY_CTRL_EN); + } +} + +void set_usbdrd_phy_ctrl(unsigned int enable) +{ + if (cpu_is_exynos5()) + exynos5_set_usbdrd_phy_ctrl(enable); +} + static void exynos5_dp_phy_control(unsigned int enable) { unsigned int cfg; diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h index 3549667..41db585 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -863,6 +863,11 @@ void set_hw_thermal_trip(void); #define POWER_USB_HOST_PHY_CTRL_EN (1 << 0) #define POWER_USB_HOST_PHY_CTRL_DISABLE (0 << 0) +void set_usbdrd_phy_ctrl(unsigned int enable); + +#define POWER_USB_DRD_PHY_CTRL_EN (1 << 0) +#define POWER_USB_DRD_PHY_CTRL_DISABLE (0 << 0) + void set_dp_phy_ctrl(unsigned int enable); #define EXYNOS_DP_PHY_ENABLE (1 << 0)