dt-bindings: add power domains to Tegra BPMP firmware
PATCH 1/3 dt-bindings: add power domains to Tegra BPMP firmware
From: Stephen Warren <[email protected]>
The Tegra186 BPMP is also a provider of power domains. Enhance the device tree binding to describe this.
---
These patches all build on top of Joseph Lo's baseline BPMP binding patches[1] and enhance them to represent a few more features of the firmware.
[1] https://lkml.org/lkml/2016/7/19/280
"[PATCH V3 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox"
.../bindings/firmware/nvidia,tegra186-bpmp.txt | 10 ++++-- include/dt-bindings/power/tegra186-powergate.h | 39 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/power/tegra186-powergate.h
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +7 -3
@@ -17,6 +17,7 @@ Required properties: - shmem : List of the phandle of the TX and RX shared memory area that the IPC between CPU and BPMP is based on. - #clock-cells : Should be 1. +- #power-domain-cells : Should be 1. - #reset-cells : Should be 1. This node is a mailbox consumer. See the following files for details of
@@ -26,12 +27,14 @@ provider(s): - .../mailbox/mailbox.txt - .../mailbox/nvidia,tegra186-hsp.txt -This node is a clock and reset provider. See the following files for -general documentation of those features, and the specifiers implemented -by this node: +This node is a clock, power domain, and reset provider. See the following +files for general documentation of those features, and the specifiers +implemented by this node: - .../clock/clock-bindings.txt - <dt-bindings/clock/tegra186-clock.h> +- ../power/power_domain.txt +- <dt-bindings/power/tegra186-powergate.h> - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h>
@@ -73,5 +76,6 @@ bpmp { mboxes = <&hsp_top0 HSP_MBOX_TYPE_DB HSP_DB_MASTER_BPMP>; shmem = <&cpu_bpmp_tx &cpu_bpmp_rx>; #clock-cells = <1>; + #power-domain-cells = <1>; #reset-cells = <1>; };
include/dt-bindings/power/tegra186-powergate.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _DT_BINDINGS_POWER_TEGRA186_POWERGATE_H +#define _DT_BINDINGS_POWER_TEGRA186_POWERGATE_H + +#define TEGRA186_POWER_DOMAIN_AUD 0 +#define TEGRA186_POWER_DOMAIN_DFD 1 +#define TEGRA186_POWER_DOMAIN_DISP 2 +#define TEGRA186_POWER_DOMAIN_DISPB 3 +#define TEGRA186_POWER_DOMAIN_DISPC 4 +#define TEGRA186_POWER_DOMAIN_ISPA 5 +#define TEGRA186_POWER_DOMAIN_NVDEC 6 +#define TEGRA186_POWER_DOMAIN_NVJPG 7 +#define TEGRA186_POWER_DOMAIN_MPE 8 +#define TEGRA186_POWER_DOMAIN_PCX 9 +#define TEGRA186_POWER_DOMAIN_SAX 10 +#define TEGRA186_POWER_DOMAIN_VE 11 +#define TEGRA186_POWER_DOMAIN_VIC 12 +#define TEGRA186_POWER_DOMAIN_XUSBA 13 +#define TEGRA186_POWER_DOMAIN_XUSBB 14 +#define TEGRA186_POWER_DOMAIN_XUSBC 15 +#define TEGRA186_POWER_DOMAIN_GPU 43 +#define TEGRA186_POWER_DOMAIN_MAX 44 + +#endif
Signature · 1 line
2.9.2
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +23 -0
@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separate nodes. +For example, it can provide access to certain I2C controllers, and the I2C +bindings represent each I2C controller as a device tree node. Such nodes should +be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node represents a device +by checking for a compatible property. Any node with a compatible property +represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding the BPMP +itself, although no such configuration nodes are currently defined by this +binding. + +The BPMP firmware defines no single global name-/numbering-space for such +services. Put another way, the numbering scheme for I2C buses is distinct from +the numbering scheme for any other service the BPMP may provide (e.g. a future +hypothetical SPI bus service). As such, child device nodes will have no reg +property, and the BPMP node will have no #address-cells or #size-cells property. + The shared memory bindings for BPMP -----------------------------------
@@ -78,4 +96,9 @@ bpmp { #clock-cells = <1>; #power-domain-cells = <1>; #reset-cells = <1>; + + bpmp-i2c { + compatible = "..."; + ... + }; };
Signature · 1 line
2.9.2
Rob Herring
maintainerPATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 42 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +18
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separate nodes. +For example, it can provide access to certain I2C controllers, and the I2C +bindings represent each I2C controller as a device tree node. Such nodes should +be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node represents a device +by checking for a compatible property. Any node with a compatible property +represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding the BPMP +itself, although no such configuration nodes are currently defined by this +binding. + +The BPMP firmware defines no single global name-/numbering-space for such +services. Put another way, the numbering scheme for I2C buses is distinct from +the numbering scheme for any other service the BPMP may provide (e.g. a future +hypothetical SPI bus service). As such, child device nodes will have no reg +property, and the BPMP node will have no #address-cells or #size-cells property. + The shared memory bindings for BPMP -----------------------------------
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt bpmp { · line 100
Quoted 5 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +2
-0@@ -78,4 +96,9 @@ bpmp { #clock-cells = <1>; #power-domain-cells = <1>; #reset-cells = <1>; + + bpmp-i2c {
Just 'i2c' here. With that:
Quoted 7 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+ compatible = "..."; + ... + }; };Signature · 1 line
2.9.2
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 51 lines · Rob Herring
Quoted 42 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +18
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separate nodes. +For example, it can provide access to certain I2C controllers, and the I2C +bindings represent each I2C controller as a device tree node. Such nodes should +be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node represents a device +by checking for a compatible property. Any node with a compatible property +represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding the BPMP +itself, although no such configuration nodes are currently defined by this +binding. + +The BPMP firmware defines no single global name-/numbering-space for such +services. Put another way, the numbering scheme for I2C buses is distinct from +the numbering scheme for any other service the BPMP may provide (e.g. a future +hypothetical SPI bus service). As such, child device nodes will have no reg +property, and the BPMP node will have no #address-cells or #size-cells property. + The shared memory bindings for BPMP -----------------------------------Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt bpmp { · line 100
Quoted 5 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +2
-0@@ -78,4 +96,9 @@ bpmp { #clock-cells = <1>; #power-domain-cells = <1>; #reset-cells = <1>; + + bpmp-i2c {Just 'i2c' here. With that:
Quoted 1 line
Acked-by Rob Herring <[email protected]>
What if we have multiple BPMP I2C buses? The node names need to be unique, and there's no concept of register number so we can't use a unit address to do that.
I guess we could go for plain "i2c" for now and defer the more general naming discussion until some later point if/when we actually instantiate multiple buses, but I would like to confirm we can solve the problem if/when that time comes.
(As an aside, "pwr-i2c" might be a better name for the current bus, when the time comes, since any/all I2C nodes inside the BPMP would be BPMP I2C buses).
Jon Hunter
maintainerPATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
In reply to Stephen WarrenQuoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Jon
Signature · 1 line
nvpublic
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
In reply to Stephen WarrenQuoted 27 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +7
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separate nodes. +For example, it can provide access to certain I2C controllers, and the I2C +bindings represent each I2C controller as a device tree node. Such nodes should +be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node represents a device +by checking for a compatible property. Any node with a compatible property
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt implemented by this node: · line 57
Quoted 10 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +10
-0+represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding the BPMP +itself, although no such configuration nodes are currently defined by this +binding. + +The BPMP firmware defines no single global name-/numbering-space for such +services. Put another way, the numbering scheme for I2C buses is distinct from +the numbering scheme for any other service the BPMP may provide (e.g. a future +hypothetical SPI bus service). As such, child device nodes will have no reg +property, and the BPMP node will have no #address-cells or #size-cells property.
My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
bpmp {
...
services {
i2c {
i2c at 0 {
reg = <0>;
...
};
i2c at 1 {
reg = <1>;
...
};
...
};
spi {
...
};
...
};
...
};Note that we could probably do without the "services" node, but this is explicit in categorizing these as services exposed by the BPMP. We might need the extra node to work around the issue that some child nodes of the BPMP node don't have a reg property (configuration nodes), whereas any of the services would have those. Although you could make the top- level "i2c" and "spi" nodes take #address-cells and #size-cells properties.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160726/a1f4f97b/attachment.sig>
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 44 lines · Thierry Reding
Quoted 27 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +7
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separate nodes. +For example, it can provide access to certain I2C controllers, and the I2C +bindings represent each I2C controller as a device tree node. Such nodes should +be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node represents a device +by checking for a compatible property. Any node with a compatible propertyDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt implemented by this node: · line 57
Quoted 10 lines
Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +10
-0+represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding the BPMP +itself, although no such configuration nodes are currently defined by this +binding. + +The BPMP firmware defines no single global name-/numbering-space for such +services. Put another way, the numbering scheme for I2C buses is distinct from +the numbering scheme for any other service the BPMP may provide (e.g. a future +hypothetical SPI bus service). As such, child device nodes will have no reg +property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
Quoted 7 lines
bpmp {
...
services {
i2c {
i2c at 0 {
reg = <0>;Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
Can we please just go with what we have? DT bindings are frankly an obstacle to getting anything done:-(
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 72 lines · Stephen Warren
Quoted 63 lines · Thierry Reding
Quoted 48 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and
the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644
---a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt
+++b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented byseparate nodes.
+For example, it can provide access to certain I2C controllers, and the I2C
+bindings represent each I2C controller as a device tree node. Such nodes shouldDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP noderepresents a device
+by checking for a compatible property. Any node with a compatible property
+represents a device that can be instantiated. Nodes without a compatible
+property may be used to provide configuration information regarding the BPMP
+itself, although no such configuration nodes are currently defined by thisDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
Quoted 8 lines
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provide (e.g. a future
+hypothetical SPI bus service). As such, child device nodes will have no reg
+property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
Quoted 7 lines
bpmp { ... services { i2c { i2c at 0 { reg = <0>;
Quoted 5 lines
Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
Can we please just go with what we have? DT bindings are frankly an obstacle to getting anything done:-(
Thierry, any further thoughts here? I really need to get these DT bindings finalized so that I can use them in U-Boot, which is very urgent. Thanks.
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 73 lines · Stephen Warren
Quoted 72 lines · Stephen Warren
Quoted 70 lines · Thierry Reding
Quoted 48 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and
the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644
---a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt
+++b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented byseparate nodes.
+For example, it can provide access to certain I2C controllers, and the I2C
+bindings represent each I2C controller as a device tree node. Such nodes shouldDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP noderepresents a device
+by checking for a compatible property. Any node with a compatible property
+represents a device that can be instantiated. Nodes without a compatible
+property may be used to provide configuration information regarding the BPMP
+itself, although no such configuration nodes are currently defined by thisDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
Quoted 8 lines
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provide (e.g. a future
+hypothetical SPI bus service). As such, child device nodes will have no reg
+property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
bpmp { ... services { i2c { i2c at 0 { reg = <0>;
Quoted 8 lines
Quoted 5 lines
Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
Can we please just go with what we have? DT bindings are frankly an obstacle to getting anything done:-(
Thierry, any further thoughts here? I really need to get these DT bindings finalized so that I can use them in U-Boot, which is very urgent. Thanks.
If everyone else is fine with these bindings, let's go ahead with them.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160728/e2991667/attachment.sig>
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
In reply to Stephen WarrenQuoted 66 lines · Stephen Warren
Quoted 65 lines · Thierry Reding
Quoted 45 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separatenodes.
+For example, it can provide access to certain I2C controllers, and the I2C
+bindings represent each I2C controller as a device tree node. Such nodes shouldDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node representsa device
+by checking for a compatible property. Any node with a compatible propertyDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +2
-0+represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding theBPMP
+itself, although no such configuration nodes are currently defined by thisDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
Quoted 8 lines
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provide (e.g. a future
+hypothetical SPI bus service). As such, child device nodes will have no reg
+property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
bpmp { ...
Quoted 8 lines
Quoted 4 lines
services { i2c { i2c at 0 { reg = <0>;Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
I think I questioned the need, not rejected. What about the above, but remove serivces level:
bpmp {
...
i2c {
i2c at 0 {
reg = <0>;Rob
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 79 lines · Rob Herring
Quoted 66 lines · Stephen Warren
Quoted 65 lines · Thierry Reding
Quoted 45 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separatenodes.
+For example, it can provide access to certain I2C controllers, and the I2C
+bindings represent each I2C controller as a device tree node. Such nodes shouldDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node representsa device
+by checking for a compatible property. Any node with a compatible propertyDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +2
-0+represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding theBPMP
+itself, although no such configuration nodes are currently defined by thisDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
Quoted 8 lines
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provide (e.g. a future
+hypothetical SPI bus service). As such, child device nodes will have no reg
+property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
bpmp { ...Quoted 8 lines
Quoted 4 lines
services { i2c { i2c at 0 { reg = <0>;Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
I think I questioned the need, not rejected. What about the above, but remove serivces level:
Quoted 6 lines
bpmp {
...
i2c {
i2c at 0 {
reg = <0>;Sigh. Can you please talk to Thierry and work out what the binding would be (perhaps on IRC to expedite things?) and I'll just implement whatever you two agree upon. I don't really care much what the binding looks like any more; I just need something that will pass review. Thanks.
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 83 lines · Stephen Warren
Quoted 82 lines · Rob Herring
Quoted 66 lines · Stephen Warren
Quoted 65 lines · Thierry Reding
Quoted 45 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separatenodes.
+For example, it can provide access to certain I2C controllers, and the I2C
+bindings represent each I2C controller as a device tree node. Such nodes shouldDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node representsa device
+by checking for a compatible property. Any node with a compatible propertyDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +2
-0+represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding theBPMP
+itself, although no such configuration nodes are currently defined by thisDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
Quoted 8 lines
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provide (e.g. a future
+hypothetical SPI bus service). As such, child device nodes will have no reg
+property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
bpmp { ...Quoted 8 lines
Quoted 4 lines
services { i2c { i2c at 0 { reg = <0>;Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
I think I questioned the need, not rejected. What about the above, but remove serivces level:
bpmp { ...
Quoted 8 lines
Quoted 3 lines
i2c { i2c at 0 { reg = <0>;Sigh. Can you please talk to Thierry and work out what the binding would be (perhaps on IRC to expedite things?) and I'll just implement whatever you two agree upon. I don't really care much what the binding looks like any more; I just need something that will pass review. Thanks.
Like I said, I'm fine going with what you proposed. I'm sure by now the BPMP has long been frozen and if the proposed binding works fine that's good. No need to over-engineer.
If we ever need more than one I2C (or expose other busses) I'm sure we can find a way to switch to something like the above later on. Like I said, that's very unlikely to happen on Tegra186, so we'll have a new compatible string (and hence an easy way to differentiate between these bindings) anyway.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160729/1209e25e/attachment.sig>
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 88 lines · Thierry Reding
Quoted 87 lines · Stephen Warren
Quoted 85 lines · Rob Herring
Quoted 66 lines · Stephen Warren
Quoted 65 lines · Thierry Reding
Quoted 45 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented by separatenodes.
+For example, it can provide access to certain I2C controllers, and the I2C
+bindings represent each I2C controller as a device tree node. Such nodes shouldDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP node representsa device
+by checking for a compatible property. Any node with a compatible propertyDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +2
-0+represents a device that can be instantiated. Nodes without a compatible +property may be used to provide configuration information regarding theBPMP
+itself, although no such configuration nodes are currently defined by thisDocumentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
Quoted 8 lines
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provide (e.g. a future
+hypothetical SPI bus service). As such, child device nodes will have no reg
+property, and the BPMP node will have no #address-cells or #size-cells property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
bpmp { ...Quoted 8 lines
Quoted 4 lines
services { i2c { i2c at 0 { reg = <0>;Technically, that is possible. However, Rob Herring rejected the idea of multiple levels of sub-nodes.
I think I questioned the need, not rejected. What about the above, but remove serivces level:
bpmp { ... i2c { i2c at 0 { reg = <0>;
Quoted 6 lines
Quoted 4 lines
Sigh. Can you please talk to Thierry and work out what the binding would be (perhaps on IRC to expedite things?) and I'll just implement whatever you two agree upon. I don't really care much what the binding looks like any more; I just need something that will pass review. Thanks.
Like I said, I'm fine going with what you proposed.
OK, great. For the record, I'm going to send U-Boot patches today that apply this binding patch (the original one I sent, unmodified) to the U-Boot tree, and implement it in the U-Boot driver.
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 122 lines · Stephen Warren
Quoted 121 lines · Thierry Reding
Quoted 117 lines · Stephen Warren
Quoted 102 lines · Rob Herring
Quoted 91 lines · Stephen Warren
Quoted 79 lines · Thierry Reding
Quoted 60 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate
nodes. For example, it can provide access to certain I2C controllers, and
the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644
---a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt
+++b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt(quoted diff) +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented byseparate
nodes.
+For example, it can provide access to certain I2C controllers, and the
I2C
+bindings represent each I2C controller as a device tree node. Such nodes
should(quoted diff) +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP noderepresents
a device
+by checking for a compatible property. Any node with a compatible property
+represents a device that can be instantiated. Nodes without a compatible
+property may be used to provide configuration information regarding the
BPMP
+itself, although no such configuration nodes are currently defined by
this(quoted diff) +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provideQuoted 8 lines
(e.g. a
future
+hypothetical SPI bus service). As such, child device nodes will have no
reg
+property, and the BPMP node will have no #address-cells or #size-cells
property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
Quoted 7 lines
bpmp { ... services { i2c { i2c at 0 { reg = <0>;Quoted 3 lines
Technically, that is possible. However, Rob Herring rejected the idea of
multiple levels of sub-nodes.I think I questioned the need, not rejected. What about the above, but remove serivces level:
Quoted 6 lines
bpmp { ... i2c { i2c at 0 { reg = <0>;Sigh. Can you please talk to Thierry and work out what the binding would be
(perhaps on IRC to expedite things?) and I'll just implement whatever you two agree upon. I don't really care much what the binding looks like any more; I just need something that will pass review. Thanks.
Quoted 6 lines
Quoted 1 line
Like I said, I'm fine going with what you proposed.
OK, great. For the record, I'm going to send U-Boot patches today that apply this binding patch (the original one I sent, unmodified) to the U-Boot tree, and implement it in the U-Boot driver.
That's fine, I did ack that.
I really don't want to ask, but why are you documenting in u-boot? Is it some how different for u-boot?
Rob
PATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
Quoted 126 lines · Rob Herring
Quoted 125 lines · Stephen Warren
Quoted 122 lines · Thierry Reding
Quoted 112 lines · Stephen Warren
Quoted 102 lines · Rob Herring
Quoted 91 lines · Stephen Warren
Quoted 79 lines · Thierry Reding
Quoted 60 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate
nodes. For example, it can provide access to certain I2C controllers, and
the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)diff --git
a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtb/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txtindex9a3864f56955..142d363406f6100644
---a/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt
+++b/Documentation/devicetree/bindings/firmware/nvidia,tegra186-bpmp.txt(quoted diff) +1
-0@@ -38,6 +38,24 @@ implemented by this node: - .../reset/reset.txt - <dt-bindings/reset/tegra186-reset.h> +The BPMP implements some services which must be represented byseparate
nodes.
+For example, it can provide access to certain I2C controllers, and the
I2C
+bindings represent each I2C controller as a device tree node. Such nodes
should(quoted diff) +3
-0+be nested directly inside the main BPMP node. + +Software can determine whether a child node of the BPMP noderepresents
a device
+by checking for a compatible property. Any node with a compatible property
+represents a device that can be instantiated. Nodes without a compatible
+property may be used to provide configuration information regarding the
BPMP
+itself, although no such configuration nodes are currently defined by
this(quoted diff) +3
-0+binding. + +The BPMP firmware defines no single global name-/numbering-space forsuch
+services. Put another way, the numbering scheme for I2C buses is distinct from
+the numbering scheme for any other service the BPMP may provideQuoted 8 lines
(e.g. a
future
+hypothetical SPI bus service). As such, child device nodes will have no
reg
+property, and the BPMP node will have no #address-cells or #size-cells
property.My understanding is that the I2C bus number is passed as part of the request to the BPMP firmware. Does that not count as addressing? Could we not represent that generically using a device tree hierarchy? I'm thinking something along these lines:
Quoted 7 lines
bpmp { ... services { i2c { i2c at 0 { reg = <0>;Quoted 3 lines
Technically, that is possible. However, Rob Herring rejected the idea of
multiple levels of sub-nodes.I think I questioned the need, not rejected. What about the above, but remove serivces level:
Quoted 6 lines
bpmp { ... i2c { i2c at 0 { reg = <0>;Quoted 5 lines
Sigh. Can you please talk to Thierry and work out what the binding would be
(perhaps on IRC to expedite things?) and I'll just implement whatever you two agree upon. I don't really care much what the binding looks like any more; I just need something that will pass review. Thanks.Like I said, I'm fine going with what you proposed.
Quoted 8 lines
Quoted 3 lines
OK, great. For the record, I'm going to send U-Boot patches today that apply this binding patch (the original one I sent, unmodified) to the U-Boot tree, and implement it in the U-Boot driver.
That's fine, I did ack that.
I really don't want to ask, but why are you documenting in u-boot? Is it some how different for u-boot?
There's a copy of the DT binding documents in U-Boot as well. At least for the bindings I deal with, they should be the same, although the U-Boot copies might get stale as hopefully-backwards-compatible enhancements are made to the kernel versions.
I'm implementing a U-Boot driver for this new feature, so am copying these new binding docs into the U-Boot DT binding docs directory too.
I'd be happy personally not to have another copy of the bindings, and just tell people to refer to the docs in the kernel, or any other canonical source, but that's not my call.
Thierry Reding
AppliedPATCH 2/3 dt-bindings: allow child nodes inside the Tegra BPMP
In reply to Stephen WarrenQuoted 11 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The BPMP implements some services which must be represented by separate nodes. For example, it can provide access to certain I2C controllers, and the I2C bindings represent each I2C controller as a device tree node. Update the binding to describe how the BPMP supports this.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/firmware/nvidia,tegra186-bpmp.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Applied, with bpmp-i2c changed to i2c as per Rob's comment.
Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161115/3518be8e/attachment.sig>
PATCH 3/3 dt-bindings: add Tegra186 BPMP I2C binding
In reply to Stephen WarrenFrom: Stephen Warren <[email protected]>
In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW devices, such as the I2C controller for the power management I2C bus. Software running on other CPUs must perform IPC to the BPMP in order to execute transactions on that I2C bus. This binding describes an I2C bus that is accessed in such a fashion.
--- .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +42 -0
@@ -0,0 +1,42 @@ +NVIDIA Tegra186 BPMP I2C controller + +In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW +devices, such as the I2C controller for the power management I2C bus. Software +running on other CPUs must perform IPC to the BPMP in order to execute +transactions on that I2C bus. This binding describes an I2C bus that is +accessed in such a fashion. + +The BPMP I2C node must be located directly inside the main BPMP node. See +../firmware/nvidia,tegra186-bpmp.txt for details of the BPMP binding. + +This node represents an I2C controller. See ../i2c/i2c.txt for details of the +core I2C binding. + +Required properties: +- compatible: + Array of strings. + One of: + - "nvidia,tegra186-bpmp-i2c". +- #address-cells: Address cells for I2C device address. + Single-cell integer. + Must be <1>. +- #size-cells: + Single-cell integer. + Must be <0>. +- nvidia,bpmp-bus-id: + Single-cell integer. + Indicates the I2C bus number this DT node represent, as defined by the + BPMP firmware. + +Example: + +/ bpmp { + ... + + bpmp-i2c { + compatible = "nvidia,tegra186-bpmp-i2c"; + #address-cells = <1>; + #size-cells = <0>; + nvidia,bpmp-bus-id = <5>; + }; +};
Signature · 1 line
2.9.2
Rob Herring
maintainerPATCH 3/3 dt-bindings: add Tegra186 BPMP I2C binding
Quoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW devices, such as the I2C controller for the power management I2C bus. Software running on other CPUs must perform IPC to the BPMP in order to execute transactions on that I2C bus. This binding describes an I2C bus that is accessed in such a fashion.
Quoted 5 lines
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
Same node name comment, otherwise:
Jon Hunter
maintainerPATCH 3/3 dt-bindings: add Tegra186 BPMP I2C binding
In reply to Stephen WarrenQuoted 43 lines · Stephen Warren
From: Stephen Warren <[email protected]>
In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW devices, such as the I2C controller for the power management I2C bus. Software running on other CPUs must perform IPC to the BPMP in order to execute transactions on that I2C bus. This binding describes an I2C bus that is accessed in such a fashion.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txtDocumentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +23
-0@@ -0,0 +1,42 @@ +NVIDIA Tegra186 BPMP I2C controller + +In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW +devices, such as the I2C controller for the power management I2C bus. Software +running on other CPUs must perform IPC to the BPMP in order to execute +transactions on that I2C bus. This binding describes an I2C bus that is +accessed in such a fashion. + +The BPMP I2C node must be located directly inside the main BPMP node. See +../firmware/nvidia,tegra186-bpmp.txt for details of the BPMP binding. + +This node represents an I2C controller. See ../i2c/i2c.txt for details of the +core I2C binding. + +Required properties: +- compatible: + Array of strings. + One of: + - "nvidia,tegra186-bpmp-i2c". +- #address-cells: Address cells for I2C device address. + Single-cell integer. + Must be <1>. +- #size-cells:
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt line 33
Quoted 10 lines
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +10
-0+ Single-cell integer. + Must be <0>. +- nvidia,bpmp-bus-id: + Single-cell integer. + Indicates the I2C bus number this DT node represent, as defined by the + BPMP firmware. + +Example: + +/ bpmp {
Is this "/" intentional?
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt line 42
Quoted 10 lines
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +9
-0+ ... + + bpmp-i2c { + compatible = "nvidia,tegra186-bpmp-i2c"; + #address-cells = <1>; + #size-cells = <0>; + nvidia,bpmp-bus-id = <5>; + }; +};
Jon
Signature · 1 line
nvpublic
PATCH 3/3 dt-bindings: add Tegra186 BPMP I2C binding
Quoted 49 lines · Jon Hunter
Quoted 47 lines · Stephen Warren
From: Stephen Warren <[email protected]>
In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW devices, such as the I2C controller for the power management I2C bus. Software running on other CPUs must perform IPC to the BPMP in order to execute transactions on that I2C bus. This binding describes an I2C bus that is accessed in such a fashion.
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txtDocumentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +27
-0@@ -0,0 +1,42 @@ +NVIDIA Tegra186 BPMP I2C controller + +In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW +devices, such as the I2C controller for the power management I2C bus. Software +running on other CPUs must perform IPC to the BPMP in order to execute +transactions on that I2C bus. This binding describes an I2C bus that is +accessed in such a fashion. + +The BPMP I2C node must be located directly inside the main BPMP node. See +../firmware/nvidia,tegra186-bpmp.txt for details of the BPMP binding. + +This node represents an I2C controller. See ../i2c/i2c.txt for details of the +core I2C binding. + +Required properties: +- compatible: + Array of strings. + One of: + - "nvidia,tegra186-bpmp-i2c". +- #address-cells: Address cells for I2C device address. + Single-cell integer. + Must be <1>. +- #size-cells: + Single-cell integer. + Must be <0>. +- nvidia,bpmp-bus-id: + Single-cell integer.
Quoted 8 lines
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt line 33
Quoted 6 lines
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +6
-0+ Indicates the I2C bus number this DT node represent, as defined by the + BPMP firmware. + +Example: + +/ bpmp {Is this "/" intentional?
I think I meant to write "/bpmp" (i.e. without the space) to highlight where the node is in the overall hierarchy, but admittedly that's unusual. Yes, the "/ " should probably simply be removed.
Quoted 14 lines
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt line 42
Quoted 10 lines
Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt new file +9
-0+ ... + + bpmp-i2c { + compatible = "nvidia,tegra186-bpmp-i2c"; + #address-cells = <1>; + #size-cells = <0>; + nvidia,bpmp-bus-id = <5>; + }; +};Acked-by Jon Hunter <[email protected]>Jon
PATCH 3/3 dt-bindings: add Tegra186 BPMP I2C binding
In reply to Stephen WarrenQuoted 8 lines · Stephen Warren
From: Stephen Warren <[email protected]>
In Tegra186, the BPMP (Boot and Power Management Processor) owns certain HW devices, such as the I2C controller for the power management I2C bus. Software running on other CPUs must perform IPC to the BPMP in order to execute transactions on that I2C bus. This binding describes an I2C bus that is accessed in such a fashion.
Quoted 5 lines
Signed-off-by Stephen Warren <[email protected]>--- .../bindings/i2c/nvidia,tegra186-bpmp-i2c.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/nvidia,tegra186-bpmp-i2c.txt
I ended up cherry-picking this commit from U-Boot, which already had both of the comments addressed that were discussed here. I also took the liberty of adding Jon's Acked-by from this thread since it's effectively the same commit.
Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161115/27395f3b/attachment.sig>
Rob Herring
maintainerPATCH 1/3 dt-bindings: add power domains to Tegra BPMP firmware
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The Tegra186 BPMP is also a provider of power domains. Enhance the device tree binding to describe this.
Signed-off-by Stephen Warren <[email protected]>---
These patches all build on top of Joseph Lo's baseline BPMP binding patches[1] and enhance them to represent a few more features of the firmware.
Quoted 7 lines
[1] https://lkml.org/lkml/2016/7/19/280
"[PATCH V3 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox".../bindings/firmware/nvidia,tegra186-bpmp.txt | 10 ++++-- include/dt-bindings/power/tegra186-powergate.h | 39 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/power/tegra186-powergate.h
Jon Hunter
maintainerPATCH 1/3 dt-bindings: add power domains to Tegra BPMP firmware
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The Tegra186 BPMP is also a provider of power domains. Enhance the device tree binding to describe this.
Signed-off-by Stephen Warren <[email protected]>---
These patches all build on top of Joseph Lo's baseline BPMP binding patches[1] and enhance them to represent a few more features of the firmware.
Quoted 7 lines
[1] https://lkml.org/lkml/2016/7/19/280
"[PATCH V3 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox".../bindings/firmware/nvidia,tegra186-bpmp.txt | 10 ++++-- include/dt-bindings/power/tegra186-powergate.h | 39 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/power/tegra186-powergate.h
Jon
Signature · 1 line
nvpublic
Thierry Reding
AppliedPATCH 1/3 dt-bindings: add power domains to Tegra BPMP firmware
In reply to Stephen WarrenQuoted 10 lines · Stephen Warren
From: Stephen Warren <[email protected]>
The Tegra186 BPMP is also a provider of power domains. Enhance the device tree binding to describe this.
Signed-off-by Stephen Warren <[email protected]>---
These patches all build on top of Joseph Lo's baseline BPMP binding patches[1] and enhance them to represent a few more features of the firmware.
Quoted 7 lines
[1] https://lkml.org/lkml/2016/7/19/280
"[PATCH V3 01/10] Documentation: dt-bindings: mailbox: tegra: Add binding for HSP mailbox".../bindings/firmware/nvidia,tegra186-bpmp.txt | 10 ++++-- include/dt-bindings/power/tegra186-powergate.h | 39 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 include/dt-bindings/power/tegra186-powergate.h
Applied, thanks.
One small comment below...
Quoted 33 lines
include/dt-bindings/power/tegra186-powergate.h new file +27
-0@@ -0,0 +1,39 @@ +/* +* Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef _DT_BINDINGS_POWER_TEGRA186_POWERGATE_H +#define _DT_BINDINGS_POWER_TEGRA186_POWERGATE_H + +#define TEGRA186_POWER_DOMAIN_AUD 0 +#define TEGRA186_POWER_DOMAIN_DFD 1 +#define TEGRA186_POWER_DOMAIN_DISP 2 +#define TEGRA186_POWER_DOMAIN_DISPB 3 +#define TEGRA186_POWER_DOMAIN_DISPC 4 +#define TEGRA186_POWER_DOMAIN_ISPA 5 +#define TEGRA186_POWER_DOMAIN_NVDEC 6 +#define TEGRA186_POWER_DOMAIN_NVJPG 7
include/dt-bindings/power/tegra186-powergate.h line 37
Quoted 10 lines
include/dt-bindings/power/tegra186-powergate.h new file +10
-0+#define TEGRA186_POWER_DOMAIN_MPE 8 +#define TEGRA186_POWER_DOMAIN_PCX 9 +#define TEGRA186_POWER_DOMAIN_SAX 10 +#define TEGRA186_POWER_DOMAIN_VE 11 +#define TEGRA186_POWER_DOMAIN_VIC 12 +#define TEGRA186_POWER_DOMAIN_XUSBA 13 +#define TEGRA186_POWER_DOMAIN_XUSBB 14 +#define TEGRA186_POWER_DOMAIN_XUSBC 15 +#define TEGRA186_POWER_DOMAIN_GPU 43 +#define TEGRA186_POWER_DOMAIN_MAX 44
It's slightly odd that these are named TEGRA186_POWER_DOMAIN_* since power domain is a Linuxism. All documentation that I've seen calls these powergates.
I guess since this is now ABI there is not much we can do to rectify it.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161115/23dffb84/attachment.sig>