* [PATCH 0/3] DT labels for connector device mapping
@ 2015-12-10 21:21 Rob Herring
2015-12-10 21:21 ` [PATCH 1/3] arm64: dts: apq8016-sbc: enable UART0 on LS connector Rob Herring
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Rob Herring @ 2015-12-10 21:21 UTC (permalink / raw)
To: linux-arm-kernel
Having a common connector interface across different platforms can be
problematic for determining which SOC device is connected to which
connector pins. The standard DT property "label" is intended to provide
a human readable name for a device and can be used to provide this
information. Then userspace can can read the label to determine the
device mapping. For example:
for f in $(ls -d /sys/class/tty/tty*); do
label=$(cat $f/device/of_node/label)
if [ "$label" = "LS-UART1" ]; then
# you've found UART1, so do something with it.
# $f/dev is the major:minor for the /dev node
fi
done
This series adds labels on hikey and dragonboard 410c devices for the
low speed and high speed connectors. Not tested at all.
BTW, there are no platform maintainers listed for these files. Setting
them should be enforced for the dts files as DT maintainers mainly
review binding docs, not dts files.
Rob
Rob Herring (3):
arm64: dts: apq8016-sbc: enable UART0 on LS connector
arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI
arm64: dts: hikey: add label properties to UARTs
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 7 +++++++
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 14 ++++++++++++++
2 files changed, 21 insertions(+)
--
2.5.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] arm64: dts: apq8016-sbc: enable UART0 on LS connector
2015-12-10 21:21 [PATCH 0/3] DT labels for connector device mapping Rob Herring
@ 2015-12-10 21:21 ` Rob Herring
2015-12-10 21:21 ` [PATCH 2/3] arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI Rob Herring
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2015-12-10 21:21 UTC (permalink / raw)
To: linux-arm-kernel
The LS UART0 is not used by anything else and should be enabled for
expansion boards.
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Andy Gross <agross@codeaurora.org>
---
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 6b8abbe..7505fa3 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -27,6 +27,13 @@
};
soc {
+ serial at 78af000 {
+ status = "okay";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&blsp1_uart1_default>;
+ pinctrl-1 = <&blsp1_uart1_sleep>;
+ };
+
serial at 78b0000 {
status = "okay";
pinctrl-names = "default", "sleep";
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI
2015-12-10 21:21 [PATCH 0/3] DT labels for connector device mapping Rob Herring
2015-12-10 21:21 ` [PATCH 1/3] arm64: dts: apq8016-sbc: enable UART0 on LS connector Rob Herring
@ 2015-12-10 21:21 ` Rob Herring
2015-12-11 23:14 ` Kevin Hilman
2015-12-10 21:21 ` [PATCH 3/3] arm64: dts: hikey: add label properties to UARTs Rob Herring
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2015-12-10 21:21 UTC (permalink / raw)
To: linux-arm-kernel
Add label properties to provide a way to identify UART, I2C and SPI
ports based on their connector names. This follows naming convention in
96boards CE spec. Ports without external connections are not labelled.
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Andy Gross <agross@codeaurora.org>
---
arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
index 7505fa3..14fafa1 100644
--- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
@@ -28,6 +28,7 @@
soc {
serial at 78af000 {
+ label = "LS-UART0";
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&blsp1_uart1_default>;
@@ -35,6 +36,7 @@
};
serial at 78b0000 {
+ label = "LS-UART1";
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&blsp1_uart2_default>;
@@ -43,26 +45,31 @@
i2c at 78b6000 {
/* On Low speed expansion */
+ label = "LS-I2C0";
status = "okay";
};
i2c at 78b8000 {
/* On High speed expansion */
+ label = "HS-I2C2";
status = "okay";
};
i2c at 78ba000 {
/* On Low speed expansion */
+ label = "LS-I2C1";
status = "okay";
};
spi at 78b7000 {
/* On High speed expansion */
+ label = "HS-SPI1";
status = "okay";
};
spi at 78b9000 {
/* On Low speed expansion */
+ label = "LS-SPI0";
status = "okay";
};
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] arm64: dts: hikey: add label properties to UARTs
2015-12-10 21:21 [PATCH 0/3] DT labels for connector device mapping Rob Herring
2015-12-10 21:21 ` [PATCH 1/3] arm64: dts: apq8016-sbc: enable UART0 on LS connector Rob Herring
2015-12-10 21:21 ` [PATCH 2/3] arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI Rob Herring
@ 2015-12-10 21:21 ` Rob Herring
2015-12-10 21:36 ` [PATCH 0/3] DT labels for connector device mapping Jorge Ramirez-Ortiz
2015-12-22 19:25 ` Olof Johansson
4 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2015-12-10 21:21 UTC (permalink / raw)
To: linux-arm-kernel
Add label properties to provide a way to identify UARTs based on their
board or connector name. This follows naming convention in 96boards CE
spec. Ports without external connections are not labelled.
Signed-off-by: Rob Herring <robh@kernel.org>
---
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index 8d43a0f..8185251 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -32,3 +32,10 @@
reg = <0x0 0x0 0x0 0x40000000>;
};
};
+
+&uart2 {
+ label = "LS-UART0";
+};
+&uart3 {
+ label = "LS-UART1";
+};
--
2.5.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 0/3] DT labels for connector device mapping
2015-12-10 21:21 [PATCH 0/3] DT labels for connector device mapping Rob Herring
` (2 preceding siblings ...)
2015-12-10 21:21 ` [PATCH 3/3] arm64: dts: hikey: add label properties to UARTs Rob Herring
@ 2015-12-10 21:36 ` Jorge Ramirez-Ortiz
2015-12-11 0:00 ` Rob Herring
2015-12-22 19:25 ` Olof Johansson
4 siblings, 1 reply; 8+ messages in thread
From: Jorge Ramirez-Ortiz @ 2015-12-10 21:36 UTC (permalink / raw)
To: linux-arm-kernel
On 12/10/2015 04:21 PM, Rob Herring wrote:
> Having a common connector interface across different platforms can be
> problematic for determining which SOC device is connected to which
> connector pins. The standard DT property "label" is intended to provide
> a human readable name for a device and can be used to provide this
> information. Then userspace can can read the label to determine the
> device mapping. For example:
>
> for f in $(ls -d /sys/class/tty/tty*); do
> label=$(cat $f/device/of_node/label)
> if [ "$label" = "LS-UART1" ]; then
> # you've found UART1, so do something with it.
> # $f/dev is the major:minor for the /dev node
> fi
> done
>
> This series adds labels on hikey and dragonboard 410c devices for the
> low speed and high speed connectors. Not tested at all.
should we then use the line-name property on the GPIOs to have a common naming
convention across all 96Boards boards?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/3] DT labels for connector device mapping
2015-12-10 21:36 ` [PATCH 0/3] DT labels for connector device mapping Jorge Ramirez-Ortiz
@ 2015-12-11 0:00 ` Rob Herring
0 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2015-12-11 0:00 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 10, 2015 at 3:36 PM, Jorge Ramirez-Ortiz
<jorge.ramirez-ortiz@linaro.org> wrote:
> On 12/10/2015 04:21 PM, Rob Herring wrote:
>> Having a common connector interface across different platforms can be
>> problematic for determining which SOC device is connected to which
>> connector pins. The standard DT property "label" is intended to provide
>> a human readable name for a device and can be used to provide this
>> information. Then userspace can can read the label to determine the
>> device mapping. For example:
>>
>> for f in $(ls -d /sys/class/tty/tty*); do
>> label=$(cat $f/device/of_node/label)
>> if [ "$label" = "LS-UART1" ]; then
>> # you've found UART1, so do something with it.
>> # $f/dev is the major:minor for the /dev node
>> fi
>> done
>>
>> This series adds labels on hikey and dragonboard 410c devices for the
>> low speed and high speed connectors. Not tested at all.
>
> should we then use the line-name property on the GPIOs to have a common naming
> convention across all 96Boards boards?
I left GPIOs out purpose, but they do need to be handled. I'm not
certain that gpio-hogs is what we want to use here. The other cases
have no s/w impact as label is ignored. The same is not true of
gpio-hogs. Also, if we consider that we may want to describe GPIO
connections to daughterboards with DT overlays, then we wound not want
the gpio-hogs in the DT. That gets into a whole other set of issues
needing a way to remap connector signals to have overlays which work
across different base boards.
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI
2015-12-10 21:21 ` [PATCH 2/3] arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI Rob Herring
@ 2015-12-11 23:14 ` Kevin Hilman
0 siblings, 0 replies; 8+ messages in thread
From: Kevin Hilman @ 2015-12-11 23:14 UTC (permalink / raw)
To: linux-arm-kernel
Rob Herring <robh@kernel.org> writes:
> Add label properties to provide a way to identify UART, I2C and SPI
> ports based on their connector names. This follows naming convention in
> 96boards CE spec. Ports without external connections are not labelled.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: Andy Gross <agross@codeaurora.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Tested this on my db410c (along with script from cover letter) and it
works great.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/3] DT labels for connector device mapping
2015-12-10 21:21 [PATCH 0/3] DT labels for connector device mapping Rob Herring
` (3 preceding siblings ...)
2015-12-10 21:36 ` [PATCH 0/3] DT labels for connector device mapping Jorge Ramirez-Ortiz
@ 2015-12-22 19:25 ` Olof Johansson
4 siblings, 0 replies; 8+ messages in thread
From: Olof Johansson @ 2015-12-22 19:25 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Dec 10, 2015 at 03:21:10PM -0600, Rob Herring wrote:
> Having a common connector interface across different platforms can be
> problematic for determining which SOC device is connected to which
> connector pins. The standard DT property "label" is intended to provide
> a human readable name for a device and can be used to provide this
> information. Then userspace can can read the label to determine the
> device mapping. For example:
>
> for f in $(ls -d /sys/class/tty/tty*); do
> label=$(cat $f/device/of_node/label)
> if [ "$label" = "LS-UART1" ]; then
> # you've found UART1, so do something with it.
> # $f/dev is the major:minor for the /dev node
> fi
> done
>
> This series adds labels on hikey and dragonboard 410c devices for the
> low speed and high speed connectors. Not tested at all.
>
> BTW, there are no platform maintainers listed for these files. Setting
> them should be enforced for the dts files as DT maintainers mainly
> review binding docs, not dts files.
>
> Rob
>
> Rob Herring (3):
> arm64: dts: apq8016-sbc: enable UART0 on LS connector
> arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI
> arm64: dts: hikey: add label properties to UARTs
Applied all 3 to next/dt64.
-Olof
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-22 19:25 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10 21:21 [PATCH 0/3] DT labels for connector device mapping Rob Herring
2015-12-10 21:21 ` [PATCH 1/3] arm64: dts: apq8016-sbc: enable UART0 on LS connector Rob Herring
2015-12-10 21:21 ` [PATCH 2/3] arm64: dts: apq8016-sbc: add label properties for UART, I2C, and SPI Rob Herring
2015-12-11 23:14 ` Kevin Hilman
2015-12-10 21:21 ` [PATCH 3/3] arm64: dts: hikey: add label properties to UARTs Rob Herring
2015-12-10 21:36 ` [PATCH 0/3] DT labels for connector device mapping Jorge Ramirez-Ortiz
2015-12-11 0:00 ` Rob Herring
2015-12-22 19:25 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).