Message ID | 7838d99a1795337c73f480fafcbf698fc17d16dd.1698413678.git.jan.kiszka@siemens.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp609001vqb; Fri, 27 Oct 2023 06:37:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESfam3rE/lOi9GGRUE/0dGgcZnbKffRTvSozBEjhJ6l1JCYW9CnkI8caMEcnQ9NLXqd2gl X-Received: by 2002:a05:6808:1406:b0:3ab:5592:4704 with SMTP id w6-20020a056808140600b003ab55924704mr3131700oiv.2.1698413825906; Fri, 27 Oct 2023 06:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698413825; cv=none; d=google.com; s=arc-20160816; b=JbwvPccWUhvbq+S0w5lv6x3F5uxXneytM8vhH/LiUvRXR/CbZVB35F9hcyv7GW3osX 3BB6S9DOTf22veTBD0BWVjxVQ+pGcjZp6DgvyEMO/GQpb+npXi9FpeAwFX5zs7w/gH9t OY7QXQOnOgMu6v4Rfc0OJmrzdqUYTxgk7xAOhqW0KqIbuhx9c6DHWgCbQRr0GQW2fqxj RdxZm587oMLBw8/trcHNDuuRi4Afj8AdlH+pwPQ++FXTh3k9Hgl6Y0oqGdjbvp9qaqeY Tl5hHZ159gwCJBtDF5Ol8ED2yOuB92PoB7vZFtAdz4kTcrZEkvZFSDNvEz5g1b1Lf/Tg FbZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IIIZv3qhvVrJIFdod594YJFg+VBqFZbwCQJVB6InzvE=; fh=TXmJ51wQtzLLjes0qtH+NOoYV89/uc4AwJxMSeVWyD4=; b=mJN/xwDpTNQg/7lfSD7nhuaKxIWHzXzhfk1qJmPNLtwT+3eYo2GwTw1dR0iR8zsFX/ yMGbi7sLj3+u/cOF/KBfoS5fQqVUU1RAjXKuXDoDqyl1tV6NHsV2bScFLO2g4VbSupcK 3d/Ioi5zSwYAJ/JvGwx90jaf8X17aOY7dl1eRdJ1LMr1HbHuxi8S0R1xm4GwrUGuGZCD p+HaTyCByP2H3zGqWysoPECFmX4OlbJBYS7GC3jjkM8z50hdPEKFGCTKhLlvA0uY/l2J HGedVN+PBQbRzGyKwUa1ts0tZ/XymaSz4wFKaqgNG1RE4OZnYUfepIEc4QjDD7igSl47 AJGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=X7vCATgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id d40-20020a253628000000b00d9ca7577fcbsi2680101yba.717.2023.10.27.06.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 06:37:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=X7vCATgG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id BA250836E5E8; Fri, 27 Oct 2023 06:36:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346061AbjJ0Ngc (ORCPT <rfc822;a1648639935@gmail.com> + 25 others); Fri, 27 Oct 2023 09:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345998AbjJ0NgC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Oct 2023 09:36:02 -0400 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 27 Oct 2023 06:35:46 PDT Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net [185.136.65.226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E79F10F2 for <linux-kernel@vger.kernel.org>; Fri, 27 Oct 2023 06:35:45 -0700 (PDT) Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20231027133441759eb8bb3d0a2e018b for <linux-kernel@vger.kernel.org>; Fri, 27 Oct 2023 15:34:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=jan.kiszka@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=IIIZv3qhvVrJIFdod594YJFg+VBqFZbwCQJVB6InzvE=; b=X7vCATgGhzz6tJF3X8ZjSu65Avgul4GuAaIC4U/PVZV5lr7O7+u+pvgDvjHq1NO5oO5Dj3 2kAt7CSD+HnbIJlVWymuXlzTmcg2LvwlOBC5m1O+/fc/gbjveWw792IuJ1dr9aWb+Uv7BJm0 T3VW5le+mJJr5akzCYPKKsokyvMRI=; From: Jan Kiszka <jan.kiszka@siemens.com> To: Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Tero Kristo <kristo@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bao Cheng Su <baocheng.su@siemens.com>, Benedikt Niedermayr <benedikt.niedermayr@siemens.com> Subject: [PATCH 5/7] dt-bindings: trivial-devices: Add IOT2050 Arduino SPI connector Date: Fri, 27 Oct 2023 15:34:36 +0200 Message-Id: <7838d99a1795337c73f480fafcbf698fc17d16dd.1698413678.git.jan.kiszka@siemens.com> In-Reply-To: <cover.1698413678.git.jan.kiszka@siemens.com> References: <cover.1698413678.git.jan.kiszka@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 27 Oct 2023 06:36:55 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780915975862932754 X-GMAIL-MSGID: 1780915975862932754 |
Series |
arm64: dts: iot2050: DT fixes, cleanups and enhancements
|
|
Commit Message
Jan Kiszka
Oct. 27, 2023, 1:34 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com> On the Siemens IOT2050 devices, the SPI controller wired to the Arduino connector is normally driven by userspace. Introduce a binding for use by spidev. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+)
Comments
On Fri, Oct 27, 2023 at 03:34:36PM +0200, Jan Kiszka wrote: > From: Jan Kiszka <jan.kiszka@siemens.com> > > On the Siemens IOT2050 devices, the SPI controller wired to the Arduino > connector is normally driven by userspace. Introduce a binding for use > by spidev. What's spidev? Not a h/w device... > > Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> > --- > Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml > index 430a814f64a5..01b9f36afcd5 100644 > --- a/Documentation/devicetree/bindings/trivial-devices.yaml > +++ b/Documentation/devicetree/bindings/trivial-devices.yaml > @@ -349,6 +349,8 @@ properties: > - silabs,si3210 > # Relative Humidity and Temperature Sensors > - silabs,si7020 > + # Siemens IOT2050: SPI interface on Arduino connector > + - siemens,iot2050-arduino-spi How is this specific to your board? Presumably, an 'Arduino connector' is a somewhat standard interface, right? If every board with an Arduino connector adds a compatible, this doesn't scale. A connector is what you should be describing, but I imagine it is not just SPI. Here's some past discussions[1][2] on the need for connector bindings. Rob [1] https://lore.kernel.org/all/20220421094421.288672-1-michael@walle.cc/ [2] https://lore.kernel.org/all/CAL_JsqK2DKPbaFvUPSU2E7oh1_pryrRXPMg8OASmK722jmznwA@mail.gmail.com/
On 30.10.23 17:43, Rob Herring wrote: > On Fri, Oct 27, 2023 at 03:34:36PM +0200, Jan Kiszka wrote: >> From: Jan Kiszka <jan.kiszka@siemens.com> >> >> On the Siemens IOT2050 devices, the SPI controller wired to the Arduino >> connector is normally driven by userspace. Introduce a binding for use >> by spidev. > > What's spidev? Not a h/w device... > > >> >> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> >> --- >> Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml >> index 430a814f64a5..01b9f36afcd5 100644 >> --- a/Documentation/devicetree/bindings/trivial-devices.yaml >> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml >> @@ -349,6 +349,8 @@ properties: >> - silabs,si3210 >> # Relative Humidity and Temperature Sensors >> - silabs,si7020 >> + # Siemens IOT2050: SPI interface on Arduino connector >> + - siemens,iot2050-arduino-spi > > How is this specific to your board? Presumably, an 'Arduino connector' > is a somewhat standard interface, right? If every board with an Arduino > connector adds a compatible, this doesn't scale. > > A connector is what you should be describing, but I imagine it is not > just SPI. Here's some past discussions[1][2] on the need for connector > bindings. Right, we are not alone with this modelling problem on our board. The code talking to the SPI devices is inside applications, the kernel just needs to pave the way to the interface. However, you can't define that path without bending of the DT. This is specific to at least SPI, maybe some other buses without probing as well. If this were a PCI device, no problem: tell vfio-pci or uio_pci_generic to be responsible as well (add IDs on the fly), bind bind any of them and then let userspace handle things. Same why to go back to an in-kernel driver. No bothering of the DT regarding how the final device is driven. Jan
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 430a814f64a5..01b9f36afcd5 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -349,6 +349,8 @@ properties: - silabs,si3210 # Relative Humidity and Temperature Sensors - silabs,si7020 + # Siemens IOT2050: SPI interface on Arduino connector + - siemens,iot2050-arduino-spi # Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply - skyworks,sky81452 # Socionext SynQuacer TPM MMIO module