Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp989230pxb; Fri, 15 Apr 2022 17:34:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxCcpAAW1rjAfdQlw1i+zX750ScrXOr3OegBkdq6+Wqb8Jxqyqs6xSfYGut2fNm4i/M9CD X-Received: by 2002:a17:90b:2385:b0:1cb:7b13:934b with SMTP id mr5-20020a17090b238500b001cb7b13934bmr1422263pjb.121.1650069251056; Fri, 15 Apr 2022 17:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650069251; cv=none; d=google.com; s=arc-20160816; b=cFYovJye6z833g9q9XSmBO5T92ZEu4CE/74qicCKDifvijnhnNiz8AiE0cPJv9vuPI /6rpgKGV4gCNUWPal5iTAgi4IJQHt0qPVxMN25i4RFrnKIrn6lV6ZLs8D7osmAWi54z6 purQOESw6SXmoHU6H3khpC0f8gPewi4KnCwuKPlxR9L88djU5o9+iQ2pI1P0qOezWCK2 mcA2nWSs3KVIY2+lzXlgqcnALQt8JZj75t2Ri62f+YpTJDfuvW61rt4q5YhkkMJARz82 R6cWPCL3QbNwhRD248wNYFInLcVw82HtgSL1GwMPgS06paK8TXz6hD34XIM/ci+d4jrz 82WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=6C6PdBrdjpVD+lDLvCPNyZNWgXILs8pi8aPP0Tgp7b4=; b=qFyOaJh3VOiNBrR9J5//+meZyBRSsMaugPpiNnc3C3JZGJC3Ppl0/ZnByYbU9m1m3v XGQK4yjjMf8Odj9aWZiJ3DYgxwBkOORnZjnIZbd9la3F/Bxq5We6164TKYNxa5TVOUvZ uTI8C/63jBs98UwKB28aqkVcNcmO+MsfuSHcuQDVhuhFvwzvqs8sRdQ+w39Bmz/Vvx96 wvAqudTrI1LZkwndSALlQRXoygRbMnTBuV+udYmq1AUoZSJgHqo3CesWWpkWu5Q97mzs lCsLKAgfCa9C2a9MPtxg/o4hlLy0nW97MdIeJ9AFlducusPhYAFZuGtrh7MO+uuztBrC v5CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=fK6IYtca; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mq7-20020a17090b380700b001c6e5214873si6352518pjb.9.2022.04.15.17.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:34:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=fK6IYtca; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 10681F1AE3; Fri, 15 Apr 2022 17:30:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344050AbiDNRzI (ORCPT + 99 others); Thu, 14 Apr 2022 13:55:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242032AbiDNRzG (ORCPT ); Thu, 14 Apr 2022 13:55:06 -0400 Received: from hutie.ust.cz (hutie.ust.cz [185.8.165.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B0C6EA75C; Thu, 14 Apr 2022 10:52:39 -0700 (PDT) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1649958757; bh=6C6PdBrdjpVD+lDLvCPNyZNWgXILs8pi8aPP0Tgp7b4=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=fK6IYtcazQmhRt8qRgxHB5m3SJz42BhC54qK2Y6vVu0LIsJH5deQAcZlPl45WMt+X Is1cuRiFSq/6NpORZ26A5ao+ymQfWM6WXdUSxz4opAgk3skNIzNcf/eFbSeTBDIOz3 hD+abQvC3nKril/fb+Y0rUta35cg2lhEfq1zAZxs= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH v2 1/2] dt-bindings: dma: Add Apple ADMAC From: =?utf-8?Q?Martin_Povi=C5=A1er?= In-Reply-To: <85DF53F6-74BA-4D8D-8E8E-DFD67B24DA19@cutebit.org> Date: Thu, 14 Apr 2022 19:52:36 +0200 Cc: =?utf-8?Q?Martin_Povi=C5=A1er?= , Hector Martin , Sven Peter , Vinod Koul , Krzysztof Kozlowski , Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220411222204.96860-1-povik+lin@cutebit.org> <20220411222204.96860-2-povik+lin@cutebit.org> <85DF53F6-74BA-4D8D-8E8E-DFD67B24DA19@cutebit.org> To: Rob Herring X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 14. 4. 2022, at 19:23, Martin Povi=C5=A1er = wrote: >=20 >>=20 >> On 14. 4. 2022, at 17:43, Rob Herring wrote: >>=20 >> On Tue, Apr 12, 2022 at 12:22:03AM +0200, Martin Povi=C5=A1er wrote: >>> Apple's Audio DMA Controller (ADMAC) is used to fetch and store = audio >>> samples on SoCs from the "Apple Silicon" family. >>>=20 >>> Signed-off-by: Martin Povi=C5=A1er >>> --- >>>=20 >>> After the v1 discussion, I dropped the = apple,internal-irq-destination >>> property and instead the index of the usable interrupt is now = signified >>> by prepending -1 entries to the interrupts=3D list. This works when = I do >>> it like this: >>>=20 >>> interrupt-parent =3D <&aic>; >>> interrupts =3D , >>> ; >>=20 >>=20 >> BTW, just use '-1'. dtc takes negative values (and other = expressions). >=20 > Ha! <-1> didn=E2=80=99t work for me but <(-1)> does. >=20 >>=20 >>>=20 >>> I would find it neat to do it like this: >>>=20 >>> interrupts-extended =3D <0xffffffff>, >>> <&aic AIC_IRQ 626 IRQ_TYPE_LEVEL_HIGH>; >>>=20 >>> but unfortunately the kernel doesn't pick up on it: >>>=20 >>> [ 0.767964] apple-admac 238200000.dma-controller: error -6: IRQ = index 0 not found >>> [ 0.773943] apple-admac 238200000.dma-controller: error -6: IRQ = index 1 not found >>> [ 0.780154] apple-admac 238200000.dma-controller: error -6: IRQ = index 2 not found >>> [ 0.786367] apple-admac 238200000.dma-controller: error -6: IRQ = index 3 not found >>> [ 0.788592] apple-admac 238200000.dma-controller: error -6: no = usable interrupt >>=20 >> We should make this case work. It is less fragile IMO as it doesn't=20= >> depend on the provider's translation of cells. >=20 > Then I may send some patch to that end. Turns out there=E2=80=99s no need. Passing in <0> in place of a phandle = reference looks like what we want: = https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dr= ivers/of/base.c?h=3Dv5.18-rc2#n1334 (Confirmed by testing to do the right thing with the IRQs.) Martin=