From patchwork Wed Nov 4 15:51:45 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: 318220 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 725B6C4742C for ; Wed, 4 Nov 2020 15:52:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1774820781 for ; Wed, 4 Nov 2020 15:52:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="UJxetc53" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730818AbgKDPwg (ORCPT ); Wed, 4 Nov 2020 10:52:36 -0500 Received: from mail-eopbgr750080.outbound.protection.outlook.com ([40.107.75.80]:6126 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730871AbgKDPwf (ORCPT ); Wed, 4 Nov 2020 10:52:35 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bUPnn/Sb+BKkya436/dEQknP2hszssHZ5+IMoSgKWsQkZdtjMJgq93GQVzui+IyG6zDir6y2gllB5Ffa1EKV0UqeWR4qyHWt1teNrNgagjy08OgG75x8ibfQHbA7hwHNUfBpYdR4JjdTCpTbCHchomZEOZD+6NJvs6nWCcOi9ID2KVvjQaGsoTLsOa6qYqW3QWoRd3VrRkZqxqkbTI1PPGd6lzZZrglxwpxFkT+L2dnAi+izy5eVVBqMcFK7dSHMJCBc4iht1NjMjRsgZuaUY29djFFCxuSwEu3wmhLmFQdIYARhVCmmohWKK5x7cazEMpth+Mwfqn+a4wYnURu9gA== 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=YekLf7amXYKq9twfWKvoXTRecyL+hvQncbuTAVKuyHg=; b=CV5z5i7qS00KalbbdDr6BcF3JXMdj6TlvxWBNcPR4czyecyMDmE0NUUL5Pxg34eEfbWAxYdOtlTbje5s8T0teRmnsMz36wRH9FwP88834fLtZEaGHPRSFskrtZ/HGxBM1uotTwzBPwvtAu+HNTHWQmMUGaIkFc8iSxNMgssFzTGCSccPf1rNEIXZtELy4Rrok1C2CkE3DNVXHh4faLzPuzGAdlTcBbEFrK8fRJOEQ7flXZykKsBn4/G37/S4ED13yEmqvZaXoWAfn/NnoiMbrqK1wgk6RPST6uiFp0Ac3CyzdDZ7MhnFfEC9u1RE2xC5Mn5stBI+QkNBqYFS/9GQMw== 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=YekLf7amXYKq9twfWKvoXTRecyL+hvQncbuTAVKuyHg=; b=UJxetc53+vxdJTO2mnlWQFfdwmQiImM/NzIwWNilXHpCwcCBEBMh1QT/YlFH9J3BYoHOu6csn9FrFeSHskERO3ckHzYWmJFYZw7AmJmwxhbGMqjwiKvngReU6jggmoxjZxEMjRketHrFKCQd0GgOR6YND38z8eFd15wCtc3hUq8= 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 SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.32; Wed, 4 Nov 2020 15:52:26 +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.3499.032; Wed, 4 Nov 2020 15:52:26 +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 v3 02/24] dt-bindings: introduce silabs,wfx.yaml Date: Wed, 4 Nov 2020 16:51:45 +0100 Message-Id: <20201104155207.128076-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201104155207.128076-1-Jerome.Pouiller@silabs.com> References: <20201104155207.128076-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [82.67.86.106] X-ClientProxiedBy: SN6PR01CA0032.prod.exchangelabs.com (2603:10b6:805:b6::45) 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 SN6PR01CA0032.prod.exchangelabs.com (2603:10b6:805:b6::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Wed, 4 Nov 2020 15:52:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89e1f47b-a8f3-4942-e701-08d880d9a06c X-MS-TrafficTypeDiagnostic: SN6PR11MB2718: 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: UT27EFOp4QjKziqbHJecGGwQwemfpCvH+r9UZS6qp8z8DEnArUicsRZFksm74peIurrdX6CfkHstG3U4Iigsry4Nc8MGC1ZGx+7J04UFqAlf1g0lmZYn30dIDwOA/hq3FXYos7oNlHeJ9FeuQG7C6Bl4bZzgsBvty8OUeoIFj4lqcgcqJSssiwBLKxPCU2l91UT+Uq2yIt1gpToZj7+R7+/frumUxW3qVBZJUsrOQFb75gOdpTqvwmPz9qzXNrZXsFLo0c/cFP43aDnR/ad8UnKh+M5Eai6ugiswZ8bA9SGa6f4A0MWR47yB1YKCerZv20Rom2WDDzKph3Qmawz9icz45RqQ3bWmu1Z8fB4kNh6zVtMNpUZ7+5SSAZS55o0N55o43SIfKKTV+FPw/lZPog== 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)(346002)(376002)(39850400004)(136003)(396003)(8936002)(966005)(478600001)(186003)(16526019)(956004)(2616005)(6486002)(8676002)(66476007)(66556008)(66946007)(316002)(7696005)(6666004)(26005)(54906003)(107886003)(36756003)(52116002)(7416002)(4326008)(5660300002)(86362001)(1076003)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 3KGAH1cqGm1oJJ+S+ZoThEr8QJN4o/UAxZIa7GXx1pRRmC/2tS4AOnYXPMyQz42ftIUwJkEv0sGgdi2q4ljsJuEtY88MSFqgf4JzmOMg1FT9MwXPjYuXfdQd2E8N6cXXrxTTfHGIhrY5o8YLFeB3LfLZhgWkrjy7JTiCDdgk7vy/4eRsci5s3DZAzN/iPg9UoyU/YtD6eRyV8C/l/jfrzki/Dnw/ebTjcIJG0nRGc2/csph5UFq9bXCPoi900S68sNZScreuAIvZgJBLdoT8rJLzJfORRjN2tuksDJO7/aw8oIESoJLw50GO7HtKmjmA6hGF47GEWrdTZvLUp9s0C2ZTku6gNqtP72lMHhimXQpk+5z3ScIvIstIozGvgJJesk5ds5CkqRYmDykwnelpRZtQCDIUrwus6B0JgEGqtYzGbhX8ExTRaLmQ/bXislhEfbcZ7JSFjVJ2FWtVVTNgnqTddrc4uXtidKyW/WVgF80vhhz4gpc2K3ISpMD+94l9jPQNXPJsCAlAVyME1s8GhxPxD8i4NfWWPjQMOWjIFzdMU9is5zBHOKQVbxelZkyB85s1u7n3mbR5rvFm/pt7eeDMokigwS2dpQTmtey0VKAYVSFUyXf71bMzUll67c0+5KAcT1nsR95QqvSqy/2vNg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89e1f47b-a8f3-4942-e701-08d880d9a06c X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2020 15:52:26.2934 (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: 1Mb09NbqQpHybMDi0QWdVFj3dAJUDEh0GZFU6x373AoehaFvMbYsDnHNDgKW+iru02V3QH7htcqtL5+wOuTe0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2718 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- .../bindings/net/wireless/silabs,wfx.yaml | 131 ++++++++++++++++++ 1 file changed, 131 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..c9fc5ff95b58 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml @@ -0,0 +1,131 @@ +# 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 + +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>; + }; + }; +...