Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1285099imu; Fri, 11 Jan 2019 19:38:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN6KtxgPNZBGGGkdVKJaGJ/bz4deHlpQTuKXNM9fK7ic3LRDPC+EPzQqXg+R8LHv0zX59jGw X-Received: by 2002:a62:9fd9:: with SMTP id v86mr16994988pfk.191.1547264319773; Fri, 11 Jan 2019 19:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547264319; cv=none; d=google.com; s=arc-20160816; b=gaQLYKzptDbI++CUSmc1V+BxpMX4tcZWoSn7FXOVu4Ik1ecnEbeTf59MbPdpn8Obrc GzNWeoFqbLE2Pjg6ct4vLUDgjdvjWc9D5XRjXd2X0Ks8qyKmc7Aq7pRh7t/Hk+sIkKp2 4lqmGUXED9xq1Cy7OpUUAHh6iP+rXyDNKqqwZ7UnFp7p0c8mH4pzT/Vn18iyclRA/K4f tpWPZgDSCn/XlQNA2yioqAs20jZYKIFbxR83pOxYBePqQzg3zZ3FjgJPM/BuLeMwEpqc Ib5lit3LELIshlzd0GcD3tu3V+NLqe/eUXvzU3lCXKYczQTq79i7PeowsqRujcQHGBXJ KAww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject; bh=9veUmPrOgbvupovFdz1HVi7KKvcy16zXWLUe9RN9S68=; b=dDrHzx0mObhu+Pok5puJs0ldpMZxX1nCstJ/wJBMElhJP4PErmnYHC4fn8xDH/TqVx MnOU/R8w/8PBxi3lJLpKBbRDPx/UVr2IVRFIku9RF6ZSGF1XTMcDqG2W6wtsic00QeS9 LJsWURDivSjWMN+5fqW7yuLnyuCk+H5Dmrb7HoaOsd4OrhZnWCoDXUflevzKx5r5eeBL IGpyN2Mp9fD/NYLBJYWuE3L2zpZW5CDd375Ef5FeVp62upozwFWJi94yW4pF0Lpm6DpQ viJjPEO5KBMYDSvIqwH/He0dh0eHVU+bpRzJWD2pD2Uq4+12oUqfwdQhi8/s9JDwh0jQ Crkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i69si39068268pgd.71.2019.01.11.19.38.22; Fri, 11 Jan 2019 19:38:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726477AbfALDhL (ORCPT + 99 others); Fri, 11 Jan 2019 22:37:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:45476 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726276AbfALDhL (ORCPT ); Fri, 11 Jan 2019 22:37:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 77EB6ADFE; Sat, 12 Jan 2019 03:37:09 +0000 (UTC) Subject: Re: [PATCH lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation To: Ben Whitten Cc: linux-lpwan@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Mark Rutland References: <20190108084132.10214-1-ben.whitten@gmail.com> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Openpgp: preference=signencrypt Autocrypt: addr=afaerber@suse.de; prefer-encrypt=mutual; ke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QUGA9y DeDcxSitpYrNIvpk4C5CHbvskVLKPIUVXxTNl8hAGo1Ahm1VbNkYlocAEQEAAcLBXwQYAQIA CQUCTpbplAIbDAAKCRD6LtEtPn4BPzA6D/9TbSBOPM99SHPX9JiEQAw4ITCBF2oTWeZQ6RJg RKpB15lzyPfyFbNSceJp9dCiwDWe+pzKaX6KYOFZ5+YTS0Ph2eCR+uT2l6Mt6esAun8dvER/ xlPDW7p88dwGUcV8mHEukWdurSEDTj8V3K29vpgvIgRq2lHCn2wqRQBGpiJAt72Vg0HxUlwN GAJNvhpeW8Yb43Ek7lWExkUgOfNsDCTvDInF8JTFtEXMnUcPxC0d/GdAuvBilL9SlmzvoDIZ 5k2k456bkY3+3/ydDvKU5WIgThydyCEQUHlmE6RdA3C1ccIrIvKjVEwSH27Pzy5jKQ78qnhv dtLLAavOXyBJnOGlNDOpOyBXfv02x91RoRiyrSIM7dKmMEINKQlAMgB/UU/6B+mvzosbs5d3 4FPzBLuuRz9WYzXmnC460m2gaEVk1GjpidBWw0yY6kgnAM3KhwCFSecqUQCvwKFDGSXDDbCr w08b3GDk40UoCoUq9xrGfhlf05TUSFTg2NlSrK7+wAEsTUgs2ZYLpHyEeftoDDnKpM4ghs/O ceCeyZUP1zSgRSjgITQp691Uli5Nd1mIzaaM8RjOE/Rw67FwgblKR6HAhSy/LYw1HVOu+Ees RAEdbtRt37A8brlb/ENxbLd9SGC8/j20FQjit7oPNMkTJDs7Uo2eb7WxOt5pSTVVqZkv7Q== Organization: SUSE Linux GmbH Message-ID: <3a998d80-1ebd-3105-6517-69e78a04f1bf@suse.de> Date: Sat, 12 Jan 2019 04:37:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190108084132.10214-1-ben.whitten@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ben, Am 08.01.19 um 09:41 schrieb Ben Whitten: > Add basic documentation in YAML format for the sx130x series concentrators > from Semtech. > Required is; the location on the SPI bus, the reset gpio and the node for > downstream IQ radios, typically sx125x. > > Signed-off-by: Ben Whitten > --- > .../bindings/lora/semtech,sx130x.yaml | 87 +++++++++++++++++++ > 1 file changed, 87 insertions(+) > create mode 100644 Documentation/devicetree/bindings/lora/semtech,sx130x.yaml Patch 3/4 moves this to net/lora/, which I think is more appropriate. > > diff --git a/Documentation/devicetree/bindings/lora/semtech,sx130x.yaml b/Documentation/devicetree/bindings/lora/semtech,sx130x.yaml > new file mode 100644 > index 000000000000..ad263bc4e60d > --- /dev/null > +++ b/Documentation/devicetree/bindings/lora/semtech,sx130x.yaml > @@ -0,0 +1,87 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/lora/semtech,sx130x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Semtech LoRa concentrator > + > +maintainers: > + - Andreas Färber > + - Ben Whitten > + > +description: | > + Semtech LoRa concentrator sx130x digital baseband chip is capable of SX130x or SX1301/SX1308, to distinguish from driver name sx130x and to avoid ambiguities of which x is a wildcard. > + demodulating LoRa signals on 8 channels simultaneously. > + > + It is typically paired with two sx125x IQ radios controlled over an Ditto, SX125x > + SPI directly from the concentrator. > + > + The concentrator itself it controlled over SPI. > + > +properties: > + compatible: > + items: > + - enum: > + - semtech,sx1301 > + - semtech,sx1308 We should only list both if we expect differences between the two models. Otherwise SX1308 can reuse the SX1301 compatible. If we want to mark it up just in case then rearranging the above to be a sequence of "semtech,sx1308", "semtech,sx1301" would be an alternative. > + > + reg: > + maxItems: 1 > + description: The chip select on the SPI bus. Is this mandatory now or not with maxItems? > + > + reset-gpios: > + maxItems: 1 > + description: A connection of the reset gpio line. This needs to be optional, which I think the maxItems syntax says unlike the commit message? On an mPCIe card you won't have such a GPIO, for instance. We do a Soft Reset, so it's not functionally mandatory. > + > + spi-max-frequency: > + maximum: 10000000 > + default: 8000000 > + description: The frequency of the SPI communication to the concentrator, > + in Hz. Maximum SPI frequency is 10MHz although 8MHz is typically used > + on a number of cards. Do we really need to describe this here? It should be covered in the common SPI bindings, and only applies to SPI bus, not USB picoGW. > + > + radio-spi: > + description: The concentrator has two radios connected which are contained > + within the following node. "can have" > + > + properties: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + required: > + - '#address-cells' > + - '#size-cells' I'm pretty sure that Rob would like to have a compatible here, even if unneeded in our Linux driver? BTW if someone has better naming suggestions than "radio-spi"... I just wanted to avoid having it in the main node directly, in case we need other sub-nodes, too. > + > +required: > + - compatible > + - reg > + - reset-gpios Must be optional. > + - radio-spi Should be optional. (Driver needs it today, but that's another problem.) > + > +examples: > + - | > + concentrator0: lora@0 { > + compatible = "semtech,sx1301"; > + reg = <0>; > + reset-gpios = <&pioB 27 GPIO_ACTIVE_HIGH>; > + spi-max-frequency = <8000000>; > + > + radio-spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + radio0: lora@0 { > + compatible = "semtech,sx1257"; > + reg = <0>; > + }; > + > + radio1: lora@1 { > + compatible = "semtech,sx1257"; > + reg = <1>; > + }; > + }; > + }; Thanks for looking into this, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)