From patchwork Thu Jan 24 14:53:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Whitten X-Patchwork-Id: 1030504 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SglbaEct"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43llY94rlbz9s4s for ; Fri, 25 Jan 2019 01:54:21 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbfAXOyB (ORCPT ); Thu, 24 Jan 2019 09:54:01 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36476 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728366AbfAXOx6 (ORCPT ); Thu, 24 Jan 2019 09:53:58 -0500 Received: by mail-wr1-f65.google.com with SMTP id u4so6810205wrp.3; Thu, 24 Jan 2019 06:53:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zndVnj3d64tbcPJgxyTchcrUoiXidx1kg7GR71aJ6DM=; b=SglbaEctxpIdlndix2TOUQ4nZziNklAn14c19B62H3pzftrFsSVSrqXfy8IWek8g1f nXwvajI9LLaoWGSR7ZnFayYa+cn5389kv+e+ug9s5ezO59MPjmP5vxm0KjuOmDdZ7FsI q3JVP03uyPSsIjHbpo+pTzzNU8eOdNxkOzFg4AslQSOR0uhJo17oCgOQ1vFhQMvEXu4L KFFMt4D6ab3ytX4W258VRCbSJywmiRwv55SAPjGp7RUYh/KLYPiwFXbsBffpf+NIeDiI /Px661pajKZPnOzIAQ18ttPYMhTGnN0FpWScE6LJ8YrOMM/JJcpT24S78yNtDyT/oGRM 9p8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zndVnj3d64tbcPJgxyTchcrUoiXidx1kg7GR71aJ6DM=; b=iXG/3W3NAJQ44zkD2oLFKSKRNWVh4TTBM67TzV96862v0wg1QbG09TZ6v2SjK8f/wt 5sIIMSVd2LPS2CwOo0G4fewQjWbb17LxppeDbTYyAU8IIz3huaVCO8kvi3EVzZ2Gp2+p smZuc8SGLT4LWRAx9JimJeFrkvuA3anPcYDRPsROkPeBwrd/GtYKCyPeGjVzGbqw0YIE +/rF0H73s7eBZNMIOwb0vV4EmI+KrB7Jh0PhoSpVi2UWiF8tm3hsyhVfW/Kcd8C7atCo oAOiIfNr/HV71whmT3PzN4Hs1a4z26Ic+OUHm7jVhCya1x/P851E+OHlfUwscp6v2WxP eNMQ== X-Gm-Message-State: AJcUukdoytSXbMPBRdP3rGOQy458PbTn8/pOeHniRKOKmeEgcW6OlT/p 0MQOwFk7eHSozVUmzHqzFCw= X-Google-Smtp-Source: ALg8bN4ZMw7gLute/kBYHOjBqOqElXmxn4fXhaOOHciSAStijYNVX/xGD2awJ7M6GYLgsFJT9t9NQQ== X-Received: by 2002:adf:b608:: with SMTP id f8mr7353432wre.120.1548341636050; Thu, 24 Jan 2019 06:53:56 -0800 (PST) Received: from Sarah.corp.lairdtech.com ([109.174.151.67]) by smtp.gmail.com with ESMTPSA id t63sm53611538wmt.8.2019.01.24.06.53.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 06:53:55 -0800 (PST) From: Ben Whitten X-Google-Original-From: Ben Whitten To: afaerber@suse.de Cc: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Whitten Subject: [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation Date: Thu, 24 Jan 2019 14:53:06 +0000 Message-Id: <20190124145309.21698-2-ben.whitten@lairdtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190124145309.21698-1-ben.whitten@lairdtech.com> References: <20190124145309.21698-1-ben.whitten@lairdtech.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Reviewed-by: Rob Herring --- v2 -> v3: * Corrected fallback notation * Limited radio node names from anything to 'radio@' 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 | 101 ++++++++++++++++++ 1 file changed, 101 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..24fad1218735 --- /dev/null +++ b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml @@ -0,0 +1,101 @@ +# 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: + oneOf: + - items: + - enum: + - semtech,sx1308 + - const: semtech,sx1301 + - items: + - const: 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 are + contained within the following node. + + properties: + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + patternProperties: + "^radio@[0-1]$": + type: object + properties: + reg: + maxItems: 1 + minimum: 0 + maximum: 1 + 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: radio@0 { + compatible = "semtech,sx1257"; + reg = <0>; + }; + + radio1: radio@1 { + compatible = "semtech,sx1257"; + reg = <1>; + }; + }; + }; + }; From patchwork Thu Jan 24 14:53:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Whitten X-Patchwork-Id: 1030506 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AVgEbL4H"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43llYK5rCWz9s9G for ; Fri, 25 Jan 2019 01:54:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728554AbfAXOyY (ORCPT ); Thu, 24 Jan 2019 09:54:24 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:38253 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728167AbfAXOx7 (ORCPT ); Thu, 24 Jan 2019 09:53:59 -0500 Received: by mail-wm1-f68.google.com with SMTP id m22so3372881wml.3; Thu, 24 Jan 2019 06:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WwWzOwpYDI3JAoktqCzhSVWsOiE+dgnPjG4gSEHDnlM=; b=AVgEbL4HudSrvLd8w7B0feN9vYMKLT3WVfmL9Qs15wTL8tnDFhWEUq7YMvwtgInSQz rSCmvE6uk+yqnBY4AOcAs5M0TYZPb1CcHXYaU/P6z0BLq2r8dBzAvCplGRMtcDqpUQU5 ecvftpyLzds/DO4JIRUFOc3KJ2VJErZOzUBoAJgIsymelT5rqhv9qetSj+abu67qloEV 0CShl9GwnJ2aSpVXzs6OpdXXLjCQPwn5/XV52C3jH6L4DuwBDkZTphqbCErg68HBxf46 RO+wB3ZOdnTrje6wIOMW7bLv1ytKLxrKi945MqM2n1J3dz0xyqpaW7PIGXxFgBfqmRXd Onfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=WwWzOwpYDI3JAoktqCzhSVWsOiE+dgnPjG4gSEHDnlM=; b=cNaiCq7JXhHwra1IOMBt+Ng1LKsWo5ExK+s4JOIxwqa4MSvFw6Q7gS0JfyPta4GeAV xAHC+GBtxVMMA8no5xcx6DyNKpvRRZsdYec2pzimwzEvDTf8ULqMeguEy9SmapCgmbFD gBLpbj0Gw0XABcSTVScAqvJfdwGk8w8vZ5pbaLWa5kKMGEFB9BQ5Bm26iRm6Ld76P0mH sNKpsDXHvXvdybwuNtmOerjWIHu2buWksid6UKLQmYXTYJOSmnWcGO5w1PIncHDSzahI KwRQHFmr79zhQJnzS/H72UUVBAjf/KZ+3Piaqvaej/T5UJeHbD0oWrA7CG39j1UFJzCZ BKzg== X-Gm-Message-State: AJcUukdV/hEV4Fj1v4ABLbkv10KjZDF+aIBlsc3Av7ZXnRHIVj2dB574 pMj4mWmplAdsbUlace4hYTc= X-Google-Smtp-Source: ALg8bN5/AW8PIjzqtJwaOqu6D/Ey60Qg+pJNzciSXwJGZT5lFz9yDoCXKUkviL2FeaQxKlNpuAe6OQ== X-Received: by 2002:a7b:c76b:: with SMTP id x11mr2931572wmk.37.1548341637372; Thu, 24 Jan 2019 06:53:57 -0800 (PST) Received: from Sarah.corp.lairdtech.com ([109.174.151.67]) by smtp.gmail.com with ESMTPSA id t63sm53611538wmt.8.2019.01.24.06.53.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 06:53:56 -0800 (PST) From: Ben Whitten X-Google-Original-From: Ben Whitten To: afaerber@suse.de Cc: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Whitten Subject: [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: add basic documentation Date: Thu, 24 Jan 2019 14:53:07 +0000 Message-Id: <20190124145309.21698-3-ben.whitten@lairdtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190124145309.21698-1-ben.whitten@lairdtech.com> References: <20190124145309.21698-1-ben.whitten@lairdtech.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ben Whitten The SX125x family are IQ radio transceivers from Semtech configured over SPI, they are typically connected to an SX130x series concentrator however may be connected to a host directly. Required properties include the radio number of the host or concentrator bus. Signed-off-by: Ben Whitten Reviewed-by: Rob Herring --- v2 -> v3: * Renamed example node name to be consistent with concentrator v1 -> v2: * Dropped spi-max-frequency binding * Wording changes to commit and descriptions * Added spi wrapper suggested by Rob H * Dual licence --- .../bindings/net/lora/semtech,sx125x.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml diff --git a/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml b/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml new file mode 100644 index 000000000000..fe2d2a23c28b --- /dev/null +++ b/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/lora/semtech,sx125x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Semtech IQ modulator/de-modulator transeiver + +maintainers: + - Andreas Färber + - Ben Whitten + +description: | + The SX125x family are transceivers capable of supporting multiple constant + and non-constant envelope modulation schemes. + +properties: + compatible: + items: + - enum: + - semtech,sx1255 + - semtech,sx1257 + - semtech,sx1258 + + reg: + maxItems: 1 + description: The chip select on the SPI bus or radio number in concentrator + , with radio A = 0 and radio B = 1. + +required: + - compatible + - reg + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + radio0: radio@0 { + compatible = "semtech,sx1257"; + reg = <0>; + }; + }; From patchwork Thu Jan 24 14:53:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Whitten X-Patchwork-Id: 1030500 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sFDqun13"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43llXr407rz9s4s for ; Fri, 25 Jan 2019 01:54:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728500AbfAXOyC (ORCPT ); Thu, 24 Jan 2019 09:54:02 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36480 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728378AbfAXOyB (ORCPT ); Thu, 24 Jan 2019 09:54:01 -0500 Received: by mail-wr1-f65.google.com with SMTP id u4so6810358wrp.3; Thu, 24 Jan 2019 06:53:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=NOFMpVcXHy+sVbkvQS5EEr4KI99ndjmL+sfcPLZ3kSI=; b=sFDqun13+x84hunpUYZxJXC9iviUuG2XXLafgGyCr268Dc8Jb5F22hqAcYHkUkS7PC B79glBOVb6H+wxj0Cx7dtRYScqOgl/yEmue/73oJkbNS+fytCwiVfxZfMPRaRJwk6P14 s5BnYC9BhOL5+XlVBq7QM7RcazTehS1bakX09LQgwxrJzry7Y1LVM7J6HfjyJH8QFK32 RBWZjL494yaRPW79Zy02o20ZKEDROMF8ntp+RfCIBdrLXcPQ4xgx6/KYsa0L0a0hdD1U yVEBNEx2n4XqoT6mz1ih11NZ3u7Jx0dSKrzcGyEG9QjFK+kBX2OcKUzYCHfxwv2ucAb6 +aGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=NOFMpVcXHy+sVbkvQS5EEr4KI99ndjmL+sfcPLZ3kSI=; b=TWA2iF8RJBxDgih4DLisiwrKCW0Hgetm5EQmpendcMCKVQQt57APdINiarkVJ26h4z GSID20r+z1H4U8UGOXVyOMed5+mc2rr59YbTgKNs59tBrPJWJyZLKW40Y4FBPi/9f8fE +Np/xJB3H+3q3fS0yIq8rTl2Em7Tiy8eneJRByYi+SnZSpl2P+0Qb2K6eO4iNLT9+3tI Qs5dfGVLnEPyGvWvFj6/j7WWh63k2i2U2zwIOLsTPUlaGpFZRHLzJHl4e/xN0sMix3gG w6h7SxyBTHOs33p67fZEu/9PRHy/U4qh4SnU4xnqzvZSrt+W+25z5PoXQjjDbAP8puUS 5S0A== X-Gm-Message-State: AJcUukeqFQOofAsjuIgBAK4lp8TymSE+GFOVUTOHDtbqMfZSmk9ffYUM Dp7dJ64yN8ikpVRJzbY4Ja4= X-Google-Smtp-Source: ALg8bN7joMFG22DYGsZpiw+iXL00K8ZTUdQzPZbG1EODrxRgoqMO7fRC1ydePZPcLmHVl+61qPDVaA== X-Received: by 2002:adf:c711:: with SMTP id k17mr7299693wrg.197.1548341638677; Thu, 24 Jan 2019 06:53:58 -0800 (PST) Received: from Sarah.corp.lairdtech.com ([109.174.151.67]) by smtp.gmail.com with ESMTPSA id t63sm53611538wmt.8.2019.01.24.06.53.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 06:53:58 -0800 (PST) From: Ben Whitten X-Google-Original-From: Ben Whitten To: afaerber@suse.de Cc: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Whitten Subject: [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings Date: Thu, 24 Jan 2019 14:53:08 +0000 Message-Id: <20190124145309.21698-4-ben.whitten@lairdtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190124145309.21698-1-ben.whitten@lairdtech.com> References: <20190124145309.21698-1-ben.whitten@lairdtech.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ben Whitten The SX125x consumes a clock (FXOSC) ranging from 32 to 36 MHz as its main XTAL. It may also consume a clock for the TX synthesizer or DAC input clock (FCLK_IN). If the radio is coupled with an SX130x the radio is therefor operating in master mode and it may also provide a gated version of FXOSC clock for the concentrator. In this case the concentrator is expecting a 32 MHz input clock. In the example we connect fxosc to the "txco" clock source, represented by a fixed clock. The radio also provides a clock output "fclk_out" for consumption by the SX130x concentrator. Signed-off-by: Ben Whitten --- v2 -> v3: * Name clock inputs and outputs * Add FCLK_IN v1 -> v2: * Fixed incorrect usage of clock cells * Fixed wording in commit and descriptions * Dropped enforced clock names --- .../bindings/net/lora/semtech,sx125x.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml b/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml index fe2d2a23c28b..be45bcfd97be 100644 --- a/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml +++ b/Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml @@ -27,12 +27,41 @@ properties: description: The chip select on the SPI bus or radio number in concentrator , with radio A = 0 and radio B = 1. + clocks: + maxItems: 2 + description: Input clock (FXOSC) provider with output ranging from 32 MHz + to 36 MHz. TX synthesizer or DAC input clock (FCLK_IN) provider with + output ranging from 32 MHz to 36 MHz. + + clock-names: + items: + - const: fxosc + - const: fclk_in + description: Input clock (FXOSC), TX synthesizer or DAC input clock + (FCLK_IN) + + clock-output-names: + items: + - const: fclk_out + description: Output clock (FCLK_OUT) name, clock is gated version of the + input (FXOSC). Used in master mode operation. + + '#clock-cells': + const: 0 + required: - compatible - reg examples: - | + tcxo: dummy32m { + compatible = "fixed-clock"; + clock-frequency = <32000000>; + clock-output-names = "tcxo"; + #clock-cells = <0>; + }; + spi { #address-cells = <1>; #size-cells = <0>; @@ -40,5 +69,9 @@ examples: radio0: radio@0 { compatible = "semtech,sx1257"; reg = <0>; + clocks = <&tcxo>; + clock-names = "fxosc"; + clock-output-names = "fclk_out"; + #clock-cells = <0>; }; }; From patchwork Thu Jan 24 14:53:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Whitten X-Patchwork-Id: 1030501 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GThPR1FI"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43llY31nc1z9s9h for ; Fri, 25 Jan 2019 01:54:15 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728531AbfAXOyK (ORCPT ); Thu, 24 Jan 2019 09:54:10 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42146 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728478AbfAXOyC (ORCPT ); Thu, 24 Jan 2019 09:54:02 -0500 Received: by mail-wr1-f65.google.com with SMTP id q18so6770445wrx.9; Thu, 24 Jan 2019 06:54:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ABhmPGY5R9WbQZCOUg69Ep9sFOrMbW9Yd/Mou2MNP2s=; b=GThPR1FIQqveqWJUA09vyVo1B40TKnWDJelc1X15jkIVgXIXE1gJKEaHSmTf68n2EX bgBPbwDMA0tBtqSKMi/Vkj9rnqUkMxp+Fcqe/UtxHWe6yoEYQ8T2fjSCYB+GfIRYhc24 /yqXBbjUgmue26ow1603+qeO74riAu7WgP/5g4KhPPqXSP0/KXGslix83Zdx+X4GBHda aP7jNWcENLRC2soof3WAc8Q9vy3o1RSjKb02OfYzGBWiuF4DtfR20+ONRCHrz963HeEO RjKVeUQs8HyJv/ymjcZh4hnDYT23fOcDClXJYDGPxm+zCyKdk5OXBen/O7LVxwmKMT25 Is/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=ABhmPGY5R9WbQZCOUg69Ep9sFOrMbW9Yd/Mou2MNP2s=; b=cXmUO0WYZrYOuqnkZGm1doK0wlolEkZbQ12WD1Zxh+9anI1O3NxRjUMb+Xn24FTi9P ipyx8PweeUvttrY3sM3TKWx2fQv978MpbZ4Cdf/Sofidcgadxx/WJAQ2dBViQGv1Udi3 ydFkwKME71I9AYxb7CWCjS7UZw/3p1n5mBo49qoFOYsTM3PDHTi21hY2i+0Uzx/DX7RH Fj/5cU9D5U4l/Jvvf0yOb2tkwWg7N0baW7uIqoeg2WGcFne9CmGEU9EYbo4gXkkWh41Z HlmWx30/Y2laHfwibj38UGPV6+YmYVOYqMa1T4MXYFZ6DQ12UwOLRZ4m6t8tJQBqU/rw ziQA== X-Gm-Message-State: AJcUukdhO2RpVo2YUuCK4VMg3EgDg2jGgeBGds8Kp9n6lJJbfFXZ1T+x BDpfzY0C6Rh125zzA4UYKV0= X-Google-Smtp-Source: ALg8bN6K6h+qj5o+iMFg2vxQiMTVEdQV+aewZtWYZrXHZ4P+Eu7lcACvhc1UDvCcudihdtYKLG/jvw== X-Received: by 2002:adf:8323:: with SMTP id 32mr7250223wrd.176.1548341640105; Thu, 24 Jan 2019 06:54:00 -0800 (PST) Received: from Sarah.corp.lairdtech.com ([109.174.151.67]) by smtp.gmail.com with ESMTPSA id t63sm53611538wmt.8.2019.01.24.06.53.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 06:53:59 -0800 (PST) From: Ben Whitten X-Google-Original-From: Ben Whitten To: afaerber@suse.de Cc: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Whitten Subject: [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: add clock bindings Date: Thu, 24 Jan 2019 14:53:09 +0000 Message-Id: <20190124145309.21698-5-ben.whitten@lairdtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190124145309.21698-1-ben.whitten@lairdtech.com> References: <20190124145309.21698-1-ben.whitten@lairdtech.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ben Whitten The SX130x family consumes two clocks, a 32 MHz clock provided by a connected IQ transceiver, and a 133 MHz high speed clock. It also provides a 32 MHz clock out to the radio in the TX path. In the example we connect the concentrator to a fixed clock providing the 133 MHz high speed clock, and we connect to a connected transceiver 32 MHz clock. A radio in the TX path is also connected to the 32 MHz clock out from the concentrator. The connected radios are both fed from a fixed 32 MHz clock, with only one being the clock source back to the SX130x concentrator. Signed-off-by: Ben Whitten Reviewed-by: Rob Herring --- v2 -> v3: * Name input clocks specifically * Add output clock for radio in TX path v1 -> v2: * Fixed incorrect usage of clock cells * Fixed wording in commit and descriptions --- .../bindings/net/lora/semtech,sx130x.yaml | 52 ++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml index 24fad1218735..5d32668d6ca9 100644 --- a/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml +++ b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml @@ -15,7 +15,9 @@ description: | demodulating LoRa signals on 8 channels simultaneously. It is typically paired with two SX125x IQ radios controlled over an - SPI directly from the concentrator. + SPI directly from the concentrator. One of the radios will provide + a 32 MHz clock back into the concentrator. + The concentrator also outputs a 32 MHz clock to the radio(s) in the TX chain. The concentrator itself is controlled over SPI. @@ -37,6 +39,30 @@ properties: maxItems: 1 description: A connection of the reset gpio line. + clocks: + maxItems: 2 + items: + - description: 32 MHz clock provider (CLK32M) + - description: 133 MHz high speed clock provider (CLKHS) + description: The chip requires two clock inputs; A 32MHz clock at CMOS + level which is provided from a connected radio. + And a 133MHz high speed clock at CMOS level provided by an oscillator. + + clock-names: + items: + - const: clk32m + - const: clkhs + description: Input clock (CLK32M) name from provider, Input clock (CLKHS) + name from provider. + + clock-output-names: + items: + - const: sp_clk_out + description: Output clock (SP_CLK_OUT) typically connected to the TX radio. + + '#clock-cells': + const: 0 + radio-spi: type: object description: The concentrator can have two radios connected which are @@ -73,6 +99,20 @@ examples: #include + tcxo: dummy32m { + compatible = "fixed-clock"; + clock-frequency = <32000000>; + clock-output-names = "tcxo"; + #clock-cells = <0>; + }; + + clkhs: dummy133m { + compatible = "fixed-clock"; + clock-frequency = <133000000>; + clock-output-names = "clkhs"; + #clock-cells = <0>; + }; + spi { #address-cells = <1>; #size-cells = <0>; @@ -82,6 +122,10 @@ examples: reg = <0>; reset-gpios = <&pioB 27 GPIO_ACTIVE_HIGH>; spi-max-frequency = <8000000>; + clocks = <&radio1>, <&clkhs>; + clock-names = "clk32m", "clkhs"; + clock-output-names = "sp_clk_out"; + #clock-cells = <0>; radio-spi { #address-cells = <1>; @@ -90,11 +134,17 @@ examples: radio0: radio@0 { compatible = "semtech,sx1257"; reg = <0>; + clocks = <&tcxo>, <&concentrator0>; + clock-names = "fxosc", "fclk_in"; }; radio1: radio@1 { compatible = "semtech,sx1257"; reg = <1>; + clocks = <&tcxo>; + clock-names = "fxosc"; + clock-output-names = "fclk_out"; + #clock-cells = <0>; }; }; };