linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] ARM: dts: tegra: last minute fixes
@ 2018-10-16 10:47 Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 1/9] ARM: tegra: fix simple-panel compatibles Marcel Ziswiler
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Jaroslav Kysela, alsa-devel, Thierry Reding,
	Jonathan Hunter, Liam Girdwood, Takashi Iwai, Rob Herring,
	Marcel Ziswiler, Mark Rutland


This series comes with some last minutes fixes and further clean-up.

Changes in v2:
- Dropped "[PATCH v1 3/8] ARM: tegra: apalis/colibri_t30: fix hdmi
  regulator" as suggested by Russell et. al.
- Added 2 new patches improving/fixing audio on Apalis TK1.

Changes in v1:
- Remove simple-panel compatible as suggested by Rob.

Marcel Ziswiler (9):
  ARM: tegra: fix simple-panel compatibles
  ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator gpio
    enable
  ARM: tegra: colibri_t20: reorder pmic properties
  ARM: tegra: apalis-tk1: further regulator clean-up
  ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module
  ARM: tegra: colibri_t30: further regulator clean-up
  ARM: tegra: apalis_t30: further regulator clean-up
  ASoC: tegra_sgtl5000: fix device_node refcounting
  ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement

 arch/arm/boot/dts/tegra114-dalmore.dts          |  3 +-
 arch/arm/boot/dts/tegra124-apalis-eval.dts      |  4 +-
 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts |  4 +-
 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi     | 17 +++---
 arch/arm/boot/dts/tegra124-apalis.dtsi          | 17 +++---
 arch/arm/boot/dts/tegra124-venice2.dts          |  2 +-
 arch/arm/boot/dts/tegra20-colibri-eval-v3.dts   |  4 +-
 arch/arm/boot/dts/tegra20-colibri-iris.dts      |  4 +-
 arch/arm/boot/dts/tegra20-colibri.dtsi          |  4 +-
 arch/arm/boot/dts/tegra20-harmony.dts           |  2 +-
 arch/arm/boot/dts/tegra20-medcom-wide.dts       |  2 +-
 arch/arm/boot/dts/tegra20-paz00.dts             |  2 +-
 arch/arm/boot/dts/tegra20-seaboard.dts          |  2 +-
 arch/arm/boot/dts/tegra20-ventana.dts           |  2 +-
 arch/arm/boot/dts/tegra30-apalis-eval.dts       |  2 +-
 arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts  |  4 +-
 arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi      | 72 +++++++++++--------------
 arch/arm/boot/dts/tegra30-apalis.dtsi           | 70 ++++++++++--------------
 arch/arm/boot/dts/tegra30-cardhu.dtsi           |  2 +-
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts   |  4 +-
 arch/arm/boot/dts/tegra30-colibri.dtsi          | 45 ++++++++--------
 sound/soc/tegra/tegra_sgtl5000.c                | 22 +++++++-
 22 files changed, 143 insertions(+), 147 deletions(-)

-- 
2.14.4


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

* [PATCH v2 1/9] ARM: tegra: fix simple-panel compatibles
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 2/9] ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator gpio enable Marcel Ziswiler
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

As there is no such thing as a generic simple-panel compatible remove
them.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: None
Changes in v1:
- Remove simple-panel compatible as suggested by Rob.

 arch/arm/boot/dts/tegra114-dalmore.dts         | 3 +--
 arch/arm/boot/dts/tegra124-venice2.dts         | 2 +-
 arch/arm/boot/dts/tegra20-colibri-eval-v3.dts  | 2 +-
 arch/arm/boot/dts/tegra20-colibri-iris.dts     | 2 +-
 arch/arm/boot/dts/tegra20-harmony.dts          | 2 +-
 arch/arm/boot/dts/tegra20-medcom-wide.dts      | 2 +-
 arch/arm/boot/dts/tegra20-paz00.dts            | 2 +-
 arch/arm/boot/dts/tegra20-seaboard.dts         | 2 +-
 arch/arm/boot/dts/tegra20-ventana.dts          | 2 +-
 arch/arm/boot/dts/tegra30-apalis-eval.dts      | 2 +-
 arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts | 2 +-
 arch/arm/boot/dts/tegra30-cardhu.dtsi          | 2 +-
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts  | 2 +-
 13 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index 1788556b4977..2ea7236d9da6 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -46,8 +46,7 @@
 			avdd-dsi-csi-supply = <&avdd_1v2_reg>;
 
 			panel@0 {
-				compatible = "panasonic,vvx10f004b00",
-					     "simple-panel";
+				compatible = "panasonic,vvx10f004b00";
 				reg = <0>;
 
 				power-supply = <&avdd_lcd_reg>;
diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
index 82d139648ef1..f54f77902774 100644
--- a/arch/arm/boot/dts/tegra124-venice2.dts
+++ b/arch/arm/boot/dts/tegra124-venice2.dts
@@ -1079,7 +1079,7 @@
 	};
 
 	panel: panel {
-		compatible = "lg,lp129qe", "simple-panel";
+		compatible = "lg,lp129qe";
 
 		backlight = <&backlight>;
 		ddc-i2c-bus = <&dpaux>;
diff --git a/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
index 3c0f2681fcde..37ad508b61d9 100644
--- a/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
@@ -223,7 +223,7 @@
 		 * edt,et057090dhu: EDT 5.7" LCD TFT
 		 * edt,et070080dh6: EDT 7.0" LCD TFT
 		 */
-		compatible = "edt,et057090dhu", "simple-panel";
+		compatible = "edt,et057090dhu";
 		backlight = <&backlight>;
 		power-supply = <&reg_3v3>;
 	};
diff --git a/arch/arm/boot/dts/tegra20-colibri-iris.dts b/arch/arm/boot/dts/tegra20-colibri-iris.dts
index d8004d68efa0..af4740847769 100644
--- a/arch/arm/boot/dts/tegra20-colibri-iris.dts
+++ b/arch/arm/boot/dts/tegra20-colibri-iris.dts
@@ -205,7 +205,7 @@
 		 * edt,et057090dhu: EDT 5.7" LCD TFT
 		 * edt,et070080dh6: EDT 7.0" LCD TFT
 		 */
-		compatible = "edt,et057090dhu", "simple-panel";
+		compatible = "edt,et057090dhu";
 		backlight = <&backlight>;
 		power-supply = <&reg_3v3>;
 	};
diff --git a/arch/arm/boot/dts/tegra20-harmony.dts b/arch/arm/boot/dts/tegra20-harmony.dts
index 1d96d92b72a7..02cd67ea2503 100644
--- a/arch/arm/boot/dts/tegra20-harmony.dts
+++ b/arch/arm/boot/dts/tegra20-harmony.dts
@@ -665,7 +665,7 @@
 	};
 
 	panel: panel {
-		compatible = "auo,b101aw03", "simple-panel";
+		compatible = "auo,b101aw03";
 
 		power-supply = <&vdd_pnl_reg>;
 		enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm/boot/dts/tegra20-medcom-wide.dts b/arch/arm/boot/dts/tegra20-medcom-wide.dts
index cda5448c2ace..c73510cd501c 100644
--- a/arch/arm/boot/dts/tegra20-medcom-wide.dts
+++ b/arch/arm/boot/dts/tegra20-medcom-wide.dts
@@ -57,7 +57,7 @@
 	};
 
 	panel: panel {
-		compatible = "innolux,n156bge-l21", "simple-panel";
+		compatible = "innolux,n156bge-l21";
 
 		power-supply =  <&vdd_1v8_reg>, <&vdd_3v3_reg>;
 		enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts
index 8861e0976e37..e75f86901dfd 100644
--- a/arch/arm/boot/dts/tegra20-paz00.dts
+++ b/arch/arm/boot/dts/tegra20-paz00.dts
@@ -543,7 +543,7 @@
 	};
 
 	panel: panel {
-		compatible = "samsung,ltn101nt05", "simple-panel";
+		compatible = "samsung,ltn101nt05";
 
 		ddc-i2c-bus = <&lvds_ddc>;
 		power-supply = <&vdd_pnl_reg>;
diff --git a/arch/arm/boot/dts/tegra20-seaboard.dts b/arch/arm/boot/dts/tegra20-seaboard.dts
index f91441683aad..376ecb6435f4 100644
--- a/arch/arm/boot/dts/tegra20-seaboard.dts
+++ b/arch/arm/boot/dts/tegra20-seaboard.dts
@@ -826,7 +826,7 @@
 	};
 
 	panel: panel {
-		compatible = "chunghwa,claa101wa01a", "simple-panel";
+		compatible = "chunghwa,claa101wa01a";
 
 		power-supply = <&vdd_pnl_reg>;
 		enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm/boot/dts/tegra20-ventana.dts b/arch/arm/boot/dts/tegra20-ventana.dts
index f44551e2d9d0..022649119821 100644
--- a/arch/arm/boot/dts/tegra20-ventana.dts
+++ b/arch/arm/boot/dts/tegra20-ventana.dts
@@ -611,7 +611,7 @@
 	};
 
 	panel: panel {
-		compatible = "chunghwa,claa101wa01a", "simple-panel";
+		compatible = "chunghwa,claa101wa01a";
 
 		power-supply = <&vdd_pnl_reg>;
 		enable-gpios = <&gpio TEGRA_GPIO(B, 2) GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index 749fc6d1ff70..b39c26806bf2 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -195,7 +195,7 @@
 		 * edt,et057090dhu: EDT 5.7" LCD TFT
 		 * edt,et070080dh6: EDT 7.0" LCD TFT
 		 */
-		compatible = "edt,et057090dhu", "simple-panel";
+		compatible = "edt,et057090dhu";
 		backlight = <&backlight>;
 		power-supply = <&reg_3v3>;
 	};
diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts b/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
index 0be50e881684..e29dca92ba0a 100644
--- a/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
@@ -196,7 +196,7 @@
 		 * edt,et057090dhu: EDT 5.7" LCD TFT
 		 * edt,et070080dh6: EDT 7.0" LCD TFT
 		 */
-		compatible = "edt,et057090dhu", "simple-panel";
+		compatible = "edt,et057090dhu";
 		backlight = <&backlight>;
 		power-supply = <&reg_3v3>;
 	};
diff --git a/arch/arm/boot/dts/tegra30-cardhu.dtsi b/arch/arm/boot/dts/tegra30-cardhu.dtsi
index fb9222b479d2..3894bf47ea8f 100644
--- a/arch/arm/boot/dts/tegra30-cardhu.dtsi
+++ b/arch/arm/boot/dts/tegra30-cardhu.dtsi
@@ -432,7 +432,7 @@
 	};
 
 	panel: panel {
-		compatible = "chunghwa,claa101wb01", "simple-panel";
+		compatible = "chunghwa,claa101wb01";
 		ddc-i2c-bus = <&panelddc>;
 
 		power-supply = <&vdd_pnl1_reg>;
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
index 5965150ecdd2..8e106e784dce 100644
--- a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
@@ -159,7 +159,7 @@
 		 * edt,et057090dhu: EDT 5.7" LCD TFT
 		 * edt,et070080dh6: EDT 7.0" LCD TFT
 		 */
-		compatible = "edt,et057090dhu", "simple-panel";
+		compatible = "edt,et057090dhu";
 		backlight = <&backlight>;
 		power-supply = <&reg_3v3>;
 	};
-- 
2.14.4


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

* [PATCH v2 2/9] ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator gpio enable
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 1/9] ARM: tegra: fix simple-panel compatibles Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 3/9] ARM: tegra: colibri_t20: reorder pmic properties Marcel Ziswiler
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Anything other than the default active-low would require the separate
property enable-active-high to be set. This gets rid of the following
warning during boot:

 regulator-usbh-vbus GPIO handle specifies active low - ignored

resp.:

 regulator-1v05-avdd-hdmi-pll GPIO handle specifies active low - ignored

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: None
Changes in v1: None

 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi   | 2 +-
 arch/arm/boot/dts/tegra124-apalis.dtsi        | 2 +-
 arch/arm/boot/dts/tegra20-colibri-eval-v3.dts | 2 +-
 arch/arm/boot/dts/tegra20-colibri-iris.dts    | 2 +-
 arch/arm/boot/dts/tegra30-colibri-eval-v3.dts | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
index 367eb8c86098..73a8e117a9b9 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
@@ -1948,7 +1948,7 @@
 		regulator-name = "+V1.05_AVDD_HDMI_PLL";
 		regulator-min-microvolt = <1050000>;
 		regulator-max-microvolt = <1050000>;
-		gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
+		gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
 		vin-supply = <&reg_1v05_vdd>;
 	};
 
diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi
index 13c93cd507d8..3e3b347afe56 100644
--- a/arch/arm/boot/dts/tegra124-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis.dtsi
@@ -1978,7 +1978,7 @@
 		regulator-name = "+V1.05_AVDD_HDMI_PLL";
 		regulator-min-microvolt = <1050000>;
 		regulator-max-microvolt = <1050000>;
-		gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_LOW>;
+		gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
 		vin-supply = <&reg_1v05_vdd>;
 	};
 
diff --git a/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
index 37ad508b61d9..f1a85d930e61 100644
--- a/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra20-colibri-eval-v3.dts
@@ -256,7 +256,7 @@
 		regulator-name = "VCC_USB[1-4]";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+		gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
 		vin-supply = <&reg_5v0>;
 	};
 };
diff --git a/arch/arm/boot/dts/tegra20-colibri-iris.dts b/arch/arm/boot/dts/tegra20-colibri-iris.dts
index af4740847769..e1e5ec5253fd 100644
--- a/arch/arm/boot/dts/tegra20-colibri-iris.dts
+++ b/arch/arm/boot/dts/tegra20-colibri-iris.dts
@@ -238,7 +238,7 @@
 		regulator-name = "VCC_USB1";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+		gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
 		vin-supply = <&reg_5v0>;
 	};
 };
diff --git a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
index 8e106e784dce..7e6bf4cdf322 100644
--- a/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/tegra30-colibri-eval-v3.dts
@@ -192,7 +192,7 @@
 		regulator-name = "VCC_USB[1-4]";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
+		gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
 		vin-supply = <&reg_5v0>;
 	};
 };
-- 
2.14.4


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

* [PATCH v2 3/9] ARM: tegra: colibri_t20: reorder pmic properties
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 1/9] ARM: tegra: fix simple-panel compatibles Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 2/9] ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator gpio enable Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 4/9] ARM: tegra: apalis-tk1: further regulator clean-up Marcel Ziswiler
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Reorder PMIC properties to be more in-line with any of our other device
trees.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: None
Changes in v1: None

 arch/arm/boot/dts/tegra20-colibri.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/tegra20-colibri.dtsi b/arch/arm/boot/dts/tegra20-colibri.dtsi
index 6162d193e12c..d3aba6501510 100644
--- a/arch/arm/boot/dts/tegra20-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra20-colibri.dtsi
@@ -475,11 +475,11 @@
 		pmic@34 {
 			compatible = "ti,tps6586x";
 			reg = <0x34>;
-			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
-			ti,system-power-controller;
 			#gpio-cells = <2>;
 			gpio-controller;
+			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 			sys-supply = <&reg_module_3v3>;
+			ti,system-power-controller;
 			vin-sm0-supply = <&reg_3v3_vsys>;
 			vin-sm1-supply = <&reg_3v3_vsys>;
 			vin-sm2-supply = <&reg_3v3_vsys>;
-- 
2.14.4


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

* [PATCH v2 4/9] ARM: tegra: apalis-tk1: further regulator clean-up
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (2 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 3/9] ARM: tegra: colibri_t20: reorder pmic properties Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 5/9] ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module Marcel Ziswiler
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Add reg_ prefix to vddio_sdmmc1 and vddio_sdmmc3.
Reorder PMIC properties.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: None
Changes in v1: None

 arch/arm/boot/dts/tegra124-apalis-eval.dts      |  4 ++--
 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts |  4 ++--
 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi     | 10 +++++-----
 arch/arm/boot/dts/tegra124-apalis.dtsi          | 10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-apalis-eval.dts b/arch/arm/boot/dts/tegra124-apalis-eval.dts
index eaee10ef6512..e553eff50499 100644
--- a/arch/arm/boot/dts/tegra124-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra124-apalis-eval.dts
@@ -171,7 +171,7 @@
 		bus-width = <4>;
 		/* MMC1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
-		vqmmc-supply = <&vddio_sdmmc1>;
+		vqmmc-supply = <&reg_vddio_sdmmc1>;
 	};
 
 	/* Apalis SD1 */
@@ -180,7 +180,7 @@
 		bus-width = <4>;
 		/* SD1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-		vqmmc-supply = <&vddio_sdmmc3>;
+		vqmmc-supply = <&reg_vddio_sdmmc3>;
 	};
 
 	/* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
diff --git a/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts b/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
index 7961eb4bd803..e2f94dc7ff91 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
@@ -137,7 +137,7 @@
 		bus-width = <4>;
 		/* MMC1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
-		vqmmc-supply = <&vddio_sdmmc1>;
+		vqmmc-supply = <&reg_vddio_sdmmc1>;
 	};
 
 	/* Apalis SD1 */
@@ -146,7 +146,7 @@
 		bus-width = <4>;
 		/* SD1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-		vqmmc-supply = <&vddio_sdmmc3>;
+		vqmmc-supply = <&reg_vddio_sdmmc3>;
 	};
 
 	/* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
diff --git a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
index 73a8e117a9b9..e532b564e4c9 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
@@ -1570,12 +1570,12 @@
 		pmic: pmic@40 {
 			compatible = "ams,as3722";
 			reg = <0x40>;
-			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
 			ams,system-power-controller;
+			#gpio-cells = <2>;
+			gpio-controller;
+			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
-			gpio-controller;
-			#gpio-cells = <2>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&as3722_default>;
 
@@ -1679,7 +1679,7 @@
 					ams,ext-control = <1>;
 				};
 
-				vddio_sdmmc1: ldo1 {
+				reg_vddio_sdmmc1: ldo1 {
 					regulator-name = "VDDIO_SDMMC1";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <3300000>;
@@ -1711,7 +1711,7 @@
 
 				/* LDO5 not used */
 
-				vddio_sdmmc3: ldo6 {
+				reg_vddio_sdmmc3: ldo6 {
 					regulator-name = "VDDIO_SDMMC3";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <3300000>;
diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi
index 3e3b347afe56..3cab9bda918f 100644
--- a/arch/arm/boot/dts/tegra124-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis.dtsi
@@ -1600,12 +1600,12 @@
 		pmic: pmic@40 {
 			compatible = "ams,as3722";
 			reg = <0x40>;
-			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
 			ams,system-power-controller;
+			#gpio-cells = <2>;
+			gpio-controller;
+			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
-			gpio-controller;
-			#gpio-cells = <2>;
 			pinctrl-names = "default";
 			pinctrl-0 = <&as3722_default>;
 
@@ -1709,7 +1709,7 @@
 					ams,ext-control = <1>;
 				};
 
-				vddio_sdmmc1: ldo1 {
+				reg_vddio_sdmmc1: ldo1 {
 					regulator-name = "VDDIO_SDMMC1";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <3300000>;
@@ -1741,7 +1741,7 @@
 
 				/* LDO5 not used */
 
-				vddio_sdmmc3: ldo6 {
+				reg_vddio_sdmmc3: ldo6 {
 					regulator-name = "VDDIO_SDMMC3";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <3300000>;
-- 
2.14.4


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

* [PATCH v2 5/9] ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (3 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 4/9] ARM: tegra: apalis-tk1: further regulator clean-up Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 6/9] ARM: tegra: colibri_t30: further regulator clean-up Marcel Ziswiler
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

The power I2C bus aka PWR_I2C which connects to the audio codec, PMIC,
temperature sensor and touch screen controller is really on-module only.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: None
Changes in v1: None

 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi | 5 ++++-
 arch/arm/boot/dts/tegra124-apalis.dtsi      | 5 ++++-
 arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi  | 2 +-
 arch/arm/boot/dts/tegra30-apalis.dtsi       | 2 +-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
index e532b564e4c9..0d095729b46b 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
@@ -1552,7 +1552,10 @@
 		clock-frequency = <10000>;
 	};
 
-	/* PWR_I2C: power I2C to audio codec, PMIC and temperature sensor */
+	/*
+	 * PWR_I2C: power I2C to audio codec, PMIC and temperature sensor
+	 * (On-module)
+	 */
 	i2c@7000d000 {
 		status = "okay";
 		clock-frequency = <400000>;
diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi
index 3cab9bda918f..13127415d86b 100644
--- a/arch/arm/boot/dts/tegra124-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra124-apalis.dtsi
@@ -1582,7 +1582,10 @@
 		clock-frequency = <10000>;
 	};
 
-	/* PWR_I2C: power I2C to audio codec, PMIC and temperature sensor */
+	/*
+	 * PWR_I2C: power I2C to audio codec, PMIC and temperature sensor
+	 * (On-module)
+	 */
 	i2c@7000d000 {
 		status = "okay";
 		clock-frequency = <400000>;
diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
index 02f8126481a2..bc714032d771 100644
--- a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
@@ -845,7 +845,7 @@
 
 	/*
 	 * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
-	 * touch screen controller
+	 * touch screen controller (On-module)
 	 */
 	i2c@7000d000 {
 		status = "okay";
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 7f112f192fe9..4b6a8ecaac76 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -836,7 +836,7 @@
 
 	/*
 	 * PWR_I2C: power I2C to audio codec, PMIC, temperature sensor and
-	 * touch screen controller
+	 * touch screen controller (On-module)
 	 */
 	i2c@7000d000 {
 		status = "okay";
-- 
2.14.4


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

* [PATCH v2 6/9] ARM: tegra: colibri_t30: further regulator clean-up
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (4 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 5/9] ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 7/9] ARM: tegra: apalis_t30: " Marcel Ziswiler
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Drop unused labels.
Rename regulator tps62362-vout to +V1.2_VDD_CORE.
Reorder TPS65911 properties.
Rename +V1.05 to +V1.05_AVDD_PLLE.
Add ti,en-ck32k-xtal.
Specify TPS62362 vin-supply.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: None
Changes in v1: None

 arch/arm/boot/dts/tegra30-colibri.dtsi | 45 ++++++++++++++++------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-colibri.dtsi b/arch/arm/boot/dts/tegra30-colibri.dtsi
index 35af03ca9e90..f3c2dcd3879d 100644
--- a/arch/arm/boot/dts/tegra30-colibri.dtsi
+++ b/arch/arm/boot/dts/tegra30-colibri.dtsi
@@ -732,16 +732,13 @@
 		pmic: pmic@2d {
 			compatible = "ti,tps65911";
 			reg = <0x2d>;
-
+			#gpio-cells = <2>;
+			gpio-controller;
 			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
-
+			ti,en-ck32k-xtal;
 			ti,system-power-controller;
-
-			#gpio-cells = <2>;
-			gpio-controller;
-
 			vcc1-supply = <&reg_module_3v3>;
 			vcc2-supply = <&reg_module_3v3>;
 			vcc3-supply = <&reg_1v8_vio>;
@@ -752,29 +749,29 @@
 			vccio-supply = <&reg_module_3v3>;
 
 			regulators {
-				vdd1_reg: vdd1 {
+				reg_1v8_vio: vio {
+					regulator-name = "+V1.8";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				vdd1 {
 					regulator-name = "+V1.35_VDDIO_DDR";
 					regulator-min-microvolt = <1350000>;
 					regulator-max-microvolt = <1350000>;
 					regulator-always-on;
 				};
 
-				/* SW2: unused */
+				/* SW2 aka vdd2: unused */
 
-				vddctrl_reg: vddctrl {
+				vddctrl {
 					regulator-name = "+V1.0_VDD_CPU";
 					regulator-min-microvolt = <1150000>;
 					regulator-max-microvolt = <1150000>;
 					regulator-always-on;
 				};
 
-				reg_1v8_vio: vio {
-					regulator-name = "+V1.8";
-					regulator-min-microvolt = <1800000>;
-					regulator-max-microvolt = <1800000>;
-					regulator-always-on;
-				};
-
 				/* LDO1: unused */
 
 				/*
@@ -782,7 +779,7 @@
 				 * +V3.3_AUDIO_AVDD_S, +V3.3 and +V1.8_VDD_LAN
 				 * see also +V3.3 fixed supply
 				 */
-				ldo2_reg: ldo2 {
+				ldo2 {
 					regulator-name = "EN_+V3.3";
 					regulator-min-microvolt = <3300000>;
 					regulator-max-microvolt = <3300000>;
@@ -791,7 +788,7 @@
 
 				/* LDO3: unused */
 
-				ldo4_reg: ldo4 {
+				ldo4 {
 					regulator-name = "+V1.2_VDD_RTC";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
@@ -802,7 +799,7 @@
 				 * +V2.8_AVDD_VDAC:
 				 * only required for (unsupported) analog RGB
 				 */
-				ldo5_reg: ldo5 {
+				ldo5 {
 					regulator-name = "+V2.8_AVDD_VDAC";
 					regulator-min-microvolt = <2800000>;
 					regulator-max-microvolt = <2800000>;
@@ -814,20 +811,20 @@
 				 * but LDO6 can't set voltage in 50mV
 				 * granularity
 				 */
-				ldo6_reg: ldo6 {
+				ldo6 {
 					regulator-name = "+V1.05_AVDD_PLLE";
 					regulator-min-microvolt = <1100000>;
 					regulator-max-microvolt = <1100000>;
 				};
 
-				ldo7_reg: ldo7 {
+				ldo7 {
 					regulator-name = "+V1.2_AVDD_PLL";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
 					regulator-always-on;
 				};
 
-				ldo8_reg: ldo8 {
+				ldo8 {
 					regulator-name = "+V1.0_VDD_DDR_HS";
 					regulator-min-microvolt = <1000000>;
 					regulator-max-microvolt = <1000000>;
@@ -885,8 +882,7 @@
 		regulator@60 {
 			compatible = "ti,tps62362";
 			reg = <0x60>;
-
-			regulator-name = "tps62362-vout";
+			regulator-name = "+V1.2_VDD_CORE";
 			regulator-min-microvolt = <900000>;
 			regulator-max-microvolt = <1400000>;
 			regulator-boot-on;
@@ -894,6 +890,7 @@
 			ti,vsel0-state-low;
 			/* VSEL1: EN_CORE_DVFS_N low for DVFS */
 			ti,vsel1-state-low;
+			vin-supply =<&reg_module_3v3>;
 		};
 	};
 
-- 
2.14.4


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

* [PATCH v2 7/9] ARM: tegra: apalis_t30: further regulator clean-up
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (5 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 6/9] ARM: tegra: colibri_t30: further regulator clean-up Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-16 10:47 ` [PATCH v2 8/9] ASoC: tegra_sgtl5000: fix device_node refcounting Marcel Ziswiler
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Thierry Reding, Jonathan Hunter, Rob Herring,
	Mark Rutland

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Rename label vdd2_reg to reg_1v05.
Rename label ldo6_reg to reg_1v05_avdd_plle.
Drop unused labels.
Rename regulator tps62362-vout to +V1.2_VDD_CORE.
Reorder TPS65911 properties.
Rename +V1.05 to +V1.05_AVDD_PLLE.
Add ti,en-ck32k-xtal.
Specify TPS62362 vin-supply.
Drop spurious newline in TPS62362 properties.
Rename vddio_sdmmc_1v8_reg to reg_1v8_vddio_sdmmc3.
Rename +V1.05 to +V1.05_AVDD_PLLE.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2:
- Dropped "[PATCH v1 3/8] ARM: tegra: apalis/colibri_t30: fix hdmi
  regulator" as suggested by Russell et. al.
- Added 2 new patches improving/fixing audio on Apalis TK1.

Changes in v1: None

 arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts |  2 +-
 arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi     | 70 +++++++++++---------------
 arch/arm/boot/dts/tegra30-apalis.dtsi          | 68 +++++++++++--------------
 3 files changed, 58 insertions(+), 82 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts b/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
index e29dca92ba0a..34c9fcd9198f 100644
--- a/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1-eval.dts
@@ -251,7 +251,7 @@
 		states = <1800000 0x0
 			  3300000 0x1>;
 		startup-delay-us = <100000>;
-		vin-supply = <&vddio_sdmmc_1v8_reg>;
+		vin-supply = <&reg_1v8_vddio_sdmmc3>;
 	};
 };
 
diff --git a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
index bc714032d771..fcfd3fddfda9 100644
--- a/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis-v1.1.dtsi
@@ -13,14 +13,14 @@
 
 	pcie@3000 {
 		status = "okay";
-		avdd-pexa-supply = <&vdd2_reg>;
-		avdd-pexb-supply = <&vdd2_reg>;
-		avdd-pex-pll-supply = <&vdd2_reg>;
-		avdd-plle-supply = <&ldo6_reg>;
+		avdd-pexa-supply = <&reg_1v05>;
+		avdd-pexb-supply = <&reg_1v05>;
+		avdd-pex-pll-supply = <&reg_1v05>;
+		avdd-plle-supply = <&reg_1v05>;
 		hvdd-pex-supply = <&reg_module_3v3>;
 		vddio-pex-ctl-supply = <&reg_module_3v3>;
-		vdd-pexa-supply = <&vdd2_reg>;
-		vdd-pexb-supply = <&vdd2_reg>;
+		vdd-pexa-supply = <&reg_1v05>;
+		vdd-pexb-supply = <&reg_1v05>;
 
 		/* Apalis type specific */
 		pci@1,0 {
@@ -864,16 +864,13 @@
 		pmic: pmic@2d {
 			compatible = "ti,tps65911";
 			reg = <0x2d>;
-
+			#gpio-cells = <2>;
+			gpio-controller;
 			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
-
+			ti,en-ck32k-xtal;
 			ti,system-power-controller;
-
-			#gpio-cells = <2>;
-			gpio-controller;
-
 			vcc1-supply = <&reg_module_3v3>;
 			vcc2-supply = <&reg_module_3v3>;
 			vcc3-supply = <&reg_1v8_vio>;
@@ -884,38 +881,38 @@
 			vccio-supply = <&reg_module_3v3>;
 
 			regulators {
-				vdd1_reg: vdd1 {
+				reg_1v8_vio: vio {
+					regulator-name = "+V1.8";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				vdd1 {
 					regulator-name = "+V1.35_VDDIO_DDR";
 					regulator-min-microvolt = <1350000>;
 					regulator-max-microvolt = <1350000>;
 					regulator-always-on;
 				};
 
-				vdd2_reg: vdd2 {
+				reg_1v05: vdd2 {
 					regulator-name = "+V1.05";
 					regulator-min-microvolt = <1050000>;
 					regulator-max-microvolt = <1050000>;
 				};
 
-				vddctrl_reg: vddctrl {
+				vddctrl {
 					regulator-name = "+V1.0_VDD_CPU";
 					regulator-min-microvolt = <1150000>;
 					regulator-max-microvolt = <1150000>;
 					regulator-always-on;
 				};
 
-				reg_1v8_vio: vio {
-					regulator-name = "+V1.8";
-					regulator-min-microvolt = <1800000>;
-					regulator-max-microvolt = <1800000>;
-					regulator-always-on;
-				};
-
 				/*
 				 * 1.8 volt +VDDIO_SDMMC3 in case EN_+3.3_SDMMC3
 				 * is off
 				 */
-				vddio_sdmmc_1v8_reg: ldo1 {
+				reg_1v8_vddio_sdmmc3: ldo1 {
 					regulator-name = "+VDDIO_SDMMC3_1V8";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <1800000>;
@@ -927,20 +924,20 @@
 				 * +V3.3_AUDIO_AVDD_S, +V3.3
 				 * see also +V3.3 fixed supply
 				 */
-				ldo2_reg: ldo2 {
+				ldo2 {
 					regulator-name = "EN_+V3.3";
 					regulator-min-microvolt = <3300000>;
 					regulator-max-microvolt = <3300000>;
 					regulator-always-on;
 				};
 
-				ldo3_reg: ldo3 {
+				ldo3 {
 					regulator-name = "+V1.2_CSI";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
 				};
 
-				ldo4_reg: ldo4 {
+				ldo4 {
 					regulator-name = "+V1.2_VDD_RTC";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
@@ -951,32 +948,23 @@
 				 * +V2.8_AVDD_VDAC:
 				 * only required for (unsupported) analog RGB
 				 */
-				ldo5_reg: ldo5 {
+				ldo5 {
 					regulator-name = "+V2.8_AVDD_VDAC";
 					regulator-min-microvolt = <2800000>;
 					regulator-max-microvolt = <2800000>;
 					regulator-always-on;
 				};
 
-				/*
-				 * +V1.05_AVDD_PLLE: avdd_plle should be 1.05V
-				 * but LDO6 can't set voltage in 50mV
-				 * granularity
-				 */
-				ldo6_reg: ldo6 {
-					regulator-name = "+V1.05_AVDD_PLLE";
-					regulator-min-microvolt = <1100000>;
-					regulator-max-microvolt = <1100000>;
-				};
+				/* LDO6: unused */
 
-				ldo7_reg: ldo7 {
+				ldo7 {
 					regulator-name = "+V1.2_AVDD_PLL";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
 					regulator-always-on;
 				};
 
-				ldo8_reg: ldo8 {
+				ldo8 {
 					regulator-name = "+V1.0_VDD_DDR_HS";
 					regulator-min-microvolt = <1000000>;
 					regulator-max-microvolt = <1000000>;
@@ -1034,8 +1022,7 @@
 		regulator@60 {
 			compatible = "ti,tps62362";
 			reg = <0x60>;
-
-			regulator-name = "tps62362-vout";
+			regulator-name = "+V1.2_VDD_CORE";
 			regulator-min-microvolt = <900000>;
 			regulator-max-microvolt = <1400000>;
 			regulator-boot-on;
@@ -1043,6 +1030,7 @@
 			ti,vsel0-state-low;
 			/* VSEL1: EN_CORE_DVFS_N low for DVFS */
 			ti,vsel1-state-low;
+			vin-supply =<&reg_module_3v3>;
 		};
 	};
 
diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 4b6a8ecaac76..d2b688d90223 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -12,14 +12,14 @@
 
 	pcie@3000 {
 		status = "okay";
-		avdd-pexa-supply = <&vdd2_reg>;
-		avdd-pexb-supply = <&vdd2_reg>;
-		avdd-pex-pll-supply = <&vdd2_reg>;
-		avdd-plle-supply = <&ldo6_reg>;
+		avdd-pexa-supply = <&reg_1v05>;
+		avdd-pexb-supply = <&reg_1v05>;
+		avdd-pex-pll-supply = <&reg_1v05>;
+		avdd-plle-supply = <&reg_1v05>;
 		hvdd-pex-supply = <&reg_module_3v3>;
 		vddio-pex-ctl-supply = <&reg_module_3v3>;
-		vdd-pexa-supply = <&vdd2_reg>;
-		vdd-pexb-supply = <&vdd2_reg>;
+		vdd-pexa-supply = <&reg_1v05>;
+		vdd-pexb-supply = <&reg_1v05>;
 
 		/* Apalis type specific */
 		pci@1,0 {
@@ -855,16 +855,13 @@
 		pmic: pmic@2d {
 			compatible = "ti,tps65911";
 			reg = <0x2d>;
-
+			#gpio-cells = <2>;
+			gpio-controller;
 			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
 			#interrupt-cells = <2>;
 			interrupt-controller;
-
+			ti,en-ck32k-xtal;
 			ti,system-power-controller;
-
-			#gpio-cells = <2>;
-			gpio-controller;
-
 			vcc1-supply = <&reg_module_3v3>;
 			vcc2-supply = <&reg_module_3v3>;
 			vcc3-supply = <&reg_1v8_vio>;
@@ -875,33 +872,33 @@
 			vccio-supply = <&reg_module_3v3>;
 
 			regulators {
-				vdd1_reg: vdd1 {
+				reg_1v8_vio: vio {
+					regulator-name = "+V1.8";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				vdd1 {
 					regulator-name = "+V1.35_VDDIO_DDR";
 					regulator-min-microvolt = <1350000>;
 					regulator-max-microvolt = <1350000>;
 					regulator-always-on;
 				};
 
-				vdd2_reg: vdd2 {
+				reg_1v05: vdd2 {
 					regulator-name = "+V1.05";
 					regulator-min-microvolt = <1050000>;
 					regulator-max-microvolt = <1050000>;
 				};
 
-				vddctrl_reg: vddctrl {
+				vddctrl {
 					regulator-name = "+V1.0_VDD_CPU";
 					regulator-min-microvolt = <1150000>;
 					regulator-max-microvolt = <1150000>;
 					regulator-always-on;
 				};
 
-				reg_1v8_vio: vio {
-					regulator-name = "+V1.8";
-					regulator-min-microvolt = <1800000>;
-					regulator-max-microvolt = <1800000>;
-					regulator-always-on;
-				};
-
 				/* LDO1: unused */
 
 				/*
@@ -909,20 +906,20 @@
 				 * +V3.3_AUDIO_AVDD_S, +V3.3
 				 * see also +V3.3 fixed supply
 				 */
-				ldo2_reg: ldo2 {
+				ldo2 {
 					regulator-name = "EN_+V3.3";
 					regulator-min-microvolt = <3300000>;
 					regulator-max-microvolt = <3300000>;
 					regulator-always-on;
 				};
 
-				ldo3_reg: ldo3 {
+				ldo3 {
 					regulator-name = "+V1.2_CSI";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
 				};
 
-				ldo4_reg: ldo4 {
+				ldo4 {
 					regulator-name = "+V1.2_VDD_RTC";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
@@ -933,32 +930,23 @@
 				 * +V2.8_AVDD_VDAC:
 				 * only required for (unsupported) analog RGB
 				 */
-				ldo5_reg: ldo5 {
+				ldo5 {
 					regulator-name = "+V2.8_AVDD_VDAC";
 					regulator-min-microvolt = <2800000>;
 					regulator-max-microvolt = <2800000>;
 					regulator-always-on;
 				};
 
-				/*
-				 * +V1.05_AVDD_PLLE: avdd_plle should be 1.05V
-				 * but LDO6 can't set voltage in 50mV
-				 * granularity
-				 */
-				ldo6_reg: ldo6 {
-					regulator-name = "+V1.05_AVDD_PLLE";
-					regulator-min-microvolt = <1100000>;
-					regulator-max-microvolt = <1100000>;
-				};
+				/* LDO6: unused */
 
-				ldo7_reg: ldo7 {
+				ldo7 {
 					regulator-name = "+V1.2_AVDD_PLL";
 					regulator-min-microvolt = <1200000>;
 					regulator-max-microvolt = <1200000>;
 					regulator-always-on;
 				};
 
-				ldo8_reg: ldo8 {
+				ldo8 {
 					regulator-name = "+V1.0_VDD_DDR_HS";
 					regulator-min-microvolt = <1000000>;
 					regulator-max-microvolt = <1000000>;
@@ -1016,8 +1004,7 @@
 		regulator@60 {
 			compatible = "ti,tps62362";
 			reg = <0x60>;
-
-			regulator-name = "tps62362-vout";
+			regulator-name = "+V1.2_VDD_CORE";
 			regulator-min-microvolt = <900000>;
 			regulator-max-microvolt = <1400000>;
 			regulator-boot-on;
@@ -1025,6 +1012,7 @@
 			ti,vsel0-state-low;
 			/* VSEL1: EN_CORE_DVFS_N low for DVFS */
 			ti,vsel1-state-low;
+			vin-supply =<&reg_module_3v3>;
 		};
 	};
 
-- 
2.14.4


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

* [PATCH v2 8/9] ASoC: tegra_sgtl5000: fix device_node refcounting
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (6 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 7/9] ARM: tegra: apalis_t30: " Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-17 10:57   ` Jon Hunter
  2018-10-16 10:47 ` [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement Marcel Ziswiler
  2018-10-16 11:58 ` [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Mark Brown
  9 siblings, 1 reply; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Jaroslav Kysela, alsa-devel, Thierry Reding,
	Jonathan Hunter, Takashi Iwai, Liam Girdwood

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Similar to the following:

commit 4321723648b0 ("ASoC: tegra_alc5632: fix device_node refcounting")

commit 7c5dfd549617 ("ASoC: tegra: fix device_node refcounting")

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: New patch

 sound/soc/tegra/tegra_sgtl5000.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
index 45a4aa9d2a47..901457da25ec 100644
--- a/sound/soc/tegra/tegra_sgtl5000.c
+++ b/sound/soc/tegra/tegra_sgtl5000.c
@@ -149,14 +149,14 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev,
 			"Property 'nvidia,i2s-controller' missing/invalid\n");
 		ret = -EINVAL;
-		goto err;
+		goto err_put_codec_of_node;
 	}
 
 	tegra_sgtl5000_dai.platform_of_node = tegra_sgtl5000_dai.cpu_of_node;
 
 	ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
 	if (ret)
-		goto err;
+		goto err_put_cpu_of_node;
 
 	ret = snd_soc_register_card(card);
 	if (ret) {
@@ -169,6 +169,13 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
 
 err_fini_utils:
 	tegra_asoc_utils_fini(&machine->util_data);
+err_put_cpu_of_node:
+	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
+	tegra_sgtl5000_dai.cpu_of_node = NULL;
+	tegra_sgtl5000_dai.platform_of_node = NULL;
+err_put_codec_of_node:
+	of_node_put(tegra_sgtl5000_dai.codec_of_node);
+	tegra_sgtl5000_dai.codec_of_node = NULL;
 err:
 	return ret;
 }
@@ -183,6 +190,12 @@ static int tegra_sgtl5000_driver_remove(struct platform_device *pdev)
 
 	tegra_asoc_utils_fini(&machine->util_data);
 
+	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
+	tegra_sgtl5000_dai.cpu_of_node = NULL;
+	tegra_sgtl5000_dai.platform_of_node = NULL;
+	of_node_put(tegra_sgtl5000_dai.codec_of_node);
+	tegra_sgtl5000_dai.codec_of_node = NULL;
+
 	return ret;
 }
 
-- 
2.14.4


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

* [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (7 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 8/9] ASoC: tegra_sgtl5000: fix device_node refcounting Marcel Ziswiler
@ 2018-10-16 10:47 ` Marcel Ziswiler
  2018-10-17 12:32   ` Jon Hunter
  2018-10-16 11:58 ` [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Mark Brown
  9 siblings, 1 reply; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 10:47 UTC (permalink / raw)
  To: devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Jaroslav Kysela, alsa-devel, Thierry Reding,
	Jonathan Hunter, Takashi Iwai, Liam Girdwood

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

This fixes the following error as seen post commit daecf46ee0e5
("ASoC: soc-core: use snd_soc_dai_link_component for platform"):

tegra-snd-sgtl5000 sound: ASoC: Both platform name/of_node are set for
 sgtl5000
tegra-snd-sgtl5000 sound: ASoC: failed to init link sgtl5000
tegra-snd-sgtl5000 sound: snd_soc_register_card failed (-22)
tegra-snd-sgtl5000: probe of sound failed with error -22

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

Changes in v2: New patch

 sound/soc/tegra/tegra_sgtl5000.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
index 901457da25ec..eb702925cac3 100644
--- a/sound/soc/tegra/tegra_sgtl5000.c
+++ b/sound/soc/tegra/tegra_sgtl5000.c
@@ -168,6 +168,11 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
 	return 0;
 
 err_fini_utils:
+	if (tegra_sgtl5000_dai.platform) {
+		devm_kfree(&pdev->dev, tegra_sgtl5000_dai.platform);
+		tegra_sgtl5000_dai.platform = NULL;
+	}
+
 	tegra_asoc_utils_fini(&machine->util_data);
 err_put_cpu_of_node:
 	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
-- 
2.14.4


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

* Re: [PATCH v2 0/9] ARM: dts: tegra: last minute fixes
  2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
                   ` (8 preceding siblings ...)
  2018-10-16 10:47 ` [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement Marcel Ziswiler
@ 2018-10-16 11:58 ` Mark Brown
  2018-10-16 12:10   ` Marcel Ziswiler
  2018-10-17 10:51   ` Marcel Ziswiler
  9 siblings, 2 replies; 20+ messages in thread
From: Mark Brown @ 2018-10-16 11:58 UTC (permalink / raw)
  To: Marcel Ziswiler
  Cc: devicetree, linux-tegra, linux-kernel, Russell King - ARM Linux,
	Kuninori Morimoto, Jaroslav Kysela, alsa-devel, Thierry Reding,
	Jonathan Hunter, Liam Girdwood, Takashi Iwai, Rob Herring,
	Marcel Ziswiler, Mark Rutland

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

On Tue, Oct 16, 2018 at 12:47:21PM +0200, Marcel Ziswiler wrote:

> Marcel Ziswiler (9):
>   ARM: tegra: fix simple-panel compatibles
>   ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator gpio
>     enable
>   ARM: tegra: colibri_t20: reorder pmic properties
>   ARM: tegra: apalis-tk1: further regulator clean-up
>   ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module
>   ARM: tegra: colibri_t30: further regulator clean-up
>   ARM: tegra: apalis_t30: further regulator clean-up
>   ASoC: tegra_sgtl5000: fix device_node refcounting
>   ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement

These ASoC patches appear to have absolutely no relationship with the
rest of the series.  Is that the case or is there some dependency I'm
missing?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 0/9] ARM: dts: tegra: last minute fixes
  2018-10-16 11:58 ` [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Mark Brown
@ 2018-10-16 12:10   ` Marcel Ziswiler
  2018-10-17 10:51   ` Marcel Ziswiler
  1 sibling, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-16 12:10 UTC (permalink / raw)
  To: linux-kernel

On Tue, 2018-10-16 at 12:58 +0100, Mark Brown wrote:
> On Tue, Oct 16, 2018 at 12:47:21PM +0200, Marcel Ziswiler wrote:
> 
> > Marcel Ziswiler (9):
> >   ARM: tegra: fix simple-panel compatibles
> >   ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator
> > gpio
> >     enable
> >   ARM: tegra: colibri_t20: reorder pmic properties
> >   ARM: tegra: apalis-tk1: further regulator clean-up
> >   ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module
> >   ARM: tegra: colibri_t30: further regulator clean-up
> >   ARM: tegra: apalis_t30: further regulator clean-up
> >   ASoC: tegra_sgtl5000: fix device_node refcounting
> >   ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
> 
> These ASoC patches appear to have absolutely no relationship with the
> rest of the series.  Is that the case or is there some dependency I'm
> missing?

Not outside of all being Tegra specific stuff, no. If you prefer I may
send them as a separate series.


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

* Re: [PATCH v2 0/9] ARM: dts: tegra: last minute fixes
  2018-10-16 11:58 ` [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Mark Brown
  2018-10-16 12:10   ` Marcel Ziswiler
@ 2018-10-17 10:51   ` Marcel Ziswiler
  2018-10-17 11:44     ` Mark Brown
  1 sibling, 1 reply; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-17 10:51 UTC (permalink / raw)
  To: broonie
  Cc: linux-kernel, robh+dt, jonathanh, devicetree, linux,
	thierry.reding, mark.rutland, kuninori.morimoto.gx, tiwai,
	lgirdwood, alsa-devel, linux-tegra

On Tue, 2018-10-16 at 12:58 +0100, Mark Brown wrote:
> On Tue, Oct 16, 2018 at 12:47:21PM +0200, Marcel Ziswiler wrote:
> 
> > Marcel Ziswiler (9):
> >   ARM: tegra: fix simple-panel compatibles
> >   ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator
> > gpio
> >     enable
> >   ARM: tegra: colibri_t20: reorder pmic properties
> >   ARM: tegra: apalis-tk1: further regulator clean-up
> >   ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module
> >   ARM: tegra: colibri_t30: further regulator clean-up
> >   ARM: tegra: apalis_t30: further regulator clean-up
> >   ASoC: tegra_sgtl5000: fix device_node refcounting
> >   ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
> 
> These ASoC patches appear to have absolutely no relationship with the
> rest of the series.  Is that the case or is there some dependency I'm
> missing?

Not outside of all being Tegra specific stuff, no. If you prefer I may
send them as a separate series.

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

* Re: [PATCH v2 8/9] ASoC: tegra_sgtl5000: fix device_node refcounting
  2018-10-16 10:47 ` [PATCH v2 8/9] ASoC: tegra_sgtl5000: fix device_node refcounting Marcel Ziswiler
@ 2018-10-17 10:57   ` Jon Hunter
  0 siblings, 0 replies; 20+ messages in thread
From: Jon Hunter @ 2018-10-17 10:57 UTC (permalink / raw)
  To: Marcel Ziswiler, devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Jaroslav Kysela, alsa-devel, Thierry Reding,
	Takashi Iwai, Liam Girdwood



On 16/10/2018 11:47, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> Similar to the following:
> 
> commit 4321723648b0 ("ASoC: tegra_alc5632: fix device_node refcounting")
> 
> commit 7c5dfd549617 ("ASoC: tegra: fix device_node refcounting")
> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> ---
> 
> Changes in v2: New patch
> 
>  sound/soc/tegra/tegra_sgtl5000.c | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
> index 45a4aa9d2a47..901457da25ec 100644
> --- a/sound/soc/tegra/tegra_sgtl5000.c
> +++ b/sound/soc/tegra/tegra_sgtl5000.c
> @@ -149,14 +149,14 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
>  		dev_err(&pdev->dev,
>  			"Property 'nvidia,i2s-controller' missing/invalid\n");
>  		ret = -EINVAL;
> -		goto err;
> +		goto err_put_codec_of_node;
>  	}
>  
>  	tegra_sgtl5000_dai.platform_of_node = tegra_sgtl5000_dai.cpu_of_node;
>  
>  	ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
>  	if (ret)
> -		goto err;
> +		goto err_put_cpu_of_node;
>  
>  	ret = snd_soc_register_card(card);
>  	if (ret) {
> @@ -169,6 +169,13 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
>  
>  err_fini_utils:
>  	tegra_asoc_utils_fini(&machine->util_data);
> +err_put_cpu_of_node:
> +	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
> +	tegra_sgtl5000_dai.cpu_of_node = NULL;
> +	tegra_sgtl5000_dai.platform_of_node = NULL;
> +err_put_codec_of_node:
> +	of_node_put(tegra_sgtl5000_dai.codec_of_node);
> +	tegra_sgtl5000_dai.codec_of_node = NULL;
>  err:
>  	return ret;
>  }
> @@ -183,6 +190,12 @@ static int tegra_sgtl5000_driver_remove(struct platform_device *pdev)
>  
>  	tegra_asoc_utils_fini(&machine->util_data);
>  
> +	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
> +	tegra_sgtl5000_dai.cpu_of_node = NULL;
> +	tegra_sgtl5000_dai.platform_of_node = NULL;
> +	of_node_put(tegra_sgtl5000_dai.codec_of_node);
> +	tegra_sgtl5000_dai.codec_of_node = NULL;
> +
>  	return ret;
>  }
>  

Acked-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH v2 0/9] ARM: dts: tegra: last minute fixes
  2018-10-17 10:51   ` Marcel Ziswiler
@ 2018-10-17 11:44     ` Mark Brown
  0 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2018-10-17 11:44 UTC (permalink / raw)
  To: Marcel Ziswiler
  Cc: linux-kernel, robh+dt, jonathanh, devicetree, linux,
	thierry.reding, mark.rutland, kuninori.morimoto.gx, tiwai,
	lgirdwood, alsa-devel, linux-tegra

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

On Wed, Oct 17, 2018 at 10:51:30AM +0000, Marcel Ziswiler wrote:
> On Tue, 2018-10-16 at 12:58 +0100, Mark Brown wrote:

> > These ASoC patches appear to have absolutely no relationship with the
> > rest of the series.  Is that the case or is there some dependency I'm
> > missing?

> Not outside of all being Tegra specific stuff, no. If you prefer I may
> send them as a separate series.

It's fine this time but do try to avoid doing that please - if things
aren't related just send them separately.  Bundling them up into a
series creates confusion about dependencis and can result in things
getting held up due to problems in the unrelated bits of the series.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
  2018-10-16 10:47 ` [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement Marcel Ziswiler
@ 2018-10-17 12:32   ` Jon Hunter
  2018-10-17 14:28     ` Marcel Ziswiler
  0 siblings, 1 reply; 20+ messages in thread
From: Jon Hunter @ 2018-10-17 12:32 UTC (permalink / raw)
  To: Marcel Ziswiler, devicetree, linux-tegra, linux-kernel
  Cc: Russell King - ARM Linux, Mark Brown, Kuninori Morimoto,
	Marcel Ziswiler, Jaroslav Kysela, alsa-devel, Thierry Reding,
	Takashi Iwai, Liam Girdwood


On 16/10/2018 11:47, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> This fixes the following error as seen post commit daecf46ee0e5
> ("ASoC: soc-core: use snd_soc_dai_link_component for platform"):
> 
> tegra-snd-sgtl5000 sound: ASoC: Both platform name/of_node are set for
>  sgtl5000
> tegra-snd-sgtl5000 sound: ASoC: failed to init link sgtl5000
> tegra-snd-sgtl5000 sound: snd_soc_register_card failed (-22)
> tegra-snd-sgtl5000: probe of sound failed with error -22
> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> ---
> 
> Changes in v2: New patch
> 
>  sound/soc/tegra/tegra_sgtl5000.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
> index 901457da25ec..eb702925cac3 100644
> --- a/sound/soc/tegra/tegra_sgtl5000.c
> +++ b/sound/soc/tegra/tegra_sgtl5000.c
> @@ -168,6 +168,11 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_fini_utils:
> +	if (tegra_sgtl5000_dai.platform) {
> +		devm_kfree(&pdev->dev, tegra_sgtl5000_dai.platform);
> +		tegra_sgtl5000_dai.platform = NULL;
> +	}
> +
>  	tegra_asoc_utils_fini(&machine->util_data);
>  err_put_cpu_of_node:
>  	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
>

Where is the above allocated? I don't see it allocated in this driver
AFAICT. If it is not then it does not seem right to free something that
we have not allocated in this driver. I would have assumed it was
allocated by snd_soc_init_platform() in which case it should not be
necessary to free because that function uses devm_kzalloc(). What am I
missing here?

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
  2018-10-17 12:32   ` Jon Hunter
@ 2018-10-17 14:28     ` Marcel Ziswiler
  2018-10-17 19:16       ` Mark Brown
  0 siblings, 1 reply; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-17 14:28 UTC (permalink / raw)
  To: jonathanh, linux-kernel, linux-tegra, devicetree
  Cc: linux, broonie, thierry.reding, kuninori.morimoto.gx, tiwai,
	lgirdwood, perex, alsa-devel

On Wed, 2018-10-17 at 13:32 +0100, Jon Hunter wrote:
> On 16/10/2018 11:47, Marcel Ziswiler wrote:
> > From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > This fixes the following error as seen post commit daecf46ee0e5
> > ("ASoC: soc-core: use snd_soc_dai_link_component for platform"):
> > 
> > tegra-snd-sgtl5000 sound: ASoC: Both platform name/of_node are set
> > for
> >  sgtl5000
> > tegra-snd-sgtl5000 sound: ASoC: failed to init link sgtl5000
> > tegra-snd-sgtl5000 sound: snd_soc_register_card failed (-22)
> > tegra-snd-sgtl5000: probe of sound failed with error -22
> > 
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > ---
> > 
> > Changes in v2: New patch
> > 
> >  sound/soc/tegra/tegra_sgtl5000.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/sound/soc/tegra/tegra_sgtl5000.c
> > b/sound/soc/tegra/tegra_sgtl5000.c
> > index 901457da25ec..eb702925cac3 100644
> > --- a/sound/soc/tegra/tegra_sgtl5000.c
> > +++ b/sound/soc/tegra/tegra_sgtl5000.c
> > @@ -168,6 +168,11 @@ static int tegra_sgtl5000_driver_probe(struct
> > platform_device *pdev)
> >  	return 0;
> >  
> >  err_fini_utils:
> > +	if (tegra_sgtl5000_dai.platform) {
> > +		devm_kfree(&pdev->dev,
> > tegra_sgtl5000_dai.platform);
> > +		tegra_sgtl5000_dai.platform = NULL;
> > +	}
> > +
> >  	tegra_asoc_utils_fini(&machine->util_data);
> >  err_put_cpu_of_node:
> >  	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
> > 
> 
> Where is the above allocated?

snd_soc_init_platform() in sound/soc/soc-core.c

> I don't see it allocated in this driver
> AFAICT. If it is not then it does not seem right to free something
> that
> we have not allocated in this driver. I would have assumed it was
> allocated by snd_soc_init_platform() in which case it should not be
> necessary to free because that function uses devm_kzalloc().

That is kind of what I assumed as well.

> What am I missing here?

That is actually a very very good question. Unfortunately, since above
mentioned commit which is part of the bigger multi-platform (or
whatever one may call it) rework done by folks on CC things start
falling apart.

I should maybe rather have phrased this one as an RFC.

Some facts from my humble investigation so far:

- The issue does not exhibit itself on Apalis/Colibri T30 where
probably the order of things being initialised is slightly different.

- Bisecting points to the above mentioned commit being to blame.
However there is no way to just revert that commit as it is part of the
bigger multi-platform rework.

- Somehow it has to do with probe deferral. Basically, platform gets
allocated in snd_soc_init_platform() but due to GPIO/I2C whatever not
being ready the SGTL5000 codec aka dai_link can not yet be found and
therefore it probe defers as follows:

[    2.166517] tegra30-i2s 70301200.i2s: DMA channels sourced from
device 70300000.ahub
[    2.176043] tegra-snd-sgtl5000 sound: ASoC: CODEC DAI sgtl5000 not
registered
[    2.183241] tegra-snd-sgtl5000 sound: snd_soc_register_card failed
(-517)

- Somewhere thereafter platform seems to get stumped onto (e.g. its
name rather than being null now is bogus. Unfortunately, it is not just
the name as clearing just that did not really help (sgtl5000 codec gets
instantiated but trying to play audio always returned -EINVAL).

- The second time around snd_soc_init_platform() re-uses previously
allocated platform now corrupt triggering a check in soc-core
concerning platform name and of_node both being set (as noted in above
commit message).

Some questions:

- How exactly are devm allocations supposed to work concerning probe
deferrals?

- Does or should the platform get cleared during a probe deferral
cycle?

- If so, why does that not work?

- Or is some special implicit probe deferral handling missing in soc-
core?

I'm happy to try more things and/or provide more debugging output if
needed. Just let me know.

Thanks Jon!

> Cheers
> Jon

Cheers

Marcel

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

* Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
  2018-10-17 14:28     ` Marcel Ziswiler
@ 2018-10-17 19:16       ` Mark Brown
  2018-10-17 19:50         ` Jon Hunter
  2018-10-17 21:33         ` Marcel Ziswiler
  0 siblings, 2 replies; 20+ messages in thread
From: Mark Brown @ 2018-10-17 19:16 UTC (permalink / raw)
  To: Marcel Ziswiler
  Cc: jonathanh, linux-kernel, linux-tegra, devicetree, linux,
	thierry.reding, kuninori.morimoto.gx, tiwai, lgirdwood, perex,
	alsa-devel

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

On Wed, Oct 17, 2018 at 02:28:22PM +0000, Marcel Ziswiler wrote:

> Some questions:

> - How exactly are devm allocations supposed to work concerning probe
> deferrals?

Probe deferrals are just normal probe errors, any devm_ allocated stuff
gets unwound.

> - Does or should the platform get cleared during a probe deferral
> cycle?

> - If so, why does that not work?

Is something writing to static data when it should be writing to
dynamically allocated data?  That's what this sounds like, we shouldn't
be modifying any static data and any data dynamically allocated during
probe ought to be being discarded.

> - Or is some special implicit probe deferral handling missing in soc-
> core?

Like I say a probe deferral is just a normal error.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
  2018-10-17 19:16       ` Mark Brown
@ 2018-10-17 19:50         ` Jon Hunter
  2018-10-17 21:33         ` Marcel Ziswiler
  1 sibling, 0 replies; 20+ messages in thread
From: Jon Hunter @ 2018-10-17 19:50 UTC (permalink / raw)
  To: Mark Brown, Marcel Ziswiler
  Cc: linux-kernel, linux-tegra, devicetree, linux, thierry.reding,
	kuninori.morimoto.gx, tiwai, lgirdwood, perex, alsa-devel


On 17/10/2018 20:16, Mark Brown wrote:
> On Wed, Oct 17, 2018 at 02:28:22PM +0000, Marcel Ziswiler wrote:
> 
>> Some questions:
> 
>> - How exactly are devm allocations supposed to work concerning probe
>> deferrals?
> 
> Probe deferrals are just normal probe errors, any devm_ allocated stuff
> gets unwound.
> 
>> - Does or should the platform get cleared during a probe deferral
>> cycle?
> 
>> - If so, why does that not work?
> 
> Is something writing to static data when it should be writing to
> dynamically allocated data?  That's what this sounds like, we shouldn't
> be modifying any static data and any data dynamically allocated during
> probe ought to be being discarded.

Marcel, it maybe worth looking at what happens in the 2nd call to
snd_soc_init_platform() following the probe deferral. Also pay attention
to the value of 'dai_link->platform_name' in snd_soc_init_platform() on
both 1st and 2nd call. Seems that on the 2nd time the function is called
the value is not NULL???

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement
  2018-10-17 19:16       ` Mark Brown
  2018-10-17 19:50         ` Jon Hunter
@ 2018-10-17 21:33         ` Marcel Ziswiler
  1 sibling, 0 replies; 20+ messages in thread
From: Marcel Ziswiler @ 2018-10-17 21:33 UTC (permalink / raw)
  To: broonie
  Cc: linux-kernel, jonathanh, linux, devicetree, thierry.reding,
	kuninori.morimoto.gx, tiwai, lgirdwood, perex, linux-tegra,
	alsa-devel

On Wed, 2018-10-17 at 20:16 +0100, Mark Brown wrote:
> On Wed, Oct 17, 2018 at 02:28:22PM +0000, Marcel Ziswiler wrote:
> 
> > Some questions:
> > - How exactly are devm allocations supposed to work concerning
> > probe
> > deferrals?
> 
> Probe deferrals are just normal probe errors, any devm_ allocated
> stuff
> gets unwound.

OK, that is where my understanding was weary. So you are saying
anything should really get allocated again upon the second time.

> > - Does or should the platform get cleared during a probe deferral
> > cycle?
> > - If so, why does that not work?
> 
> Is something writing to static data when it should be writing to
> dynamically allocated data?  That's what this sounds like, we
> shouldn't
> be modifying any static data and any data dynamically allocated
> during
> probe ought to be being discarded.

OK, I believe I start to see what you are saying. I guess the bug lays
in soc-core then not properly discarding the platform and the second
time around it is using a stale pointer to that which now of course
points to whatever happens to be there! Let me try a few more things
and I will cook up a proper patch to fix that...

> > - Or is some special implicit probe deferral handling missing in
> > soc-
> > core?
> 
> Like I say a probe deferral is just a normal error.

Yeah, right. Thanks!

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

end of thread, other threads:[~2018-10-17 21:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16 10:47 [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 1/9] ARM: tegra: fix simple-panel compatibles Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 2/9] ARM: tegra: apalis-tk1/colibri_t20/t30: eval/iris: fix regulator gpio enable Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 3/9] ARM: tegra: colibri_t20: reorder pmic properties Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 4/9] ARM: tegra: apalis-tk1: further regulator clean-up Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 5/9] ARM: tegra: apalis_t30/tk1: annotate power I2C being on-module Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 6/9] ARM: tegra: colibri_t30: further regulator clean-up Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 7/9] ARM: tegra: apalis_t30: " Marcel Ziswiler
2018-10-16 10:47 ` [PATCH v2 8/9] ASoC: tegra_sgtl5000: fix device_node refcounting Marcel Ziswiler
2018-10-17 10:57   ` Jon Hunter
2018-10-16 10:47 ` [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs. of_node assignement Marcel Ziswiler
2018-10-17 12:32   ` Jon Hunter
2018-10-17 14:28     ` Marcel Ziswiler
2018-10-17 19:16       ` Mark Brown
2018-10-17 19:50         ` Jon Hunter
2018-10-17 21:33         ` Marcel Ziswiler
2018-10-16 11:58 ` [PATCH v2 0/9] ARM: dts: tegra: last minute fixes Mark Brown
2018-10-16 12:10   ` Marcel Ziswiler
2018-10-17 10:51   ` Marcel Ziswiler
2018-10-17 11:44     ` Mark Brown

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