Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp420836imm; Tue, 5 Jun 2018 23:10:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5J9G3PPXN+Sy1ItJzGgYcrPT1ZUdlBLBMqMjkcnqTFKKUzG2EsnKsaKEl6PWjoey/Rj5P X-Received: by 2002:a17:902:52ee:: with SMTP id a101-v6mr1889727pli.131.1528265451918; Tue, 05 Jun 2018 23:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528265451; cv=none; d=google.com; s=arc-20160816; b=FHN0Yt2WBGYOC9icpuXNRh6C7ME+I7NC0snryzPx11Hg6Y01AWZFSsI2tvperHirnF QGtDcDr7D5YCxgdy8YEI/+YDouZQSmX/PHbGG9XOX78L+HOdk6Gf1DWbJUibZxPKvTGW hE0sXpmHsUYsx3VgkQWQhV3MsQlqZmpeMzmSMQ+EtEPnMvSRynMMgcB9Swb/Ni5LqQdm bIn8B8L2UlRY0PksxLUe5FuE48Z/b7fUnIEk8NQYOy3/UKiEJ+rPL+WdIFyPi6XFOGdA YAFroZuqr7zJylBZnLFjHMXm3b5SvhJpvbV2e1UcPi3LCBqfp72XEzwmLLqymWPXAhVY FhiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=B2UyEu9YxYvKmHowGUPYi6XKNpTkVyEt6R0H+hhs8gA=; b=fhCddz//cWdelYrxC/XVkPkmlVTZp43tz0k1vdqnJbbnihpFQLmy3nv9AhfxRk+1/3 AzFqX0asYepz2JtHwuvQScn+qHqKuSrb3mNWuefX+jCRMT8m5vkXaRbUWJTwEODiVvm0 aLSDszkvEG++GYx04H4hFyZi68VbjhZbb4i4Zc3aEu7m4i8m6zqsh5eVFmdcI7dbKd3k +6LH7chN9LQHNMSit0iXVASMg72Vt7RDLyvnisodQLWZiTZJWfesaA/HCaiTjeid+fKS 1BESHujxLQxEEs1REgvDomnbi6HqZbIzvbZ5idMkhLroVEgexJH63o7qL+vmrcOrS1n3 8Z8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=L+hokINg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si12604852pgt.362.2018.06.05.23.10.37; Tue, 05 Jun 2018 23:10:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=L+hokINg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752410AbeFFGHg (ORCPT + 99 others); Wed, 6 Jun 2018 02:07:36 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:35808 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbeFFGH2 (ORCPT ); Wed, 6 Jun 2018 02:07:28 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w5667Do0010288; Wed, 6 Jun 2018 01:07:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1528265233; bh=B2UyEu9YxYvKmHowGUPYi6XKNpTkVyEt6R0H+hhs8gA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=L+hokINgVKabtQ15hq/FAD9FZlL0hL6gy0ARsqbB2jtwXElmgC8i3bzn6ssqgLhQn ulioFHjugToMLZ1G8xe77P0+nmuaixeScHeo5Y+IoHEXUsrAIV51miQ38q8ngcHgL/ 4q9TFB7y7zDfzC0zFbid+F3hi9gd3ibKM89buUn8= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w5667Dvr025023; Wed, 6 Jun 2018 01:07:13 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 6 Jun 2018 01:07:13 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 6 Jun 2018 01:07:13 -0500 Received: from a0230074-OptiPlex-7010.india.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 w5666wtW012358; Wed, 6 Jun 2018 01:07:10 -0500 From: Faiz Abbas To: , , , , CC: , , , , , , Subject: [PATCH v3 3/6] bus: ti-sysc: Add support for using ti-sysc for MCAN on dra76x Date: Wed, 6 Jun 2018 11:38:23 +0530 Message-ID: <20180606060826.14671-4-faiz_abbas@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180606060826.14671-1-faiz_abbas@ti.com> References: <20180606060826.14671-1-faiz_abbas@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The dra76x MCAN generic interconnect module has a its own format for the bits in the control registers. Therefore add a new module type, new regbits and new capabilities specific to the MCAN module. Acked-by: Rob Herring CC: Tony Lindgren Signed-off-by: Faiz Abbas --- .../devicetree/bindings/bus/ti-sysc.txt | 1 + drivers/bus/ti-sysc.c | 18 ++++++++++++++++++ include/dt-bindings/bus/ti-sysc.h | 2 ++ include/linux/platform_data/ti-sysc.h | 1 + 4 files changed, 22 insertions(+) diff --git a/Documentation/devicetree/bindings/bus/ti-sysc.txt b/Documentation/devicetree/bindings/bus/ti-sysc.txt index 2957a9ae291f..ebbb11144b7b 100644 --- a/Documentation/devicetree/bindings/bus/ti-sysc.txt +++ b/Documentation/devicetree/bindings/bus/ti-sysc.txt @@ -36,6 +36,7 @@ Required standard properties: "ti,sysc-omap-aes" "ti,sysc-mcasp" "ti,sysc-usb-host-fs" + "ti,sysc-dra7-mcan" - reg shall have register areas implemented for the interconnect target module in question such as revision, sysc and syss diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 7cd2fd04b212..4a2244419b9b 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -1262,6 +1262,23 @@ static const struct sysc_capabilities sysc_omap4_usb_host_fs = { .regbits = &sysc_regbits_omap4_usb_host_fs, }; +static const struct sysc_regbits sysc_regbits_dra7_mcan = { + .dmadisable_shift = -ENODEV, + .midle_shift = -ENODEV, + .sidle_shift = -ENODEV, + .clkact_shift = -ENODEV, + .enwkup_shift = 4, + .srst_shift = 0, + .emufree_shift = -ENODEV, + .autoidle_shift = -ENODEV, +}; + +static const struct sysc_capabilities sysc_dra7_mcan = { + .type = TI_SYSC_DRA7_MCAN, + .sysc_mask = SYSC_DRA7_MCAN_ENAWAKEUP | SYSC_OMAP4_SOFTRESET, + .regbits = &sysc_regbits_dra7_mcan, +}; + static int sysc_init_pdata(struct sysc *ddata) { struct ti_sysc_platform_data *pdata = dev_get_platdata(ddata->dev); @@ -1441,6 +1458,7 @@ static const struct of_device_id sysc_match[] = { { .compatible = "ti,sysc-mcasp", .data = &sysc_omap4_mcasp, }, { .compatible = "ti,sysc-usb-host-fs", .data = &sysc_omap4_usb_host_fs, }, + { .compatible = "ti,sysc-dra7-mcan", .data = &sysc_dra7_mcan, }, { }, }; MODULE_DEVICE_TABLE(of, sysc_match); diff --git a/include/dt-bindings/bus/ti-sysc.h b/include/dt-bindings/bus/ti-sysc.h index 2c005376ac0e..7138384e2ef9 100644 --- a/include/dt-bindings/bus/ti-sysc.h +++ b/include/dt-bindings/bus/ti-sysc.h @@ -15,6 +15,8 @@ /* SmartReflex sysc found on 36xx and later */ #define SYSC_OMAP3_SR_ENAWAKEUP (1 << 26) +#define SYSC_DRA7_MCAN_ENAWAKEUP (1 << 4) + /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */ #define SYSC_IDLE_FORCE 0 #define SYSC_IDLE_NO 1 diff --git a/include/linux/platform_data/ti-sysc.h b/include/linux/platform_data/ti-sysc.h index 80ce28d40832..1ea3aab972b4 100644 --- a/include/linux/platform_data/ti-sysc.h +++ b/include/linux/platform_data/ti-sysc.h @@ -14,6 +14,7 @@ enum ti_sysc_module_type { TI_SYSC_OMAP4_SR, TI_SYSC_OMAP4_MCASP, TI_SYSC_OMAP4_USB_HOST_FS, + TI_SYSC_DRA7_MCAN, }; struct ti_sysc_cookie { -- 2.17.0