devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/5] PCI: tegra: Overhaul regulator usage
@ 2014-04-04 14:49 Thierry Reding
       [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Thierry Reding @ 2014-04-04 14:49 UTC (permalink / raw)
  To: Bjorn Helgaas, Stephen Warren, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra, linux-pci, linux-arm-kernel, devicetree

The current device tree binding for the regulator setup on Tegra PCIe is
not accurate. While it does work for current use-cases, that's likely by
accident rather than design. This series replaces the existing set of
power-supply properties with a new set that accurately describes the
inputs of the IP block (depending on SoC generation).

As a heads-up, this breaks backwards compatibility with prior versions
of the device tree bindings, but I don't see a reason why that should
keep us from fixing this properly. Not many people are currently using
these bindings and those who are are most likely tracking upstream
development closely enough not to be impacted by this.

I've aimed to keep the series bisectible, which has the downside of
interleaving patches to unrelated trees (ARM and PCI). I'm hoping that
perhaps we can find a way to merge this as a whole to keep it possible
to bisect across the series. Although again, I guess it wouldn't be all
that bad if that wasn't the case, given how little PCIe is actually
being used.

Thanks,
Thierry

Thierry Reding (5):
  PCI: tegra: Overhaul regulator usage
  ARM: tegra: Add new PCIe regulator properties
  PCI: tegra: Implement accurate power supply scheme
  PCI: tegra: Remove deprecated power supply properties
  ARM: tegra: Remove legacy PCIe power supply properties

 .../bindings/pci/nvidia,tegra20-pcie.txt           |  30 ++++-
 arch/arm/boot/dts/tegra20-harmony.dts              |   8 +-
 arch/arm/boot/dts/tegra20-tamonten.dtsi            |   7 +-
 arch/arm/boot/dts/tegra20-trimslice.dts            |   8 +-
 arch/arm/boot/dts/tegra30-beaver.dts               |  12 +-
 arch/arm/boot/dts/tegra30-cardhu.dtsi              |  11 +-
 drivers/pci/host/pci-tegra.c                       | 146 ++++++++++++---------
 7 files changed, 148 insertions(+), 74 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [RFC 1/5] PCI: tegra: Overhaul regulator usage
       [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2014-04-04 14:49   ` Thierry Reding
  2014-04-08 19:15     ` Stephen Warren
  2014-04-04 14:49   ` [RFC 2/5] ARM: tegra: Add new PCIe regulator properties Thierry Reding
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Thierry Reding @ 2014-04-04 14:49 UTC (permalink / raw)
  To: Bjorn Helgaas, Stephen Warren, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

The current usage of regulators for the Tegra PCIe block is wrong. It
doesn't accurately reflect the actual supply inputs of the IP block and
therefore isn't as flexible as it should be. Rectify this by describing
all possible supply inputs in the device tree binding documentation and
deprecate the old supply properties.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 .../bindings/pci/nvidia,tegra20-pcie.txt           | 35 ++++++++++++++++++++--
 1 file changed, 32 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
index c300391e8d3e..66e8aca4aef0 100644
--- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
@@ -14,9 +14,6 @@ Required properties:
 - interrupt-names: Must include the following entries:
   "intr": The Tegra interrupt that is asserted for controller interrupts
   "msi": The Tegra interrupt that is asserted when an MSI is received
-- pex-clk-supply: Supply voltage for internal reference clock
-- vdd-supply: Power supply for controller (1.05V)
-- avdd-supply: Power supply for controller (1.05V) (not required for Tegra20)
 - bus-range: Range of bus numbers associated with this controller
 - #address-cells: Address representation for root ports (must be 3)
   - cell 0 specifies the bus and device numbers of the root port:
@@ -60,6 +57,38 @@ Required properties:
   - afi
   - pcie_x
 
+Power supplies for Tegra20:
+- avdd-pex-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
+- vdd-pex-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
+- avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
+  supply 1.05 V.
+- avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
+  supply 1.05 V.
+- vddio-pex-clk-supply: Power supply for PCIe clock. Must supply 3.3 V.
+
+Power supplies for Tegra30:
+- Required:
+  - avdd-pex-pll-supply: Power supply for dedicated (internal) PCIe PLL. Must
+    supply 1.05 V.
+  - avdd-plle-supply: Power supply for PLLE, which is shared with SATA. Must
+    supply 1.05 V.
+  - vddio-pex-ctl-supply: Power supply for PCIe control I/O partition. Must
+    supply 1.8 V.
+  - hvdd-pex-supply: High-voltage supply for PCIe I/O and PCIe output clocks.
+    Must supply 3.3 V.
+- Optional:
+  - If port 0 is enabled:
+    - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
+    - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
+  - If at least one of ports 1 and 2 is enabled:
+    - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
+    - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
+
+Deprecated supplies:
+- pex-clk-supply: Supply voltage for internal reference clock
+- vdd-supply: Power supply for controller (1.05V)
+- avdd-supply: Power supply for controller (1.05V) (not required for Tegra20)
+
 Root ports are defined as subnodes of the PCIe controller node.
 
 Required properties:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RFC 2/5] ARM: tegra: Add new PCIe regulator properties
       [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2014-04-04 14:49   ` [RFC 1/5] " Thierry Reding
@ 2014-04-04 14:49   ` Thierry Reding
       [not found]     ` <1396622969-17837-3-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2014-04-04 14:49   ` [RFC 4/5] PCI: tegra: Remove deprecated power supply properties Thierry Reding
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Thierry Reding @ 2014-04-04 14:49 UTC (permalink / raw)
  To: Bjorn Helgaas, Stephen Warren, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

These new properties more accurately reflect the real connections of the
boards and therefore make it easier to match them up with schematics.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/tegra20-harmony.dts   | 10 +++++++++-
 arch/arm/boot/dts/tegra20-tamonten.dtsi |  7 +++++++
 arch/arm/boot/dts/tegra20-trimslice.dts |  8 ++++++++
 arch/arm/boot/dts/tegra30-beaver.dts    | 11 +++++++++++
 arch/arm/boot/dts/tegra30-cardhu.dtsi   | 10 ++++++++++
 5 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 3fb1f50f6d46..7d5d0aa1778a 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -561,9 +561,17 @@
 	};
 
 	pcie-controller@80003000 {
+		status = "okay";
+
+		avdd-pex-supply = <&pci_vdd_reg>;
+		vdd-pex-supply = <&pci_vdd_reg>;
+		avdd-pex-pll-supply = <&pci_vdd_reg>;
+		avdd-plle-supply = <&pci_vdd_reg>;
+		vddio-pex-clk-supply = <&pci_clk_reg>;
+
+		/* deprecated */
 		pex-clk-supply = <&pci_clk_reg>;
 		vdd-supply = <&pci_vdd_reg>;
-		status = "okay";
 
 		pci@1,0 {
 			status = "okay";
diff --git a/arch/arm/boot/dts/tegra20-tamonten.dtsi b/arch/arm/boot/dts/tegra20-tamonten.dtsi
index a1b0d965757f..0e33577750ae 100644
--- a/arch/arm/boot/dts/tegra20-tamonten.dtsi
+++ b/arch/arm/boot/dts/tegra20-tamonten.dtsi
@@ -473,6 +473,13 @@
 	};
 
 	pcie-controller@80003000 {
+		avdd-pex-supply = <&pci_vdd_reg>;
+		vdd-pex-supply = <&pci_vdd_reg>;
+		avdd-pex-pll-supply = <&pci_vdd_reg>;
+		avdd-plle-supply = <&pci_vdd_reg>;
+		vddio-pex-clk-supply = <&pci_clk_reg>;
+
+		/* deprecated */
 		pex-clk-supply = <&pci_clk_reg>;
 		vdd-supply = <&pci_vdd_reg>;
 	};
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index 216fa6d50c65..401b32e44369 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -318,6 +318,14 @@
 
 	pcie-controller@80003000 {
 		status = "okay";
+
+		avdd-pex-supply = <&pci_vdd_reg>;
+		vdd-pex-supply = <&pci_vdd_reg>;
+		avdd-pex-pll-supply = <&pci_vdd_reg>;
+		avdd-plle-supply = <&pci_vdd_reg>;
+		vddio-pex-clk-supply = <&pci_clk_reg>;
+
+		/* deprecated */
 		pex-clk-supply = <&pci_clk_reg>;
 		vdd-supply = <&pci_vdd_reg>;
 
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index e93fe45b7803..b434ec1f278a 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -17,6 +17,17 @@
 
 	pcie-controller@00003000 {
 		status = "okay";
+
+		avdd-pexa-supply = <&ldo1_reg>;
+		vdd-pexa-supply = <&ldo1_reg>;
+		avdd-pexb-supply = <&ldo1_reg>;
+		vdd-pexb-supply = <&ldo1_reg>;
+		avdd-pex-pll-supply = <&ldo1_reg>;
+		avdd-plle-supply = <&ldo1_reg>;
+		vddio-pex-ctl-supply = <&sys_3v3_reg>;
+		hvdd-pex-supply = <&sys_3v3_pexs_reg>;
+
+		/* deprecated */
 		pex-clk-supply = <&sys_3v3_pexs_reg>;
 		vdd-supply = <&ldo1_reg>;
 		avdd-supply = <&ldo2_reg>;
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index 0cf0848a82d8..55051a808ced 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -38,6 +38,16 @@
 
 	pcie-controller@00003000 {
 		status = "okay";
+
+		/* AVDD_PEXA and VDD_PEXA are grounded on Cardhu. */
+		avdd-pexb-supply = <&ldo1_reg>;
+		vdd-pexb-supply = <&ldo1_reg>;
+		avdd-pex-pll-supply = <&ldo1_reg>;
+		hvdd-pex-supply = <&pex_hvdd_3v3_reg>;
+		vddio-pex-ctl-supply = <&sys_3v3_reg>;
+		avdd-plle-supply = <&ldo2_reg>;
+
+		/* deprecated */
 		pex-clk-supply = <&pex_hvdd_3v3_reg>;
 		vdd-supply = <&ldo1_reg>;
 		avdd-supply = <&ldo2_reg>;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RFC 4/5] PCI: tegra: Remove deprecated power supply properties
       [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2014-04-04 14:49   ` [RFC 1/5] " Thierry Reding
  2014-04-04 14:49   ` [RFC 2/5] ARM: tegra: Add new PCIe regulator properties Thierry Reding
@ 2014-04-04 14:49   ` Thierry Reding
  2014-04-04 14:49   ` [RFC 5/5] ARM: tegra: Remove legacy PCIe " Thierry Reding
  2014-04-08 19:21   ` [RFC 0/5] PCI: tegra: Overhaul regulator usage Stephen Warren
  4 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2014-04-04 14:49 UTC (permalink / raw)
  To: Bjorn Helgaas, Stephen Warren, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

These power supply properties are no longer needed since the binding now
contains the full set properties to accurately describe the power supply
inputs of the Tegra PCIe block.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
index 66e8aca4aef0..5207d4cd1fa2 100644
--- a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
@@ -84,11 +84,6 @@ Power supplies for Tegra30:
     - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
     - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
 
-Deprecated supplies:
-- pex-clk-supply: Supply voltage for internal reference clock
-- vdd-supply: Power supply for controller (1.05V)
-- avdd-supply: Power supply for controller (1.05V) (not required for Tegra20)
-
 Root ports are defined as subnodes of the PCIe controller node.
 
 Required properties:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RFC 5/5] ARM: tegra: Remove legacy PCIe power supply properties
       [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
                     ` (2 preceding siblings ...)
  2014-04-04 14:49   ` [RFC 4/5] PCI: tegra: Remove deprecated power supply properties Thierry Reding
@ 2014-04-04 14:49   ` Thierry Reding
  2014-04-08 19:21   ` [RFC 0/5] PCI: tegra: Overhaul regulator usage Stephen Warren
  4 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2014-04-04 14:49 UTC (permalink / raw)
  To: Bjorn Helgaas, Stephen Warren, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

These properties are deprecated and no longer of any use.

Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/boot/dts/tegra20-harmony.dts   | 4 ----
 arch/arm/boot/dts/tegra20-tamonten.dtsi | 4 ----
 arch/arm/boot/dts/tegra20-trimslice.dts | 4 ----
 arch/arm/boot/dts/tegra30-beaver.dts    | 5 -----
 arch/arm/boot/dts/tegra30-cardhu.dtsi   | 5 -----
 5 files changed, 22 deletions(-)

diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 7d5d0aa1778a..e9f8710c45ce 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -569,10 +569,6 @@
 		avdd-plle-supply = <&pci_vdd_reg>;
 		vddio-pex-clk-supply = <&pci_clk_reg>;
 
-		/* deprecated */
-		pex-clk-supply = <&pci_clk_reg>;
-		vdd-supply = <&pci_vdd_reg>;
-
 		pci@1,0 {
 			status = "okay";
 		};
diff --git a/arch/arm/boot/dts/tegra20-tamonten.dtsi b/arch/arm/boot/dts/tegra20-tamonten.dtsi
index 0e33577750ae..a4914bba1a39 100644
--- a/arch/arm/boot/dts/tegra20-tamonten.dtsi
+++ b/arch/arm/boot/dts/tegra20-tamonten.dtsi
@@ -478,10 +478,6 @@
 		avdd-pex-pll-supply = <&pci_vdd_reg>;
 		avdd-plle-supply = <&pci_vdd_reg>;
 		vddio-pex-clk-supply = <&pci_clk_reg>;
-
-		/* deprecated */
-		pex-clk-supply = <&pci_clk_reg>;
-		vdd-supply = <&pci_vdd_reg>;
 	};
 
 	usb@c5008000 {
diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
index 401b32e44369..5ad87979ab13 100644
--- a/arch/arm/boot/dts/tegra20-trimslice.dts
+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
@@ -325,10 +325,6 @@
 		avdd-plle-supply = <&pci_vdd_reg>;
 		vddio-pex-clk-supply = <&pci_clk_reg>;
 
-		/* deprecated */
-		pex-clk-supply = <&pci_clk_reg>;
-		vdd-supply = <&pci_vdd_reg>;
-
 		pci@1,0 {
 			status = "okay";
 		};
diff --git a/arch/arm/boot/dts/tegra30-beaver.dts b/arch/arm/boot/dts/tegra30-beaver.dts
index b434ec1f278a..101139d75d1d 100644
--- a/arch/arm/boot/dts/tegra30-beaver.dts
+++ b/arch/arm/boot/dts/tegra30-beaver.dts
@@ -27,11 +27,6 @@
 		vddio-pex-ctl-supply = <&sys_3v3_reg>;
 		hvdd-pex-supply = <&sys_3v3_pexs_reg>;
 
-		/* deprecated */
-		pex-clk-supply = <&sys_3v3_pexs_reg>;
-		vdd-supply = <&ldo1_reg>;
-		avdd-supply = <&ldo2_reg>;
-
 		pci@1,0 {
 			status = "okay";
 			nvidia,num-lanes = <2>;
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index 55051a808ced..2f0b1d37be39 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -47,11 +47,6 @@
 		vddio-pex-ctl-supply = <&sys_3v3_reg>;
 		avdd-plle-supply = <&ldo2_reg>;
 
-		/* deprecated */
-		pex-clk-supply = <&pex_hvdd_3v3_reg>;
-		vdd-supply = <&ldo1_reg>;
-		avdd-supply = <&ldo2_reg>;
-
 		pci@1,0 {
 			nvidia,num-lanes = <4>;
 		};
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [RFC 1/5] PCI: tegra: Overhaul regulator usage
  2014-04-04 14:49   ` [RFC 1/5] " Thierry Reding
@ 2014-04-08 19:15     ` Stephen Warren
       [not found]       ` <53444AE3.6030603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Warren @ 2014-04-08 19:15 UTC (permalink / raw)
  To: Thierry Reding, Bjorn Helgaas, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra, linux-pci, linux-arm-kernel, devicetree

On 04/04/2014 08:49 AM, Thierry Reding wrote:
> The current usage of regulators for the Tegra PCIe block is wrong. It
> doesn't accurately reflect the actual supply inputs of the IP block and
> therefore isn't as flexible as it should be. Rectify this by describing
> all possible supply inputs in the device tree binding documentation and
> deprecate the old supply properties.

> diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt

> +Power supplies for Tegra30:
...
> +- Optional:
> +  - If port 0 is enabled:
> +    - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
> +    - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
> +  - If at least one of ports 1 and 2 is enabled:
> +    - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
> +    - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.

Did you get confirmation from HW/... that the mapping from pexa/b to
PCIe ports you document above is correct? IIRC the two supplies might be
related to lanes rather than ports?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC 2/5] ARM: tegra: Add new PCIe regulator properties
       [not found]     ` <1396622969-17837-3-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2014-04-08 19:17       ` Stephen Warren
  2014-04-08 19:54         ` Thierry Reding
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Warren @ 2014-04-08 19:17 UTC (permalink / raw)
  To: Thierry Reding, Bjorn Helgaas, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 04/04/2014 08:49 AM, Thierry Reding wrote:
> These new properties more accurately reflect the real connections of the
> boards and therefore make it easier to match them up with schematics.

> diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi

>  	pcie-controller@00003000 {
>  		status = "okay";
> +
> +		/* AVDD_PEXA and VDD_PEXA are grounded on Cardhu. */

Perhaps add the word "inputs" before "are"?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC 0/5] PCI: tegra: Overhaul regulator usage
       [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
                     ` (3 preceding siblings ...)
  2014-04-04 14:49   ` [RFC 5/5] ARM: tegra: Remove legacy PCIe " Thierry Reding
@ 2014-04-08 19:21   ` Stephen Warren
  2014-04-25 16:57     ` Bjorn Helgaas
  4 siblings, 1 reply; 11+ messages in thread
From: Stephen Warren @ 2014-04-08 19:21 UTC (permalink / raw)
  To: Thierry Reding, Bjorn Helgaas, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On 04/04/2014 08:49 AM, Thierry Reding wrote:
> The current device tree binding for the regulator setup on Tegra PCIe is
> not accurate. While it does work for current use-cases, that's likely by
> accident rather than design. This series replaces the existing set of
> power-supply properties with a new set that accurately describes the
> inputs of the IP block (depending on SoC generation).
> 
> As a heads-up, this breaks backwards compatibility with prior versions
> of the device tree bindings, but I don't see a reason why that should
> keep us from fixing this properly. Not many people are currently using
> these bindings and those who are are most likely tracking upstream
> development closely enough not to be impacted by this.
> 
> I've aimed to keep the series bisectible, which has the downside of
> interleaving patches to unrelated trees (ARM and PCI). I'm hoping that
> perhaps we can find a way to merge this as a whole to keep it possible
> to bisect across the series. Although again, I guess it wouldn't be all
> that bad if that wasn't the case, given how little PCIe is actually
> being used.

I'd be happy to put this series into a branch in the Tegra tree, given
suitable acks from Bjorn on the PCI changes.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC 1/5] PCI: tegra: Overhaul regulator usage
       [not found]       ` <53444AE3.6030603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
@ 2014-04-08 19:52         ` Thierry Reding
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2014-04-08 19:52 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Bjorn Helgaas, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]

On Tue, Apr 08, 2014 at 09:15:47PM +0200, Stephen Warren wrote:
> On 04/04/2014 08:49 AM, Thierry Reding wrote:
> > The current usage of regulators for the Tegra PCIe block is wrong. It
> > doesn't accurately reflect the actual supply inputs of the IP block and
> > therefore isn't as flexible as it should be. Rectify this by describing
> > all possible supply inputs in the device tree binding documentation and
> > deprecate the old supply properties.
> 
> > diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt b/Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
> 
> > +Power supplies for Tegra30:
> ...
> > +- Optional:
> > +  - If port 0 is enabled:
> > +    - avdd-pexa-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
> > +    - vdd-pexa-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
> > +  - If at least one of ports 1 and 2 is enabled:
> > +    - avdd-pexb-supply: Power supply for analog PCIe logic. Must supply 1.05 V.
> > +    - vdd-pexb-supply: Power supply for digital PCIe I/O. Must supply 1.05 V.
> 
> Did you get confirmation from HW/... that the mapping from pexa/b to
> PCIe ports you document above is correct? IIRC the two supplies might be
> related to lanes rather than ports?

Not yet, which is the primary reason this is still RFC. Just wanted to
get early feedback on the general direction of the series.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC 2/5] ARM: tegra: Add new PCIe regulator properties
  2014-04-08 19:17       ` Stephen Warren
@ 2014-04-08 19:54         ` Thierry Reding
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2014-04-08 19:54 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Bjorn Helgaas, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, linux-tegra, linux-pci,
	linux-arm-kernel, devicetree

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

On Tue, Apr 08, 2014 at 09:17:01PM +0200, Stephen Warren wrote:
> On 04/04/2014 08:49 AM, Thierry Reding wrote:
> > These new properties more accurately reflect the real connections of the
> > boards and therefore make it easier to match them up with schematics.
> 
> > diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
> 
> >  	pcie-controller@00003000 {
> >  		status = "okay";
> > +
> > +		/* AVDD_PEXA and VDD_PEXA are grounded on Cardhu. */
> 
> Perhaps add the word "inputs" before "are"?

Done. Thanks,

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [RFC 0/5] PCI: tegra: Overhaul regulator usage
  2014-04-08 19:21   ` [RFC 0/5] PCI: tegra: Overhaul regulator usage Stephen Warren
@ 2014-04-25 16:57     ` Bjorn Helgaas
  0 siblings, 0 replies; 11+ messages in thread
From: Bjorn Helgaas @ 2014-04-25 16:57 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Thierry Reding, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, linux-tegra, linux-pci,
	linux-arm-kernel, devicetree

On Tue, Apr 08, 2014 at 01:21:49PM -0600, Stephen Warren wrote:
> On 04/04/2014 08:49 AM, Thierry Reding wrote:
> > The current device tree binding for the regulator setup on Tegra PCIe is
> > not accurate. While it does work for current use-cases, that's likely by
> > accident rather than design. This series replaces the existing set of
> > power-supply properties with a new set that accurately describes the
> > inputs of the IP block (depending on SoC generation).
> > 
> > As a heads-up, this breaks backwards compatibility with prior versions
> > of the device tree bindings, but I don't see a reason why that should
> > keep us from fixing this properly. Not many people are currently using
> > these bindings and those who are are most likely tracking upstream
> > development closely enough not to be impacted by this.
> > 
> > I've aimed to keep the series bisectible, which has the downside of
> > interleaving patches to unrelated trees (ARM and PCI). I'm hoping that
> > perhaps we can find a way to merge this as a whole to keep it possible
> > to bisect across the series. Although again, I guess it wouldn't be all
> > that bad if that wasn't the case, given how little PCIe is actually
> > being used.
> 
> I'd be happy to put this series into a branch in the Tegra tree, given
> suitable acks from Bjorn on the PCI changes.

For 3/5 ("PCI: tegra: Implement accurate power supply scheme"),

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

I do have the "PCI: tegra: Use new OF interrupt mapping when possible"
change from Lucas on my pci/host-tegra branch, but it shouldn't conflict
with this.

Bjorn

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-04-25 16:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-04 14:49 [RFC 0/5] PCI: tegra: Overhaul regulator usage Thierry Reding
     [not found] ` <1396622969-17837-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-04 14:49   ` [RFC 1/5] " Thierry Reding
2014-04-08 19:15     ` Stephen Warren
     [not found]       ` <53444AE3.6030603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2014-04-08 19:52         ` Thierry Reding
2014-04-04 14:49   ` [RFC 2/5] ARM: tegra: Add new PCIe regulator properties Thierry Reding
     [not found]     ` <1396622969-17837-3-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-08 19:17       ` Stephen Warren
2014-04-08 19:54         ` Thierry Reding
2014-04-04 14:49   ` [RFC 4/5] PCI: tegra: Remove deprecated power supply properties Thierry Reding
2014-04-04 14:49   ` [RFC 5/5] ARM: tegra: Remove legacy PCIe " Thierry Reding
2014-04-08 19:21   ` [RFC 0/5] PCI: tegra: Overhaul regulator usage Stephen Warren
2014-04-25 16:57     ` Bjorn Helgaas

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).