* [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file
@ 2014-09-09 11:25 Lothar Waßmann
2014-09-09 11:26 ` [PATCH 1/4] ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev Lothar Waßmann
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Lothar Waßmann @ 2014-09-09 11:25 UTC (permalink / raw)
To: linux-arm-kernel
- remove unused labels on spidev nodes
- add third spidev node to utilize all available CS
- use GPIO polarity flags
- add configuration for spi-gpio driver as alternative to spi-mxs
- add an alias for the can transceiver regulator which is used by U-Boot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev
2014-09-09 11:25 [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Lothar Waßmann
@ 2014-09-09 11:26 ` Lothar Waßmann
2014-09-09 11:26 ` [PATCH 2/4] ARM: dts: imx28-tx28: use GPIO flags Lothar Waßmann
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Lothar Waßmann @ 2014-09-09 11:26 UTC (permalink / raw)
To: linux-arm-kernel
The labels on the spidev nodes are not used and not required, so
remove them. The TX28 supports 3 chipselects on the SPI
interface. Make all those chipselects available to the user.
Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
---
arch/arm/boot/dts/imx28-tx28.dts | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
index f947fbb..4e790c2 100644
--- a/arch/arm/boot/dts/imx28-tx28.dts
+++ b/arch/arm/boot/dts/imx28-tx28.dts
@@ -619,17 +619,23 @@
clock-frequency = <57600000>;
status = "okay";
- spidev0: spi at 0 {
+ spi at 0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <57600000>;
};
- spidev1: spi at 1 {
+ spi at 1 {
compatible = "spidev";
reg = <1>;
spi-max-frequency = <57600000>;
};
+
+ spi at 2 {
+ compatible = "spidev";
+ reg = <2>;
+ spi-max-frequency = <57600000>;
+ };
};
&usb0 {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] ARM: dts: imx28-tx28: use GPIO flags
2014-09-09 11:25 [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Lothar Waßmann
2014-09-09 11:26 ` [PATCH 1/4] ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev Lothar Waßmann
@ 2014-09-09 11:26 ` Lothar Waßmann
2014-09-09 11:26 ` [PATCH 3/4] ARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs Lothar Waßmann
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Lothar Waßmann @ 2014-09-09 11:26 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
---
arch/arm/boot/dts/imx28-tx28.dts | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
index 4e790c2..cfe6b31 100644
--- a/arch/arm/boot/dts/imx28-tx28.dts
+++ b/arch/arm/boot/dts/imx28-tx28.dts
@@ -37,7 +37,7 @@
onewire {
compatible = "w1-gpio";
- gpios = <&gpio2 7 0>;
+ gpios = <&gpio2 7 GPIO_ACTIVE_HIGH>;
status = "disabled";
};
@@ -52,7 +52,7 @@
regulator-name = "usb0_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
- gpio = <&gpio0 18 0>;
+ gpio = <&gpio0 18 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
@@ -62,7 +62,7 @@
regulator-name = "usb1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
- gpio = <&gpio3 27 0>;
+ gpio = <&gpio3 27 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
@@ -90,7 +90,7 @@
regulator-name = "CAN XCVR";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&gpio1 0 0>;
+ gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&tx28_flexcan_xcvr_pins>;
};
@@ -101,7 +101,7 @@
regulator-name = "LCD POWER";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&gpio1 31 0>;
+ gpio = <&gpio1 31 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
@@ -111,7 +111,7 @@
regulator-name = "LCD RESET";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpio = <&gpio3 30 0>;
+ gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
startup-delay-us = <300000>;
enable-active-high;
regulator-always-on;
@@ -143,7 +143,7 @@
user_led: user {
label = "Heartbeat";
- gpios = <&gpio4 10 0>;
+ gpios = <&gpio4 10 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
};
@@ -172,16 +172,16 @@
matrix_keypad: matrix-keypad at 0 {
compatible = "gpio-matrix-keypad";
col-gpios = <
- &gpio5 0 0
- &gpio5 1 0
- &gpio5 2 0
- &gpio5 3 0
+ &gpio5 0 GPIO_ACTIVE_HIGH
+ &gpio5 1 GPIO_ACTIVE_HIGH
+ &gpio5 2 GPIO_ACTIVE_HIGH
+ &gpio5 3 GPIO_ACTIVE_HIGH
>;
row-gpios = <
- &gpio5 4 0
- &gpio5 5 0
- &gpio5 6 0
- &gpio5 7 0
+ &gpio5 4 GPIO_ACTIVE_HIGH
+ &gpio5 5 GPIO_ACTIVE_HIGH
+ &gpio5 6 GPIO_ACTIVE_HIGH
+ &gpio5 7 GPIO_ACTIVE_HIGH
>;
/* sample keymap */
linux,keymap = <
@@ -284,8 +284,8 @@
pinctrl-0 = <&tx28_edt_ft5x06_pins>;
interrupt-parent = <&gpio2>;
interrupts = <5 0>;
- reset-gpios = <&gpio2 6 1>;
- wake-gpios = <&gpio4 9 0>;
+ reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>;
};
touchscreen: tsc2007 at 48 {
@@ -295,7 +295,7 @@
pinctrl-0 = <&tx28_tsc2007_pins>;
interrupt-parent = <&gpio3>;
interrupts = <20 0>;
- pendown-gpio = <&gpio3 20 1>;
+ pendown-gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
ti,x-plate-ohms = /bits/ 16 <660>;
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] ARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs
2014-09-09 11:25 [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Lothar Waßmann
2014-09-09 11:26 ` [PATCH 1/4] ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev Lothar Waßmann
2014-09-09 11:26 ` [PATCH 2/4] ARM: dts: imx28-tx28: use GPIO flags Lothar Waßmann
@ 2014-09-09 11:26 ` Lothar Waßmann
2014-09-09 11:26 ` [PATCH 4/4] ARM: dts: imx28-tx28: add alias for CAN XCVR regulator Lothar Waßmann
2014-09-10 3:16 ` [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Shawn Guo
4 siblings, 0 replies; 6+ messages in thread
From: Lothar Waßmann @ 2014-09-09 11:26 UTC (permalink / raw)
To: linux-arm-kernel
The spi-mxs driver does not allow full duplex SPI transfers. The
spi-gpio driver may be used as an alternative if this is required.
Make the choice between those drivers easier for the end user by
providing settings for both drivers.
Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
---
arch/arm/boot/dts/imx28-tx28.dts | 54 ++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
index cfe6b31..81d4eb4 100644
--- a/arch/arm/boot/dts/imx28-tx28.dts
+++ b/arch/arm/boot/dts/imx28-tx28.dts
@@ -27,6 +27,8 @@
lcdif = &lcdif;
lcdif_23bit_pins = &tx28_lcdif_23bit_pins;
lcdif_24bit_pins = &lcdif_24bit_pins_a;
+ spi_gpio = &spi_gpio;
+ spi_mxs = &ssp3;
stk5led = &user_led;
usbotg = &usb0;
};
@@ -203,6 +205,44 @@
col-scan-delay-us = <5000>;
linux,no-autorepeat;
};
+
+ spi_gpio: spi-gpio {
+ compatible = "spi-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&tx28_spi_gpio_pins>;
+
+ gpio-sck = <&gpio2 24 GPIO_ACTIVE_HIGH>;
+ gpio-mosi = <&gpio2 25 GPIO_ACTIVE_HIGH>;
+ gpio-miso = <&gpio2 26 GPIO_ACTIVE_HIGH>;
+ num-chipselects = <3>;
+ cs-gpios = <
+ &gpio2 27 GPIO_ACTIVE_LOW
+ &gpio3 8 GPIO_ACTIVE_LOW
+ &gpio3 9 GPIO_ACTIVE_LOW
+ >;
+ /* enable this and disable ssp3 below, if you need full duplex SPI transfer */
+ status = "disabled";
+
+ spi at 0 {
+ compatible = "spidev";
+ reg = <0>;
+ spi-max-frequency = <57600000>;
+ };
+
+ spi at 1 {
+ compatible = "spidev";
+ reg = <1>;
+ spi-max-frequency = <57600000>;
+ };
+
+ spi at 2 {
+ compatible = "spidev";
+ reg = <2>;
+ spi-max-frequency = <57600000>;
+ };
+ };
};
/* 2nd TX-Std UART - (A)UART1 */
@@ -558,6 +598,20 @@
fsl,pull-up = <MXS_PULL_DISABLE>;
};
+ tx28_spi_gpio_pins: spi-gpiogrp {
+ fsl,pinmux-ids = <
+ MX28_PAD_AUART2_RX__GPIO_3_8
+ MX28_PAD_AUART2_TX__GPIO_3_9
+ MX28_PAD_SSP3_SCK__GPIO_2_24
+ MX28_PAD_SSP3_MOSI__GPIO_2_25
+ MX28_PAD_SSP3_MISO__GPIO_2_26
+ MX28_PAD_SSP3_SS0__GPIO_2_27
+ >;
+ fsl,drive-strength = <MXS_DRIVE_8mA>;
+ fsl,voltage = <MXS_VOLTAGE_HIGH>;
+ fsl,pull-up = <MXS_PULL_DISABLE>;
+ };
+
tx28_tsc2007_pins: tx28-tsc2007-pins {
fsl,pinmux-ids = <
MX28_PAD_SAIF0_MCLK__GPIO_3_20 /* TSC2007 IRQ */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] ARM: dts: imx28-tx28: add alias for CAN XCVR regulator
2014-09-09 11:25 [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Lothar Waßmann
` (2 preceding siblings ...)
2014-09-09 11:26 ` [PATCH 3/4] ARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs Lothar Waßmann
@ 2014-09-09 11:26 ` Lothar Waßmann
2014-09-10 3:16 ` [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Shawn Guo
4 siblings, 0 replies; 6+ messages in thread
From: Lothar Waßmann @ 2014-09-09 11:26 UTC (permalink / raw)
To: linux-arm-kernel
This alias is used by U-Boot to enable/disable the regulator depending
on baseboard type.
Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
---
arch/arm/boot/dts/imx28-tx28.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/imx28-tx28.dts b/arch/arm/boot/dts/imx28-tx28.dts
index 81d4eb4..a5b27c8 100644
--- a/arch/arm/boot/dts/imx28-tx28.dts
+++ b/arch/arm/boot/dts/imx28-tx28.dts
@@ -27,6 +27,7 @@
lcdif = &lcdif;
lcdif_23bit_pins = &tx28_lcdif_23bit_pins;
lcdif_24bit_pins = &lcdif_24bit_pins_a;
+ reg_can_xcvr = ®_can_xcvr;
spi_gpio = &spi_gpio;
spi_mxs = &ssp3;
stk5led = &user_led;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file
2014-09-09 11:25 [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Lothar Waßmann
` (3 preceding siblings ...)
2014-09-09 11:26 ` [PATCH 4/4] ARM: dts: imx28-tx28: add alias for CAN XCVR regulator Lothar Waßmann
@ 2014-09-10 3:16 ` Shawn Guo
4 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2014-09-10 3:16 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Sep 09, 2014 at 01:25:59PM +0200, Lothar Wa?mann wrote:
> - remove unused labels on spidev nodes
> - add third spidev node to utilize all available CS
> - use GPIO polarity flags
> - add configuration for spi-gpio driver as alternative to spi-mxs
> - add an alias for the can transceiver regulator which is used by U-Boot
Applied all 4, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-10 3:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 11:25 [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Lothar Waßmann
2014-09-09 11:26 ` [PATCH 1/4] ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev Lothar Waßmann
2014-09-09 11:26 ` [PATCH 2/4] ARM: dts: imx28-tx28: use GPIO flags Lothar Waßmann
2014-09-09 11:26 ` [PATCH 3/4] ARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs Lothar Waßmann
2014-09-09 11:26 ` [PATCH 4/4] ARM: dts: imx28-tx28: add alias for CAN XCVR regulator Lothar Waßmann
2014-09-10 3:16 ` [PATCH 0/4] ARM: dts: several updates for the imx28-tx28.dts file Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox