From patchwork Mon Sep 20 16:11:14 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: 12505827 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, 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 86C55C4332F for ; Mon, 20 Sep 2021 16:12:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7291061166 for ; Mon, 20 Sep 2021 16:12:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242417AbhITQN3 (ORCPT ); Mon, 20 Sep 2021 12:13:29 -0400 Received: from mail-bn8nam12on2087.outbound.protection.outlook.com ([40.107.237.87]:42848 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242363AbhITQN0 (ORCPT ); Mon, 20 Sep 2021 12:13:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bb6Z6KAkAFmf3NV5PZIfeD6/1gNTsmTM40Rr//vB3AJeosl6+G2mIRAPPkiMuo8l5ibV4RCHZ1VVo4wTZHXxQkxKS4qLdmLf1KBb9HjPa+hKrgFJY2Itn3P3IyjgK5j0RQkQXIM4v58K+h4Oa0uLvsJqp5L5Ha2Gzimft4/tup0FobKY5DrSUAY9S6fmDnTqPjdHcdKvfqozrqKkAuGR6Vn6y0FETzl8FyLgcue+r/Ahi+WrFYzVWfhRaFibR8tfRlfUc36NL4LPIdZ9z1J+hO/n05Vwfwni0eaR+Oyx4d5eaobp44cR53H0U2D0OoTMJZ2DsiBvZhUhg/F5sTsJ2g== 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=dRv4I+hELjkukyufIfYHuzZysN6ITNytJ3iPa3qM7eY=; b=JyIMEIbbqgwqCJcWT+vi42RAJHOeEkLA63MsIiHdzVpjL7tNbn8QMa98/rihJwV4SIuA6nycIMgxLU4CSsR2ogEnIR04VU6NjfWy5xcZJGE0d4Nvq+KElyZy5ejkPlPpcu3lALaOkOAZSY7TZkZ55QjxUCafTJ/0n0+0HD7Ijngh1Z8zarIjD2YHCDphx2cLp4LRmnGp9D59sqAHwndfb18EpVFWAK0NmBKlciyzGGqFit/YV0mlyn3ES7aXpVm+e3VnKFYZHGOAkeq+2jb8mg6DA4RMz9CRSdIylnLNVWCkuwx3uvyjHiSfIfRm0wd5L6WczLCAziY06+ca3wQJbQ== 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=dRv4I+hELjkukyufIfYHuzZysN6ITNytJ3iPa3qM7eY=; b=VQS+EKdhmK97wGMg2fJTY96f7jB+Qqi3YldvTA78nki+0VMTgVUwWHjdjbn9A6xf8JMbCtyt+zm6mtPXTHhJddSTeVOWkJUYGrhpqM4tSdhknVJoW8POqwl2Oy7PIrTHN/RNN123P+2drb5H/CXtfgFNk8753YafTYmHhFmBUVw= 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 SA2PR11MB5002.namprd11.prod.outlook.com (2603:10b6:806:fb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Mon, 20 Sep 2021 16:11:58 +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.4523.018; Mon, 20 Sep 2021 16:11:58 +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 v7 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Mon, 20 Sep 2021 18:11:14 +0200 Message-Id: <20210920161136.2398632-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920161136.2398632-1-Jerome.Pouiller@silabs.com> References: <20210920161136.2398632-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0064.namprd11.prod.outlook.com (2603:10b6:806:d2::9) 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 SA0PR11CA0064.namprd11.prod.outlook.com (2603:10b6:806:d2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Mon, 20 Sep 2021 16:11:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3be3e88b-bb58-42c0-3f31-08d97c515f18 X-MS-TrafficTypeDiagnostic: SA2PR11MB5002: 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: Py4qAE5CCuF/BAJS4xMn4upRZ7sQqbDat1PXUNt3g0RkPZHsX4JFq+PKC833wRse4o3W2bGWch+atmIJun5DvcHSHfjO3YWl+Y8IvHG+ibwz+3ZgELsFl/VT5GHYp28kmXJGSJRJRd1q2Z34nD/REgsjxxf/iKY2MTPjR51AyhGd5qtsUPgqOL16+TMSMiqCrFX8vY2uHfeYEqlDVolPApy0dB1665zatVi5Ga/4+NSWFVKcse/ygmBx32i5Mr1z+jxA9+nS+wUxt+z83h2L+QH3sunJTmvpG3pr9ymsNfFbyqKo37msc/dKp2bQxXFYdByEzJSdflzAr0NFvBeZuG4AownUff6xQwGpuToxFd8/UTeR7LL04vEaj/EAppeIZkB4ambWMYy41ILNpeDjPT7y/d4zx3cTInfSzP9/bCM1V6ChPqzI7oJ9Gj1uJmXH2sbI1p1n2Slsk5ItVUfnT8rM6L4fOkpn2Zhw5PZAxbLsFF1ye/ygxhDqFbJ+b+nsZ61jIn1q1qiwvmja69nso2RLd9W6yF/O1kEbO4QD8Ezdm+N5FMEnvUPdxprKLgv476RVhXuq/r9NItVHTyjwDlbZQWutxpSSg08EKt5L+pNDBpg2p5cM5YNgTrlfLjp+teqHCK/rYLsPvc623v1orcq6hvYgF5An4VLgyRBo+8qJSbFyJrcGLO9Nh6KDYd8c/ao5oXHedbD6PdOQFxw+o2yNtLo6c5ABM66sQoMjkPg= 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:(366004)(66476007)(36756003)(2616005)(66556008)(107886003)(186003)(54906003)(5660300002)(6486002)(66946007)(52116002)(38100700002)(7696005)(6916009)(2906002)(1076003)(4326008)(8936002)(316002)(8676002)(508600001)(86362001)(6666004)(7416002)(966005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: sc5TZxy/Cb4ejXycCR3phKPXWF8ePGjTNUdgbABHhITsGgmUhUyj1e/Ovod5zHRz4AjBhyckUl1K/GNYEoTOCnsg3sxo/ysmhYwaps/LA5f/j6jkgJOHRMXCcTB7SS+v3q2l7uRBqvLoGcnoFWG5qptSn12EmAKf2tSyXlWiqgTU58l0EhG9u7RidKeYE3FMMb6DjyzlOuYPmbvkjLk6675RKd8jCWogPmWUD+JxTZDMCdyobcCQIJuKPrv2XGeMh1STmYbPWpUnheGbDXbFOKJRHG3R3H3BUj+hy6OoZhv1HyT4mUruKPoHc5KplNQUhW1Uy6qprsJIOknFIR6uQBgQyrNjL7bhhlLoYZlT76pl68w2hMhzKh/CnklxnlhcHzODeHDLU5i76r5IfitqBFkAmc5iya3DrzXfmOvR9cUlc8dQ5uo1jxfJN84PJRWFoj20wro9J5pmo7KK8YNIeH7976MByf93lva2ONrioZQs9MqrLyAeP5k9ZSx0hI9zm2idG872hRPEFMk10dplnumlOyUzLx7P3x7cSvcJwUn/EqiKQTwLHjX2e0cSGp0mcbT/om/DqxgkAi2m+oqG89mkMlTt3MfAVXDlJK29DcxNdvMHPSOSCxDwZ/bf8FaymYitkDNu56aEbR1Ei4XwN0cyBsnYaWLYZgKYTKodudcuoqElYvoW7gbpARLJnanAurG4f1dsQ4nyQeBsichZJ+9+zc/r0K8IkGxCEozlG3xAL2nM/qesPNSBpmm8Zvp6nFxLnx8faNbOoI3224cQ4eYPkolpPahkYHWUmWiA49ZYvv9jYNAshStem6BdKs11 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3be3e88b-bb58-42c0-3f31-08d97c515f18 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2021 16:11:58.2333 (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: UqIps7Bx3GD8sHE06vxxbtNGib7SIECEteUeMs3+vM6g831QJ3QJo8UHoT/EfvucRwGUCayaIRop0QunGCsxww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5002 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 Reviewed-by: Rob Herring --- .../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..8a249ada45dd --- /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.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: + 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>; + }; + }; +...