Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1898imu; Tue, 22 Jan 2019 12:37:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN54VVoBkYVlebTgKd3b5KfA6Ou51ApY46bgPMJGCOtxcquZZDsHfgi26CIOyQ6YVCU5j05i X-Received: by 2002:a63:5026:: with SMTP id e38mr33514683pgb.123.1548189470598; Tue, 22 Jan 2019 12:37:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548189470; cv=none; d=google.com; s=arc-20160816; b=qlzN49WNiT//uQCB+vGQ9wHAgg1d2a20qzAa77+aybM1ETz15U7SUCqgCS5Wo5kknv xPBNzq/L/6qyKosk75fZkAqCyepiwNM6iCKVmxCj4HpL/ctjkhLUYnvw94Ds2JwBgDos 3Ozq8VG0BrJ426d0TuXRjd9W/6BfztcHbCfZvB+9Q59vAcoiQIFvwLIGQqH+xxs6i3S/ SnscMsSECvXnArJ+S0S/Uk2zHvMqiipXMxi3zhbBEnl82ohJyOarJlPuLLJ/m+SjCvHS 3jUBS8IWEIjCKcjUU0OFH/nnUfw2dKHAtOL7w3k8OeTOVmBM4/P6uo4DfZ7hV4L8c1k+ HTqA== 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:from:references:cc:to:subject:dkim-signature; bh=jwHJoW4ME9CQP02zwm7KcPUs0g3IDmkfJllJgJY5Dco=; b=OxO5/twTd+Lj6tJ81NW4jhIZJ+MCff4Epkpv0z5cA67xKgfeANfESVMunFMcVaSWFj RtYMUD/KtJW83Z0/7L+mwLp41ogC7uZK3d4odXY6BxNWcII/ofLycI5JY3LYA4Knikh3 OgUXDLbruio9et/kPdQkR2za1Qz0DeLKyQNAwMynIcsbRRaJjN19fknEb99BL940rtDx O73/vJiV7ft14QQGTPX03Z/QvL3X89GmHzQpffUCyDe102RR1rPWwgn/qMe13qMSlBB4 aP2TQiQRj1mm5gci88lea9Q++dUNM/+3VFUW7edfSTskUdg7OYxbRgcf1mAbhDEUSTZZ BsSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=iBgbbkJs; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si15778664plb.209.2019.01.22.12.37.34; Tue, 22 Jan 2019 12:37:50 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=iBgbbkJs; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726317AbfAVUgW (ORCPT + 99 others); Tue, 22 Jan 2019 15:36:22 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38819 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbfAVUgW (ORCPT ); Tue, 22 Jan 2019 15:36:22 -0500 Received: by mail-wr1-f65.google.com with SMTP id v13so28965544wrw.5; Tue, 22 Jan 2019 12:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=jwHJoW4ME9CQP02zwm7KcPUs0g3IDmkfJllJgJY5Dco=; b=iBgbbkJsF74yKgMzXMOwGl/s/aRkFenlW8DNlQjOWp5F7NsGSOppRWdteY1wA7zBKS AUhX9OfWgUdNQ/BDV4P71opfHXizdqrBegSmT3sKl7f0Vozrk2KQ3BYSXlrhEcLpxcgA IfUiEUxkSdRaYxy4V9fMmYHduv6Elei6u6cqSvdSj3yGQryBVYtdUQpJk67kirpeBa8+ hWaWA57FzWv/E8jZ+sxGz9HSoBqJg81C4Hi42jY7LY/Yls8VCv/+e0ph84mTpAE6cX9t A14a1/9bji8OTrdPG1AsCx8fWoOwSCOFWVtKWQbJX1NQt/7+7Ne15eA/3yQ+5pykypBO j6Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jwHJoW4ME9CQP02zwm7KcPUs0g3IDmkfJllJgJY5Dco=; b=WfTb3ts9v4KxiwQzuMdAwY0/Hiir3w6D9lKao5MlKwdY1WM8puG6vlsRf/Gj78Izp1 2bU8O6N5YFyfFrZfwrV4aeoQmDt/SWz+bl8S+RhZyudVNnDbktAn6z3zklfS813huzBM g7twSKke87RptgW2pRmjH68FDDy9jkc1vyhRoKwryw3ngKNluSAieqYYzlQ1L6cDaR1V hjvR94Q5g/dBgA1R67jk+FHbnU6X74Jcu7fMCznAAjj9kphXr/CP/ES2oBjjtM+L3qy+ UwXZOpykBlUAP9CcXaCE2sYPhBh+crJP3sHOE7McxLDJGJDqRsvf1zAQUxrCfNnZtad0 P5Cw== X-Gm-Message-State: AJcUukfgzjSmV39X5N1eIcl3ZPP0P3ZuLkYn+9eGtZfC00Go94M5octs C/zf9iRNvHi0CIKleKGwsoLLUdfNFFEFlA== X-Received: by 2002:a5d:6710:: with SMTP id o16mr35334373wru.152.1548189379584; Tue, 22 Jan 2019 12:36:19 -0800 (PST) Received: from [192.168.1.69] (229.98.125.91.dyn.plus.net. [91.125.98.229]) by smtp.gmail.com with ESMTPSA id y1sm69913818wme.1.2019.01.22.12.36.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 12:36:18 -0800 (PST) Subject: Re: [PATCH v2 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation To: Rob Herring Cc: =?UTF-8?Q?Andreas_F=c3=a4rber?= , netdev , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Mark Rutland , linux-lpwan@lists.infradead.org, "David S. Miller" References: <20190122180729.1834-1-ben.whitten@lairdtech.com> <20190122180729.1834-2-ben.whitten@lairdtech.com> From: Ben Whitten Message-ID: <60e26fa6-079d-5380-f139-e177c4012e33@gmail.com> Date: Tue, 22 Jan 2019 20:36:16 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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, On 22/01/2019 20:04, Rob Herring wrote: > On Tue, Jan 22, 2019 at 12:07 PM Ben Whitten wrote: >> >> From: Ben Whitten >> >> Add basic documentation in YAML format for the SX130x series concentrators >> from Semtech. >> Required is; the location on the SPI bus and the compatible string. >> >> Signed-off-by: Ben Whitten >> --- >> v1 -> v2: >> * Dropped reset-gpios, radio-spi from required. >> * Dropped spi-max-frequency from binding. >> * Changed compatible to allow fallback from SX1308 to SX1301. >> * Wording changes in commit and descriptions. >> * Dual licence >> * Incorperate Robs comments on child node and spi wrapper >> --- >> .../bindings/net/lora/semtech,sx130x.yaml | 96 +++++++++++++++++++ >> 1 file changed, 96 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml >> >> diff --git a/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml >> new file mode 100644 >> index 000000000000..41919fb67ec4 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml >> @@ -0,0 +1,96 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/net/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 >> + demodulating LoRa signals on 8 channels simultaneously. >> + >> + It is typically paired with two SX125x IQ radios controlled over an >> + SPI directly from the concentrator. >> + >> + The concentrator itself is controlled over SPI. >> + >> +properties: >> + compatible: >> + items: >> + - enum: >> + - semtech,sx1308 >> + - enum: >> + - semtech,sx1301 > > I think you want: > > oneOf: > - items: > - enum: > - semtech,sx1308 > - const: semtech,sx1301 > - items: > - const: semtech,sx1301 > > That covers these 2 cases: > "semtech,sx1308", "semtech,sx1301" > "semtech,sx1301" > Ah yes, that is what I was after. Thanks! >> + >> + reg: >> + maxItems: 1 >> + description: The chip select on the SPI bus. >> + >> + reset-gpios: >> + maxItems: 1 >> + description: A connection of the reset gpio line. >> + >> + radio-spi: >> + type: object >> + description: The concentrator can have two radios connected which are >> + contained within the following node. >> + >> + properties: >> + '#address-cells': >> + const: 1 >> + >> + '#size-cells': >> + const: 0 >> + >> + patternProperties: >> + "^[a-zA-Z0-9]@[0-1]$": > > Is any node name allowed? We like to have generic names. 'lora' is > fine for me, but I'm don't know if other devices could be attached? > This sub bus will only have IQ radios attached to it, perhaps 'radio@0' as the system can handle other modulations. > I thought up to 8 concentrators was supported? Or channels and radios > aren't 1-1? You can have multiple concentrator chips (SX130x) however each one may have up to two IQ radios (SX125x) attached to its bus. And in terms of channels the system can listen on, the concentrator has 9 LoRa demodulators and 1 (G)FSK demodulator. > > This too should have 'type: object' since it is a node name. > Ah yes >> + properties: >> + reg: >> + maxItems: 1 > > You can add: > minimum: 0 > maximum: 1 (or 7?) > >> + required: >> + - reg >> + >> + required: >> + - '#address-cells' >> + - '#size-cells' >> + >> +required: >> + - compatible >> + - reg >> + >> +examples: >> + - | >> + >> + #include >> + >> + spi { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + 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>; >> + }; >> + }; >> + }; >> + }; >> -- >> 2.17.1 >> Thanks! Ben Whitten