From 02888f8be5ef056b1ffa7e149a9674d9a233493f Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 22 Nov 2016 01:14:03 +0100 Subject: [PATCH 01/13] ARM: tegra: apalis-tk1: Pull-up temperature alert Pull-up GPIO_PI6 connected to TMP451's ALERT#/THERM2#. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-apalis.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi index 0819721dda59..5cc11842e242 100644 --- a/arch/arm/boot/dts/tegra124-apalis.dtsi +++ b/arch/arm/boot/dts/tegra124-apalis.dtsi @@ -1153,11 +1153,11 @@ kb_row2_pr2 { nvidia,enable-input = ; }; - /* GPIO_PI6 aka TEMP_ALERT_L */ + /* GPIO_PI6 aka TMP451 ALERT#/THERM2# */ pi6 { nvidia,pins = "pi6"; nvidia,function = "rsvd1"; - nvidia,pull = ; + nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; From a7f9d4febc8159fd977cbf08113e67cadc70214c Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 22 Nov 2016 01:14:04 +0100 Subject: [PATCH 02/13] ARM: tegra: apalis-tk1: Optional DisplayPort hot-plug detect Configure DP_HPD_PFF0 pin as optional DisplayPort hot-plug detect. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi index 5cc11842e242..4ef9c2585c5d 100644 --- a/arch/arm/boot/dts/tegra124-apalis.dtsi +++ b/arch/arm/boot/dts/tegra124-apalis.dtsi @@ -257,7 +257,7 @@ pex_l1_clkreq_n_pdd6 { }; dp_hpd_pff0 { nvidia,pins = "dp_hpd_pff0"; - nvidia,function = "rsvd2"; + nvidia,function = "dp"; nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; From 5142bd659c1bd6da102a54d8cd7aae4af38c38b2 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 22 Nov 2016 01:14:05 +0100 Subject: [PATCH 03/13] ARM: tegra: apalis-tk1: Adjust pin muxing for v1.1 HW Configure Apalis MMC1 D6 GPIO on SDMMC3_CLK_LB_IN as reserved function without any pull-up/down. Configure GPIO_PV2 as SD1_CD# according to latest V1.1 HW. Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output driver enabled aka not tristated and input driver enabled as well as it features some magic properties even though the external loopback is disabled and the internal loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being set to 0xfffd according to the TRM! This pin is now a not-connect on V1.1 HW in order to avoid any interference. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-apalis.dtsi | 53 +++++++++++--------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi index 4ef9c2585c5d..0651d6889a8c 100644 --- a/arch/arm/boot/dts/tegra124-apalis.dtsi +++ b/arch/arm/boot/dts/tegra124-apalis.dtsi @@ -416,18 +416,10 @@ clk2_req_pcc5 { /* D4 GPIO */ nvidia,tristate = ; nvidia,enable-input = ; }; - /* - * Don't use MMC1_D6 aka SDMMC3_CLK_LB_IN for now as it - * features some magic properties even though the - * external loopback is disabled and the internal - * loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 - * register's SDMMC_SPARE1 bits being set to 0xfffd - * according to the TRM! - */ sdmmc3_clk_lb_in_pee5 { /* D6 GPIO */ nvidia,pins = "sdmmc3_clk_lb_in_pee5"; - nvidia,function = "sdmmc3"; - nvidia,pull = ; + nvidia,function = "rsvd2"; + nvidia,pull = ; nvidia,tristate = ; nvidia,enable-input = ; }; @@ -522,20 +514,12 @@ sdmmc3_dat0_pb7 { nvidia,tristate = ; nvidia,enable-input = ; }; - /* - * Don't use SD1_CD# aka SDMMC3_CLK_LB_OUT for now as it - * features some magic properties even though the - * external loopback is disabled and the internal - * loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 - * register's SDMMC_SPARE1 bits being set to 0xfffd - * according to the TRM! - */ - sdmmc3_clk_lb_out_pee4 { /* CD# GPIO */ - nvidia,pins = "sdmmc3_clk_lb_out_pee4"; - nvidia,function = "rsvd2"; - nvidia,pull = ; + sdmmc3_cd_n_pv2 { /* CD# GPIO */ + nvidia,pins = "sdmmc3_cd_n_pv2"; + nvidia,function = "rsvd3"; + nvidia,pull = ; nvidia,tristate = ; - nvidia,enable-input = ; + nvidia,enable-input = ; }; /* Apalis SPDIF */ @@ -1514,13 +1498,6 @@ pv1 { /* NC */ nvidia,tristate = ; nvidia,enable-input = ; }; - sdmmc3_cd_n_pv2 { /* NC */ - nvidia,pins = "sdmmc3_cd_n_pv2"; - nvidia,function = "rsvd3"; - nvidia,pull = ; - nvidia,tristate = ; - nvidia,enable-input = ; - }; gpio_x1_aud_px1 { /* NC */ nvidia,pins = "gpio_x1_aud_px1"; nvidia,function = "rsvd2"; @@ -1570,6 +1547,22 @@ dap_mclk1_req_pee2 { /* NC */ nvidia,tristate = ; nvidia,enable-input = ; }; + /* + * Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output + * driver enabled aka not tristated and input driver + * enabled as well as it features some magic properties + * even though the external loopback is disabled and the + * internal loopback used as per + * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 + * bits being set to 0xfffd according to the TRM! + */ + sdmmc3_clk_lb_out_pee4 { /* NC */ + nvidia,pins = "sdmmc3_clk_lb_out_pee4"; + nvidia,function = "sdmmc3"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + }; }; }; From ab9670d5524af2359663ae590ee02e3b27d13b88 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 22 Nov 2016 01:14:06 +0100 Subject: [PATCH 04/13] ARM: tegra: apalis-tk1: Fix SD card detect on v1.1 HW Add SD card detect SD1_CD# applicable for V1.1 modules using GPIO_PV2. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-apalis-eval.dts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-apalis-eval.dts b/arch/arm/boot/dts/tegra124-apalis-eval.dts index 653044a44f0d..5b860ad5cbee 100644 --- a/arch/arm/boot/dts/tegra124-apalis-eval.dts +++ b/arch/arm/boot/dts/tegra124-apalis-eval.dts @@ -187,14 +187,8 @@ sdhci@700b0000 { /* Apalis SD1 */ sdhci@700b0400 { status = "okay"; - /* - * Don't use SD1_CD# aka SDMMC3_CLK_LB_OUT for now as it - * features some magic properties even though the external - * loopback is disabled and the internal loopback used as per - * SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being - * set to 0xfffd according to the TRM! - * cd-gpios = <&gpio TEGRA_GPIO(EE, 4) GPIO_ACTIVE_LOW>; - */ + /* SD1_CD# */ + cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>; bus-width = <4>; vqmmc-supply = <&vddio_sdmmc3>; }; From 6270bd3d9187650aba71c51492de932c168a5e03 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 22 Nov 2016 01:14:07 +0100 Subject: [PATCH 05/13] ARM: tegra: apalis-tk1: Update compatibility comment Now with the new V1.1A HW card detect being implemented update resp. compatibility information. Signed-off-by: Marcel Ziswiler Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-apalis.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124-apalis.dtsi b/arch/arm/boot/dts/tegra124-apalis.dtsi index 0651d6889a8c..f9e623bdd5c3 100644 --- a/arch/arm/boot/dts/tegra124-apalis.dtsi +++ b/arch/arm/boot/dts/tegra124-apalis.dtsi @@ -44,7 +44,7 @@ /* * Toradex Apalis TK1 Module Device Tree - * Compatible for Revisions 2GB: V1.0A + * Compatible for Revisions 2GB: V1.0A, V1.0B, V1.1A */ / { model = "Toradex Apalis TK1"; From 0c18927f51f4d390abdcf385bff5f995407ee732 Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Fri, 9 Dec 2016 10:20:38 +0100 Subject: [PATCH 06/13] ARM: tegra: paz00: Mark panel regulator as enabled on boot Current U-Boot enables the display already. Marking the regulator as enabled on boot fixes sporadic panel initialization failures. Signed-off-by: Marc Dietrich Tested-by: Misha Komarovskiy Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra20-paz00.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra20-paz00.dts b/arch/arm/boot/dts/tegra20-paz00.dts index 4e361a8c167e..b4bfa5586c23 100644 --- a/arch/arm/boot/dts/tegra20-paz00.dts +++ b/arch/arm/boot/dts/tegra20-paz00.dts @@ -569,6 +569,7 @@ vdd_pnl_reg: regulator@1 { regulator-name = "+3VS,vdd_pnl"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + regulator-boot-on; gpio = <&gpio TEGRA_GPIO(A, 4) GPIO_ACTIVE_HIGH>; enable-active-high; }; From a3e4863ea90801813e1c99104f517c7fcb8aabf6 Mon Sep 17 00:00:00 2001 From: Rask Ingemann Lambertsen Date: Sun, 22 Jan 2017 22:17:48 +0100 Subject: [PATCH 07/13] =?UTF-8?q?ARM:=20dts:=20tegra:=20Fix=20missing=20ca?= =?UTF-8?q?rd=20detection=20in=20Trimslice=20=C2=B5SD=20card=20slot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Card insertion and removal currently goes undetected. AFAIK there's no way to generate interrupts on card changes in this slot, so use polling. Signed-off-by: Rask Ingemann Lambertsen Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra20-trimslice.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts index 381747f114a9..87b07fbadbbe 100644 --- a/arch/arm/boot/dts/tegra20-trimslice.dts +++ b/arch/arm/boot/dts/tegra20-trimslice.dts @@ -366,6 +366,7 @@ usb-phy@c5008000 { sdhci@c8000000 { status = "okay"; + broken-cd; bus-width = <4>; }; From 38333641b6dd0b7e3538d515cf7e4a0e25075065 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 22 Jan 2017 16:47:48 +0100 Subject: [PATCH 08/13] ARM: tegra: nyan: Use proper IRQ type definitions This switches a few interrupt definitions that were using GPIO_ACTIVE_HIGH as IRQ type, which is invalid. This is mostly a cosmetic change, that doesn't affect any driver. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-nyan.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi index eabfa655a3cd..ef430aa30152 100644 --- a/arch/arm/boot/dts/tegra124-nyan.dtsi +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi @@ -65,7 +65,7 @@ acodec: audio-codec@10 { compatible = "maxim,max98090"; reg = <0x10>; interrupt-parent = <&gpio>; - interrupts = ; + interrupts = ; }; temperature-sensor@4c { @@ -331,7 +331,7 @@ charger: bq24735@9 { reg = <0x9>; interrupt-parent = <&gpio>; interrupts = ; + IRQ_TYPE_EDGE_BOTH>; ti,ac-detect-gpios = <&gpio TEGRA_GPIO(J, 0) GPIO_ACTIVE_HIGH>; From 5fc01a9909273f5b9b6f01e96e1eded4adebd953 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 22 Jan 2017 16:47:49 +0100 Subject: [PATCH 09/13] ARM: tegra: nyan: Use external control for bq24735 charger Nyan boards come with an embedded controller that controls when to enable and disable the charge. Thus, it should not be left up to the kernel to handle that. Using the ti,external-control property allows specifying this use-case. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-nyan.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi index ef430aa30152..5cf987b5401e 100644 --- a/arch/arm/boot/dts/tegra124-nyan.dtsi +++ b/arch/arm/boot/dts/tegra124-nyan.dtsi @@ -335,6 +335,7 @@ charger: bq24735@9 { ti,ac-detect-gpios = <&gpio TEGRA_GPIO(J, 0) GPIO_ACTIVE_HIGH>; + ti,external-control; }; battery: sbs-battery@b { From bfa3c0d4e8ba8eff525d34dbde0e76a98ebfbade Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 22 Jan 2017 16:47:50 +0100 Subject: [PATCH 10/13] ARM: tegra: nyan-big: Include compatible revisions for proper detection Depthcharge (the payload used with cros devices) will attempt to detect boards using their revision. This includes all the known revisions for the nyan-big board so that the dtb can be selected preferably. Defining compatibly revisions allows depthcharge to select the kernel via the revision it detects instead of using the default kernel. This allows having a FIT image with multiple kernels for multiple devices. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-nyan-big.dts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts index 67d7cfb32541..ded8ff4fa33f 100644 --- a/arch/arm/boot/dts/tegra124-nyan-big.dts +++ b/arch/arm/boot/dts/tegra124-nyan-big.dts @@ -6,7 +6,11 @@ / { model = "Acer Chromebook 13 CB5-311"; - compatible = "google,nyan-big", "nvidia,tegra124"; + compatible = "google,nyan-big-rev7", "google,nyan-big-rev6", + "google,nyan-big-rev5", "google,nyan-big-rev4", + "google,nyan-big-rev3", "google,nyan-big-rev2", + "google,nyan-big-rev1", "google,nyan-big-rev0", + "google,nyan-big", "google,nyan", "nvidia,tegra124"; panel: panel { compatible = "auo,b133xtn01"; From a02620ea09da2ac9a9b6b6cca978a52032ccf3fb Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 22 Jan 2017 16:47:51 +0100 Subject: [PATCH 11/13] ARM: tegra: nyan-blaze: Include compatible revisions for proper detection Depthcharge (the payload used with cros devices) will attempt to detect boards using their revision. This includes all the known revisions for the nyan-blaze board so that the dtb can be selected preferably. Defining compatibly revisions allows depthcharge to select the kernel via the revision it detects instead of using the default kernel. This allows having a FIT image with multiple kernels for multiple devices. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-nyan-blaze.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts index c9582361c26e..cb2238ccb1e5 100644 --- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts +++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts @@ -6,7 +6,13 @@ / { model = "HP Chromebook 14"; - compatible = "google,nyan-blaze", "google,nyan", "nvidia,tegra124"; + compatible = "google,nyan-blaze-rev10", "google,nyan-blaze-rev9", + "google,nyan-blaze-rev8", "google,nyan-blaze-rev7", + "google,nyan-blaze-rev6", "google,nyan-blaze-rev5", + "google,nyan-blaze-rev4", "google,nyan-blaze-rev3", + "google,nyan-blaze-rev2", "google,nyan-blaze-rev1", + "google,nyan-blaze-rev0", "google,nyan-blaze", + "google,nyan", "nvidia,tegra124"; panel: panel { compatible = "samsung,ltn140at29-301"; From 8a44a98d911f4cadc93a5e5bf316c5d90c65263c Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 22 Jan 2017 16:47:52 +0100 Subject: [PATCH 12/13] ARM: tegra: nyan-big: Proper pinmux for TPM I2C This corrects the pinmux for accessing the TPM over the I2C line. Thus, it allows correctly probing the module, that previously failed with I2C errors. Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-nyan-big.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-nyan-big.dts b/arch/arm/boot/dts/tegra124-nyan-big.dts index ded8ff4fa33f..12eb7809d9ab 100644 --- a/arch/arm/boot/dts/tegra124-nyan-big.dts +++ b/arch/arm/boot/dts/tegra124-nyan-big.dts @@ -1102,19 +1102,19 @@ pbb0 { }; cam_i2c_scl_pbb1 { nvidia,pins = "cam_i2c_scl_pbb1"; - nvidia,function = "rsvd3"; - nvidia,pull = ; - nvidia,tristate = ; - nvidia,enable-input = ; - nvidia,open-drain = ; + nvidia,function = "i2c3"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + nvidia,open-drain = ; }; cam_i2c_sda_pbb2 { nvidia,pins = "cam_i2c_sda_pbb2"; - nvidia,function = "rsvd3"; - nvidia,pull = ; - nvidia,tristate = ; - nvidia,enable-input = ; - nvidia,open-drain = ; + nvidia,function = "i2c3"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + nvidia,open-drain = ; }; pbb3 { nvidia,pins = "pbb3"; From 393a33c74554be3c30233907e3aa0f84603fee31 Mon Sep 17 00:00:00 2001 From: Jerome Coste Date: Sun, 22 Jan 2017 16:47:53 +0100 Subject: [PATCH 13/13] ARM: tegra: nyan-blaze: Proper pinmux for TPM I2C This corrects the pinmux for accessing the TPM over the I2C line. Thus, it allows correctly probing the module, that previously failed with I2C errors. Signed-off-by: Jerome Coste Signed-off-by: Paul Kocialkowski Signed-off-by: Thierry Reding --- arch/arm/boot/dts/tegra124-nyan-blaze.dts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/tegra124-nyan-blaze.dts b/arch/arm/boot/dts/tegra124-nyan-blaze.dts index cb2238ccb1e5..1078a73d5092 100644 --- a/arch/arm/boot/dts/tegra124-nyan-blaze.dts +++ b/arch/arm/boot/dts/tegra124-nyan-blaze.dts @@ -1100,19 +1100,19 @@ pbb0 { }; cam_i2c_scl_pbb1 { nvidia,pins = "cam_i2c_scl_pbb1"; - nvidia,function = "rsvd3"; - nvidia,pull = ; - nvidia,tristate = ; - nvidia,enable-input = ; - nvidia,open-drain = ; + nvidia,function = "i2c3"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + nvidia,open-drain = ; }; cam_i2c_sda_pbb2 { nvidia,pins = "cam_i2c_sda_pbb2"; - nvidia,function = "rsvd3"; - nvidia,pull = ; - nvidia,tristate = ; - nvidia,enable-input = ; - nvidia,open-drain = ; + nvidia,function = "i2c3"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + nvidia,open-drain = ; }; pbb3 { nvidia,pins = "pbb3";