Skip to contentSkip to conversation

ARM: dts: imx7-colibri: move and rename USB Host power regulator

PATCH Superseded Stefan Agner 3 participants 21 messages Dec 6, 2017 – Dec 17, 2017

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 ARM: dts: imx7-colibri: move and rename USB Host power regulator

The Colibri default which enables USB Host power is not necessarily tied to the OTG2 controller, some carrier board use the pin to control USB power for both controllers. Hence name the pinctrl group more generic.

Also move the regulator to the generic eval-v3 device tree since the regulator is always on the carrier board. In the Colibri iMX7S case the regulator is just not used. This allows to reuse the regulator in a upcoming SKU Colibri iMX7D 1GB with eMMC.

---
 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 11 +++++++++++
 arch/arm/boot/dts/imx7-colibri.dtsi         |  2 +-
 arch/arm/boot/dts/imx7d-colibri-eval-v3.dts | 13 +------------
 3 files changed, 13 insertions(+), 13 deletions(-)
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +11 -0
index 18bebd6d8d47..5ecb3a858c5a 100644
@@ -70,6 +70,17 @@
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 	};
+
+	reg_usbh_vbus: regulator-usbh-vbus {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usbh_reg>;
+		regulator-name = "VCC_USB[1-4]";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&gpio4 7 GPIO_ACTIVE_LOW>;
+		vin-supply = <&reg_5v0>;
+	};
 };
 
 &bl {
arch/arm/boot/dts/imx7-colibri.dtsi +1 -1
index bb5bf94f1a32..60ea7557d8c9 100644
@@ -559,7 +559,7 @@
 		>;
 	};
 
-	pinctrl_usbotg2_reg: gpio-usbotg2-vbus {
+	pinctrl_usbh_reg: gpio-usbh-vbus {
 		fsl,pins = <
 			MX7D_PAD_UART3_CTS_B__GPIO4_IO7	0x14 /* SODIMM 129 USBH PEN */
 		>;
arch/arm/boot/dts/imx7d-colibri-eval-v3.dts +1 -12
index a608a14d8c85..136e11ab4893 100644
@@ -48,20 +48,9 @@
 	model = "Toradex Colibri iMX7D on Colibri Evaluation Board V3";
 	compatible = "toradex,colibri-imx7d-eval-v3", "toradex,colibri-imx7d",
 		     "fsl,imx7d";
-
-	reg_usb_otg2_vbus: regulator-usb-otg2-vbus {
-		compatible = "regulator-fixed";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usbotg2_reg>;
-		regulator-name = "VCC_USB[1-4]";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		gpio = <&gpio4 7 GPIO_ACTIVE_LOW>;
-		vin-supply = <&reg_5v0>;
-	};
 };
 
 &usbotg2 {
-	vbus-supply = <&reg_usb_otg2_vbus>;
+	vbus-supply = <&reg_usbh_vbus>;
 	status = "okay";
 };
Signature · 1 line
2.15.1
#1 lore raw

PATCH 2/9 ARM: dts: imx7-colibri: make sure multiplexed pins are not active

The Colibri pins PWM<A> and <D> are multiplexed on the module, make sure the secondary SoC pin is not active.

---
 arch/arm/boot/dts/imx7-colibri.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/imx7-colibri.dtsi +2 -0
index 60ea7557d8c9..dae6b561145b 100644
@@ -507,6 +507,7 @@
 	pinctrl_pwm1: pwm1-grp {
 		fsl,pins = <
 			MX7D_PAD_GPIO1_IO08__PWM1_OUT		0x79
+			MX7D_PAD_ECSPI2_MOSI__GPIO4_IO21	0x4
 		>;
 	};
 
@@ -525,6 +526,7 @@
 	pinctrl_pwm4: pwm4-grp {
 		fsl,pins = <
 			MX7D_PAD_GPIO1_IO11__PWM4_OUT		0x79
+			MX7D_PAD_ECSPI2_SCLK__GPIO4_IO20	0x4
 		>;
 	};
 
Signature · 1 line
2.15.1
reviewer Reviewed-by on v1 2/9
#2 lore raw

Re: [PATCH 2/9] ARM: dts: imx7-colibri: make sure multiplexed pins are not active

Quoted 4 lines · Stefan Agner

The Colibri pins PWM<A> and <D> are multiplexed on the module, make sure the secondary SoC pin is not active.

I haven't really understood the commit message, but this is probably because I don't have access to the schematics.

Anyway:

#3 lore raw

Re: [PATCH 2/9] ARM: dts: imx7-colibri: make sure multiplexed pins are not active

Quoted 8 lines · Fabio Estevam
Quoted 4 lines · Stefan Agner

The Colibri pins PWM<A> and <D> are multiplexed on the module, make sure the secondary SoC pin is not active.

I haven't really understood the commit message, but this is probably because I don't have access to the schematics.

It means that the modules pins are connected to two SoC pads. It is also mentioned in the Colibri iMX7 datasheet.

This allows to use the module pin for a different purpose, but we mux it such that it is usable for the primary purpose (which is PWM).

Quoted 4 lines

Anyway:

Thanks!

--
Stefan

#4 lore raw

PATCH 3/9 ARM: dts: imx7-colibri: mux pull-ups where appropriate

In reply to Stefan Agner

Use pull-ups instead of pull-downs for the pins which are already pulled-up externally.

---
 arch/arm/boot/dts/imx7-colibri.dtsi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm/boot/dts/imx7-colibri.dtsi +10 -10
index dae6b561145b..e4e32aa786f4 100644
@@ -307,17 +307,17 @@
 
 	pinctrl_gpio1: gpio1-grp {
 		fsl,pins = <
-			MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3	0x14 /* SODIMM 55 */
-			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2	0x14 /* SODIMM 63 */
+			MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3	0x74 /* SODIMM 55 */
+			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2	0x74 /* SODIMM 63 */
 			MX7D_PAD_SD1_RESET_B__GPIO5_IO2		0X14 /* SODIMM 73 */
-			MX7D_PAD_SAI1_RX_SYNC__GPIO6_IO16	0X14 /* SODIMM 77 */
+			MX7D_PAD_SAI1_RX_SYNC__GPIO6_IO16	0x14 /* SODIMM 77 */
 			MX7D_PAD_EPDC_DATA09__GPIO2_IO9		0x14 /* SODIMM 89 */
-			MX7D_PAD_EPDC_DATA08__GPIO2_IO8		0x14 /* SODIMM 91 */
+			MX7D_PAD_EPDC_DATA08__GPIO2_IO8		0x74 /* SODIMM 91 */
 			MX7D_PAD_LCD_RESET__GPIO3_IO4		0x14 /* SODIMM 93 */
 			MX7D_PAD_EPDC_DATA13__GPIO2_IO13	0x14 /* SODIMM 95 */
 			MX7D_PAD_ENET1_RGMII_TXC__GPIO7_IO11	0x14 /* SODIMM 99 */
-			MX7D_PAD_EPDC_DATA10__GPIO2_IO10	0x14 /* SODIMM 105 */
-			MX7D_PAD_EPDC_DATA15__GPIO2_IO15	0x14 /* SODIMM 107 */
+			MX7D_PAD_EPDC_DATA10__GPIO2_IO10	0x74 /* SODIMM 105 */
+			MX7D_PAD_EPDC_DATA15__GPIO2_IO15	0x74 /* SODIMM 107 */
 			MX7D_PAD_EPDC_DATA00__GPIO2_IO0		0x14 /* SODIMM 111 */
 			MX7D_PAD_EPDC_DATA01__GPIO2_IO1		0x14 /* SODIMM 113 */
 			MX7D_PAD_EPDC_DATA02__GPIO2_IO2		0x14 /* SODIMM 115 */
@@ -333,7 +333,7 @@
 			MX7D_PAD_SD2_DATA2__GPIO5_IO16		0x14 /* SODIMM 100 */
 			MX7D_PAD_SD2_DATA3__GPIO5_IO17		0x14 /* SODIMM 102 */
 			MX7D_PAD_EPDC_GDSP__GPIO2_IO27		0x14 /* SODIMM 104 */
-			MX7D_PAD_EPDC_BDR0__GPIO2_IO28		0x14 /* SODIMM 106 */
+			MX7D_PAD_EPDC_BDR0__GPIO2_IO28		0x74 /* SODIMM 106 */
 			MX7D_PAD_EPDC_BDR1__GPIO2_IO29		0x14 /* SODIMM 110 */
 			MX7D_PAD_EPDC_PWR_COM__GPIO2_IO30	0x14 /* SODIMM 112 */
 			MX7D_PAD_EPDC_SDCLK__GPIO2_IO16		0x14 /* SODIMM 114 */
@@ -357,7 +357,7 @@
 	pinctrl_gpio2: gpio2-grp { /* On X22 Camera interface */
 		fsl,pins = <
 			MX7D_PAD_ECSPI2_SS0__GPIO4_IO23		0x14 /* SODIMM 65 */
-			MX7D_PAD_SD1_CD_B__GPIO5_IO0		0x14 /* SODIMM 69 */
+			MX7D_PAD_SD1_CD_B__GPIO5_IO0		0x74 /* SODIMM 69 */
 			MX7D_PAD_SD1_WP__GPIO5_IO1		0x14 /* SODIMM 71 */
 			MX7D_PAD_I2C4_SDA__GPIO4_IO15		0x14 /* SODIMM 75 */
 			MX7D_PAD_ECSPI1_MISO__GPIO4_IO18	0x14 /* SODIMM 79 */
@@ -378,8 +378,8 @@
 			MX7D_PAD_LCD_DATA19__GPIO3_IO24		0x14 /* SODIMM 138 */
 			MX7D_PAD_LCD_DATA20__GPIO3_IO25		0x14 /* SODIMM 140 */
 			MX7D_PAD_LCD_DATA21__GPIO3_IO26		0x14 /* SODIMM 142 */
-			MX7D_PAD_LCD_DATA22__GPIO3_IO27		0x14 /* SODIMM 146 */
-			MX7D_PAD_LCD_DATA23__GPIO3_IO28		0x14 /* SODIMM 148 */
+			MX7D_PAD_LCD_DATA22__GPIO3_IO27		0x74 /* SODIMM 144 */
+			MX7D_PAD_LCD_DATA23__GPIO3_IO28		0x74 /* SODIMM 146 */
 		>;
 	};
 
Signature · 1 line
2.15.1
#6 lore raw

PATCH 4/9 ARM: dts: imx7-colibri: use NAND_CE1 as GPIO

In reply to Stefan Agner

All Colibri iMX7 SKUs use either single-die NAND or eMMC, hence NAND_CE1 is not used on the module and can be used as a GPIO by carrier boards.

---
 arch/arm/boot/dts/imx7-colibri.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx7-colibri.dtsi +1 -1
index e4e32aa786f4..f61041af026a 100644
@@ -329,6 +329,7 @@
 			MX7D_PAD_EPDC_SDCE2__GPIO2_IO22		0x14 /* SODIMM 127 */
 			MX7D_PAD_UART3_RTS_B__GPIO4_IO6		0x14 /* SODIMM 131 */
 			MX7D_PAD_EPDC_GDRL__GPIO2_IO26		0x14 /* SODIMM 133 */
+			MX7D_PAD_SAI1_RX_DATA__GPIO6_IO12	0x14 /* SODIMM 169 */
 			MX7D_PAD_SAI1_RX_BCLK__GPIO6_IO17	0x14 /* SODIMM 24 */
 			MX7D_PAD_SD2_DATA2__GPIO5_IO16		0x14 /* SODIMM 100 */
 			MX7D_PAD_SD2_DATA3__GPIO5_IO17		0x14 /* SODIMM 102 */
@@ -439,7 +440,6 @@
 			MX7D_PAD_SD3_CLK__NAND_CLE		0x71
 			MX7D_PAD_SD3_CMD__NAND_ALE		0x71
 			MX7D_PAD_SAI1_TX_BCLK__NAND_CE0_B	0x71
-			MX7D_PAD_SAI1_RX_DATA__NAND_CE1_B	0x71
 			MX7D_PAD_SAI1_TX_DATA__NAND_READY_B	0x74
 			MX7D_PAD_SD3_STROBE__NAND_RE_B		0x71
 			MX7D_PAD_SD3_RESET_B__NAND_WE_B		0x71
Signature · 1 line
2.15.1
#8 lore raw

PATCH 5/9 ARM: dts: imx7-colibri: specify cpu-supply

In reply to Stefan Agner

Specify CPU supply using the "cpu-supply" property instead of the invalid "arm-supply" property.

---
 arch/arm/boot/dts/imx7-colibri.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx7-colibri.dtsi +1 -1
index f61041af026a..6498c1136ef1 100644
@@ -86,7 +86,7 @@
 };
 
 &cpu0 {
-	arm-supply = <&reg_DCDC2>;
+	cpu-supply = <&reg_DCDC2>;
 };
 
 &fec1 {
Signature · 1 line
2.15.1
reviewer Reviewed-by on v1 5/9
#9 lore raw

Re: [PATCH 5/9] ARM: dts: imx7-colibri: specify cpu-supply

Hi Stefan,

Quoted 13 lines · Stefan Agner

Specify CPU supply using the "cpu-supply" property instead of the invalid "arm-supply" property.

---
 arch/arm/boot/dts/imx7-colibri.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx7-colibri.dtsi +0 -0
index f61041af026a..6498c1136ef1 100644

arch/arm/boot/dts/imx7-colibri.dtsi line 89

Quoted 5 lines
arch/arm/boot/dts/imx7-colibri.dtsi +1 -1
@@ -86,7 +86,7 @@
 };
 
 &cpu0 {
-       arm-supply = <&reg_DCDC2>;
+       cpu-supply = <&reg_DCDC2>;

Good catch. I need to apply this same fix for some other imx7 board dts:

#10 lore raw

PATCH 6/9 ARM: dts: imx7-colibri: specify usdhc1 supplies

In reply to Stefan Agner

The usdhc1 controller instance is used to provide the default SD/MMC capabilities of the Colibri standard. The IO pins are supplied to the SoC on the module whereas the SD-card is powered by the Carrier Board supply.

---
 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 1 +
 arch/arm/boot/dts/imx7-colibri.dtsi         | 1 +
 2 files changed, 2 insertions(+)
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +1 -0
index 5ecb3a858c5a..87c23b769a08 100644
@@ -158,5 +158,6 @@
 &usdhc1 {
 	keep-power-in-suspend;
 	wakeup-source;
+	vmmc-supply = <&reg_3v3>;
 	status = "okay";
 };
arch/arm/boot/dts/imx7-colibri.dtsi +1 -0
index 6498c1136ef1..d623ef0f6e3e 100644
@@ -299,6 +299,7 @@
 	no-1-8-v;
 	cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
 	disable-wp;
+	vqmmc-supply = <&reg_LDO2>;
 };
 
 &iomuxc {
Signature · 1 line
2.15.1
reviewer Reviewed-by on v1 6/9
#11 lore raw

Re: [PATCH 6/9] ARM: dts: imx7-colibri: specify usdhc1 supplies

Quoted 6 lines · Stefan Agner

The usdhc1 controller instance is used to provide the default SD/MMC capabilities of the Colibri standard. The IO pins are supplied to the SoC on the module whereas the SD-card is powered by the Carrier Board supply.

#12 lore raw

PATCH 7/9 ARM: dts: imx7-colibri: specify backlight GPIO

In reply to Stefan Agner

The Colibri standard defines SODIMM 71 as backlight enable GPIO. Assign the GPIO to the backlight node in the module level device tree.

---
 arch/arm/boot/dts/imx7-colibri.dtsi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7-colibri.dtsi +9 -1
index d623ef0f6e3e..689ff6822634 100644
@@ -43,7 +43,10 @@
 / {
 	bl: backlight {
 		compatible = "pwm-backlight";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpio_bl_on>;
 		pwms = <&pwm1 0 5000000 0>;
+		enable-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
 	};
 
 	reg_module_3v3: regulator-module-3v3 {
@@ -360,7 +363,6 @@
 		fsl,pins = <
 			MX7D_PAD_ECSPI2_SS0__GPIO4_IO23		0x14 /* SODIMM 65 */
 			MX7D_PAD_SD1_CD_B__GPIO5_IO0		0x74 /* SODIMM 69 */
-			MX7D_PAD_SD1_WP__GPIO5_IO1		0x14 /* SODIMM 71 */
 			MX7D_PAD_I2C4_SDA__GPIO4_IO15		0x14 /* SODIMM 75 */
 			MX7D_PAD_ECSPI1_MISO__GPIO4_IO18	0x14 /* SODIMM 79 */
 			MX7D_PAD_I2C3_SCL__GPIO4_IO12		0x14 /* SODIMM 81 */
@@ -436,6 +438,12 @@
 		>;
 	};
 
+	pinctrl_gpio_bl_on: gpio-bl-on {
+		fsl,pins = <
+			MX7D_PAD_SD1_WP__GPIO5_IO1		0x14 /* SODIMM 71 */
+		>;
+	};
+
 	pinctrl_gpmi_nand: gpmi-nand-grp {
 		fsl,pins = <
 			MX7D_PAD_SD3_CLK__NAND_CLE		0x71
Signature · 1 line
2.15.1
#14 lore raw

PATCH 8/9 ARM: dts: imx7-colibri: add MCP2515 CAN controller

In reply to Stefan Agner

The Colibri Evaluation Carrier Board provides a MCP2515 CAN controller connected via SPI. Note that the i.MX 7 provides an internal CAN controller which is much better suited for CAN operations. Using the MCP2515 with a Colibri iMX7 module is mainly useful to test the SPI interface.

---
 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 25 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx7-colibri.dtsi         | 14 +++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +25 -0
index 87c23b769a08..3d6c282dd258 100644
@@ -45,6 +45,13 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	/* fixed crystal dedicated to mpc258x */
+	clk16m: clk16m {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <16000000>;
+	};
+
 	panel: panel {
 		compatible = "edt,et057090dhu";
 		backlight = <&bl>;
@@ -99,6 +106,24 @@
 	status = "okay";
 };
 
+&ecspi3 {
+	status = "okay";
+
+	mcp258x0: mcp258x at 0 {
+		compatible = "microchip,mcp2515";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_can_int>;
+		reg = <0>;
+		clocks = <&clk16m>;
+		interrupt-parent = <&gpio5>;
+		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+		spi-max-frequency = <10000000>;
+		vdd-supply = <&reg_3v3>;
+		xceiver-supply = <&reg_5v0>;
+		status = "okay";
+	};
+};
+
 &fec1 {
 	status = "okay";
 };
arch/arm/boot/dts/imx7-colibri.dtsi +13 -1
index 689ff6822634..e1c6da0a65e4 100644
@@ -92,6 +92,13 @@
 	cpu-supply = <&reg_DCDC2>;
 };
 
+&ecspi3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>;
+	num-cs = <1>;
+	cs-gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>;
+};
+
 &fec1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet1>;
@@ -313,7 +320,6 @@
 		fsl,pins = <
 			MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3	0x74 /* SODIMM 55 */
 			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2	0x74 /* SODIMM 63 */
-			MX7D_PAD_SD1_RESET_B__GPIO5_IO2		0X14 /* SODIMM 73 */
 			MX7D_PAD_SAI1_RX_SYNC__GPIO6_IO16	0x14 /* SODIMM 77 */
 			MX7D_PAD_EPDC_DATA09__GPIO2_IO9		0x14 /* SODIMM 89 */
 			MX7D_PAD_EPDC_DATA08__GPIO2_IO8		0x74 /* SODIMM 91 */
@@ -400,6 +406,12 @@
 		>;
 	};
 
+	pinctrl_can_int: can-int-grp {
+		fsl,pins = <
+			MX7D_PAD_SD1_RESET_B__GPIO5_IO2		0X14 /* SODIMM 73 */
+		>;
+	};
+
 	pinctrl_enet1: enet1grp {
 		fsl,pins = <
 			MX7D_PAD_ENET1_CRS__GPIO7_IO14			0x14
Signature · 1 line
2.15.1
#15 lore raw

Re: [PATCH 8/9] ARM: dts: imx7-colibri: add MCP2515 CAN controller

Quoted 32 lines · Stefan Agner

The Colibri Evaluation Carrier Board provides a MCP2515 CAN controller connected via SPI. Note that the i.MX 7 provides an internal CAN controller which is much better suited for CAN operations. Using the MCP2515 with a Colibri iMX7 module is mainly useful to test the SPI interface.

---
 arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi | 25 +++++++++++++++++++++++++
 arch/arm/boot/dts/imx7-colibri.dtsi         | 14 +++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +7 -0
index 87c23b769a08..3d6c282dd258 100644
@@ -45,6 +45,13 @@
 		stdout-path = "serial0:115200n8";
 	};
 
+	/* fixed crystal dedicated to mpc258x */
+	clk16m: clk16m {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <16000000>;
+	};
+
 	panel: panel {
 		compatible = "edt,et057090dhu";
 		backlight = <&bl>;

arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi line 112

Quoted 7 lines
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +4 -0
@@ -99,6 +106,24 @@
 	status = "okay";
 };
 
+&ecspi3 {
+	status = "okay";
+
+	mcp258x0: mcp258x at 0 {

Just realized that this is somewhat bogus, this should be "mcp2515:
can at 0".

--
Stefan

Quoted 57 lines
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi +14 -0
+		compatible = "microchip,mcp2515";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_can_int>;
+		reg = <0>;
+		clocks = <&clk16m>;
+		interrupt-parent = <&gpio5>;
+		interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
+		spi-max-frequency = <10000000>;
+		vdd-supply = <&reg_3v3>;
+		xceiver-supply = <&reg_5v0>;
+		status = "okay";
+	};
+};
+
 &fec1 {
 	status = "okay";
 };
arch/arm/boot/dts/imx7-colibri.dtsi +13 -1
index 689ff6822634..e1c6da0a65e4 100644
@@ -92,6 +92,13 @@
 	cpu-supply = <&reg_DCDC2>;
 };
 
+&ecspi3 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>;
+	num-cs = <1>;
+	cs-gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>;
+};
+
 &fec1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_enet1>;
@@ -313,7 +320,6 @@
 		fsl,pins = <
 			MX7D_PAD_ENET1_RGMII_RD3__GPIO7_IO3	0x74 /* SODIMM 55 */
 			MX7D_PAD_ENET1_RGMII_RD2__GPIO7_IO2	0x74 /* SODIMM 63 */
-			MX7D_PAD_SD1_RESET_B__GPIO5_IO2		0X14 /* SODIMM 73 */
 			MX7D_PAD_SAI1_RX_SYNC__GPIO6_IO16	0x14 /* SODIMM 77 */
 			MX7D_PAD_EPDC_DATA09__GPIO2_IO9		0x14 /* SODIMM 89 */
 			MX7D_PAD_EPDC_DATA08__GPIO2_IO8		0x74 /* SODIMM 91 */
@@ -400,6 +406,12 @@
 		>;
 	};
 
+	pinctrl_can_int: can-int-grp {
+		fsl,pins = <
+			MX7D_PAD_SD1_RESET_B__GPIO5_IO2		0X14 /* SODIMM 73 */
+		>;
+	};
+
 	pinctrl_enet1: enet1grp {
 		fsl,pins = <
 			MX7D_PAD_ENET1_CRS__GPIO7_IO14			0x14
reviewer
#16 lore raw

Re: [PATCH 8/9] ARM: dts: imx7-colibri: add MCP2515 CAN controller

In reply to Stefan Agner

arch/arm/boot/dts/imx7-colibri.dtsi line 98

Quoted 4 lines · Stefan Agner

+&ecspi3 {

arch/arm/boot/dts/imx7-colibri.dtsi +3 -0
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>;
+       num-cs = <1>;

num-cs can be dropped.

#17 lore raw

PATCH 9/9 ARM: dts: imx7: add Toradex Colibri iMX7D 1GB (eMMC) support

In reply to Stefan Agner

Add support for the Computer on Module Colibri iMX7D 1GB along with the Colibri Evaluation Board device trees. Follow the usual hierarchic include model, maintaining shared configuration in imx7-colibri.dtsi and imx7-colibri-eval-v3.dtsi respectively.

---
 arch/arm/boot/dts/Makefile                       |  1 +
 arch/arm/boot/dts/imx7-colibri.dtsi              | 64 +++++++++++++++++++++++-
 arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts | 55 ++++++++++++++++++++
 arch/arm/boot/dts/imx7d-colibri-emmc.dtsi        | 57 +++++++++++++++++++++
 arch/arm/boot/dts/imx7d-colibri.dtsi             |  4 ++
 5 files changed, 180 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts
 create mode 100644 arch/arm/boot/dts/imx7d-colibri-emmc.dtsi
arch/arm/boot/dts/Makefile +1 -0
index b5ba7ad6ae30..9e4b4ecae572 100644
@@ -519,6 +519,7 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
 	imx6ull-14x14-evk.dtb
 dtb-$(CONFIG_SOC_IMX7D) += \
 	imx7d-cl-som-imx7.dtb \
+	imx7d-colibri-emmc-eval-v3.dtb \
 	imx7d-colibri-eval-v3.dtb \
 	imx7d-nitrogen7.dtb \
 	imx7d-pico.dtb \
arch/arm/boot/dts/imx7-colibri.dtsi +63 -1

82 lines not on this page · raw message

arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts new file +55 -0

55 lines not on this page · raw message

arch/arm/boot/dts/imx7d-colibri-emmc.dtsi new file +57 -0

57 lines not on this page · raw message

arch/arm/boot/dts/imx7d-colibri.dtsi +4 -0
index 3c2cb502b388..6f2bb70c1fbd 100644
@@ -49,6 +49,10 @@
 	};
 };
 
+&gpmi {
+	status = "okay";
+};
+
 &usbotg2 {
 	dr_mode = "host";
 };
Signature · 1 line
2.15.1
reviewer
#18 lore raw

Re: [PATCH 9/9] ARM: dts: imx7: add Toradex Colibri iMX7D 1GB (eMMC) support

Quoted 36 lines · Stefan Agner
arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts new file +30 -0
new file mode 100644
index 000000000000..5d5bb4c2843f
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2017 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
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License
+ *     version 2 as published by the Free Software Foundation.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.

arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts line 40

Quoted 10 lines
arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts new file +10 -0
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */

Patch looks good.

Just a comment: people have been starting to use SPDX license identifiers.

This would really make all this huge license text much shorter :-)

#19 lore raw

Re: [PATCH 9/9] ARM: dts: imx7: add Toradex Colibri iMX7D 1GB (eMMC) support

Dear Stefan,

Quoted 51 lines · Fabio Estevam
Quoted 36 lines · Stefan Agner
arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts new file +30 -0
new file mode 100644
index 000000000000..5d5bb4c2843f
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2017 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
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License
+ *     version 2 as published by the Free Software Foundation.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.

arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts line 40

Quoted 10 lines
arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts new file +10 -0
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */

Patch looks good.

Quoted 3 lines

Just a comment: people have been starting to use SPDX license identifiers.

This would really make all this huge license text much shorter :-)

Oh yes, please! Every time there are more than three lines of legalese in a kernel source code file, a kitten dies somewhere. That's sad. We all love kitten, right? See also Thomas doc patches for details [1] though he forgot to mention this cat fact.

[1] https://lkml.org/lkml/2017/12/4/934

Signature · 2 lines
Cordially
Philippe Ombredanne
reviewer Reviewed-by on v1 1/9
#20 lore raw
In reply to Stefan Agner
Quoted 11 lines · Stefan Agner

The Colibri default which enables USB Host power is not necessarily tied to the OTG2 controller, some carrier board use the pin to control USB power for both controllers. Hence name the pinctrl group more generic.

Also move the regulator to the generic eval-v3 device tree since the regulator is always on the carrier board. In the Colibri iMX7S case the regulator is just not used. This allows to reuse the regulator in a upcoming SKU Colibri iMX7D 1GB with eMMC.