ARM: dts: several updates for the imx28-tx28.dts file
Subsystems (2)
cover ARM: dts: several updates for the imx28-tx28.dts file
- 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
PATCH 1/4 ARM: dts: imx28-tx28: remove spidev labels and add third instance of spidev
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.
--- arch/arm/boot/dts/imx28-tx28.dts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx28-tx28.dts +8 -2
@@ -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 {
Signature · 1 line
1.7.10.4
PATCH 2/4 ARM: dts: imx28-tx28: use GPIO flags
In reply to Lothar Waßmann--- arch/arm/boot/dts/imx28-tx28.dts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
arch/arm/boot/dts/imx28-tx28.dts +18 -18
@@ -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>; };
Signature · 1 line
1.7.10.4
PATCH 3/4 ARM: dts: imx28-tx28: add spi-gpio as alternative for spi-mxs
In reply to Lothar WaßmannThe 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.
--- arch/arm/boot/dts/imx28-tx28.dts | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
arch/arm/boot/dts/imx28-tx28.dts +54 -0
@@ -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 */
Signature · 1 line
1.7.10.4
PATCH 4/4 ARM: dts: imx28-tx28: add alias for CAN XCVR regulator
In reply to Lothar WaßmannThis alias is used by U-Boot to enable/disable the regulator depending on baseboard type.
--- arch/arm/boot/dts/imx28-tx28.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx28-tx28.dts +1 -0
@@ -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;
Signature · 1 line
1.7.10.4
Shawn Guo
Appliedcover ARM: dts: several updates for the imx28-tx28.dts file
In reply to Lothar WaßmannQuoted 5 lines · Lothar Wa?mann
- 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.