Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp384129lqt; Mon, 18 Mar 2024 10:28:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGVQN1pJlFx40fyzDxU3nFx1WEXp5FA0LTMtU8Xnlkd2LST8GzCGpzGovTziiUq2L6MQCk5KS7UOeFhHnKQNQjR/zoiErAVlnmcfRfZQ== X-Google-Smtp-Source: AGHT+IEmEFTH7q3hkJFvG+Z08lfBsAh+sb3pkXHhA5KLqapeswDDEX0xa0e859yvoHryBPdh9k4Y X-Received: by 2002:a17:906:d97:b0:a46:5f1d:f2a1 with SMTP id m23-20020a1709060d9700b00a465f1df2a1mr8324972eji.27.1710782929654; Mon, 18 Mar 2024 10:28:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710782929; cv=pass; d=google.com; s=arc-20160816; b=RP6FoiT78/U3ylFlA7ZP/F+6nZG38GYUjz6T5C1qK9h8McPryX7XsxAvHgDu/GH3kI +nrX8ktG/IpX/B5TIkBfiy5VeC+Qvgg99HfIiVxbQYEDrQ+RqaMj3m0QbdIcBVuOSqHH /TonmbTS97mgjNtewYe3C9/8vCXGCl6Auo0OfDmE2v09jH1/8QFcNihw3DIPEJ6uyc9r 0Ng1bXJOgDj4ZLhzr8rzAu1AmfKuAC0rJIWNka8DLVrf5XM+EdOLFXNIjRWNTeRr5Vrz 6BEzmo5ei5UEqan+PqnLaFZe6ttgJMgktf7gmZJHczoHRx55BcQygodujHNbS+sO/EMM mVpA== 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=x/knzn9bTkesJADirI8KqYpzRa+RPpd7vXsAjKTfoE4=; fh=hmfr3fTQpvEm7mxuo74U9zU7BukWjF8Xm9tYHUfXO7Q=; b=QYWvKPGsob62W8Gl0ZMA+sbyszTJo9AZVBJW9M1SXbiZpogG3Pw9s0rlYSb/tYczKJ kFXJDC0pXFIG/xDHODizWI5y6v5AKWAFrdyaxvr1GbFwS7coskJTQq7+ij31Q99CiR1p jYjrntSu/H8m6sV1GVfSrj17VMoJJ7OGIc23HbXlIquaAfrV9paD7Dv3upgqBrZZI+FI M6mENabzlcSLl42yRLsOoWUJNn4MnN1NUMHSti13uRFBzvX6Dx7nE7C/hXVhjjhxjP5B 5a1TU7LDhnXNsXGx29dfW+bkxb0nJ64kG0ZHgjg1ZSI40nr/BP09uHVHAjhugXrzJpxP Ud5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="N8Y/V3Mf"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106435-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o23-20020a1709062e9700b00a45efe0c97csi4330070eji.984.2024.03.18.10.28.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 10:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106435-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=@gmail.com header.s=20230601 header.b="N8Y/V3Mf"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106435-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 03C8A1F25B39 for ; Mon, 18 Mar 2024 17:21:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DDDD55781; Mon, 18 Mar 2024 17:21:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N8Y/V3Mf" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B142454FB2; Mon, 18 Mar 2024 17:21:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710782472; cv=none; b=lhw8ZlvEldNm65SQLsZAb/JGrwn+5YHu4ugcSAk3qzLQSbcv7F3LJXmjS8PWSWR4d6/+j+JMoB9+0TkZfT/M5OGOUfozs1Idnlx121KqB5gNPk0YXzP5n0GiHSmz/yRccdmhEorC1mTdKEpY4eQ56O1kMkpBCIF0n5GtDAfNibU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710782472; c=relaxed/simple; bh=H8CEorSe8avCFphPIu3ah06E8xBOsK2aCL/dWC/0UQo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uceMsSHAJORMGRHVGDuD+gHDsoUN9c7L0dCo4l5tZBmzZXTYWqxWfPgsYZ35YMyzLzMR9BOuOsKOCtjHbA87GRx9qd0eWkGl3WiGAAYnLry37d+6PYqzIVqIpHldMuoa+6Gnv+SkyTK+VLlQJiV7VDFeIOJRYTZI245+XI+BfYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=N8Y/V3Mf; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1de0f92e649so29937765ad.0; Mon, 18 Mar 2024 10:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710782470; x=1711387270; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=x/knzn9bTkesJADirI8KqYpzRa+RPpd7vXsAjKTfoE4=; b=N8Y/V3Mf7CIK39nZ+4Fnt01MJ7yjmq45HrZNkrHd0ihgSzx2o4ial+PmGjnaMVdUMv J9WfE5dohSvcq2NmyesgXBaJ2CA1nl1Fd/DWy824IqghRK4XmkaRLWU4VkmK2GUkNN9M dwvB9OLobwhqGkIycxksmmBxBgg+UqBJRayhmd5Q6ZnjBo5Y8E94ryfrPtwdbjYifvpE Jq7ytLfm5HFd6mn7KGxw6pzurzmuHbOGqNnVOfgfYkR2IX2pxF2UxuRzsW/CDbST6UKo eDAkxNt0m1HQjYL4dwIs8drL44JqptE88Ceuh4WqkTYaTFtXnoaBQIy8a1v4rtF8LoND osVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710782470; x=1711387270; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x/knzn9bTkesJADirI8KqYpzRa+RPpd7vXsAjKTfoE4=; b=ByR0tN2jPHGOWS3FYq5xod9BE812LZ78u7Ur8iptqI84wYaV7TR7Fc/ZQacPlw3XVm Y3R58PlyhPK+6lU0+Zo0nzCmE8crHXq46QMrqGMroYRn39FuRQVMCpjivFiaYoh4xFnY IF/kI9zaJMC+yB5MR0aVDrQrExOgrywKJbKQ2Kzw5hfjlpnEnOH5HnfVe8hjZIDXS4nj V1ecGz2s4kYN5386R3ksWMHlfNMJ99tbVjugJPCebcqdrtI/iJ2kvqK4rsM12ONZhPSe Gm2LE2By9epZT1b+H+uBTLY4jG4F+Wvjjb+mnb+uwskkyPMbQlgRuu99bqIh0b8ytjQW o/og== X-Forwarded-Encrypted: i=1; AJvYcCWY9Z6MWXwrzxio43ERNTCZiGeCj6fnplagEtg14adr5XHtOBOEAbrAh8jarQ0E5tb9Fy8wG+b6kJValWLLchf+HfF1e/UX/TKmWY/I2CMUzkZSMbp7dPOUY4RkgljQU2CAfwzLEuj1vllU9zjKQ1tQO8hdFk2I4kvlQ3Sjd4Q7X5ze4g== X-Gm-Message-State: AOJu0YwdzXAoqKqXMNp8VQ5vhyxMuNeWmOHF33vfCQObkLAo0bJctnOu nGooFX+mNrjKs7+Tw24rwepUCDXyBm1X7bUw8sQL7ETVN3jnBVKN X-Received: by 2002:a17:902:fc47:b0:1df:fe8a:2284 with SMTP id me7-20020a170902fc4700b001dffe8a2284mr7559061plb.8.1710782469893; Mon, 18 Mar 2024 10:21:09 -0700 (PDT) Received: from [172.16.116.58] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id lb4-20020a170902fa4400b001e0287592c4sm2177195plb.267.2024.03.18.10.21.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 10:21:09 -0700 (PDT) Message-ID: Date: Mon, 18 Mar 2024 22:50:51 +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: Michael Walle , open list Cc: jkridner@beagleboard.org, robertcnelson@beagleboard.org, lorforlinux@beagleboard.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Vaishnav M A , 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: Ayush Singh In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/18/24 17:52, Michael Walle wrote: > On Sun Mar 17, 2024 at 8:37 PM CET, Ayush Singh wrote: >> Add DT bindings for mikroBUS interface. MikroBUS is an open standard >> developed by MikroElektronika for connecting add-on boards to >> microcontrollers or microprocessors. >> >> mikroBUS is a connector and does not have a controller. Instead the >> software is responsible for identification of board and setting up / >> registering uart, spi, i2c, pwm and other buses. Thus it needs a way to >> get uart, spi, i2c, pwm and gpio controllers / adapters. >> >> A mikroBUS addon board is free to leave some of the pins unused which >> are marked as NC or Not Connected. >> >> Some of the pins might need to be configured as GPIOs deviating from their >> reserved purposes Eg: SHT15 Click where the SCL and SDA Pins need to be >> configured as GPIOs for the driver (drivers/hwmon/sht15.c) to work. >> >> For some add-on boards the driver may not take care of some additional >> signals like reset/wake-up/other. Eg: ENC28J60 click where the reset line >> (RST pin on the mikrobus port) needs to be pulled high. >> >> Here's the list of pins in mikroBUS connector: >> Analog - AN >> Reset - RST >> SPI Chip Select - CS >> SPI Clock - SCK >> SPI Master Input Slave Output - MISO >> SPI Master Output Slave Input - MOSI >> VCC-3.3V power - +3.3V >> Reference Ground - GND >> PWM - PWM output >> INT - Hardware Interrupt >> RX - UART Receive >> TX - UART Transmit >> SCL - I2C Clock >> SDA - I2C Data >> +5V - VCC-5V power >> GND - Reference Ground >> >> Additionally, some new mikroBUS boards contain 1-wire EEPROM that contains >> a manifest to describe the addon board to provide plug and play >> capabilities. >> >> Link: https://www.mikroe.com/mikrobus >> Link: >> https://download.mikroe.com/documents/standards/mikrobus/mikrobus-standard-specification-v200.pdf >> mikroBUS specification >> Link: https://www.mikroe.com/sht1x-click SHT15 Click >> Link: https://www.mikroe.com/eth-click ENC28J60 Click >> Link: https://www.mikroe.com/clickid ClickID >> >> Co-developed-by: Vaishnav M A >> Signed-off-by: Vaishnav M A >> Signed-off-by: Ayush Singh >> --- >> .../connector/mikrobus-connector.yaml | 113 ++++++++++++++++++ > See also > https://lore.kernel.org/r/YmFo+EntwxIsco%2Ft@robh.at.kernel.org/ > > Looks like this proposal doesn't have the subnodes. How do you > attach a kernel driver to it's spi port for example? Only through > the manifest files? > > -michael So I looked at the Patch, and it seems the approach of fundamentally different than this PR. So, let me try to explain what this patch set does for an add-on board using SPI. 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., which are defined in the manifest. On board removal, it unregisters the SPI device and waits for a new mikroBUS board to be detected again. It is also possible for SPI not to be used by a device, in which case, no SPI device is registered to the controller. It is also possible that the SPI pins will be used as normal GPIOs. Everything is identified from the manifest. Ayush Singh