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

Commit ff753f43 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'nomadik-dt-for-arm-soc' of...

Merge tag 'nomadik-dt-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into next/dt

From Linus Walleij:
Device tree patches for the Nomadik machine:
- Move clock registration to the device tree
- Support probing the MTU timer from the device tree
- Register user LED and user key in the device tree
- Update defconfig to account for user LED and user key
- Move pin control mappings to the device tree

* tag 'nomadik-dt-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik

:
  ARM: nomadik: move the pin configuration to DT
  ARM: nomadik: add led and key for S8815
  ARM: nomadik: register clocksource from device tree
  ARM: nomadik: convert all clocks except timer to dt
  clocksource: nomadik-mtu: support of probe

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents e4aa937e 49932f5e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3,6 +3,11 @@ ST-Ericsson Nomadik Device Tree Bindings
For various board the "board" node may contain specific properties
that pertain to this particular board, such as board-specific GPIOs.

Required root node property: src
- Nomadik System and reset controller used for basic chip control, clock
  and reset line control.
- compatible: must be "stericsson,nomadik,src"

Boards with the Nomadik SoC include:

S8815 "MiniKit" manufactured by Calao Systems:
+63 −0
Original line number Diff line number Diff line
@@ -22,6 +22,43 @@
		};
	};

	pinctrl {
		/* Hog CD pins */
		pinctrl-names = "default";
		pinctrl-0 = <&cd_default_mode>;

		mmcsd-cd {
			cd_default_mode: cd_default {
				cd_default_cfg1 {
					/* CD input GPIO */
					ste,pins = "GPIO111_H21";
					ste,input = <0>;
				};
				cd_default_cfg2 {
					/* CD GPIO biasing */
					ste,pins = "GPIO112_J21";
					ste,output = <0>;
				};
			};
		};
		user-led {
			user_led_default_mode: user_led_default {
				user_led_default_cfg {
					ste,pins = "GPIO2_C5";
					ste,output = <1>;
				};
			};
		};
		user-button {
			user_button_default_mode: user_button_default {
				user_button_default_cfg {
					ste,pins = "GPIO3_A4";
					ste,input = <0>;
				};
			};
		};
	};

	/* Custom board node with GPIO pins to active etc */
	usb-s8815 {
		/* The S8815 is using this very GPIO pin for the SMSC91x IRQs */
@@ -33,4 +70,30 @@
			gpios = <&gpio3 16 0x1>;
		};
	};

	/* The user LED on the board is set up to be used for heartbeat */
	leds {
		compatible = "gpio-leds";
		user-led {
			label = "user_led";
			gpios = <&gpio0 2 0x1>;
			default-state = "off";
			linux,default-trigger = "heartbeat";
			pinctrl-names = "default";
			pinctrl-0 = <&user_led_default_mode>;
		};
	};

	/* User key mapped in as "escape" */
	gpio-keys {
		compatible = "gpio-keys";
		user-button {
			label = "user_button";
			gpios = <&gpio0 3 0x1>;
			linux,code = <1>; /* KEY_ESC */
			gpio-key,wakeup;
			pinctrl-names = "default";
			pinctrl-0 = <&user_button_default_mode>;
		};
	};
};
+143 −2
Original line number Diff line number Diff line
@@ -21,18 +21,23 @@
		cache-level = <2>;
	};

	mtu0 {
	mtu0: mtu@101e2000 {
		/* Nomadik system timer */
		compatible = "st,nomadik-mtu";
		reg = <0x101e2000 0x1000>;
		interrupt-parent = <&vica>;
		interrupts = <4>;
		clocks = <&timclk>, <&pclk>;
		clock-names = "timclk", "apb_pclk";
	};

	mtu1 {
	mtu1: mtu@101e3000 {
		/* Secondary timer */
		reg = <0x101e3000 0x1000>;
		interrupt-parent = <&vica>;
		interrupts = <5>;
		clocks = <&timclk>, <&pclk>;
		clock-names = "timclk", "apb_pclk";
	};

	gpio0: gpio@101e4000 {
@@ -45,6 +50,7 @@
		gpio-controller;
		#gpio-cells = <2>;
		gpio-bank = <0>;
		clocks = <&pclk>;
	};

	gpio1: gpio@101e5000 {
@@ -57,6 +63,7 @@
		gpio-controller;
		#gpio-cells = <2>;
		gpio-bank = <1>;
		clocks = <&pclk>;
	};

	gpio2: gpio@101e6000 {
@@ -69,6 +76,7 @@
		gpio-controller;
		#gpio-cells = <2>;
		gpio-bank = <2>;
		clocks = <&pclk>;
	};

	gpio3: gpio@101e7000 {
@@ -81,10 +89,117 @@
		gpio-controller;
		#gpio-cells = <2>;
		gpio-bank = <3>;
		clocks = <&pclk>;
	};

	pinctrl {
		compatible = "stericsson,nmk-pinctrl-stn8815";
		/* Pin configurations */
		uart0 {
			uart0_default_mux: uart0_mux {
				u0_default_mux {
					ste,function = "u0";
					ste,pins = "u0_a_1";
				};
			};
		};
		uart1 {
			uart1_default_mux: uart1_mux {
				u1_default_mux {
					ste,function = "u1";
					ste,pins = "u1_a_1";
				};
			};
		};
		mmcsd {
			mmcsd_default_mux: mmcsd_mux {
				mmcsd_default_mux {
					ste,function = "mmcsd";
					ste,pins = "mmcsd_a_1";
				};
			};
			mmcsd_default_mode: mmcsd_default {
				mmcsd_default_cfg1 {
					/* MCCLK */
					ste,pins = "GPIO8_B10";
					ste,output = <0>;
				};
				mmcsd_default_cfg2 {
					/* MCCMDDIR, MCDAT0DIR, MCDAT31DIR */
					ste,pins = "GPIO10_C11", "GPIO15_A12",
					"GPIO16_C13";
					ste,output = <1>;
				};
				mmcsd_default_cfg3 {
					/* MCCMD, MCDAT3-0, MCMSFBCLK */
					ste,pins = "GPIO9_A10", "GPIO11_B11",
					"GPIO12_A11", "GPIO13_C12",
					"GPIO14_B12", "GPIO24_C15";
					ste,input = <1>;
				};
			};
		};
		i2c0 {
			i2c0_default_mode: i2c0_default {
				i2c0_default_cfg {
					ste,pins = "GPIO62_D3", "GPIO63_D2";
					ste,input = <1>;
				};
			};
		};
		i2c1 {
			i2c1_default_mode: i2c1_default {
				i2c1_default_cfg {
					ste,pins = "GPIO53_L4", "GPIO54_L3";
					ste,input = <1>;
				};
			};
		};
		i2c2 {
			i2c2_default_mode: i2c2_default {
				i2c2_default_cfg {
					ste,pins = "GPIO73_C21", "GPIO74_C20";
					ste,input = <1>;
				};
			};
		};
	};

	src: src@101e0000 {
		compatible = "stericsson,nomadik-src";
		reg = <0x101e0000 0x1000>;
		clocks {
			/*
			 * Dummy clock for primecells
			 */
			pclk: pclk@0 {
				#clock-cells = <0>;
				compatible = "fixed-clock";
				clock-frequency = <0>;
			};
			/*
			 * The 2.4 MHz TIMCLK reference clock is active at
			 * boot time, this is actually the MXTALCLK @19.2 MHz
			 * divided by 8. This clock is used by the timers and
			 * watchdog. See page 105 ff.
			 */
			timclk: timclk@2.4M {
				#clock-cells = <0>;
				compatible = "fixed-clock";
				clock-frequency = <2400000>;
			};
			/*
			 * At boot time, PLL2 is set to generate a set of
			 * fixed clocks, one of them is CLK48, the 48 MHz
			 * clock, routed to the UART, MMC/SD, I2C, IrDA,
			 * USB and SSP blocks.
			 */
			clk48: clk48@48M {
				#clock-cells = <0>;
				compatible = "fixed-clock";
				clock-frequency = <48000000>;
			};
		};
	};

	/* A NAND flash of 128 MiB */
@@ -97,6 +212,7 @@
			<0x41000000 0x2000>,	/* NAND Base ADDR */
			<0x40800000 0x2000>;	/* NAND Base CMD */
		reg-names = "fsmc_regs", "nand_data", "nand_addr", "nand_cmd";
		clocks = <&pclk>;
		status = "okay";

		partition@0 {
@@ -144,6 +260,8 @@
			<&gpio1 30 0>; /* scl */
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&i2c0_default_mode>;

		stw4811@2d {
			   compatible = "st,stw4811";
@@ -158,6 +276,8 @@
			<&gpio1 21 0>; /* scl */
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&i2c1_default_mode>;

		camera@2d {
			   compatible = "st,camera";
@@ -180,6 +300,9 @@
			<&gpio2 9 0>; /* scl */
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-names = "default";
		pinctrl-0 = <&i2c2_default_mode>;

		stw4811@2d {
			   compatible = "st,stw4811-usb";
			   reg = <0x2d>;
@@ -211,6 +334,10 @@
			reg = <0x101fd000 0x1000>;
			interrupt-parent = <&vica>;
			interrupts = <12>;
			clocks = <&clk48>, <&pclk>;
			clock-names = "uartclk", "apb_pclk";
			pinctrl-names = "default";
			pinctrl-0 = <&uart0_default_mux>;
		};

		uart1: uart@101fb000 {
@@ -218,6 +345,10 @@
			reg = <0x101fb000 0x1000>;
			interrupt-parent = <&vica>;
			interrupts = <17>;
			clocks = <&clk48>, <&pclk>;
			clock-names = "uartclk", "apb_pclk";
			pinctrl-names = "default";
			pinctrl-0 = <&uart1_default_mux>;
		};

		uart2: uart@101f2000 {
@@ -225,17 +356,23 @@
			reg = <0x101f2000 0x1000>;
			interrupt-parent = <&vica>;
			interrupts = <28>;
			clocks = <&clk48>, <&pclk>;
			clock-names = "uartclk", "apb_pclk";
			status = "disabled";
		};

		rng: rng@101b0000 {
			compatible = "arm,primecell";
			reg = <0x101b0000 0x1000>;
			clocks = <&clk48>, <&pclk>;
			clock-names = "rng", "apb_pclk";
		};

		rtc: rtc@101e8000 {
			compatible = "arm,pl031", "arm,primecell";
			reg = <0x101e8000 0x1000>;
			clocks = <&pclk>;
			clock-names = "apb_pclk";
			interrupt-parent = <&vica>;
			interrupts = <10>;
		};
@@ -243,6 +380,8 @@
		mmcsd: sdi@101f6000 {
			compatible = "arm,pl18x", "arm,primecell";
			reg = <0x101f6000 0x1000>;
			clocks = <&clk48>, <&pclk>;
			clock-names = "mclk", "apb_pclk";
			interrupt-parent = <&vica>;
			interrupts = <22>;
			max-frequency = <48000000>;
@@ -251,6 +390,8 @@
			mmc-cap-sd-highspeed;
			cd-gpios = <&gpio3 15 0x1>;
			cd-inverted;
			pinctrl-names = "default";
			pinctrl-0 = <&mmcsd_default_mux>, <&mmcsd_default_mode>;
		};
	};
};
+6 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ CONFIG_PPP_SYNC_TTY=m
# CONFIG_INPUT_MOUSEDEV is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y
# CONFIG_MOUSE_PS2 is not set
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
@@ -96,6 +97,11 @@ CONFIG_DEBUG_GPIO=y
CONFIG_MMC=y
CONFIG_MMC_CLKGATE=y
CONFIG_MMC_ARMMMCI=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PL031=y
CONFIG_DMADEVICES=y
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ config ARCH_NOMADIK
	select ARM_VIC
	select CLKSRC_NOMADIK_MTU
	select CLKSRC_NOMADIK_MTU_SCHED_CLOCK
	select CLKSRC_OF
	select COMMON_CLK
	select CPU_ARM926T
	select GENERIC_CLOCKEVENTS
Loading