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 799A5C54E5D for ; Tue, 19 Mar 2024 07:37:20 +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=uwg5gNaM4r6hq5gP7trrLwK06YIWYFRRdgnWf25Kt4k=; b=C7u3uPu3Z04gM2 MK/edbmyvm8DpDsciDHccyzzCYDv7yDZIKfVTq52ti19e+r+fznWjhUwu+rbKvoSlQQ+qbrPkWnky VxUPEuxmJqPlslmWVyjEvAkqh03XuDU3HkyvapWCPVMYcDZqIHhyBu0nfRiDP31/PG1rt/brlpVdH Bi1GsbDbATIIaTmNSzsfcCQUDV8Dt1NJp1LPYKGGfgMBZzY+jz7TbphXsDr25OwSfr2VbsM3nB81S MfFtY2lKC4J8f6hJvrZ3NCB27rCmGp8MEgeTGbPCf945b9/HHAErqr8nG1obTfZFgB+3VfjFjwAt8 Pik566bHqUXqQAsa4CRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmU1w-0000000BjM0-0Pje; Tue, 19 Mar 2024 07:37:04 +0000 Received: from mail-oo1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmU1s-0000000BjKl-2d0i for linux-arm-kernel@lists.infradead.org; Tue, 19 Mar 2024 07:37:02 +0000 Received: by mail-oo1-xc2e.google.com with SMTP id 006d021491bc7-5a47abe2ff7so2037604eaf.0 for ; Tue, 19 Mar 2024 00:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710833818; x=1711438618; 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=YHCJlZjtshIG0jJom0kvx9m2BM/FXwZE6cIGEiQKBVE=; b=FFm82oPr/lKzP86xi6nM4D+YQAVTF8qgpjpXwOg4juFuUVranv2Evh/qmPjl6VLJs3 2Zwr5ZYIWu9OAw7C49YtftflwLkA+EsuHInzfekk26l2KhImGiP2WBBZp92qYBC8cyg5 u5S9jdY++H+MSxYNd3BQ605Fto1ad4F0zyBqCDF6xla0+Q1BPP/gffCndny9v3uvDXV9 W7QXtzT7ckdyqghwlcHFcWAiIv4ByKRng0IOHWKKmuFIgOhbAuKu+201ZJYvQ1gSBRZG 9edx9vwBKfipbzZSAduAFKeVmQ6bj5B3+RQEys+q6Yqub8io0WxBUN7T3QzK3UG2fV42 SlbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710833818; x=1711438618; 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=YHCJlZjtshIG0jJom0kvx9m2BM/FXwZE6cIGEiQKBVE=; b=H1Txvt7ttsVA2D9W/9/Qmthdl53o+w/6NCsT/1weWuCvKa//1fMproovd7OnUM9w7e 8sxHYBBGJCMRpuM5JP79W2DyH1M1eGKYqq2sBFWGi5R1iYXzTRH/hmvn/RleCNNlzgS/ j1JaPzLhO6aCqk9Cb/7JwQnh1JeSFOE65zHhZ53IqFafdePjWZeROF749s4gAq2xR/R0 m+8r9vcMxLkj9brnpQExzCrEvP0jq/m/h018fDpYvgKz0tD74PWGwmykTYtC09qUUjmm FyW62FoweASZBL4J0cb7eg/AiH//0Izd8deujeHedHUlEXrooOJ28vnfdaCczFlljuWJ DsuQ== X-Forwarded-Encrypted: i=1; AJvYcCVsuCN2MCCQ+28NoEgGQv2by+odaWj13fxedKzB/7uDuUqZL0w1Faql8K33P9M7NQxgYQGxgqN7w7pIHUvHZ8dl3iVQ9p715QElMuJjTxne5CMByds= X-Gm-Message-State: AOJu0Yy70ujfonL00ikUzHdiGIebv+NgPKUmCbVlZJjmjenjWNNdw8GX nAG8LlhbXAndmlRBlxWq/sxlr3LBILCMEm7fXuoih65uErWhTL2nBRqii+WLll4= X-Google-Smtp-Source: AGHT+IHjuPClKQPIBso0PeBaQRxcjfszD2QnTuP0HROvRIimQAr/wBK/UV5WSm8hqR9OEWW0N8sFWw== X-Received: by 2002:a05:6358:4319:b0:17e:69fd:e8cc with SMTP id r25-20020a056358431900b0017e69fde8ccmr8283727rwc.21.1710833817767; Tue, 19 Mar 2024 00:36:57 -0700 (PDT) Received: from [172.16.116.58] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id e15-20020aa7980f000000b006e6988c64a5sm9100478pfl.208.2024.03.19.00.36.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Mar 2024 00:36:57 -0700 (PDT) Message-ID: Date: Tue, 19 Mar 2024 13:06:39 +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: Krzysztof Kozlowski , 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> <0f3f56d4-3381-44f1-91bc-c126f3ced085@linaro.org> From: Ayush Singh In-Reply-To: <0f3f56d4-3381-44f1-91bc-c126f3ced085@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240319_003700_713120_B5B9E6ED X-CRM114-Status: GOOD ( 28.60 ) 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/19/24 11:28, Krzysztof Kozlowski wrote: > On 18/03/2024 18:20, Ayush Singh wrote: >> 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 > As I understood Mikrobus does not have EEPROM. mikroBUS add-on boards do not need to have EEPROM, but they can have it. Simply put, EEPROM is not part of mikroBUS specification, but you will find a lot (especially newer) addon boards with support for EEPROM manifest. Regardless, this patch actually does not contain any code for EEPROM support I have just mentioned it to give more context on why mikroBUS manifest is the focus of this patch instead of DT overlay or something else. >> 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. > You explained drivers, not hardware for DT. Yes, I was replying to the question posed by Michael. Since this happens in the driver and not in the devicetree, I needed to explain the working of the driver: > How do you attach a kernel driver to it's spi port for example? For more hardware side, the bindings are for mikrobus connector rather than for any addon board. Thus, while an addon board might not use some of the pins, the connector still needs to have all the pins and associated controllers. >> 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. > > Best regards, > Krzysztof > Ayush Singh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel