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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4978C2BD09 for ; Thu, 27 Jun 2024 17:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References: Subject:To:From:Cc:Message-Id:Date:Content-Type:Content-Transfer-Encoding: Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0Nyv10ewmHS0ASTa2PJle7SrnVcmendW3SpkyRenqWQ=; b=pHj/PWHBjxE71P3SEV7HQobmDq wh0yGEYmbgelaxpMiieMQlAIVLEbC42e1l/lLXOoVjYFhfykLjpanu4BGG+/rbQNfrKjZu3onHgXq pOQ7OzgNf+gnNq/GxXBqgwk/3P4cpwY9zjmSpsOStEGuU+/cPMyj3yUh6sF28ke7WPX1jSUGUXrv/ Bb2fajo1eZbB/ijLAtjbyQuMFT5SIz4YxeCbz+Voeq7Vdj2lj7r7ph54VjrUFyQ+DrrXXNdE1DuYN s7XIVoYI6iBFH77z9aIqkFnUKp1dbp+GZE6Al2i0l6ZGYxxveaSRsDflLMm8sP6pvLzNVmRfdOfUC r1weWoYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMtFS-0000000BHz1-0Gm1; Thu, 27 Jun 2024 17:49:30 +0000 Received: from 0001.3ffe.de ([2a01:4f8:c0c:9d57::1] helo=mail.3ffe.de) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMtFI-0000000BHxK-40uh for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2024 17:49:22 +0000 Received: from localhost (unknown [IPv6:2a02:810b:4340:4ee9:4685:ff:fe12:5967]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 147894CC; Thu, 27 Jun 2024 19:49:18 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 27 Jun 2024 19:49:17 +0200 Message-Id: Cc: , , , From: "Michael Walle" To: "Ayush Singh" , "Mark Brown" , "Vaishnav M A" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Derek Kiernan" , "Dragan Cvetic" , "Arnd Bergmann" , "Greg Kroah-Hartman" , "Nishanth Menon" , "Vignesh Raghavendra" , "Tero Kristo" , "Andrew Lunn" , , Subject: Re: [PATCH v5 1/7] dt-bindings: connector: Add mikrobus-connector X-Mailer: aerc 0.16.0 References: <20240627-mikrobus-scratch-spi-v5-0-9e6c148bf5f0@beagleboard.org> <20240627-mikrobus-scratch-spi-v5-1-9e6c148bf5f0@beagleboard.org> In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_104921_171682_74D1168E X-CRM114-Status: GOOD ( 27.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Thu Jun 27, 2024 at 7:29 PM CEST, Ayush Singh wrote: > On 6/27/24 22:42, Michael Walle wrote: > > > Hi, > > > > Could you give us a DT snippet of how this should look like with a > > board? > > > > On Thu Jun 27, 2024 at 6:26 PM CEST, Ayush Singh wrote: > >> + board: > >> + description: board attached to mikrobus connector > >> + $ref: /schemas/types.yaml#/definitions/phandle-array > > Shouldn't this be a subnode of the connector? > > > > i.e. > > > > connector { > > compatible =3D "mikrobus-connector"; > > > > // phandles to the parent controllers > > > > spi { > > temp-sensor@0 { > > compatible =3D "maxim,max31855k"; > > reg =3D <0>; > > }; > > }; > > > > i2c { > > .. > > }; > > }; > > > > I don't think you can introduce a new > > compatible =3D "maxim,max31855k", "mikrobus,spi"; > > if there is already a binding for "maxim,max31855k". But I might be > > wrong. Why is this compatible needed at all? > > So I did consider the design you just proposed, but I was not able to=20 > solve a few issues. > > 1. How to deal with say 2 mikrobus connectors in a single system? Yes, interesting problem. That info should go into the cover letter. > My goal is to have only 1 overlay required for the board config at most.= =20 > Ideally, I would actually like to add the dt for most mikroBUS boards to= =20 > upstream and thus only the following overlay would be required: > > ``` > > &connector0 { > > =C2=A0=C2=A0=C2=A0 board =3D <&temp-board>; > > }; That's then per board, per click board. right? > > ``` > > > The problem with making it children is that each connector will require= =20 > seperate overlays for board configs. Right. > Additionally, there are boards with 1 wire eeprom available which can=20 > theselves store the overlay. In the current setup it will look as follows= : > > ``` > > &mikrobus_board { Where is that phandle pointing to? And what if there are two boards? > > =C2=A0=C2=A0=C2=A0 thermo-sensor { > > =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 ... > > =C2=A0=C2=A0=C2=A0 }; > > }; But here you can have subnodes, no? These could then be just enumerated as usual. &mikrobus_board { mikrobus_gpio: gpio { gpio-controller; #gpio-cells =3D <1>; }; spi { cs-gpios =3D <&mikrobus_gpio 1>; spi@0 { compatible =3D "mydevice"; reg =3D <0>; }; }; }; > ``` Not sure what this is, but my mail reader doesn't render RST? ;) -michael > > Which is completely independent of the connector. If the same can be=20 > achieved with child-node as well, then I am open to doing that. > > > > > > Also, the mikrobus-connector driver could translate the chipselects. > > > > -michael > > Yes, so it is currently doing that. Translating chip select name to the= =20 > actual number. I am doing it the name way since some boards might use=20 > pins other than CS as chipselect and not all connectors will allow all=20 > pins to be used as chipselect. > > > Ayush Singh