Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1088516rdg; Fri, 13 Oct 2023 09:50:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/4U3Y7DzVmlUKGa9KfYwJkR2a6rBjZv/fbntOfVxsq6PyVFWHl7Tlezypq6HPtNtgK5lD X-Received: by 2002:a17:90a:c293:b0:27d:3c62:6342 with SMTP id f19-20020a17090ac29300b0027d3c626342mr1030955pjt.4.1697215837816; Fri, 13 Oct 2023 09:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697215837; cv=none; d=google.com; s=arc-20160816; b=aDJF7wHSzfLry9o2c/9qr+5SwaiL2NU5f3i4B4GEgh4DyWUShTXHOcdwDC/0O8vKqN BHYMmndyoDC9lfTpLFqXN1Dj444ZY26+rd5FhmM78po1uD3mP0fPks3eKffM6v1koUS/ MNcAOyHk57PoHfjUcXMFJGBmdyVpk/6+fwQQ0u0ilth9lf5F8tTahXBOD7+RZpsEaQGC AJc3SQ+aXnJohEdFhvpYQw8ThqTbtvyXoCpgg20wNLbS5ZY8GXQvb9Ki3EOPNy3ldbUO MheLh/uCiOPMl/poVZm+hpeio4XGbUa/KsRLseOfrzZ8U4sEcf8L84k5ippkQ4/9jpf1 ICtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:dkim-signature:from; bh=Zz8k/vmZ3NGYYQQPdxfPH4QZU0TH/TxEf+ATJmTjL7A=; fh=7dACLXR9mdMIjtNlRBCr+tv+Nin+ltyqXZWYNjnsbmU=; b=ON9vVJ9h8hDXVNSI71r+ObJFy3VPakvkZrwcBa1pDi892s/6Ia03Ny94SQ6likoAzZ h7GKs5C7Mmbpyc8a/6hEw4Vh+KnCGAXyNC95PAlH1/0GCj6TtkWuedF4uUQzmopQL2O0 7wYpMuJUXWozmSIDX4bWUFYx0ghcRKFXWi+U/od+5EXqcpn7BaJAJMbuP5qAM+X3o91E 8iKSql3j8OwMC2Cq48FEYVRX2zOdacTUOQ0fMq0wUFBzEoPmcRwKRC368sRP64A8TxCR 6+NJhgfZJXJRepwSjSO2KkTzk8UYJCrH4lXNmfME3TV5rd3j5phmtp+iq9l8aDraTQw2 QD1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=hAdic2C8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id mj1-20020a17090b368100b0027d18475bd3si408597pjb.168.2023.10.13.09.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 09:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=hAdic2C8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6C51D829FDD6; Fri, 13 Oct 2023 09:50:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbjJMQuT (ORCPT + 99 others); Fri, 13 Oct 2023 12:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjJMQuS (ORCPT ); Fri, 13 Oct 2023 12:50:18 -0400 Received: from hutie.ust.cz (hutie.ust.cz [IPv6:2a03:3b40:fe:f0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 005C6B7; Fri, 13 Oct 2023 09:50:15 -0700 (PDT) From: =?UTF-8?q?Martin=20Povi=C5=A1er?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1697215810; bh=Zz8k/vmZ3NGYYQQPdxfPH4QZU0TH/TxEf+ATJmTjL7A=; h=From:To:Cc:Subject:Date; b=hAdic2C8HcMkOI+fxprcLO8c4u0x8x+m8k8xEjpvFolJB+VM3EIaZmVyTakYQDNas D0LOl7xZ3qK+kq3272moX0ZlXHjv3QegAKrkltDToL8igO5+iPwnqMi0VhFn2TntVi 1wJwVJ0jJw6dGlkVTsBv9wEiLyOxICu+YW0Ns50w= To: =?UTF-8?q?Martin=20Povi=C5=A1er?= , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: asahi@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/2] Apple SIO driver Date: Fri, 13 Oct 2023 18:49:34 +0200 Message-Id: <20231013164936.60718-1-povik+lin@cutebit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 13 Oct 2023 09:50:30 -0700 (PDT) Hi, on v2 of this driver we had discussion over the device_config op not following the dmaengine spec. I came up with a lazy solution I am happy with. See sio_device_config for details. Changes since v2: https://lore.kernel.org/asahi/CAEg-Je8_f_hZ3VyBg+8tK8uobWNaEqCwp==2JhV6jVpPYXj_Pg@mail.gmail.com/T/#t - do requested formatting fixes - fix device_config up to spec in a lazy way Changes since v1: https://lore.kernel.org/asahi/20230712133806.4450-1-povik+lin@cutebit.org/T/#t - move to using virt-dma - drop redundant cookie field from `sio_tx` - use DECLARE_BITMAP for `allocated` in sio_tagdata Original cover letter from v1 follows. -- Hi all, see attached a driver for the SIO coprocessor found on recent Apple SoCs. This coprocessor provides general DMA services, it can feed many peripherals but so far it seems it will only be useful for audio output over HDMI/DisplayPort. So the driver here only supports the DMA_CYCLIC mode of transactions with the focus being on audio. There's a downstream prototype ALSA driver the DMA driver is being tested against. Some of the boilerplate code in implementing the dmaengine interface was lifted from apple-admac.c. Among other things these two drivers have in common that they implement the DMA_CYCLIC regime on top of hardware/coprocessor layer supporting linear transactions only. The binding schema saw two RFC rounds before and has a reviewed-by from Rob. https://lore.kernel.org/asahi/167693643966.613996.10372170526471864080.robh@kernel.org Best regards, Martin Martin PoviĊĦer (2): dt-bindings: dma: apple,sio: Add schema dmaengine: apple-sio: Add Apple SIO driver .../devicetree/bindings/dma/apple,sio.yaml | 111 +++ MAINTAINERS | 2 + drivers/dma/Kconfig | 11 + drivers/dma/Makefile | 1 + drivers/dma/apple-sio.c | 907 ++++++++++++++++++ 5 files changed, 1032 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/apple,sio.yaml create mode 100644 drivers/dma/apple-sio.c -- 2.38.3