From patchwork Wed Dec 9 11:47:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11961191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E9B0C433FE for ; Wed, 9 Dec 2020 11:47:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02D0723B5D for ; Wed, 9 Dec 2020 11:47:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02D0723B5D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=kP3jxcQJc6lfcRM5D35EDjUZZb9Ttjqx3vAKEWz0xwc=; b=j6gkEJ9V6ptqP91pX5l99eW/rl aaMDHNbt6LjCicpMPO0mLO19ID4gIQv0QjWfop7zbC6CkDsxFYC0aC2kqqYmCj9GBs0a20Iai2OY0 bSqzoyXfY+SPSmLC4JMkAM1up6tdpFbxPEYVH5Dl6+X4BVaItXfVlDPYV6vVstxo8VpzqO6xN3xL/ yem7AmXStRAbgi7aEhkEFGPGTgR4CtOhjtGPXfOsKRDvfLTmggYiWI3LSBt2Lawf1uW8DYh4+pJXa 8GChh9vj9gVDHmWgrkhpSJ9KuG74R1HEb/9aoqcC6n5svgozeXbYnK4fsh4e8qn1Rem8Aq84DwRWw tGFSR57w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmxwd-0001SZ-Hv; Wed, 09 Dec 2020 11:47:43 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmxwb-0001RV-Ns for linux-mediatek@lists.infradead.org; Wed, 09 Dec 2020 11:47:42 +0000 Received: by mail-ej1-x643.google.com with SMTP id m19so1650647ejj.11 for ; Wed, 09 Dec 2020 03:47:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rs3z5HiZz52Q+PqaHhfTF1Q+uRexoKTRYXUuslD9bJA=; b=d3T36ZkNR/AUgVDsWMcv+epjmknEjkr1S4/hA5BmOBbmMp3QPmqbQ5+T5urLbZsaZm yddM22Ca/MjmaZ65L9Ziy8Eis/rNNRh6ZWV33tysfBDK99xgKIFsPiG/pLxOIGV2msux 3VZ4X/R76YQSx/b/gtQiCbkElRc8FjmqEJZ9snzxdIWHO32LjhfnKFPVl2brKq/cbdPl zpDqtSxW6OC+2JHBCUwRoKYHHWYHCx4jqiOhBquIjUJ4tNKpJzn/IlzziXa4/3PKi8pE aTb57hm0IUn94GQTHu2NhsmG7apvTb2fEUQ2K5isvTgowQlyZ+eEA7pRISQ75ZxcifFr j0UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rs3z5HiZz52Q+PqaHhfTF1Q+uRexoKTRYXUuslD9bJA=; b=nbdrf3BNQaBY96R+zXCr07hu1iUThp6tuGgigih28V3gImtAz4d1ao3jyIw7kS6aD7 qBsT7S/sXTpNcl0uSU0FCdOjJo4Y9N2LhXIzO5Fx67m4x1TmsSNJVKHEEpR6kb5R+uCs 9sXkFdhWJitpS828dHLD2B+6NRw6GUkEpbapsRkzUzOtEjS+3aATaFy6777zCE1BZJdR sEGjfYTl+lnYmmNyaHy5qnlaPe94A6fztDwGFueH+PVI3rWqjKrlVkIGQNx2A4mdeAxv wYpZNj34h81+Oy98907/SO68cl9emIKcNt2+6EjTbHU3n8ouAbazQe9Q8FlPkzTuT2w3 rVuQ== X-Gm-Message-State: AOAM5300gn+Pc4mfhpTNH1wnXyoPd2N2zyMGqRWNs+QT2CQLwwcJIos/ nnJPLNveMwGy4QsjdTCjzvSlFg== X-Google-Smtp-Source: ABdhPJz4K0kLaWeuPBop0IAkjqejJVnYvx1By/KhxM6pBUYlU2Hn4uST4po7Bl+o5xWrlrVSPgRe1g== X-Received: by 2002:a17:906:98d4:: with SMTP id zd20mr1710918ejb.532.1607514460504; Wed, 09 Dec 2020 03:47:40 -0800 (PST) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id k23sm1244877ejs.100.2020.12.09.03.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 03:47:39 -0800 (PST) From: Fabien Parent To: Sean Wang , Vinod Koul , Rob Herring , Matthias Brugger Subject: [PATCH v3 1/2] dt-bindings: dma: mtk-apdma: add bindings for MT8516 SOC Date: Wed, 9 Dec 2020 12:47:35 +0100 Message-Id: <20201209114736.70625-1-fparent@baylibre.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_064741_824478_212E6D79 X-CRM114-Status: GOOD ( 10.49 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rob Herring , linux-kernel@vger.kernel.org, Fabien Parent , linux-mediatek@lists.infradead.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add bindings to APDMA for MT8516 SoC. MT8516 is compatible with MT6577. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger Acked-by: Rob Herring --- V3: remove unicode symbol that slips into patch summary V2: no change Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt b/Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt index 2117db0ce4f2..fef9c1eeb264 100644 --- a/Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt +++ b/Documentation/devicetree/bindings/dma/mtk-uart-apdma.txt @@ -4,6 +4,7 @@ Required properties: - compatible should contain: * "mediatek,mt2712-uart-dma" for MT2712 compatible APDMA * "mediatek,mt6577-uart-dma" for MT6577 and all of the above + * "mediatek,mt8516-uart-dma", "mediatek,mt6577" for MT8516 SoC - reg: The base address of the APDMA register bank. From patchwork Wed Dec 9 11:47:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11961193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C68EEC4361B for ; Wed, 9 Dec 2020 11:47:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81CCE23B5D for ; Wed, 9 Dec 2020 11:47:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81CCE23B5D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l2GFyVgs+QRmjGaB/JWWlaRt9Dk4iihT/FU8eqz0Z4U=; b=PXygw2GFxEF1k9jc6R7dVybyD Y8NWAa4d1bMa8lJ/g1+Rv5Y8/6jgkIxWE4nQDlDSx+dUj2k82t7evAOGi2KUSK/yOiJXxXXO+qhch rtGSscBxfrl8EKLTZg8ZeK3h8ldPqSfk0DamvhurE+sS/RNIi67y9BhKF8GsGBuaNG7vSEg3MKIV9 0Wi66uUV+qHOSlWium0Ot+xJikBv0xe0Bql7XKpBPxd9QSSOuRKRJjiyXjiNvAXCwtXYsUxxbfOXz VFyjc0AswYKKbnGxf0FaDSbugygG1ui+7+q0aeP0++g1YCXVJ+oMBeEYGQJurAg9wq0cLbVxj2DQE /UCY2xrQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmxwh-0001U1-O2; Wed, 09 Dec 2020 11:47:47 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmxwd-0001SR-KE for linux-mediatek@lists.infradead.org; Wed, 09 Dec 2020 11:47:45 +0000 Received: by mail-ej1-x642.google.com with SMTP id qw4so1656187ejb.12 for ; Wed, 09 Dec 2020 03:47:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9woAOYYUTApfHEXuDyQxlO3UMapZTcSjzqhS/D3AjbE=; b=H1MYjEBUHXsEmRB5zK3lrIfUDCESZ/yUle4xUxQpR2/3Uefg9+OmJZPu5Y1tGst44h KASM+xB37usilH2dPzK/Gm9MsuKZ7Q0Q6PjWN9BRw2ywD2+HeGPYB3Zj3WfMntMDT2e4 ticNha5B96fMZ2qOr5ZFZTzsRgkDApr8sHUbOiObz1/EVXaxMbSlAIyynriuzC1HyWdq VCBgmAqaxgVcI8DZa35fhFk2sRPGLBb0RDVDiZ3ickoHiWmCHxaj4lA97aIebFkf9exZ bHkZu8z7JjMJLwXegEfxCS4VaQ5G6WPDxDhwxCacSHSopwfz5HPljMlgyTvTsJIWmufP XcBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9woAOYYUTApfHEXuDyQxlO3UMapZTcSjzqhS/D3AjbE=; b=sFK+vOV1bCABsuvt+xMEVpvs4bHNyv+JfG5sFh2YtNXCv6M8WVW6f+8spwqd1HUSSH pM9LbQVwye5fauIfOgnZOmnPDcVuom9J1vKpGIUvEhesz96HpUVrUBEScs1K1YOK+xZ8 0koujeNKKuPqVc31xkYSppdPNGNUYs2uyDTt642Tyo+xyIWZfc2ogC3fSNkc3inPh00T +IAiEUpltxkf/C5/4F6bU95ygJc6hr0wn1zDGqP4DkWRMs14ty2V0DGoeV6k4hx9hp9w esZEdGRRe/IOIxxLD9q0X3Icyo/65aMiT+dOs4dRnhl+/I4TaBNlaz2Sl+ReI9Wc4VHl A5dA== X-Gm-Message-State: AOAM532jY+/qTu9tSlAhFbz2cGWX6LIVsYuBoSZTDPjIp5QnVIusPd5P PJ7Ftla737i02GfK62rfnomjpQ== X-Google-Smtp-Source: ABdhPJwpP09moR3fOdYGPHtxzsHg0Xp80bWTYrzjqN1vN7fhPy8dIyqyuRU2qzTh7XSFbgSRvI0QDw== X-Received: by 2002:a17:906:391b:: with SMTP id f27mr1665544eje.195.1607514462330; Wed, 09 Dec 2020 03:47:42 -0800 (PST) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id k23sm1244877ejs.100.2020.12.09.03.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 03:47:41 -0800 (PST) From: Fabien Parent To: Rob Herring , Matthias Brugger Subject: [PATCH v3 2/2] arm64: dts: mediatek: mt8516: add support for APDMA Date: Wed, 9 Dec 2020 12:47:36 +0100 Message-Id: <20201209114736.70625-2-fparent@baylibre.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201209114736.70625-1-fparent@baylibre.com> References: <20201209114736.70625-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201209_064743_703023_194EE9C9 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabien Parent , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Add support the APDMA IP on MT8516. APDMA is a DMA controller for UARTs. Signed-off-by: Fabien Parent --- V3: remove unicode symbol that slips into patch summary V2: Add missing dma-names properties on uart nodes arch/arm64/boot/dts/mediatek/mt8516.dtsi | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8516.dtsi b/arch/arm64/boot/dts/mediatek/mt8516.dtsi index e6e4d9d60094..b80e95574bef 100644 --- a/arch/arm64/boot/dts/mediatek/mt8516.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8516.dtsi @@ -276,6 +276,27 @@ gic: interrupt-controller@10310000 { (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; }; + apdma: dma-controller@11000480 { + compatible = "mediatek,mt8516-uart-dma", + "mediatek,mt6577-uart-dma"; + reg = <0 0x11000480 0 0x80>, + <0 0x11000500 0 0x80>, + <0 0x11000580 0 0x80>, + <0 0x11000600 0 0x80>, + <0 0x11000980 0 0x80>, + <0 0x11000a00 0 0x80>; + interrupts = , + , + , + , + , + ; + dma-requests = <6>; + clocks = <&topckgen CLK_TOP_APDMA>; + clock-names = "apdma"; + #dma-cells = <1>; + }; + uart0: serial@11005000 { compatible = "mediatek,mt8516-uart", "mediatek,mt6577-uart"; @@ -284,6 +305,9 @@ uart0: serial@11005000 { clocks = <&topckgen CLK_TOP_UART0_SEL>, <&topckgen CLK_TOP_UART0>; clock-names = "baud", "bus"; + dmas = <&apdma 0 + &apdma 1>; + dma-names = "tx", "rx"; status = "disabled"; }; @@ -295,6 +319,9 @@ uart1: serial@11006000 { clocks = <&topckgen CLK_TOP_UART1_SEL>, <&topckgen CLK_TOP_UART1>; clock-names = "baud", "bus"; + dmas = <&apdma 2 + &apdma 3>; + dma-names = "tx", "rx"; status = "disabled"; }; @@ -306,6 +333,9 @@ uart2: serial@11007000 { clocks = <&topckgen CLK_TOP_UART2_SEL>, <&topckgen CLK_TOP_UART2>; clock-names = "baud", "bus"; + dmas = <&apdma 4 + &apdma 5>; + dma-names = "tx", "rx"; status = "disabled"; };