From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (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 A680B1B150F for ; Wed, 31 Jul 2024 12:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430667; cv=none; b=EiWRDWWbsNrNCQ0c1N8qN/iLVIaL5OZcenuVs98SZu7RD2uC8nB84BS8s23XornELNiFHninB8gIzQb71ot+baKfIWCwxAcQaBHoFMqdayravgrGdLbM8BJemPwc2+2j1vnhep6xnwlyqKRRj1nB8icj0gH2ZVma2jPuF68fQ9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430667; c=relaxed/simple; bh=O7oZZngsgG4aTYFX6SR1nQEaymMgdukO/CqxAueIZ6A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RSenH7h7pfqXkDYeI1Qb56OP/D62E0UX1o8GVs2OzaVZ037E195gXyafMtx/C+TXALWPhzoSGgzz2Q4YSoLbFFYRtRXqsYVZ7aETLDXEK6vVvss4ZqrQkt0YU5pW+vhvy9VH8/Ad+j2UflXLNGgVd6OgUt1nMvtb308mCdxzajE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=C4UwkRQz; arc=none smtp.client-ip=209.85.210.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="C4UwkRQz" Received: by mail-ot1-f51.google.com with SMTP id 46e09a7af769-709485aca4bso2296926a34.1 for ; Wed, 31 Jul 2024 05:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1722430664; x=1723035464; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=EzC0eqz8Kjb84+0Jbqizan62tKi+1Crzp5DWFl/GO8k=; b=C4UwkRQzIs9eJl71Hu0+nYaePviIJHgs0ZUj3hK4hPCKs7y0Ow4afsb7MJ/g4DJQoF OgVbYSRy7msbodd2QC6/gP+UNeIysjlfEDJo8KfZGookk+QliIdj8e7mFzuTFnv/t1gq C9Nd2pBcIqNiEuWB1DGwOxcxoWOHfERN9UWSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722430664; x=1723035464; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EzC0eqz8Kjb84+0Jbqizan62tKi+1Crzp5DWFl/GO8k=; b=qx5H7tlO6rniYP04QgKZl5LTa+dG6tCJeUOudgSd1bTRISVnK9NyoOLfsoVBwHSG2o cKWR8+lmGn5ydNaOmWMWDrOOshvOtv0tJcTklfgrmUGzENkKSTFes0+198bzq9P9uGlI DPzaLjDM9EUBPqMkPDmUJi+tk8kN3Fe4kESqGaAVAwhoZ6JbKSOhfOxPZQyJ+SUqGUsm v6Go6B23RsCuZ0DOcJ2ISixFf0BycmDVWt/1uvky59hWph3Kdvray/sShV4JpJvJpr2+ klPjj16Fq6cgekn9BtdrcL3EbnyMhV5lf+2nv3+N2beFzy2Z5SXXHELV/bRF72ckji+2 ZszQ== X-Forwarded-Encrypted: i=1; AJvYcCU432ZHuMx/krT3YT9AomOGvBaQwk8WoClWqLhYd+1v1nNMuyEYIJ6EsHUJ+E9ThHO7XP85C+qoFhjM06dZ1so8Xwx4peBIPJIhTwV1 X-Gm-Message-State: AOJu0Yy09yi6AAyphdwOD0NRxDVDt1iLROcE1e6e88eIfrMw//J81yq7 VNtJczUvOB6SrOuyUs3aMbm+U5aAMe1Awp9K4dKlDPNsfdim2HKb30RXKCc03g== X-Google-Smtp-Source: AGHT+IHnwjS7xUKmnQm2qU+GCK1j/DPPQMAqXjgNJonWiPZW/IiZxnqhcjOzlbYc88CqRd8NLxWBbQ== X-Received: by 2002:a05:6358:b409:b0:1ac:efb0:fb2e with SMTP id e5c5f4694b2df-1adc06d4d72mr2646273855d.22.1722430663503; Wed, 31 Jul 2024 05:57:43 -0700 (PDT) Received: from [192.168.178.137] (f215227.upc-f.chello.nl. [80.56.215.227]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3f91a8cfsm72720796d6.60.2024.07.31.05.57.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Jul 2024 05:57:42 -0700 (PDT) Message-ID: Date: Wed, 31 Jul 2024 14:57:37 +0200 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 v5 2/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description for AP6275P To: Sebastian Reichel Cc: Krzysztof Kozlowski , Jacobe Zang , robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org, Linus Walleij , efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Andy Green References: <20240730033053.4092132-1-jacobe.zang@wesion.com> <20240730033053.4092132-3-jacobe.zang@wesion.com> <191025b5268.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> <191030eac78.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> <3d3b8e0a-7492-4db1-bd73-c30a488edaa7@kernel.org> <191035b8c28.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> Content-Language: en-US From: Arend van Spriel Autocrypt: addr=arend.vanspriel@broadcom.com; keydata= xsFNBGP96SABEACfErEjSRi7TA1ttHYaUM3GuirbgqrNvQ41UJs1ag1T0TeyINqG+s6aFuO8 evRHRnyAqTjMQoo4tkfy21XQX/OsBlgvMeNzfs6jnVwlCVrhqPkX5g5GaXJnO3c4AvXHyWik SOd8nOIwt9MNfGn99tkRAmmsLaMiVLzYfg+n3kNDsqgylcSahbd+gVMq+32q8QA+L1B9tAkM UccmSXuhilER70gFMJeM9ZQwD/WPOQ2jHpd0hDVoQsTbBxZZnr2GSjSNr7r5ilGV7a3uaRUU HLWPOuGUngSktUTpjwgGYZ87Edp+BpxO62h0aKMyjzWNTkt6UVnMPOwvb70hNA2v58Pt4kHh 8ApHky6IepI6SOCcMpUEHQuoKxTMw/pzmlb4A8PY//Xu/SJF8xpkpWPVcQxNTqkjbpazOUw3 12u4EK1lzwH7wjnhM3Fs5aNBgyg+STS1VWIwoXJ7Q2Z51odh0XecsjL8EkHbp9qHdRvZQmMu Ns8lBPBkzpS7y2Q6Sp7DcRvDfQQxPrE2sKxKLZVGcRYAD90r7NANryRA/i+785MSPUNSTWK3 MGZ3Xv3fY7phISvYAklVn/tYRh88Zthf6iDuq86m5mr+qOO8s1JnCz6uxd/SSWLVOWov9Gx3 u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owQLrlMBGXT4NnRNV0+yHmusXPOPIqQCKEtbWSx9s2slQxmXukPYvLnuRJqkPkvrTgjn5d eSE0Dkhni4292/Nn/TnZf5mxCNWH1p3dz/vrT6EIYk2GSJgCLoTkCcqaM6+5E4IwgYOq3UYu AAgeEbPV1QeTVAPrntrLb0t0U5vdwG7Xl40baV9OydTv7ghjYZU349w1d5mdxg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/30/2024 7:38 PM, Sebastian Reichel wrote: > Hi, > > On Tue, Jul 30, 2024 at 01:16:57PM GMT, Arend Van Spriel wrote: >> On July 30, 2024 12:18:20 PM Krzysztof Kozlowski wrote: >> >>> On 30/07/2024 11:52, Arend Van Spriel wrote: >>>> On July 30, 2024 11:01:43 AM Krzysztof Kozlowski wrote: >>>> >>>>> On 30/07/2024 08:37, Arend Van Spriel wrote: >>>>>> + Linus W >>>>>> >>>>>> On July 30, 2024 5:31:15 AM Jacobe Zang wrote: >>>>>> >>>>>>> Not only AP6275P Wi-Fi device but also all Broadcom wireless devices allow >>>>>>> external low power clock input. In DTS the clock as an optional choice in >>>>>>> the absence of an internal clock. >>>>>>> >>>>>>> Reviewed-by: Arend van Spriel >>>>>>> Signed-off-by: Jacobe Zang >>>>>>> --- >>>>>>> .../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 8 ++++++++ >>>>>>> 1 file changed, 8 insertions(+) >>>>>>> >>>>>>> diff --git >>>>>>> a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml >>>>>>> b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml >>>>>>> index 2c2093c77ec9a..a3607d55ef367 100644 >>>>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml >>>>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml >>>>>>> @@ -122,6 +122,14 @@ properties: >>>>>>> NVRAM. This would normally be filled in by the bootloader from platform >>>>>>> configuration data. >>>>>>> >>>>>>> + clocks: >>>>>>> + items: >>>>>>> + - description: External Low Power Clock input (32.768KHz) >>>>>>> + >>>>>>> + clock-names: >>>>>>> + items: >>>>>>> + - const: lpo >>>>>>> + >>>>>> >>>>>> We still have an issue that this clock input is also present in the >>>>>> bindings specification broadcom-bluetooth.yaml (not in bluetooth >>>>>> subfolder). This clock is actually a chip resource. What happens if both >>>>>> are defined and both wifi and bt drivers try to enable this clock? Can this >>>>>> be expressed in yaml or can we only put a textual warning in the property >>>>>> descriptions? >>>>> >>>>> Just like all clocks, what would happen? It will be enabled. >>>> >>>> Oh, wow! Cool stuff. But seriously is it not a problem to have two entities >>>> controlling one and the same clock? Is this use-case taken into account by >>>> the clock framework? >>> >>> Yes, it is handled correctly. That's a basic use-case, handled by CCF >>> since some years (~12?). Anyway, whatever OS is doing (or not doing) >>> with the clocks is independent of the bindings here. The question is >> >> Agree. Probably the bindings would not be the place to document this if it >> would be an issue. >> >>> about hardware - does this node, which represents PCI interface of the >>> chip, has/uses the clocks. >> >> The schematics I found for the wifi module and the khadas edge platform show >> these are indeed wired to the chip. > > I have a Rockchip RK3588 Evaluation Board on my desk, which uses the > same WLAN AP6275P module. I think I already commented on a prior > version of this series: The LPO clock is needed to make the PCIe > device visible on the bus. That means this series only works if the > clock has already been running. Otherwise the PCIe driver will never > be probed. To become visible the devices requires: > > 1. The LPO clock to be enabled > 2. Power to be applied > 3. The WL_EN gpio to be configured correctly > > If one of the above is not met, the device will not even appear in > 'lspci'. I believe the binding needs to take into consideration, that > pwrseq is needed for the PCIe side. Fortuantely the heavy lifting of > creating the proper infrastructure for this has already been done by > Bartosz Golaszewski for Qualcomm WLAN chips. What is missing is a > pwrseq driver for the Broadcom chip (or this specific module?). That does not really make sense. There is no relation between the LPO clock and the PCIe clocks so 1) being a requirement for probing the device looks odd. It also does not match past experience when I assisted Andy Green in getting this module up and running almost two years ago. """ On 11/9/22 18:26, Arend Van Spriel wrote: > On November 8, 2022 11:48:22 AM Andy Green wrote: >> Hi - >> >> I'm trying to bring up AP6275 support on 6.1-rc4... I have tried a forward-ported sdk broadcom driver from the 5.10 based soc sdk, and the mainline brcm fullmac driver. > > Do you have a reference to the SDK? For what SoC? Hi Arend - It's the OOT broadcom driver that came with the latest (Sept 2022) vendor SDK for RK3588, from Rockchip. Their evb has an AP6275 onboard. PCIe generally is working on this (eg, for NVMe in the PCIe 4-lane slot) and for network, and the PCIe part seems OK when I hack in a gpio regulator to hold up the module enable gpio. """ So regarding 2) and 3) I agree with you. Regards, Arend