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 D285DC54E58 for ; Mon, 18 Mar 2024 17:21:27 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b1AwjRSwFJ3DmBy6LSdAipefA00X9Pv39C+v8aMmLws=; b=ZfTLwOLA8heYUi st6auO4gHAOt+QQNdVnEF/RIy/oOR2lvj1kEq1qDGgAL5+X0XlZXTtupbPMxerYxr7wm+PMsMNP14 gfDtO50z5oDPOCAqt7u7srXVlRXZknZFkX/+bqHCpsRJjt9dUaZPkjyincjaIH9KCIoCTqexgKE13 M+G6BEiRrc9ldeXDa+Tgf9xES4c3vR5NtG0pEusXYti4o8eCZrVsdqczFQS89Cx7vjECw7Cue+6F3 BhCyyDKyqpE/PwrDRq5K88GFTbQFimfbjV0NR87CRYabgCpCYa2Sq2ba6Wue5o0FCcSn3uw1PLZIw 53vjnGzvVGOMRnfAazKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmGfl-00000009QEj-2a2X; Mon, 18 Mar 2024 17:21:17 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmGfh-00000009QCt-1AFU for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2024 17:21:14 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1dddbeac9f9so30744355ad.3 for ; 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=lists.infradead.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=apxeQaadB4Ql4w1Cu5Fllyy+BSyTHAeZUAb4lgv3V3NGHFuXy7dA21gJD16mtoB9ZA v778nb+SgaPtjUMNi4lezbUrnLVj3HZwqHt1uYxfnuAowWoDGdpiHdYr/F6FcBuMtWpg 2+3A5OyaRp+7B0HJwJcwEnnmCEqOR0rVAoaOwhtu2Jv7U8QgLuuqi9cw750Q+lQ3p/Q0 DnTCeZWbOz0pVLcPrGkmsZi5l9XFCRkUKO/Mqvk+6XTdssRqg7zIfcjBztt7cjjT2fOl hBQu8vkOeFW5wykVjUYJs/FIyYhioT0nDzVNOYV3ksPW+DcKLvFh0CuAa4R6Z+4vI7Wv qVoQ== 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=m8r3JEmfwput9PrhVgxiyyEGpI1nxEMaxVERqWO/Do+qoEzPWwbSlS+Rv7YSsjxtvj 4CLEI3DzWYGQFijvVNx9F6Bvr/FutiJNEHlPuP+f1j6Y64EMs9HN7g5JPbPQkygNp3FH vp2NXqs1khv4U+xvPVuyEYbgNmVaaIN1V6yjRT+HG9FoRscLr5s66ThbjJAO50XfAhr3 NL1GFCrwqkR9mVeLupI+sh9YRUtEMR7b3Dy/kwqlzr3HIGTKNO4z+rShS+5nZkfohKE0 dJwK+6q2FuUFg+qGaJ15a6KvwBQhjkktEMu/Fwthmxwq7CFj2vOXeSgS5cgIOMKzYxaM jbtw== X-Forwarded-Encrypted: i=1; AJvYcCU5LR4bCrrOos4Wshb1IImPCk7Slm2tHgiPDkIKTf88z7djvKbncTuR97hmnNokwLwHODIand0GzjKnf0hqv9uN9t2kB2pyX0y+3wiQzdIxtq8GXKA= X-Gm-Message-State: AOJu0YwePGRVcbA+t4NvlHX4WkDHQIUOQp7w4NfDehBQdIAETtIRU1uO uTJn0kWhrqAKEo5GjovWWwgBeX4E06iQZ9WkDTnp8u6KhL/oDrJX X-Google-Smtp-Source: AGHT+IEwDsNP9+G3XFWSMW4+vV0LFrP4NkkcgrwJoaAAj13Gy3eFsigEPk/8RfGXbGr0lNwTF62eRA== 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 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240318_102113_397682_700E1D42 X-CRM114-Status: GOOD ( 23.10 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel