From patchwork Fri Sep 17 15:13: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: 12502531 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12DFCC4332F for ; Fri, 17 Sep 2021 15:14:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA49061244 for ; Fri, 17 Sep 2021 15:14:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244378AbhIQPP4 (ORCPT ); Fri, 17 Sep 2021 11:15:56 -0400 Received: from mail-bn7nam10on2088.outbound.protection.outlook.com ([40.107.92.88]:46465 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240788AbhIQPPr (ORCPT ); Fri, 17 Sep 2021 11:15:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XEOuBvudRRRZC3c+jZE/QS2N7SkYM57oUowU/j+VBZBjLxpW9WGt168Et7v6og4HcsqXNU0pg3aNFY3FC35hbkL+sEKOozU/Qm5n4Lt4qkmIMHXnBKAamEUJ+bC3Q/fX3mR3myHUI5PwgKa6sFUAZkSoTrtHLpzbEzvA2X3oUJlx94++eb8BCazSe0671Yc3hDutQ9Zdg9fb6Aos3iRG3piY+twZnQN1lpcDdPPhTt7oCSwlVTMMdm+9juBv9STG7hWrevYBW1NWLFGM3hRFERuviFsEoSmvJ+ckYHIazPZf1BDdROOEwpzH/yaBTDv81P1J9Xbpt7MJwLsEWCLXDQ== 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; bh=nzBb8Fn9gKf6LChvA6DMNY6Tcck/ECvvmg288A3o0zs=; b=fIFNcKELD4LYE/aTJfAlwkEK+SiPfw0KX+Gkv16dZfDrlm0Vcg5jRsOxiLugLmRBF/aouWCdlgIMju0qKJmTIT7G2HBynvj5R/KlbdwKgYIg5BAB61qGBZZL1a9sXcuMExSWzKwGtSrMLIWSR643xe2zugkM5Z/JX4nqIy+ev7hVNa9YsuKbQD6k90tCfoE+A1ge74OIMmZCNruUJT/AZALcUtuKeOhHUpcKlv1RmWtJGIGeNu+m5GaH2mrJgoBrwqWLoHNGE7lHuBGYnh2uDGzhFKw/keqe4x8SQ/W9c6j74olyWXsYgfk/uXQxzyBluXNeCWrw1KbD4NPawOU8Ug== 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=nzBb8Fn9gKf6LChvA6DMNY6Tcck/ECvvmg288A3o0zs=; b=Y0LJUIU73uOJTKbPvTzA3Q2I2oKP4o2TFuSNkfszNe4USOUJ9e0G+Ce1zXtDMV2uEx0ExHnf2EhifgrXdar2sLRr4Ida+rvm7Xa13MF3y7LpNelV37aQuQmlGJfeVWmkCepSl7x+O7HieYZa7w5BiN7bW/CZfWs7VMJgjSj6pMo= 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 SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA0PR11MB4574.namprd11.prod.outlook.com (2603:10b6:806:71::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Fri, 17 Sep 2021 15:14:23 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Fri, 17 Sep 2021 15:14:23 +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 v6 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Fri, 17 Sep 2021 17:13:38 +0200 Message-Id: <20210917151401.2274772-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917151401.2274772-1-Jerome.Pouiller@silabs.com> References: <20210917151401.2274772-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA9PR03CA0029.namprd03.prod.outlook.com (2603:10b6:806:20::34) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (2a01:e34:ecb5:66a0:9876:e1d7:65be:d294) by SA9PR03CA0029.namprd03.prod.outlook.com (2603:10b6:806:20::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Fri, 17 Sep 2021 15:14:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 644dcacd-a966-4e96-9e8a-08d979edd48c X-MS-TrafficTypeDiagnostic: SA0PR11MB4574: 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: hIPNzE7TBwr+oY/U3e23XZpnbUhHvTM22f9bZ7i4ILjAZevs3wWES0A0ZqhAnVBPoTJYe1oEoc983dxJEvkQDimu2+nELovuq6z9GmW0+04A7guIG3J2JCgVDRUbzVhRQGrlO/BGFYJ/3e3vl1bsGdpdVsR1aP2ZQnAYuzvn1dqeQhkOqDCg/7oVqTchW7VPDWtOLnrYGZB/71g1EpwlqmGOOrpkMutRztwM0FGrK2S2uTqaq4B8Ky+9xMcwynqBjXYOl3saCnXJ4WSC6scAKz71LxhhqEmjNQQbuVxGKqxs7QIzbvu/BwQ7s+n1V/bILkrRtpeXOkFJY10EhVoJ+YaaO5S4A2GPfyifm2/IRssLeU1bgLTCK+1nwvDqUkZEHM6v2tX7IT6O6NX7HZV2sSmVxDzGuFuXtJ9rBU4awAy/6CiKzZFpCNHvrTc9xNVmEz5dBZxbXo4wFHfLY58W2bDYMywjj/wmU5yDImFk6agm0wtnC4WtNxeENswKQacljW5frLoZFDLCF8DgAXIc1hCyMWNtKo0c6gwsVQ9AcEnD/5L690NbUMbOq8iyqVlCcEsYm0AbBBfdfFmiHxIml4vLorHmP6idvgQ7Ec5UvGTnoFb6Dy8Nv2ezNLJjWdRt0zQUl5opRhqdmI72cVWPk/y/0Iw9I/6NvxAnrBmis8cP/sdCfKQ/MFKtxUIvPcj+Nl6glu0xdiY19VM5WO5S2yLAn/xkbyRF0KTuOLo4go0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(346002)(376002)(39850400004)(396003)(366004)(52116002)(6666004)(38100700002)(8936002)(7696005)(966005)(478600001)(6486002)(186003)(7416002)(86362001)(5660300002)(54906003)(66556008)(66476007)(4326008)(1076003)(66946007)(2616005)(107886003)(6916009)(316002)(36756003)(8676002)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2BKW0WbMSkO5Z0mMOXj1b5fT9Rui?= =?utf-8?q?BUw3XpJutYI0jCcXTTo9FvRh1gXLae4UqtoZgRc3UGy4MqJbdrNWBZ9iBMBDCJUiB?= =?utf-8?q?9H/hmxtV1XH4aMT+7Yc5I3u+Wg2x4s0ScX7G/KGxJSsKa0RWEzjFyCwQeGEEA95ez?= =?utf-8?q?8JViCnLy8/fclEsfVaTyHt5v84xUF4v2+8z73wDkB/tZAeseeRfSDYtnGYcQJaDuh?= =?utf-8?q?+ro83AcY8KsOxhqT9l6F26X3x5bXwIxsusM61UQAF98milrGohbj8CahGHZ2eeYRl?= =?utf-8?q?Pqxdj0Fjrd5UlHZVGMAI59gDFoqid10sg0woBUvpKLZJa8FZIaXVfreQPBBvpx65u?= =?utf-8?q?ZFEOw20KuGw25ba5mkDkjgxOBSnhBsCrelgQUai7yfTcutgR9ze78lMsLUUxoOCFm?= =?utf-8?q?tHjWkAw06jNR6zW3w032SmkU8bbRfXFbAw6NekUXOCWuLeKYIZbATjhUGrMuy8bqo?= =?utf-8?q?Gca6qXja98GaYdWpcLFFBCCP+FzLOWUR4AajL4rxYrhAHix3OkTNm9swrWTjSXoir?= =?utf-8?q?nZfOSoDNndC8e3f/O6UkUrPc0NmrBhj2TeLvcXC4UfzPFQ+jUCyzz3l/QwyDVx99l?= =?utf-8?q?OdZdNt5VzyZrK4NGQiZZuOQyPdiMr3XPe8rbw0BLH5hh4utRyJmcz78R9Zh6RRKk+?= =?utf-8?q?BLiYWwC7Bq+wQuT0A1KdXwlXAs62pKfMyDrD5MvfSFBqBVQvNjqMqc3nFcioDGvYP?= =?utf-8?q?BgGZhYLH+n9/CDur+H5eUa5MYaE417WFzYBi05lQ/zFUSfMvDkw0bcs79aLs9DKIJ?= =?utf-8?q?60XmxNxsCi6b2zensyn+C648RxN5WlhuKSZWh62sQfr+fHjvWym8oSIRLOgaSTivI?= =?utf-8?q?/2klYjMdVJ8lkgG9jMaN4LeBHkc0gXj+/v0TITssuDLAo32i7CZvxPb3e3JAW0rVa?= =?utf-8?q?GHkOyOorFQ+gEDaCSgeXDErRG1+7Ym7jUIX3TueJSPCZvec5/ATL286jjzQl1AaZi?= =?utf-8?q?qF64Cn+tsB2QSVFtmP+ik9zuT8K8CjuFvwkIp7CVlpBhQW4ZIRqyIcyZZGtS/WRt4?= =?utf-8?q?s/ATxKSv2Ah+YmPcGjUGOeL7uPmKPoUs8ULRg1PwnOzyrMBAHBjJl/IpuBJMi894q?= =?utf-8?q?x5xLtXHjCgApBIfNIakHLF330APBZdy72PhYakClTQp1FQg5mc1LkGs99g5g2WA57?= =?utf-8?q?IBiBE88sXeoFXm64Z0BUwPRl9pCH6XyRbMUNrr1UECARaOpE+t7gKx7ZM+3hDYWKL?= =?utf-8?q?2p1P7MG16u2g2eMZECgOpABULB0uAcj8GkG7X2BOC5U1cGllOGIKLVGfW7FnFfs1f?= =?utf-8?q?TU52uPvmvwPuM2YFdOx3/NExF++oCQPOmxZw563MG+gK0E5wPC2RgKlZ42E9T4y6D?= =?utf-8?q?cI80r30Pf86Q4x1?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 644dcacd-a966-4e96-9e8a-08d979edd48c X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2021 15:14:23.6427 (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: EFdq1+c237S91UYO7Db6NCJz89UxG4sZi7sBD9Vkcz8qRNOIikI0xvKzyryPrTUGEPqrYYUNnAvXBj6lwXU8Sg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4574 Precedence: bulk List-ID: X-Mailing-List: netdev@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 | 133 ++++++++++++++++++ 1 file changed, 133 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..9e71240ea026 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml @@ -0,0 +1,133 @@ +# 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.txt 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: + const: silabs,wf200 + + 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 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>; + }; + }; +...