public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Ayush Singh <ayushdevel1325@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: linux-kernel@vger.kernel.org, jkridner@beagleboard.org,
	robertcnelson@beagleboard.org,
	Vaishnav M A <vaishnav@beagleboard.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, Nishanth Menon <nm@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tero Kristo <kristo@kernel.org>,
	Derek Kiernan <derek.kiernan@amd.com>,
	Dragan Cvetic <dragan.cvetic@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
	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
Subject: Re: [PATCH v3 1/8] dt-bindings: misc: Add mikrobus-connector
Date: Mon, 18 Mar 2024 18:07:17 +0530	[thread overview]
Message-ID: <c3f5aa60-61e1-46df-8c3c-864e0acc750e@gmail.com> (raw)
In-Reply-To: <20240317205927.GA2178147-robh@kernel.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 <ayushdevel1325@gmail.com>
>> ---
>>   .../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 <ayushdevel1325@gmail.com>
>> +
>> +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 <null>...

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


  reply	other threads:[~2024-03-18 12:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 18:48 [PATCH v3 0/8] misc: Add mikroBUS driver Ayush Singh
2024-03-15 18:48 ` [PATCH v3 1/8] dt-bindings: misc: Add mikrobus-connector Ayush Singh
2024-03-15 20:09   ` Krzysztof Kozlowski
2024-03-15 20:20     ` Russell King (Oracle)
2024-03-15 20:40       ` Krzysztof Kozlowski
2024-03-15 21:00         ` Russell King (Oracle)
2024-03-17 20:59   ` Rob Herring
2024-03-18 12:37     ` Ayush Singh [this message]
2024-03-15 18:49 ` [PATCH v3 2/8] w1: Add w1_find_master_device Ayush Singh
2024-03-15 19:40   ` Russell King (Oracle)
2024-03-15 20:14   ` Krzysztof Kozlowski
2024-03-15 18:49 ` [PATCH v3 3/8] spi: Make of_find_spi_controller_by_node() available Ayush Singh
2024-03-15 18:49 ` [PATCH v3 4/8] serdev: add of_ helper to get serdev controller Ayush Singh
2024-03-15 20:16   ` Krzysztof Kozlowski
2024-03-15 18:49 ` [PATCH v3 5/8] regulator: fixed-helper: export regulator_register_always_on Ayush Singh
2024-03-15 18:49 ` [PATCH v3 6/8] greybus: Add mikroBUS manifest types Ayush Singh
2024-04-11 12:03   ` Greg Kroah-Hartman
2024-03-15 18:49 ` [PATCH v3 7/8] mikrobus: Add mikrobus driver Ayush Singh
2024-03-15 19:03   ` Mark Brown
2024-03-15 19:32   ` Russell King (Oracle)
     [not found]     ` <46ba778a-5966-4b99-b820-f0d047a56227@gmail.com>
2024-03-15 21:19       ` Russell King (Oracle)
2024-03-15 22:10         ` Vaishnav Achath
2024-03-15 20:35   ` Krzysztof Kozlowski
2024-03-16 13:06     ` Ayush Singh
2024-03-19  5:32       ` Krzysztof Kozlowski
2024-03-19  6:59         ` Ayush Singh
2024-03-20 11:56           ` Krzysztof Kozlowski
2024-03-16  8:18   ` kernel test robot
2024-03-16  9:00   ` kernel test robot
2024-03-15 18:49 ` [PATCH v3 8/8] dts: ti: k3-am625-beagleplay: Add mikroBUS Ayush Singh
2024-03-15 20:20   ` Krzysztof Kozlowski
2024-03-15 21:20 ` [PATCH v3 0/8] misc: Add mikroBUS driver Vaishnav M A
2024-03-15 21:41   ` Ayush Singh
2024-03-15 22:24     ` Vaishnav Achath
2024-03-17 14:41     ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c3f5aa60-61e1-46df-8c3c-864e0acc750e@gmail.com \
    --to=ayushdevel1325@gmail.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=derek.kiernan@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@amd.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=jirislaby@kernel.org \
    --cc=jkridner@beagleboard.org \
    --cc=johan@kernel.org \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh@kernel.org \
    --cc=vaishnav@beagleboard.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox