net: lora: Add documentation for SX130x and SX125x parts
Subsystems (3)
v3 cover net: lora: Add documentation for SX130x and SX125x parts
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
Signature · 1 line
2.17.1
PATCH v3 1/4 dt-bindings: lora: sx130x: add basic documentation
From: Ben Whitten <[email protected]>
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.
---
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
Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml new file +101 -0
@@ -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 <[email protected]> + - Ben Whitten <[email protected]> + +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>; + }; + }; + }; + };
Signature · 1 line
2.17.1
Re: [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation
Missed linux-lpwan
Quoted 134 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
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.yamlDocumentation/devicetree/bindings/net/lora/semtech,sx130x.yaml new file +101
-1@@ -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 <[email protected]> + - Ben Whitten <[email protected]> + +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
Re: [PATCH v3 lora-next 1/4] dt-bindings: lora: sx130x: add basic documentation
In reply to Ben WhittenQuoted 19 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
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
Quoted 4 lines
--- .../bindings/net/lora/semtech,sx130x.yaml | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml
PATCH v3 2/4 dt-bindings: lora: sx125x: add basic documentation
In reply to Ben WhittenFrom: Ben Whitten <[email protected]>
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.
---
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
Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml new file +44 -0
@@ -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 <[email protected]> + - Ben Whitten <[email protected]> + +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>; + }; + };
Signature · 1 line
2.17.1
Re: [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: add basic documentation
Missed linux-lpwan
Quoted 77 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
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.yamlDocumentation/devicetree/bindings/net/lora/semtech,sx125x.yaml new file +44
-1@@ -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 <[email protected]> + - Ben Whitten <[email protected]> + +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
Re: [PATCH v3 lora-next 2/4] dt-bindings: lora: sx125x: add basic documentation
In reply to Ben WhittenQuoted 19 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
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
Quoted 4 lines
--- .../bindings/net/lora/semtech,sx125x.yaml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml
PATCH v3 3/4 dt-bindings: lora: sx125x: add clock bindings
In reply to Ben WhittenFrom: Ben Whitten <[email protected]>
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.
---
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(+)
Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml +33 -0
@@ -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>; }; };
Signature · 1 line
2.17.1
Re: [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings
Missed linux-lpwan
Quoted 87 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
v2 -> v3:
* Name clock inputs and outputs
* AddFCLK_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(+)Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml +33
-1@@ -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
Re: [PATCH v3 lora-next 3/4] dt-bindings: lora: sx125x: add clock bindings
In reply to Ben WhittenQuoted 36 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
v2 -> v3:
* Name clock inputs and outputs
* AddFCLK_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(+)Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml +0
-0@@ -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.
Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml properties: · line 39
Quoted 10 lines
Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml +10
-0+ 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.
Quoted 41 lines
Documentation/devicetree/bindings/net/lora/semtech,sx125x.yaml +23
-1+ 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
PATCH v3 4/4 dt-bindings: lora: sx130x: add clock bindings
In reply to Ben WhittenFrom: Ben Whitten <[email protected]>
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.
---
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(-)
Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml +51 -1
@@ -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>; }; }; };
Signature · 1 line
2.17.1
Re: [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: add clock bindings
Missed linux-lpwan
Quoted 128 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
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(-)Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml +51
-2@@ -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
Re: [PATCH v3 lora-next 4/4] dt-bindings: lora: sx130x: add clock bindings
In reply to Ben WhittenQuoted 25 lines · Ben Whitten
From: Ben Whitten <[email protected]>
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 <[email protected]>---
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
Quoted 3 lines
--- .../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,
Missed linux-lpwan
Quoted 44 lines · Ben Whitten
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 Whittenv2 -> 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