From patchwork Tue Oct 5 13:53:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 12536777 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B752EC433FE for ; Tue, 5 Oct 2021 13:55:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DADF61401 for ; Tue, 5 Oct 2021 13:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235579AbhJEN5S (ORCPT ); Tue, 5 Oct 2021 09:57:18 -0400 Received: from mail-dm3nam07on2073.outbound.protection.outlook.com ([40.107.95.73]:28128 "EHLO NAM02-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235630AbhJEN4b (ORCPT ); Tue, 5 Oct 2021 09:56:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NP7z0BE8xLgqwaJUV1ZrWWpCzMmX9mr7mlveHG1yHZj2K5AiaXIiNxGhtbw2AqeWj6aVo0EfjRXmdUaVmfLSM9MJ9yxf3XOLS0V0aF3FIVXWjtjHtkqwK//9ptdIe9cwvNiCN6C2Z4CGgcyWHRlUK2PurPi6FoB1wk+JkMXv2cSEVHOS5qBjWTvHanddMPKAEC5T+fnhUdSGLBeEb+5GPpH/+7Ho1Axrr1HiwKYd5Iy4t8LTvXWgko9Lph23QZMl1id4XrnSK0354GVOZ7d6oRLwIG+Yr1supZNcSe4Zn/v7grhI/pE+k8RXH3UfLVSFBdEBD4SQVn8oIeP3ZWhSnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/CHhItvbGeo+w1ZRY6GP4IAdEvdHNYPBx4tLT6XYmdA=; b=GEimqOtt2Zg5dI0V/1fkHPPch85qhA8wseu8koN/94RQ0Mdr9LUNvjNIagVzbCmVh8mTgzoNYOYgF2CyE/sxArJ9f1NI/C00gqVfQSIdCPPIGs33dBvqfbPCqoWz1ptImOrY0raW5TBOkY3SJieF357VUPDrq4nMVKon4spl6ofWNDyXBkwNTUPx4mFxyXT/cOBzpFAFWs0rqlxPGcdOQhXxUGfeJs3rwKuuZTtpbaHxf3b8bTLhi3nYas4sFTxrcar2huq/dUgEJkKC0mXOy8QcAmQNXJnBKBMVRrPKD2AftKEysJn9SmuaOhUhILPZH3ljed7b0GZ0lFL7CYt7fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/CHhItvbGeo+w1ZRY6GP4IAdEvdHNYPBx4tLT6XYmdA=; b=GbFdt/eaNzjaxTUscxUmbAsZwwTcnclxhsTaad9Ts0Kyo+DNTZHukhrCYeySLuaeK6Pg9bcKgLXzjsW7JrrbZDo+PgOYO6Y8TD5nJYHPYbdiqKmre587kefbramPZuZpwXduiR/GPq2vUYA7+Yikug6roWF2+Y7sM6SQRXYzeKc= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5643.namprd11.prod.outlook.com (2603:10b6:510:d5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Tue, 5 Oct 2021 13:54:25 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::31cb:3b13:b0e8:d8f4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::31cb:3b13:b0e8:d8f4%9]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 13:54:25 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?utf-8?q?Pali?= =?utf-8?q?_Roh=C3=A1r?= , Ulf Hansson , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v8 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Tue, 5 Oct 2021 15:53:38 +0200 Message-Id: <20211005135400.788058-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211005135400.788058-1-Jerome.Pouiller@silabs.com> References: <20211005135400.788058-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0084.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::29) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR3P189CA0084.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Tue, 5 Oct 2021 13:54:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c9953e13-3843-4b64-83ce-08d98807a44e X-MS-TrafficTypeDiagnostic: PH0PR11MB5643: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mpGuGNZ8jUGVpjxbZbcMgwFySn+rJ7byivFBesna5XuIYYqkpUa40z9yeXGktyqTZl9OJEkBIni2aTEBvWoupyw3EqjIB/zl4yEqvZl4kK/Yq1RydTvNqlOkmyCuj1LfyeOOTri3pwg2cklh1Wq8RBx+DgIvyMSROKnLfPt2x54VqqnHYIbgZhDhWw7BBg5t3KClwWbPycFpcZB7a/UQL5qbn5hNADcgvuYMcNeNew0ZwpmME6kZi/U3EcYujAbLgFYQR1Xs33Br/LLwedpzBG89DPtBqI1JM5DEuROQBCKsr1Nn+IN//V5OeOfizYZK6TvmAroebTbR2bcSTZHB/7NU8QsaXKwfe6Oj1mjcC/JkSwX2MSgsuvaWRKytQq7nQmDMzriIpJxt4Gc25fEanPuEnFUpMriLqXd0fMAwn+rGQkUd3fnDIl59qUGxdtEu/mEXM0mgERyxrUvBXTj/69yh6XUtEfJylbRQnGoGHmkyZEuoxdwwVgEVVaxTl1Z56kQkKOfOVOtGHk/szftE1g02ZnGhX7UfIaO+Yl12VUzdV8QpnywXaC3bRJ465jPxkDo1Ih3QqsDDz6Xs0+ZuCkY9LQjXbCFiwEjGgyDvopRc1Umhalo5DeQxojNKvBYUGNUZOFfTC1+2ZOlxi4ksFjpHs/X0o/C+mmm/Hk6PVIKRLPBakoDNb9yPGLe38fM2LrLEQxkmijCM9vMp9I/GzTcoLQDBvIxILU9Rm6gvE5Yl7jxznZh8YWF6Z/26yl2EBID67KDa2pwKdhXG7vbhyMuRaVcKEkrGvHSY6ticXfg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(7416002)(2616005)(956004)(54906003)(8936002)(36756003)(1076003)(186003)(38100700002)(86362001)(6486002)(6916009)(5660300002)(38350700002)(966005)(66946007)(66476007)(66556008)(52116002)(7696005)(508600001)(6666004)(2906002)(316002)(4326008)(26005)(107886003)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vyMbzDayp0D0QHNpCNjy3n7eZu+z?= =?utf-8?q?KhNOQ4YK9LasRrXd51SrZJoGAgm5o7d7DyNHhsjEpu2so6mefiDmKRpEIU6yoLARL?= =?utf-8?q?mPkoF5ZU6pSjA+KLsdyF325Y5Fa9anR8RlYh0s8iTeNvT7linvjp2OrM48UFunI63?= =?utf-8?q?ABch10hszOq5rF4ZHfCOKPMwOSHgtq8Ak9mMgk97cv/igm7b9sVyN8xNvhcaU/vXz?= =?utf-8?q?E/e91z08JJwYIqgrhE3eaetKnaiQn9fWmsTfW29RrRc1kJoE7gPMvZpJIB4ksPfIQ?= =?utf-8?q?QKwQxGUfAm4o6BL2jSA9ZtHzs5NQ2Yygdc9L05Ix9JT+cDOSz4+NawxbtBdUmmylB?= =?utf-8?q?+zXv5uODRnJsJ8kblNSWmMjUm9ZO2702Fw2k8X2RUBSI5EZLRvLDzbzrhoyc4/FAR?= =?utf-8?q?p0M6E+xx3yyDGB3VtSOwVB4dgZw/6fUtCS48pIfvp2/KGghJ1WZ2V98syQ2mz32pG?= =?utf-8?q?3qRQWOzVEeJ7aYT0INFUdPX8vmDLeugWfbwed1Jm/DbGllWTzKuBhIeDW9wI+kO3K?= =?utf-8?q?gS8oAFKnX0/xI7FPj4wDOWefNle+aacLTkNzyqkbP2YvR5cW5Bd2AmftPdza2Kzi0?= =?utf-8?q?MmipNBW3tQfqNSmzUIn/F9Sz7b0hSwT1GfZjkWNWVE6b7zib1HeM6mpLiQx134JIx?= =?utf-8?q?trKLYmICNkli7n7/EUWo8HgNeK69+h9ygxx9tca76JNGQgvUaZm/1o6nXlaAvV+r9?= =?utf-8?q?2vePFPewP05UlRyDs9DOG5ZWu7h97GwiRywwhao4/fgJn6jkgx5wCLuQ3NjQlRw8s?= =?utf-8?q?WG2ACShKZSvAVOj/yyOpT3mcIrONcvJIh0L4Nc5EBeZuNQAX0vyAlGnScPsM7d6H6?= =?utf-8?q?5PBKVjXOfXyw8dbP880UJ2XXIyWbrZL9iIAhzTgLqmO2fLag5Hfi+UBzcGQGDMsCp?= =?utf-8?q?ZZPz7q/wUJZq7buun07sqm40wglRKVE94OYwg9KMtaZO7Apk9bwDpur3KZMEa3/H2?= =?utf-8?q?s9BvouQVQ9yeb5gcEFg2HPYiBfsfRnwLnVLUOaRW0Jt3F1/HV8RL1ZKdRo3s2xe2P?= =?utf-8?q?eDFuzQTWdWp6lxppMU48jA9Fq1wbI6OpU5+a1NhVjv3nj9YdSksgDxK+4SlQqho1v?= =?utf-8?q?c+BHc9hKHmPm9P2myIV638lDcARBHlMXhr/ukpqRdPnCAxMIp6D4wUdOxTSAi+7Nv?= =?utf-8?q?mHSyo+JEJMaoVJoPBDuGtPIlzrhrPjo37m/G+4kJXD1+C1gQXQNoGRsOdyY9zzAr3?= =?utf-8?q?RMtkTcY9SAv07b4hJtHGNMbjY24PaYWhKrrMc4WOgBfjRJ9yIP49IKs3HspIHO1YM?= =?utf-8?q?CRlyyBlBiRpO4TEk?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c9953e13-3843-4b64-83ce-08d98807a44e X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 13:54:25.3956 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QEU0jF/V7fTa3hfarRknzMAgOErjMbnG4mF0l9Bcqs3UrSQeRqL+s/U588Dg4qMdyXaetnylC7It7Gy12JxCOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5643 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Prepare the inclusion of the wfx driver in the kernel. Signed-off-by: Jérôme Pouiller --- .../bindings/net/wireless/silabs,wfx.yaml | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml diff --git a/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml new file mode 100644 index 000000000000..6dc30eb5661b --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml @@ -0,0 +1,137 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (c) 2020, Silicon Laboratories, Inc. +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/net/wireless/silabs,wfx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Silicon Labs WFxxx devicetree bindings + +maintainers: + - Jérôme Pouiller + +description: > + Support for the Wifi chip WFxxx from Silicon Labs. Currently, the only device + from the WFxxx series is the WF200 described here: + https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf + + The WF200 can be connected via SPI or via SDIO. + + For SDIO: + + Declaring the WFxxx chip in device tree is mandatory (usually, the VID/PID is + sufficient for the SDIO devices). + + It is recommended to declare a mmc-pwrseq on SDIO host above WFx. Without + it, you may encounter issues during reboot. The mmc-pwrseq should be + compatible with mmc-pwrseq-simple. Please consult + Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml for more + information. + + For SPI: + + In add of the properties below, please consult + Documentation/devicetree/bindings/spi/spi-controller.yaml for optional SPI + related properties. + +properties: + compatible: Should be one of: + - "silabs,wf200": Chip alone without antenna + - "silabs,brd4001a": Development board with a WF200 and an antenna + - "silabs,brd8022a": Development board with a WF200 and an antenna + - "silabs,brd8023a": Development board with a WF200 and an antenna + + reg: + description: + When used on SDIO bus, must be set to 1. When used on SPI bus, it is + the chip select address of the device as defined in the SPI devices + bindings. + maxItems: 1 + + spi-max-frequency: true + + interrupts: + description: The interrupt line. Triggers IRQ_TYPE_LEVEL_HIGH and + IRQ_TYPE_EDGE_RISING are both supported by the chip and the driver. When + SPI is used, this property is required. When SDIO is used, the "in-band" + interrupt provided by the SDIO bus is used unless an interrupt is defined + in the Device Tree. + maxItems: 1 + + reset-gpios: + description: (SPI only) Phandle of gpio that will be used to reset chip + during probe. Without this property, you may encounter issues with warm + boot. (For legacy purpose, the gpio in inverted when compatible == + "silabs,wfx-spi") + + For SDIO, the reset gpio should declared using a mmc-pwrseq. + maxItems: 1 + + wakeup-gpios: + description: Phandle of gpio that will be used to wake-up chip. Without this + property, driver will disable most of power saving features. + maxItems: 1 + + silabs,antenna-config-file: + $ref: /schemas/types.yaml#/definitions/string + description: Use an alternative file for antenna configuration (aka + "Platform Data Set" in Silabs jargon). Default depends of "compatible" + string. For "silabs,wf200", the default is 'wf200.pds'. + + local-mac-address: true + + mac-address: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + #include + + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + wifi@0 { + compatible = "silabs,wf200"; + pinctrl-names = "default"; + pinctrl-0 = <&wfx_irq &wfx_gpios>; + reg = <0>; + interrupts-extended = <&gpio 16 IRQ_TYPE_EDGE_RISING>; + wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + spi-max-frequency = <42000000>; + }; + }; + + - | + #include + #include + + wfx_pwrseq: wfx_pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wfx_reset>; + reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + mmc0 { + mmc-pwrseq = <&wfx_pwrseq>; + #address-cells = <1>; + #size-cells = <0>; + + wifi@1 { + compatible = "silabs,wf200"; + pinctrl-names = "default"; + pinctrl-0 = <&wfx_wakeup>; + reg = <1>; + wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + }; +...