Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7812790imu; Tue, 22 Jan 2019 12:06:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN4HsnyCGcFjjJWIj9Kq920TJDUAAzrRR2fSGQY4Q4H6LxpmjP6EIW86jU4gQSjfLRQAtAtu X-Received: by 2002:a63:2586:: with SMTP id l128mr17693851pgl.104.1548187601971; Tue, 22 Jan 2019 12:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548187601; cv=none; d=google.com; s=arc-20160816; b=fFXYkEwkJMWlHcrnRKo7w13yVg24tZabmjTExJhpDyZITYl0FzDdaUkNT+cO3ydjG0 rn3j9QJ+dFCYjf/bL1bJ5NlI6njsQ9M1ef2oVgglBfSM3S8feTqjmPTCQC2dX9w8z7Bq m9iLATDoO+q6LIRb0iBWegNmRMeudNLvsjmRzl4JIthprGpTn1rV3D18v5UWxXr3XycX hzdH3R/13+tqCTfOcO/yLUyThQdsDj1Ew5QlP1ckKkrUyv34iDOpPCJU+80fbsGmKUJj S6CnxgkEAUbvYwJtiilKeu/bZWciFbA0PvF23Qtg1JjEBHvWgMvTXmXBVKiYcbgTz6L6 8eTw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Wm3k7s9weCm7GI+v1q+XvaYMVbh69a3WEQbB7yIH6go=; b=Vj0db+mkq8KoY6Xwj+Sx6OUomyFtNYQkxR0pxBUKdVlLE3zdZnY4nGTnhDLrpYOY4O Qh2PauONiVqjPz+czBKwCmMtbb/OGADxgfBw555kThR4NnaiEcHmonuJ/TeAHeZ06h+P 0VzndKfs/wHj500g43Z6bTY9Tch86RzUi3GGqP2yKmxak+SJbVDEUjQwsuBzR9E3/h5V 07OWAj/IuPMd4WPonxQwzRCOn6mTzxbhESgNaEBQqzjInHfUFzzqGZqDo3q4mSxnq+lA dyuSO0lICygXb/rCunK7gg5r0k1JJ0/Sh4BansccecclErDiKpNiR1OmiPKcT5UfW4ca i0aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Grs+XzWw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si15813893pll.404.2019.01.22.12.06.26; Tue, 22 Jan 2019 12:06:41 -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=pass header.i=@kernel.org header.s=default header.b=Grs+XzWw; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726517AbfAVUEZ (ORCPT + 99 others); Tue, 22 Jan 2019 15:04:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:37146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbfAVUEY (ORCPT ); Tue, 22 Jan 2019 15:04:24 -0500 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E22F62184A; Tue, 22 Jan 2019 20:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548187463; bh=koJJaclCQXIF7ABw4OggJQsEhP4spKzRESafbMwrurs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Grs+XzWwCNiOC2hscKzxx/HNwh2CUaS187t1RzwCkGTQqwBaUMcGgK6UMSG1hqE3B tqgZ1h1KmArSbmtBCAT2mxFxTLqWH+4Sz5qsu0sG9Fy88Fw9XBdtm4nlXGLWtp7Y6b cLr3uiiPYYiQvncrgXBtW6kUHb7FdKSon/BOwXuE= Received: by mail-qt1-f173.google.com with SMTP id v11so29164996qtc.2; Tue, 22 Jan 2019 12:04:22 -0800 (PST) X-Gm-Message-State: AJcUukfg8pB/r62HMdnFYRQBMXzF/oVaNlp+44O36OTwIwZjs06tm8BU gy+SQYZaD4+MtpO6MIEcjgGeEsVYGS9smaAAxA== X-Received: by 2002:ac8:1712:: with SMTP id w18mr32259869qtj.76.1548187462082; Tue, 22 Jan 2019 12:04:22 -0800 (PST) MIME-Version: 1.0 References: <20190122180729.1834-1-ben.whitten@lairdtech.com> <20190122180729.1834-2-ben.whitten@lairdtech.com> In-Reply-To: <20190122180729.1834-2-ben.whitten@lairdtech.com> From: Rob Herring Date: Tue, 22 Jan 2019 14:04:10 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation To: Ben Whitten 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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 concentrator= s > 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,sx= 130x.yaml > > diff --git a/Documentation/devicetree/bindings/net/lora/semtech,sx130x.ya= ml 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=C3=A4rber > + - 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" > + > + 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 ar= e > + 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? I thought up to 8 concentrators was supported? Or channels and radios aren't 1-1? This too should have 'type: object' since it is a node name. > + 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 =3D <1>; > + #size-cells =3D <0>; > + > + concentrator0: lora@0 { > + compatible =3D "semtech,sx1301"; > + reg =3D <0>; > + reset-gpios =3D <&pioB 27 GPIO_ACTIVE_HIGH>; > + spi-max-frequency =3D <8000000>; > + > + radio-spi { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + radio0: lora@0 { > + compatible =3D "semtech,sx1257"; > + reg =3D <0>; > + }; > + > + radio1: lora@1 { > + compatible =3D "semtech,sx1257"; > + reg =3D <1>; > + }; > + }; > + }; > + }; > -- > 2.17.1 >