From patchwork Tue Jan 11 17:14:02 2022 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: 531344 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA39C433F5 for ; Tue, 11 Jan 2022 17:15:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343953AbiAKRPA (ORCPT ); Tue, 11 Jan 2022 12:15:00 -0500 Received: from mail-mw2nam12on2049.outbound.protection.outlook.com ([40.107.244.49]:36192 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1343859AbiAKROx (ORCPT ); Tue, 11 Jan 2022 12:14:53 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k8dJ/7vjtTMpHHpeF98x1tiBfqIZvODArdPJBlejZRlV2zUmSmBmxzRsUSQT4VDEAkExHy1cZuyN+TcpjwpOdVzW4KAcZXowTO7i/MsMjshlWviC8R7t28aboWG/KATydR6UKEhn/lxqHf4GUd5mwf1sRFywKsFKmzpeDTXzSRRSQkebmXc2qylw9AaeY7zgGHB4hWdqwUsOztJPXH+rePB9E0JCihqgnKl5V62yOsnGvfvEsrTVQ4BRRBMO/PiFJWZvpp3xC5JRoaKU7aEqKUkdiCHFulJPjBatRY1HC7sf6vqfWigRkplCH4t0AViygIlDuYMAFkoQ3twNYSXcRA== 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=J2H/jcPaC9cTFyGGtm0LDIXJQEuv9bvw+S8ayYT2YZI=; b=FHgCiSiLGl+5OneNGthZKJcRLzktN6XR42O0FGg0tkkcFR/T5QOz6PNerM9PXh86SMIMOscYyYg2B77B3exBqO9JpVxNZg+4up3aUn78G1pp6+o4oogIfsOgK/Rpn49epCSghu/KXDwVsr8N6N80KIxRpqjvh4BfzvX5Tm5Tz+Xj7efTzXJNHBCdAWleYOV8Ea9o6+Z/FuZs/EDGDUOSa3mwSuKnsbuT+HUOEbU4DpdNDP3wEDPUQToh7ivVqWjWKINPKm7MdryomigV9YAVI/AZq2Ob7iTx8wBbf7va65yvFmZ+rDh0yMvWiOR917C9AlEedfsHgqPfBBj9Jaos0A== 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=J2H/jcPaC9cTFyGGtm0LDIXJQEuv9bvw+S8ayYT2YZI=; b=IoWa6zH3/JWiP5n+4SuBi4anesOy9IK2UKyOFpuQDwrIqEUYdFrg9yuZ+gCc8G/rySrSuAjB/aLrooOoEmtl5HVpzVIzjFnaF30iNSVCpWAb1YAIwDx9lNA3CAlypBwni9gzYWUp/HR+qvz0Ix+5oHqsf43b9mEiH7dqeq4ZuPg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5595.namprd11.prod.outlook.com (2603:10b6:510:e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.7; Tue, 11 Jan 2022 17:14:51 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%6]) with mapi id 15.20.4867.012; Tue, 11 Jan 2022 17:14:51 +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 v9 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Tue, 11 Jan 2022 18:14:02 +0100 Message-Id: <20220111171424.862764-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> References: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN1PR12CA0099.namprd12.prod.outlook.com (2603:10b6:802:21::34) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19aeb6f2-d335-49fa-957d-08d9d525e0dd X-MS-TrafficTypeDiagnostic: PH0PR11MB5595:EE_ 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: UQ2Y1mV2kmrwjRp4AzOnAtBS2vibKBAWtQWaZyYx09PTCofhJIF+DiTG72unknBPBgJIVXLl6gHQs0e5cGbkR69KduqE+yamNr/tuQP6poNI8NvNCOm9W7q26BaWc7HTuBVNVK+dOCn4NxGXa/LHe+Ud2SjLhf9kb0SgnaoE3Eh+AeAp9ISTn33SYxXNjeHqnlQ6vgwMiG4YMYrIVUN3+RXVgphwL/wJ6oEyLjXtA4uFDmymVl9q//vdJllFux4FX48sGVoe0U4HmWfpai0nQ4wtTEAnGGijTuqw4gdbK6xahhwkr5mwUxnyn9P8RRdZH86L01h7kBH6fiLPSiLVnC5cCIw11ca5oDEnDFa05yf2J+YjYdS6jlvXg9e1WoZlJtGtZ2D9srsABLX7hfHSuv1l3qQLWOrCj0UDLlLInye9yfE0xcZbaOEJbFQUFDToMfRjX87xNfbkydb48/T9nejwPQq/6JIDGDgFqd7I6aU/Nd/G/fLAbyEkKsv0si80JigjN4HIapVdYRSg5JxnIIQ7e9+hwZrSVIoGG1s7iLV5pEssk4i8eba07Epr8ZEZNKflCJRTbjT8X4IO6ajDU5jWRe6Q7/tEcA2kwMwFswgD7BidtNQli6n0aEBLgtdMRfFY5nfhym4UYAmjyrUpgzpkxWvGw6LuoILafZh16yxxmaONbPX7jJi/QFZt1ArrQWRRFOz1lJM0sI47Mpci8kdqMFmr1hrVUgc9qqAePmA= 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)(36756003)(66946007)(6512007)(2906002)(107886003)(8936002)(2616005)(7416002)(6666004)(38100700002)(6506007)(4326008)(66476007)(8676002)(54906003)(6916009)(316002)(66556008)(52116002)(86362001)(186003)(5660300002)(6486002)(966005)(508600001)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hJxJcYgMNqGFrbqt4KtSQAhGdSDA?= =?utf-8?q?cYyf0ZdTEaQ0ZPKfiJUr6fl/ylJGZQfmwjMQuMKvh5mMFsmOhcoOhRda+wqGqe/W8?= =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f-8?q?tRE5YYvsfM5oEAyLqE2SzMTUkvq7h8xcDU73glm6thPUDMEb11iXGyawAFaZZpPi2?= =?utf-8?q?aO2IVsyPR6NjOlK2f9lorhdX+fhbHwxb3FctaTV1iY7WrAAxaFcgdG23/SkGRMgby?= =?utf-8?q?wCaYjVDlK9V2DWVKyALOOQQLuzn/plNAtcAJaTvXTUnWR/MlBxk7IY0ZUcztRq+FS?= =?utf-8?q?bLVzA8hqpXIADlcPRSWPG1dYRu7i92Q5/SapLuNFYHZg1MwyQfnlUCzuh5p3FORrb?= =?utf-8?q?FyWZ7R6rYltqVUS8dykABu3VgT1fjksfgMMFNM6ClcDw9JaykpP6PosKmlhToANtB?= =?utf-8?q?HwQV+MEptE7HzhcHD0yh2xHIngJODbsx8UFDKR3gpEaXRGLNLzeYzb1XSHoyDkCfM?= =?utf-8?q?+yKmKd+q99714csKIwKbw5dPbzTlKThyyYGJptUGdfJzYTCOcOavugi+pBsXqfA2G?= =?utf-8?q?5Rhi7sFleORlyR6y+CqNw00OrnlGWFfUpNBP0V/CAs8CCX3p9QwKdutbUQNcMxh5/?= =?utf-8?q?8YNn4EiWAU+JbtsIjgbuOAUo4vJVbOO7f3w6IhgG8S9p6qatanWmpl8Kcf2D9lc8A?= =?utf-8?q?qdBMkESgvZI01y7ckrlslSTfykCRKfgZcK0SQd/cam2JXbhaKRHwJfdcVOdObCYgA?= =?utf-8?q?/F2WG8joQ8ScMh0wbYMyeBr/q1UN4D/bYRCRp+CH51Gzk3bitvZKgg=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19aeb6f2-d335-49fa-957d-08d9d525e0dd X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2022 17:14:51.4478 (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: DOx+wyAryQ5O9Gp4I7oCHmnP+c9f/yMktnM0jOyILvfScNyDF8CTsNABuwUpHfj2Fd2pfkoO1EpMxutnRkUR/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5595 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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 | 138 ++++++++++++++++++ 1 file changed, 138 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..d12f262868cf --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml @@ -0,0 +1,138 @@ +# 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: + anyOf: + - const: silabs,wf200 # Chip alone without antenna + - const: silabs,brd4001a # WGM160P Evaluation Board + - const: silabs,brd8022a # WF200 Evaluation Board + - const: silabs,brd8023a # WFM200 Evaluation Board + + 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,brd4001a", "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,brd8022a", "silabs,wf200"; + pinctrl-names = "default"; + pinctrl-0 = <&wfx_wakeup>; + reg = <1>; + wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + }; +...