Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp624872lqt; Mon, 18 Mar 2024 20:23:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUidXZ5pFBZjpFci5vc6S8S2sYahZpQmL/evKQvYI3UP1Uvv1ZxLxh8kFjTlFBrbaDKD0Af9CYN/4DksfNRx9e2exvsscT0TbMpSnou2w== X-Google-Smtp-Source: AGHT+IE3W0OjzbKAa31PzkNAm6mAx1df2VXrvQstMI5UJUhAW6KdGzJK97sPdk3rnfjS+L5Q9pLu X-Received: by 2002:a05:6a00:4f94:b0:6e6:5291:1779 with SMTP id ld20-20020a056a004f9400b006e652911779mr1933143pfb.6.1710818582023; Mon, 18 Mar 2024 20:23:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710818582; cv=pass; d=google.com; s=arc-20160816; b=v4SU2r8x6n/MikOWDLliUR50sV5y9tEruvMke/sVhglruSJhE+TDFNWGH4BAVWzxn1 Un1weYItgu+mRmnwPp1RigNe2Zh28SJa1o8qMT5KePpkVe8lrYWbUKSUUYLxzrKzgysN o3FYmM7Br7ENtqLPw/U2iVB12G7YCUhY/Ni+iCQcxMxFSY0r3WpXq2USJar6rPMwDLnK wgPALEt1e8KQqT4ytCuBrPbKS0Y/0vLdfJqu1Spubo7W+lkIAjfIPBkE98AdPm5Ap/wI WTx+jOCi+zhhDtsf3oFGnqaZ4ub9/1Vb3NB+5gNVSMhQs6sD8h0jOpiVgW8Mv0EXq/rB jlFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jMw9a1z02q9ezrV1ZNQg91O+JjWFgILRbLm9d5yMuuc=; fh=ZjTNo5nQGfFt/HGDdt18JHt7YdfA7BAFYq1fJ51Ub64=; b=cpENP32mo8iuRC8BakLoevhQvYr2QuXa36Xfnven4Dr5fW3PN7/T5fpGIlU+bPqPeU R/zITau6EQDnWPm5mdX9B9qjzEnXaYP8xEbsedyQw1jN6iAcoRZipZI3vytNqKg5QMOj elxmZlcIpweXENAug0kTRFiUAt7FhpBj6G7Ge5VcsF5CYLH1KdEHM4gbHoP7Bg0ftGXK 1pZtheAhnQA9vObZQlFZnyqWBk1+I/LD2MPSe8iC9B4rc+veiD2zQg+w9BXoTjz6xOtc pTMXBOq151j7bYRjco10lXE6OuUlekuoO9VQhNR0gO8wT84lvNDdrnnGy28+VWnuWrxk 2nlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=noESFHcl; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-106960-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s32-20020a056a0017a000b006e707276767si6399946pfg.347.2024.03.18.20.23.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 20:23:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106960-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=noESFHcl; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-106960-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106960-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AC1AD281C6D for ; Tue, 19 Mar 2024 03:23:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 52B817BB13; Tue, 19 Mar 2024 03:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="noESFHcl" Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 982EC7BAE5 for ; Tue, 19 Mar 2024 03:22:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710818573; cv=none; b=UdS2guzbuCLYTM5S0Mmz4/dOc2VKPBZH6EdD5s08Z+9bKglnYnj9iaVdgI6bkMQ9QNJQQMen7VuR4E8FvBYhMGZZqvHJZL9ByPEG6++2hiv0pnVbIl1v+QWQ1DASSJGkR2d8VTuOls68ZrWVfjnB0bw4GVgyKAS68vurxGpwrFw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710818573; c=relaxed/simple; bh=XV/4qYUUqsZtiaCMZA5wf1yevwpa5sgxnUmhJQsi9qA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KTmcTv+4aT2SiGovJMYdS//K/Jzfc/zGUEyDO4rpz/qS03s9z7qRG1QAnBGiGpGODNktCiBatDJeEbPzpU7wZjUxdUD629dwCRTUBhzcuEkIUXfCVf39X3uirgkTuHkXGV4IaHXzYSv3FQsXSscCWt9CDEOlhYNd6RB7tmZEkBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=noESFHcl; arc=none smtp.client-ip=209.85.222.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-789f50b3e40so155840685a.1 for ; Mon, 18 Mar 2024 20:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1710818570; x=1711423370; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jMw9a1z02q9ezrV1ZNQg91O+JjWFgILRbLm9d5yMuuc=; b=noESFHclqvXd6k6lIQy0vogl5h4TP4QMv45Ym4BrgqdJNfHYxhHQN4R2I7+5tO1sK0 slpmFESOmH1z0KpOjOw6lU6Uhg3/wiDDF6thZWVFSiSh6SJo2HSwRZM9ENtbPVGyQ2u7 GBtyseVYwc6oMHSIi2VGuLUXvek1INjFfHqWA0qv8yO2fdt6ClfPQOqeQW+Spi8jvMZL uv0el+bvFmgbLc1z0G3ncPkxdsd+yGrmJWIAEHddQCoEd4VQ3zUON7kzrpHVmG/P+t8p LbkBS8XUyGfj/G91njZXQ71PHqxZWgSEiYst89o1ZVYxPF+uODuwS/PlHavubX1GLIHn aSwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710818570; x=1711423370; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jMw9a1z02q9ezrV1ZNQg91O+JjWFgILRbLm9d5yMuuc=; b=sFnlXABfnOFA3X54a5AVcXPnq+QjfDN45kkEzxO3iUrgkzK6I8g8TT6g4wn6djy2tK IK0qoDt3nAIK+A1zWQXMPDgRJG2G2z41UHBqMqLIIcyu/D+1hxnndE7tEYK8aP7t2FmI PBjaG2WaaDueQmXKXNKZaBsHJj3hLhxeN5Qs9+TTXYjbS+FqxTDT8FRIdzlstfDcaeZH otzZmY6X+sb2WE8rxrwZCqcJJ/W5sQdb3vDQsaQChR4XwA6X/hXA7QqURPyC+hBoxTsJ pPUxgkcyAmM7tdTD93aj4PxcQpx6ONhan12M/ZHk2las4Gdp87vuVQLs2bqZ3RyC4IAZ W5PA== X-Forwarded-Encrypted: i=1; AJvYcCWMjBKhuMOthuT7hOToAyq5p9rS7Q3hVCNYk981Pj+eiRNduEvTgqdm8l8guxQ+KvII1gJAwFXIQL1Qt5KpfhUK8YA0fGAMxLm1gj5H X-Gm-Message-State: AOJu0YwYiRbID8VYNj4dClCyYXDuHsvncSdz4Og+Qmmi/9hLWM2dAug9 2kjCxnvpAKLGuKvSgALBe0C3z/UxDqD3nIDPYjo4dvf9HACHKhLgVVWE9nX4X04= X-Received: by 2002:a05:6214:c49:b0:696:20b8:cfc5 with SMTP id r9-20020a0562140c4900b0069620b8cfc5mr2771527qvj.6.1710818570458; Mon, 18 Mar 2024 20:22:50 -0700 (PDT) Received: from [100.64.0.1] ([136.226.86.189]) by smtp.gmail.com with ESMTPSA id jx5-20020a0562142b0500b0068f4520e42dsm6034517qvb.16.2024.03.18.20.22.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 20:22:50 -0700 (PDT) Message-ID: <29f468c5-1aaa-4326-8088-e03a1d6b7174@sifive.com> Date: Mon, 18 Mar 2024 22:22:47 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/4] dt-bindings: dmaengine: Add dmamux for CV18XX/SG200X series SoC Content-Language: en-US To: Inochi Amaoto , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Jisheng Zhang , Liu Gui , Jingbao Qiu , dlan@gentoo.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Chen Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou References: From: Samuel Holland In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-03-18 1:38 AM, Inochi Amaoto wrote: > The DMA IP of Sophgo CV18XX/SG200X is based on a DW AXI CORE, with > an additional channel remap register located in the top system control > area. The DMA channel is exclusive to each core. > > Add the dmamux binding for CV18XX/SG200X series SoC > > Signed-off-by: Inochi Amaoto > Reviewed-by: Rob Herring > --- > .../bindings/dma/sophgo,cv1800-dmamux.yaml | 47 ++++++++++++++++ > include/dt-bindings/dma/cv1800-dma.h | 55 +++++++++++++++++++ > 2 files changed, 102 insertions(+) > create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml > create mode 100644 include/dt-bindings/dma/cv1800-dma.h > > diff --git a/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml b/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml > new file mode 100644 > index 000000000000..c813c66737ba > --- /dev/null > +++ b/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml > @@ -0,0 +1,47 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Sophgo CV1800/SG200 Series DMA mux > + > +maintainers: > + - Inochi Amaoto > + > +allOf: > + - $ref: dma-router.yaml# > + > +properties: > + compatible: > + const: sophgo,cv1800-dmamux > + > + reg: > + maxItems: 2 > + > + '#dma-cells': > + const: 3 > + description: > + The first cells is DMA channel. The second one is device id. > + The third one is the cpu id. There are 43 devices, but only 8 channels. Since the channel is statically specified in the devicetree as the first cell here, that means the SoC DT author must pre-select which 8 of the 43 devices are usable, right? And then the rest would have to omit their dma properties. Wouldn't it be better to leave out the channel number here and dynamically allocate channels at runtime? Regards, Samuel > + > + dma-masters: > + maxItems: 1 > + > + dma-requests: > + const: 8 > + > +required: > + - '#dma-cells' > + - dma-masters > + > +additionalProperties: false > + > +examples: > + - | > + dma-router { > + compatible = "sophgo,cv1800-dmamux"; > + #dma-cells = <3>; > + dma-masters = <&dmac>; > + dma-requests = <8>; > + }; > diff --git a/include/dt-bindings/dma/cv1800-dma.h b/include/dt-bindings/dma/cv1800-dma.h > new file mode 100644 > index 000000000000..3ce9dac25259 > --- /dev/null > +++ b/include/dt-bindings/dma/cv1800-dma.h > @@ -0,0 +1,55 @@ > +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ > + > +#ifndef __DT_BINDINGS_DMA_CV1800_H__ > +#define __DT_BINDINGS_DMA_CV1800_H__ > + > +#define DMA_I2S0_RX 0 > +#define DMA_I2S0_TX 1 > +#define DMA_I2S1_RX 2 > +#define DMA_I2S1_TX 3 > +#define DMA_I2S2_RX 4 > +#define DMA_I2S2_TX 5 > +#define DMA_I2S3_RX 6 > +#define DMA_I2S3_TX 7 > +#define DMA_UART0_RX 8 > +#define DMA_UART0_TX 9 > +#define DMA_UART1_RX 10 > +#define DMA_UART1_TX 11 > +#define DMA_UART2_RX 12 > +#define DMA_UART2_TX 13 > +#define DMA_UART3_RX 14 > +#define DMA_UART3_TX 15 > +#define DMA_SPI0_RX 16 > +#define DMA_SPI0_TX 17 > +#define DMA_SPI1_RX 18 > +#define DMA_SPI1_TX 19 > +#define DMA_SPI2_RX 20 > +#define DMA_SPI2_TX 21 > +#define DMA_SPI3_RX 22 > +#define DMA_SPI3_TX 23 > +#define DMA_I2C0_RX 24 > +#define DMA_I2C0_TX 25 > +#define DMA_I2C1_RX 26 > +#define DMA_I2C1_TX 27 > +#define DMA_I2C2_RX 28 > +#define DMA_I2C2_TX 29 > +#define DMA_I2C3_RX 30 > +#define DMA_I2C3_TX 31 > +#define DMA_I2C4_RX 32 > +#define DMA_I2C4_TX 33 > +#define DMA_TDM0_RX 34 > +#define DMA_TDM0_TX 35 > +#define DMA_TDM1_RX 36 > +#define DMA_AUDSRC 37 > +#define DMA_SPI_NAND 38 > +#define DMA_SPI_NOR 39 > +#define DMA_UART4_RX 40 > +#define DMA_UART4_TX 41 > +#define DMA_SPI_NOR1 42 > + > +#define DMA_CPU_A53 0 > +#define DMA_CPU_C906_0 1 > +#define DMA_CPU_C906_1 2 > + > + > +#endif // __DT_BINDINGS_DMA_CV1800_H__ > -- > 2.44.0 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv