From patchwork Fri Jun 5 09:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Sm9obnNvbiBDSCBDaGVuICjpmbPmmK3li7Mp?= X-Patchwork-Id: 11589271 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D981C175A for ; Fri, 5 Jun 2020 09:35:44 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B41C2207D3 for ; Fri, 5 Jun 2020 09:35:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.cip-project.org header.i=@lists.cip-project.org header.b="UPgKcBKO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B41C2207D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=moxa.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+64572+4722+4520428+8129116@lists.cip-project.org X-Received: by 127.0.0.2 with SMTP id siYFYY4521763xq6C2fkd7wh; Fri, 05 Jun 2020 02:35:44 -0700 X-Received: from APC01-PU1-obe.outbound.protection.outlook.com (APC01-PU1-obe.outbound.protection.outlook.com []) by mx.groups.io with SMTP id smtpd.web10.7257.1591349742430264239 for ; Fri, 05 Jun 2020 02:35:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LynztU/u07JSURM6GaYxkoJL8PLmjNMPsOSym4lCzreMluwOKbzHpj4/bgH7CiW2VIVdTRzw+rbbXFS1arFZ18V+2Y9ZUxsJv4jXE/1OhYyOyqgNzSDhXb6Lt/3FXYw2UkE38DiMrfQWLSadt0YWydO8ISaJOzT79yBCz/U46dHoXsXR3N0VHu2Kx4O8mvXY3hM6kWEGhPlgYk5xaTdHa17mZPaiKcHQQN9rIFUGBNCm4DjiQUiBcwlnQ3HLwfPvBpfU0jKL3rXMrf7QKcOsq1S2kNVWECHCBFReHldjBMJiauvuDWIegFPiJ+4ttbatY8sQYWpdNEREObwrUO3AEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+3/agXVD2QJrJ0YOKTyQtSIeiVOVBl297/dTLpolViE=; b=BrGRg9fiubPrC1ukqhujXs++Rk9hIBVcOiDh+SA1/MRD7LCP8YvvIJ0phQBbtxq1DYXxK7raN5WrnL7AyAJ/0ESz8gO3NA8nuA2+OJrXhq7h54Q0jv0oHl6EuEhfhTaN8wPKF/0uRCWZHdcw2/Ikbvg57ta0xvB3JUa1X5DglBDn36Dz/IMCQV778e+hzGQKIBy9bcKn/WqgHy8jK3AREC8RqayhxSRraHSIVXQrCtP+76+ikJgcZkUo1asePFewOJW8kC6rRPxI9ORMTe603kY3zvIFnKmOGiAhC8H3KZaD4GkAXhLhGOo6P0JnnCYULhiE0NQ9oYje25UxGqZHNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=moxa.com; dmarc=pass action=none header.from=moxa.com; dkim=pass header.d=moxa.com; arc=none X-Received: from HK2PR01MB3281.apcprd01.prod.exchangelabs.com (2603:1096:202:22::12) by HK2PR01MB3140.apcprd01.prod.exchangelabs.com (2603:1096:202:18::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Fri, 5 Jun 2020 09:35:41 +0000 X-Received: from HK2PR01MB3281.apcprd01.prod.exchangelabs.com ([fe80::712b:170d:f873:68a3]) by HK2PR01MB3281.apcprd01.prod.exchangelabs.com ([fe80::712b:170d:f873:68a3%6]) with mapi id 15.20.3066.018; Fri, 5 Jun 2020 09:35:41 +0000 From: "johnsonch.chen@moxa.com" To: "nobuhiro1.iwamatsu@toshiba.co.jp" , "pavel@denx.de" , "cip-dev@lists.cip-project.org" Subject: [cip-dev][PATCH 4.4.y-cip 1/2] ARM: DTS: am33xx: Use the new DT bindings for the eDMA3 Thread-Topic: [cip-dev][PATCH 4.4.y-cip 1/2] ARM: DTS: am33xx: Use the new DT bindings for the eDMA3 Thread-Index: AdY7G8WKfCaPk2RlSCampVV/E3SVxA== Date: Fri, 5 Jun 2020 09:35:41 +0000 Message-ID: Accept-Language: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [123.51.145.16] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1a7c2451-78b8-454c-8a6e-08d80933d07b x-ms-traffictypediagnostic: HK2PR01MB3140: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1148; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: dX1kzC/OwxDY7NQm4OH5zH1bLqYFYc2xoBvchkhaRFI90z/WkPsUTGxUoBjhaw4xQByY4eBtSHTeN8Oa2LAu5wog0kuPRnE0M2CLczdfWUaH8zJt6xXn76zg/USpREYkiGXnMjplE5ttDJEJG3VUYCk4FKIAaq0YUE9sTP268BD9bSp+ekCr/ccjTUOmk3f8u+IA80dUwjBY8eKTcCMLi5cx4/nHvEpgoWT+Jef3MirKbSDyDhDPMVQFOTc7zbsK2CgeWgl9s9h0Ud/qyamvixHjT9m9O9RTXOQXIz0ckBWJPeB4HxvNaGk0Cy6Ql2tKklV6rGH12WzDf+fudwfglw== x-ms-exchange-antispam-messagedata: WF2QrzYGYT5+bpaHtOczmJiE6XISlvyFtD0BgmkFRxBK8ZtRJ64dW9ha7oj6ZNzA47n6emcS+t/s+5nwa4ViY1JsdwMFlTd2DNgtIFuk9RyifA7WwC8W+ilzqE9AtEQsoo2V0sCvIgWnCiQYu99qKf5znBTucFaaMi/fxWDqCJMfLRbmaCckMhrH0IpiUcgkYl0cl8VBmqpVjo0o2CcBNjDOpzTmFK7bEuZiXUNas6Yl5fCkgvzfemQoAfbyxWeF8A+5s6xGDsJRBS18Cw2IfJSTwOGllSANLDWxkeGNWIUoN/O0oaRSK0F0dwwBKzQjrOs2ExZJZSPJnzhvWjouc+Zm8b3EK80E5ZoCmUGi6SOazHGf35Ya39kEU0zDhbMV0RUirhJjbMRdSY4mYvXg6FMaU7/jp+ATEPB+rFk80NBTe0gMu7qwzFb10xIdJmJKUWtI5j81mivWlkUGOXQH6tbS4UtjO7KdjgqUgPlYRTo= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: moxa.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a7c2451-78b8-454c-8a6e-08d80933d07b X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2020 09:35:41.7655 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5571c7d4-286b-47f6-9dd5-0aa688773c8e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fLN5/LmDdHpBlHBJ50BafXeasp6tVLNvIcOdACDSmnH1LBAkIsBv3pJBcP6uPadvFjiQFnaFcGLl/UZaw1dl1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR01MB3140 Precedence: Bulk List-Unsubscribe: Sender: cip-dev@lists.cip-project.org List-Id: Mailing-List: list cip-dev@lists.cip-project.org; contact cip-dev+owner@lists.cip-project.org Delivered-To: mailing list cip-dev@lists.cip-project.org Reply-To: cip-dev@lists.cip-project.org X-Gm-Message-State: 7etEibiAd5YJ4BR7NYAOmobEx4520428AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.cip-project.org; q=dns/txt; s=20140610; t=1591349744; bh=mEkNyIUzk4ztggNE34DBvNylKjhbaAg3nH4TlANIyhI=; h=Content-Type:Date:From:Reply-To:Subject:To; b=UPgKcBKOfE530bUSsnXLYLmHXniXAaDnk6lRQMem5AefwTzVkofnZ6Ry5MjzAtVqcOy PaTkmJEFNtEhPxjG0ismzkgoZ5cVlPJaXWbfJv1j7kAfzE+Opti2Rq8A5O0tHippnHX5g /BnaHxUaTIgVyVYZfHNNLQi6mEhV6xZqrnM= From: Peter Ujfalusi commit b5e5090660742c838ddc0b5d1a001e6fe3d5bfd5 upstream. Switch to use the ti,edma3-tpcc and ti,edma3-tptc binding for the eDMA3 and enable the DMA even crossbar with ti,am335x-edma-crossbar. With the new bindings boards can customize and tweak the DMA channel priority to match their needs. With the new binding the memcpy is safe to be used since with the old binding it was not possible for a driver to know which channel is allowed to be used as non HW triggered channel. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren Signed-off-by: Johnson Chen --- arch/arm/boot/dts/am335x-evm.dts | 9 +--- arch/arm/boot/dts/am335x-pepper.dts | 11 +---- arch/arm/boot/dts/am33xx.dtsi | 94 ++++++++++++++++++++++++++----------- 3 files changed, 71 insertions(+), 43 deletions(-) diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts index 2b8614e406f0..656d4304ab6b 100644 --- a/arch/arm/boot/dts/am335x-evm.dts +++ b/arch/arm/boot/dts/am335x-evm.dts @@ -743,8 +743,8 @@ &mmc3 { /* these are on the crossbar and are outlined in the xbar-event-map element */ - dmas = <&edma 12 - &edma 13>; + dmas = <&edma_xbar 12 0 1 + &edma_xbar 13 0 2>; dma-names = "tx", "rx"; status = "okay"; vmmc-supply = <&wlan_en_reg>; @@ -766,11 +766,6 @@ }; }; -&edma { - ti,edma-xbar-event-map = /bits/ 16 <1 12 - 2 13>; -}; - &sham { status = "okay"; }; diff --git a/arch/arm/boot/dts/am335x-pepper.dts b/arch/arm/boot/dts/am335x-pepper.dts index 7106114c7464..39073b921664 100644 --- a/arch/arm/boot/dts/am335x-pepper.dts +++ b/arch/arm/boot/dts/am335x-pepper.dts @@ -339,13 +339,6 @@ ti,non-removable; }; -&edma { - /* Map eDMA MMC2 Events from Crossbar */ - ti,edma-xbar-event-map = /bits/ 16 <1 12 - 2 13>; -}; - - &mmc3 { /* Wifi & Bluetooth on MMC #3 */ status = "okay"; @@ -354,8 +347,8 @@ vmmmc-supply = <&v3v3c_reg>; bus-width = <4>; ti,non-removable; - dmas = <&edma 12 - &edma 13>; + dmas = <&edma_xbar 12 0 1 + &edma_xbar 13 0 2>; dma-names = "tx", "rx"; }; diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index be9c37e89be1..4b40e6d401a0 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi @@ -162,6 +162,14 @@ mboxes = <&mailbox &mbox_wkupm3>; }; + edma_xbar: dma-router@f90 { + compatible = "ti,am335x-edma-crossbar"; + reg = <0xf90 0x40>; + #dma-cells = <3>; + dma-requests = <32>; + dma-masters = <&edma>; + }; + scm_clockdomains: clockdomains { }; }; @@ -175,12 +183,44 @@ }; edma: edma@49000000 { - compatible = "ti,edma3"; - ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; - reg = <0x49000000 0x10000>, - <0x44e10f90 0x40>; + compatible = "ti,edma3-tpcc"; + ti,hwmods = "tpcc"; + reg = <0x49000000 0x10000>; + reg-names = "edma3_cc"; interrupts = <12 13 14>; - #dma-cells = <1>; + interrupt-names = "edma3_ccint", "emda3_mperr", + "edma3_ccerrint"; + dma-requests = <64>; + #dma-cells = <2>; + + ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 5>, + <&edma_tptc2 0>; + + ti,edma-memcpy-channels = <20 21>; + }; + + edma_tptc0: tptc@49800000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc0"; + reg = <0x49800000 0x100000>; + interrupts = <112>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc1: tptc@49900000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc1"; + reg = <0x49900000 0x100000>; + interrupts = <113>; + interrupt-names = "edma3_tcerrint"; + }; + + edma_tptc2: tptc@49a00000 { + compatible = "ti,edma3-tptc"; + ti,hwmods = "tptc2"; + reg = <0x49a00000 0x100000>; + interrupts = <114>; + interrupt-names = "edma3_tcerrint"; }; gpio0: gpio@44e07000 { @@ -234,7 +274,7 @@ reg = <0x44e09000 0x2000>; interrupts = <72>; status = "disabled"; - dmas = <&edma 26>, <&edma 27>; + dmas = <&edma 26 0>, <&edma 27 0>; dma-names = "tx", "rx"; }; @@ -245,7 +285,7 @@ reg = <0x48022000 0x2000>; interrupts = <73>; status = "disabled"; - dmas = <&edma 28>, <&edma 29>; + dmas = <&edma 28 0>, <&edma 29 0>; dma-names = "tx", "rx"; }; @@ -256,7 +296,7 @@ reg = <0x48024000 0x2000>; interrupts = <74>; status = "disabled"; - dmas = <&edma 30>, <&edma 31>; + dmas = <&edma 30 0>, <&edma 31 0>; dma-names = "tx", "rx"; }; @@ -323,8 +363,8 @@ ti,dual-volt; ti,needs-special-reset; ti,needs-special-hs-handling; - dmas = <&edma 24 - &edma 25>; + dmas = <&edma_xbar 24 0 0 + &edma_xbar 25 0 0>; dma-names = "tx", "rx"; interrupts = <64>; interrupt-parent = <&intc>; @@ -336,8 +376,8 @@ compatible = "ti,omap4-hsmmc"; ti,hwmods = "mmc2"; ti,needs-special-reset; - dmas = <&edma 2 - &edma 3>; + dmas = <&edma 2 0 + &edma 3 0>; dma-names = "tx", "rx"; interrupts = <28>; interrupt-parent = <&intc>; @@ -475,10 +515,10 @@ interrupts = <65>; ti,spi-num-cs = <2>; ti,hwmods = "spi0"; - dmas = <&edma 16 - &edma 17 - &edma 18 - &edma 19>; + dmas = <&edma 16 0 + &edma 17 0 + &edma 18 0 + &edma 19 0>; dma-names = "tx0", "rx0", "tx1", "rx1"; status = "disabled"; }; @@ -491,10 +531,10 @@ interrupts = <125>; ti,spi-num-cs = <2>; ti,hwmods = "spi1"; - dmas = <&edma 42 - &edma 43 - &edma 44 - &edma 45>; + dmas = <&edma 42 0 + &edma 43 0 + &edma 44 0 + &edma 45 0>; dma-names = "tx0", "rx0", "tx1", "rx1"; status = "disabled"; }; @@ -832,7 +872,7 @@ ti,hwmods = "sham"; reg = <0x53100000 0x200>; interrupts = <109>; - dmas = <&edma 36>; + dmas = <&edma 36 0>; dma-names = "rx"; }; @@ -841,8 +881,8 @@ ti,hwmods = "aes"; reg = <0x53500000 0xa0>; interrupts = <103>; - dmas = <&edma 6>, - <&edma 5>; + dmas = <&edma 6 0>, + <&edma 5 0>; dma-names = "tx", "rx"; }; @@ -855,8 +895,8 @@ interrupts = <80>, <81>; interrupt-names = "tx", "rx"; status = "disabled"; - dmas = <&edma 8>, - <&edma 9>; + dmas = <&edma 8 2>, + <&edma 9 2>; dma-names = "tx", "rx"; }; @@ -869,8 +909,8 @@ interrupts = <82>, <83>; interrupt-names = "tx", "rx"; status = "disabled"; - dmas = <&edma 10>, - <&edma 11>; + dmas = <&edma 10 2>, + <&edma 11 2>; dma-names = "tx", "rx"; };