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 13F35C54E5D for ; Mon, 18 Mar 2024 12:37:51 +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=+nBd5qgKoeWNOxIxGinGmsl8nG69NKRylZJCPp0UQio=; b=WbezmFQTVa3PV3 b8neNyF+Y3OP+Z0kF/r1F7+Srb3flxyRmZ4ZgFPDMEufVXmzG+/61TzX6CfRpkG9QFQG9ua/7fuwg DGDXjX6GU6n9udNRqNBbBh2u2K4Z/2iVTzR56Y90xVOzDtlZI5m136Kwng2rDyZ2GUkpQswnwbNJQ QClPhsFEbFrjcsycwfmEDiHnZzt+9GD9XTeig+D9SbmfmApV8qwA2TIpBuzkRPCTaACrm3t03JKlL L/WvCXusHTSi9nH4lYyzEn+5rcVI0o/CUSbUkHSRyYlzjrsmAsbzrUxruGWHA0k8Sn8KD8aLpH8td 0BbKRirjWZr+WLsVV57w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmCFK-00000008XOG-2lsH; Mon, 18 Mar 2024 12:37:42 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rmCFH-00000008XM5-0giz for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2024 12:37:40 +0000 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6e6ccd69ebcso2668490b3a.0 for ; Mon, 18 Mar 2024 05:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710765457; x=1711370257; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=HanPhs+5pxNZQ2UN6SW5+54Ajhvbvl08qcxZF5kLZJw=; b=NtrBgise0HzRmnmSpsdGelHTTwocT9pKptcIaY46KwYs08yKMXCLl8TeHwDZAvKUw9 miCaoSCanRA+LxfcBSXjNezJDFA8kcym/aNCylEEk3QErSgAanpWZJTuzn5bKEpRMBYe zifQ43G2c8r3aiRNqkPlzRkrzb6nS51VjieXm5dEuZjLZzpTQFphLaiknvNE1QOKQZlE PRERzYmhVJ+7idSs+aZKsFYGk9dBE0fGcKTukpq4t1UI67WvabPAYzfA5sABIjV3+YNO jopGAVeI6kMWLZ4jRaKrVT/k/b6wrv4ZWcKcEqEtHrmtUxafG6VDJCnjFOmRGlL1nJ86 JWIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710765457; x=1711370257; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HanPhs+5pxNZQ2UN6SW5+54Ajhvbvl08qcxZF5kLZJw=; b=P7TU8BZhKZuxTkhQS58EAM1lWeVR/xVByww1+jJxqH4Q3GLemZOckzvxuDCYB5mmDU sjsTJ60whcMnJLAXwPmBC8XoLj3yA2/ew+JT86+YWpkH8nPUkRSJBNax8RwZu/C10aOM 8YdTJsNhMYny9cVMSe7STOEuvEgn+V8umlpSJzLLsYDw4jEv0qrwP44SljbX5Y/A1EZh py2fPpB8ZtEV69SdiNWdltYOdghQeLo/3pKlFjnwFp3u9TlxRa9uLAqmnIF3h+uU9qSj ILmaFGWxDjnLpo9lMiP+Ze5DL9GlU1EDmEzqtmNGuZg0mdLQ1CnbccQn7GjBj4wH4bG6 eP3Q== X-Forwarded-Encrypted: i=1; AJvYcCU2XmO/nIKiO5sSRaxKJ8yDYd3I2ZPcboeXEEDFBxUE55xC5LPM4XTKpFCfPyLNY4wBmPNk260+xwJk9BcSMstoSjDJggZC3bR0duYCdFYjk/lsEAo= X-Gm-Message-State: AOJu0YyaOLZj32coWNv6lG4/J4MQBCz8v2BsRZRJXbJMYBxETeDeE903 FJonD6nWL6GPQDcxO4LOzri5STlojmKo4rUzj4/iJu6uBdMMZkNp X-Google-Smtp-Source: AGHT+IE28j3JMcgmkhIHT5C2xjMBKmVzdMK31Wr/3TQ9SLPD+hsnPLfW9CeJ8hkB4t35V3ofHy0FWQ== X-Received: by 2002:a05:6a20:9185:b0:1a3:6b98:9a84 with SMTP id v5-20020a056a20918500b001a36b989a84mr852665pzd.10.1710765456826; Mon, 18 Mar 2024 05:37:36 -0700 (PDT) Received: from [172.16.116.58] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id r3-20020a17090ad40300b0029c68206e2bsm7569501pju.0.2024.03.18.05.37.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Mar 2024 05:37:36 -0700 (PDT) Message-ID: Date: Mon, 18 Mar 2024 18:07:17 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/8] dt-bindings: misc: Add mikrobus-connector To: Rob Herring Cc: linux-kernel@vger.kernel.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Vaishnav M A , Krzysztof Kozlowski , Conor Dooley , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Liam Girdwood , Mark Brown , Jiri Slaby , Johan Hovold , Alex Elder , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-serial@vger.kernel.org, greybus-dev@lists.linaro.org References: <20240315184908.500352-1-ayushdevel1325@gmail.com> <20240315184908.500352-2-ayushdevel1325@gmail.com> <20240317205927.GA2178147-robh@kernel.org> Content-Language: en-US From: Ayush Singh In-Reply-To: <20240317205927.GA2178147-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240318_053739_254744_7EC9663B X-CRM114-Status: GOOD ( 28.29 ) 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 A new version of the patch is up and can be found here: https://lore.kernel.org/lkml/20240317193714.403132-1-ayushdevel1325@gmail.com/ On 3/18/24 02:29, Rob Herring wrote: > On Sat, Mar 16, 2024 at 12:18:59AM +0530, 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. >> >> Signed-off-by: Ayush Singh >> --- >> .../bindings/misc/mikrobus-connector.yaml | 110 ++++++++++++++++++ >> MAINTAINERS | 6 + >> 2 files changed, 116 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/misc/mikrobus-connector.yaml >> >> diff --git a/Documentation/devicetree/bindings/misc/mikrobus-connector.yaml b/Documentation/devicetree/bindings/misc/mikrobus-connector.yaml >> new file mode 100644 >> index 000000000000..6eace2c0dddc >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/misc/mikrobus-connector.yaml >> @@ -0,0 +1,110 @@ >> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/misc/mikrobus-connector.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: mikroBUS add-on board socket >> + >> +maintainers: >> + - Ayush Singh >> + >> +properties: >> + compatible: >> + const: mikrobus-connector >> + >> + pinctrl-0: true >> + pinctrl-1: true >> + pinctrl-2: true >> + pinctrl-3: true >> + pinctrl-4: true >> + pinctrl-5: true >> + pinctrl-6: true >> + pinctrl-7: true >> + pinctrl-8: true >> + >> + pinctrl-names: >> + items: >> + - const: default >> + - const: pwm_default >> + - const: pwm_gpio >> + - const: uart_default >> + - const: uart_gpio >> + - const: i2c_default >> + - const: i2c_gpio >> + - const: spi_default >> + - const: spi_gpio >> + >> + mikrobus-gpios: >> + minItems: 11 >> + maxItems: 12 > What is each GPIO entry? > >> + >> + i2c-adapter: > We already have i2c-bus and i2c-parent properties. Neither of those work > for you? I think i2c-bus should work. Although I could only find information about what it is supposed to be in some old kernel i2c.txt so is there a general place for such properties to be discovered? >> + description: i2c adapter attached to the mikrobus socket. >> + $ref: /schemas/types.yaml#/definitions/phandle >> + >> + spi-controller: >> + description: spi bus number of the spi-master attached to the mikrobus socket. >> + $ref: /schemas/types.yaml#/definitions/phandle >> + >> + uart: > Nice and consistent. In 3 properties, we have 'adapter', 'controller' > and ... Right. So the names I am currently using are from v2 of the patch and are based on Linux kernel names for this. But yes, they probably need to be changed since dt-bindings are not supposed to be tied to Linux. Not sure if `spi-bus` and `serial-bus` are appropriate though, so maybe `{spi, serial}-controller` is fine? To explain why these are here in the first place, mikroBUS addon boards are free to only use a few of these buses or multiple of these simultaneously. Also, some of the properties of spi, i2c etc device needs to be changed depending on the mikroBUS board (mostly described by mikroBUS manifest). This means, the driver needs access to i2c adapter, spi controller, serdev-controller, pwm associated with the mikroBUS connector to configure them (or not use them in case of Not Connected) and register the board. > Also, DT generally uses 'serial' rather than 'uart'. Noted >> + description: uart port attached to the mikrobus socket >> + $ref: /schemas/types.yaml#/definitions/phandle >> + >> + pwms: >> + description: the pwm-controller corresponding to the mikroBUS PWM pin. >> + maxItems: 1 >> + >> + spi-cs: >> + description: spi chip-select numbers corresponding to the chip-selects on the mikrobus socket. >> + $ref: /schemas/types.yaml#/definitions/uint32-array >> + items: >> + - description: chip select corresponding to CS pin >> + - description: chip select corresponding to RST pin > How would someone handle any of the properties defined in > spi-peripheral-props.yaml? > > > Rob After taking a look at `spi-peripheral-props.yaml`, the properties described here will actually be specified by mikroBUS manifest and thus will be set by the driver after parsing the manifest. If you are referring to keeping `spi-cs` in sync with `reg`, well I'm not quite sure how to do it better than the current implementation. Ayush Singh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel