Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6616913imu; Mon, 21 Jan 2019 12:14:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN4IF5/bOPnIRbxO3HA7RriphU78Nuw630BFbA7UqzZB0UlB5elvSE3Q4G30mnJcyhHEoWGN X-Received: by 2002:a17:902:9692:: with SMTP id n18mr31932176plp.333.1548101642099; Mon, 21 Jan 2019 12:14:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548101642; cv=none; d=google.com; s=arc-20160816; b=EKhogwtf8phrjTmhxuejuB9/L0SIwY1PlJMRFMVk4MmgyNd4FtBAQK8WgZM++JDyB5 qCeB8t7IZjlNrgW7wdCoNCtMtsVN4k8IoDiU0+acsSKI/4WWqusuIp7pAAAVWY1cnJBH KV4A3BMDNZn6noy/MBw0Pptr1tGw41HnILmpOcQVp8ghw8+myLTx9ULsld4YA8AiN6U0 oIXYbO8kYyTdSu0emDqBYpytnopMe+yhTRhEq0nTwuO1jgt+o1qpxdLJWc+MzXkMO3Kt swIFfsM2sH0OonYALbNEjkJfEglReA9+tUp/pjHqCFUiQyyE5aGPKq1ukYEe7fXh03/M pToQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OX4oH04F9XnZ4XhGjG/Tb+3tcPifCjDXDkzAcZNGN30=; b=XPOfCIZL5plMmptMHwy8taA4IW5NlVJf3Doe1MXFxvGEckdbDLOKUVpz34VO5ql57u ium8Zn8l3L+Ooh3duKAW87gnfEwjeiBMk6NgsWKQWmBvljNHkBA5YGEffu3ZZmUjmR7+ FQQ7v+oFQEpmZBhfW0dttSYbqu8/tdTawS6/Z1tS/UC/O4QnF6CYPtRNUvoUx157Ve83 q8u2N3UQnDzVFhicEa9BOofBfe8gacZ0uDtsclADizPTV21yFx0Dn1q8wNB1QSIy6Nxa +Y3dyFrW9bFcaGZycerC9/2bT77VSCjEo302FEVUjkawqIB3L7bI4ebihIAEbVL36tvF K05g== 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; dmarc=fail (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 v25si13300292pfj.139.2019.01.21.12.13.45; Mon, 21 Jan 2019 12:14:02 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728258AbfAUULz (ORCPT + 99 others); Mon, 21 Jan 2019 15:11:55 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:35071 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727699AbfAUULz (ORCPT ); Mon, 21 Jan 2019 15:11:55 -0500 Received: by mail-ot1-f68.google.com with SMTP id 81so21660946otj.2; Mon, 21 Jan 2019 12:11:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=OX4oH04F9XnZ4XhGjG/Tb+3tcPifCjDXDkzAcZNGN30=; b=ETpDXtXRfhjdkSP93yFf7UIQApsr8PL8/TA5yzOCEIACYlhdKhd5cLNzUpRZHqqCfq l8yC2P7GGw32lkvKIpVNVeuzj7m0E7ONrCSTzVoujSg3qK2trqLjnQpTckx9S5KTbU4a f2Y0YH+7d0KTUvuZvuWf5vZ6ReQFj64IzwhM9J1/2tfHNroNauIXwJ5w/4zQXHCWa8Zx 3N8UC+8s5ozNFz2FQ++naMh8RUINLDmnceKQdp+HSUhc9hswyN7KKbfNeXXnB1sFVwV5 Z2GWrmGMb98oJgM9VFqrW1IjS3biWVpJ8MPm5IhNafM2H3z6wx78BhQtmvVpdbNtS1Ze 0VDw== X-Gm-Message-State: AJcUukefJuAGwsXRDqI4tYyN6UUdL62aNW7G0gf9TpBbOF7T6KMm4k12 2HUo9TpTePxkk14SrdREmg== X-Received: by 2002:a9d:6c3:: with SMTP id 61mr21786933otx.314.1548101514174; Mon, 21 Jan 2019 12:11:54 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id l5sm6185694oil.15.2019.01.21.12.11.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 12:11:53 -0800 (PST) Date: Mon, 21 Jan 2019 14:11:52 -0600 From: Rob Herring To: Ben Whitten Cc: linux-lpwan@lists.infradead.org, afaerber@suse.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mark Rutland Subject: Re: [PATCH lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation Message-ID: <20190121201152.GA2512@bogus> References: <20190108084132.10214-1-ben.whitten@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190108084132.10214-1-ben.whitten@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 08, 2019 at 05:41:29PM +0900, Ben Whitten wrote: > 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 > > 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 > + 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 it controlled over SPI. > + > +properties: > + compatible: > + items: > + - enum: > + - semtech,sx1301 > + - semtech,sx1308 > + > + reg: > + maxItems: 1 > + description: The chip select on the SPI bus. > + > + reset-gpios: > + maxItems: 1 > + description: A connection of the reset gpio line. > + > + 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. > + > + radio-spi: > + description: The concentrator has two radios connected which are contained > + within the following node. > + > + properties: > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + required: > + - '#address-cells' > + - '#size-cells' > + > +required: > + - compatible > + - reg > + - reset-gpios > + - radio-spi > + > +examples: > + - | One more comment. Make sure you "build" the schema with 'dt_binding_check' target. That builds the examples. It is also checked by a CI job and the status is added to patchwork[1]. (Though it didn't work correctly for this one and I just fixed it.) > + concentrator0: lora@0 { This example doesn't build because there's an expectation of the top level nodes being MMIO if there's a reg prop. You just need to wrap this in a parent node representing a spi controller: spi { #address-cells = <1>; #size-cells = <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>; > + }; > + }; > + }; [1] https://patchwork.ozlabs.org/patch/1021773/