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

Commit feb7b8d6 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'next/dt-samsung' of...

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

From Kukjin Kim <kgene.kim@samsung.com>:

It is for supporting spi dt for exynos4210 and exynos5250, and got the
ack from Grant Likely for spi driver.

Note: Since this is including spi driver changes, so it was made based
on next/devel-dma-ops which touches same file, Samsung spi driver for
avoiding bad conflicts.

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

:
  ARM: dts: Add nodes for spi controllers for SAMSUNG EXYNOS5 platforms
  ARM: EXYNOS: Enable platform support for SPI controllers for EXYNOS5
  ARM: EXYNOS: Add spi clock support for EXYNOS5
  ARM: dts: Add nodes for spi controllers for SAMSUNG EXYNOS4 platforms
  ARM: EXYNOS: Enable platform support for SPI controllers for EXYNOX4
  ARM: EXYNOS: Fix the incorrect hierarchy of spi controller bus clock
  ARM: EXYNOS: Add device tree node for EXYNOS4 interrupt combiner controller
  spi: s3c64xx: add device tree support
  spi: s3c64xx: Remove the 'set_level' callback from controller data
  ARM: SAMSUNG: Modify s3c64xx_spi{0|1|2}_set_platdata function
  ARM: SAMSUNG: Remove pdev pointer parameter from spi gpio setup functions
  spi: s3c64xx: move controller information into driver data
  spi: s3c64xx: remove unused S3C64XX_SPI_ST_TRLCNTZ macro
  ARM: S3C64XX: Add a new dma request id for device tree based dma channel lookup

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 6a1d02d8 79989ba3
Loading
Loading
Loading
Loading
+113 −0
Original line number Diff line number Diff line
* Samsung SPI Controller

The Samsung SPI controller is used to interface with various devices such as flash
and display controllers using the SPI communication interface.

Required SoC Specific Properties:

- compatible: should be one of the following.
    - samsung,s3c2443-spi: for s3c2443, s3c2416 and s3c2450 platforms
    - samsung,s3c6410-spi: for s3c6410 platforms
    - samsung,s5p6440-spi: for s5p6440 and s5p6450 platforms
    - samsung,s5pv210-spi: for s5pv210 and s5pc110 platforms
    - samsung,exynos4210-spi: for exynos4 and exynos5 platforms

- reg: physical base address of the controller and length of memory mapped
  region.

- interrupts: The interrupt number to the cpu. The interrupt specifier format
  depends on the interrupt controller.

- tx-dma-channel: The dma channel specifier for tx operations. The format of
  the dma specifier depends on the dma controller.

- rx-dma-channel: The dma channel specifier for rx operations. The format of
  the dma specifier depends on the dma controller.

Required Board Specific Properties:

- #address-cells: should be 1.
- #size-cells: should be 0.
- gpios: The gpio specifier for clock, mosi and miso interface lines (in the
  order specified). The format of the gpio specifier depends on the gpio
  controller.

Optional Board Specific Properties:

- samsung,spi-src-clk: If the spi controller includes a internal clock mux to
  select the clock source for the spi bus clock, this property can be used to
  indicate the clock to be used for driving the spi bus clock. If not specified,
  the clock number 0 is used as default.

- num-cs: Specifies the number of chip select lines supported. If
  not specified, the default number of chip select lines is set to 1.

SPI Controller specific data in SPI slave nodes:

- The spi slave nodes should provide the following information which is required
  by the spi controller.

  - cs-gpio: A gpio specifier that specifies the gpio line used as
    the slave select line by the spi controller. The format of the gpio
    specifier depends on the gpio controller.

  - samsung,spi-feedback-delay: The sampling phase shift to be applied on the
    miso line (to account for any lag in the miso line). The following are the
    valid values.

      - 0: No phase shift.
      - 1: 90 degree phase shift sampling.
      - 2: 180 degree phase shift sampling.
      - 3: 270 degree phase shift sampling.

Aliases:

- All the SPI controller nodes should be represented in the aliases node using
  the following format 'spi{n}' where n is a unique number for the alias.


Example:

- SoC Specific Portion:

	spi_0: spi@12d20000 {
		compatible = "samsung,exynos4210-spi";
		reg = <0x12d20000 0x100>;
		interrupts = <0 66 0>;
		tx-dma-channel = <&pdma0 5>;
		rx-dma-channel = <&pdma0 4>;
	};

- Board Specific Portion:

	spi_0: spi@12d20000 {
		#address-cells = <1>;
		#size-cells = <0>;
		gpios = <&gpa2 4 2 3 0>,
			<&gpa2 6 2 3 0>,
			<&gpa2 7 2 3 0>;

		w25q80bw@0 {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "w25x80";
			reg = <0>;
			spi-max-frequency = <10000>;

			controller-data {
				cs-gpio = <&gpa2 5 1 0 3>;
				samsung,spi-feedback-delay = <0>;
			};

			partition@0 {
				label = "U-Boot";
				reg = <0x0 0x40000>;
				read-only;
			};

			partition@40000 {
				label = "Kernel";
				reg = <0x40000 0xc0000>;
			};
		};
	};
+12 −0
Original line number Diff line number Diff line
@@ -134,4 +134,16 @@
	i2c@138D0000 {
		status = "disabled";
	};

	spi_0: spi@13920000 {
		status = "disabled";
	};

	spi_1: spi@13930000 {
		status = "disabled";
	};

	spi_2: spi@13940000 {
		status = "disabled";
	};
};
+38 −0
Original line number Diff line number Diff line
@@ -179,4 +179,42 @@
	i2c@138D0000 {
		status = "disabled";
	};

	spi_0: spi@13920000 {
		status = "disabled";
	};

	spi_1: spi@13930000 {
		status = "disabled";
	};

	spi_2: spi@13940000 {
		gpios = <&gpc1 1 5 3 0>,
			<&gpc1 3 5 3 0>,
			<&gpc1 4 5 3 0>;

		w25x80@0 {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "w25x80";
			reg = <0>;
			spi-max-frequency = <1000000>;

			controller-data {
				cs-gpio = <&gpc1 2 1 0 3>;
				samsung,spi-feedback-delay = <0>;
			};

			partition@0 {
				label = "U-Boot";
				reg = <0x0 0x40000>;
				read-only;
			};

			partition@40000 {
				label = "Kernel";
				reg = <0x40000 0xc0000>;
			};
		};
	};
};
+47 −0
Original line number Diff line number Diff line
@@ -25,6 +25,12 @@
	compatible = "samsung,exynos4210";
	interrupt-parent = <&gic>;

	aliases {
		spi0 = &spi_0;
		spi1 = &spi_1;
		spi2 = &spi_2;
	};

	gic:interrupt-controller@10490000 {
		compatible = "arm,cortex-a9-gic";
		#interrupt-cells = <3>;
@@ -33,6 +39,17 @@
		reg = <0x10490000 0x1000>, <0x10480000 0x100>;
	};

	combiner:interrupt-controller@10440000 {
		compatible = "samsung,exynos4210-combiner";
		#interrupt-cells = <2>;
		interrupt-controller;
		reg = <0x10440000 0x1000>;
		interrupts = <0 0 0>, <0 1 0>, <0 2 0>, <0 3 0>,
			     <0 4 0>, <0 5 0>, <0 6 0>, <0 7 0>,
			     <0 8 0>, <0 9 0>, <0 10 0>, <0 11 0>,
			     <0 12 0>, <0 13 0>, <0 14 0>, <0 15 0>;
	};

	watchdog@10060000 {
		compatible = "samsung,s3c2410-wdt";
		reg = <0x10060000 0x100>;
@@ -147,6 +164,36 @@
		interrupts = <0 65 0>;
	};

	spi_0: spi@13920000 {
		compatible = "samsung,exynos4210-spi";
		reg = <0x13920000 0x100>;
		interrupts = <0 66 0>;
		tx-dma-channel = <&pdma0 7>;
		rx-dma-channel = <&pdma0 6>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

	spi_1: spi@13930000 {
		compatible = "samsung,exynos4210-spi";
		reg = <0x13930000 0x100>;
		interrupts = <0 67 0>;
		tx-dma-channel = <&pdma1 7>;
		rx-dma-channel = <&pdma1 6>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

	spi_2: spi@13940000 {
		compatible = "samsung,exynos4210-spi";
		reg = <0x13940000 0x100>;
		interrupts = <0 68 0>;
		tx-dma-channel = <&pdma0 9>;
		rx-dma-channel = <&pdma0 8>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

	amba {
		#address-cells = <1>;
		#size-cells = <1>;
+38 −0
Original line number Diff line number Diff line
@@ -71,4 +71,42 @@
	i2c@12CD0000 {
		status = "disabled";
	};

	spi_0: spi@12d20000 {
		status = "disabled";
	};

	spi_1: spi@12d30000 {
		gpios = <&gpa2 4 2 3 0>,
			<&gpa2 6 2 3 0>,
			<&gpa2 7 2 3 0>;

		w25q80bw@0 {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "w25x80";
			reg = <0>;
			spi-max-frequency = <1000000>;

			controller-data {
				cs-gpio = <&gpa2 5 1 0 3>;
				samsung,spi-feedback-delay = <0>;
			};

			partition@0 {
				label = "U-Boot";
				reg = <0x0 0x40000>;
				read-only;
			};

			partition@40000 {
				label = "Kernel";
				reg = <0x40000 0xc0000>;
			};
		};
	};

	spi_2: spi@12d40000 {
		status = "disabled";
	};
};
Loading