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

Commit 28d1079c authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 's3c24xx-clk' of...

Merge tag 's3c24xx-clk' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup

Merge "Samsung S3C24XX updates for 3.16" from Kukjin Kim:

Samsung S3C24XX to use the common clock framework
- S3C2412, S3C2413, S3C2416 and S3C2443 to use CCF
- S3C2410, S3C2440, S3C2442 to use CCF
- Remove legacy samsung clock from mach-s3c24xx/

- Some of them are missed from previous pull-request
- Clock related sutff got ack from Mike and Tomasz
- Created the last commit due to missing changes
  during re-sorting because this branch is provided
  as a base to samsung clk tree.

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

: (23 commits)
  ARM: S3C24XX: fix merge conflict
  ARM: S3C24XX: remove SAMSUNG_CLOCK remnants after ccf conversion
  ARM: S3C24XX: remove legacy clock code
  ARM: S3C24XX: convert s3c2410 to common clock framework
  ARM: S3C24XX: convert s3c2440 and s3c2442 to common clock framework
  ARM: S3C24XX: add platform code for conversion to the common clock framework
  clk: samsung: add clock controller driver for s3c2410, s3c2440 and s3c2442
  dt-bindings: add documentation for s3c2410 clock controller
  ARM: S3C24XX: enable usage of common dclk if common clock framework is enabled
  clk: samsung: add clock driver for external clock outputs
  ARM: S3C24XX: cpufreq-utils: don't write raw values to MPLLCON when using ccf
  ARM: S3C24XX: convert s3c2412 to common clock framework
  clk: samsung: add clock controller driver for s3c2412
  dt-bindings: add documentation for s3c2412 clock controller
  clk: samsung: add plls used by the early s3c24xx cpus
  ARM: S3C24XX: only store clock registers when old clock code is active
  ARM: S3C24XX: Convert s3c2416 and s3c2443 to common clock framework
  ARM: dts: add clock data for s3c2416
  ARM: S3C24XX: prevent conflicts between ccf and non-ccf s3c24xx-socs
  clk: samsung: add clock-driver for s3c2416, s3c2443 and s3c2450
  ...

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 486ad2ed 34c453ce
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
* Samsung S3C2410 Clock Controller

The S3C2410 clock controller generates and supplies clock to various controllers
within the SoC. The clock binding described here is applicable to the s3c2410,
s3c2440 and s3c2442 SoCs in the s3c24x family.

Required Properties:

- compatible: should be one of the following.
  - "samsung,s3c2410-clock" - controller compatible with S3C2410 SoC.
  - "samsung,s3c2440-clock" - controller compatible with S3C2440 SoC.
  - "samsung,s3c2442-clock" - controller compatible with S3C2442 SoC.
- reg: physical base address of the controller and length of memory mapped
  region.
- #clock-cells: should be 1.

Each clock is assigned an identifier and client nodes can use this identifier
to specify the clock which they consume. Some of the clocks are available only
on a particular SoC.

All available clocks are defined as preprocessor macros in
dt-bindings/clock/samsung,s3c2410-clock.h header and can be used in device
tree sources.

External clocks:

The xti clock used as input for the plls is generated outside the SoC. It is
expected that is are defined using standard clock bindings with a
clock-output-names value of "xti".

Example: Clock controller node:

	clocks: clock-controller@4c000000 {
		compatible = "samsung,s3c2410-clock";
		reg = <0x4c000000 0x20>;
		#clock-cells = <1>;
	};

Example: UART controller node that consumes the clock generated by the clock
  controller (refer to the standard clock bindings for information about
  "clocks" and "clock-names" properties):

	serial@50004000 {
		compatible = "samsung,s3c2440-uart";
		reg = <0x50004000 0x4000>;
		interrupts = <1 23 3 4>, <1 23 4 4>;
		clock-names = "uart", "clk_uart_baud2";
		clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>;
		status = "disabled";
	};
+50 −0
Original line number Diff line number Diff line
* Samsung S3C2412 Clock Controller

The S3C2412 clock controller generates and supplies clock to various controllers
within the SoC. The clock binding described here is applicable to the s3c2412
and s3c2413 SoCs in the s3c24x family.

Required Properties:

- compatible: should be "samsung,s3c2412-clock"
- reg: physical base address of the controller and length of memory mapped
  region.
- #clock-cells: should be 1.

Each clock is assigned an identifier and client nodes can use this identifier
to specify the clock which they consume. Some of the clocks are available only
on a particular SoC.

All available clocks are defined as preprocessor macros in
dt-bindings/clock/s3c2412.h header and can be used in device
tree sources.

External clocks:

There are several clocks that are generated outside the SoC. It is expected
that they are defined using standard clock bindings with following
clock-output-names:
 - "xti" - crystal input - required,
 - "ext" - external clock source - optional,

Example: Clock controller node:

	clocks: clock-controller@4c000000 {
		compatible = "samsung,s3c2412-clock";
		reg = <0x4c000000 0x20>;
		#clock-cells = <1>;
	};

Example: UART controller node that consumes the clock generated by the clock
  controller (refer to the standard clock bindings for information about
  "clocks" and "clock-names" properties):

	serial@50004000 {
		compatible = "samsung,s3c2412-uart";
		reg = <0x50004000 0x4000>;
		interrupts = <1 23 3 4>, <1 23 4 4>;
		clock-names = "uart", "clk_uart_baud2", "clk_uart_baud3";
		clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
			 <&clocks SCLK_UART>;
		status = "disabled";
	};
+56 −0
Original line number Diff line number Diff line
* Samsung S3C2443 Clock Controller

The S3C2443 clock controller generates and supplies clock to various controllers
within the SoC. The clock binding described here is applicable to all SoCs in
the s3c24x family starting with the s3c2443.

Required Properties:

- compatible: should be one of the following.
  - "samsung,s3c2416-clock" - controller compatible with S3C2416 SoC.
  - "samsung,s3c2443-clock" - controller compatible with S3C2443 SoC.
  - "samsung,s3c2450-clock" - controller compatible with S3C2450 SoC.
- reg: physical base address of the controller and length of memory mapped
  region.
- #clock-cells: should be 1.

Each clock is assigned an identifier and client nodes can use this identifier
to specify the clock which they consume. Some of the clocks are available only
on a particular SoC.

All available clocks are defined as preprocessor macros in
dt-bindings/clock/s3c2443.h header and can be used in device
tree sources.

External clocks:

There are several clocks that are generated outside the SoC. It is expected
that they are defined using standard clock bindings with following
clock-output-names:
 - "xti" - crystal input - required,
 - "ext" - external clock source - optional,
 - "ext_i2s" - external I2S clock - optional,
 - "ext_uart" - external uart clock - optional,

Example: Clock controller node:

	clocks: clock-controller@4c000000 {
		compatible = "samsung,s3c2416-clock";
		reg = <0x4c000000 0x40>;
		#clock-cells = <1>;
	};

Example: UART controller node that consumes the clock generated by the clock
  controller (refer to the standard clock bindings for information about
  "clocks" and "clock-names" properties):

	serial@50004000 {
		compatible = "samsung,s3c2440-uart";
		reg = <0x50004000 0x4000>;
		interrupts = <1 23 3 4>, <1 23 4 4>;
		clock-names = "uart", "clk_uart_baud2",
				"clk_uart_baud3";
		clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
				<&clocks SCLK_UART>;
		status = "disabled";
	};
+13 −0
Original line number Diff line number Diff line
@@ -19,6 +19,19 @@
		reg =  <0x30000000 0x4000000>;
	};

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

		xti: xti {
			compatible = "fixed-clock";
			clock-frequency = <12000000>;
			clock-output-names = "xti";
			#clock-cells = <0>;
		};
	};

	serial@50000000 {
		status = "okay";
		pinctrl-names = "default";
+42 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
 * published by the Free Software Foundation.
 */

#include <dt-bindings/clock/s3c2443.h>
#include "s3c24xx.dtsi"
#include "s3c2416-pinctrl.dtsi"

@@ -28,26 +29,53 @@
		compatible = "samsung,s3c2416-irq";
	};

	clocks: clock-controller@0x4c000000 {
		compatible = "samsung,s3c2416-clock";
		reg = <0x4c000000 0x40>;
		#clock-cells = <1>;
	};

	pinctrl@56000000 {
		compatible = "samsung,s3c2416-pinctrl";
	};

	timer@51000000 {
		clocks = <&clocks PCLK_PWM>;
		clock-names = "timers";
	};

	serial@50000000 {
		compatible = "samsung,s3c2440-uart";
		clock-names = "uart", "clk_uart_baud2",
				"clk_uart_baud3";
		clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
				<&clocks SCLK_UART>;
	};

	serial@50004000 {
		compatible = "samsung,s3c2440-uart";
		clock-names = "uart", "clk_uart_baud2",
				"clk_uart_baud3";
		clocks = <&clocks PCLK_UART1>, <&clocks PCLK_UART1>,
				<&clocks SCLK_UART>;
	};

	serial@50008000 {
		compatible = "samsung,s3c2440-uart";
		clock-names = "uart", "clk_uart_baud2",
				"clk_uart_baud3";
		clocks = <&clocks PCLK_UART2>, <&clocks PCLK_UART2>,
				<&clocks SCLK_UART>;
	};

	serial@5000C000 {
		compatible = "samsung,s3c2440-uart";
		reg = <0x5000C000 0x4000>;
		interrupts = <1 18 24 4>, <1 18 25 4>;
		clock-names = "uart", "clk_uart_baud2",
				"clk_uart_baud3";
		clocks = <&clocks PCLK_UART3>, <&clocks PCLK_UART3>,
				<&clocks SCLK_UART>;
		status = "disabled";
	};

@@ -55,6 +83,10 @@
		compatible = "samsung,s3c6410-sdhci";
		reg = <0x4AC00000 0x100>;
		interrupts = <0 0 21 3>;
		clock-names = "hsmmc", "mmc_busclk.0",
				"mmc_busclk.2";
		clocks = <&clocks HCLK_HSMMC0>, <&clocks HCLK_HSMMC0>,
				<&clocks MUX_HSMMC0>;
		status = "disabled";
	};

@@ -62,18 +94,28 @@
		compatible = "samsung,s3c6410-sdhci";
		reg = <0x4A800000 0x100>;
		interrupts = <0 0 20 3>;
		clock-names = "hsmmc", "mmc_busclk.0",
				"mmc_busclk.2";
		clocks = <&clocks HCLK_HSMMC1>, <&clocks HCLK_HSMMC1>,
				<&clocks MUX_HSMMC1>;
		status = "disabled";
	};

	watchdog@53000000 {
		interrupts = <1 9 27 3>;
		clocks = <&clocks PCLK_WDT>;
		clock-names = "watchdog";
	};

	rtc@57000000 {
		compatible = "samsung,s3c2416-rtc";
		clocks = <&clocks PCLK_RTC>;
		clock-names = "rtc";
	};

	i2c@54000000 {
		compatible = "samsung,s3c2440-i2c";
		clocks = <&clocks PCLK_I2C0>;
		clock-names = "i2c";
	};
};
Loading