2015-08-28 12:43:14

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 0/9] arm: tegra: apalis_t30: fix pin mux, hdmi, wakeup and enable hda

This series finally continues on my previous Easter efforts (BTW:
thanks all for the feedback and all the patches thereof already having
been applied) and additionally to fixing the pin muxing and enabling
HDA audio also fixes HDMI and the wake-up key.


Marcel Ziswiler (9):
arm: tegra: apalis_t30: update hardware revisions compatibility
comment
arm: tegra: apalis_t30: fix hdmi supply
arm: tegra: apalis_t30: fix pin muxing
arm: tegra: apalis_t30: add comment concerning emmc
arm: tegra: apalis_t30: add digital audio pin muxing
arm: tegra: apalis_t30: enable hda for eval board
arm: tegra: apalis_t30: set otg dr_mode for eval board
arm: tegra: apalis_t30: fix backlight pwm comment for eval board
arm: tegra: apalis_t30: fix power/wakeup key for eval board

arch/arm/boot/dts/tegra30-apalis-eval.dts | 13 +++--
arch/arm/boot/dts/tegra30-apalis.dtsi | 80 ++++++++++++++++++++++++-------
2 files changed, 73 insertions(+), 20 deletions(-)

--
2.4.3


2015-08-28 12:43:40

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 1/9] arm: tegra: apalis_t30: update hardware revisions compatibility comment

Update introductory comment about what exact hardware revisions this
device tree is compatible with as a hint for our customers.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis.dtsi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index a5446cb..3bff4d7 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -1,8 +1,9 @@
#include "tegra30.dtsi"

/*
- * Toradex Apalis T30 Device Tree
- * Compatible for Revisions 1GB: V1.0A; 2GB: V1.0B, V1.0C
+ * Toradex Apalis T30 Module Device Tree
+ * Compatible for Revisions 1GB: V1.0A, V1.1A; 1GB IT: V1.1A;
+ * 2GB: V1.0B, V1.0C, V1.0E, V1.1A
*/
/ {
model = "Toradex Apalis T30";
--
2.4.3

2015-08-28 12:43:08

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 2/9] arm: tegra: apalis_t30: fix hdmi supply

Fix HDMI supplies (both regular VDD as well as PLL ones) being switched
by the TPS65911 PMIC's GPIO6 aka EN_VDD_HDMI by introducing two new
GPIO switched fixed regulators avdd_hdmi_pll_1v8_reg and
avdd_hdmi_3v3_reg.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis.dtsi | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 3bff4d7..fd6c94e 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -34,8 +34,8 @@

host1x@50000000 {
hdmi@54280000 {
- vdd-supply = <&sys_3v3_reg>;
- pll-supply = <&vio_reg>;
+ vdd-supply = <&avdd_hdmi_3v3_reg>;
+ pll-supply = <&avdd_hdmi_pll_1v8_reg>;

nvidia,hpd-gpio =
<&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
@@ -667,18 +667,40 @@
#address-cells = <1>;
#size-cells = <0>;

- sys_3v3_reg: regulator@100 {
+ avdd_hdmi_pll_1v8_reg: regulator@100 {
compatible = "regulator-fixed";
reg = <100>;
+ regulator-name = "+V1.8_AVDD_HDMI_PLL";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ enable-active-high;
+ gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&vio_reg>;
+ };
+
+ sys_3v3_reg: regulator@101 {
+ compatible = "regulator-fixed";
+ reg = <101>;
regulator-name = "3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};

- charge_pump_5v0_reg: regulator@101 {
+ avdd_hdmi_3v3_reg: regulator@102 {
compatible = "regulator-fixed";
- reg = <101>;
+ reg = <102>;
+ regulator-name = "+V3.3_AVDD_HDMI";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ enable-active-high;
+ gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
+ vin-supply = <&sys_3v3_reg>;
+ };
+
+ charge_pump_5v0_reg: regulator@103 {
+ compatible = "regulator-fixed";
+ reg = <103>;
regulator-name = "5v0";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
--
2.4.3

2015-08-28 12:43:25

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 3/9] arm: tegra: apalis_t30: fix pin muxing

Fix pin muxing which got broken due to certain stuff having been
fixed/renamed since.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis.dtsi | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index fd6c94e..84744dc 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -66,7 +66,7 @@
/* BKL1_PWM_EN#, disable TPS65911 PMIC PWM backlight */
uart3_cts_n_pa1 {
nvidia,pins = "uart3_cts_n_pa1";
- nvidia,function = "rsvd1";
+ nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_UP>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
};
@@ -152,32 +152,32 @@
};

/* Apalis PWM1 */
- gpio_pu6 {
- nvidia,pins = "gpio_pu6";
+ pu6 {
+ nvidia,pins = "pu6";
nvidia,function = "pwm3";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
};

/* Apalis PWM2 */
- gpio_pu5 {
- nvidia,pins = "gpio_pu5";
+ pu5 {
+ nvidia,pins = "pu5";
nvidia,function = "pwm2";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
};

/* Apalis PWM3 */
- gpio_pu4 {
- nvidia,pins = "gpio_pu4";
+ pu4 {
+ nvidia,pins = "pu4";
nvidia,function = "pwm1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
};

/* Apalis PWM4 */
- gpio_pu3 {
- nvidia,pins = "gpio_pu3";
+ pu3 {
+ nvidia,pins = "pu3";
nvidia,function = "pwm0";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
--
2.4.3

2015-08-28 12:43:46

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 4/9] arm: tegra: apalis_t30: add comment concerning emmc

Instead of adding an otherwise unused emmc label just add a comment.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index 84744dc..d1b24b1 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -636,6 +636,7 @@
nvidia,sys-clock-req-active-high;
};

+ /* eMMC */
sdhci@78000600 {
status = "okay";
bus-width = <8>;
--
2.4.3

2015-08-28 12:47:19

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 5/9] arm: tegra: apalis_t30: add digital audio pin muxing

Add Apalis digital audio pin muxing which is e.g. used for HDA
operation together with the Realtek HDA codec as found on the Apalis
Evaluation board.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis.dtsi | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/arch/arm/boot/dts/tegra30-apalis.dtsi b/arch/arm/boot/dts/tegra30-apalis.dtsi
index d1b24b1..4a6ca38 100644
--- a/arch/arm/boot/dts/tegra30-apalis.dtsi
+++ b/arch/arm/boot/dts/tegra30-apalis.dtsi
@@ -109,6 +109,30 @@
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};

+ /* Apalis Digital Audio */
+ clk1_req_pee2 {
+ nvidia,pins = "clk1_req_pee2";
+ nvidia,function = "hda";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ };
+ clk2_out_pw5 {
+ nvidia,pins = "clk2_out_pw5";
+ nvidia,function = "extperiph2";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+ dap1_fs_pn0 {
+ nvidia,pins = "dap1_fs_pn0",
+ "dap1_din_pn1",
+ "dap1_dout_pn2",
+ "dap1_sclk_pn3";
+ nvidia,function = "hda";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ };
+
/* Apalis I2C3 */
cam_i2c_scl_pbb1 {
nvidia,pins = "cam_i2c_scl_pbb1",
--
2.4.3

2015-08-28 12:43:22

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 6/9] arm: tegra: apalis_t30: enable hda for eval board

Actually enable HDA now that it should otherwise be supported driver
and device tree wise.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis-eval.dts | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index 6236bde..5a49f03 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -126,6 +126,10 @@
};
};

+ hda@70030000 {
+ status = "okay";
+ };
+
sd1: sdhci@78000000 {
status = "okay";
bus-width = <4>;
--
2.4.3

2015-08-28 12:46:37

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 7/9] arm: tegra: apalis_t30: set otg dr_mode for eval board

This has currently no functional effect as neither USB device nor OTG
is currently supported on any Tegras in mainline as of yet. However
once we use the same device tree on U-Boot this will actually make it
work properly there.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis-eval.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index 5a49f03..37437c6 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -153,6 +153,7 @@

usb-phy@7d000000 {
status = "okay";
+ dr_mode = "otg";
vbus-supply = <&usbo1_vbus_reg>;
};

--
2.4.3

2015-08-28 12:46:36

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 8/9] arm: tegra: apalis_t30: fix backlight pwm comment for eval board

Fix the backlight PWM comment as it is actually called PWM_BKL1 rather
than just PWM0.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis-eval.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index 37437c6..c832c15 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -180,7 +180,7 @@
backlight: backlight {
compatible = "pwm-backlight";

- /* PWM0 */
+ /* PWM_BKL1 */
pwms = <&pwm 0 5000000>;
brightness-levels = <255 231 223 207 191 159 127 0>;
default-brightness-level = <6>;
--
2.4.3

2015-08-28 12:44:14

by Marcel Ziswiler

[permalink] [raw]
Subject: [PATCH 9/9] arm: tegra: apalis_t30: fix power/wakeup key for eval board

Rather than a power key WAKE1_MICO is actually a standard Apalis MXM3
pin used for wake-up purpose which this patch fixes.

Signed-off-by: Marcel Ziswiler <[email protected]>
---

arch/arm/boot/dts/tegra30-apalis-eval.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/tegra30-apalis-eval.dts b/arch/arm/boot/dts/tegra30-apalis-eval.dts
index c832c15..f2879cf 100644
--- a/arch/arm/boot/dts/tegra30-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra30-apalis-eval.dts
@@ -191,10 +191,10 @@
gpio-keys {
compatible = "gpio-keys";

- power {
- label = "Power";
+ wakeup {
+ label = "WAKE1_MICO";
gpios = <&gpio TEGRA_GPIO(V, 1) GPIO_ACTIVE_LOW>;
- linux,code = <KEY_POWER>;
+ linux,code = <KEY_WAKEUP>;
debounce-interval = <10>;
gpio-key,wakeup;
};
--
2.4.3