Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2550338rdb; Mon, 5 Feb 2024 09:50:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpM6oMt7Pqj4/FTwQJrwpOWXyq8+Ogua4J2wkFUh3HbEWqUtkdCaoQ1MIzrR3sJ5rgc99z X-Received: by 2002:a05:6a20:9148:b0:19c:7bc4:6b0 with SMTP id x8-20020a056a20914800b0019c7bc406b0mr312681pzc.42.1707155420535; Mon, 05 Feb 2024 09:50:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707155420; cv=pass; d=google.com; s=arc-20160816; b=T60Iz1m1f6/MzZZf+6y+UcJ6ichcKhL96jdbxrHZ9owIIO36FWAUebuu2kXXx9TV7t 7Gf9QqClwRo1uKFfzZShXcQi/ZNxnD87O4PcjmGg+GP/0JHrnJaWwNpH1lwrjTqBMc8Q Clk6hHGqYrQIfnvc+w5984+40p40TLiv2r6lVc63XsEao+nv8L8GZOcbkhEdu5IAgXsb sXTOfUJrXliLLvaI7H7GiUxaYN64cKBeuHIkPYD26x4msu2P35hficrR72suPtsvZmCY l5kdul2ZAJh66WAfGWCEkzHqAudqvfwOiArGU+izxv/+1wctQBBWkPR3Cc9uf1TeG9Tw xwhw== 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=i/5gYNDF0nkUKp5M5EY3mkMekMIIUthcO9+zxPUgVLc=; fh=Kflw0URXe1ySdx9IXgrguAVX7wWdc68pB4Te3Qqgg7c=; b=xUPNQ+DiQIxfzdSXyd/f4/lsv9qsyQW5mn3c7QAz0fTbVx7voj5LZScVXdwPi3ynKy S4UTPJncx175vfhM+lwYv5dcZ+kcgR9R2j7HjwJtYiqBUVOdudLwFDevfdgKjRCXKQku 6FgT35fQdXdW40L0AEK8EYl1rPH03iRf0wBNsMeedMsjDlpq1MQkMdgXtF63zkofhsQB J7uc3ba64CgDgmh17U0BYEgSdlPWaVZx67K4biX+wD3TPJh8/hEUI1prRQ3iHrz5z07k t2X//6Zoex3kxKuxnerL4TwgunStk8Yz+ZsIjFEZR0M7799a4zX0z/oBNB47JbU9ZJIq QKlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NA5SnIQq; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXcRQoKvG9pY+xX3NgIearvp8+DbOUOCe0P1jLctya40KBHciKC3Qd46bbveGu7QMOWg4sFxG/FvlZvS2DuasjtxzKsu3lq90P1OcP7DA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k62-20020a633d41000000b005dbedf04f68si215761pga.10.2024.02.05.09.50.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 09:50:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NA5SnIQq; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1616-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 005A028396E for ; Mon, 5 Feb 2024 17:50:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E528845961; Mon, 5 Feb 2024 17:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NA5SnIQq" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 ABC4E4503C for ; Mon, 5 Feb 2024 17:50:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707155409; cv=none; b=kDQM1hjbp6wphVbNjLVA6EplszAW9KIhFviR+PNBuSLrV5vIInqUhqRs1VS5vBu/pCppklQBJ3vswCsMDWD6mC7yAxxNF/9kufGF8mkAzTgRQ23nh2Orcf4LNWG7+7Vrgqrk98RdSvcKX57Ul2ICe7nWvdzHmulzyYuyZ37u0/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707155409; c=relaxed/simple; bh=XtyKIZOHUkITyVfVCKKLQDn/bkAPoBlW71uBdrkDQ00=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZEo7eP1Mb6xX3LGQWML9lFVaGvE6qTu+UEpC8BmHaILgAMb+tXlH2brzeaSMjUoGypBZi8GLo9KyZ6MTCoonGnc6qogucVaH498N8lqywPvkdeHM+6uBjCWA0KtdAYjofwQhum6CzBTt8p3Gsj9effUuYk5boFiRHTxqAzXgktQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=NA5SnIQq; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-6045db1b5a1so12268477b3.2 for ; Mon, 05 Feb 2024 09:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707155406; x=1707760206; 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=i/5gYNDF0nkUKp5M5EY3mkMekMIIUthcO9+zxPUgVLc=; b=NA5SnIQqYS6Y0AHMGKLRgQc+CJBkbigT6DthXyIF8RcMeE59TaM68dOHBXH+haA347 VJTp7V1vgowu7TLF+vwr2fQBK+TH9vLhMnScklofq7V2X7/4cKra29FB0y5UOvi8BW3Q X6bfdVtCw/fjLvIGOdF68sqVr1iNTPJfrQPD5EzRGbqA44R2gLj6aj1lKV0Wyq3mNv9X hSCtPRWIBFT+C2ym4G4pWyLxFGoCEE+V+/t9l/I+8oiv0STlz6BPRdkF4xGGM23dKDPC Dw9K+0FkbIVu9cYK0e2VHXS14pn0ZWyrrUuv9IsUXn35kq7R1zZ5+APl1Fu1oWroa4X1 Iwdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707155406; x=1707760206; 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=i/5gYNDF0nkUKp5M5EY3mkMekMIIUthcO9+zxPUgVLc=; b=nrGbmSWf4t4tilfiSYPOxElNy/VVP2qWRznXVvIXaJ5DwWKoeBkJ1evaksnZGxuLd+ Jagf+wGYoEQYEYL4kCgXpTdUFCdW1LTWYj3yUMCiE4O/8GGvfN/sih2CvjE6py1pnbkK Za29BtZvMBSUB/LCX2Ds7j8fg1T2Unf1A/bFt1q0AWF4MfEgeGrb1fvJKvx9KSxyCER5 uTrhxP8GKdAybRcSCMqAciXJUIX30iNh8d4RUNp+UrFoQx93iq4jJRgaK9v95WzV2LlN ibWr+O8rPvUJUmSwNp9Lx8KR95pmiYlnh3xz4km8bOSyODhgikSAS2JO+FK6olMaPddr FW4Q== X-Gm-Message-State: AOJu0Yzy0IB4V4zeOYo5m3+yJNz6/+h8u0RYfypOO6tkLuA1QyuSZK7Z L3E0hTTp+mV8fOffj2/u55zDimGAu3VigQdqOp0l300PIIpKan6ZQwThWgj/94iPllPshs1fdWy YsGxyoCxmYkyLNQefG9aEzSIEKHx0WiCiWKd9lw== X-Received: by 2002:a25:6648:0:b0:dc2:1bc4:e06b with SMTP id z8-20020a256648000000b00dc21bc4e06bmr95682ybm.51.1707155406596; Mon, 05 Feb 2024 09:50:06 -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: Ulf Hansson Date: Mon, 5 Feb 2024 18:49:30 +0100 Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: net: bluetooth: Add MediaTek MT7921S SDIO Bluetooth To: Chen-Yu Tsai Cc: Rob Herring , Krzysztof Kozlowski , 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 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 wro= te: > > > > 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 do = you need > > > >>>>>> for this device? > > > >>>>> > > > >>>>> For the "S" variant, WiFi is also on SDIO. For the other two va= riants, > > > >>>>> "U" and "E", WiFi goes over USB and PCIe respectively. On both = those > > > >>>>> variants, Bluetooth can either go over USB or UART. That is wha= t I > > > >>>>> gathered from the pinouts. There are a dozen GPIO pins which do= n't > > > >>>>> have detailed descriptions though. If you want a comprehensive > > > >>>>> binding of the whole chip and all its variants, I suggest we as= k > > > >>>>> MediaTek to provide it instead. My goal with the binding is to = document > > > >>>>> existing usage and allow me to upstream new device trees. > > > >>>>> > > > >>>>> For now we only need the Bluetooth node. The WiFi part is perfe= ctly > > > >>>>> detectable, and the driver doesn't seem to need the WiFi reset = pin. > > > >>>>> The Bluetooth driver only uses its reset pin to reset a hung co= ntroller. > > > >>>> > > > >>>> 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. Also,= the > > > >> > > > >> That's why I asked and you said there is only one interface: SDIO. > > > > > > > > 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 one > > > > right now. Does that make sense to keep the suffix? > > > > > > Number of functions does not really matter. Number of interfaces on t= he > > > bus would matter. Why would you have two separate nodes for the same > > > 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 "reg" > > 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. > > > 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 this > subnode describes. A value of 0 denotes the memory SD > function, values from 1 to 7 denote the SDIO functions. > > > ChenYu Kind regards Uffe