From patchwork Thu Oct 24 17:21:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 11210519 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 335FC13B1 for ; Thu, 24 Oct 2019 17:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11CE2205F4 for ; Thu, 24 Oct 2019 17:22:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zoho.com header.i=zhouyanjie@zoho.com header.b="E1PHkC1R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392064AbfJXRWp (ORCPT ); Thu, 24 Oct 2019 13:22:45 -0400 Received: from sender4-pp-o94.zoho.com ([136.143.188.94]:25435 "EHLO sender4-pp-o94.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389384AbfJXRWp (ORCPT ); Thu, 24 Oct 2019 13:22:45 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1571937745; cv=none; d=zohomail.com; s=zohoarc; b=TAxmW6D9Tpcr3Dp2qZOOIV9SkkGZrU0lhriADwBCza2gY7RGfdRFK/cWrvCl8U9wbU9gh70HlxVXeV2c3Dt2DZVU8V3tVbTxKKfuOgNxtDRqByCoi2mR6b1Mp8mqzTa6CtBdhXuDehlK7IV20jakxTcd1MzA9ljQ02ua3K28z64= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1571937745; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=3LfvkXpP25PpD+nI8+Onyh93L0MPN93ZWQCuDDun+fs=; b=kLDn3H3etxwqAqof1OXcEabf9p4gjXIRYe6+085q3Fb4HxVwN2EdLE3dvs00s5qbDJEjpKYvLXdd7OJ179uPtnem54jir8/3ipUonUz7Mx9+pYe69MiSGNlrUbY7JpfGo3yS5DmkMlPWdT61550WbtM+ZCeaX/8wtoDbeBOUivk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=vkCCn3dMizrR3P5FBYgoYpNnoFsq7HNHBN907xOZg1r1Th4vPsr4u0XtMRxO1sviKgh3MqfgtV2p qOYWbw6zC1MfRN0RkWnGCshBeyg42Q2YYTrK7pGHVkghLyAQQJL0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1571937745; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=2669; bh=3LfvkXpP25PpD+nI8+Onyh93L0MPN93ZWQCuDDun+fs=; b=E1PHkC1RuRsveeWkrTTgIzNBSVwCeDfyaA9/uxGHUBW7Q3p3VF3476DuXKQd7R+M f0ldrqh8Vvf6o7+2Z16kT/ZV9vRVWH5j8awervsV4Mer5zHobfERc0gGvcFt464ZNUc nGqx7qCn1Gb62ntjSk6tnkLgDfuijJh3n+h+xw4U= Received: from zhouyanjie-virtual-machine.localdomain (171.221.113.49 [171.221.113.49]) by mx.zohomail.com with SMTPS id 1571937743688897.6363219460266; Thu, 24 Oct 2019 10:22:23 -0700 (PDT) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, paul.burton@mips.com, vkoul@kernel.org, paul@crapouillou.net, mark.rutland@arm.com, Zubair.Kakakhel@imgtec.com, dan.j.williams@intel.com Subject: [PATCH 1/2 v2] dt-bindings: dmaengine: Add X1000 bindings. Date: Fri, 25 Oct 2019 01:21:09 +0800 Message-Id: <1571937670-30828-2-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1571937670-30828-1-git-send-email-zhouyanjie@zoho.com> References: <1571799903-44561-1-git-send-email-zhouyanjie@zoho.com> <1571937670-30828-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Add the dmaengine bindings for the X1000 Soc from Ingenic. Signed-off-by: Zhou Yanjie Reviewed-by: Rob Herring --- .../devicetree/bindings/dma/jz4780-dma.txt | 3 +- include/dt-bindings/dma/x1000-dma.h | 40 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/dma/x1000-dma.h diff --git a/Documentation/devicetree/bindings/dma/jz4780-dma.txt b/Documentation/devicetree/bindings/dma/jz4780-dma.txt index 636fcb2..ec89782 100644 --- a/Documentation/devicetree/bindings/dma/jz4780-dma.txt +++ b/Documentation/devicetree/bindings/dma/jz4780-dma.txt @@ -7,10 +7,11 @@ Required properties: * ingenic,jz4725b-dma * ingenic,jz4770-dma * ingenic,jz4780-dma + * ingenic,x1000-dma - reg: Should contain the DMA channel registers location and length, followed by the DMA controller registers location and length. - interrupts: Should contain the interrupt specifier of the DMA controller. -- clocks: Should contain a clock specifier for the JZ4780 PDMA clock. +- clocks: Should contain a clock specifier for the JZ4780/X1000 PDMA clock. - #dma-cells: Must be <2>. Number of integer cells in the dmas property of DMA clients (see below). diff --git a/include/dt-bindings/dma/x1000-dma.h b/include/dt-bindings/dma/x1000-dma.h new file mode 100644 index 00000000..401e165 --- /dev/null +++ b/include/dt-bindings/dma/x1000-dma.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * This header provides macros for X1000 DMA bindings. + * + * Copyright (c) 2019 Zhou Yanjie + */ + +#ifndef __DT_BINDINGS_DMA_X1000_DMA_H__ +#define __DT_BINDINGS_DMA_X1000_DMA_H__ + +/* + * Request type numbers for the X1000 DMA controller (written to the DRTn + * register for the channel). + */ +#define X1000_DMA_DMIC_RX 0x5 +#define X1000_DMA_I2S0_TX 0x6 +#define X1000_DMA_I2S0_RX 0x7 +#define X1000_DMA_AUTO 0x8 +#define X1000_DMA_UART2_TX 0x10 +#define X1000_DMA_UART2_RX 0x11 +#define X1000_DMA_UART1_TX 0x12 +#define X1000_DMA_UART1_RX 0x13 +#define X1000_DMA_UART0_TX 0x14 +#define X1000_DMA_UART0_RX 0x15 +#define X1000_DMA_SSI0_TX 0x16 +#define X1000_DMA_SSI0_RX 0x17 +#define X1000_DMA_MSC0_TX 0x1a +#define X1000_DMA_MSC0_RX 0x1b +#define X1000_DMA_MSC1_TX 0x1c +#define X1000_DMA_MSC1_RX 0x1d +#define X1000_DMA_PCM0_TX 0x20 +#define X1000_DMA_PCM0_RX 0x21 +#define X1000_DMA_SMB0_TX 0x24 +#define X1000_DMA_SMB0_RX 0x25 +#define X1000_DMA_SMB1_TX 0x26 +#define X1000_DMA_SMB1_RX 0x27 +#define X1000_DMA_SMB2_TX 0x28 +#define X1000_DMA_SMB2_RX 0x29 + +#endif /* __DT_BINDINGS_DMA_X1000_DMA_H__ */ From patchwork Thu Oct 24 17:21:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhou Yanjie X-Patchwork-Id: 11210525 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 11214139A for ; Thu, 24 Oct 2019 17:23:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2F4B21925 for ; Thu, 24 Oct 2019 17:23:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zoho.com header.i=zhouyanjie@zoho.com header.b="A4y/omKw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440038AbfJXRXC (ORCPT ); Thu, 24 Oct 2019 13:23:02 -0400 Received: from sender4-pp-o94.zoho.com ([136.143.188.94]:25442 "EHLO sender4-pp-o94.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389384AbfJXRXC (ORCPT ); Thu, 24 Oct 2019 13:23:02 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1571937775; cv=none; d=zohomail.com; s=zohoarc; b=X/RbDHeP6dJCNtZcSeOTfQ0Ys48We0cjcNPbrxbaT+HuNyqTyf02W2/W83UHGjXcLp7uyqghwZRv+iomOF+0UCIT+VchmwRdlYMTtzdP9ria73hH0ZKYC0eMUaSpWVA66qqIZ2g811z960dZsHk3kNmNyEtYVo9BumXPx91nqPA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1571937775; h=Cc:Date:From:In-Reply-To:Message-ID:References:Subject:To; bh=4E+Rpg5l5lwQv4Fs+9WoNkjj0J33QSsoc+dKM2jzHQw=; b=jY0J4W42g7/gT5MVAVg2QkmarVk3DeBcK9umeiN04D7zT7pAT0Sw6SU68aT+2mnqZ/6JVtC3eb3EcZaG9bcWNSPXOlk/suiO1aB7LfhCDZS06n25WYEIbgO+vEPy0p6itl/vO+clvinSFRdBZfUdnbkJ3EnV4UBZh86DJB0K6dg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=zhouyanjie@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=JXj9iOjOYcqi2t/rG7odkldOG2QdvmfXhvIesGZXSIJ9dL0WzKfyz7yK2I2gLQjZDDtHGFBLZz+i dOIrUz3ukQ0YIXqm+ridoxMuT/GKq+AGqYu8Sp1wNR7MzAOCcKnK DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1571937775; s=zm2019; d=zoho.com; i=zhouyanjie@zoho.com; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; l=1231; bh=4E+Rpg5l5lwQv4Fs+9WoNkjj0J33QSsoc+dKM2jzHQw=; b=A4y/omKw2ab7vGPKPtYPW9TB7hWrRSema0DX7z6N8N04UC13ai9ls+e/yu7ajm+5 +ds6jwlLU2W3XL3h9JeqrUY3Qx/1Cu8Vr/C15+cUBpsYMVx/3Tn+g6cuIeM3XScES65 vQsMSR8/czHTkXWFtsFVIaxFayohNXuCGmedpKcQ= Received: from zhouyanjie-virtual-machine.localdomain (171.221.113.49 [171.221.113.49]) by mx.zohomail.com with SMTPS id 1571937774306831.6615968475469; Thu, 24 Oct 2019 10:22:54 -0700 (PDT) From: Zhou Yanjie To: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, paul.burton@mips.com, vkoul@kernel.org, paul@crapouillou.net, mark.rutland@arm.com, Zubair.Kakakhel@imgtec.com, dan.j.williams@intel.com Subject: [PATCH 2/2 v2] dmaengine: JZ4780: Add support for the X1000. Date: Fri, 25 Oct 2019 01:21:10 +0800 Message-Id: <1571937670-30828-3-git-send-email-zhouyanjie@zoho.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1571937670-30828-1-git-send-email-zhouyanjie@zoho.com> References: <1571799903-44561-1-git-send-email-zhouyanjie@zoho.com> <1571937670-30828-1-git-send-email-zhouyanjie@zoho.com> X-ZohoMailClient: External Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Add support for probing the dma-jz4780 driver on the X1000 Soc. Signed-off-by: Zhou Yanjie Reviewed-by: Paul Cercueil --- drivers/dma/dma-jz4780.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index cafb1cc0..5e3af48 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -1019,11 +1019,18 @@ static const struct jz4780_dma_soc_data jz4780_dma_soc_data = { .flags = JZ_SOC_DATA_ALLOW_LEGACY_DT | JZ_SOC_DATA_PROGRAMMABLE_DMA, }; +static const struct jz4780_dma_soc_data x1000_dma_soc_data = { + .nb_channels = 8, + .transfer_ord_max = 7, + .flags = JZ_SOC_DATA_PROGRAMMABLE_DMA, +}; + static const struct of_device_id jz4780_dma_dt_match[] = { { .compatible = "ingenic,jz4740-dma", .data = &jz4740_dma_soc_data }, { .compatible = "ingenic,jz4725b-dma", .data = &jz4725b_dma_soc_data }, { .compatible = "ingenic,jz4770-dma", .data = &jz4770_dma_soc_data }, { .compatible = "ingenic,jz4780-dma", .data = &jz4780_dma_soc_data }, + { .compatible = "ingenic,x1000-dma", .data = &x1000_dma_soc_data }, {}, }; MODULE_DEVICE_TABLE(of, jz4780_dma_dt_match);