From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 333ACC433E2 for ; Mon, 13 Jul 2020 19:30:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0685C20663 for ; Mon, 13 Jul 2020 19:30:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MQHpgkzh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0685C20663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bhlyLjekUvKFHTN9mwn77s+TGQ53n9i3lsaDrkzRxpo=; b=MQHpgkzhViyC1/SfCyGcXO1F2 q1c6bIxknJr2w6yklNiKARx869zfuhOJsfuKp/oy+M8NMp3nG61Y2y0/gQY2FVdIquhzk9ihULSKK E61sZFBXh9KZVfBLEmQU70ttuQ0oChnuw3OmBr1Mt5KaLUEteHz+kZVlp3gBSOMGmKugW0qDXDzsf WR0qUvDgc0i6GR8Jrj2A1Bsa/FJpKxBTnLluFphm0PAhlMfPXxKVTIECysc9OVwRj4Nvyh+Mlv/Jx sdLIWuDQKGUC6/G0eoP0JcVVw5Pq5/AXvYtbFaFhd/gkN1zYWd7HoZBkWAdjs/m9Kp+ecqBS/MsEL MPd+Y/ZdA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jv48R-0006LG-Jv; Mon, 13 Jul 2020 19:29:07 +0000 Received: from mail-il1-f196.google.com ([209.85.166.196]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jv48O-0006Kc-P2 for linux-arm-kernel@lists.infradead.org; Mon, 13 Jul 2020 19:29:05 +0000 Received: by mail-il1-f196.google.com with SMTP id t4so12241831iln.1 for ; Mon, 13 Jul 2020 12:29:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0xhnbPe/d0IoJEyGabZetRlZ0skbc4H/mFckdi1EPy0=; b=KzifgkX9nwExN8koxy/XTSF0VXaqu3GqrCx5NXKHasgbD7W+9yQe3Cu7mR08Fd+f71 ZLqoBv1SHaBJPDW3O4y42WJXYw/tBJwYBxmfhldDBBi+mAxgKXV4kdee9AFqbMr/YPtZ i7wyfXkeJ+fA02yDTD9IIwtYaVdmrXMbfAg3wwsVnLisXppFLEUGLseOhl9WR1itAd5b cuPJXfS6mG7zyoIcq4Cgcad+RK498ZIfH+9q+IdPA2dks1/r/oVwVQ2yjRPsNieir+rU 298+MTUUDf0jURne8emG38vzD7+LL1TP+2C4mJNi9OCtc4TAnZub+ZQ8dzBiaHbOLl9p J+tQ== X-Gm-Message-State: AOAM530sXhP8RCMZHdzyfWxa54xk45b0AfrRx8PaMNMgWuUkrscl7hxs JHOJgJhxfXaW5ZIJBvkV2Q== X-Google-Smtp-Source: ABdhPJwcnmo4dFijfK2zsP8oqdDChinnbZfr1/3zp9e1DRKY9KOL8Cee8Awl5jrCTQGoYDftFXQVTg== X-Received: by 2002:a92:1bdb:: with SMTP id f88mr1343200ill.233.1594668543927; Mon, 13 Jul 2020 12:29:03 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id l13sm8012974iob.28.2020.07.13.12.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 12:29:03 -0700 (PDT) Received: (nullmailer pid 598129 invoked by uid 1000); Mon, 13 Jul 2020 19:29:02 -0000 Date: Mon, 13 Jul 2020 13:29:02 -0600 From: Rob Herring To: Lars Povlsen Subject: Re: [PATCH v3 6/8] dt-bindings: microchip, sparx5-spi-mux: Add Sparx5 SPI mux driver bindings Message-ID: <20200713192902.GA587038@bogus> References: <20200702101331.26375-1-lars.povlsen@microchip.com> <20200702101331.26375-7-lars.povlsen@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200702101331.26375-7-lars.povlsen@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200713_152904_849272_D674EE41 X-CRM114-Status: GOOD ( 20.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Serge Semin , linux-spi@vger.kernel.org, Serge Semin , Mark Brown , Microchip Linux Driver Support , Peter Rosin , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jul 02, 2020 at 12:13:29PM +0200, Lars Povlsen wrote: > The Microchip Sparx5 SPI controller has two bus segments, and use this > mux to control the bus interface mapping for any chip selects. This > decribes the bindings used to configure the mux driver. > > Signed-off-by: Lars Povlsen > --- > .../mux/microchip,sparx5-spi-mux.yaml | 71 +++++++++++++++++++ > 1 file changed, 71 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml > > diff --git a/Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml b/Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml > new file mode 100644 > index 0000000000000..b0ce3b15a69e5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mux/microchip,sparx5-spi-mux.yaml > @@ -0,0 +1,71 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mux/microchip,sparx5-spi-mux.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip Sparx5 SPI mux > + > +maintainers: > + - Lars Povlsen > + > +description: | > + The Microchip Sparx5 SPI controller has two bus segments. In order > + to switch between the appropriate bus for any given SPI slave > + (defined by a chip select), this mux driver is used. The device tree > + node for the mux will define the bus mapping for any chip > + selects. The default bus mapping for any chip select is "0", such > + that only non-default mappings need to be explicitly defined. > + > +properties: > + compatible: > + enum: > + - microchip,sparx5-spi-mux > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + '#mux-control-cells': > + const: 0 > + > +required: > + - compatible > + > +additionalProperties: false > + > +patternProperties: > + "^mux@[0-9a-f]$": > + type: object > + > + properties: > + reg: > + description: > + Chip select to define bus mapping for. > + minimum: 0 > + maximum: 15 > + > + microchip,bus-interface: > + description: > + The bus interface to use for this chip select. > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1] > + > + required: > + - reg > + - microchip,bus-interface > + > +examples: > + - | > + mux: mux-controller { > + compatible = "microchip,sparx5-spi-mux"; > + #address-cells = <1>; > + #size-cells = <0>; > + #mux-control-cells = <0>; How is this mux accessed? You have no control interface defined. > + mux@e { > + reg = <14>; > + microchip,bus-interface = <1>; This looks odd. I take it that there's 2 muxes for this h/w? If so then #mux-control-cells should be 1 and the cell value can be whatever you want that is meaningful for the mux controller. Could be 0,1 or perhaps 0xe if that's more useful. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel