Commit 0ebf7dc4 authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'samsung-dt-s3c64xx' of...

Merge tag 'samsung-dt-s3c64xx' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt

From Kukjin Kim:

Add device tree support for S3C64XX
- add device tree infrastructure for s3c64xx
- add DT SoC file for s3c64xx
- add DT board file for FriendlyARM Mini6410 board
- add DT board file for SAMSUNG SMDK6410

Based on Common Clk Framework for S3C64XX

* tag 'samsung-dt-s3c64xx' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung

:
  ARM: dts: Add dts file for S3C6410-based SMDK6410 board
  ARM: dts: Add dts file for S3C6410-based Mini6410 board
  ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
  ARM: S3C64XX: Add board file for boot using Device Tree
  gpio: samsung: Skip initialization if device tree is present
  ARM: S3C64XX: Bypass legacy initialization when booting with DT
  irqchip: vic: Parse interrupt and resume masks from device tree
  ARM: S3C64XX: Remove old clock management code
  ARM: S3C64XX: Migrate clock handling to Common Clock Framework
  usb: ohci-s3c2410.c: Use clk_prepare_enable/clk_disable_unprepare
  ARM: S3C64XX: Use clk_prepare_enable/clk_disable_unprepare in dma.c
  ARM: SAMSUNG: Add soc_is_s3c6400/s3c6410 macros

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 4a10c2ac 2ec35a42
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -18,6 +18,15 @@ Required properties:
Optional properties:

- interrupts : Interrupt source for parent controllers if the VIC is nested.
- valid-mask : A one cell big bit mask of valid interrupt sources. Each bit
  represents single interrupt source, starting from source 0 at LSb and ending
  at source 31 at MSb. A bit that is set means that the source is wired and
  clear means otherwise. If unspecified, defaults to all valid.
- valid-wakeup-mask : A one cell big bit mask of interrupt sources that can be
  configured as wake up source for the system. Order of bits is the same as for
  valid-mask property. A set bit means that this interrupt source can be
  configured as a wake up source for the system. If unspecied, defaults to all
  interrupt sources configurable as wake up sources.

Example:

@@ -26,4 +35,7 @@ Example:
		interrupt-controller;
		#interrupt-cells = <1>;
		reg = <0x60000 0x1000>;

		valid-mask = <0xffffff7f>;
		valid-wakeup-mask = <0x0000ff7f>;
	};
+1 −1
Original line number Diff line number Diff line
@@ -727,6 +727,7 @@ config ARCH_S3C64XX
	select ARM_VIC
	select CLKDEV_LOOKUP
	select CLKSRC_SAMSUNG_PWM
	select COMMON_CLK
	select CPU_V6
	select GENERIC_CLOCKEVENTS
	select GPIO_SAMSUNG
@@ -740,7 +741,6 @@ config ARCH_S3C64XX
	select S3C_DEV_NAND
	select S3C_GPIO_TRACK
	select SAMSUNG_ATAGS
	select SAMSUNG_CLKSRC
	select SAMSUNG_GPIOLIB_4BIT
	select SAMSUNG_WDT_RESET
	select USB_ARCH_HAS_OHCI
+2 −0
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
	ste-ccu8540.dtb \
	ste-ccu9540.dtb
dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
	s3c6410-smdk6410.dtb
dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
	emev2-kzm9d-reference.dtb \
	r8a7740-armadillo800eva.dtb \
+41 −0
Original line number Diff line number Diff line
/*
 * Samsung's S3C6400 SoC device tree source
 *
 * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
 *
 * Samsung's S3C6400 SoC device nodes are listed in this file. S3C6400
 * based board files can include this file and provide values for board specfic
 * bindings.
 *
 * Note: This file does not include device nodes for all the controllers in
 * S3C6400 SoC. As device tree coverage for S3C6400 increases, additional
 * nodes can be added to this file.
 *
 * 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 "s3c64xx.dtsi"

/ {
	compatible = "samsung,s3c6400";
};

&vic0 {
	valid-mask = <0xfffffe1f>;
	valid-wakeup-mask = <0x00200004>;
};

&vic1 {
	valid-mask = <0xffffffff>;
	valid-wakeup-mask = <0x53020000>;
};

&soc {
	clocks: clock-controller@7e00f000 {
		compatible = "samsung,s3c6400-clock";
		reg = <0x7e00f000 0x1000>;
		#clock-cells = <1>;
	};
};
+228 −0
Original line number Diff line number Diff line
/*
 * Samsung's S3C6410 based Mini6410 board device tree source
 *
 * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
 *
 * Device tree source file for FriendlyARM Mini6410 board which is based on
 * Samsung's S3C6410 SoC.
 *
 * 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.
*/

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

#include "s3c6410.dtsi"

/ {
	model = "FriendlyARM Mini6410 board based on S3C6410";
	compatible = "friendlyarm,mini6410", "samsung,s3c6410";

	memory {
		reg = <0x50000000 0x10000000>;
	};

	chosen {
		bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
	};

	clocks {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		fin_pll: oscillator@0 {
			compatible = "fixed-clock";
			reg = <0>;
			clock-frequency = <12000000>;
			clock-output-names = "fin_pll";
			#clock-cells = <0>;
		};

		xusbxti: oscillator@1 {
			compatible = "fixed-clock";
			reg = <1>;
			clock-output-names = "xusbxti";
			clock-frequency = <48000000>;
			#clock-cells = <0>;
		};
	};

	srom-cs1@18000000 {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x18000000 0x8000000>;
		ranges;

		ethernet@18000000 {
			compatible = "davicom,dm9000";
			reg = <0x18000000 0x2 0x18000004 0x2>;
			interrupt-parent = <&gpn>;
			interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
			davicom,no-eeprom;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&gpio_keys>;
		autorepeat;

		button-k1 {
			label = "K1";
			gpios = <&gpn 0 GPIO_ACTIVE_LOW>;
			linux,code = <2>;
			debounce-interval = <20>;
		};

		button-k2 {
			label = "K2";
			gpios = <&gpn 1 GPIO_ACTIVE_LOW>;
			linux,code = <3>;
			debounce-interval = <20>;
		};

		button-k3 {
			label = "K3";
			gpios = <&gpn 2 GPIO_ACTIVE_LOW>;
			linux,code = <4>;
			debounce-interval = <20>;
		};

		button-k4 {
			label = "K4";
			gpios = <&gpn 3 GPIO_ACTIVE_LOW>;
			linux,code = <5>;
			debounce-interval = <20>;
		};

		button-k5 {
			label = "K5";
			gpios = <&gpn 4 GPIO_ACTIVE_LOW>;
			linux,code = <6>;
			debounce-interval = <20>;
		};

		button-k6 {
			label = "K6";
			gpios = <&gpn 5 GPIO_ACTIVE_LOW>;
			linux,code = <7>;
			debounce-interval = <20>;
		};

		button-k7 {
			label = "K7";
			gpios = <&gpl 11 GPIO_ACTIVE_LOW>;
			linux,code = <8>;
			debounce-interval = <20>;
		};

		button-k8 {
			label = "K8";
			gpios = <&gpl 12 GPIO_ACTIVE_LOW>;
			linux,code = <9>;
			debounce-interval = <20>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&gpio_leds>;

		led-1 {
			label = "LED1";
			gpios = <&gpk 4 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "heartbeat";
		};

		led-2 {
			label = "LED2";
			gpios = <&gpk 5 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "mmc0";
		};

		led-3 {
			label = "LED3";
			gpios = <&gpk 6 GPIO_ACTIVE_LOW>;
		};

		led-4 {
			label = "LED4";
			gpios = <&gpk 7 GPIO_ACTIVE_LOW>;
		};
	};

	buzzer {
		compatible = "pwm-beeper";
		pwms = <&pwm 0 1000000 0>;
		pinctrl-names = "default";
		pinctrl-0 = <&pwm0_out>;
	};
};

&sdhci0 {
	pinctrl-names = "default";
	pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
	bus-width = <4>;
	status = "okay";
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_data>;
	status = "okay";
};

&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_data>, <&uart1_fctl>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart2_data>;
	status = "okay";
};

&uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart3_data>;
	status = "okay";
};

&pwm {
	status = "okay";
};

&pinctrl0 {
	gpio_leds: gpio-leds {
		samsung,pins = "gpk-4", "gpk-5", "gpk-6", "gpk-7";
		samsung,pin-pud = <PIN_PULL_NONE>;
	};

	gpio_keys: gpio-keys {
		samsung,pins = "gpn-0", "gpn-1", "gpn-2", "gpn-3",
				"gpn-4", "gpn-5", "gpl-11", "gpl-12";
		samsung,pin-pud = <PIN_PULL_NONE>;
	};
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_bus>;
	status = "okay";

	eeprom@50 {
		compatible = "atmel,24c08";
		reg = <0x50>;
		pagesize = <16>;
	};
};
Loading