Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp478510rdb; Mon, 29 Jan 2024 08:03:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyYEYhSlSxJkSBQM5Rw3GS1KI7p0eEd5edV+BtvPV8VKIBrvUNbNiR9j0kktu1xneh0/2L X-Received: by 2002:a05:622a:1749:b0:42a:6061:94ae with SMTP id l9-20020a05622a174900b0042a606194aemr7141637qtk.96.1706544233004; Mon, 29 Jan 2024 08:03:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706544232; cv=pass; d=google.com; s=arc-20160816; b=KS5Exy/CnhWNA1jFiWXXI8p/CfceVecHR42eK8MpDBmHcWN2RkcpUOrzCehYIJmfDG XU+C7igu12O1udclUtRh0iS4cmhqIkb2fWVCyDQms2IXrmzqReJ0S/kql03sEB5HWs+L tZ6b3XDI+ZZhixHGntC22BzxRzYz2lJIYXiWx8sWrN+EeyfOVO1LSQy82aj3xCq/Y3zx WY6B5AFn1N3RpktjBJ837DvcgGTxDKKuwkT8gkHw/CkcGBiiwLR+wPkJef88I9yfZzKK qWVi7bTRf5Pi9CGQKV7fhhK+jPhdkA+z1payCBljEzuWnPr5s0AIn6QRHhNmIixS2sb6 Hssw== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=NTO8NSrYp+3wmzbgBcIzVEt5bDA5RrJwp2U6GpfsJgU=; fh=UWiig1s3fmMOlTSMGWrEATJpXuAxUBcuTQXgzYQfeCg=; b=Z9E652ZCL34CANJV94cn9KW7vz+skA9MGrHIv/t/lFrBjao+EwJMNzMxEvXsh0cgUg 9/aK/uHfgbSy0jOto3WqVuttGBfq+Jltdmwi/zWrRtzeIbuyOmIhTzu80wh3ggfJZBX0 DVpVlqTy7vIZpI6ChlwgiPPBoSqnaxMfRJ1CtAF2KHDiSLSZFwm2buTcItriK1v51Bgs /o/V95X8HOwbjQtIFCvgBd9loGRYexwexxGIAnaav1nd0XhhPBRYNibiuPZn8TaCq5Mv ySwe7TNPyTnCKopcTUo/o0e1s8QTT1dOLri41RR5FIdRt6ewr+eBA4UtgQ9UdO9cR/5G 93Eg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-43049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vw21-20020a05620a565500b00783f634198fsi3621537qkn.232.2024.01.29.08.03.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 08:03:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-43049-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 09D771C23579 for ; Mon, 29 Jan 2024 16:03:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A66EB15531B; Mon, 29 Jan 2024 16:03:20 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 221261552FE; Mon, 29 Jan 2024 16:03:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706544200; cv=none; b=MmfNlaSpV2el8432DzCoHR8p+XnrqtiEEweNXFnkE9lZGvJGyenXY4sWGJyomPmADpybp7b4gkmIYEKnlZuQivnV8DpyXZ4N8MZsvCtp3PZ7ElKhc+J8Va+kZUstq0KpwiWlc3pzhxfufhUPYFZLzcaAv0IG9AUCAmE2ln0PU/I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706544200; c=relaxed/simple; bh=RswJ+iNMz4CBtV4Cr8CVMktyR4DJrm705yqMfUqSDd8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aquAqiFyk4fddEhWzh36t2Q0ITrDlRxIiuL3V/AgTBXBTwRVPIVYOdMHXWc3Hy5Z4FHarGcwDlQXA+TKZ16mSB5A01M91lo4wb85LVNCq0ExGj0TOxy1LgHYRGVKf8LFBjF+LuEoGk+oIAtDHe2vMolNEYYhi5265EL8NUQbgbA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E2AEDA7; Mon, 29 Jan 2024 08:04:00 -0800 (PST) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 508083F738; Mon, 29 Jan 2024 08:03:14 -0800 (PST) Date: Mon, 29 Jan 2024 16:03:11 +0000 From: Andre Przywara To: Chen-Yu Tsai Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jernej Skrabec , Samuel Holland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , 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: Re: [PATCH v2 6/7] arm64: dts: allwinner: h616: Add DMA controller and DMA channels Message-ID: <20240129160311.359d322d@donnerap.manchester.arm.com> In-Reply-To: <20240127163247.384439-7-wens@kernel.org> References: <20240127163247.384439-1-wens@kernel.org> <20240127163247.384439-7-wens@kernel.org> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 28 Jan 2024 00:32:46 +0800 Chen-Yu Tsai wrote: > From: Chen-Yu Tsai > > The DMA controllers found on the H616 and H618 are the same as the one > found on the A100. The only difference is the DMA endpoint (DRQ) layout. > > Add a device node for it, and add DMA channels for existing peripherals. Thanks for the changes! I compared all bits against the manual: they match. > Signed-off-by: Chen-Yu Tsai Reviewed-by: Andre Przywara Cheers, Andre > --- > Changes since v1: > - Fall back to A100 instead of H6 > - Add DMA channels for r_i2c > > .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 41 +++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > index d549d277d972..885809137b9d 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-a100-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>; > @@ -734,6 +773,8 @@ r_i2c: i2c@7081400 { > reg = <0x07081400 0x400>; > interrupts = ; > clocks = <&r_ccu CLK_R_APB2_I2C>; > + dmas = <&dma 48>, <&dma 48>; > + dma-names = "rx", "tx"; > resets = <&r_ccu RST_R_APB2_I2C>; > status = "disabled"; > #address-cells = <1>;