Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f328c2ea authored by Linus Walleij's avatar Linus Walleij
Browse files

ARM: dts: gemini: add pin control set-up for the SoC



This adds the basic pin control muliplexing settings for the
Gemini SoC: parallel (NOR) flash, SATA, optional IDE, PCI and
UART.

We also select the right GPIO groups on all applicable systems
so that GPIO keys/LEDs work smoothly.

We can then build upon this for more complex systems.

Acked-by: default avatarHans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 22789ae3
Loading
Loading
Loading
Loading
+55 −0
Original line number Original line Diff line number Diff line
@@ -32,6 +32,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_ESC>;
			linux,code = <KEY_ESC>;
			label = "reset";
			label = "reset";
			/* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
		};
		};
		button-eject {
		button-eject {
@@ -39,6 +40,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_EJECTCD>;
			linux,code = <KEY_EJECTCD>;
			label = "unmount";
			label = "unmount";
			/* Collides with LPC LFRAME, UART RTS, SSP TXD */
			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
		};
		};
	};
	};
@@ -47,6 +49,7 @@
		compatible = "gpio-leds";
		compatible = "gpio-leds";
		led-wps {
		led-wps {
			label = "dir685:blue:WPS";
			label = "dir685:blue:WPS";
			/* Collides with ICE */
			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
			default-state = "on";
			default-state = "on";
			linux,default-trigger = "heartbeat";
			linux,default-trigger = "heartbeat";
@@ -61,11 +64,13 @@
		 */
		 */
		led-blue-hd {
		led-blue-hd {
			label = "dir685:blue:HD";
			label = "dir685:blue:HD";
			/* Collides with LPC_SERIRQ, UART DTR, SSP FSC pins */
			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
		};
		};
		led-orange-hd {
		led-orange-hd {
			label = "dir685:orange:HD";
			label = "dir685:orange:HD";
			/* Collides with LPC_LAD[2], UART DSR, SSP ECLK pins */
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
		};
		};
@@ -81,6 +86,7 @@
	 */
	 */
	gpio-fan {
	gpio-fan {
		compatible = "gpio-fan";
		compatible = "gpio-fan";
		/* Collides with IDE */
		gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
		gpio-fan,speed-map = <0 0>, <10000 1>;
		gpio-fan,speed-map = <0 0>, <10000 1>;
		#cooling-cells = <2>;
		#cooling-cells = <2>;
@@ -92,6 +98,7 @@
	 */
	 */
	gpio-i2c {
	gpio-i2c {
		compatible = "i2c-gpio";
		compatible = "i2c-gpio";
		/* Collides with ICE */
		gpios = <&gpio0 5 0>, /* SDA */
		gpios = <&gpio0 5 0>, /* SDA */
			<&gpio0 6 0>; /* SCL */
			<&gpio0 6 0>; /* SCL */
		#address-cells = <1>;
		#address-cells = <1>;
@@ -101,6 +108,7 @@
			compatible = "dlink,dir685-touchkeys";
			compatible = "dlink,dir685-touchkeys";
			reg = <0x26>;
			reg = <0x26>;
			interrupt-parent = <&gpio0>;
			interrupt-parent = <&gpio0>;
			/* Collides with NAND flash */
			interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
			interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
		};
		};
	};
	};
@@ -156,12 +164,59 @@
			};
			};
		};
		};


		syscon: syscon@40000000 {
			pinctrl {
				/*
				 * gpio0bgrp cover line 5, 6 used by TK I2C
				 * gpio0bgrp cover line 7 used by WPS LED
				 * gpio0cgrp cover line 8, 13 used by keys
				 *           and 11, 12 used by the HD LEDs
				 * gpio0egrp cover line 16 used by VDISP
				 * gpio0fgrp cover line 17 used by TK IRQ
				 * gpio0ggrp cover line 20 used by panel CS
				 * gpio0hgrp cover line 21,22 used by RTL8366RB
				 */
				gpio0_default_pins: pinctrl-gpio0 {
					mux {
						function = "gpio0";
						groups = "gpio0bgrp",
						"gpio0cgrp",
						"gpio0egrp",
						"gpio0fgrp",
						"gpio0ggrp",
						"gpio0hgrp";
					};
				};
				/*
				 * gpio1bgrp cover line 5,8,7 used by panel SPI
				 * also line 6 used by the fan
				 *
				 */
				gpio1_default_pins: pinctrl-gpio1 {
					mux {
						function = "gpio1";
						groups = "gpio1bgrp";
					};
				};
			};
		};

		sata: sata@46000000 {
		sata: sata@46000000 {
			cortina,gemini-ata-muxmode = <0>;
			cortina,gemini-ata-muxmode = <0>;
			cortina,gemini-enable-sata-bridge;
			cortina,gemini-enable-sata-bridge;
			status = "okay";
			status = "okay";
		};
		};


		gpio0: gpio@4d000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio0_default_pins>;
		};

		gpio1: gpio@4e000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio1_default_pins>;
		};

		pci@50000000 {
		pci@50000000 {
			status = "okay";
			status = "okay";
			interrupt-map-mask = <0xf800 0 0 7>;
			interrupt-map-mask = <0xf800 0 0 7>;
+24 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_SETUP>;
			linux,code = <KEY_SETUP>;
			label = "Backup button";
			label = "Backup button";
			/* Conflict with TVC */
			gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
			gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
		};
		};
		button@31 {
		button@31 {
@@ -40,6 +41,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_RESTART>;
			linux,code = <KEY_RESTART>;
			label = "Softreset button";
			label = "Softreset button";
			/* Conflict with TVC */
			gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
			gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
		};
		};
	};
	};
@@ -48,11 +50,13 @@
		compatible = "gpio-leds";
		compatible = "gpio-leds";
		led@28 {
		led@28 {
			label = "nas4220b:orange:hdd";
			label = "nas4220b:orange:hdd";
			/* Conflict with TVC */
			gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
			default-state = "on";
			default-state = "on";
		};
		};
		led@30 {
		led@30 {
			label = "nas4220b:green:os";
			label = "nas4220b:green:os";
			/* Conflict with TVC */
			gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
			default-state = "on";
			default-state = "on";
			linux,default-trigger = "heartbeat";
			linux,default-trigger = "heartbeat";
@@ -99,12 +103,32 @@
			};
			};
		};
		};


		syscon: syscon@40000000 {
			pinctrl {
				/*
				 * gpio1dgrp cover line 28-31 otherwise used
				 * by TVC.
				 */
				gpio1_default_pins: pinctrl-gpio1 {
					mux {
						function = "gpio1";
						groups = "gpio1dgrp";
					};
				};
			};
		};

		sata: sata@46000000 {
		sata: sata@46000000 {
			cortina,gemini-ata-muxmode = <0>;
			cortina,gemini-ata-muxmode = <0>;
			cortina,gemini-enable-sata-bridge;
			cortina,gemini-enable-sata-bridge;
			status = "okay";
			status = "okay";
		};
		};


		gpio1: gpio@4e000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio1_default_pins>;
		};

		ata@63000000 {
		ata@63000000 {
			status = "okay";
			status = "okay";
		};
		};
+39 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_SETUP>;
			linux,code = <KEY_SETUP>;
			label = "Reset to defaults";
			label = "Reset to defaults";
			/* Conflict with TVC */
			gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
			gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
		};
		};
	};
	};
@@ -42,12 +43,14 @@
		led@7 {
		led@7 {
			/* FIXME: add the LED color */
			/* FIXME: add the LED color */
			label = "rut1xx::gsm";
			label = "rut1xx::gsm";
			/* Conflict with ICE */
			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
			default-state = "on";
			default-state = "on";
		};
		};
		led@31 {
		led@31 {
			/* FIXME: add the LED color */
			/* FIXME: add the LED color */
			label = "rut1xx::power";
			label = "rut1xx::power";
			/* Conflict with NAND CE0 */
			gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
			linux,default-trigger = "heartbeat";
			linux,default-trigger = "heartbeat";
@@ -61,5 +64,41 @@
			reg = <0x30000000 0x00800000>;
			reg = <0x30000000 0x00800000>;
			/* TODO: add flash partitions here */
			/* TODO: add flash partitions here */
		};
		};

		syscon: syscon@40000000 {
			pinctrl {
				/*
				 * gpio0bgrp cover line 7 used by GSM LED
				 * gpio0fgrp cover line 17 used by power LED
				 */
				gpio0_default_pins: pinctrl-gpio0 {
					mux {
						function = "gpio0";
						groups = "gpio0bgrp",
						"gpio0fgrp";
					};
				};
				/*
				 * gpio1dgrp cover line 28-31 otherwise used
				 * by TVC.
				 */
				gpio1_default_pins: pinctrl-gpio1 {
					mux {
						function = "gpio1";
						groups = "gpio1dgrp";
					};
				};
			};
		};

		gpio0: gpio@4d000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio0_default_pins>;
		};

		gpio1: gpio@4e000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio1_default_pins>;
		};
	};
	};
};
};
+35 −1
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_SETUP>;
			linux,code = <KEY_SETUP>;
			label = "factory reset";
			label = "factory reset";
			/* Conflict with NAND flash */
			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
		};
		};
	};
	};
@@ -41,12 +42,14 @@
		compatible = "gpio-leds";
		compatible = "gpio-leds";
		led@20 {
		led@20 {
			label = "sq201:green:info";
			label = "sq201:green:info";
			/* Conflict with parallel flash */
			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
			default-state = "on";
			default-state = "on";
			linux,default-trigger = "heartbeat";
			linux,default-trigger = "heartbeat";
		};
		};
		led@31 {
		led@31 {
			label = "sq201:green:usb";
			label = "sq201:green:usb";
			/* Conflict with parallel and NAND flash */
			gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
			linux,default-trigger = "usb-host";
			linux,default-trigger = "usb-host";
@@ -55,7 +58,15 @@


	soc {
	soc {
		flash@30000000 {
		flash@30000000 {
			status = "okay";
			/*
			 * Flash access can be enabled, with the side effect
			 * of disabling access to GPIO LED on GPIO0[20] which
			 * reuse one of the parallel flash chip select lines.
			 * Also the default firmware on the machine has the
			 * problem that since it uses the flash, the two LEDS
			 * on the right become numb.
			 */
			/* status = "okay"; */
			/* 16MB of flash */
			/* 16MB of flash */
			reg = <0x30000000 0x01000000>;
			reg = <0x30000000 0x01000000>;


@@ -93,12 +104,35 @@
			};
			};
		};
		};


		syscon: syscon@40000000 {
			pinctrl {
				/*
				 * gpio0fgrp cover line 18 used by reset button
				 * gpio0ggrp cover line 20 used by info LED
				 * gpio0kgrp cover line 31 used by USB LED
				 */
				gpio0_default_pins: pinctrl-gpio0 {
					mux {
						function = "gpio0";
						groups = "gpio0fgrp",
						"gpio0ggrp",
						"gpio0kgrp";
					};
				};
			};
		};

		sata: sata@46000000 {
		sata: sata@46000000 {
			cortina,gemini-ata-muxmode = <0>;
			cortina,gemini-ata-muxmode = <0>;
			cortina,gemini-enable-sata-bridge;
			cortina,gemini-enable-sata-bridge;
			status = "okay";
			status = "okay";
		};
		};


		gpio0: gpio@4d000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio0_default_pins>;
		};

		pci@50000000 {
		pci@50000000 {
			status = "okay";
			status = "okay";
			interrupt-map-mask = <0xf800 0 0 7>;
			interrupt-map-mask = <0xf800 0 0 7>;
+26 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@
			wakeup-source;
			wakeup-source;
			linux,code = <KEY_SETUP>;
			linux,code = <KEY_SETUP>;
			label = "reset";
			label = "reset";
			/* Conflict with ICE */
			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
			gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
		};
		};
	};
	};
@@ -42,21 +43,25 @@


		led@1 {
		led@1 {
			label = "wbd111:red:L3";
			label = "wbd111:red:L3";
			/* Conflict with TVC and extended parallel flash */
			gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
		};
		};
		led@2 {
		led@2 {
			label = "wbd111:green:L4";
			label = "wbd111:green:L4";
			/* Conflict with TVC and extended parallel flash */
			gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
		};
		};
		led@3 {
		led@3 {
			label = "wbd111:red:L4";
			label = "wbd111:red:L4";
			/* Conflict with TVC and extended parallel flash */
			gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
			default-state = "off";
			default-state = "off";
		};
		};
		led@5 {
		led@5 {
			label = "wbd111:green:L3";
			label = "wbd111:green:L3";
			/* Conflict with TVC and extended parallel flash */
			gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
			gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
			default-state = "on";
			default-state = "on";
			linux,default-trigger = "heartbeat";
			linux,default-trigger = "heartbeat";
@@ -98,5 +103,26 @@
				read-only;
				read-only;
			};
			};
		};
		};

		syscon: syscon@40000000 {
			pinctrl {
				/*
				 * gpio0agrp cover line 0-4
				 * gpio0bgrp cover line 5
				 */
				gpio0_default_pins: pinctrl-gpio0 {
					mux {
						function = "gpio0";
						groups = "gpio0agrp",
						"gpio0bgrp";
					};
				};
			};
		};

		gpio0: gpio@4d000000 {
			pinctrl-names = "default";
			pinctrl-0 = <&gpio0_default_pins>;
		};
	};
	};
};
};
Loading