summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-toradex-mainline-4.14/0031-apalis-tk1-force-fixed-ids-for-sdmmc-controllers.patch
blob: 1a38fd1c3601c0edfa7a19a56fe730cc8626eacf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From afd589352be71175ac13a3c7139eae7724a37460 Mon Sep 17 00:00:00 2001
Message-Id: <afd589352be71175ac13a3c7139eae7724a37460.1531317141.git.marcel.ziswiler@toradex.com>
In-Reply-To: <6654e1bd342708a683daf47e7558455f709a3e7e.1531317141.git.marcel.ziswiler@toradex.com>
References: <6654e1bd342708a683daf47e7558455f709a3e7e.1531317141.git.marcel.ziswiler@toradex.com>
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Date: Wed, 11 Jul 2018 10:58:19 +0200
Subject: [PATCH 31/33] apalis-tk1: force fixed ids for sdmmc controllers

The following, together with kernel patches, forces a fixed assignment
between device id and sdmmc controller.

I.e. the eMMC on SDMMC4 will be /dev/mmcblk0.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---
 arch/arm/boot/dts/tegra124-apalis-eval.dts      | 16 ++++++++++++++--
 arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts | 16 ++++++++++++++--
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-apalis-eval.dts b/arch/arm/boot/dts/tegra124-apalis-eval.dts
index ecffcd115fa7..7e2b9cf84741 100644
--- a/arch/arm/boot/dts/tegra124-apalis-eval.dts
+++ b/arch/arm/boot/dts/tegra124-apalis-eval.dts
@@ -49,6 +49,18 @@
 	compatible = "toradex,apalis-tk1-eval", "toradex,apalis-tk1",
 		     "nvidia,tegra124";
 
+	aliases {
+		/*
+		 * The following, together with kernel patches, forces a fixed
+		 * assignment between device id and SDMMC controllers.
+		 *
+		 * I.e. the eMMC on SDMMC4 will be /dev/mmcblk0.
+		 */
+		mmc0 = "/sdhci@700b0600"; /* eMMC */
+		mmc1 = &mmc1; /* MMC1 slot */
+		mmc2 = &sd1; /* SD1 slot */
+	};
+
 	aliases {
 		rtc0 = "/i2c@7000c000/rtc@68";
 		rtc1 = "/i2c@7000d000/pmic@40";
@@ -176,7 +188,7 @@
 	};
 
 	/* Apalis MMC1 */
-	sdhci@700b0000 {
+	mmc1: sdhci@700b0000 {
 		status = "okay";
 		/* MMC1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
@@ -185,7 +197,7 @@
 	};
 
 	/* Apalis SD1 */
-	sdhci@700b0400 {
+	sd1: sdhci@700b0400 {
 		status = "okay";
 		/* SD1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
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 8a8d5fa0ecd1..046a415d5db8 100644
--- a/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
+++ b/arch/arm/boot/dts/tegra124-apalis-v1.2-eval.dts
@@ -13,6 +13,18 @@
 	compatible = "toradex,apalis-tk1-v1.2-eval", "toradex,apalis-tk1-eval",
 		     "toradex,apalis-tk1", "nvidia,tegra124";
 
+	aliases {
+		/*
+		 * The following, together with kernel patches, forces a fixed
+		 * assignment between device id and SDMMC controllers.
+		 *
+		 * I.e. the eMMC on SDMMC4 will be /dev/mmcblk0.
+		 */
+		mmc0 = "/sdhci@700b0600"; /* eMMC */
+		mmc1 = &mmc1; /* MMC1 slot */
+		mmc2 = &sd1; /* SD1 slot */
+	};
+
 	aliases {
 		rtc0 = "/i2c@7000c000/rtc@68";
 		rtc1 = "/i2c@7000d000/pmic@40";
@@ -140,7 +152,7 @@
 	};
 
 	/* Apalis MMC1 */
-	sdhci@700b0000 {
+	mmc1: sdhci@700b0000 {
 		status = "okay";
 		/* MMC1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
@@ -149,7 +161,7 @@
 	};
 
 	/* Apalis SD1 */
-	sdhci@700b0400 {
+	sd1: sdhci@700b0400 {
 		status = "okay";
 		/* SD1_CD# */
 		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-- 
2.14.4