From patchwork Wed Dec 23 15:39:03 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: 11988561 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 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 2C2D7C4361A for ; Wed, 23 Dec 2020 15:44:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EAD0B20639 for ; Wed, 23 Dec 2020 15:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbgLWPlK (ORCPT ); Wed, 23 Dec 2020 10:41:10 -0500 Received: from mail-mw2nam12on2078.outbound.protection.outlook.com ([40.107.244.78]:27104 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728107AbgLWPlJ (ORCPT ); Wed, 23 Dec 2020 10:41:09 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kuVvtTxv3LBSqha7Johdoqx2Hc9ITWSkfXx9aZ9Tuh6waG/e5KstUz1hBUwSrH+BLuRC/ssNqrT8p1lfoKtPo3QyJJGZHbkGUP4mRYZLKj8WQQ8iOnupJz6zrq9Boa9QINIhPPnUNgh1hCfeb59RLKTKbKYiUFV91tffR2YO78r9ED/RW0Jj7IvIwoTBbXpLFiAg4kz9yENp53jYrTp+HdfZINpFyUMXsrUMWhxNYzfoIkJmXAUSImuELiMMjMJlK82epce4/iNXrhjsGsJ3LdvNyqfTj/nNnR6VjCQgfoBgO8j6qVv4/nXH+uXoJQgZKjBut4xCG3jvjTArrvZQ8w== 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=QlzCuP+IndPbDwgzU+AEHLhgwFkWwgELq3L3PEPpkKw=; b=aGISTRa7DRv6Q+NEjsu6m7ulEK58+lfTgAbY8ZaaJVcPAHgafgnCur4uW6zInRFu98XkqKj278TWMY6R4e+jikeok5lTL86sQS3cSIgmJrg+7JjqUgb4zsWy9gwd0hchgdA4+P43PvUsph5BuTaA8FLVcmtQCLXNYRRQ7QvGs2+li9ZxKLMABZN4bNl2DfvIt34qJs2081GRwHXilOXEQ1kryQx8I1gHp3F6C2thEZY+Qe/vACbwX4iu8yD+cwR7UgbBkfwfi+d2H6n/eZq989Bv/PQhHBbDfHhIojZW/FslEP3DjT4/T5xATTT7h30QP0y1JhRD28CESzRL1uFWyg== 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=QlzCuP+IndPbDwgzU+AEHLhgwFkWwgELq3L3PEPpkKw=; b=MnIvGsY6/9LJt621TVJR19B7eNTeirkEutIWlIPNsM6QJxtWDnhzmO99XuTHPRp2jmqAKKdrMS7MQH9o2MIaYFh1uuC3I2KO+goCrjxWXLRqBXQoeWAlMLzUS5DtFpm+kjA+G/WRtkUCgZU8mzUw/KbHGWvWU+xl/Jq9X/wPpxU= 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 SN6PR11MB2815.namprd11.prod.outlook.com (2603:10b6:805:62::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.25; Wed, 23 Dec 2020 15:39:47 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::a989:f850:6736:97ca]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::a989:f850:6736:97ca%5]) with mapi id 15.20.3700.026; Wed, 23 Dec 2020 15:39:47 +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?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v4 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Wed, 23 Dec 2020 16:39:03 +0100 Message-Id: <20201223153925.73742-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201223153925.73742-1-Jerome.Pouiller@silabs.com> References: <20201223153925.73742-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [82.67.86.106] X-ClientProxiedBy: SA0PR12CA0024.namprd12.prod.outlook.com (2603:10b6:806:6f::29) 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 (82.67.86.106) by SA0PR12CA0024.namprd12.prod.outlook.com (2603:10b6:806:6f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Wed, 23 Dec 2020 15:39:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2301d090-828a-40d1-17d4-08d8a758faac X-MS-TrafficTypeDiagnostic: SN6PR11MB2815: 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: 5h/aKDfvgAnRLdv6vYh5IoDxc3IYv3bhhvUx7cLFOfsuLF/s2Ehjsh5f9Dxtw4tGpwWKLung8UTTdtyo8UGCvPwyMYBhZh5y2kwYzP6FfRxxlza7mu46gteeXlHonyk1AuHJ1dGdQj4ldxtomfbxLJVuyGY9fod9Cj4sirO2ycRy6CUKEV/JITGGYESCSxYxtKk2bM1ZQnMKV6kJXwindpWQn2eO6FxjpB/u5tio7CsPVEKqIXM2wtQK2op2HkIBXq15dHo+jLPB6fr6ILgAfKG39kjZnk+Q5kn6168soDP/3k2S7miZx9TSWaxtF4rLVe7sbdo9PQHMR2WGyvd+4kbsPqtEMW1DPMGqlWg1gfsjXPCmofkDoe1NPrSVTec3XtA/XCwVg8WBNsW9IJwYBf/P0Op/lX5lBwmUVQh25EdbANERt6S66izn900aYXDKWF/OZC9j/l7QQxBFIRJrZA== 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)(136003)(366004)(376002)(39850400004)(346002)(478600001)(966005)(8676002)(186003)(2906002)(8936002)(26005)(52116002)(107886003)(16526019)(7696005)(66946007)(7416002)(6486002)(956004)(2616005)(54906003)(66476007)(316002)(4326008)(6666004)(36756003)(5660300002)(1076003)(86362001)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?jp5w1NzD8J/fXLvMuky+DZEgjeMpiK?= =?utf-8?q?/81hgO96+G5J68U1kyTDYew3YAbpOk+FTXZen4H81ZlHMDLhPBMC54GhyXoPRteaU?= =?utf-8?q?RZb6YvItevzzI5SA7EMJQT9xf1rVdC/6YXC+5VfXd4Hxf1NdpeAN8oOc/Dc04+xwX?= =?utf-8?q?g7GEIS4D372GlxzksX0MYGiJS3W0cjTvITRLV7sq3ubkW8f+EPK4O7tIKAuzx0Gxe?= =?utf-8?q?u+Jo1AzrNtQfQzw4XpB2kheICCn0Gazs6hyug32y7yG2hhRvm2n9vwmG7KQUpyh1z?= =?utf-8?q?+6FYLTgXBVsacWzqeQV0+jm4Nah1J0+0XwZUxRnTlcmJcUa4y8PJsNS1uKJKKAx6+?= =?utf-8?q?yJU7VdT9+wwoTyxlc93vyyM0wlVNe+XRgogR3YxvPdXWbJLcU63TxnwpeVu8ZHnSE?= =?utf-8?q?SyhAoViooghmSZR/AG+0D0gEmDjBmqozpciWbzKO0azM7IYvI6pAAwVAkRHLFy4pz?= =?utf-8?q?f5aYMsLdXT54jJEgR0nPf5Nu/aAHaXXQTzE0j/4HSexRfOhFLjEBalDyMqa3p9q73?= =?utf-8?q?ts78etSaOpAAPwIO9RhT0a0b5R3BePZySDME8lFEqAXmuJtnfRRWEN9yruU9LMlsD?= =?utf-8?q?aMtHJEW0V9avtrD1x8SumiPbY5TfUdrT1/Dso9Y1kx9qQTLXoNN9XNWvewxvb6Ewb?= =?utf-8?q?FOKw3lzd2fIVUpZ/YkN1GY4HIK/NO/Edx5ptyY9AVDbVl9UaeB4XKvjCMFDjBxjsq?= =?utf-8?q?g4R6XLfdiPuTy+y66SpYqXv86v+hlz1tjedtohIrTSIkvg5Q7Zl7e2YtL5VpbfcwP?= =?utf-8?q?x+I3NXqms4cSkd3pOysYSnC45E9OrjKmHfEYkWOpafeZDC7bkN1o388hy/GC0ge74?= =?utf-8?q?j4VM7FAJrB6XCDNiRuDv2gxnK+GzrPHYusAosZCV+btDuS0RqhfBQyRpZWLehBqS8?= =?utf-8?q?clfSW7oSac4+N6y4rX6Elz7+YyC6PM/Ir42bdLPcG30SSUQ2P6BV7V5ksmIW6jY?= =?utf-8?q?=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2020 15:39:47.6808 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-Network-Message-Id: 2301d090-828a-40d1-17d4-08d8a758faac X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cJe4rTls5ADaJu0S/svRBQcfyn2bUMjrG3Fk+3+uv9oDvUZaWQpAS/quK5STcGIULSVSP4aFDVwDuUQFSgKWGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2815 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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..487d46c5fdc0 --- /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>; + }; + }; +...