Message ID | cover.1676482318.git.hns@goldelico.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp322696wrn; Wed, 15 Feb 2023 09:34:46 -0800 (PST) X-Google-Smtp-Source: AK7set/C0ax0J4BQwZtLMt+hT55IJvqfP89xCb85821aVmhIxqAlTMcfPgFCggyQV/DEL7GeX672 X-Received: by 2002:a17:902:ea0d:b0:19a:887d:98ac with SMTP id s13-20020a170902ea0d00b0019a887d98acmr3468724plg.46.1676482486425; Wed, 15 Feb 2023 09:34:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676482486; cv=pass; d=google.com; s=arc-20160816; b=uc68MA2WYKdrt5CmsvsfjgThvKz7hcPfEdWV4yQ8g6WlEYM6rsFeId4kUrnvnm0OL8 v5D6316Ik47g95YWG7UHEpHhpMF753LhIls+x3ax4vOL87IQk7x730lM9KR8fPrWhLE9 WERY8aVI4qw5fQGKvgc0reML3HHUNmwBIZGqe5+h5Xy95FOVo5sWqR0Ob7Ro/wo7YYze ZGXsTfVb28VUqbSdSPF9ANtoGxbjDRTHxkOsgz88gRhIsr3M5KVyWXbpS6zaHxJ60nrG 74wh6Fb2XhMSj7zUxKphb7hLgiHkLX2MeM5gvdRe/lbC0j6Xbg17KTs0SKoLBRp6Klr/ YsHA== ARC-Message-Signature: i=2; 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:from:dkim-signature; bh=bbHmsUjBPSu5l9/TxHE+oHyJRc0agWyhyIiPL5eQgSs=; b=YhTC/B8LaG3WKXZ3c4olrV838ls75/pyxkv1ra2uZTbyffik1XYW/GABJvVjw/wtSh +/7SXxU2uQKOdORI6g6tbKDlPXyLCR6hekbTlw87Ag6zXPPE4QtFfkoMojevSAwXXFR1 3Ug7r6lulrQSc8el/UyGrP+eb+zALaMfykb4fR6QWm0NMBxzPu6IMS54dW22acOIjaBl XrflBsyzDkIPJOG/lBVK4xFAYLjlZO6RsYGJSm6BWIBUONfdrhjY8hU2y9lRS/OgfqW1 cOnQUZD/gIfgzxn2epb0nkkAYSkoTn9x38u/Zz6ruQFQHRuTHpywowxpJBf7nz3CG2+o Jzqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=qZUkv5Mm; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a170902da8200b00189d6969658si5996570plx.342.2023.02.15.09.34.17; Wed, 15 Feb 2023 09:34:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=qZUkv5Mm; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230118AbjBORcc (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Wed, 15 Feb 2023 12:32:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230106AbjBORc2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Feb 2023 12:32:28 -0500 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58CFD3B0C0; Wed, 15 Feb 2023 09:32:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676482320; cv=none; d=strato.com; s=strato-dkim-0002; b=lWVu/79ca+93h6jMeSMlnFeeBVM7mvnPj8rL1DQE2H0erZKkUZQkJFj8TD7PR/UQtc AME7VGWtS7sS7cnAkq8hn6XjQ6zRcc2Vp2lBvfPqddyhF7l+yPpYNsZj5vr+PpDdSDiy hHxDiqja4ghxfsyc1DcxzCYiSMHd87XyQZ9PK0YFriWzXZHPszP6AMZe6ntHhIOzrRcr /6I6syrvGT2aFMuvLjdZjdf8jai7rdGYt50JoiF11YLqGrdBqXwG+ATaS9UJDV3g4zJM yakbIiKbk15hTizbw0zp0NElvlcv5iZvyQN9Wq53uiHdAzM/T1YVtaAC2va0HhTuduaE nGTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482320; s=strato-dkim-0002; d=strato.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=bbHmsUjBPSu5l9/TxHE+oHyJRc0agWyhyIiPL5eQgSs=; b=D4a+GO0n0EYgIDcjiFWfce2rARO8keGb7eVzogKNh83Z+18Wv6wWqVsd1WAqec/Kf+ bsUslEj752Zo3BCxBq9+FIpRo1rIMw7JF+uJeKh+17Z1RDLr2OQBf8KVaYoWiUD//7KA 8eTvC8nT6SoJKY/qVjj28/W1zpyzqOIHGCNXvWNAFGp3zzggmcRt3LZG3FQaAtnvSYi+ wVMyAizGTkGOwBdhiR+XbhwkoNeZ/Xqrd89jJwHtTFCfSHzxRBY2uOELRxrN3WOPtALN GGUcBIUWGqsdUkMj5mq6prB8ux+1vNa5Adg8+i5QTMOg0trlJAWcPyixWk9YFRXTJ+Ex b2Qg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482320; s=strato-dkim-0002; d=goldelico.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=bbHmsUjBPSu5l9/TxHE+oHyJRc0agWyhyIiPL5eQgSs=; b=qZUkv5MmC6X6qSsnaKNKmqBmFYozWJvR0TJJRr0pgBCjmQB66sBKXA86TrgvHnuugJ H15eaqaGNpy+IBm2s8j7ncI31iHXycT2psq49YNkkgHtfkFnF+vLkTB/w9fA3R3QdpUK jdGJ9JZozuRRZUMtb6u+Zw6x3Ick1iQCkwiYerXKpLNpxd7p54EZFixNQoFLFGYL35c5 LfDlVYdqh1SEFuriz9bV++ZWuzSwN0by9NSSzNgwIOKXiauhyR5T5d6pJbOHX2fIrbiU P0g/nztd3C2tTSTlWsc7BhZxWfTL869uYnCnP0gCACvoFGatpy6AhT55L8cXbSSVkJIT 7oqA== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1iTDUhfN4hi3qVZrWLJ" Received: from iMac.fritz.box by smtp.strato.de (RZmta 49.3.0 DYNA|AUTH) with ESMTPSA id 326d57z1FHVxZCO (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 15 Feb 2023 18:31:59 +0100 (CET) From: "H. Nikolaus Schaller" <hns@goldelico.com> To: Paul Cercueil <paul@crapouillou.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Arnd Bergmann <arnd@arndb.de>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= <rafal@milecki.pl>, Andrew Morton <akpm@linux-foundation.org>, Kees Cook <keescook@chromium.org>, Matthias Brugger <matthias.bgg@gmail.com> Cc: riccardo Mottola <riccardo.mottola@libero.it>, paul@boddie.org.uk, linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, kernel@pyra-handheld.com, "H. Nikolaus Schaller" <hns@goldelico.com> Subject: [RFC 0/3] Make WLAN and Bluetooth basically work for CI20 Date: Wed, 15 Feb 2023 18:31:55 +0100 Message-Id: <cover.1676482318.git.hns@goldelico.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757919299984333056?= X-GMAIL-MSGID: =?utf-8?q?1757919299984333056?= |
Series |
Make WLAN and Bluetooth basically work for CI20
|
|
Message
H. Nikolaus Schaller
Feb. 15, 2023, 5:31 p.m. UTC
RFC V1 2023-02-15 18:31:58: With the applied patch rtc: jz4740: Register clock provider for the CLK32K pin by Paul Cercueil <paul@crapouillou.net> it is now possible to make the CI20 WiFi and Bluetooth setup do something reasonable. This series adds #clock-cells to the jz4780 and fixes the device tree for the CI20. It contains two ugly workarounds since BL_WAKE and WL_WAKE can not be controlled as shutdown-gpios or device-wakeup-gpios by the drivers. We also update the power setup and sequencing and add a clock chain for the 32 kHz clock. Finally, we enable some required CONFIGs for the CI20. Tested on CI20 with v6.2-rc6. H. Nikolaus Schaller (3): MIPS: DTS: jz4780: add #clock-cells to rtc_dev MIPS: DTS: CI20: fixes for WiFi/Bluetooth MIPS: configs: ci20: enable drivers we need for WiFi/Bluetooth arch/mips/boot/dts/ingenic/ci20.dts | 77 ++++++++++++++++++++++---- arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 + arch/mips/configs/ci20_defconfig | 18 +++++- 3 files changed, 84 insertions(+), 13 deletions(-)
Comments
Hi Nikolaus, Le mercredi 15 février 2023 à 18:31 +0100, H. Nikolaus Schaller a écrit : > RFC V1 2023-02-15 18:31:58: > With the applied patch > > rtc: jz4740: Register clock provider for the CLK32K pin > > by Paul Cercueil <paul@crapouillou.net> it is now possible to make > the > CI20 WiFi and Bluetooth setup do something reasonable. > > This series adds #clock-cells to the jz4780 and fixes the device tree > for > the CI20. It contains two ugly workarounds since BL_WAKE and WL_WAKE > can not > be controlled as shutdown-gpios or device-wakeup-gpios by the > drivers. > We also update the power setup and sequencing and add a clock chain > for > the 32 kHz clock. > Finally, we enable some required CONFIGs for the CI20. I do have my own patchset that I wanted to send in time for 6.3-rc1, but the RTC patchset was merged very late so I was waiting for -rc1 to be out before sending it to Thomas. I think my DT changes are better as I have no workarounds. I need to clean up the commits (and have proper commit messages) but you can find my current work there: https://github.com/OpenDingux/linux/commits/for-upstream-ci20 Cheers, -Paul > > Tested on CI20 with v6.2-rc6. > > H. Nikolaus Schaller (3): > MIPS: DTS: jz4780: add #clock-cells to rtc_dev > MIPS: DTS: CI20: fixes for WiFi/Bluetooth > MIPS: configs: ci20: enable drivers we need for WiFi/Bluetooth > > arch/mips/boot/dts/ingenic/ci20.dts | 77 ++++++++++++++++++++++-- > -- > arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 + > arch/mips/configs/ci20_defconfig | 18 +++++- > 3 files changed, 84 insertions(+), 13 deletions(-) >
Hi Paul, I wasn't aware of your work and it could have saved me a lot of time to experiment and try to make my patch set work. But we are still lucky, as we can merge ideas and find the really best solution. Anyways you can take my patch 1/3 and 3/3 and we have only to discuss details of 2/3. Interesting is your setup of several fixed regulators using regulator-settling-time-us to take care of power up sequencing. What I don't understand is the fixedregulator-5 which has no controlling gpio but is always on. What is it needed for? Maybe just to be used to silence v(q)mmc-supply warnings etc.? But you do not really switch or enable/disable power of the SDIO or bluetooth UART interface? Is it necessary to add a compatible of "ingenic,iw8103-fmac"? If it works with the standard "brcm,bcm4329-fmac" driver (note that I have "brcm,bcm4330-fmac" because that is how the module identifies itself) there seems to be no need for another compatible and a special bindings documentation. For bluetooth you could add brcm,bt-pcm-int-params = [01 02 00 01 01]; so that we can eventually add some PCM stream to the sound setup. Finally you have made node labels more consistent by calling them wifi* while I made them wlan0*... Well, just a matter of taste. Then I tried to take your tree, add my defconfig (because it seems as if you have not updated configs), but I could only see [ 0.929072] Bluetooth: hci0: BCM: firmware Patch file not found, tried: [ 0.935704] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.img,ci20.hcd' [ 0.941683] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.hcd' [ 0.946827] Bluetooth: hci0: BCM: 'brcm/BCM.img,ci20.hcd' [ 0.952278] Bluetooth: hci0: BCM: 'brcm/BCM.hcd' and then the kernel is stuck. So what is your defconfig that I can test your build? BR and thanks, Nikolaus > Am 15.02.2023 um 18:55 schrieb Paul Cercueil <paul@crapouillou.net>: > > Hi Nikolaus, > > Le mercredi 15 février 2023 à 18:31 +0100, H. Nikolaus Schaller a > écrit : >> RFC V1 2023-02-15 18:31:58: >> With the applied patch >> >> rtc: jz4740: Register clock provider for the CLK32K pin >> >> by Paul Cercueil <paul@crapouillou.net> it is now possible to make >> the >> CI20 WiFi and Bluetooth setup do something reasonable. >> >> This series adds #clock-cells to the jz4780 and fixes the device tree >> for >> the CI20. It contains two ugly workarounds since BL_WAKE and WL_WAKE >> can not >> be controlled as shutdown-gpios or device-wakeup-gpios by the >> drivers. >> We also update the power setup and sequencing and add a clock chain >> for >> the 32 kHz clock. >> Finally, we enable some required CONFIGs for the CI20. > > I do have my own patchset that I wanted to send in time for 6.3-rc1, > but the RTC patchset was merged very late so I was waiting for -rc1 to > be out before sending it to Thomas. > > I think my DT changes are better as I have no workarounds. I need to > clean up the commits (and have proper commit messages) but you can find > my current work there: > https://github.com/OpenDingux/linux/commits/for-upstream-ci20 > > Cheers, > -Paul > >> >> Tested on CI20 with v6.2-rc6. >> >> H. Nikolaus Schaller (3): >> MIPS: DTS: jz4780: add #clock-cells to rtc_dev >> MIPS: DTS: CI20: fixes for WiFi/Bluetooth >> MIPS: configs: ci20: enable drivers we need for WiFi/Bluetooth >> >> arch/mips/boot/dts/ingenic/ci20.dts | 77 ++++++++++++++++++++++-- >> -- >> arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 + >> arch/mips/configs/ci20_defconfig | 18 +++++- >> 3 files changed, 84 insertions(+), 13 deletions(-) >> >
Hi Nikolaus, Le mercredi 15 février 2023 à 21:32 +0100, H. Nikolaus Schaller a écrit : > Hi Paul, > I wasn't aware of your work and it could have saved me a lot of time > to > experiment and try to make my patch set work. > > But we are still lucky, as we can merge ideas and find the really > best solution. > > Anyways you can take my patch 1/3 and 3/3 and we have only to discuss > details of 2/3. > > Interesting is your setup of several fixed regulators using > regulator-settling-time-us > to take care of power up sequencing. What I don't understand is the > fixedregulator-5 > which has no controlling gpio but is always on. What is it needed > for? Maybe just to > be used to silence v(q)mmc-supply warnings etc.? It's wired to the various inputs of the ACT8600 chip. The driver will complain if they are not connected to anything. And while we're at it, it will also silence the v(q)mmc-supply warnings, yes. > But you do not really switch or enable/disable power of the SDIO or > bluetooth UART > interface? The badly named "bt_power" regulator powers on the chip, while the "wifi_io" regulator controls the voltage on the VDDIO pins. So these are enabled/disabled when needed. > Is it necessary to add a compatible of "ingenic,iw8103-fmac"? If it > works with the > standard "brcm,bcm4329-fmac" driver (note that I have "brcm,bcm4330- > fmac" because that > is how the module identifies itself) there seems to be no need for > another compatible > and a special bindings documentation. The chip has a different name so we can't guarantee that it works exactly like the BCM4330. So that was my reason behind using a new compatible string with a fallback. However I sent a patch to add the new compatible string to the documentation and it got refused and I was told to just use the brcm,bcm4330-fmac, so I'll just do that. > For bluetooth you could add brcm,bt-pcm-int-params = [01 02 00 01 > 01]; so that we > can eventually add some PCM stream to the sound setup. Sure, does that work though? One (unrelated) note about Bluetooth, I didn't get it to work properly; it works enough to detect my keyboard and allow me to pair with it (typing the password on the BT keyboard) but it will never connect properly after that. > Finally you have made node labels more consistent by calling them > wifi* while I made > them wlan0*... Well, just a matter of taste. Actually the node names should use as much as possible the generic names specified in the devicetree specification (https://www.devicetree.org/specifications/) and "wifi" is one of those. > Then I tried to take your tree, add my defconfig (because it seems as > if you have not > updated configs), but I could only see > > [ 0.929072] Bluetooth: hci0: BCM: firmware Patch file not found, > tried: > [ 0.935704] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.img,ci20.hcd' > [ 0.941683] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.hcd' > [ 0.946827] Bluetooth: hci0: BCM: 'brcm/BCM.img,ci20.hcd' > [ 0.952278] Bluetooth: hci0: BCM: 'brcm/BCM.hcd' > > and then the kernel is stuck. > > So what is your defconfig that I can test your build? I test with the OpenDingux userspace so my defconfig is probably very different from yours. What are you using? About the crash: make sure you have the *very* latest WiFi firmware from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/ I do remember that one particular version of the firmware will crash the kernel. You also don't need the .hcd firmware for Bluetooth to (somewhat) work. > BR and thanks, > Nikolaus Cheers, -Paul > > Am 15.02.2023 um 18:55 schrieb Paul Cercueil > > <paul@crapouillou.net>: > > > > Hi Nikolaus, > > > > Le mercredi 15 février 2023 à 18:31 +0100, H. Nikolaus Schaller a > > écrit : > > > RFC V1 2023-02-15 18:31:58: > > > With the applied patch > > > > > > rtc: jz4740: Register clock provider for the CLK32K pin > > > > > > by Paul Cercueil <paul@crapouillou.net> it is now possible to > > > make > > > the > > > CI20 WiFi and Bluetooth setup do something reasonable. > > > > > > This series adds #clock-cells to the jz4780 and fixes the device > > > tree > > > for > > > the CI20. It contains two ugly workarounds since BL_WAKE and > > > WL_WAKE > > > can not > > > be controlled as shutdown-gpios or device-wakeup-gpios by the > > > drivers. > > > We also update the power setup and sequencing and add a clock > > > chain > > > for > > > the 32 kHz clock. > > > Finally, we enable some required CONFIGs for the CI20. > > > > I do have my own patchset that I wanted to send in time for 6.3- > > rc1, > > but the RTC patchset was merged very late so I was waiting for -rc1 > > to > > be out before sending it to Thomas. > > > > I think my DT changes are better as I have no workarounds. I need > > to > > clean up the commits (and have proper commit messages) but you can > > find > > my current work there: > > https://github.com/OpenDingux/linux/commits/for-upstream-ci20 > > > > Cheers, > > -Paul > > > > > > > > Tested on CI20 with v6.2-rc6. > > > > > > H. Nikolaus Schaller (3): > > > MIPS: DTS: jz4780: add #clock-cells to rtc_dev > > > MIPS: DTS: CI20: fixes for WiFi/Bluetooth > > > MIPS: configs: ci20: enable drivers we need for WiFi/Bluetooth > > > > > > arch/mips/boot/dts/ingenic/ci20.dts | 77 > > > ++++++++++++++++++++++-- > > > -- > > > arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 + > > > arch/mips/configs/ci20_defconfig | 18 +++++- > > > 3 files changed, 84 insertions(+), 13 deletions(-) > > > > > >
Hi Paul, > Am 15.02.2023 um 22:19 schrieb Paul Cercueil <paul@crapouillou.net>: > > Hi Nikolaus, > > Le mercredi 15 février 2023 à 21:32 +0100, H. Nikolaus Schaller a > écrit : >> Hi Paul, >> I wasn't aware of your work and it could have saved me a lot of time >> to >> experiment and try to make my patch set work. >> >> But we are still lucky, as we can merge ideas and find the really >> best solution. >> >> Anyways you can take my patch 1/3 and 3/3 and we have only to discuss >> details of 2/3. >> >> Interesting is your setup of several fixed regulators using >> regulator-settling-time-us >> to take care of power up sequencing. What I don't understand is the >> fixedregulator-5 >> which has no controlling gpio but is always on. What is it needed >> for? Maybe just to >> be used to silence v(q)mmc-supply warnings etc.? > > It's wired to the various inputs of the ACT8600 chip. The driver will > complain if they are not connected to anything. And while we're at it, > it will also silence the v(q)mmc-supply warnings, yes. > >> But you do not really switch or enable/disable power of the SDIO or >> bluetooth UART >> interface? > > The badly named "bt_power" regulator powers on the chip, while the > "wifi_io" regulator controls the voltage on the VDDIO pins. So these > are enabled/disabled when needed. > >> Is it necessary to add a compatible of "ingenic,iw8103-fmac"? If it >> works with the >> standard "brcm,bcm4329-fmac" driver (note that I have "brcm,bcm4330- >> fmac" because that >> is how the module identifies itself) there seems to be no need for >> another compatible >> and a special bindings documentation. > > The chip has a different name so we can't guarantee that it works > exactly like the BCM4330. So that was my reason behind using a new > compatible string with a fallback. Ok, that would be a good reason. > > However I sent a patch to add the new compatible string to the > documentation and it got refused and I was told to just use the > brcm,bcm4330-fmac, so I'll just do that. > >> For bluetooth you could add brcm,bt-pcm-int-params = [01 02 00 01 >> 01]; so that we >> can eventually add some PCM stream to the sound setup. > > Sure, does that work though? Well, I don't know. We have no sound setup. > One (unrelated) note about Bluetooth, I didn't get it to work properly; > it works enough to detect my keyboard and allow me to pair with it > (typing the password on the BT keyboard) but it will never connect > properly after that. I haven't tested it that way in my setup. > >> Finally you have made node labels more consistent by calling them >> wifi* while I made >> them wlan0*... Well, just a matter of taste. > > Actually the node names should use as much as possible the generic > names specified in the devicetree specification > (https://www.devicetree.org/specifications/) and "wifi" is one of > those. I meant the node labels, not the node names. BTW: Wi-Fi is a trademark of the Wi-Fi Alliance and means certification while WLAN means the function. Of course the first must be compatible to 802.11 and other standards while a WLAN could use some different technology. > >> Then I tried to take your tree, add my defconfig (because it seems as >> if you have not >> updated configs), but I could only see >> >> [ 0.929072] Bluetooth: hci0: BCM: firmware Patch file not found, >> tried: >> [ 0.935704] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.img,ci20.hcd' >> [ 0.941683] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.hcd' >> [ 0.946827] Bluetooth: hci0: BCM: 'brcm/BCM.img,ci20.hcd' >> [ 0.952278] Bluetooth: hci0: BCM: 'brcm/BCM.hcd' >> >> and then the kernel is stuck. >> >> So what is your defconfig that I can test your build? > > I test with the OpenDingux userspace so my defconfig is probably very > different from yours. What are you using? upstream ci20_defconfig + my patch 3/3. Otherwise I test with Debian user-space. Can you share your defconfig just for testing purposes? > > About the crash: make sure you have the *very* latest WiFi firmware > from > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/ The BCM4330B1.hcd firmware is missing there. I get mine from https://github.com/armbian/firmware/raw/master/brcm And it works with my setup but not yours. So I think something else is missing or wrong. Note that it is loaded from the SD card but the kernel is stuck earlier. > I do remember that one particular version of the firmware will crash > the kernel. You also don't need the .hcd firmware for Bluetooth to > (somewhat) work. Yes, I know. There may also be some race if the drivers are compiled into the kernel that the bluetooth subsystem searches for the .hcd files before the mmc subsystem has found and SD card. Then we have no firmware even if it is stored. BR, Nikolaus >>> >>>> >>>> Tested on CI20 with v6.2-rc6. >>>> >>>> H. Nikolaus Schaller (3): >>>> MIPS: DTS: jz4780: add #clock-cells to rtc_dev >>>> MIPS: DTS: CI20: fixes for WiFi/Bluetooth >>>> MIPS: configs: ci20: enable drivers we need for WiFi/Bluetooth >>>> >>>> arch/mips/boot/dts/ingenic/ci20.dts | 77 >>>> ++++++++++++++++++++++-- >>>> -- >>>> arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 + >>>> arch/mips/configs/ci20_defconfig | 18 +++++- >>>> 3 files changed, 84 insertions(+), 13 deletions(-)
Hi Nikolaus, Le jeudi 16 février 2023 à 07:58 +0100, H. Nikolaus Schaller a écrit : > Hi Paul, > > > Am 15.02.2023 um 22:19 schrieb Paul Cercueil > > <paul@crapouillou.net>: > > > > Hi Nikolaus, > > > > Le mercredi 15 février 2023 à 21:32 +0100, H. Nikolaus Schaller a > > écrit : > > > Hi Paul, > > > I wasn't aware of your work and it could have saved me a lot of > > > time > > > to > > > experiment and try to make my patch set work. > > > > > > But we are still lucky, as we can merge ideas and find the really > > > best solution. > > > > > > Anyways you can take my patch 1/3 and 3/3 and we have only to > > > discuss > > > details of 2/3. > > > > > > Interesting is your setup of several fixed regulators using > > > regulator-settling-time-us > > > to take care of power up sequencing. What I don't understand is > > > the > > > fixedregulator-5 > > > which has no controlling gpio but is always on. What is it needed > > > for? Maybe just to > > > be used to silence v(q)mmc-supply warnings etc.? > > > > It's wired to the various inputs of the ACT8600 chip. The driver > > will > > complain if they are not connected to anything. And while we're at > > it, > > it will also silence the v(q)mmc-supply warnings, yes. > > > > > But you do not really switch or enable/disable power of the SDIO > > > or > > > bluetooth UART > > > interface? > > > > The badly named "bt_power" regulator powers on the chip, while the > > "wifi_io" regulator controls the voltage on the VDDIO pins. So > > these > > are enabled/disabled when needed. > > > > > Is it necessary to add a compatible of "ingenic,iw8103-fmac"? If > > > it > > > works with the > > > standard "brcm,bcm4329-fmac" driver (note that I have > > > "brcm,bcm4330- > > > fmac" because that > > > is how the module identifies itself) there seems to be no need > > > for > > > another compatible > > > and a special bindings documentation. > > > > The chip has a different name so we can't guarantee that it works > > exactly like the BCM4330. So that was my reason behind using a new > > compatible string with a fallback. > > Ok, that would be a good reason. > > > > > However I sent a patch to add the new compatible string to the > > documentation and it got refused and I was told to just use the > > brcm,bcm4330-fmac, so I'll just do that. > > > > > For bluetooth you could add brcm,bt-pcm-int-params = [01 02 00 01 > > > 01]; so that we > > > can eventually add some PCM stream to the sound setup. > > > > Sure, does that work though? > > Well, I don't know. We have no sound setup. > > > One (unrelated) note about Bluetooth, I didn't get it to work > > properly; > > it works enough to detect my keyboard and allow me to pair with it > > (typing the password on the BT keyboard) but it will never connect > > properly after that. > > I haven't tested it that way in my setup. > > > > > > Finally you have made node labels more consistent by calling them > > > wifi* while I made > > > them wlan0*... Well, just a matter of taste. > > > > Actually the node names should use as much as possible the generic > > names specified in the devicetree specification > > (https://www.devicetree.org/specifications/) and "wifi" is one of > > those. > > I meant the node labels, not the node names. > > BTW: Wi-Fi is a trademark of the Wi-Fi Alliance and means > certification > while WLAN means the function. Of course the first must be compatible > to 802.11 and other standards while a WLAN could use some different > technology. > > > > > > Then I tried to take your tree, add my defconfig (because it > > > seems as > > > if you have not > > > updated configs), but I could only see > > > > > > [ 0.929072] Bluetooth: hci0: BCM: firmware Patch file not > > > found, > > > tried: > > > [ 0.935704] Bluetooth: hci0: BCM: > > > 'brcm/BCM4330B1.img,ci20.hcd' > > > [ 0.941683] Bluetooth: hci0: BCM: 'brcm/BCM4330B1.hcd' > > > [ 0.946827] Bluetooth: hci0: BCM: 'brcm/BCM.img,ci20.hcd' > > > [ 0.952278] Bluetooth: hci0: BCM: 'brcm/BCM.hcd' > > > > > > and then the kernel is stuck. > > > > > > So what is your defconfig that I can test your build? > > > > I test with the OpenDingux userspace so my defconfig is probably > > very > > different from yours. What are you using? > > upstream ci20_defconfig + my patch 3/3. > Otherwise I test with Debian user-space. > > Can you share your defconfig just for testing purposes? There are my changes to ci20_defconfig: https://github.com/OpenDingux/linux/commit/52278b1871e6eb7fbdba7a4bda608b37b6cbc1c7 Some of these changes are irrelevant for you and are only for booting the OpenDingux userspace. Note that all the WEXT stuff in your config can go away if you use a more recent userspace (and use e.g. ip/iw instead of ifconfig/iwconfig). Cheers, -Paul > > > > > About the crash: make sure you have the *very* latest WiFi firmware > > from > > https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/ > > The BCM4330B1.hcd firmware is missing there. I get mine from > > https://github.com/armbian/firmware/raw/master/brcm > > And it works with my setup but not yours. So I think something > else is missing or wrong. Note that it is loaded from the SD card > but the kernel is stuck earlier. > > > I do remember that one particular version of the firmware will > > crash > > the kernel. You also don't need the .hcd firmware for Bluetooth to > > (somewhat) work. > > Yes, I know. There may also be some race if the drivers are compiled > into the kernel that the bluetooth subsystem searches for the .hcd > files before the mmc subsystem has found and SD card. Then we have no > firmware even if it is stored. > > BR, > Nikolaus > > > > > > > > > > > > > > > Tested on CI20 with v6.2-rc6. > > > > > > > > > > H. Nikolaus Schaller (3): > > > > > MIPS: DTS: jz4780: add #clock-cells to rtc_dev > > > > > MIPS: DTS: CI20: fixes for WiFi/Bluetooth > > > > > MIPS: configs: ci20: enable drivers we need for > > > > > WiFi/Bluetooth > > > > > > > > > > arch/mips/boot/dts/ingenic/ci20.dts | 77 > > > > > ++++++++++++++++++++++-- > > > > > -- > > > > > arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 + > > > > > arch/mips/configs/ci20_defconfig | 18 +++++- > > > > > 3 files changed, 84 insertions(+), 13 deletions(-) >