Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1032675lqt; Tue, 19 Mar 2024 10:42:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0XkXg2xhICE9fDLm2V7OGwa2dwdndYi/gEo2JYkP6MfUyXRzzzgLmngNkgFqfeNzvc506dwoSTl6K/wBr+8i+sWXyEtKhlAhmMzl3uw== X-Google-Smtp-Source: AGHT+IFhyxePzRmUF0kJxcIdHZlrNJJ4RYVprW4LNJw9U7sZy+uwpKml70tRYZG+5lpt68CG1YXv X-Received: by 2002:a17:906:b0c:b0:a46:c822:7f2 with SMTP id u12-20020a1709060b0c00b00a46c82207f2mr4129282ejg.2.1710870131394; Tue, 19 Mar 2024 10:42:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710870131; cv=pass; d=google.com; s=arc-20160816; b=IAwD7HJq5V7ACIGBIgFUiEOWUAIfL51691Dpj6bBOj9cJAHCzCEDQMfqeuljW3OUM2 AkG/LsoppLN7B2wDR5xQqT9eezZYPXZzyd/z4dcHu2t6P+6dimLe/qRTcgB4FITbacvq LGlzZIBZLy5c7ZGch2zHxYiRc9LR9fvsUFPwnlJGTiU4vmXjK41VbqwjEB2VoYjgC/rB e/oH5tO7Fb0Yz+5XSmT5PIy30pqJUT6vGi9KKd3pQ38cM8aT7kYXy/CF7iVOxPylK2/P 2nWo6SOMnwhnvWtsV2CHeun4XMP/oUeJCyyTdU07+J4NneTmo98Mt5YpFBUqF4Z7yYAE xCcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=efpn64adRKaugLUnDIE4XDjDeD0LJO7uSxUeR2TSGJU=; fh=EPs9TYvMrSv+WdzztGJ83oUSCL13OUiw73Z6zKWpoR0=; b=Q7cY1rDvqFu+Jxx25kmxQSqGWo+SVAXcvRuHM0F8GpgLGMUXEtKObyQEfkTo9WS7qy iuKTQD+SQruZkLI3TbOyfAFVRrkbODljVevqzCAUwItZfotZ6l2C7YKFkkHTxPm+EMSj WAmf8GxrzkcLlvC/Fei9xwwS9ZFuKX6LISNG0gJiNSqQbDsFzJkJnrkUHYS8qHajvvFm d9BtX8B0l38Vv6SFZ8gMksA5UbjH/NcdGNwrR7TqGTBMZndwYfI1bs5ciS1sbXw/RLvW Nhf/59fIAW8SxInluipPB5a+PTVXKIdtO7B9N08z7CaDQChVFDC8UpdW+WkHNOrcb/he 3egQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=trZHbNJo; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-107920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lw23-20020a170906bcd700b00a462acefc47si5342263ejb.871.2024.03.19.10.42.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 10:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=trZHbNJo; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-107920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6FAF21F25101 for ; Tue, 19 Mar 2024 17:36:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C92452033E; Tue, 19 Mar 2024 17:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="trZHbNJo" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CA8E19BDC; Tue, 19 Mar 2024 17:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710869766; cv=none; b=Soa/bMdDEAf2Pl91+51P8GpqGzP9Xqx3tBZJOPe7j4ulBC24JnAJ828eId7ql4T+5hiZ8DSzD4Bl7m/g7iyrKhXuN8dFYG2x9aKcOjTlYXePYPQ8rfNnDVsHkV1pgZ5JN3muc+g99hSYYP4KNJ2VAhaF3RMwgN2e7UZM9fCkQDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710869766; c=relaxed/simple; bh=tk3YWbCjBAgqaMu3m4ZPt5MZ1O447J6fwx7jDX/IqvE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=rlyymmKLgqPeYWa2HTFTUyZdC8jfIOrUDnTDNRl7E5OuIuLz/aCDcCF2O3wG34AFNQIHfrQO7dXuBxfV6H2sZvvzP2AauD17s71r1JbfLWY9Csvx0qSAnawyOHJTl4eOamiu9Cio0sWrSqXGxOCu4EMhTSAIsVrY3f3p3jPq/M4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=trZHbNJo; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42JHZjQD096712; Tue, 19 Mar 2024 12:35:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710869745; bh=efpn64adRKaugLUnDIE4XDjDeD0LJO7uSxUeR2TSGJU=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=trZHbNJoztj0Z0zu4ijAbHvGQFtHrelyonZLzHqkAJ39ueEhDA479t1QAbVB3TeJe Ol37n80AZokPGDr51uNzBI4PTEKDUsSxayR7lrjYIDnfw8AVhZntlA97z4WnVwq+Ql 8SO2A4QeKeGHsysezdvVeCfbPo9LTIJsovFlWo0Y= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42JHZjeN035903 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Mar 2024 12:35:45 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 19 Mar 2024 12:35:45 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 19 Mar 2024 12:35:45 -0500 Received: from [10.24.69.142] ([10.24.69.142]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42JHZbRI026612; Tue, 19 Mar 2024 12:35:38 -0500 Message-ID: <4b319264-bff7-48e5-85e8-201ca0bafec6@ti.com> Date: Tue, 19 Mar 2024 23:05:37 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/5] dt-bindings: misc: Add mikrobus-connector Content-Language: en-US To: Andrew Lunn , Ayush Singh CC: Michael Walle , open list , , , , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Mark Brown , Johan Hovold , Alex Elder , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/TEXAS INSTRUMENTS K3 ARCHITECTURE" , "open list:SPI SUBSYSTEM" , "moderated list:GREYBUS SUBSYSTEM" , Vaishnav M A References: <20240317193714.403132-1-ayushdevel1325@gmail.com> <20240317193714.403132-2-ayushdevel1325@gmail.com> From: Vaishnav Achath In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Hi Andrew, On 19/03/24 17:55, Andrew Lunn wrote: >> The device tree defines the SPI controller associated with mikroBUS SPI >> pins. The driver on match queries and takes a reference to the SPI >> controller but does nothing with it. Once a mikroBUS add-on board is >> detected (by passing manifest using sysfs or reading from 1-wire EEPROM), >> the driver parses the manifest, and if it detects an SPI device in manifest, >> it registers SPI device along with setting properties such as `chip_select`, >> `max_speed_hz`, `mode`, etc., > > How complex can the description of the hardware be in the manifest? > > Could i describe an SPI to I2C converter? And then a few temperature > sensors, a fan controller, and a GPIO controller on that I2C bus? And > the GPIO controller is then used for LEDs and a push button? DT > overlays could describe that. Can the manifest? No, it cannot describe such complex hardware, it can only describe simple devices (sensors/displays .etc) on a standard mikroBUS add-on board, we did a analysis on what mikroBUS add-on boards have driver support in Linux and then noticed that most devices does not need this kind of complex description to work: https://elinux.org/MikroEClicks_with_Linux_Support The greybus manifest already is being used in the greybus susbystem for describing an interface and there are already greybus controllers (SPI/I2C .etc) being created according to the manifest contents, all this driver does is to extend that format to be able to instantiate devices on these buses. The primary goals for introducing the driver for mikroBUS add-on boards are: 1) A way to isolate platform specific information from add-on board specific information - so that each permutation of connecting the add-on board on different ports on different board does not require a new overlay. 2) A way to instantiate add-on boards on greybus created virtual mikroBUS ports. 3) Both 1 and 2 should use the same add-on board description format. Standard device tree overlays did not help to achieve this and that is why the standard interface discovery mechanism in greybus, the manifest was extended even though it is not the most optimal way to describe hardware. The greybus manifest extensions were made with the following things in mind and three new descriptor were introduced: 1) mikrobus descriptor - pinmux/port state 2) device descriptor - contains information which is a superset of struct i2c_board_info , struct spi_board_info .etc 3) property descriptor - to describe named properties of the types defined under https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/property.h#n22 With these we were able to test around 150 add-on boards with corresponding drivers in Linux : https://github.com/MikroElektronika/click_id/tree/main/manifests The mechanism is not as robust a device tree and should not be compared, the intent was not to create a new hardware description format, but extend the existing greybus manifest format to be able to instantiate devices on the greybus SPI/I2C/GPIO/ (mikroBUS) Thanks and Regards, Vaishnav > > Andrew