From patchwork Thu Oct 12 19:27:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit Parrot X-Patchwork-Id: 10002663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7B38160216 for ; Thu, 12 Oct 2017 19:29:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EA452851A for ; Thu, 12 Oct 2017 19:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6377A286BA; Thu, 12 Oct 2017 19:29:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1815C2851A for ; Thu, 12 Oct 2017 19:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753225AbdJLT1h (ORCPT ); Thu, 12 Oct 2017 15:27:37 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:15171 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752744AbdJLT1d (ORCPT ); Thu, 12 Oct 2017 15:27:33 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9CJRUF0017225; Thu, 12 Oct 2017 14:27:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1507836450; bh=kgR7BksDww37Xy6jxrSng+4X64MPPKc4zkh89ORRquU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=RdR4U0kC61VX2v08WkcKqV8JGHyI7q65bl5B0DOHdlNgzcRJ56uTomoVyaa7gSpU5 Syr/hjAptuFP5nROuD+XjG3fIwkelPP3xSUwjaBVCIUBwHE5ntBjdWlzaaT2v5EPcd 8UkqrhA0Ossir/xAswvE0bDVjoeeCOPaKiy5pBLc= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9CJRUmC023500; Thu, 12 Oct 2017 14:27:30 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 12 Oct 2017 14:27:29 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 12 Oct 2017 14:27:29 -0500 Received: from uda0869644a.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9CJRPPM024242; Thu, 12 Oct 2017 14:27:29 -0500 From: Benoit Parrot To: Tony Lindgren , Tero Kristo , Rob Herring CC: , , , , Benoit Parrot Subject: [Patch 2/6] ARM: DRA7: hwmod: Add CAL nodes Date: Thu, 12 Oct 2017 14:27:15 -0500 Message-ID: <20171012192719.15193-3-bparrot@ti.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171012192719.15193-1-bparrot@ti.com> References: <20171012192719.15193-1-bparrot@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the required hwmod nodes to support the Camera Adaptation Layer (CAL) for the DRA72 family of devices. - Added CAL hwmod entry in the DRA72x section. The DRA72x TRM (Literature Number SPRUHP2x) states that CAL only support NO_IDLE, FORCE_IDLE and SMART_IDLE. Although CAL does not support standby mode per se hwmod would not enabled the functional/interface clock if module is not a master. Hence the SWSUP mode flags ifor SIDLE ans MSTANDBY are also enabled. This ensure that i/f clocks are available when CAL is enabled. Signed-off-by: Benoit Parrot --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 2f4f7002f38d..fc53b498975c 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -240,6 +240,41 @@ static struct omap_hwmod dra7xx_bb2d_hwmod = { }; /* + * 'cal' class + * + */ + +static struct omap_hwmod_class_sysconfig dra7xx_cal_sysc = { + .sysc_offs = 0x0010, + .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_RESET_STATUS | + SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE), + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | + MSTANDBY_FORCE | MSTANDBY_NO), + .sysc_fields = &omap_hwmod_sysc_type2, +}; + +static struct omap_hwmod_class dra7xx_cal_hwmod_class = { + .name = "cal", + .sysc = &dra7xx_cal_sysc, +}; + +/* cal */ +static struct omap_hwmod dra7xx_cal_hwmod = { + .name = "cal", + .class = &dra7xx_cal_hwmod_class, + .clkdm_name = "cam_clkdm", + .main_clk = "vip2_gclk_mux", + .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_CAM_VIP2_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_CAM_VIP2_CONTEXT_OFFSET, + .modulemode = MODULEMODE_HWCTRL, + }, + }, +}; + +/* * 'counter' class * */ @@ -3901,6 +3936,14 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per2__vcp2 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l4_per3 -> cal */ +static struct omap_hwmod_ocp_if dra7xx_l4_per3__cal = { + .master = &dra7xx_l4_per3_hwmod, + .slave = &dra7xx_cal_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* l4_wkup -> wd_timer2 */ static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = { .master = &dra7xx_l4_wkup_hwmod, @@ -4082,6 +4125,7 @@ static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = { }; static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = { + &dra7xx_l4_per3__cal, NULL, };