From patchwork Wed Feb 15 17:31:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 57646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp322626wrn; Wed, 15 Feb 2023 09:34:39 -0800 (PST) X-Google-Smtp-Source: AK7set8zUxQNikLmvZWXADMswbZjrqP1poozYZXC+d3m5Zf2EVnsYeQFsjOS3xWXCyg/WWz08VZo X-Received: by 2002:a05:6a20:a3a1:b0:b9:5fda:cd71 with SMTP id w33-20020a056a20a3a100b000b95fdacd71mr2088094pzk.6.1676482479153; Wed, 15 Feb 2023 09:34:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676482479; cv=pass; d=google.com; s=arc-20160816; b=rQ6rNq+kNsc3gj1PNO2y+06Pvpv7zbBcIGGnZEff8No0PNXU+aTsBC48GbMmBXRv5C hlK79QXMp/ERzvJlJk5FuEiXxlf/LiLeyfYwiBs1bCYDjAWRuEcUb+BM2Z0kR1yowQ3u oEt7HmFlxLpBwOU36jPWO0f7B86/18YQV25SHPZROWs+xksu18jXxCSoqEdW1M7lPbR0 0w8ftHdSak4uzbsF50TNk5z53ruw0mAlxxj4gRN0Of65T97Gr2pcAHJJJrODfVTjqA28 H8M+4zvmQE/Z2qM1ehUuLraPUZLOEi8vJN5qcMo/ICVyOwOKsjJt9lBYi3f032rt7v3g Y7uw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=POPnc3DgxELJpdHFCNQYcK/7farU8e90UR7vp24J0Pg=; b=OQ3VYlYWhgpE+WBT7g0mpdrrvAw2XpzMRvtTF+xQEVP9nnScNBqG5xRbe0T66WvSuU H9+owvzLXexc3QLmzu/VHwF50zjEQilTRZhE2J5vDshx3UOX396taMNfXtAzb1ZlyykU w/dt8HOQL0cC1BCO+jbLPZO1GayJolRtZ3GagoyVRDjsdCxbta5ynVpf1GU3dVDceKHl YfV9vLA6TPjukHGBZG+Gmyqnndnn1rIAfzSYRxQxKtUhT40uyEqrU1/7PusoRK9O8pas RLZDbKx36K1ISxzSshjqAgu21oUdSgLHE3tKKZVaCI+mnkGFAmZRM90YCG4/qRpyNrL7 VY1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=tFwpzl5l; 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 f2-20020a637542000000b004fb6f10cd3asi14375123pgn.871.2023.02.15.09.34.11; Wed, 15 Feb 2023 09:34:39 -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=tFwpzl5l; 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 S229986AbjBORcW (ORCPT + 99 others); Wed, 15 Feb 2023 12:32:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbjBORcV (ORCPT ); Wed, 15 Feb 2023 12:32:21 -0500 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93F9B2A6C5; Wed, 15 Feb 2023 09:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676482320; cv=none; d=strato.com; s=strato-dkim-0002; b=HQvqT92bUalYDEXcdWaXhiyY/rvg7K6sYAq3GVh1o6qml7ccm1TDu4Fkgts0OKwncU iNcLQpB83UwJj7eMv4smMaZPsipNrCyaQVxvPKAr4l3JtpbcnrELKVIegvvGpXf36+yz 2DWVq0EblirVEPw5LNMm/2O8ts7IfttqQBUKtY2dsZqIxBAhJOoe5SyeD3Iy8vtMN4ji 4nwDBCDgBBezsvOiRXrlDiN5unaVC4bNvZJvU2I3HTwa4itX2CAiVJqIB01Jh6t6+pHu Vun2RCCOwEtRp2AdJ7xtlfAiZKEPVfbI9u0ZA0VLIWqAU5TKisiZQ8tn0unMY6ZIz0xj D4WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482320; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=POPnc3DgxELJpdHFCNQYcK/7farU8e90UR7vp24J0Pg=; b=TAmr9DJ/o8yHciZS3o5KhVX84JFKJaPtcukPskoj7HXZdZETNrZeDBtNzTQGmtQtOb KH84QspR2JVoQkgdd9w3FL4pSQHrKmDjU9rWKAs5gALevIo7Ze7giJYrlHaWU3hzVMnR Z7mkmuAL5mRvjRhG3vWC0uf7MTH/SwjT4fiujRhTY0AB0oL21uPiB/XclnRYw+Zz+w/4 yDIxiNQ9c0NuFZbbPZBLt6GHI2vDvRL+GGgMbClB4SDeJywIE2oyeYzg0MjpTw8C2+UJ cZJ5t9B06+AkUjSDQ46VkXuSFjiKrGnFNKpGUNoqH6HS5p5wHdzOp5pTqZUZz5DL+O8h hJIA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482320; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=POPnc3DgxELJpdHFCNQYcK/7farU8e90UR7vp24J0Pg=; b=tFwpzl5lxKyU4IxiJvVMotxkgk3/0CIATG7/ooLO/fwa0cAleNrsK6cS8xrNIehBa7 egEYhBlVTMdy7u8twWdXBwvtnSSSZoTCFSSF4K0+bGIiib6FUykjs0ElCe32aM9c7Ugm rKptTEv6qpb0byvfBTADkx4qOfma2p70+vI9nWLoVEI1Xx9UGo81KdVx6H2yu9YqbNqv 9E2TINqxDnZmyYk7TVFz5OODD1qg+UhI2f8SZPJqGEbuw7eirrY4WGeDFElzXj4LN1C+ W80+0M7vf90rlD45xFD32BZ3AwpjjQofr30xMlzccCAz2DH+Twoe5V2ZMRlcTdJwlL3u pv8A== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1iTDUhfN4hi3qVZrWLJ" Received: from iMac.fritz.box by smtp.strato.de (RZmta 49.3.0 DYNA|AUTH) with ESMTPSA id 326d57z1FHW0ZCP (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 15 Feb 2023 18:32:00 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Krzysztof Kozlowski , Thomas Bogendoerfer , Arnd Bergmann , Srinivas Kandagatla , =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= , Andrew Morton , Kees Cook , Matthias Brugger Cc: riccardo Mottola , 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" Subject: [RFC 1/3] MIPS: DTS: jz4780: add #clock-cells to rtc_dev Date: Wed, 15 Feb 2023 18:31:56 +0100 Message-Id: <77bcc96a2b81e42b32d48a041d7fac31e7240e56.1676482318.git.hns@goldelico.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757919292384838196?= X-GMAIL-MSGID: =?utf-8?q?1757919292384838196?= This makes the driver present the clk32k signal if requested. It is needed to clock the PMU of the BCM4330 WiFi and Bluetooth module of the CI20 board. Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil --- arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/boot/dts/ingenic/jz4780.dtsi b/arch/mips/boot/dts/ingenic/jz4780.dtsi index c182a656d63bc..18affff85ce38 100644 --- a/arch/mips/boot/dts/ingenic/jz4780.dtsi +++ b/arch/mips/boot/dts/ingenic/jz4780.dtsi @@ -155,6 +155,8 @@ rtc_dev: rtc@10003000 { clocks = <&cgu JZ4780_CLK_RTCLK>; clock-names = "rtc"; + + #clock-cells = <0>; }; pinctrl: pin-controller@10010000 { From patchwork Wed Feb 15 17:31:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 57647 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp322627wrn; Wed, 15 Feb 2023 09:34:39 -0800 (PST) X-Google-Smtp-Source: AK7set9oPgeAY5XeHkQBbZmaBAeQ/XF6P0en90mDtuscYPUkHjXk1+vstlM+DaKwriLdm2dHMRWP X-Received: by 2002:a17:902:c404:b0:19a:880b:bfd1 with SMTP id k4-20020a170902c40400b0019a880bbfd1mr3839875plk.40.1676482479105; Wed, 15 Feb 2023 09:34:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676482479; cv=pass; d=google.com; s=arc-20160816; b=H4xMRrAzZq1S+pWihDgOIImBFvr+tdfOvnC79Y11DrswonClgFPbAbaeET2dF5Gguz fJ1oMrPNmYlZzPFfCiFeettWezVGWG0D8qkbPWmBvmGrk8xr/pG9WgCFNkMhkPvVONs5 gKy7UuXnBwS0iut2gsQ3ND8icVoIOBW3F1JT3YQEVaoajVsOP35CH8cOgGQeFPgfTnnD +E+a6hujyEmuqRD+2a3iheXQ7YeNPQPoMwI0H95AOmjN6S/+95KIZjr3BT27QouQgBUK SBOjx4BCrz/lP3jr/0ynkpviTZv71hrjosB1rosLMc3tlrdbxRxriDQ6T3D8YWgGiHfi vO+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XW0+Qgb0myceiEMjaao1wM/4c+vauOGDaJPcYXWeNpY=; b=NVsp8XEkmdnl76bw/Ij3QSsf178uqethN6yHIyHaf/yS0L/QPSYpX637jJOFWvBB9G XObH/4F9jNL4y2+IaSuFyj1nbnuBMTdIjL+5dDeFt+X2e084dUt9sKsbaKtGTmG+CVGe fohr5ASGG4qomzkbVJRjg5XzgNUjHQx8xco7+hgXGNoubZ5RQZdXFbJlW8JsZpZgnVTh vo4X3uGCZoToCkTIg5t2pN4/ZC0nk2fV3lTdbDplk/GXIQsWDAq/fqYkVQbmmvyBuxKw WuLwpDb0nI7pmJ/vz74zadTF0BVgDNN6vKQxo0RAebUZ9kTNlM64M+BjNRg55RxRenra Wm6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=EjjNBSCL; 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 m18-20020a170902db1200b0019aa9c82c71si8543195plx.263.2023.02.15.09.34.05; Wed, 15 Feb 2023 09:34:39 -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=EjjNBSCL; 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 S229593AbjBORcZ (ORCPT + 99 others); Wed, 15 Feb 2023 12:32:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbjBORcV (ORCPT ); Wed, 15 Feb 2023 12:32:21 -0500 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86C5244A3; Wed, 15 Feb 2023 09:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676482321; cv=none; d=strato.com; s=strato-dkim-0002; b=eoe67TwneMl/5/Tr/xoBlxst7yXuwE1u+Ibt8IaToVhkSnpCfVYUVDzgEy0WdBO1ls Q1rmxrK9PbbIJN5IPyQ9JvokvVTelcDeMvch0NljASk7jINp7mCH7NZjAVIliZChl+dv jyqpcVe0qAQcwIdG9csoIbj1S34efdiB48odYfGwbi2SgVQjpsV9+dS8pwhHI4XlurCi wKUUUESrrZqJRffTDg1d1XdRkEVA77/RyyrD6fL0/nbkJ9fdFUnhV1HTgQKo/u5RsMb4 9bUUFIx6zolQUQnw8q7QmCiGYTQKWZ607AbDc35HrnT9CUJer6bv+/TYIwgHf5mhBiM1 Sszw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482321; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=XW0+Qgb0myceiEMjaao1wM/4c+vauOGDaJPcYXWeNpY=; b=to/2qoEPvVNMKm4lNj1Y0CHDXtYUr8VjJgHJlDP8maxS2DCIEezZNM0O+BPx10Wg5W 7cQTyymIN6wTCWa/ri5Ww+mL8Z/zJ9BSkwq1OV708Kb9DoMGmjIVQn4+JH1pcTwRt/NW Se5fKO34E7WAoWEQV7qKjaYfFh4DlzBYqSLf9NH1kvUq6PEbMkYz49h3mqeCP3gJ8J3P r+rPAqIZjdW0GJzTButZE6PSXjy+HKzDLNebfIYo/MIwdxjz3T9xz9l3xT+FFSHswii6 qB8M3/UwmUlzM5QQ+d/evsYtMFP3q3RaWy5AJfdEw+TsCjaN3Vjq9Uqm++Y4xhgcMs0P XSgA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482321; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=XW0+Qgb0myceiEMjaao1wM/4c+vauOGDaJPcYXWeNpY=; b=EjjNBSCLDRCmFyY86H/68RbYMcYvBVCt+di/I/VNDo+ZdiU620ACs2N4rEDsifyHDb kN25Zj9L9v5EL6mQnb5QDgrW0m7F/O3GTogiUKOijZHOePqUuNK+2fEOjy3SvA/kA471 7qE9m7jNKA4z+F3wW0tiQFB8whNpMRxEe22LNBt6rcDq4JXVLRJC7HAwPXN8EpYDPGyW 7Bj++hieGlPS6zXRgG8SR5G2fnKE7U69szhN2GaNFsjuIbHikA00SnJ2H4ADXvUlTr+Z Q0yFjYotT/YlJXDfO2lkavL2j9mzvQw6CbxW3ilZIfTta+XKwA3kCulLV1RAtYdLz1QO s48Q== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1iTDUhfN4hi3qVZrWLJ" Received: from iMac.fritz.box by smtp.strato.de (RZmta 49.3.0 DYNA|AUTH) with ESMTPSA id 326d57z1FHW0ZCQ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 15 Feb 2023 18:32:00 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Krzysztof Kozlowski , Thomas Bogendoerfer , Arnd Bergmann , Srinivas Kandagatla , =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= , Andrew Morton , Kees Cook , Matthias Brugger Cc: riccardo Mottola , 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" Subject: [RFC 2/3] MIPS: DTS: CI20: fixes for WiFi/Bluetooth Date: Wed, 15 Feb 2023 18:31:57 +0100 Message-Id: <142872751b252b6028ea574593d53110d6e0c4a5.1676482318.git.hns@goldelico.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H2,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757919291745762646?= X-GMAIL-MSGID: =?utf-8?q?1757919291745762646?= CI20 has a BCM4330 based WiFi and Bluetooth module. - add proper power supply regulators - fix polarity of some GPIOs - add a simple pwrseq node for WiFi - reduce max-frequency for WiFi since 50 MHz seems not to work - add fixed regulators to activate the BT_WAKE and WL_WAKE gpios before the chip is powered up. This can not be done by the driver since it is not loaded if compiled as kernel module before the WiFi/BT module responds. - add clock chain from the external i2c rtc through the clk32k to the WiFi and Bluetooth module. Signed-off-by: H. Nikolaus Schaller --- arch/mips/boot/dts/ingenic/ci20.dts | 77 ++++++++++++++++++++++++----- 1 file changed, 65 insertions(+), 12 deletions(-) diff --git a/arch/mips/boot/dts/ingenic/ci20.dts b/arch/mips/boot/dts/ingenic/ci20.dts index 8f21d2304737c..139507d8c26e3 100644 --- a/arch/mips/boot/dts/ingenic/ci20.dts +++ b/arch/mips/boot/dts/ingenic/ci20.dts @@ -97,13 +97,45 @@ ir: ir { gpios = <&gpe 3 GPIO_ACTIVE_LOW>; }; + /* WORKAROUND: Keeping WLAN wake high before power on. No simple driver fix */ + wlan0_wake: fixedregulator@4 { + compatible = "regulator-fixed"; + regulator-name = "wlan0_wake"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpd 9 GPIO_ACTIVE_HIGH>;/* WL_WAKE */ + enable-active-high; + regulator-always-on; + }; + + /* WORKAROUND: Keeping BT wake high before power on. No simple driver fix */ + bt_wake: fixedregulator@7 { + compatible = "regulator-fixed"; + regulator-name = "bt_wake"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpf 5 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + wlan0_pwrseq: wlan0_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpf 7 GPIO_ACTIVE_LOW>; + clocks = <&rtc_dev>; + clock-names = "clk32k"; + post-power-on-delay-ms = <150>; + }; + wlan0_power: fixedregulator@1 { compatible = "regulator-fixed"; regulator-name = "wlan0_power"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; - gpio = <&gpb 19 GPIO_ACTIVE_LOW>; + gpio = <&gpb 19 GPIO_ACTIVE_HIGH>; enable-active-high; + regulator-always-on; }; otg_power: fixedregulator@2 { @@ -159,6 +191,9 @@ &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&pins_mmc0>; + vmmc-supply = <&vcc_33>; + vqmmc-supply = <&vcc_33>; /* VDDIOMSC */ + cd-gpios = <&gpf 20 GPIO_ACTIVE_LOW>; }; @@ -166,21 +201,34 @@ &mmc1 { status = "okay"; bus-width = <4>; - max-frequency = <50000000>; + max-frequency = <25000000>; non-removable; pinctrl-names = "default"; pinctrl-0 = <&pins_mmc1>; + vmmc-supply = <&wlan0_power>; + vqmmc-supply = <&wlan0_io>; + + mmc-pwrseq = <&wlan0_pwrseq>; + + #address-cells = <1>; + #size-cells = <0>; + brcmf: wifi@1 { -/* reg = <4>;*/ + reg = <1>; compatible = "brcm,bcm4330-fmac"; vcc-supply = <&wlan0_power>; - device-wakeup-gpios = <&gpd 9 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&gpf 7 GPIO_ACTIVE_LOW>; }; }; +&rtc_dev { + clocks = <&ext_rtc 0>, <&ext_rtc 0>; + clock-names = "rtc", "clk32k"; + + system-power-controller; +}; + &uart0 { status = "okay"; @@ -204,11 +252,16 @@ &uart2 { bluetooth { compatible = "brcm,bcm4330-bt"; - reset-gpios = <&gpf 8 GPIO_ACTIVE_HIGH>; - vcc-supply = <&wlan0_power>; - device-wakeup-gpios = <&gpf 5 GPIO_ACTIVE_HIGH>; - host-wakeup-gpios = <&gpf 6 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&gpf 4 GPIO_ACTIVE_LOW>; + vbat-supply = <&wlan0_power &bt_wake>; + vddio-supply = <&wlan0_power>; + max-speed = <115200>; /* stay with default data rate */ + brcm,bt-pcm-int-params = [01 02 00 01 01]; + shutdown-gpios = <&gpf 4 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpf 8 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpf>; + interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + clocks = <&rtc_dev>; + clock-names = "clk32k"; }; }; @@ -270,7 +323,7 @@ vcc_25: LDO_REG5 { regulator-max-microvolt = <2500000>; regulator-always-on; }; - wifi_io: LDO_REG6 { + wlan0_io: LDO_REG6 { regulator-name = "LDO_REG6"; regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; @@ -344,7 +397,7 @@ &i2c4 { clock-frequency = <400000>; - rtc@51 { + ext_rtc: rtc@51 { compatible = "nxp,pcf8563"; reg = <0x51>; From patchwork Wed Feb 15 17:31:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H. Nikolaus Schaller" X-Patchwork-Id: 57648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp322860wrn; Wed, 15 Feb 2023 09:35:06 -0800 (PST) X-Google-Smtp-Source: AK7set+QlWbAv1MLPAqnDuCHia0T+gdC2vx9jbyF5gKud3ZRfmaJX7FLvyLguVa/DDcMZJiHSehN X-Received: by 2002:a17:903:110f:b0:19a:67c0:53ee with SMTP id n15-20020a170903110f00b0019a67c053eemr3657107plh.54.1676482506184; Wed, 15 Feb 2023 09:35:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676482506; cv=pass; d=google.com; s=arc-20160816; b=w0t1bth11oq0KjbhlAyRamFbx8za0lP+3IbAn6npl9i3ph0Xq+WIJ8tPDfAleiz511 s3tIz7PA+0JJ/Mu8HnvR07ItcHQQCTf8DvjdKWTDfwLBI1wCzG1UQcQW6QTPbtxqM7ef kDUk3oXmcaq6QQ10FJhc/sR1qN5C0GAdHE26U0nd8AqNpaz7aIaGk5ROEduLTI0r32Ef /OsBh6I2xjsIEr9M5KaQo4Y+dDJH8wSx4vpCftZYpWe5pxYk4WbAfOwt4Tz5tWVOOo+O gXBryYQkIBi7EEe/JL4reXLCtnAH+/dF+lBNxJUPv5da7JvGrX4LEC67FzXZEafs46lZ P31Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8fAdvo57eZc8KJao/TwLnUz6LYRm479MPxgqta+3GVI=; b=dyqiuzRecNQsX5V6y8m0spqhFoZxXpHLkoj3BTN1Q0MCV1F7F5y0z7Xa2bK/BtLaJP kfxdrwpLPJbKRYwugJYfeSu7fF52eSNwjscAiXlqWjcRsFUrLNLzajSj1RORC7xaEwlq Yzvrx5wztYgN6fe70o733SBcb46HIUGvu3L9g2zrxhS609UYWOqkE71iRVygXyR0cOEi 8ksjiCyZ3+iIlyOFVXbAQkPrZMlZw8yQZkD014iZZrzUEI+tDTqOuG4q6PI73GsvFI9Q HsOTiI9Ett9/gioSeks0wrY9VotIcXVh0ud4YQLmcefy9b/1m1dxFS82Hw1NVuYmV90Q MqbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=HbLT82Tz; 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 u9-20020a17090341c900b0019a836c07d9si13772174ple.54.2023.02.15.09.34.22; Wed, 15 Feb 2023 09:35:06 -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=HbLT82Tz; 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 S230102AbjBORc1 (ORCPT + 99 others); Wed, 15 Feb 2023 12:32:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjBORcV (ORCPT ); Wed, 15 Feb 2023 12:32:21 -0500 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93F532A154; Wed, 15 Feb 2023 09:32:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676482321; cv=none; d=strato.com; s=strato-dkim-0002; b=rPLM5Xcac2m513xoxbe7CbXNY+eksezz2EH8vfK0XSh1jKjbkbhWHD0XQDpuFx5Arq uXc5cHP2f7cG3QE+4ZMEQq+EUHABEX1VBiuLlxt2sN50TguobVJi+nIg7n3ft+KrvhTs 1QPKzMRvE1z9y1C2WzA7HpCZdQSa+jDy7GODpazcWWav2KZu8gas0vvFCUTCLwt/uRVJ 0VRnQ6ojvpLB40j2ZRvt7tBaq1qFuPP2zEQmu4cU+/9YFR9/D/rd9xburoZW2BSBasB7 HaT0Ssyw9ofmctB03QSWfqoWj5wEsYoUVb0JEU2/jk1NJIGZSOUbZkjUMc6gz4l5q6S1 PoPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482321; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=8fAdvo57eZc8KJao/TwLnUz6LYRm479MPxgqta+3GVI=; b=fC3mjvh7LdQQJla+UJ+rwikleHYx2UVuLvMldagLkveZ0300oFFgFecNAWkSmLdwEH a3znXc60QtG1wdq2QxuFKHnUQxTaeBDnVbLaVWrbSZdQghtad+JIIpcXvoyOMIduW5rT gKQn9vpbitTSF/TWov6Dsd5DZJmhfohvw4NSek9ZGiNp2/mOgcn+fKyjwRfeIUw2VAaZ VCfm/YyvR6U24XbJM+xRiBXY7tMt1Z/QkfgZDO7kJZ4kdmDrvb5rTR/fqeHLMQAQuHQA yp3O8LqNqTaCUMduZY0i/WrZqw9p8nBPMjhKulb0IapSzVSeW9mi8HcbsyvIS9SMxuh9 MX/Q== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1676482321; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=8fAdvo57eZc8KJao/TwLnUz6LYRm479MPxgqta+3GVI=; b=HbLT82TzhXD9Ki5sbLMBLUsn9tMbinjMLuSXfBWCGe9rmCIZYMCLcBTaBcRD1s96Q7 DXtel95SmJLEUypDQax8O7nOErJ6B02wI9o+LsaqoOFWEkm73MKMNfVeQfZYwkPp57kv Rrg/VDK1ji4t/9NNjxPpyq3IRyjBxHINGqQG7RAaldGUrHNOarS4hM7B3SBQyhNzFPkV LKrjOXIGIcy53merFOlc/qhOC1cjharVkOI2MC67RIn1eQoCP2QbWqgmtCqE42DHZdVJ g/8hx4rdVjOmTqOqXqWYN3xWfdC68c0E3ZT+lHAyDu/nDIAwVHvKKo4RxF106POwm5p2 hkYw== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1iTDUhfN4hi3qVZrWLJ" Received: from iMac.fritz.box by smtp.strato.de (RZmta 49.3.0 DYNA|AUTH) with ESMTPSA id 326d57z1FHW1ZCR (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 15 Feb 2023 18:32:01 +0100 (CET) From: "H. Nikolaus Schaller" To: Paul Cercueil , Rob Herring , Krzysztof Kozlowski , Thomas Bogendoerfer , Arnd Bergmann , Srinivas Kandagatla , =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= , Andrew Morton , Kees Cook , Matthias Brugger Cc: riccardo Mottola , 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" Subject: [RFC 3/3] MIPS: configs: ci20: enable drivers we need for WiFi/Bluetooth Date: Wed, 15 Feb 2023 18:31:58 +0100 Message-Id: <5cc861c6df2fdc5c762408cbae118b90b9d579e9.1676482318.git.hns@goldelico.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757919320370469007?= X-GMAIL-MSGID: =?utf-8?q?1757919320370469007?= We need to add CONFIG to load the serdev Bluetooth driver from the DTS hints. Bluetooth must be configured as built into the kernel, otherwise some components will be loaded in the wrong order. WLAN must be configured as a kernel module, otherwise the driver will not be loaded properly by the SDIO subsystem. If it is started too early, there is no root file system (if initrd is not present) with the required brcm/BCM4330B1.hcd firmware. The pcf8563 driver should not be enabled because it can interrupt the 32 kHz clock after the modules are already powered on, depending on the random driver probe sequence. Signed-off-by: H. Nikolaus Schaller --- arch/mips/configs/ci20_defconfig | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig index 11f08b6a3013f..2f58d4da30ffb 100644 --- a/arch/mips/configs/ci20_defconfig +++ b/arch/mips/configs/ci20_defconfig @@ -68,7 +68,17 @@ CONFIG_DM9000_FORCE_SIMPLE_PHY_POLL=y # CONFIG_NET_VENDOR_STMICRO is not set # CONFIG_NET_VENDOR_VIA is not set # CONFIG_NET_VENDOR_WIZNET is not set -# CONFIG_WLAN is not set +CONFIG_WLAN=y +CONFIG_WLAN_VENDOR_BROADCOM=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_SDIO=y CONFIG_KEYBOARD_GPIO=m # CONFIG_INPUT_MOUSE is not set CONFIG_VT_HW_CONSOLE_BINDING=y @@ -211,3 +221,9 @@ CONFIG_STACKTRACE=y # CONFIG_FTRACE is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="earlycon console=ttyS4,115200 clk_ignore_unused" +# CONFIG_RTC_DRV_PCF8563 is not set +CONFIG_BT=y +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_CTRL_TTYPORT=y