* [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation
2019-01-24 14:53 [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
@ 2019-01-24 14:53 ` Ben Whitten
2019-01-24 15:03 ` Ben Whitten
2019-01-28 18:18 ` Rob Herring
2019-01-24 14:53 ` [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: " Ben Whitten
` (3 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 14:53 UTC (permalink / raw)
To: afaerber
Cc: davem, robh+dt, mark.rutland, netdev, devicetree, linux-kernel,
Ben Whitten
From: Ben Whitten <ben.whitten@gmail.com>
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 <ben.whitten@gmail.com>
---
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 <afaerber@suse.de>
+ - Ben Whitten <ben.whitten@gmail.com>
+
+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 <dt-bindings/gpio/gpio.h>
+
+ 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>;
+ };
+ };
+ };
+ };
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation
2019-01-24 14:53 ` [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation Ben Whitten
@ 2019-01-24 15:03 ` Ben Whitten
2019-01-28 18:18 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 15:03 UTC (permalink / raw)
To: Andreas Färber
Cc: David S. Miller, Rob Herring, Mark Rutland, netdev, devicetree,
linux-lpwan, LKML
Missed linux-lpwan
On Thu, 24 Jan 2019 at 14:53, Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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 <afaerber@suse.de>
> + - Ben Whitten <ben.whitten@gmail.com>
> +
> +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 <dt-bindings/gpio/gpio.h>
> +
> + 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>;
> + };
> + };
> + };
> + };
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation
2019-01-24 14:53 ` [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation Ben Whitten
2019-01-24 15:03 ` Ben Whitten
@ 2019-01-28 18:18 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2019-01-28 18:18 UTC (permalink / raw)
To: Ben Whitten
Cc: Andreas Färber, David Miller, Mark Rutland, netdev,
devicetree, linux-kernel, linux-lpwan
On Thu, Jan 24, 2019 at 8:53 AM Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: add basic documentation
2019-01-24 14:53 [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
2019-01-24 14:53 ` [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation Ben Whitten
@ 2019-01-24 14:53 ` Ben Whitten
2019-01-24 15:03 ` Ben Whitten
2019-01-28 18:18 ` Rob Herring
2019-01-24 14:53 ` [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings Ben Whitten
` (2 subsequent siblings)
4 siblings, 2 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 14:53 UTC (permalink / raw)
To: afaerber
Cc: davem, robh+dt, mark.rutland, netdev, devicetree, linux-kernel,
Ben Whitten
From: Ben Whitten <ben.whitten@gmail.com>
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 <ben.whitten@gmail.com>
---
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 <afaerber@suse.de>
+ - Ben Whitten <ben.whitten@gmail.com>
+
+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>;
+ };
+ };
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: add basic documentation
2019-01-24 14:53 ` [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: " Ben Whitten
@ 2019-01-24 15:03 ` Ben Whitten
2019-01-28 18:18 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 15:03 UTC (permalink / raw)
To: Andreas Färber
Cc: David S. Miller, Rob Herring, Mark Rutland, netdev, devicetree,
LKML, linux-lpwan
Missed linux-lpwan
On Thu, 24 Jan 2019 at 14:53, Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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 <afaerber@suse.de>
> + - Ben Whitten <ben.whitten@gmail.com>
> +
> +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>;
> + };
> + };
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: add basic documentation
2019-01-24 14:53 ` [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: " Ben Whitten
2019-01-24 15:03 ` Ben Whitten
@ 2019-01-28 18:18 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2019-01-28 18:18 UTC (permalink / raw)
To: Ben Whitten
Cc: Andreas Färber, David Miller, Mark Rutland, netdev,
devicetree, linux-kernel, linux-lpwan
On Thu, Jan 24, 2019 at 8:53 AM Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings
2019-01-24 14:53 [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
2019-01-24 14:53 ` [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation Ben Whitten
2019-01-24 14:53 ` [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: " Ben Whitten
@ 2019-01-24 14:53 ` Ben Whitten
2019-01-24 15:03 ` Ben Whitten
2019-01-28 18:21 ` Rob Herring
2019-01-24 14:53 ` [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: " Ben Whitten
2019-01-24 15:02 ` [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
4 siblings, 2 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 14:53 UTC (permalink / raw)
To: afaerber
Cc: davem, robh+dt, mark.rutland, netdev, devicetree, linux-kernel,
Ben Whitten
From: Ben Whitten <ben.whitten@gmail.com>
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 <ben.whitten@gmail.com>
---
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>;
};
};
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings
2019-01-24 14:53 ` [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings Ben Whitten
@ 2019-01-24 15:03 ` Ben Whitten
2019-01-28 18:21 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 15:03 UTC (permalink / raw)
To: Andreas Färber
Cc: David S. Miller, Rob Herring, Mark Rutland, netdev, devicetree,
LKML, linux-lpwan
Missed linux-lpwan
On Thu, 24 Jan 2019 at 14:53, Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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>;
> };
> };
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings
2019-01-24 14:53 ` [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings Ben Whitten
2019-01-24 15:03 ` Ben Whitten
@ 2019-01-28 18:21 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2019-01-28 18:21 UTC (permalink / raw)
To: Ben Whitten
Cc: Andreas Färber, David Miller, Mark Rutland, netdev,
devicetree, linux-kernel, linux-lpwan
On Thu, Jan 24, 2019 at 8:54 AM Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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
The example has a single clock. Is that valid? If so, then you need to
add minItems and maxItems.
> + 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>;
> };
> };
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: add clock bindings
2019-01-24 14:53 [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
` (2 preceding siblings ...)
2019-01-24 14:53 ` [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings Ben Whitten
@ 2019-01-24 14:53 ` Ben Whitten
2019-01-24 15:04 ` Ben Whitten
2019-01-28 18:23 ` Rob Herring
2019-01-24 15:02 ` [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
4 siblings, 2 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 14:53 UTC (permalink / raw)
To: afaerber
Cc: davem, robh+dt, mark.rutland, netdev, devicetree, linux-kernel,
Ben Whitten
From: Ben Whitten <ben.whitten@gmail.com>
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 <ben.whitten@gmail.com>
---
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 <dt-bindings/gpio/gpio.h>
+ 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>;
};
};
};
--
2.17.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: add clock bindings
2019-01-24 14:53 ` [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: " Ben Whitten
@ 2019-01-24 15:04 ` Ben Whitten
2019-01-28 18:23 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 15:04 UTC (permalink / raw)
To: Andreas Färber
Cc: David S. Miller, Rob Herring, Mark Rutland, netdev, devicetree,
LKML, linux-lpwan
Missed linux-lpwan
On Thu, 24 Jan 2019 at 14:53, Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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 <dt-bindings/gpio/gpio.h>
>
> + 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>;
> };
> };
> };
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: add clock bindings
2019-01-24 14:53 ` [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: " Ben Whitten
2019-01-24 15:04 ` Ben Whitten
@ 2019-01-28 18:23 ` Rob Herring
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2019-01-28 18:23 UTC (permalink / raw)
To: Ben Whitten
Cc: Andreas Färber, David Miller, Mark Rutland, netdev,
devicetree, linux-kernel, linux-lpwan
On Thu, Jan 24, 2019 at 8:54 AM Ben Whitten <ben.whitten@gmail.com> wrote:
>
> From: Ben Whitten <ben.whitten@gmail.com>
>
> 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 <ben.whitten@gmail.com>
> ---
> 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(-)
Other than the issue on patch 3 that affects the example here,
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts
2019-01-24 14:53 [PATCH v3 lora-next 0/4] net: lora: Add documentation for SX130x and SX125x parts Ben Whitten
` (3 preceding siblings ...)
2019-01-24 14:53 ` [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: " Ben Whitten
@ 2019-01-24 15:02 ` Ben Whitten
4 siblings, 0 replies; 14+ messages in thread
From: Ben Whitten @ 2019-01-24 15:02 UTC (permalink / raw)
To: Andreas Färber
Cc: David S. Miller, Rob Herring, Mark Rutland, netdev, devicetree,
LKML, Ben Whitten, linux-lpwan
Missed linux-lpwan
On Thu, 24 Jan 2019 at 14:53, Ben Whitten <ben.whitten@gmail.com> wrote:
>
> Hello,
>
> This series adds documentation for the SX130x and SX125x chips.
> We are using the yaml binding format and this series builds with
> 'make dt_binding_check'.
>
> This series is split such that the basic documentation can be taken
> without clock components, as there is an ongoing problem running clk
> over spi backed regmaps on certain spi controller drivers [1]
>
> Thanks,
> Ben Whitten
>
> v2 -> v3
> * Added the clock input and output names
> * Limited the radio-spi node children names to radio@
> * Fixed fallback compatible for SX1308 -> SX1301
> 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
>
> [1] http://lists.infradead.org/pipermail/linux-lpwan/2018-December/000063.html
>
>
> Ben Whitten (4):
> dt-bindings: lora: sx130x: add basic documentation
> dt-bindings: lora: sx125x: add basic documentation
> dt-bindings: lora: sx125x: add clock bindings
> dt-bindings: lora: sx130x: add clock bindings
>
> .../bindings/net/lora/semtech,sx125x.yaml | 77 +++++++++
> .../bindings/net/lora/semtech,sx130x.yaml | 151 ++++++++++++++++++
> 2 files changed, 228 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml
> create mode 100644 Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 14+ messages in thread