Skip to contentSkip to conversation

Device Tree Updates for GTA04 (A3/A4/A5 variants)

PATCH In review H. Nikolaus Schaller 2 participants 36 messages Jul 31, 2018 – Sep 7, 2018 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover Device Tree Updates for GTA04 (A3/A4/A5 variants)

* Sebastian Reichel <[email protected]> asked why we have reg=<0> for port@1.
Based on his comment we have removed the change for the opa362 reg property in the DT, but worked out a correct fix in the opa362 driver which solves the issue better.
See: https://lore.kernel.org/patchwork/patch/968407/
* Ladislav Michl <[email protected]>
has found a typo and we discussed NAND/OneNAND and
how the partitions should be setup. A better solution would be to do it completely by u-boot, but unless we have that, we must fix it here.
* we omit the patch that replaces ti,non-removable by non-removable since additional internal tests have shown that it makes problems with finding the rootfs boot partition.
* instead we add a patch that explicitly sets broken-cd for mmc1.

PATCH V1 2018-07-25 09:00:42:
We have not upstreamed significant improvements collected in the GTA04 vendor kernel tree for some years. The result is that distribution kernels derived from upstream (e.g. Debian) lag behind and miss significant features and fixes.

H. Nikolaus Schaller (32):
ARM: dts: omap3-gta04: fix typo in backlight pins node name
ARM: dts: omap3-gta04: fix some whitespace and tab style errors
ARM: dts: omap3-gta04: give spi_lcd node a label so that we can
overwrite in other DTS files
ARM: dts: omap3-gta04: fixes for tvout / venc
ARM: dts: omap3-gta04: add devconf1 setup for correct tvout pins
ARM: dts: omap3-gta04: tvout: enable as display1 alias
ARM: dts: omap3-gta04: fix touchscreen tsc2007
ARM: dts: omap3-gta04: add pinmux for bmp085 EOC interrupt
ARM: dts: omap3-gta04: make NAND partitions compatible with recent
U-Boot
ARM: dts: omap3-gta04: update gpmc NAND setup
ARM: dts: omap3-gta04: keep vpll2 always on
ARM: dts: omap3-gta04: add a comment how to reference the tca6507 gpio
ARM: dts: omap3-gta04: add warning comment to vaux2 regulator
ARM: dts: omap3-gta04: explicitly describe that mmc1 has no CD/WP
ARM: dts: omap3-gta04: make use of input event include file and
constants
ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key
event
ARM: dts: omap3-gta04: add camera interface parallel port
ARM: dts: omap3-gta04: add camera pinmux
ARM: dts: omap3-gta04: add mcbsp (audio subsystem) pinmux
ARM: dts: omap3-gta04: add devconf0 setup for mcbsp1 clock pins
ARM: dts: omap3-gta04: add mcbsp (audio subsystem) nodes
ARM: dts: omap3-gta04a3: fix model name for A3 variant
ARM: dts: omap3-gta04a4: fix model name for A4 variant
ARM: dts: omap3-gta04a5: fix copyright of A5 variant
ARM: dts: omap3-gta04a5: fix model name
ARM: dts: omap3-gta04a5: fix whitepsace and tab style
ARM: dts: omap3-gta04a5: add support for PPS
ARM: dts: omap3-gta04a5: disable IrDA receiver to save power
ARM: dts: omap3-gta04a5: add support for ti,wl1837 module
ARM: dts: omap3-gta04a5: uses different sensors than gta04a4
ARM: dts: omap3-gta04a5: define pinmux for bluetooth enable of

    ti,wl1837 module

ARM: dts: omap3-gta04a5one: define GTA04A5 variant with OneNAND

 arch/arm/boot/dts/omap3-gta04.dtsi     | 248 +++++++++++++++++++++++++++++----
 arch/arm/boot/dts/omap3-gta04a3.dts    |   2 +-
 arch/arm/boot/dts/omap3-gta04a4.dts    |   2 +-
 arch/arm/boot/dts/omap3-gta04a5.dts    | 129 ++++++++++++++++-
 arch/arm/boot/dts/omap3-gta04a5one.dts | 114 +++++++++++++++
 5 files changed, 462 insertions(+), 33 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-gta04a5one.dts
Signature · 1 line
2.12.2
#1 lore raw

PATCH v2 1/32 ARM: dts: omap3-gta04: fix typo in backlight pins node name

mn -> nm for backlight_pins

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
index ac830b917776..9ad9cc62128e 100644
@@ -220,7 +220,7 @@
 		>;
 	};
 
-	backlight_pins: backlight_pins_pimnux {
+	backlight_pins: backlight_pins_pinmux {
 		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x20ba, MUX_MODE3)		/* gpt11/gpio57 */
 		>;
Signature · 1 line
2.12.2
#2 lore raw

PATCH v2 2/32 ARM: dts: omap3-gta04: fix some whitespace and tab style errors

In reply to H. Nikolaus Schaller

tab+space -> tab only for /* GSM audio */
spaces -> tab for dss_dpi_pins

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +2 -2
index 9ad9cc62128e..27fc9e54dcda 100644
@@ -55,7 +55,7 @@
 		ti,mcbsp = <&mcbsp2>;
 	};
 
-	 /* GSM audio */
+	/* GSM audio */
 	sound_telephony {
 		compatible = "simple-audio-card";
 		simple-audio-card,name = "GTA04 voice";
@@ -227,7 +227,7 @@
 	};
 
 	dss_dpi_pins: pinmux_dss_dpi_pins {
-               pinctrl-single,pins = <
+		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
 			OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync */
 			OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync */
Signature · 1 line
2.12.2
#3 lore raw

PATCH v2 3/32 ARM: dts: omap3-gta04: give spi_lcd node a label so that we can overwrite in other DTS files

In reply to H. Nikolaus Schaller

needed for device variants based on GTA04 board but with different display panel (driver).

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
index 27fc9e54dcda..2db670e2a4bd 100644
@@ -78,7 +78,7 @@
 		#sound-dai-cells = <0>;
 	};
 
-	spi_lcd {
+	spi_lcd: spi_lcd {
 		compatible = "spi-gpio";
 		#address-cells = <0x1>;
 		#size-cells = <0x0>;
Signature · 1 line
2.12.2
#4 lore raw

PATCH v2 4/32 ARM: dts: omap3-gta04: fixes for tvout / venc

In reply to H. Nikolaus Schaller

* fix connector compatibility (composite)
* add comment for gpio1 23
* add proper #address-cells
* we use only one venc_out channel for composite

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +7 -3
index 2db670e2a4bd..ed8aff515703 100644
@@ -131,7 +131,7 @@
 	};
 
 	tv0: connector {
-		compatible = "svideo-connector";
+		compatible = "composite-video-connector";
 		label = "tv";
 
 		port {
@@ -143,7 +143,7 @@
 
 	tv_amp: opa362 {
 		compatible = "ti,opa362";
-		enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
+		enable-gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;	/* GPIO_23 to enable video out amplifier */
 
 		ports {
 			#address-cells = <1>;
@@ -551,10 +551,14 @@
 
 	vdda-supply = <&vdac>;
 
+	#address-cells = <1>;
+	#size-cells = <0>;
+
 	port {
+		reg = <0>;
 		venc_out: endpoint {
 			remote-endpoint = <&opa_in>;
-			ti,channels = <2>;
+			ti,channels = <1>;
 			ti,invert-polarity;
 		};
 	};
Signature · 1 line
2.12.2
#5 lore raw

PATCH v2 5/32 ARM: dts: omap3-gta04: add devconf1 setup for correct tvout pins

In reply to H. Nikolaus Schaller

The VENC with external OPA362 amplifier needs a special "pinmux" setup in DEVCONF1 (TVOUTBYPASS and TVOUTACEN).

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +18 -0
index ed8aff515703..654faa7773a8 100644
@@ -169,6 +169,24 @@
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&tca6507 0 GPIO_ACTIVE_LOW>;	/* W2CBW003 reset through tca6507 */
 	};
+
+	/* devconf1 setup for tvout pins */
+	pinmux_tv_out@480022d8 {
+		compatible = "pinctrl-single";
+		reg = <0x480022d8 4>;	/* CONTROL_DEVCONF1 */
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-single,bit-per-mux;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0x81>;	/* TV out pin control */
+		#pinctrl-cells = <2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&tv_acbias_devconf1_pins>;
+		tv_acbias_devconf1_pins: pinmux_tv_acbias_devconf1_pins {
+			/*			offset	bits	mask */
+			pinctrl-single,bits = <0x00 0x40800 0x40800>;	/* set TVOUTBYPASS and TVOUTACEN */
+		};
+	};
 };
 
 &omap3_pmx_core {
Signature · 1 line
2.12.2
#6 lore raw

PATCH v2 6/32 ARM: dts: omap3-gta04: tvout: enable as display1 alias

In reply to H. Nikolaus Schaller

The omap dss susbystem takes the display aliases to find out which displays exist. To enable tv-out we must define an alias.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -0
index 654faa7773a8..38648519d9c4 100644
@@ -28,6 +28,7 @@
 
 	aliases {
 		display0 = &lcd;
+		display1 = &tv0;
 	};
 
 	/* fixed 26MHz oscillator */
Signature · 1 line
2.12.2
#7 lore raw

PATCH v2 7/32 ARM: dts: omap3-gta04: fix touchscreen tsc2007

In reply to H. Nikolaus Schaller

we fix penirq polarity, add penirq pinmux and touchscreen properties.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +17 -1
index 38648519d9c4..ca818d35a5d9 100644
@@ -301,6 +301,13 @@
 			OMAP3_CORE1_IOPAD(0x2134, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio112 */
 		>;
 	};
+
+	penirq_pins: pinmux_penirq_pins {
+		pinctrl-single,pins = <
+			/* here we could enable to wakeup the cpu from suspend by a pen touch */
+			OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */
+		>;
+	};
 };
 
 &omap3_pmx_core2 {
@@ -441,10 +448,19 @@
 	tsc2007@48 {
 		compatible = "ti,tsc2007";
 		reg = <0x48>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&penirq_pins>;
 		interrupt-parent = <&gpio6>;
 		interrupts = <0 IRQ_TYPE_EDGE_FALLING>; /* GPIO_160 */
-		gpios = <&gpio6 0 GPIO_ACTIVE_LOW>;
+		gpios = <&gpio6 0 GPIO_ACTIVE_LOW>;	/* GPIO_160 */
 		ti,x-plate-ohms = <600>;
+		touchscreen-size-x = <480>;
+		touchscreen-size-y = <640>;
+		touchscreen-max-pressure = <1000>;
+		touchscreen-fuzz-x = <3>;
+		touchscreen-fuzz-y = <8>;
+		touchscreen-fuzz-pressure = <10>;
+		touchscreen-inverted-y;
 	};
 
 	/* RFID EEPROM */
Signature · 1 line
2.12.2
#8 lore raw

PATCH v2 8/32 ARM: dts: omap3-gta04: add pinmux for bmp085 EOC interrupt

In reply to H. Nikolaus Schaller
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +8 -0
index ca818d35a5d9..b22e35959c29 100644
@@ -284,6 +284,12 @@
 		>;
 	};
 
+	bmp085_pins: pinmux_bmp085_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2136, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio113 */
+		>;
+	};
+
 	bma180_pins: pinmux_bma180_pins {
 		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x213a, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio115 */
@@ -373,6 +379,8 @@
 	bmp085@77 {
 		compatible = "bosch,bmp085";
 		reg = <0x77>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&bmp085_pins>;
 		interrupt-parent = <&gpio4>;
 		interrupts = <17 IRQ_TYPE_EDGE_RISING>; /* GPIO_113 */
 	};
Signature · 1 line
2.12.2
#9 lore raw

PATCH v2 9/32 ARM: dts: omap3-gta04: make NAND partitions compatible with recent U-Boot

In reply to H. Nikolaus Schaller

Vendor defined U-Boot has changed the partition scheme a while ago:

* kernel partition 6MB
* file system partition uses the remainder up to end of the NAND
* increased size of the environment partition (to get an OneNAND compatible base address)
* shrink the U-Boot partition

Let's be compatible (e.g. Debian kernel built from upstream).

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -6
index b22e35959c29..34e9a3c05cb5 100644
@@ -645,22 +645,22 @@
 
 		bootloaders@80000 {
 			label = "U-Boot";
-			reg = <0x80000 0x1e0000>;
+			reg = <0x80000 0x1c0000>;
 		};
 
-		bootloaders_env@260000 {
+		bootloaders_env@240000 {
 			label = "U-Boot Env";
-			reg = <0x260000 0x20000>;
+			reg = <0x240000 0x40000>;
 		};
 
 		kernel@280000 {
 			label = "Kernel";
-			reg = <0x280000 0x400000>;
+			reg = <0x280000 0x600000>;
 		};
 
-		filesystem@680000 {
+		filesystem@880000 {
 			label = "File System";
-			reg = <0x680000 0xf980000>;
+			reg = <0x880000 0>;	/* 0 = MTDPART_SIZ_FULL */
 		};
 	};
 };
Signature · 1 line
2.12.2
#10 lore raw

PATCH v2 10/32 ARM: dts: omap3-gta04: update gpmc NAND setup

In reply to H. Nikolaus Schaller

to better match omap3-beagle.dts (which was the basis of designing the GTA04).

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +7 -7
index 34e9a3c05cb5..8e785cff539d 100644
@@ -616,27 +616,27 @@
 		interrupt-parent = <&gpmc>;
 		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
 			     <1 IRQ_TYPE_NONE>;	/* termcount */
+		ti,nand-ecc-opt = "ham1";
+		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
 		nand-bus-width = <16>;
-		ti,nand-ecc-opt = "bch8";
+		#address-cells = <1>;
+		#size-cells = <1>;
 
-		gpmc,sync-clk-ps = <0>;
+		gpmc,device-width = <2>;
 		gpmc,cs-on-ns = <0>;
 		gpmc,cs-rd-off-ns = <44>;
 		gpmc,cs-wr-off-ns = <44>;
 		gpmc,adv-on-ns = <6>;
 		gpmc,adv-rd-off-ns = <34>;
 		gpmc,adv-wr-off-ns = <44>;
-		gpmc,we-off-ns = <40>;
 		gpmc,oe-off-ns = <54>;
+		gpmc,we-off-ns = <40>;
 		gpmc,access-ns = <64>;
 		gpmc,rd-cycle-ns = <82>;
 		gpmc,wr-cycle-ns = <82>;
 		gpmc,wr-access-ns = <40>;
 		gpmc,wr-data-mux-bus-ns = <0>;
-		gpmc,device-width = <2>;
-
-		#address-cells = <1>;
-		#size-cells = <1>;
+		gpmc,sync-clk-ps = <0>;
 
 		x-loader@0 {
 			label = "X-Loader";
Signature · 1 line
2.12.2
#11 lore raw

PATCH v2 11/32 ARM: dts: omap3-gta04: keep vpll2 always on

In reply to H. Nikolaus Schaller

This is needed to make the display and venc work properly. Compare to omap3-beagle.dts.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +6 -0
index 8e785cff539d..45d4b080341b 100644
@@ -574,6 +574,12 @@
 	regulator-max-microvolt = <3150000>;
 };
 
+/* Needed to power the DPI pins */
+
+&vpll2 {
+	regulator-always-on;
+};
+
 &dss {
 	pinctrl-names = "default";
 	pinctrl-0 = < &dss_dpi_pins >;
Signature · 1 line
2.12.2
#12 lore raw

PATCH v2 12/32 ARM: dts: omap3-gta04: add a comment how to reference the tca6507 gpio

In reply to H. Nikolaus Schaller

Make clear how to use the wifi_reset since it is not obvious.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
index 45d4b080341b..1145cfaa06d6 100644
@@ -436,7 +436,7 @@
 			reg = <0x4>;
 		};
 
-		wifi_reset: wifi_reset@6 {
+		wifi_reset: wifi_reset@6 { /* reference as <&tca_gpios 0 0> since it is currently the only GPIO */
 			reg = <0x6>;
 			compatible = "gpio";
 		};
Signature · 1 line
2.12.2
#13 lore raw

PATCH v2 13/32 ARM: dts: omap3-gta04: add warning comment to vaux2 regulator

In reply to H. Nikolaus Schaller

vaux2 should remain always on since a higher potential at vio could potentially damage the itg3200 sensor.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -1
index 1145cfaa06d6..cdee97f532c5 100644
@@ -553,7 +553,7 @@
 &vaux2 {
 	regulator-min-microvolt = <2800000>;
 	regulator-max-microvolt = <2800000>;
-	regulator-always-on;
+	regulator-always-on;	/* we should never switch off while vio is on! */
 };
 
 /* camera */
Signature · 1 line
2.12.2
#14 lore raw

PATCH v2 14/32 ARM: dts: omap3-gta04: explicitly describe that mmc1 has no CD/WP

In reply to H. Nikolaus Schaller

There are neither CD nor WP switches for mmc1. The µSD slot is located under the SIM card under the battery and not accessible during operation.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/omap3-gta04.dtsi +1 -0
index cdee97f532c5..bb4c9ad62edb 100644
@@ -505,6 +505,7 @@
 	vmmc-supply = <&vmmc1>;
 	bus-width = <4>;
 	ti,non-removable;
+	broken-cd;	/* hardware has no CD */
 };
 
 &mmc2 {
Signature · 1 line
2.12.2
#15 lore raw

PATCH v2 15/32 ARM: dts: omap3-gta04: make use of input event include file and constants

In reply to H. Nikolaus Schaller

we can replace magic numbers by symbolic constants now.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04.dtsi +2 -1
index bb4c9ad62edb..98f31f1814d0 100644
@@ -10,6 +10,7 @@
 /dts-v1/;
 
 #include "omap36xx.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "OMAP3 GTA04";
@@ -43,7 +44,7 @@
 
 		aux-button {
 			label = "aux";
-			linux,code = <169>;
+			linux,code = <KEY_PHONE>;
 			gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
 			wakeup-source;
 		};
Signature · 1 line
2.12.2
#16 lore raw

PATCH v2 16/32 ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key event

In reply to H. Nikolaus Schaller

GTA04 can detect presence/absence or plug-in of an external GPS antenna through a gpio. The best match for an event code is SW_LINEIN_INSERT.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +15 -0
index 98f31f1814d0..28e041ec4e98 100644
@@ -50,6 +50,21 @@
 		};
 	};
 
+	antenna-detect {
+		compatible = "gpio-keys";
+
+		gps_antenna_button: gps-antenna-button {
+			label = "GPS_EXT_ANT";
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LINEIN_INSERT>;
+			gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>; /* GPIO144 */
+			interrupt-parent = <&gpio5>;
+			interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
+			debounce-interval = <10>;
+			wakeup-source;
+		};
+	};
+
 	sound {
 		compatible = "ti,omap-twl4030";
 		ti,model = "gta04";
Signature · 1 line
2.12.2
#17 lore raw

PATCH v2 17/32 ARM: dts: omap3-gta04: add camera interface parallel port

In reply to H. Nikolaus Schaller

The GTA04 has an optional OV9655 camera (for which we do not yet have a driver upstream), but the ISP hardware connection description in the device tree is independent of that.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +20 -0
index 28e041ec4e98..3d3876782a00 100644
@@ -700,3 +700,23 @@
 &mcbsp4 {
 	status = "okay";
 };
+
+/* image signal processor within OMAP3 SoC */
+&isp {
+	ports {
+		port@0 {
+			reg = <0>;
+			parallel_ep: endpoint {
+				ti,isp-clock-divisor = <1>;
+				ti,strobe-mode;
+				bus-width = <8>;/* Used data lines */
+				data-shift = <2>; /* Lines 9:2 are used */
+				hsync-active = <0>; /* Active low */
+				vsync-active = <1>; /* Active high */
+				data-active = <1>;/* Active high */
+				pclk-sample = <1>;/* Falling */
+			};
+		};
+		/* port@1 and port@2 are not used by GTA04 */
+	};
+};
Signature · 1 line
2.12.2
#18 lore raw

PATCH v2 18/32 ARM: dts: omap3-gta04: add camera pinmux

In reply to H. Nikolaus Schaller

ISP needs camera pinmux (which is referenced by the camera node).

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +26 -0
index 3d3876782a00..89e16e1897f7 100644
@@ -330,6 +330,32 @@
 			OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT_PULLUP | MUX_MODE4) /* gpio160 */
 		>;
 	};
+
+	camera_pins: pinmux_camera_pins {
+		pinctrl-single,pins = <
+			/* set up parallel camera interface */
+			OMAP3_CORE1_IOPAD(0x210c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_hs */
+			OMAP3_CORE1_IOPAD(0x210e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_vs */
+			OMAP3_CORE1_IOPAD(0x2110, PIN_OUTPUT | MUX_MODE0) /* cam_xclka */
+			OMAP3_CORE1_IOPAD(0x2112, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_pclk */
+			OMAP3_CORE1_IOPAD(0x2114, PIN_OUTPUT | MUX_MODE4) /* cam_fld = gpio_98 */
+			OMAP3_CORE1_IOPAD(0x2116, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d0 */
+			OMAP3_CORE1_IOPAD(0x2118, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d1 */
+			OMAP3_CORE1_IOPAD(0x211a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d2 */
+			OMAP3_CORE1_IOPAD(0x211c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d3 */
+			OMAP3_CORE1_IOPAD(0x211e, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d4 */
+			OMAP3_CORE1_IOPAD(0x2120, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d5 */
+			OMAP3_CORE1_IOPAD(0x2122, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d6 */
+			OMAP3_CORE1_IOPAD(0x2124, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d7 */
+			OMAP3_CORE1_IOPAD(0x2126, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d8 */
+			OMAP3_CORE1_IOPAD(0x2128, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d9 */
+			OMAP3_CORE1_IOPAD(0x212a, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d10 */
+			OMAP3_CORE1_IOPAD(0x212c, PIN_INPUT_PULLDOWN | MUX_MODE0) /* cam_d10 */
+			OMAP3_CORE1_IOPAD(0x212e, PIN_OUTPUT | MUX_MODE0) /* cam_xclkb */
+			OMAP3_CORE1_IOPAD(0x2130, PIN_OUTPUT | MUX_MODE4) /* cam_wen = gpio_167 */
+			OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLDOWN | MUX_MODE4) /* cam_strobe */
+		>;
+	};
 };
 
 &omap3_pmx_core2 {
Signature · 1 line
2.12.2
#19 lore raw

PATCH v2 19/32 ARM: dts: omap3-gta04: add mcbsp (audio subsystem) pinmux

In reply to H. Nikolaus Schaller

GTA04 audio system makes use of all four McBSP ports, so set up proper pinmux.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +39 -0
index 89e16e1897f7..cbb55b9c3242 100644
@@ -356,6 +356,45 @@
 			OMAP3_CORE1_IOPAD(0x2132, PIN_INPUT_PULLDOWN | MUX_MODE4) /* cam_strobe */
 		>;
 	};
+
+	mcbsp1_pins: pinmux_mcbsp1_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x218c, PIN_INPUT | MUX_MODE4)	/* mcbsp1_clkr.mcbsp1_clkr - gpio_156 FM interrupt */
+			OMAP3_CORE1_IOPAD(0x218e, PIN_OUTPUT | MUX_MODE0)	/* mcbsp1_clkr.mcbsp1_fsr */
+			OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0)	/* mcbsp1_dx.mcbsp1_dx */
+			OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0)	/* mcbsp1_dx.mcbsp1_dr */
+			/* mcbsp_clks is used as PENIRQ */
+			/* OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0)	/* mcbsp_clks.mcbsp_clks */
+			OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0)	/* mcbsp_clks.mcbsp1_fsx */
+			OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0)	/* mcbsp1_clkx.mcbsp1_clkx */
+		>;
+	};
+
+	mcbsp2_pins: pinmux_mcbsp2_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)	/* mcbsp2_fsx.mcbsp2_fsx */
+			OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)	/* mcbsp2_fsx.mcbsp2_clkx */
+			OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)	/* mcbsp2_dr.mcbsp2_dr */
+			OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)	/* mcbsp2_dr.mcbsp2_dx */
+		>;
+	};
+
+	mcbsp3_pins: pinmux_mcbsp3_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x216c, PIN_OUTPUT | MUX_MODE0)	/* mcbsp3_dx.mcbsp3_dx */
+			OMAP3_CORE1_IOPAD(0x216e, PIN_INPUT | MUX_MODE0)	/* mcbsp3_dx.mcbsp3_dr */
+			OMAP3_CORE1_IOPAD(0x2170, PIN_INPUT | MUX_MODE0)	/* mcbsp3_clkx.mcbsp3_clkx */
+			OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT | MUX_MODE0)	/* mcbsp3_clkx.mcbsp3_fsx */
+		>;
+	};
+
+	mcbsp4_pins: pinmux_mcbsp4_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcbsp4_clkx.mcbsp4_clkx */
+			OMAP3_CORE1_IOPAD(0x2186, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcbsp4_clkx.mcbsp4_dr */
+			OMAP3_CORE1_IOPAD(0x218a, PIN_INPUT_PULLDOWN | MUX_MODE0)	/* mcbsp4_dx.mcbsp4_fsx */
+		>;
+	};
 };
 
 &omap3_pmx_core2 {
Signature · 1 line
2.12.2
#20 lore raw

PATCH v2 20/32 ARM: dts: omap3-gta04: add devconf0 setup for mcbsp1 clock pins

In reply to H. Nikolaus Schaller

McBSP1 needs special "pinctrl" for the clocks.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/omap3-gta04.dtsi +18 -0
index cbb55b9c3242..39f0eb8f65b0 100644
@@ -187,6 +187,24 @@
 		reset-gpios = <&tca6507 0 GPIO_ACTIVE_LOW>;	/* W2CBW003 reset through tca6507 */
 	};
 
+	/* devconf0 setup for mcbsp1 clock pins */
+	pinmux_mcbsp1@48002274 {
+		compatible = "pinctrl-single";
+		reg = <0x48002274 4>;   /* CONTROL_DEVCONF0 */
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-single,bit-per-mux;
+		pinctrl-single,register-width = <32>;
+		pinctrl-single,function-mask = <0x7>;	/* MCBSP1 CLK pinmux */
+		#pinctrl-cells = <2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&mcbsp1_devconf0_pins>;
+		mcbsp1_devconf0_pins: pinmux_mcbsp1_devconf0_pins {
+			/*                   offset bits mask */
+			pinctrl-single,bits = <0x00 0x08 0x1c>;	/* set MCBSP1_CLKR */
+		};
+	};
+
 	/* devconf1 setup for tvout pins */
 	pinmux_tv_out@480022d8 {
 		compatible = "pinctrl-single";
Signature · 1 line
2.12.2
#21 lore raw

PATCH v2 21/32 ARM: dts: omap3-gta04: add mcbsp (audio subsystem) nodes

In reply to H. Nikolaus Schaller

GTA04 audio system makes use of all four McBSP ports, so enable and connect them with pinmux.

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)
arch/arm/boot/dts/omap3-gta04.dtsi +25 -6
index 39f0eb8f65b0..571ea4e0a087 100644
@@ -771,8 +771,31 @@
 	};
 };
 
-&mcbsp2 {
-	status = "okay";
+&mcbsp1 { /* FM Transceiver PCM */
+	status = "ok";
+	#sound-dai-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcbsp1_pins>;
+};
+
+&mcbsp2 { /* TPS65950 I2S */
+	status = "ok";
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcbsp2_pins>;
+};
+
+&mcbsp3 { /* Bluetooth PCM */
+	status = "ok";
+	#sound-dai-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcbsp3_pins>;
+};
+
+&mcbsp4 { /* GSM voice PCM */
+	status = "ok";
+	#sound-dai-cells = <0>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcbsp4_pins>;
 };
 
 &hdqw1w {
@@ -780,10 +803,6 @@
         pinctrl-0 = <&hdq_pins>;
 };
 
-&mcbsp4 {
-	status = "okay";
-};
-
 /* image signal processor within OMAP3 SoC */
 &isp {
 	ports {
Signature · 1 line
2.12.2
#22 lore raw

PATCH v2 22/32 ARM: dts: omap3-gta04a3: fix model name for A3 variant

In reply to H. Nikolaus Schaller

GTA04 is the project name and Letux 2804 the product name. Report both.

---
 arch/arm/boot/dts/omap3-gta04a3.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04a3.dts +1 -1
index 3099a892cf50..cc9244956679 100644
@@ -9,7 +9,7 @@
 #include "omap3-gta04.dtsi"
 
 / {
-	model = "Goldelico GTA04A3";
+	model = "Goldelico GTA04A3/Letux 2804";
 };
 
 &i2c2 {
Signature · 1 line
2.12.2
#23 lore raw

PATCH v2 23/32 ARM: dts: omap3-gta04a4: fix model name for A4 variant

In reply to H. Nikolaus Schaller

GTA04 is the project name and Letux 2804 the product name. Report both.

---
 arch/arm/boot/dts/omap3-gta04a4.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04a4.dts +1 -1
index c918bb1f0529..77afc711fe4f 100644
@@ -9,5 +9,5 @@
 #include "omap3-gta04.dtsi"
 
 / {
-	model = "Goldelico GTA04A4";
+	model = "Goldelico GTA04A4/Letux 2804";
 };
Signature · 1 line
2.12.2
#24 lore raw

PATCH v2 24/32 ARM: dts: omap3-gta04a5: fix copyright of A5 variant

In reply to H. Nikolaus Schaller
---
 arch/arm/boot/dts/omap3-gta04a5.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04a5.dts +1 -1
index 600b6ca5a1bd..b691e70773f9 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 H. Nikolaus Schaller <[email protected]>
+ * Copyright (C) 2014-18 H. Nikolaus Schaller <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
Signature · 1 line
2.12.2
#25 lore raw

PATCH v2 25/32 ARM: dts: omap3-gta04a5: fix model name

In reply to H. Nikolaus Schaller

GTA04 is the project name and Letux 2804 the product name. Report both.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04a5.dts +1 -1
index b691e70773f9..c01b4715fb83 100644
@@ -9,7 +9,7 @@
 #include "omap3-gta04.dtsi"
 
 / {
-	model = "Goldelico GTA04A5";
+	model = "Goldelico GTA04A5/Letux 2804";
 
 	sound {
 		ti,jack-det-gpio = <&twl_gpio 2 GPIO_ACTIVE_HIGH>;    /* GTA04A5 only */
Signature · 1 line
2.12.2
#26 lore raw

PATCH v2 26/32 ARM: dts: omap3-gta04a5: fix whitepsace and tab style

In reply to H. Nikolaus Schaller

in node sound / property ti,jack-det-gpio.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/omap3-gta04a5.dts +1 -1
index c01b4715fb83..d408eb05cdfa 100644
@@ -12,6 +12,6 @@
 	model = "Goldelico GTA04A5/Letux 2804";
 
 	sound {
-		ti,jack-det-gpio = <&twl_gpio 2 GPIO_ACTIVE_HIGH>;    /* GTA04A5 only */
+		ti,jack-det-gpio = <&twl_gpio 2 GPIO_ACTIVE_HIGH>;	/* GTA04A5 only */
 	};
 };
Signature · 1 line
2.12.2
#27 lore raw

PATCH v2 27/32 ARM: dts: omap3-gta04a5: add support for PPS

In reply to H. Nikolaus Schaller

GPS receiver provides a 1PPS signal to a gpio.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/omap3-gta04a5.dts +18 -0
index d408eb05cdfa..e3f9e0969065 100644
@@ -14,4 +14,22 @@
 	sound {
 		ti,jack-det-gpio = <&twl_gpio 2 GPIO_ACTIVE_HIGH>;	/* GTA04A5 only */
 	};
+
+	pps {
+		compatible = "pps-gpio";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pps_pins>;
+
+		gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>; /* GPIN_114 */
+	};
+
+};
+
+&omap3_pmx_core {
+	pps_pins: pinmux_pps_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | MUX_MODE4) /* gpin114 */
+		>;
+	};
+
 };
Signature · 1 line
2.12.2
#28 lore raw

PATCH v2 28/32 ARM: dts: omap3-gta04a5: disable IrDA receiver to save power

In reply to H. Nikolaus Schaller

The GTA04A5 has an improved IrDA circuit that can enable/disable the receiver individually. We do not have an IrDA driver/subsystem and hence the receiver should be actively turned off to save power, especially in suspend.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/omap3-gta04a5.dts +14 -0
index e3f9e0969065..e3352cc97c91 100644
@@ -25,7 +25,21 @@
 
 };
 
+&gpio5 {
+	irda_en {
+		gpio-hog;
+		gpios = <(175-160) GPIO_ACTIVE_HIGH>;
+		output-high;	/* activate gpio_175 to disable IrDA receiver */
+	};
+};
+
 &omap3_pmx_core {
+	irda_pins: pinmux_irda {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x21d0, PIN_OUTPUT_PULLUP | MUX_MODE4)	/* mcspi1_cs1 = gpio175 */
+		>;
+	};
+
 	pps_pins: pinmux_pps_pins {
 		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | MUX_MODE4) /* gpin114 */
Signature · 1 line
2.12.2
#29 lore raw

PATCH v2 29/32 ARM: dts: omap3-gta04a5: add support for ti,wl1837 module

In reply to H. Nikolaus Schaller

GTA04A5 uses a ti,wl1837 WiFi/Bluetooth module. Overwrite the mmc2 node and child.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 58 +++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
arch/arm/boot/dts/omap3-gta04a5.dts +58 -0
index e3352cc97c91..453a87ebb860 100644
@@ -15,6 +15,20 @@
 		ti,jack-det-gpio = <&twl_gpio 2 GPIO_ACTIVE_HIGH>;	/* GTA04A5 only */
 	};
 
+	wlan_en: wlan_en_regulator {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wlan_pins>;
+		regulator-name = "wlan-en-regulator";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;	/* GPIO_138 */
+
+		startup-delay-us = <70000>;
+		enable-active-high;
+	};
+
 	pps {
 		compatible = "pps-gpio";
 		pinctrl-names = "default";
@@ -34,6 +48,18 @@
 };
 
 &omap3_pmx_core {
+	wlan_pins: pinmux_wlan_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT | MUX_MODE4)	/* mmc2_dat6 = mmc3_dat2 = gpio138 */
+		>;
+	};
+
+	wlan_irq_pin: pinmux_wlan_irq_pin {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE4)	/* mmc2_dat7 = mmc3_dat3 = gpio139 */
+		>;
+	};
+
 	irda_pins: pinmux_irda {
 		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x21d0, PIN_OUTPUT_PULLUP | MUX_MODE4)	/* mcspi1_cs1 = gpio175 */
@@ -47,3 +73,35 @@
 	};
 
 };
+
+/*
+ * for WL183x module see
+ * http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
+ */
+
+&wifi_pwrseq {
+	/delete-property/ reset-gpios;
+};
+
+&mmc2 {
+	vmmc-supply = <&wlan_en>;
+	bus-width = <4>;
+	cap-power-off-card;
+	non-removable;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&wlan_irq_pin>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	/delete-property/ mmc-pwrseq;
+
+	wlcore: wlcore@2 {
+		compatible = "ti,wl1837";
+		reg = <2>;
+		interrupt-parent = <&gpio5>;
+		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;	/* GPIO_139 */
+		ref-clock-frequency = <26000000>;
+	};
+};
Signature · 1 line
2.12.2
#30 lore raw

PATCH v2 30/32 ARM: dts: omap3-gta04a5: uses different sensors than gta04a4

In reply to H. Nikolaus Schaller

Sensors for acceleration, rotation, magnetic heading and barometer have been replaced in the A5 variant.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm/boot/dts/omap3-gta04a5.dts +27 -0
index 453a87ebb860..973d07d0b4c8 100644
@@ -105,3 +105,30 @@
 		ref-clock-frequency = <26000000>;
 	};
 };
+
+&i2c2 {
+	/delete-node/ bmp085@77;
+	/delete-node/ bma180@41;
+	/delete-node/ itg3200@68;
+	/delete-node/ hmc5843@1e;
+
+	bmg160@69 {
+		compatible = "bosch,bmg160";
+		reg = <0x69>;
+	};
+
+	bmc150@10 {
+		compatible = "bosch,bmc150_accel";
+		reg = <0x10>;
+	};
+
+	bmc150@12 {
+		compatible = "bosch,bmc150_magn";
+		reg = <0x12>;
+	};
+
+	bme280@76 {
+		compatible = "bosch,bme280";
+		reg = <0x76>;
+	};
+};
Signature · 1 line
2.12.2
#31 lore raw

PATCH v2 31/32 ARM: dts: omap3-gta04a5: define pinmux for bluetooth enable of ti,wl1837 module

In reply to H. Nikolaus Schaller

Properly pinmux the bluetooth enable so that it is not floating.

---
 arch/arm/boot/dts/omap3-gta04a5.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/omap3-gta04a5.dts +6 -0
index 973d07d0b4c8..bd232b1b24cb 100644
@@ -48,6 +48,12 @@
 };
 
 &omap3_pmx_core {
+	bt_pins: pinmux_bt_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT | MUX_MODE4)	/* mmc2_dat5 = mmc3_dat1 = gpio137 */
+		>;
+	};
+
 	wlan_pins: pinmux_wlan_pins {
 		pinctrl-single,pins = <
 			OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT | MUX_MODE4)	/* mmc2_dat6 = mmc3_dat2 = gpio138 */
Signature · 1 line
2.12.2
#32 lore raw

PATCH v2 32/32 ARM: dts: omap3-gta04a5one: define GTA04A5 variant with OneNAND

In reply to H. Nikolaus Schaller

GTA04A5 has been produced with MCP chips either with
512MB RAM + 512MB NAND
512MB RAM + 1024MB NAND
1024MB RAM + 512MB OneNAND

RAM setup is done by U-Boot (MLO/SPL) but OneNAND needs a different setup of the GPMC. So we need to derive a DTB variant that modifies the gpmc and nand setup.

---
 arch/arm/boot/dts/omap3-gta04a5one.dts | 114 +++++++++++++++++++++++++++++++++
 1 file changed, 114 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-gta04a5one.dts
arch/arm/boot/dts/omap3-gta04a5one.dts new file +114 -0
new file mode 100644
index 000000000000..9b7bbdc344b3
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2014-18 H. Nikolaus Schaller <[email protected]>
+ *
+ * This program 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.
+ */
+
+#include "omap3-gta04a5.dts"
+
+&omap3_pmx_core {
+	model = "Goldelico GTA04A5/Letux 2804 with OneNAND";
+
+	gpmc_pins: pinmux_gpmc_pins {
+		pinctrl-single,pins = <
+
+			/* address lines */
+			OMAP3_CORE1_IOPAD(0x207a, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a1.gpmc_a1 */
+			OMAP3_CORE1_IOPAD(0x207c, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a2.gpmc_a2 */
+			OMAP3_CORE1_IOPAD(0x207e, PIN_OUTPUT | MUX_MODE0)       /* gpmc_a3.gpmc_a3 */
+
+			/* data lines, gpmc_d0..d7 not muxable according to TRM */
+			OMAP3_CORE1_IOPAD(0x209e, PIN_INPUT | MUX_MODE0)        /* gpmc_d8.gpmc_d8 */
+			OMAP3_CORE1_IOPAD(0x20a0, PIN_INPUT | MUX_MODE0)        /* gpmc_d9.gpmc_d9 */
+			OMAP3_CORE1_IOPAD(0x20a2, PIN_INPUT | MUX_MODE0)        /* gpmc_d10.gpmc_d10 */
+			OMAP3_CORE1_IOPAD(0x20a4, PIN_INPUT | MUX_MODE0)        /* gpmc_d11.gpmc_d11 */
+			OMAP3_CORE1_IOPAD(0x20a6, PIN_INPUT | MUX_MODE0)        /* gpmc_d12.gpmc_d12 */
+			OMAP3_CORE1_IOPAD(0x20a8, PIN_INPUT | MUX_MODE0)        /* gpmc_d13.gpmc_d13 */
+			OMAP3_CORE1_IOPAD(0x20aa, PIN_INPUT | MUX_MODE0)        /* gpmc_d14.gpmc_d14 */
+			OMAP3_CORE1_IOPAD(0x20ac, PIN_INPUT | MUX_MODE0)        /* gpmc_d15.gpmc_d15 */
+
+			/*
+			 * gpmc_ncs0, gpmc_nadv_ale, gpmc_noe, gpmc_nwe, gpmc_wait0 not muxable
+			 * according to TRM. OneNAND seems to require PIN_INPUT on clock.
+			 */
+			OMAP3_CORE1_IOPAD(0x20b0, PIN_OUTPUT | MUX_MODE0)       /* gpmc_ncs1.gpmc_ncs1 */
+			OMAP3_CORE1_IOPAD(0x20be, PIN_INPUT | MUX_MODE0)        /* gpmc_clk.gpmc_clk */
+		>;
+	};
+};
+
+&gpmc {
+	/* switch inherited setup to OneNAND */
+
+	ranges = <0 0 0x04000000 0x1000000>;	/* CS0: 16MB for OneNAND */
+	pinctrl-names = "default";
+	pinctrl-0 = <&gpmc_pins>;
+
+	/delete-node/ nand@0,0;
+
+	onenand@0,0 {
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "ti,omap2-onenand";
+		reg = <0 0 0x20000>;	/* CS0, offset 0, IO size 128K */
+
+		gpmc,sync-read;
+		gpmc,sync-write;
+		gpmc,burst-length = <16>;
+		gpmc,burst-read;
+		gpmc,burst-wrap;
+		gpmc,burst-write;
+		gpmc,device-width = <2>;
+		gpmc,mux-add-data = <2>;
+		gpmc,cs-on-ns = <0>;
+		gpmc,cs-rd-off-ns = <87>;
+		gpmc,cs-wr-off-ns = <87>;
+		gpmc,adv-on-ns = <0>;
+		gpmc,adv-rd-off-ns = <10>;
+		gpmc,adv-wr-off-ns = <10>;
+		gpmc,oe-on-ns = <15>;
+		gpmc,oe-off-ns = <87>;
+		gpmc,we-on-ns = <0>;
+		gpmc,we-off-ns = <87>;
+		gpmc,rd-cycle-ns = <112>;
+		gpmc,wr-cycle-ns = <112>;
+		gpmc,access-ns = <81>;
+		gpmc,page-burst-access-ns = <15>;
+		gpmc,bus-turnaround-ns = <0>;
+		gpmc,cycle2cycle-delay-ns = <0>;
+		gpmc,wait-monitoring-ns = <0>;
+		gpmc,clk-activation-ns = <5>;
+		gpmc,wr-data-mux-bus-ns = <30>;
+		gpmc,wr-access-ns = <81>;
+		gpmc,sync-clk-ps = <15000>;
+
+		x-loader@0 {
+			label = "X-Loader";
+			reg = <0 0x80000>;
+		};
+
+		bootloaders@80000 {
+			label = "U-Boot";
+			reg = <0x80000 0x1c0000>;
+		};
+
+		bootloaders_env@240000 {
+			label = "U-Boot Env";
+			reg = <0x240000 0x40000>;
+		};
+
+		kernel@280000 {
+			label = "Kernel";
+			reg = <0x280000 0x600000>;
+		};
+
+		filesystem@880000 {
+			label = "File System";
+			reg = <0x880000 0>;	/* 0 = MTDPART_SIZ_FULL */
+		};
+
+	};
+};
Signature · 1 line
2.12.2
#33 lore raw
In reply to H. Nikolaus Schaller

Hi OMAP3 DTS Maintainers,
is there any progress in merging this patch series?

We have some more patches in our queue which depend on them.

BR and thanks,
Nikolaus Schaller

Quoted 75 lines

Am 31.07.2018 um 09:11 schrieb H. Nikolaus Schaller <[email protected]>:

* Sebastian Reichel <[email protected]> asked why we have reg=<0> for port@1.
Based on his comment we have removed the change for
the opa362 reg property in the DT, but worked out a correct fix in the opa362 driver which solves the issue better.
See: https://lore.kernel.org/patchwork/patch/968407/
* Ladislav Michl <[email protected]>
has found a typo and we discussed NAND/OneNAND and
how the partitions should be setup. A better solution would be to do it completely by u-boot, but unless we have that, we must fix it here.
* we omit the patch that replaces ti,non-removable by non-removable since additional internal tests have shown that it makes problems with finding the rootfs boot partition.
* instead we add a patch that explicitly sets broken-cd for mmc1.

PATCH V1 2018-07-25 09:00:42:
We have not upstreamed significant improvements collected in the GTA04 vendor kernel tree for some years. The result is that distribution kernels derived from upstream (e.g. Debian) lag behind and miss significant features and fixes.

H. Nikolaus Schaller (32):
ARM: dts: omap3-gta04: fix typo in backlight pins node name
ARM: dts: omap3-gta04: fix some whitespace and tab style errors
ARM: dts: omap3-gta04: give spi_lcd node a label so that we can
overwrite in other DTS files
ARM: dts: omap3-gta04: fixes for tvout / venc
ARM: dts: omap3-gta04: add devconf1 setup for correct tvout pins
ARM: dts: omap3-gta04: tvout: enable as display1 alias
ARM: dts: omap3-gta04: fix touchscreen tsc2007
ARM: dts: omap3-gta04: add pinmux for bmp085 EOC interrupt
ARM: dts: omap3-gta04: make NAND partitions compatible with recent
U-Boot
ARM: dts: omap3-gta04: update gpmc NAND setup
ARM: dts: omap3-gta04: keep vpll2 always on
ARM: dts: omap3-gta04: add a comment how to reference the tca6507 gpio
ARM: dts: omap3-gta04: add warning comment to vaux2 regulator
ARM: dts: omap3-gta04: explicitly describe that mmc1 has no CD/WP
ARM: dts: omap3-gta04: make use of input event include file and
constants
ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key
event
ARM: dts: omap3-gta04: add camera interface parallel port
ARM: dts: omap3-gta04: add camera pinmux
ARM: dts: omap3-gta04: add mcbsp (audio subsystem) pinmux
ARM: dts: omap3-gta04: add devconf0 setup for mcbsp1 clock pins
ARM: dts: omap3-gta04: add mcbsp (audio subsystem) nodes
ARM: dts: omap3-gta04a3: fix model name for A3 variant
ARM: dts: omap3-gta04a4: fix model name for A4 variant
ARM: dts: omap3-gta04a5: fix copyright of A5 variant
ARM: dts: omap3-gta04a5: fix model name
ARM: dts: omap3-gta04a5: fix whitepsace and tab style
ARM: dts: omap3-gta04a5: add support for PPS
ARM: dts: omap3-gta04a5: disable IrDA receiver to save power
ARM: dts: omap3-gta04a5: add support for ti,wl1837 module
ARM: dts: omap3-gta04a5: uses different sensors than gta04a4
ARM: dts: omap3-gta04a5: define pinmux for bluetooth enable of
ti,wl1837 module
ARM: dts: omap3-gta04a5one: define GTA04A5 variant with OneNAND

arch/arm/boot/dts/omap3-gta04.dtsi     | 248 +++++++++++++++++++++++++++++----
arch/arm/boot/dts/omap3-gta04a3.dts    |   2 +-
arch/arm/boot/dts/omap3-gta04a4.dts    |   2 +-
arch/arm/boot/dts/omap3-gta04a5.dts    | 129 ++++++++++++++++-
arch/arm/boot/dts/omap3-gta04a5one.dts | 114 +++++++++++++++
5 files changed, 462 insertions(+), 33 deletions(-)

create mode 100644 arch/arm/boot/dts/omap3-gta04a5one.dts

Signature · 1 line
2.12.2
#34 lore raw
Quoted 2 lines · H. Nikolaus Schaller

Hi OMAP3 DTS Maintainers,
is there any progress in merging this patch series?

Looks good to me in general, I'll be getting into applying patches for v4.20 in few days.

Regards,

Tony

#35 lore raw
Quoted 6 lines · Tony Lindgren
Quoted 2 lines · H. Nikolaus Schaller

Hi OMAP3 DTS Maintainers,
is there any progress in merging this patch series?

Looks good to me in general, I'll be getting into applying patches for v4.20 in few days.

Applying all into omap-for-v4.20/dt finally thanks.

Regards,

Tony