From patchwork Tue Oct 20 12:57:55 2020 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: 288276 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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, 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 AA3DFC433DF for ; Tue, 20 Oct 2020 12:58:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FDAB22282 for ; Tue, 20 Oct 2020 12:58:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="RxqI3DPM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406819AbgJTM64 (ORCPT ); Tue, 20 Oct 2020 08:58:56 -0400 Received: from mail-dm6nam12on2042.outbound.protection.outlook.com ([40.107.243.42]:21473 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2406718AbgJTM6v (ORCPT ); Tue, 20 Oct 2020 08:58:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AFTt8D+7tkrDX/pPPsDh22AIEwZaqNkXAM+NVxHyzhC2dgDSewtOabP3+Jg6OeHPSH32obvW6TrnEcGNnmSefnlpBDGOepSANHNxb8zK4kvclYJRZ5/7rqzxV/9tPK9BSEFA8LE/3nopV/4rTSGLHimsRBDtEl+E3R7dMpyox8T6xBkoALbsz0BIkTqDhWbRpbbDfvzItUl3GQ6aJc/DoOWg6Dpx2NpJrYlTsdMYcXk9xlZZccmgfs94kUVvKOIi/FkYLpf2zrBvbtpFNj54EvuiF8E69j0lEwJkj5bW1eYzASvGH5HZRtbB6n7crYaUVk1/SK/bIEatsdQ5VvtkYA== 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-SenderADCheck; bh=cgq74Svg2j+DyJGRMumSG/SA0djbHNEWUreSI8ZV05o=; b=MU2dU0UFlh0FMqrQ1FVzoOn+ctp+Pnds6bDX+PAnqhPuZ93ORs4aNdDAFOxWK07vzl7oZ1a6SmlloAUPZoCyKWsz0OKDZUnaqTRxL9J3UMonCFV5sPdbG61mFnmTNmMWxQnWfcNewBGV0qVcS+KYJnSOPNwWrXHTznv/OYq5O8arYIPb/4UB2v8hSassgqwPmrVQMqDdh+3M6/+aIL9J7Zv77vQ6/hgCfkFkVhQ1lKQ33DLXgOFPQ7MeMd1BXkouuj1M54bfMNH2EzBd9qoqRW54FFUxXT+F5FabcZ0+Fi+XPYLybZaVs0HVt5iRl3VfeB3IaF7CxYmnkIxuQ8n3QQ== 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=cgq74Svg2j+DyJGRMumSG/SA0djbHNEWUreSI8ZV05o=; b=RxqI3DPM9dPliTlYHMq4mNSw4dHxR3JlikhbZd+4qNLTMMmrLoUQH4Xt+ETTHckjU2Vw9r1cy2koQgof3O1x08NoNvb844iLNv7VPb3D4ERGzZ1JCRyjatXTNS7BvVDw0M+3O2EX7WCYtFn73sqlt0/n5BHGyjzYda7rdeWmPrI= 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 SN6PR11MB2656.namprd11.prod.outlook.com (2603:10b6:805:58::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.28; Tue, 20 Oct 2020 12:58:46 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a%5]) with mapi id 15.20.3477.028; Tue, 20 Oct 2020 12:58:46 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?utf-8?q?Pali_Roh=C3=A1r?= , Ulf Hansson , =?utf-8?b?SsOpcsO0bWUg?= =?utf-8?q?Pouiller?= Subject: [PATCH v2 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Tue, 20 Oct 2020 14:57:55 +0200 Message-Id: <20201020125817.1632995-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020125817.1632995-1-Jerome.Pouiller@silabs.com> References: <20201020125817.1632995-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [37.71.187.125] X-ClientProxiedBy: PR3P192CA0026.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::31) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR3P192CA0026.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Tue, 20 Oct 2020 12:58:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9647eadb-61ce-41c7-6a9e-08d874f7e130 X-MS-TrafficTypeDiagnostic: SN6PR11MB2656: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WWEpzeZ72c1Ehk4dv8YflRJORWI/RuoPOcE5ilMbnX5sF00+0L6UaoPF1ywPd0HcrpkOcrZ6hyy24fB7pnOQ0XU2RSg4PyxZc5CKikIkGYD/DTjsJVF3eyMUuMbH2kRk65lFBrInNW7+jItqlCIlOtqTCT2UXU4vF38la0Uo9l/6g+kaPJhMkZgoJShOvECYhuqKnYwjLVNDq6lzMZyKh3xUNpUqHlnNK9B5nUD2K7lUWSDBZZt+tEfHZ54uUf85skQ/rqKiWVDLCV5f7Yq8lMENDocMtSlz6WXUIhutrFhqOGm2RK4KaNUPZBmWGehpiXRI0mKcuAwoF2HfnICODNkNrDCfiq3ovN1M4UB4fg3QNzshnvw7eCoLDa/xOrpX4VqTmh+Ty1hGIS52U7FrHw== 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:(396003)(366004)(136003)(39830400003)(346002)(376002)(186003)(316002)(4326008)(107886003)(8676002)(86362001)(26005)(2906002)(7696005)(478600001)(16526019)(956004)(6486002)(966005)(52116002)(36756003)(8936002)(2616005)(54906003)(5660300002)(1076003)(7416002)(6666004)(66556008)(66476007)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: SCiGMU9Wlv7lXSaOy6T0mtAqVV/MBf2H7ybDfpH7jMAz0b0axlN4QCPyisIJZVO3d6PiCk3GXHmwIBg77IPC4/kl1vMjdywRIUPETROJBX0GIMdIFTLK/QLPpkaGymzdeHnqTwvAaW6WJttqWFqz6RnFe6MjA6WTWhGD/GDOm1D11WezHk7Rgi829q6qxZvgQLszCVPJeXjCbabSfpXaaMAc2uQlHozGh0F2X0gH224HVNoHUbZHaVBVIUopQ2XyGr9j+t5n9pvwRuFOgOCrr84RpYzwfaAO236kgIDswKtz2OL0kWzHiZMgGeOOn/7EPrW18OdaTFPyYDYs6nr507p04RlJ8PMcqx/UV7Gpz9jBhvDpqptEv4f/7kE23gLPBuU4yyc/8GghINrH0I0gr0P9pcf7GILrIEh3zSAcTbaAd5Ypv+y8z5sit+cGbWcpBO0npacCJ3+w6GIqgYrIEzBs+8KhNVadP7nWL7hFjDoRwq5zlWjAPjt75XvEo5ZsxAa4UuYWIrfhO/l6GFWC7k4zGXXnMbSTr1lMusUk0gorET33Sjgmau9ic6fBfiGh4P9+qZkpq3+YUTc9g+Y5/RfcyYYoh8f/D2QIx5hwYPzEmrj0XVQtRR2h3gG9Viry8oP5Avd2JOURIVgaX5jl5g== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9647eadb-61ce-41c7-6a9e-08d874f7e130 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2020 12:58:45.8564 (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: SZgNidQUAmjyqRRTXlNcqWF9Yrk8bVVj19UtEdN2G7jGKkf0Z8HRm2gzO1uNED8I0ZEvCqgkHAkh12F0D+jQdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2656 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller 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..2605e9fed185 --- /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 + + config-file: + description: Use an alternative file as PDS. Default is `wf200.pds`. + + local-mac-address: + $ref: /net/ethernet-controller.yaml#/properties/local-mac-address + + mac-address: + $ref: /net/ethernet-controller.yaml#/properties/mac-address + +additionalProperties: true + +required: + - compatible + - reg + +examples: + - | + #include + #include + + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + wfx@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>; + + mmc@1 { + compatible = "silabs,wf200"; + pinctrl-names = "default"; + pinctrl-0 = <&wfx_wakeup>; + reg = <1>; + wakeup-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + }; +...