All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Michal Simek <michal.simek@xilinx.com>,
	dev@lists.96boards.org, Mark Brown <broonie@kernel.org>,
	John Stultz <john.stultz@linaro.org>,
	Andy Shevchenko <andy@infradead.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Frank Rowand <frowand.list@gmail.com>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/4] bus: Add DT bindings for 96Boards low speed connector
Date: Thu, 23 Aug 2018 08:45:52 -0500	[thread overview]
Message-ID: <CAL_JsqK2tdGHkeJ0OceLbBiki7VUqKrstDSiB7KRpZ-FExHtQw@mail.gmail.com> (raw)
In-Reply-To: <20180823103332.32047-4-linus.walleij@linaro.org>

On Thu, Aug 23, 2018 at 5:33 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> We need to be able to grab resources on a 96Boards low
> speed connector to populate and use a daughterboard, so
> define some very rudimentary properties simply passing
> phandles for the resources used on the low speed
> connector.

This only works for describing what's on the connector, but does
nothing for describing downstream devices on the connector. We already
have a way to do the former with label properties at least for uart,
i2c and spi. And gpio has it's own method of labeling lines.

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  .../bus/96boards,low-speed-connector.txt      | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt
>
> diff --git a/Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt b/Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt
> new file mode 100644
> index 000000000000..6631b3edd01f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt
> @@ -0,0 +1,50 @@
> +96Boards Low Speed Connectors
> +
> +The 96Boards connectors represent a non-dicoverable Low Speed (LS)
> +and High Speed (HS) external bus on the 96Board development
> +boards. Each 96Board presents both of these connectors.
> +
> +The Low Speed (LS) connector is a 40 pin 2x20 female pin header:
> +- Power
> +- Two buttons: power and reset
> +- 2 x UART one optional with just RX/TX, one required with modem
> +  CTS/RTS
> +- 2 x I2C
> +- 1 x SPI
> +- 1 x I2S (audio)
> +- 12 x GPIO lines named GPIO-A thru GPIO-L
> +
> +Further details on the electronics and signals are available in
> +"96Boards Consumer Edition, Low Cost Hardware Platform Specification"
> +As of writing version 1.0, January 2015.
> +
> +Required properties:
> +
> +- compatible: shall be "96boards,low-speed-connector"
> +- i2c0: phandle to the I2C0 bus
> +- i2c1: phandle to the I2C1 bus
> +- spi: phandle to the SPI bus
> +- gpios: a list of phandles to the GPIOs connected to the
> +  connector. The handles need to be uniformly specified with the
> +  0 flag as the connector is not the end consumer.
> +
> +Example:
> +
> +lscon: connector {
> +       compatible = "96boards,low-speed-connector";
> +       i2c0 = <&i2csw_0>;
> +       i2c1 = <&i2csw_1>;
> +       spi = <&spi0>;

David G has suggested using aliases (in this node, not top-level) for
this purpose of mapping things like spi and i2c, and I think that's a
good use of aliases (versus spi and i2c aliases at the top level which
I don't). The hard part is still how to structure the child devices.

> +       gpios = <&gpio 36 0>, /* GPIO-A */

We defined 'gpio-map' specifically for handling GPIOs thru connectors.
It's in the DT spec (though not a released version yet). Use it here.

Sorry, but the only halfway solution I'm going to accept is one which
can evolve into a full solution. Define the basic structure and add
each interface one by one. Maybe that starts with just:

lscon: connector {
       compatible = "96boards,low-speed-connector";
};

That's not really my recommendation as that's really just kicking the
can down the road.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: robh+dt@kernel.org (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] bus: Add DT bindings for 96Boards low speed connector
Date: Thu, 23 Aug 2018 08:45:52 -0500	[thread overview]
Message-ID: <CAL_JsqK2tdGHkeJ0OceLbBiki7VUqKrstDSiB7KRpZ-FExHtQw@mail.gmail.com> (raw)
In-Reply-To: <20180823103332.32047-4-linus.walleij@linaro.org>

On Thu, Aug 23, 2018 at 5:33 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> We need to be able to grab resources on a 96Boards low
> speed connector to populate and use a daughterboard, so
> define some very rudimentary properties simply passing
> phandles for the resources used on the low speed
> connector.

This only works for describing what's on the connector, but does
nothing for describing downstream devices on the connector. We already
have a way to do the former with label properties at least for uart,
i2c and spi. And gpio has it's own method of labeling lines.

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  .../bus/96boards,low-speed-connector.txt      | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt
>
> diff --git a/Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt b/Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt
> new file mode 100644
> index 000000000000..6631b3edd01f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/96boards,low-speed-connector.txt
> @@ -0,0 +1,50 @@
> +96Boards Low Speed Connectors
> +
> +The 96Boards connectors represent a non-dicoverable Low Speed (LS)
> +and High Speed (HS) external bus on the 96Board development
> +boards. Each 96Board presents both of these connectors.
> +
> +The Low Speed (LS) connector is a 40 pin 2x20 female pin header:
> +- Power
> +- Two buttons: power and reset
> +- 2 x UART one optional with just RX/TX, one required with modem
> +  CTS/RTS
> +- 2 x I2C
> +- 1 x SPI
> +- 1 x I2S (audio)
> +- 12 x GPIO lines named GPIO-A thru GPIO-L
> +
> +Further details on the electronics and signals are available in
> +"96Boards Consumer Edition, Low Cost Hardware Platform Specification"
> +As of writing version 1.0, January 2015.
> +
> +Required properties:
> +
> +- compatible: shall be "96boards,low-speed-connector"
> +- i2c0: phandle to the I2C0 bus
> +- i2c1: phandle to the I2C1 bus
> +- spi: phandle to the SPI bus
> +- gpios: a list of phandles to the GPIOs connected to the
> +  connector. The handles need to be uniformly specified with the
> +  0 flag as the connector is not the end consumer.
> +
> +Example:
> +
> +lscon: connector {
> +       compatible = "96boards,low-speed-connector";
> +       i2c0 = <&i2csw_0>;
> +       i2c1 = <&i2csw_1>;
> +       spi = <&spi0>;

David G has suggested using aliases (in this node, not top-level) for
this purpose of mapping things like spi and i2c, and I think that's a
good use of aliases (versus spi and i2c aliases at the top level which
I don't). The hard part is still how to structure the child devices.

> +       gpios = <&gpio 36 0>, /* GPIO-A */

We defined 'gpio-map' specifically for handling GPIOs thru connectors.
It's in the DT spec (though not a released version yet). Use it here.

Sorry, but the only halfway solution I'm going to accept is one which
can evolve into a full solution. Define the basic structure and add
each interface one by one. Maybe that starts with just:

lscon: connector {
       compatible = "96boards,low-speed-connector";
};

That's not really my recommendation as that's really just kicking the
can down the road.

Rob

  reply	other threads:[~2018-08-23 13:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 10:33 [PATCH 0/4 v1] Mezzanine Low Speed connector bus Linus Walleij
2018-08-23 10:33 ` Linus Walleij
2018-08-23 10:33 ` [PATCH 1/4] eeprom: at24: Allow passing gpiodesc from pdata Linus Walleij
2018-08-23 10:33   ` Linus Walleij
2018-08-23 11:14   ` Bartosz Golaszewski
2018-08-23 11:14     ` Bartosz Golaszewski
2018-08-23 10:33 ` [PATCH 2/4] spi: Make of_find_spi_device_by_node() available Linus Walleij
2018-08-23 10:33   ` Linus Walleij
2018-08-23 10:33 ` [PATCH 3/4] bus: Add DT bindings for 96Boards low speed connector Linus Walleij
2018-08-23 10:33   ` Linus Walleij
2018-08-23 13:45   ` Rob Herring [this message]
2018-08-23 13:45     ` Rob Herring
2018-09-05  9:05     ` Linus Walleij
2018-09-05  9:05       ` Linus Walleij
2018-08-23 10:33 ` [PATCH 4/4] bus: 96boards Low-Speed Connector Linus Walleij
2018-08-23 10:33   ` Linus Walleij
2018-08-23 23:06 ` [PATCH 0/4 v1] Mezzanine Low Speed connector bus Frank Rowand
2018-08-23 23:06   ` Frank Rowand
2018-08-24  7:28   ` Linus Walleij
2018-08-24  7:28     ` Linus Walleij
2018-11-15 16:26   ` Frank Rowand
2018-11-15 16:26     ` Frank Rowand
2018-11-15 22:59     ` Linus Walleij
2018-11-15 22:59       ` Linus Walleij
2018-11-16  0:16       ` Frank Rowand
2018-11-16  0:16         ` Frank Rowand

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=CAL_JsqK2tdGHkeJ0OceLbBiki7VUqKrstDSiB7KRpZ-FExHtQw@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=andy@infradead.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=dev@lists.96boards.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=john.stultz@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=mika.westerberg@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.