From patchwork Mon Mar 15 13:24:39 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: 12139373 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.8 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 8D5BAC2BA19 for ; Mon, 15 Mar 2021 13:26:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69C1464EF9 for ; Mon, 15 Mar 2021 13:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229961AbhCONZk (ORCPT ); Mon, 15 Mar 2021 09:25:40 -0400 Received: from mail-mw2nam10on2084.outbound.protection.outlook.com ([40.107.94.84]:61153 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229731AbhCONZ3 (ORCPT ); Mon, 15 Mar 2021 09:25:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RbIMC2V0p9nQfRhy2patAyVKQhxc1gGEUIVzRLlJIeF4ETXWUTgEBGOUR3H2lzui1BfC8/0t+f/Hjw0B6icIkUDBKfIszb3arrM53qxLtqkCT6SjIOLvlWoFlqONxcLPr4Tc2du7+EJeNb2AUC1eC4LvDe4dAaZWTphHk/gg7aqFJ00H2aTxKahp1asa7dEtNJvz984rU+X7n063p6wPgS9eUTKFl+d6v9F8JFag+ZxirqxyVTtKmyUZHvGZiWXfc3CxzN4YRmG7zmks7LIEg0+zynjUX/5pEfeikH/4pODUTZTO+X+mkgeXamHP/PXl9MJXXBHBO8qzuCwo9NL0mw== 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=0D/2thDw/uCJVBZ6swCuZb4GsLE8cd5HHfCliFfZmJA=; b=EMEw2UK1qn/JLnZ9xvO7bCs3VcQG4/GFoZotmjDXZLMdH1prpN48wKu3HKBkXFPxFKickppY8zZ1pPSBlZiiLn1EouSTSgiTnQzsC8ZoyCvwm7V38vKcNhWnjqk7nvOFsucuX0+FmLjeVaqFM89RGwNKucj4VasC0eZhHf6x1L79/AroD9WTRRYtYglYrKSws3GETjDaNMiLGhDiO0QQZ7MdzpMVV/83IGvh+4Ex8ux/bPRfEESC0DBF+lDCoHD5qonssRpIObA0ckMkWMsuPDVIKaRQYg+Cui/VKtJS05jf9BYHojWw1bgjSPhYHuQO08dlHG7yua81PtX7y3rgUw== 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=0D/2thDw/uCJVBZ6swCuZb4GsLE8cd5HHfCliFfZmJA=; b=DbbsYINfqyu6AhqF4Ah0wSIpFg5uJyMJd32eFR4dtuRZREmb1mj/fqzcOTqpxszG8Z+iwPI74sRK2lbMhz0WPTc+WRvqEFldBcb4NhgMT6cisMAJwOy5arFgoR4u3ALAsx26cB1axah6z88T8RtuoyCsX09MKF4n7hSS9S7dRXM= 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 SA2PR11MB5099.namprd11.prod.outlook.com (2603:10b6:806:f9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Mon, 15 Mar 2021 13:25:27 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::41bc:5ce:dfa0:9701]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::41bc:5ce:dfa0:9701%7]) with mapi id 15.20.3933.032; Mon, 15 Mar 2021 13:25:27 +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 v5 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Mon, 15 Mar 2021 14:24:39 +0100 Message-Id: <20210315132501.441681-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315132501.441681-1-Jerome.Pouiller@silabs.com> References: <20210315132501.441681-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-ClientProxiedBy: SN4PR0801CA0014.namprd08.prod.outlook.com (2603:10b6:803:29::24) 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 (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by SN4PR0801CA0014.namprd08.prod.outlook.com (2603:10b6:803:29::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32 via Frontend Transport; Mon, 15 Mar 2021 13:25:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 085d7ee6-ba6d-42cb-f402-08d8e7b5cc3b X-MS-TrafficTypeDiagnostic: SA2PR11MB5099: 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: 0FlRJIyvIBEhpRMmaX5LLnHOM6T0Z16MnErF5eHYCLPZ0H16poKRcxCtfWG5nECZ5HAYa4EXlzBXaAEeL4V2n+Wwnic/HbRAMuXO2mGdqxBOJFINx45K7iJjbic8IzpisvtBOr+mt+bpRoU2+bNX2QBhh+ct2nERtfHg4XkLdCKQJCXfPqb23AywnnJTDy23OQt7SGZxOsi31iNF8BtlClPr4WsaC+f1Rf32UXDiy5fEU1jwjrxSW7xKnABXSy4q1SI/OU8Dp51ZIgH8vIMLU/ah9QapJtRlTE80wWHnWTYt/7j+wl4WJ4cAnIfU4z160wToP9GDFsqo/q14H6KCVZuiIWE4l/s1dytKfJAZc/Z16OPQOROigAX/C9U5SOED7GALhBzLg803q0uAwsymQ7WlQbxyrE7HBUIY0CWfGjPkeH5l3srEE5ogBbmad/0u8NC9tsh4N8u44Z1ZOgC/cA5qk4P3ciCNEz558x3h7uCcKdcz0qgof7AK6CaKOJlMIgWdBlug6aT4y1yApTSZ4G2JKcGneWYms3COxdVneZMxB5DZZpw1mG48MT0sQiys9+FD0IQg8ibJI4J+B5U+ZAFcrli+ZExfjZegGEqn4mQTq0daCagQBbXHKeQNHyCD 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:(346002)(136003)(396003)(39850400004)(376002)(366004)(186003)(7416002)(966005)(2616005)(107886003)(4326008)(478600001)(16526019)(66476007)(86362001)(66946007)(54906003)(66556008)(8936002)(316002)(5660300002)(8676002)(1076003)(52116002)(7696005)(6666004)(36756003)(2906002)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?LuJ+wD8KSQ838Jd45ESbj5NrS5M6Xp?= =?utf-8?q?Suto2bK9XKccYcdZiiJOQ3Gdm4t4HVfjrG178AA7yD5+r6ll1F6hr1qnWWDR5X6ha?= =?utf-8?q?JkZzpLVFmTfGItB+ZQDx8FDBnap2lKbb+Zro2rApYoYH/OtIeALOpNj1I0pGkVaMw?= =?utf-8?q?LhpD1RP4opXJXSIg0lHc9/F2EVPPg8LSc0yWXCgD/kNjivtdpCn237x2v+soiT6vh?= =?utf-8?q?acjTkvRf5zdnCtcdtwdCaAmnB+csWDp51QYepgtxjzhwQekY0c7NbZAadXZTi9SpV?= =?utf-8?q?XkqJz8VbNKfim0/r0kUGgSzoEhKwhl3m4sYcbwEmU6krDuugNuC0BR1YVh8xn5YkQ?= =?utf-8?q?m1XszHOcgCcLp/0DDyLdvmHc+UGpYkWEmEAFy/InViR25ZNrMvPzc0XQ3Yspr1jhu?= =?utf-8?q?88u9AbLrVQJ/Ahw2dZaSoOtgWhY15ZPNILKRii/44ZLhDsubujAYoQRwBsll+j4E9?= =?utf-8?q?9PV8iA/yrdXu+f5CmietUA0EpzbA84n7NO5BKW9N4S7GuW8cXFA3BPOLDFix0Vu7O?= =?utf-8?q?otQhLhpWPFh+8bzs/YPfVaH5dKNhBvmecqJonulmKByVt44RcOePfWtuKR6IVx0pd?= =?utf-8?q?hBXP4ELF2hP8y2GDDwb11AwsGvBpDfS9Yz/85xZYfYteJE8XcSFwcgupOZLF5Smzs?= =?utf-8?q?bpe1Ik6o4lYozsfPJRwPfm04oTlHpOlp+cCxOQhBtWUiFHwLsoKy0P7h/lHk4kfiv?= =?utf-8?q?cqOVZomfykPx5LY1PUsv5Vq1rPvAY4MDli1QgEsgzkg+dCs50MosFQnvuj6aksJ8a?= =?utf-8?q?lr1pZD4bikM8Yf7Jyzv/ekq1GmP9DNtlmXCaekKRsC1+wm0XhcBR6Q2t2Ez/g5BlN?= =?utf-8?q?IWnb8aWEbRS8SlmXZBrABjFlxgmLsM238raJrYCyeHmJmdAkESSHSRdsibcPxA//Q?= =?utf-8?q?d/h9MGdFkxFfE94/6cRys5fVeaXSvhyLngLCFPWzy5t2qaGrHbh+W4CAjDjk9Gr+K?= =?utf-8?q?wUQm02+oThm8KumOvjr5iI9hq7pSWKUMo2LdZpERxDLIMSt4biuDIIrn3VHJHzZIw?= =?utf-8?q?MN8dEkwbOx+5hpdgvGtwhQTcDuGOaFl88YCjHLfb3jZ12+ONem3s9xFq7nxHd4YsO?= =?utf-8?q?o3D6O19GO2zU4xUIgVUUDVmcgi0bwY8r+cHinDl63P+UDocHwsxwZUBjy8aNpwfN3?= =?utf-8?q?dWuAi/zYSQixGinrmaCg6MhB3cTyAdimNwOfLAgNcHTBTBBKWziVxqpC//lHCmRBq?= =?utf-8?q?HFQySrLUeGSObBIYu/5ljHpIvODxm0RPb//++y/NQHxH2g15LIwLgv3YSuSr+MvC9?= =?utf-8?q?XewwUyduuuW6OEwSI++O1c31aNOM4fLcPiKAnIjeSnSSRb8uk3/SbDaB1c4+DOXD/?= =?utf-8?q?CkJUqPqIcAFa/?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 085d7ee6-ba6d-42cb-f402-08d8e7b5cc3b X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2021 13:25:27.7351 (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: 8pTplrBbun4NsJeIfCUunDsqd5HkeoBdOiF0rdbYViHy1ZStH9Oq/OGHmgQQpeCbtaPqm298iAgGg3b5gisTWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5099 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..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>; + }; + }; +...