From patchwork Mon Oct 12 10:46:26 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: 11832123 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 496DD139F for ; Mon, 12 Oct 2020 10:47:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16AE9208FE for ; Mon, 12 Oct 2020 10:47:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="ap83X+X2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387778AbgJLKrU (ORCPT ); Mon, 12 Oct 2020 06:47:20 -0400 Received: from mail-dm6nam11on2077.outbound.protection.outlook.com ([40.107.223.77]:59904 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387594AbgJLKrN (ORCPT ); Mon, 12 Oct 2020 06:47:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DzeJa+QlC5BpyqQrvwxWx9/gmSeexlWepa3rxLudv9tOfqSDVRrNoN8EuX2ipe41WVFSz1ODMtstmgFWV+Cw9oTFi/MQqzub++ltZbST4CUvLQ/tZXyfXRDnejitcWpetn6Tkju6gfuBax2Rca2g4ScJie4kD1W1R+nLmbyGITH5XukG0amU3yFLAess9e4HUwD39WIMNP6Wk18FzsX6med9WK8bJ/Tr+xByWxUbAWNOsawm/rZgDVcTsZTWilPgcuUJfsojLuWeXNsdsLRlgeyMV66bl4C5cC/xQlQN0oX39fIWCaE2K+01E+u/BZo/RfDyQQlNLfllnWtwh8khdw== 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=qo32LwbmDuLR1/pvw0gLGFoQuy7lgCsd9hQ0X3be1/Y=; b=LcG9AZD0si6gS79X4tcwLLXS3Y7DcVf32djZfpP0TFdTZXXhcxBFPPULc+cOY56Vzh3SR60WY1NLZUq9YBqDGB3q0VynOishSDOhuQazhMv6wKmeCQTVYYlhcW4uA9GKxreSubIZ4fG1RCfNFJAJKKzRZV5NVkpuNXGINQaksraNHNnp1dFKFFRfbMiOc8Jl5C1KRvNt0K2XvBuo3qSjlnJACxHQNSzzDQ/4M2gGj6AbzbWaf11ceJuhtN9sdAMkJ3hIaCkD6mEPPdmQx0CjhgVkreJj+g6fga9Ozfq8mnkd55ukHpemHiDUUgQfvdZ0rZyi0wBJobPiRchwCyUDUg== 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=qo32LwbmDuLR1/pvw0gLGFoQuy7lgCsd9hQ0X3be1/Y=; b=ap83X+X2bLTzI137NLZRxJA69JLkM2Vu+SCfK1vQKkPlUDxaA3jjAIJk5z+P4wJU0+YyYxTXLc71i95RwkGMWvSJSNSQy5wjpWa9jj8U5SqFkY9bChin07FoymfDGmL8xAviGCOxJmawA1Rn5V7lRs8mEfSQE0wvthn6DCzRdX8= 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 SA0PR11MB4734.namprd11.prod.outlook.com (2603:10b6:806:99::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Mon, 12 Oct 2020 10:47:08 +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.3455.029; Mon, 12 Oct 2020 10:47:08 +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 , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 01/23] dt-bindings: introduce silabs,wfx.yaml Date: Mon, 12 Oct 2020 12:46:26 +0200 Message-Id: <20201012104648.985256-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012104648.985256-1-Jerome.Pouiller@silabs.com> References: <20201012104648.985256-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [82.67.86.106] X-ClientProxiedBy: PR3P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::10) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (82.67.86.106) by PR3P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21 via Frontend Transport; Mon, 12 Oct 2020 10:47:06 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7aa97060-5e25-4435-9a66-08d86e9c2a61 X-MS-TrafficTypeDiagnostic: SA0PR11MB4734: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LBYZVJJaUhG8I3RVnFkcgdUY9q7uIxGcTF6P+Z+pmKsyUidOwruBslwR8RoPK3AzJDQFnb+4wcGOKrpCsBHHpgTPMwpYI12g+RH6Ph2zNATk8WLtFHASQ2U/CwlgO+A2NRId4lbKrkHqrP2TL+6+pvQeXxXUdleAaHIauK7GYhZ6twhmhZWUrxXE/WSirvue65AHr/w2kvc4MZQRTm5YU+CcAz02YCmmXvThRVNjxny7JCJOCOTxx7XIrN+7AB4o0LUDTAir1gq7R3Lk2z950+qnMWpua4IuVclS2su4Gzat7m05jMh86f76J7WCsQfgYZuVar58sKl2vDvDhMX2yBOKEvd1Bkm+c7a/qarintk21eS4RpAoWRhw7XTXiiUOiKaghSGU0u/tlzQjXKbpjQ== 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:(39850400004)(396003)(366004)(136003)(346002)(376002)(66556008)(66476007)(6512007)(26005)(36756003)(66946007)(16526019)(186003)(316002)(4326008)(2616005)(956004)(1076003)(5660300002)(107886003)(6486002)(54906003)(86362001)(966005)(8676002)(83380400001)(83080400001)(8936002)(66574015)(52116002)(2906002)(6506007)(8886007)(6666004)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: +YC+Ss8JfeTo+rluBKMtfpRuicQ++qUgWtAq+oMVkUbmS8sbFV6agEq8ms4UK+fFylQC5C1JPhK4pXUSX3dmy/rAlu/FeJexXGrBjgVHkOAKq9nxb6vmeJUZrco3Z1el2m9kqlUtRtJN6Kh8V/VkGWbz8XMU+KTeCPP01see8L5RgZaccRzE/abqh9Obe4P9vfbbveNvIE2hfhy8XrrSifbcOAYe72mAmG+pngU9T1s9syrI0HfNDQplPHWbmQkRI7CWgqaaFUFh5gXBAtxoFaGLZXlBCGBKsalaqfc4RP25OrcKLVV8wy+SzKm4DmKuawNiywC7fCoQijigtVl1T1z9X2K17grimYg2zlVkLIY8gu/0hnNfVndCgcOm6bQH5SbaHrQaMG9KtwPHg8xNt99o0kxD+Z/zXhnn2cyY5BUUwZ6v+L224UJvr2uwhntImXCIwyeGYa1/qoCK/fyrcuoUlgsCAkj2vQLivhcbMdmj9MSEwtD1KTIwtIkSui/zulUC5rWUaYa1ySzVGYCH7m4hUre4lRYvcfnec3U7LGfV9LNwm1ryB7OEYRCx05+3ylGe5h5pzCdpilnZVSyX5AfNzpKb08gw+VmKYZlcm8Bav4dIXJDXKFFTm6yDbNq+lmkcfTFbvLUy3Ub3H7K2TQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7aa97060-5e25-4435-9a66-08d86e9c2a61 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2020 10:47:08.0816 (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: dZqHb6lD8/VWEVbTPWT7Z9+ah5ekvtunAqhecSMXpGX8wT6DbLy1DFqush3mpRtiAAAf8hO6Temwykd4APbt6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4734 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 | 125 ++++++++++++++++++ 1 file changed, 125 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..43b5630c0407 --- /dev/null +++ b/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml @@ -0,0 +1,125 @@ +# 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: + The WFxxx chip series can be connected via SPI or via SDIO. + + For SDIO':' + + The driver is able to detect a WFxxx chip on SDIO bus by matching its Vendor + ID and Product ID. However, driver will only provide limited features in + this case. Thus declaring WFxxx chip in device tree is recommended (and may + become mandatory in the future). + + In addition, it is recommended to declare a mmc-pwrseq on SDIO host above + WFx. Without it, you may encounter issues with warm boot. 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. + + Note that in add of the properties below, the WFx driver also supports + `mac-address` and `local-mac-address` as described in + Documentation/devicetree/bindings/net/ethernet.txt + +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: + description: (SPI only) Maximum SPI clocking speed of device in Hz. + maxItems: 1 + 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`. Only + necessary for development/debug purpose. + maxItems: 1 + +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>; + }; + }; +...