Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1590521rdb; Tue, 20 Feb 2024 00:19:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXo7bUlzcX9zo71Y2DGIwbiAuHUoqyAqHg2JJtkDR4RmZ8adX9J8FCyXPkypSsEHfDv3+XP5lIBb8ZBsJiWxuiklveJjwzVc2ZgeHfdMA== X-Google-Smtp-Source: AGHT+IE4uFwvLQV0piR1wX8aMjI3zhJM6INMTmQBPz+Ksr6BNgLKO0CzBHZ0LDI1KFjDKjcbrIgt X-Received: by 2002:aca:1202:0:b0:3c1:3410:d292 with SMTP id 2-20020aca1202000000b003c13410d292mr14726187ois.15.1708417184236; Tue, 20 Feb 2024 00:19:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708417184; cv=pass; d=google.com; s=arc-20160816; b=PmoTAQnCFdLfTFZRnRWvdSk9xiyhuvq2NBYo299x049GRbUD7kxk6TdZjK9b4xI1iH zB8e9cXEsv0HUjy0SecoG6n3AST9XpEzx/xdmP+opKCJ5aTDB8W+D9cEmOlKTGkRMY4R p+wq4emnUbbyXnWxC9HkEwMU+v4H99NWHbKfa/fjdGTEBnatSsPVy+lSxH+Pj1zyGRph jvb89u+iKj+AGezPbFqP9tIQ1dhChPGcNU8CYUApsPC0mNcJonG/Z5DCI9UV5/c4cYDe /CMLZg80M7mu3BmcZCkhhTG42jQp4IYGg24AitNfia+Vx1Ak7rAeVnLSNmtXTuJlCxz0 yTVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=HEziOHGiSIYIXSE2DKbMAoSccSRuJEWP3yua6RmUOog=; fh=2Fc3DMgXyjzC2FeyFVVvgf7/2NKrM3oQMbaoiMKErzw=; b=PA8/oqpWZmE85mXo/75hMT3hdNEkRLFoGHB4kfwsA8Fnv9yZ0vURBR61Oi08Jk0ZeA qGJzD+pv+5L8tq1w3CrtoghMIlf35AfjmP9wF86zLdNvK6tl007KmANWE5Zu9GtK+9cm VCB3Y1XLCKXQSbKGTB0v0Ayj3Ridex4BzUW0pblm2rX7rW2V1ZEb09kaGuwiuVly/V9S kkmAVYShhDFZsA/+6RgXr3QAkkwXKsxnLVIMD64wX7nwE27LRNMbmnn/ECK8QSpu9Wgy +egma5LN7ZDl+lM5lnOFGWOJAgHwT2V/UBmpmX5gYwZUB1+Mo2BIRxKMWlrNCxbgcaUf AlKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P5fxi12v; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2016-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2016-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id dw15-20020a056a00368f00b006e47146f13csi1902634pfb.297.2024.02.20.00.19.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:19:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2016-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=@chromium.org header.s=google header.b=P5fxi12v; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2016-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2016-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 C1607282D4A for ; Tue, 20 Feb 2024 08:19:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DABB85C8E8; Tue, 20 Feb 2024 08:19:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="P5fxi12v" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 765305C5FD for ; Tue, 20 Feb 2024 08:19:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417173; cv=none; b=u1PO9BAjY87uaWnM4xzJePFFKTbt+/z5L+1IyvugVhHwaN0Njm834xWmqNwNHM8tumIAB1k/MTqlIp1YKNtjUWrZCpxpYfMpN4DD9C38fqJAcfAcM2o/NCPeVobACHPO/Ctsfv4LgGmCahwaAoj+rju9rxA4iCaVs1vNsyWPGjs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708417173; c=relaxed/simple; bh=ne6OIwC6Q4m/gonKfOP4zmqIeEWDkyxVyw9N1NHAagk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fCkwLHK+SZBP0lY3dYMEGmb+F5nQtmPhDqOka9+UaWtxhKrMIEV92TdNFV5eq8YDq0mZRqz2br6PLdR4sTbWU/BGVUrWmh/YyqH/FT6xKwlvUFQQfrEFX3JuYqMtSudVS7z7Rm2kDVa+QtOaoUSvnB61HGW4ozkYYJv4C9noJj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=P5fxi12v; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-512bd533be0so1852716e87.0 for ; Tue, 20 Feb 2024 00:19:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708417169; x=1709021969; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HEziOHGiSIYIXSE2DKbMAoSccSRuJEWP3yua6RmUOog=; b=P5fxi12vffvrIuvZB5sK08Fgaf/rRiFBMC9c1zposmptaMRna4tQ6mPCgMwtDNc3zX uRrCqrkKMBzVf8GYV3e5XH5Gs7qXxbrmjQui+y2TRb58xQXZgygCiSfp+yvGvwrQAVZn E62u32woJfva/G2fbh/aitCXYQq/J5535NdWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708417169; x=1709021969; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HEziOHGiSIYIXSE2DKbMAoSccSRuJEWP3yua6RmUOog=; b=fVxwOinFhfAYUcaUErODS1F5YK0n1rSEWHbQe/fiuQQ9Eqq5OZliqq/2RhMQA51iX4 bIHBtGjelZyEMmGzG8sLOv0awC7uxgNj/Bq8xk3EVIQswhwd5HI7mcjf+Nr5z6RpIkLL 5OY6pC/2OlMfpGAylJ6rQoHGwzBkmoLveiaNxHaMKoKMTEndI52d3jYc64eZ9Y3TEo9H AUqhxN0gkam0rM/PQ9aVGkyRd0DzVCyNe8QUr4kgViJQx+KkLSqNUdSejOncAuIYri56 e02QbgjawnjL3qafxvLsXoqoQViVmJOfhCSceM8BXytjqxwMmiyncVoIt856BVz7qk+H 35Iw== X-Forwarded-Encrypted: i=1; AJvYcCWcJdh+QUlKKe40vK2ODLUIxgDsCREoKvcWtP7aL/Kz0MwIvZzORg5BY3bTCJY3OEHGt9uthV5vMZnNsIuylTgiBZ6AXL3q9Hvkgpk58dcv X-Gm-Message-State: AOJu0YxRWGKif1Ik0r7QEwTy1RnOpitD3p5QNpiJ7/W0W4Irs+tKNc6Q ttEOMIn1/LBwEcCpS/gq3frtw3B/2j3SHZMTcKe1Udg6xG6/aT9ivXOhUVcRbhvzVPv+aJYF9t3 8QnbJl0LXsM008qBHUMC8E+1FI47nI3S63AL6 X-Received: by 2002:a05:6512:3b89:b0:512:b3a3:4adc with SMTP id g9-20020a0565123b8900b00512b3a34adcmr3730322lfv.0.1708417169550; Tue, 20 Feb 2024 00:19:29 -0800 (PST) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240126063500.2684087-1-wenst@chromium.org> <20240126063500.2684087-2-wenst@chromium.org> <74b9f249-fcb4-4338-bf7b-8477de6c935c@linaro.org> <21568334-b21f-429e-81cd-5ce77accaf3c@linaro.org> <78241d63-3b9d-4c04-9ea5-11b45eac6f00@linaro.org> <20240130223856.GA2538998-robh@kernel.org> In-Reply-To: From: Chen-Yu Tsai Date: Tue, 20 Feb 2024 16:19:18 +0800 Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: net: bluetooth: Add MediaTek MT7921S SDIO Bluetooth To: Rob Herring , Krzysztof Kozlowski Cc: Ulf Hansson , Marcel Holtmann , Luiz Augusto von Dentz , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 6, 2024 at 1:50=E2=80=AFAM Ulf Hansson = wrote: > > On Wed, 31 Jan 2024 at 04:39, Chen-Yu Tsai wrote: > > > > (+CC Ulf Hansson) > > > > On Wed, Jan 31, 2024 at 6:38=E2=80=AFAM Rob Herring w= rote: > > > > > > On Tue, Jan 30, 2024 at 05:25:38PM +0100, Krzysztof Kozlowski wrote: > > > > On 30/01/2024 08:47, Chen-Yu Tsai wrote: > > > > > On Tue, Jan 30, 2024 at 3:37=E2=80=AFPM Krzysztof Kozlowski > > > > > wrote: > > > > >> > > > > >> On 30/01/2024 04:32, Chen-Yu Tsai wrote: > > > > >>> On Mon, Jan 29, 2024 at 3:34=E2=80=AFPM Krzysztof Kozlowski > > > > >>> wrote: > > > > >>>> > > > > >>>> On 29/01/2024 04:38, Chen-Yu Tsai wrote: > > > > >>>> > > > > >>>>>>> +allOf: > > > > >>>>>>> + - $ref: bluetooth-controller.yaml# > > > > >>>>>>> + > > > > >>>>>>> +properties: > > > > >>>>>>> + compatible: > > > > >>>>>>> + enum: > > > > >>>>>>> + - mediatek,mt7921s-bluetooth > > > > >>>>>> > > > > >>>>>> Can it be also WiFi on separate bus? How many device nodes d= o you need > > > > >>>>>> for this device? > > > > >>>>> > > > > >>>>> For the "S" variant, WiFi is also on SDIO. For the other two = variants, > > > > >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On bot= h those > > > > >>>>> variants, Bluetooth can either go over USB or UART. That is w= hat I > > > > >>>>> gathered from the pinouts. There are a dozen GPIO pins which = don't > > > > >>>>> have detailed descriptions though. If you want a comprehensiv= e > > > > >>>>> binding of the whole chip and all its variants, I suggest we = ask > > > > >>>>> MediaTek to provide it instead. My goal with the binding is t= o document > > > > >>>>> existing usage and allow me to upstream new device trees. > > > > >>>>> > > > > >>>>> For now we only need the Bluetooth node. The WiFi part is per= fectly > > > > >>>>> detectable, and the driver doesn't seem to need the WiFi rese= t pin. > > > > >>>>> The Bluetooth driver only uses its reset pin to reset a hung = controller. > > > > >>>> > > > > >>>> Then suffix "bluetooth" seems redundant. > > > > >>> > > > > >>> I think keeping the suffix makes more sense though. The chip is= a two > > > > >>> function piece, and this only targets one of the functions. Als= o, the > > > > >> > > > > >> That's why I asked and you said there is only one interface: SDI= O. > > > > > > > > > > There's only one interface, SDIO, but two SDIO functions. The two > > > > > functions, if both were to be described in the device tree, would > > > > > be two separate nodes. We just don't have any use for the WiFi on= e > > > > > right now. Does that make sense to keep the suffix? > > > > > > > > Number of functions does not really matter. Number of interfaces on= the > > > > bus would matter. Why would you have two separate nodes for the sam= e > > > > SDIO interface? Or do you want to say there are two interfaces? > > > > There is only one external interface. I don't know how the functions > > are stitched together internally. > > > > It could be that the separate functions have nothing in common other > > than sharing a standard external SDIO interface. Each function can be > > individually controlled, and operations for different functions are > > directed internally to the corresponding core. > > > > > Right, one device at 2 addresses on a bus should be a node with 2 "re= g" > > > entries, not 2 nodes with 1 "reg" address each. > > > > AFAICU that's not what the MMC controller binding, which I quote below, > > says. It implies that each SDIO function shall be a separate node under > > the MMC controller node. > > Yes, that's what we decided to go with, a long time ago. At least in > this particular case, I think it makes sense, as each function > (child-node) may also describe additional resources routed to each > function. > > A typical description could be for a WiFi-Bluetooth combo-chip, where > each function may have its own clocks, irqs and regulators being > routed. Rob, Krzysztof, does that help you understand why the binding and example are written with bluetooth being one node and WiFi (should it ever be added= ) being a separate node? It is based on the existing MMC controller bindings. ChenYu > > > > > > patternProperties: > > "^.*@[0-9]+$": > > type: object > > description: | > > On embedded systems the cards connected to a host may need > > additional properties. These can be specified in subnodes to the > > host controller node. The subnodes are identified by the > > standard \'reg\' property. Which information exactly can be > > specified depends on the bindings for the SDIO function driver > > for the subnode, as specified by the compatible string. > > > > properties: > > compatible: > > description: | > > Name of SDIO function following generic names recommended > > practice > > > > reg: > > items: > > - minimum: 0 > > maximum: 7 > > description: > > Must contain the SDIO function number of the function thi= s > > subnode describes. A value of 0 denotes the memory SD > > function, values from 1 to 7 denote the SDIO functions. > > > > > > ChenYu > > Kind regards > Uffe