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 E2DD5C433F5 for ; Thu, 21 Apr 2022 14:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=pzEr4MqRyXkGzup9cpHj+W4dgbn5TpDonsAHpb7WAxw=; b=crLvZOPdtQEJe+ fqkEVUnUxOJlaQje1WnnSPDtCpYyRTLK0zp9j1FUJmCyNaAy8ZJYjvFUJJ9wHdv0TzcwfjKT2O1Jl RD45jwtQa5TwnoI1G4w2mQ7rVejcYh2k7467KVTdYvnip0T8r3IC5bvEX6hof4MLhdFvaOdK4wcg7 U9wnwugPp13GEa6qJUBiIRNr5aXwwIJszXxM/xLrk1OdN0EFKYx+hSy/FfiqB/hr55/PPQvOln+Bj Fab0q3sy16glh7XiFwH0HClapavHDAlJhhP/u0CuYeZZNPhxWkhRSR8wVZi6s4WG1y2RQIngegR7a FDA1n8kiKQg2iwFjL2pg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhXiy-00DkjZ-7G; Thu, 21 Apr 2022 14:24:00 +0000 Received: from mail-oi1-f170.google.com ([209.85.167.170]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhXiu-00Dkia-V4 for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 14:23:58 +0000 Received: by mail-oi1-f170.google.com with SMTP id 12so5742768oix.12 for ; Thu, 21 Apr 2022 07:23:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ltsRnfamwtq0CQPhc5gTf9IyXvHEdaLupIo/2GTsf6M=; b=ZA7xIreq6v/yobx878EI9VZtcs/L0g1nGle+ND7cUMkF13ad7ImwX+v3z8ubGmJ977 Yh2ZNAEBXCFOhvuc0xv1QE/BU28dpew4U3zdiOKSsx7rZnVFp5L9OZncza1Mull4a/O6 QwlYmOznoBg2zpEyeAfsjmMG94p/6ZYbumYwJrZ+8sHXyJkZ1FJ3X/JLXwFy8ZRXOxyJ 9ajdzMca/wzMts/yA3BSgacsNwMAggUMC91otavsWiHZKIjiA2t26kgt+x4WN67E7yiY G8lyHIprHM68q4UuM/WFUcc6bg+k3E19zTIfzmcjYQwsR40hO4XBouldSJPc1U/vWLkX hmQg== X-Gm-Message-State: AOAM531dVRdKoVu+OWaJ8PvZzXXgt8ypxOK8afqljW0mS96yR0A14Orx TeKrJ4ml6akUn0roDOx23A== X-Google-Smtp-Source: ABdhPJwR8TXnotKlPy21bKRlPaStjXgsL0FJOPRy9rOEUSB8MqwoYv6nPCiWA2vSys2iICB+uV9kQg== X-Received: by 2002:a05:6808:180a:b0:322:bcd3:ddaf with SMTP id bh10-20020a056808180a00b00322bcd3ddafmr4228060oib.35.1650551033810; Thu, 21 Apr 2022 07:23:53 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id c9-20020a4a8ec9000000b0032438ba79b0sm7863670ool.0.2022.04.21.07.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 07:23:53 -0700 (PDT) Received: (nullmailer pid 3421101 invoked by uid 1000); Thu, 21 Apr 2022 14:23:52 -0000 Date: Thu, 21 Apr 2022 09:23:52 -0500 From: Rob Herring To: Michael Walle Cc: krzysztof.kozlowski@linaro.org, broonie@kernel.org, devicetree@vger.kernel.org, jerry.huang@nxp.com, krzysztof.kozlowski+dt@linaro.org, leoyang.li@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, shawnguo@kernel.org, Vladimir Oltean Subject: Re: [EXT] Re: [PATCH 1/2 v4] dt-bindings: dspi: added for semtech sx1301 Message-ID: References: <20220421094421.288672-1-michael@walle.cc> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220421094421.288672-1-michael@walle.cc> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_072357_046429_44C2692D X-CRM114-Status: GOOD ( 27.41 ) 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: , 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, Apr 21, 2022 at 11:44:21AM +0200, Michael Walle wrote: > On 21/04/2022 11:11, Jerry Huang wrote: > >> Please also answer Michael's comments. > >> > >> [Jerry Huang] I double checked the MikroBus devices, we used two MikcroBus devices: > >> BLE P click: https://www.mikroe.com/ble-p-click > >> BEE click: https://www.mikroe.com/bee-click > >> Both of them are SPI interface connect to ls1028ardb through MiKcroBus interface. > >> So the name "semtech sx1301" is not correct for this node. > > > > I asked to remove the words "Devicetree bindings" and this was not finished. > > > > Now you mention that entire name of device is wrong... It's confusing. I > > don't know what device you are describing here. I expect you know. :) > > > > What is this binding about exactly? > > I *think* it's just exposing the mikrobus connector as an spidev device. > There was a former attempt by Vladimir here [1]. Now as it the nature > of such a connector that you can connect a myriad of devices there, it > doesn't really make sense to have a just particular one described. What > happens if that one will switch from spidev to a real driver in the > kernel? So using "spidev" for the compatible would be the first reflex. > But as described in the spidev driver this is plain wrong (and also causes > a warning/info message it) because it should describe the actual hardware. > > Thus I proposed to use DT overlays which are loaded according to what > is actually attached to the header, so a real driver could be loaded. > > But there *could* be a sane default which then could be replaced in > an DT overlay. Like "mirkobus-socket" or similar, which might expose > spidev. Actually it is more than just SPI, there is GPIO and resets and > I2C. Maybe it should be an MFD? I don't know. But that is something for > the DT maintainers to decide if they'll allow such "generic" devices. generic devices, no. MFD, no. What's needed here is a connector node (and driver) for the mikrobus socket. The connector node's purpose is to decouple the host DT from add-on board overlay DT. Something like this: connector { // And a more specific compatible if pins can have alt funcs? // Spec version needed? compatible = "mikrobus-socket"; // Will need regulators defined if child devices expect // regulators vcc-33-supply = <®33>; vcc-5-supply = <®5v>; i2c-parent = <&i2c1>; // Already a defined property spi-parent = <&spi0>; // New // RST pin reset-gpios = <&gpio 4 0>; // remap 'INT' (index 0) to host interrupt #interrupt-cells = <2>; #address-cells = <0>; interrupt-map = <0 0 &gpio 3 0>; spi { //devices }; i2c { }; }; The DT spec defines 'foo-map' properties extending interrupt-map. Currently only GPIO is defined. We might want to do the same thing for PWM. Or we make the connector node both a PWM consumer and provider. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel