Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3757507imu; Mon, 28 Jan 2019 10:14:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN72ikDVmz0vfqSZBVVFsnJd1lCv4+I8lSZQm8L0KCB1jpiRNP+fzRuJv/rnvlhOp9IZRieR X-Received: by 2002:a63:4f20:: with SMTP id d32mr20641355pgb.47.1548699276472; Mon, 28 Jan 2019 10:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548699276; cv=none; d=google.com; s=arc-20160816; b=huMz0N66rHbx8NhixQ1zIuAS302fUDIQWP3KLq/rGgfuuzISRrdmaq2BX3cEFbHaKL DfnOcPusXbBOXaBoOgb+jeD+S5g6X+lvk4V4daDyE1pq3vQ3UIE0rtIzwNJy/G69QGaH 3ex3vdnHIZ3IT1VyW7p0dI+gotJBq653mXGE+Ll1ltUUbnfqVU5iHpKdE6Jh7GWRGVAz KwroixP9Lk0A9JYE16WFZ2jankMfHuIZOyPX/Phj6FhCkyfOnqWlQsruUHjT42E0g368 L833aNE2XKwtIkhwtcpt9VRqyI1JLH0vhr1N6oCNMeKBBvZsC/iu01ORvGZnZLmBAQzn uONw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vTX/dzgBFqzeI7ohB6/VAdPCl2zZdkDwCgRKsQqeYxo=; b=Jzy0csG2xa6zUgUM9+I6gkRh3+r0rhpurkP4CF4CZIUD92afXY4n/B8oOJjNtbT05Z kack5zkaqmxegEVjNzEafHTYZZ0uLqif3oT6rV2tjZOuARowlXUwIwlbyejTufvAcojH NoXMWaxbwmje67TY5WWqAHhJPrIA1gdMZSvtDxRkHA1XfUvesGfkxaW8rh9A9gIjDknZ PGfMm7K5NIhqDwssiT9acyuoYqWANlN+W3xDrR62Wc5sq6l0KCW1bvW8U03vXQfXq11d J+9Hi2zvCwvp2+yciGzNJQr5VCp43QcQacCVy7WxDfurgDxoJWNb47T3A91i1cyfymHL DOUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wzouWLBs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si31932764pgm.532.2019.01.28.10.14.21; Mon, 28 Jan 2019 10:14:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wzouWLBs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727348AbfA1SNx (ORCPT + 99 others); Mon, 28 Jan 2019 13:13:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:54566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726754AbfA1SNx (ORCPT ); Mon, 28 Jan 2019 13:13:53 -0500 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DDC921783; Mon, 28 Jan 2019 18:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548699232; bh=r3WcQFCHfzKs37FlboXO9ubyFsttI/Hacgh7vRE9IWw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wzouWLBsUhqlCcWjqTYmd2pYj52SrP57zZG5hLF9DF0vDdW4lb9Rii407DxHdoZrU XMWV1igu6U1dNuV4+le9DcQpY40W2VKDU92AhrNjBBlFlc4yXD9xkdVK8HN4dLi5OE /3a+BC58HABxUdcQN/jg1e/epsfCzT7bmG60kzS4= Received: by mail-qk1-f175.google.com with SMTP id z18so9927639qkj.10; Mon, 28 Jan 2019 10:13:52 -0800 (PST) X-Gm-Message-State: AJcUukd7UERhJUGEeVuEe0QVdjWJzlTPkNoqrg7MBo2PcrcwlTpoJK5p uRJ7NR5rVZBXFrkTGrsNmCZLFTbR8WCn0wwrsw== X-Received: by 2002:a37:5686:: with SMTP id k128mr19289483qkb.29.1548699231175; Mon, 28 Jan 2019 10:13:51 -0800 (PST) MIME-Version: 1.0 References: <20190128161306.27805-1-ben.whitten@lairdtech.com> <20190128161306.27805-2-ben.whitten@lairdtech.com> In-Reply-To: <20190128161306.27805-2-ben.whitten@lairdtech.com> From: Rob Herring Date: Mon, 28 Jan 2019 12:13:39 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH lora-next 01/11] dt-bindings: net: lora: sx130x: add power lut binding To: Ben Whitten Cc: =?UTF-8?Q?Andreas_F=C3=A4rber?= , linux-lpwan@lists.infradead.org, "David S. Miller" , Mark Rutland , netdev , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 28, 2019 at 10:13 AM Ben Whitten wrote: > > From: Ben Whitten > > 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 > --- > .../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