Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1933014rdh; Sat, 25 Nov 2023 07:36:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWBLj/jnPikjlxvcIuhrkLP0NwMFHW9MrKvRZTKkloCa2Lfim/YFdMzitkq3lWiqMGwhgG X-Received: by 2002:a17:90b:4c4d:b0:280:280c:efe3 with SMTP id np13-20020a17090b4c4d00b00280280cefe3mr8223877pjb.14.1700926577588; Sat, 25 Nov 2023 07:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700926577; cv=none; d=google.com; s=arc-20160816; b=pgyfvxa2eGHCKohtdWimVab072a47ZvyV/Lh6TM0scBrQg5NX+vilfZ7TxOJ0e5zF+ 3lJRYYauYwaK0xHHzHVda+jQHQ0IqXEv5+pRm8xxTtQUXePUNEJiETvctzYf8VaS22+d xXDfIzSvumOdnVV1DoLsiu0J5XiBlxxrXZrU27VAxUDEbj6Q+QWH4hKpwE2w2ZzrwHnm 5ivKvUvZmSETDAUHQLPuBLOLrJrCbeqeLzkEsD3PBS1K5ihcaCuc8nrNOF/Gbgby7CJ1 7+tfA4uv1nNHNg+t8G6W/cnef2Aj2zSvmTmRwXwz6oyvlsaYWkywt1FrcbIuYo8LzApD Ne+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=pjEoeCzzMe5dTphxiiN6yitz0cy3Y5kZ0pYOc07UlI4=; fh=cSPHzLclwUu+BNr3nwb7m52nW8NItQ+T4jwH+fh7CFQ=; b=TYTpXxHyA0kOURi1aayxdTDgzNZ+XpaB0QKEDGezji57QDDmGEFlZR4azfCOPA4gkt 2qJL6WtEPrgZcrVj9LGSUqbIZhH9oTCnARw09L4bk0yEh05tZMCdq/yW+SWgAld+4Oqx 2FPks4cfT1OisSlm2QFmTffGBHuhWh3Cs7ebuc6HpO1TX3Zm8Mvl5lbIORfb0lCqMA8v aRUfkxXu4SJ4g4dvCQSm4J2N7uTxBw0r6JgrJSNgKkRNxdWc7SqazJnKBaYedMYCrlVl TawdeMxHBYNd4VqMKcUcOR5B9N4+8ikoYQH8mrFvd9fpnsVRuTQhtH4YG0JAEzR6hoJ0 zRXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YfDFye/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id q14-20020a170902dace00b001cfa718038esi3513300plx.388.2023.11.25.07.36.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 07:36:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YfDFye/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id D315E809AFE3; Sat, 25 Nov 2023 07:36:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232191AbjKYPfi (ORCPT + 99 others); Sat, 25 Nov 2023 10:35:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbjKYPfh (ORCPT ); Sat, 25 Nov 2023 10:35:37 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B36AA for ; Sat, 25 Nov 2023 07:35:43 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20148C433C7; Sat, 25 Nov 2023 15:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700926543; bh=9XcsX/rqDUE/4rKkKOqkuc0WCIhP5kbJTDOZF+yyUdA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YfDFye/96iTRHnHeNU8ERa87yaX1BE1X8OKGpDaGtpH/vBdMyetR3HhPJiYJ9w0cW shnam6A6V5JY2ryE5t//mOE2an0DiUVmc9JKrmgQcnUyjUwr0MfWMaRoffY4OSPTu1 IBhEgaplHK7KfIOEVUSUkrtFBoCRep02HN41QXwyrhBoyU5KTxHLwa+z5pkTjQQnPJ OUvSWD0mgsbZaU6laBOQO6eh636rsSPouTImiS0Z7Xgym2drr9qacRiebnyVKAeZVx BpoQrUR1P5Pd906CZkETmg1tY8CvquxV5OXIKqkEJZyKXjouyApjs20TRLCrkOvdHf y19Ket1nYSszg== Date: Sat, 25 Nov 2023 15:35:35 +0000 From: Jonathan Cameron To: Kim Seer Paller Cc: Lars-Peter Clausen , Michael Hennerich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Crt Mori , , , , Krzysztof Kozlowski Subject: Re: [PATCH v5 1/2] dt-bindings: iio: frequency: add admfm2000 Message-ID: <20231125153535.08045a2e@jic23-huawei> In-Reply-To: <20231124105116.5764-1-kimseer.paller@analog.com> References: <20231124105116.5764-1-kimseer.paller@analog.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 25 Nov 2023 07:36:01 -0800 (PST) On Fri, 24 Nov 2023 18:51:15 +0800 Kim Seer Paller wrote: > Dual microwave down converter module with input RF and LO frequency > ranges from 0.5 to 32 GHz and an output IF frequency range from 0.1 to > 8 GHz. It consists of a LNA, mixer, IF filter, DSA, and IF amplifier > for each down conversion path. > > Signed-off-by: Kim Seer Paller > Reviewed-by: Krzysztof Kozlowski Hi, Sorry I'm late to the party. Long term we might want to support cases where some of the pins are hard wired, but that can happen when someone comes along with such a board. Only thing I wonder is if the gpios could be moved under the child nodes as I think they only apply to specific channels? Would make the driver a little more complex but the binding cleaner. Thanks Krzysztof for all your reviews btw (in general, rather than just this!) Follow on comments inline... > diff --git a/Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml b/Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml > new file mode 100644 > index 000000000..037438737 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/frequency/adi,admfm2000.yaml > @@ -0,0 +1,154 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +# Copyright 2023 Analog Devices Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/frequency/adi,admfm2000.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ADMFM2000 Dual Microwave Down Converter > + > +maintainers: > + - Kim Seer Paller > + > +description: > + Dual microwave down converter module with input RF and LO frequency ranges > + from 0.5 to 32 GHz and an output IF frequency range from 0.1 to 8 GHz. > + It consists of a LNA, mixer, IF filter, DSA, and IF amplifier for each down > + conversion path. > + > +properties: > + compatible: > + enum: > + - adi,admfm2000 > + > + switch1-gpios: > + items: > + - description: B15 GPIO, when high (and B16 low) channel 1 is in > + Direct IF mode. > + - description: B16 GPIO, when high (and B15 low) channel 1 is in > + Mixer mode. > + > + switch2-gpios: > + items: > + - description: K14 GPIO, when high (and L14 low) channel 2 is in > + Mixer mode. > + - description: L14 GPIO, when high (and K14 low) channel 2 is in > + Direct IF mode. > + > + attenuation1-gpios: > + description: | > + Choice of attenuation: > + D15 D14 C16 C15 C14 I don't think there is a useful public data sheet, but normally I'd expect these to have friendly names rather than pin coords. chan0-att0, chan0-att1 or something like that. Hopefully with something like that we could combine the docs if we can push the GPIOs down into the child nodes. > + 1 1 1 1 1 0 dB > + 1 1 1 1 0 -1 dB > + 1 1 1 0 1 -2 dB > + 1 1 0 1 1 -4 dB > + 1 0 1 1 1 -8 dB > + 0 1 1 1 1 -16 dB > + 0 0 0 0 0 -31 dB > + > + items: > + - description: C14 GPIO > + - description: C15 GPIO > + - description: C16 GPIO > + - description: D14 GPIO > + - description: D15 GPIO > + > + attenuation2-gpios: > + description: | > + Choice of attenuation: > + M16 M15 M14 L16 L15 > + 1 1 1 1 1 0 dB > + 1 1 1 1 0 -1 dB > + 1 1 1 0 1 -2 dB > + 1 1 0 1 1 -4 dB > + 1 0 1 1 1 -8 dB > + 0 1 1 1 1 -16 dB > + 0 0 0 0 0 -31 dB > + > + items: > + - description: L15 GPIO > + - description: L16 GPIO > + - description: M14 GPIO > + - description: M15 GPIO > + - description: M16 GPIO > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > +patternProperties: > + "^channel@[0-1]$": > + type: object > + description: Represents a channel of the device. > + > + additionalProperties: false > + > + properties: > + reg: > + description: > + The channel number. > + minimum: 0 > + maximum: 1 > + > + adi,mode: > + description: > + RF path selected for the channel. > + 0 - Direct IF mode > + 1 - Mixer mode > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1] > + > + required: > + - reg > + - adi,mode > + > +required: > + - compatible > + - switch1-gpios > + - switch2-gpios > + - attenuation1-gpios > + - attenuation2-gpios