From patchwork Mon Jan 22 17:05:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 190262 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2731649dyb; Mon, 22 Jan 2024 09:45:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjvF3zdl7rUIml//Gxf7RSKfbOBKJzXwKmj3PKS1MvQ5s1vXNs7ieT6dH+1yQKZn3j6qCq X-Received: by 2002:a2e:8013:0:b0:2cd:55f1:2518 with SMTP id j19-20020a2e8013000000b002cd55f12518mr1907362ljg.88.1705945546422; Mon, 22 Jan 2024 09:45:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705945546; cv=pass; d=google.com; s=arc-20160816; b=XK5Oy59HlsILTdL1yfj3FakArEIKsd/RUBkPHVEFw/e83VFBMpK7HrT6pEIi00Q/kj 9tR0NjoFWYT/5Rf4d97RnHwJi/O1GCkYhSQBDQLhPG6SFqiGZt5s4jZqdgfd7A1NmkjV ChDMCFgbw++sYSOzgP2uxBW2NDF5bm9vDUi39H7VbNTKtaho3Iit4GVpQpkyTbxaNY+4 4pOd4Xg4qZm+FU1lJWzbc14KYD33likesPdNMBr1feSsmLgnsbeekSREwAjd610iq/WP 4zBPlYarlKEZZ40iB9CQCW6E0Vo6Jipuco+mfXTpyVUlbNGlzcMi+lEzVOV6OXn1gtgX Oj5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sNR6AwvIxI0ASUkhTykwA73cP/Tqi5mYOGHUZhcgxGs=; fh=m1+VV4HTiGNm18uZzn/d6hCG96aBwlw9t3UKL+x124s=; b=qoHRY5b/8tuff2pfzHnkoe0ZaygUoyb2fs02pfkhVGa8bMl7OQXJhnMn3hCqmYMIc6 isug+KUCIioQE1qPGLl/T8LhskqXMTv/ff26C/uh+f804lqvigaFB1WEkwPKze1188er DIdtKi5QChjsqTAXPcfoE3DRtU8FlDKFRAHxc0zSoW9A0QENUAm1rOQV6qLcOoyu3lzh knMSXHL/hlqE4rV0YVCRXOM//K+QZd+ccXvnH2l41l+nl3X+kwVhIdhT0cZOTiuTXoEc nog2f1k8KZMlr+6wBAgMnAkiW6RoJ3n5Ty6hAQpm63qQ6D9oksGD3cC935LntIxjXfRe F5Vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rB29qSMA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33748-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33748-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fg12-20020a056402548c00b0055c2fd2bcadsi1414612edb.181.2024.01.22.09.45.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 09:45:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33748-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rB29qSMA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33748-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33748-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D1E301F26A36 for ; Mon, 22 Jan 2024 17:45:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 619435DF15; Mon, 22 Jan 2024 17:05:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rB29qSMA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63D015C918; Mon, 22 Jan 2024 17:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705943135; cv=none; b=tapLr0xcazgzPyhY8dO8azHyXdJeq0LerZYnf5dzEYmVIGc25yQD/yG74JTm3OGBbB45U61RLAv7lfSzs8pUDLSQApZFAAnyxxss44lBudsrDq97iyqPrPerGPk65MdJIMto6lngrcN+Sy+hdrHSwCqH1m3+aJnrBBPq8sryYhI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705943135; c=relaxed/simple; bh=aUTMYzjs78uYTiEQAgGmOm7LBsj4lDRYJ/Ilq8T3RhQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qxKYmURhEZLnEpg/ZkAXz/n+yEZUNmtbT1scjwEMFhuPSPjZ2m1ODp7llZHYJQYhiHN4n900bTs2lmNErtoa4K2D23GNTj8hgAzgoQKTWvNtowToVJMBj8jF5QHQRkQnIY8HoHsRplBlrl4PnEIqMIvFn+ZboOmpUiLAamWTnwI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rB29qSMA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10F92C43601; Mon, 22 Jan 2024 17:05:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705943135; bh=aUTMYzjs78uYTiEQAgGmOm7LBsj4lDRYJ/Ilq8T3RhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rB29qSMAhfPSXzKG1+4qWSzciEb+EdBeCnD9CUDsyTaFZmnR6srgzEqZXVe58s/CY eQw60vlZoD+EZt5SLzvsiZfkZ8svf6WH4CedqO448K2gJNwcxtYP0U01Ecqm3uC5nN eItWsVbDULugmrunkBcbqsiAegL3laJg6Z5395omqJ3j2Nk4HFWehA7es/d8m93dn5 ztYIfgYYZ/DekH5rIgMHlMUXjvDASwiHy06I3HtY+QTpPHY33yC28mrJytg64uEdpE oyPhSEDTzqKExBUlBJvn1QvbmH354riPLnwdO5vbGRYGJOCowNq6x4Clq8g5PpJDQI 1BmYN0KhW+CuQ== Received: by wens.tw (Postfix, from userid 1000) id 20624600A4; Tue, 23 Jan 2024 01:05:30 +0800 (CST) From: Chen-Yu Tsai To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jernej Skrabec , Samuel Holland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] arm64: dts: allwinner: h616: Add DMA controller and DMA channels Date: Tue, 23 Jan 2024 01:05:17 +0800 Message-Id: <20240122170518.3090814-7-wens@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240122170518.3090814-1-wens@kernel.org> References: <20240122170518.3090814-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788813557460048340 X-GMAIL-MSGID: 1788813557460048340 From: Chen-Yu Tsai The DMA controllers found on the H616 and H618 are the same as the one found on the H6. The only difference is the DMA endpoint (DRQ) layout. Add a device node for it, and add DMA channels for existing peripherals. Signed-off-by: Chen-Yu Tsai --- .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi index d549d277d972..a0268439f3be 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi @@ -133,6 +133,19 @@ ccu: clock@3001000 { #reset-cells = <1>; }; + dma: dma-controller@3002000 { + compatible = "allwinner,sun50i-h616-dma", + "allwinner,sun50i-h6-dma"; + reg = <0x03002000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>; + clock-names = "bus", "mbus"; + dma-channels = <16>; + dma-requests = <49>; + resets = <&ccu RST_BUS_DMA>; + #dma-cells = <1>; + }; + sid: efuse@3006000 { compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid"; reg = <0x03006000 0x1000>; @@ -339,6 +352,8 @@ uart0: serial@5000000 { reg-shift = <2>; reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART0>; + dmas = <&dma 14>, <&dma 14>; + dma-names = "tx", "rx"; resets = <&ccu RST_BUS_UART0>; status = "disabled"; }; @@ -350,6 +365,8 @@ uart1: serial@5000400 { reg-shift = <2>; reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART1>; + dmas = <&dma 15>, <&dma 15>; + dma-names = "tx", "rx"; resets = <&ccu RST_BUS_UART1>; status = "disabled"; }; @@ -361,6 +378,8 @@ uart2: serial@5000800 { reg-shift = <2>; reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART2>; + dmas = <&dma 16>, <&dma 16>; + dma-names = "tx", "rx"; resets = <&ccu RST_BUS_UART2>; status = "disabled"; }; @@ -372,6 +391,8 @@ uart3: serial@5000c00 { reg-shift = <2>; reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART3>; + dmas = <&dma 17>, <&dma 17>; + dma-names = "tx", "rx"; resets = <&ccu RST_BUS_UART3>; status = "disabled"; }; @@ -383,6 +404,8 @@ uart4: serial@5001000 { reg-shift = <2>; reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART4>; + dmas = <&dma 18>, <&dma 18>; + dma-names = "tx", "rx"; resets = <&ccu RST_BUS_UART4>; status = "disabled"; }; @@ -394,6 +417,8 @@ uart5: serial@5001400 { reg-shift = <2>; reg-io-width = <4>; clocks = <&ccu CLK_BUS_UART5>; + dmas = <&dma 19>, <&dma 19>; + dma-names = "tx", "rx"; resets = <&ccu RST_BUS_UART5>; status = "disabled"; }; @@ -405,6 +430,8 @@ i2c0: i2c@5002000 { reg = <0x05002000 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C0>; + dmas = <&dma 43>, <&dma 43>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_I2C0>; pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; @@ -420,6 +447,8 @@ i2c1: i2c@5002400 { reg = <0x05002400 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C1>; + dmas = <&dma 44>, <&dma 44>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_I2C1>; status = "disabled"; #address-cells = <1>; @@ -433,6 +462,8 @@ i2c2: i2c@5002800 { reg = <0x05002800 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C2>; + dmas = <&dma 45>, <&dma 45>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_I2C2>; status = "disabled"; #address-cells = <1>; @@ -446,6 +477,8 @@ i2c3: i2c@5002c00 { reg = <0x05002c00 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C3>; + dmas = <&dma 46>, <&dma 46>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_I2C3>; status = "disabled"; #address-cells = <1>; @@ -459,6 +492,8 @@ i2c4: i2c@5003000 { reg = <0x05003000 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C4>; + dmas = <&dma 47>, <&dma 47>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_I2C4>; status = "disabled"; #address-cells = <1>; @@ -472,6 +507,8 @@ spi0: spi@5010000 { interrupts = ; clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>; clock-names = "ahb", "mod"; + dmas = <&dma 22>, <&dma 22>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_SPI0>; status = "disabled"; #address-cells = <1>; @@ -485,6 +522,8 @@ spi1: spi@5011000 { interrupts = ; clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_SPI1>; clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; resets = <&ccu RST_BUS_SPI1>; status = "disabled"; #address-cells = <1>;