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,HEADER_FROM_DIFFERENT_DOMAINS,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 251C5C433DF for ; Tue, 14 Jul 2020 08:55:03 +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 E4B8F20BED for ; Tue, 14 Jul 2020 08:55:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="j3aUD/Yp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="GJ4kKgzH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4B8F20BED Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com 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:MIME-Version:Message-ID:Date:In-Reply-To:Subject:To: From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=q70UOoqp5KodViPjgIoKaLSh1qDSWDTf3BMpcL1DTsQ=; b=j3aUD/YpNNENehr5S9bGnr6ty IM7NeGXQfg1L3UnbbR1ME02JvB2KGB8Tqf6EK5N9PKS/Lpq6kOvLcVtqLDU4hmmqyYNvDbfxhbnwB OqUs/0LtRMWVnp6TU5UEU12SSNaVPOX36KiN6yFx9/AvTjPXphZLVHu6aldWz5nyv+AJN/qBifvz/ yeRHksAPiy7gIU9iXHe2E2b1+CRdIdD5PR2v+0CtJfGDD6cxJzGDWP9BSwtydOPYIhs/OSCRNK7cR S+UsUKY28eIrs9ki08STO5y8Kz/CfJzc7NtrdI6qiFwsaB37KpgSqGq4NbMeKj+G/oLwi6SYkHZ9S gR6fwV4iw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvGfY-0007Ui-Vc; Tue, 14 Jul 2020 08:52:09 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvGfW-0007U4-Ml for linux-arm-kernel@lists.infradead.org; Tue, 14 Jul 2020 08:52:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1594716726; x=1626252726; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=tky6NM7O8/hnmZ6YHCdQVf/2RQnmXE+nhxA5aK0S6a8=; b=GJ4kKgzHsSHLJIQaeNUG691+wUYd1GmYCMFDC1kVhVNfGnA0lXfDt0Og Q8ms+m4j5cUdq8OwgRTlkpT5kxinKS7Pr/9tN3ZzL4I2JvFSV9pcoFGZY PXehxu6uZwA0CKITiXEG17f8jr5gc4vsuYuk8mpZZSeTyl92dKl4512aM RwdotAb7UZx25Jt/2tL1ve94kIGF1FcZZ5bAE3R0jBKzlwkAZ/HryUFPk SKgi0FHDo55bhR4hSUjgbZ2G2G8OYDWwaqbxC12P26YEvmB4aZu/7J6mO k1cGWGElhhxMN5cBSNIQGS8wrLelYeSSff5e8VKijeQe3UDbRintS3IKC w==; IronPort-SDR: fYrEfRCafZ4CxcwW6D3u0SOieHK0rHHRRzQG9Gfh5XnLBXvOpgKBDsMVAAZp1VZ+Q1AK9fuy5N VaLBShb30ZgOmiq1RLe6gM2qPqL/XmBd8m1yFKuCrSlVAzZjc69yu8kyh3xr4SJvwZgfRS1HfO a6hWpxGlnUnTBW1cbofkn2pqIVsJMvwXoTo1f5xTzF2aXXyx7kj6TCRykJGkn4b6XWRACgcSa/ Nlxxna2dJQcnM62j9a2uwpSbir7mjn+JNKS/D6ZtPqPOqV4KbcHG3M/VYuYvs11KLC5H/9Ly2R Sk4= X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="87506770" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 14 Jul 2020 01:52:05 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 14 Jul 2020 01:51:34 -0700 Received: from soft-dev15.microsemi.net.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3 via Frontend Transport; Tue, 14 Jul 2020 01:51:30 -0700 References: <20200702101331.26375-1-lars.povlsen@microchip.com> <20200702101331.26375-7-lars.povlsen@microchip.com> <20200713192902.GA587038@bogus> From: Lars Povlsen To: Rob Herring Subject: Re: [PATCH v3 6/8] dt-bindings: microchip, sparx5-spi-mux: Add Sparx5 SPI mux driver bindings In-Reply-To: <20200713192902.GA587038@bogus> Date: Tue, 14 Jul 2020 10:52:01 +0200 Message-ID: <87y2nmjx72.fsf@soft-dev15.microsemi.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200714_045207_161982_FDAFE0BE X-CRM114-Status: GOOD ( 17.54 ) 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 , linux-arm-kernel@lists.infradead.org, Microchip Linux Driver Support , Peter Rosin , Lars Povlsen 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 Rob Herring writes: > 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, The intended use was for the SPI driver to use mux_control_select(mux, ) and then have the mux driver translate the to the right bus interface, according to its configuration. The SPI driver would have a "mux-controls" property bound to this mux. Anyway, I am getting pushed in the direction of using the "mux-mmio" and "spi-mux" combo, so this driver and bindings are being dropped again. I am currently awaiting the "rx-sample-delay-ns" issue to be clarified such that I can refresh the series. Thank you for your comments! > Rob -- Lars Povlsen, Microchip _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel