Re: [PATCH lora-next 01/11] dt-bindings: net: lora: sx130x: add power lut binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 28, 2019 at 10:13 AM Ben Whitten <ben.whitten@xxxxxxxxx> wrote:
>
> From: Ben Whitten <ben.whitten@xxxxxxxxx>
>
> Adding power lookup table for the concentrator specified in DT.
>
> These values are calibrated for the hardware and are unique to hardware
> designs and certifications.
>
> First byte is signed power in dBm measured at the rf connector.
> Second byte is unsigned value for DIGITAL gain.
> Third byte is unsigned value for PA gain, 2 bits only.
> Fourth byte is unsigned value for DAC gain, 2 bits only.
> Fifth byte is unsigned value for MIXER gain, 4 bits only.
>
> Signed-off-by: Ben Whitten <ben.whitten@xxxxxxxxx>
> ---
>  .../bindings/net/lora/semtech,sx130x.yaml           | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml
> index 24fad1218735..187fa2090a0b 100644
> --- a/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml
> +++ b/Documentation/devicetree/bindings/net/lora/semtech,sx130x.yaml
> @@ -37,6 +37,15 @@ properties:
>      maxItems: 1
>      description: A connection of the reset gpio line.
>
> +  power-lut:
> +    description: Power lookup table for the concentrator.
> +      Consisting of maximum 16 entries, each entry having the following format;
> +      First byte is signed power in dBm measured at the rf connector.
> +      Second byte is unsigned value for DIGITAL gain.
> +      Third byte is unsigned value for PA gain, 2 bits only.
> +      Fourth byte is unsigned value for DAC gain, 2 bits only.
> +      Fifth byte is unsigned value for MIXER gain, 4 bits only.

Would you expect this to be a common lora property? If not it should
have a vendor prefix.

Either way, non-standard properties need to reference a type. That
would be 'uint8-matrix' in this case. See the '$ref' in the examples.
Though, I guess I need to add a signed type.

We can write all the free form text above as a schema:

minItems: 1
maxItems: 16
items:
  items:
    - description: ...
      range??
    - description: ...
      range??
    - description: ...
      maximum: 3
    - description: ...
      maximum: 3
    - description: ...
      maximum: 15

> +
>    radio-spi:
>      type: object
>      description: The concentrator can have two radios connected which are
> @@ -83,6 +92,10 @@ examples:
>          reset-gpios = <&pioB 27 GPIO_ACTIVE_HIGH>;
>          spi-max-frequency = <8000000>;
>
> +       power-lut =   [ 00 00 00 03 09
> +                       03 00 00 03 0C
> +                       04 00 00 03 0D ];

You may need to write this with '/bits/ 8' syntax so you can bracket
each 5 byte entry. I don't think we can do that with [] notation.

Rob



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux