dt-bindings: Add Tegra186 BPMP I2C binding
PATCH v3 1/2 dt-bindings: Add Tegra186 BPMP I2C binding
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.
---
Changes in v3:
- add missing Acked-by from Rob, taken from patchwork:
http://patchwork.ozlabs.org/patch/650385/
.../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 { + ... + + i2c { + compatible = "nvidia,tegra186-bpmp-i2c"; + #address-cells = <1>; + #size-cells = <0>; + nvidia,bpmp-bus-id = <5>; + }; +};
Signature · 1 line
2.11.1
A message that is not in the archive (sent off-list or not yet received): 20170220165234.29299-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH v3 2/2 i2c: Add Tegra BPMP I2C proxy driver
From: Shardar Shariff Md <[email protected]>
Add Tegra BPMP I2C driver. The BPMP is the boot and power management processor embedded in Tegra SoCs. In newer SoC versions, access to one of the I2C busses goes via the BPMP, requiring a different "proxy" I2C driver that accesses the bus via the real I2C driver embedded in the BPMP firmware.
---
Changes in v3:
- pass struct mrq_i2c_response to deserialization function to make it symmetrical to serialization
- use module_platform_driver(), no need for initcall ordering tricks
- remove error message on adapter registration failure
- remove unneeded I2C adapter class assignment
- remove misleading TODO comment
drivers/i2c/busses/Kconfig | 11 ++ drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-tegra-bpmp.c | 346 ++++++++++++++++++++++++++++++++++++ 3 files changed, 358 insertions(+) create mode 100644 drivers/i2c/busses/i2c-tegra-bpmp.c
drivers/i2c/busses/Kconfig +11 -0
@@ -919,6 +919,17 @@ config I2C_TEGRA If you say yes to this option, support will be included for the I2C controller embedded in NVIDIA Tegra SOCs +config I2C_TEGRA_BPMP + tristate "NVIDIA Tegra BPMP I2C controller" + depends on TEGRA_BPMP + help + If you say yes to this option, support will be included for the I2C + controller embedded in NVIDIA Tegra SoCs accessed via the BPMP. + + This I2C driver is a 'virtual' I2C driver. The real driver is part + of the BPMP firmware, and this driver merely communicates with that + real driver. + config I2C_UNIPHIER tristate "UniPhier FIFO-less I2C controller" depends on ARCH_UNIPHIER || COMPILE_TEST
drivers/i2c/busses/Makefile +1 -0
@@ -88,6 +88,7 @@ obj-$(CONFIG_I2C_ST) += i2c-st.o obj-$(CONFIG_I2C_STU300) += i2c-stu300.o obj-$(CONFIG_I2C_SUN6I_P2WI) += i2c-sun6i-p2wi.o obj-$(CONFIG_I2C_TEGRA) += i2c-tegra.o +obj-$(CONFIG_I2C_TEGRA_BPMP) += i2c-tegra-bpmp.o obj-$(CONFIG_I2C_UNIPHIER) += i2c-uniphier.o obj-$(CONFIG_I2C_UNIPHIER_F) += i2c-uniphier-f.o obj-$(CONFIG_I2C_VERSATILE) += i2c-versatile.o
drivers/i2c/busses/i2c-tegra-bpmp.c new file +346 -0
346 lines not on this page · raw message
Signature · 1 line
2.11.1
A message that is not in the archive (sent off-list or not yet received): 20170220165234.29299-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Wolfram Sang
AppliedRe: [PATCH v3 2/2] i2c: Add Tegra BPMP I2C proxy driver
Quoted 10 lines · Thierry Reding
From: Shardar Shariff Md <[email protected]>
Add Tegra BPMP I2C driver. The BPMP is the boot and power management processor embedded in Tegra SoCs. In newer SoC versions, access to one of the I2C busses goes via the BPMP, requiring a different "proxy" I2C driver that accesses the bus via the real I2C driver embedded in the BPMP firmware.
Signed-off-by Shardar Shariff Md <[email protected]>Signed-off-by Thierry Reding <[email protected]>
Applied to for-next, thanks (will be in for 4.11)!
Quoted 4 lines
Changes in v3:
- pass structmrq_i2c_responseto deserialization function to make it symmetrical to serialization
- usemodule_platform_driver(), no need for initcall ordering tricks
Yay, I really like this one!
Quoted 3 lines
- remove error message on adapter registration failure
- remove unneeded I2C adapter class assignment
- remove misleading TODO comment
Re: [PATCH v3 2/2] i2c: Add Tegra BPMP I2C proxy driver
Quoted 9 lines · Wolfram Sang
Quoted 8 lines · Thierry Reding
From: Shardar Shariff Md <[email protected]>
Add Tegra BPMP I2C driver. The BPMP is the boot and power management processor embedded in Tegra SoCs. In newer SoC versions, access to one of the I2C busses goes via the BPMP, requiring a different "proxy" I2C driver that accesses the bus via the real I2C driver embedded in the BPMP firmware.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Shardar Shariff Md <[email protected]>Signed-off-by Thierry Reding <[email protected]>Applied to for-next, thanks (will be in for 4.11)!
Thanks for fast-tracking this!
Thierry
Wolfram Sang
AppliedQuoted 8 lines · Thierry Reding
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 6 lines
Signed-off-by Stephen Warren <[email protected]>Reviewed-by Simon Glass <[email protected]>Signed-off-by Tom Warren <[email protected]>Acked-by Rob Herring <[email protected]>Acked-by Jon Hunter <[email protected]>Signed-off-by Thierry Reding <[email protected]>
Applied to for-next, thanks (will be in for 4.11)!