Skip to contentSkip to conversation

ARM: dts: tegra: apalis-tk1: updates incl. v1.2 hardware support

PATCH Applied Marcel Ziswiler 3 participants 12 messages Feb 10, 2018 – Mar 8, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: dts: tegra: apalis-tk1: updates incl. v1.2 hardware support

This series sets critical trips, activates PWM pin muxing for PWM3, adds a missing AS3722 GPIO0 configuration, adds a hog group for Ethernet, PCIe, reset GPIOs, updates the copyright period, removes spurious newlines and adds support for the V1.2 hardware revision of the Toradex Apalis TK1 system on module.

Marcel Ziswiler (6):
arm: tegra: apalis-tk1: set critical trips
ARM: dts: tegra: apalis-tk1: activate pwm pin muxing for pwm3
ARM: dts: tegra: apalis-tk1: add missing as3722 gpio0 configuration
ARM: dts: tegra: apalis-tk1: hog group for ethernet, pcie, reset gpios
ARM: dts: tegra: apalis-tk1: copyright period, spurious newlines
ARM: dts: tegra: apalis-tk1: support v1.2 hardware revision

 arch/arm/boot/dts/Makefile                      |    1 +
 arch/arm/boot/dts/tegra124-apalis-eval.dts      |   16 +-
 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts |  250 +++
 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi     | 2052 +++++++++++++++++++++++
 arch/arm/boot/dts/tegra124-apalis.dtsi          |   70 +-
 5 files changed, 2344 insertions(+), 45 deletions(-)
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/6 arm: tegra: apalis-tk1: set critical trips

From: Marcel Ziswiler <[email protected]>

Set "critical" trip temperatures for cpu, gpu, mem and pllx thermal zones. These trips can trigger shut down or reset.

Similar to commit 40823f8e267f ("arm: tegra: set critical trips for Tegra124").

---

 arch/arm/boot/dts/tegra124-apalis.dtsi | 27 +++------------------------
 1 file changed, 3 insertions(+), 24 deletions(-)
arch/arm/boot/dts/tegra124-apalis.dtsi +3 -24
index 7aef8928e115..be45b6753916 100644
@@ -2041,53 +2041,32 @@
 	thermal-zones {
 		cpu {
 			trips {
-				trip at 0 {
+				cpu-shutdown-trip {
 					temperature = <101000>;
 					hysteresis = <0>;
 					type = "critical";
 				};
 			};
-
-			cooling-maps {
-				/*
-				 * There are currently no cooling maps because
-				 * there are no cooling devices
-				 */
-			};
 		};
 
 		mem {
 			trips {
-				trip at 0 {
+				mem-shutdown-trip {
 					temperature = <101000>;
 					hysteresis = <0>;
 					type = "critical";
 				};
 			};
-
-			cooling-maps {
-				/*
-				 * There are currently no cooling maps because
-				 * there are no cooling devices
-				 */
-			};
 		};
 
 		gpu {
 			trips {
-				trip at 0 {
+				gpu-shutdown-trip {
 					temperature = <101000>;
 					hysteresis = <0>;
 					type = "critical";
 				};
 			};
-
-			cooling-maps {
-				/*
-				 * There are currently no cooling maps because
-				 * there are no cooling devices
-				 */
-			};
 		};
 	};
 };
Signature · 1 line
2.14.3
#2 lore raw

PATCH 2/6 ARM: dts: tegra: apalis-tk1: activate pwm pin muxing for pwm3

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Activate PWM pin muxing for Apalis PWM3. Note that the same PWM3 is already active on pu6 being Apalis BKL1_PWM as well. Therefore exporting that one for raw sysfs access will fail and one has to revert to using the pwm backlight.

Downstream commit 668ddb921800 ("apalis-tk1: activate pwm pin muxing for pwm3").

---

 arch/arm/boot/dts/tegra124-apalis.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/tegra124-apalis.dtsi +4 -4
index be45b6753916..7fbaaf221029 100644
@@ -453,12 +453,12 @@
 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
 			};
-			/* PWM3 active on pu6 being Apalis BKL1_PWM */
+			/* PWM3 active on pu6 being Apalis BKL1_PWM as well */
 			ph3 {
 				nvidia,pins = "ph3";
-				nvidia,function = "gmi";
-				nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
-				nvidia,tristate = <TEGRA_PIN_ENABLE>;
+				nvidia,function = "pwm3";
+				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+				nvidia,tristate = <TEGRA_PIN_DISABLE>;
 				nvidia,enable-input = <TEGRA_PIN_DISABLE>;
 			};
 
Signature · 1 line
2.14.3
#3 lore raw

Re: [PATCH 2/6] ARM: dts: tegra: apalis-tk1: activate pwm pin muxing for pwm3

Quoted 9 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Activate PWM pin muxing for Apalis PWM3. Note that the same PWM3 is already active on pu6 being Apalis BKL1_PWM as well. Therefore exporting that one for raw sysfs access will fail and one has to revert to using the pwm backlight.

Downstream commit 668ddb921800 ("apalis-tk1: activate pwm pin muxing for pwm3").

That line is rather meaningless without knowing what exactly "downstream" is. I've removed that line.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180308/08cab0eb/attachment.sig>

#4 lore raw

PATCH 3/6 ARM: dts: tegra: apalis-tk1: add missing as3722 gpio0 configuration

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

As the AS3722 GPIO0 is also a not connected on our Apalis TK1 module explicitly configure it to high-impedance as well.

---

 arch/arm/boot/dts/tegra124-apalis.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/tegra124-apalis.dtsi +3 -3
index 7fbaaf221029..44c31176ce90 100644
@@ -1620,9 +1620,9 @@
 					bias-pull-up;
 				};
 
-				gpio1_3_4_5_6 {
-					pins = "gpio1", "gpio3", "gpio4",
-					       "gpio5", "gpio6";
+				gpio0_1_3_4_5_6 {
+					pins = "gpio0", "gpio1", "gpio3",
+					       "gpio4", "gpio5", "gpio6";
 					bias-high-impedance;
 				};
 			};
Signature · 1 line
2.14.3
#5 lore raw

PATCH 4/6 ARM: dts: tegra: apalis-tk1: hog group for ethernet, pcie, reset gpios

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

The Apalis TK1 module uses some dedicated GPIOs as I210 gigabit Ethernet controller reset and to control RESET_MOCI aka reset module output carrier input on MXM3 pin 26. The Apalis Evaluation Board furthermore uses Apalis GPIO7 on MXM3 pin 15 as reset signal for its PLX PEX 8605 PCIe Switch.

---

 arch/arm/boot/dts/tegra124-apalis-eval.dts | 10 ++++++++++
 arch/arm/boot/dts/tegra124-apalis.dtsi     | 18 ++++++++++++++++++
 2 files changed, 28 insertions(+)
arch/arm/boot/dts/tegra124-apalis-eval.dts +10 -0
index af6c566e8ac4..f1010cefb993 100644
@@ -275,3 +275,13 @@
 		vin-supply = <&reg_5v0>;
 	};
 };
+
+&gpio {
+	/* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
+	pex_perst_n {
+		gpio-hog;
+		gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
+		output-high;
+		line-name = "PEX_PERST_N";
+	};
+};
arch/arm/boot/dts/tegra124-apalis.dtsi +18 -0
index 44c31176ce90..b7648ce4565d 100644
@@ -2070,3 +2070,21 @@
 		};
 	};
 };
+
+&gpio {
+	/* I210 Gigabit Ethernet Controller Reset */
+	lan_reset_n {
+		gpio-hog;
+		gpios = <TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>;
+		output-high;
+		line-name = "LAN_RESET_N";
+	};
+
+	/* Control MXM3 pin 26 Reset Module Output Carrier Input */
+	reset_moci_ctrl {
+		gpio-hog;
+		gpios = <TEGRA_GPIO(U, 4) GPIO_ACTIVE_HIGH>;
+		output-high;
+		line-name = "RESET_MOCI_CTRL";
+	};
+};
Signature · 1 line
2.14.3
#6 lore raw

PATCH 5/6 ARM: dts: tegra: apalis-tk1: copyright period, spurious newlines

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Update the copyright period and get rid of some spurious newlines.

---

 arch/arm/boot/dts/tegra124-apalis-eval.dts |  6 ++----
 arch/arm/boot/dts/tegra124-apalis.dtsi     | 11 +----------
 2 files changed, 3 insertions(+), 14 deletions(-)
arch/arm/boot/dts/tegra124-apalis-eval.dts +2 -4
index f1010cefb993..a6ad759dddb4 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Toradex AG
+ * Copyright 2016-2018 Toradex AG
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual
@@ -225,9 +225,7 @@
 
 	backlight: backlight {
 		compatible = "pwm-backlight";
-
-		/* BKL1_PWM */
-		pwms = <&pwm 3 5000000>;
+		pwms = <&pwm 3 5000000>; /* BKL1_PWM */
 		brightness-levels = <255 231 223 207 191 159 127 0>;
 		default-brightness-level = <6>;
 		/* BKL1_ON */
arch/arm/boot/dts/tegra124-apalis.dtsi +1 -10
index b7648ce4565d..65a2161b9b8e 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Toradex AG
+ * Copyright 2016-2018 Toradex AG
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual
@@ -56,7 +56,6 @@
 
 	pcie at 1003000 {
 		status = "okay";
-
 		avddio-pex-supply = <&vdd_1v05>;
 		avdd-pex-pll-supply = <&vdd_1v05>;
 		avdd-pll-erefe-supply = <&avdd_1v05>;
@@ -85,7 +84,6 @@
 		hdmi at 54280000 {
 			pll-supply = <&reg_1v05_avdd_hdmi_pll>;
 			vdd-supply = <&reg_3v3_avdd_hdmi>;
-
 			nvidia,ddc-i2c-bus = <&hdmi_ddc>;
 			nvidia,hpd-gpio =
 				<&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
@@ -1600,15 +1598,11 @@
 			compatible = "ams,as3722";
 			reg = <0x40>;
 			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
-
 			ams,system-power-controller;
-
 			#interrupt-cells = <2>;
 			interrupt-controller;
-
 			gpio-controller;
 			#gpio-cells = <2>;
-
 			pinctrl-names = "default";
 			pinctrl-0 = <&as3722_default>;
 
@@ -1783,7 +1777,6 @@
 			reg = <0x4c>;
 			interrupt-parent = <&gpio>;
 			interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
-
 			#thermal-sensor-cells = <1>;
 		};
 	};
@@ -1816,7 +1809,6 @@
 	sata at 70020000 {
 		phys = <&{/padctl@7009f000/pads/sata/lanes/sata-0}>;
 		phy-names = "sata-0";
-
 		avdd-supply = <&vdd_1v05>;
 		hvdd-supply = <&reg_3v3>;
 		vddio-supply = <&vdd_1v05>;
@@ -1830,7 +1822,6 @@
 		       <&{/padctl@7009f000/pads/usb2/lanes/usb2-2}>,
 		       <&{/padctl@7009f000/pads/pcie/lanes/pcie-0}>;
 		phy-names = "usb2-0", "usb3-1", "usb2-1", "usb2-2", "usb3-0";
-
 		avddio-pex-supply = <&vdd_1v05>;
 		avdd-pll-erefe-supply = <&avdd_1v05>;
 		avdd-pll-utmip-supply = <&vddio_1v8>;
Signature · 1 line
2.14.3
#7 lore raw

Re: [PATCH 5/6] ARM: dts: tegra: apalis-tk1: copyright period, spurious newlines

Marcel,

Quoted 17 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Update the copyright period and get rid of some spurious newlines.

---

 arch/arm/boot/dts/tegra124-apalis-eval.dts |  6 ++----
 arch/arm/boot/dts/tegra124-apalis.dtsi     | 11 +----------
 2 files changed, 3 insertions(+), 14 deletions(-)
arch/arm/boot/dts/tegra124-apalis-eval.dts +0 -0
index f1010cefb993..a6ad759dddb4 100644

arch/arm/boot/dts/tegra124-apalis-eval.dts line 5

Quoted 6 lines
arch/arm/boot/dts/tegra124-apalis-eval.dts +1 -1
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Toradex AG
+ * Copyright 2016-2018 Toradex AG
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this dual

Since you are fixing copyrights, would you consider also fixing the license to use a proper SPDX Id instead?

It would be super gentle of you!

And you will get extra good karma point if you feel like doing the same for every Toradex-copyrighted files ;)

The (still new and fresh) license documentation contributed by tglx --the only real-time docu-mentalist-- is in:
Documentation/process/license-rules.rst

Thanks!

Signature · 2 lines
Cordially
Philippe Ombredanne
#8 lore raw

Re: [PATCH 5/6] ARM: dts: tegra: apalis-tk1: copyright period, spurious newlines

Quoted 35 lines · Philippe Ombredanne

Marcel,

Quoted 6 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Update the copyright period and get rid of some spurious newlines.

Review

Quoted 7 lines

---

 arch/arm/boot/dts/tegra124-apalis-eval.dts |  6 ++----
 arch/arm/boot/dts/tegra124-apalis.dtsi     | 11 +----------
 2 files changed, 3 insertions(+), 14 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/tegra124-apalis-eval.dts

arch/arm/boot/dts/tegra124-apalis-eval.dts line 5

Quoted 10 lines

index f1010cefb993..a6ad759dddb4 100644

arch/arm/boot/dts/tegra124-apalis-eval.dts +1 -1
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Toradex AG
+ * Copyright 2016-2018 Toradex AG
  *
  * This file is dual-licensed: you can use it either under the terms
  * of the GPL or the X11 license, at your option. Note that this

dual

Since you are fixing copyrights, would you consider also fixing the license to use a proper SPDX Id instead?

It would be super gentle of you!

Quoted 8 lines

And you will get extra good karma point if you feel like doing the same for every Toradex-copyrighted files ;)

The (still new and fresh) license documentation contributed by tglx --the only real-time docu-mentalist-- is in:
Documentation/process/license-rules.rst

Thanks!

Yes, I'm already in the process of preparing a separate patch set fixing this across all Toradex files. However I'm running this through our legal as well first to make absolutely sure it's all proper.

Thanks!

#9 lore raw

Re: [PATCH 5/6] ARM: dts: tegra: apalis-tk1: copyright period, spurious newlines

Quoted 3 lines · Marcel Ziswiler

Yes, I'm already in the process of preparing a separate patch set fixing this across all Toradex files. However I'm running this through our legal as well first to make absolutely sure it's all proper.

That's the way to go and thank you for this.
Do not hesitate to ping here or privately if there is any legal concern that comes up.

Signature · 2 lines
Cordially
Philippe Ombredanne
#10 lore raw

PATCH 6/6 ARM: dts: tegra: apalis-tk1: support v1.2 hardware revision

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Support the V1.2 hardware revision with the following pin muxing changes:

Ddc_scl_pv4 and ddc_sda_pv5 previously used as Apalis GPIO3 and GPIO4 are now used as DDC pins.

Gen2_i2c_scl_pt5 and gen2_i2c_sda_pt6 previously used as DDC pins are now used as USB power enable signals.

Usb_vbus_en0_pn4 and usb_vbus_en1_pn5 previously used as USB power enable signals are now used as GPIO3 and GPIO4.

---

 arch/arm/boot/dts/Makefile                      |    1 +
 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts |  250 +++
 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi     | 2052 +++++++++++++++++++++++
 3 files changed, 2303 insertions(+)
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi
arch/arm/boot/dts/Makefile +1 -0
index ade7a38543dc..9d882741f0da 100644
@@ -1022,6 +1022,7 @@ dtb-$(CONFIG_ARCH_TEGRA_114_SOC) += \
 	tegra114-tn7.dtb
 dtb-$(CONFIG_ARCH_TEGRA_124_SOC) += \
 	tegra124-apalis-eval.dtb \
+	tegra124-apalis-v1.2-eval.dtb \
 	tegra124-jetson-tk1.dtb \
 	tegra124-nyan-big.dtb \
 	tegra124-nyan-blaze.dtb \
arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts new file +250 -0

250 lines not on this page · raw message

arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi new file +2052 -0

2,052 lines not on this page · raw message

Signature · 1 line
2.14.3
#11 lore raw
In reply to Marcel Ziswiler
Quoted 16 lines · Marcel Ziswiler

This series sets critical trips, activates PWM pin muxing for PWM3, adds a missing AS3722 GPIO0 configuration, adds a hog group for Ethernet, PCIe, reset GPIOs, updates the copyright period, removes spurious newlines and adds support for the V1.2 hardware revision of the Toradex Apalis TK1 system on module.

Marcel Ziswiler (6):
arm: tegra: apalis-tk1: set critical trips
ARM: dts: tegra: apalis-tk1: activate pwm pin muxing for pwm3
ARM: dts: tegra: apalis-tk1: add missing as3722 gpio0 configuration
ARM: dts: tegra: apalis-tk1: hog group for ethernet, pcie, reset gpios
ARM: dts: tegra: apalis-tk1: copyright period, spurious newlines
ARM: dts: tegra: apalis-tk1: support v1.2 hardware revision

Quoted 8 lines
 arch/arm/boot/dts/Makefile                      |    1 +
 arch/arm/boot/dts/tegra124-apalis-eval.dts      |   16 +-
 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts |  250 +++
 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi     | 2052 +++++++++++++++++++++++
 arch/arm/boot/dts/tegra124-apalis.dtsi          |   70 +-
 5 files changed, 2344 insertions(+), 45 deletions(-)
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
 create mode 100644 arch/arm/boot/dts/tegra124-apalis-v1.2.dtsi

Applied, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180308/0c874d84/attachment-0001.sig>