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

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

Merge tag 'davinci-for-v3.10/dt-2-v2' of...

Merge tag 'davinci-for-v3.10/dt-2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt2

From Sekhar Nori:
v3.10 DT updates for DaVinci

This set of patches adds support for PWMs and SPI
controller present on DA850 and for SPI flash present on
DA850 EVM.

* tag 'davinci-for-v3.10/dt-2-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci

:
  ARM: davinci: da850-evm: add SPI flash support
  ARM: davinci: da850: override SPI DT node device name
  ARM: davinci: da850: add SPI1 DT node
  spi/davinci: add DT binding documentation
  spi/davinci: no wildcards in DT compatible property
  ARM: davinci: da850: add EHRPWM & ECAP DT node
  ARM: davinci: da850: override mmc DT node device name
  ARM: davinci: da850: add mmc DT entries
  mmc: davinci_mmc: add DT support
  ARM: davinci: da850: add tps6507x regulator DT data
  ARM: regulator: add tps6507x device tree data
  ARM: davinci: remove test for undefined Kconfig macro
  ARM: davinci: mmc: derive version information from device name
  ARM: davinci: da850: add ECAP & EHRPWM clock nodes
  ARM: davinci: clk framework support for enable/disable functionality

Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents db39ad7d 4f4d9d4d
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
* TI Highspeed MMC host controller for DaVinci

The Highspeed MMC Host Controller on TI DaVinci family
provides an interface for MMC, SD and SDIO types of memory cards.

This file documents the properties used by the davinci_mmc driver.

Required properties:
- compatible:
 Should be "ti,da830-mmc": for da830, da850, dm365
 Should be "ti,dm355-mmc": for dm355, dm644x

Optional properties:
- bus-width: Number of data lines, can be <1>, <4>, or <8>, default <1>
- max-frequency: Maximum operating clock frequency, default 25MHz.
- dmas: List of DMA specifiers with the controller specific format
	as described in the generic DMA client binding. A tx and rx
	specifier is required.
- dma-names: RX and TX  DMA request names. These strings correspond
	1:1 with the DMA specifiers listed in dmas.

Example:
mmc0: mmc@1c40000 {
	compatible = "ti,da830-mmc",
	reg = <0x40000 0x1000>;
	interrupts = <16>;
	status = "okay";
	bus-width = <4>;
	max-frequency = <50000000>;
	dmas = <&edma 16
		&edma 17>;
	dma-names = "rx", "tx";
};
+51 −0
Original line number Diff line number Diff line
Davinci SPI controller device bindings

Required properties:
- #address-cells: number of cells required to define a chip select
	address on the SPI bus. Should be set to 1.
- #size-cells: should be zero.
- compatible:
	- "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family
	- "ti,da830-spi" for SPI used similar to that on DA8xx SoC family
- reg: Offset and length of SPI controller register space
- num-cs: Number of chip selects
- ti,davinci-spi-intr-line: interrupt line used to connect the SPI
	IP to the interrupt controller within the SoC. Possible values
	are 0 and 1. Manual says one of the two possible interrupt
	lines can be tied to the interrupt controller. Set this
	based on a specifc SoC configuration.
- interrupts: interrupt number mapped to CPU.
- clocks: spi clk phandle

Example of a NOR flash slave device (n25q032) connected to DaVinci
SPI controller device over the SPI bus.

spi0:spi@20BF0000 {
	#address-cells			= <1>;
	#size-cells			= <0>;
	compatible			= "ti,dm6446-spi";
	reg				= <0x20BF0000 0x1000>;
	num-cs				= <4>;
	ti,davinci-spi-intr-line	= <0>;
	interrupts			= <338>;
	clocks				= <&clkspi>;

	flash: n25q032@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "st,m25p32";
		spi-max-frequency = <25000000>;
		reg = <0>;

		partition@0 {
			label = "u-boot-spl";
			reg = <0x0 0x80000>;
			read-only;
		};

		partition@1 {
			label = "test";
			reg = <0x80000 0x380000>;
		};
	};
};
+110 −0
Original line number Diff line number Diff line
@@ -35,14 +35,124 @@
			clock-frequency = <100000>;
			pinctrl-names = "default";
			pinctrl-0 = <&i2c0_pins>;

			tps: tps@48 {
				reg = <0x48>;
			};
		};
		wdt: wdt@1c21000 {
			status = "okay";
		};
		mmc0: mmc@1c40000 {
			max-frequency = <50000000>;
			bus-width = <4>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&mmc0_pins>;
		};
		spi1: spi@1f0e000 {
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <&spi1_pins &spi1_cs0_pin>;
			flash: m25p80@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "m25p64";
				spi-max-frequency = <30000000>;
				reg = <0>;
				partition@0 {
					label = "U-Boot-SPL";
					reg = <0x00000000 0x00010000>;
					read-only;
				};
				partition@1 {
					label = "U-Boot";
					reg = <0x00010000 0x00080000>;
					read-only;
				};
				partition@2 {
					label = "U-Boot-Env";
					reg = <0x00090000 0x00010000>;
					read-only;
				};
				partition@3 {
					label = "Kernel";
					reg = <0x000a0000 0x00280000>;
				};
				partition@4 {
					label = "Filesystem";
					reg = <0x00320000 0x00400000>;
				};
				partition@5 {
					label = "MAC-Address";
					reg = <0x007f0000 0x00010000>;
					read-only;
				};
			};
		};
	};
	nand_cs3@62000000 {
		status = "okay";
		pinctrl-names = "default";
		pinctrl-0 = <&nand_cs3_pins>;
	};
	vbat: fixedregulator@0 {
		compatible = "regulator-fixed";
		regulator-name = "vbat";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
	};
};

/include/ "tps6507x.dtsi"

&tps {
	vdcdc1_2-supply = <&vbat>;
	vdcdc3-supply = <&vbat>;
	vldo1_2-supply = <&vbat>;

	regulators {
		vdcdc1_reg: regulator@0 {
			regulator-name = "VDCDC1_3.3V";
			regulator-min-microvolt = <3150000>;
			regulator-max-microvolt = <3450000>;
			regulator-always-on;
			regulator-boot-on;
		};

		vdcdc2_reg: regulator@1 {
			regulator-name = "VDCDC2_3.3V";
			regulator-min-microvolt = <1710000>;
			regulator-max-microvolt = <3450000>;
			regulator-always-on;
			regulator-boot-on;
			ti,defdcdc_default = <1>;
		};

		vdcdc3_reg: regulator@2 {
			regulator-name = "VDCDC3_1.2V";
			regulator-min-microvolt = <950000>;
			regulator-max-microvolt = <1350000>;
			regulator-always-on;
			regulator-boot-on;
			ti,defdcdc_default = <1>;
		};

		ldo1_reg: regulator@3 {
			regulator-name = "LDO1_1.8V";
			regulator-min-microvolt = <1710000>;
			regulator-max-microvolt = <1890000>;
			regulator-always-on;
			regulator-boot-on;
		};

		ldo2_reg: regulator@4 {
			regulator-name = "LDO2_1.2V";
			regulator-min-microvolt = <1140000>;
			regulator-max-microvolt = <1320000>;
			regulator-always-on;
			regulator-boot-on;
		};
	};
};
+109 −0
Original line number Diff line number Diff line
@@ -62,6 +62,69 @@
					0x10 0x00002200 0x0000ff00
				>;
			};
			mmc0_pins: pinmux_mmc_pins {
				pinctrl-single,bits = <
					/* MMCSD0_DAT[3] MMCSD0_DAT[2]
					 * MMCSD0_DAT[1] MMCSD0_DAT[0]
					 * MMCSD0_CMD    MMCSD0_CLK
					 */
					0x28 0x00222222  0x00ffffff
				>;
			};
			ehrpwm0a_pins: pinmux_ehrpwm0a_pins {
				pinctrl-single,bits = <
					/* EPWM0A */
					0xc 0x00000002 0x0000000f
				>;
			};
			ehrpwm0b_pins: pinmux_ehrpwm0b_pins {
				pinctrl-single,bits = <
					/* EPWM0B */
					0xc 0x00000020 0x000000f0
				>;
			};
			ehrpwm1a_pins: pinmux_ehrpwm1a_pins {
				pinctrl-single,bits = <
					/* EPWM1A */
					0x14 0x00000002 0x0000000f
				>;
			};
			ehrpwm1b_pins: pinmux_ehrpwm1b_pins {
				pinctrl-single,bits = <
					/* EPWM1B */
					0x14 0x00000020 0x000000f0
				>;
			};
			ecap0_pins: pinmux_ecap0_pins {
				pinctrl-single,bits = <
					/* ECAP0_APWM0 */
					0x8 0x20000000 0xf0000000
				>;
			};
			ecap1_pins: pinmux_ecap1_pins {
				pinctrl-single,bits = <
					/* ECAP1_APWM1 */
					0x4 0x40000000 0xf0000000
				>;
			};
			ecap2_pins: pinmux_ecap2_pins {
				pinctrl-single,bits = <
					/* ECAP2_APWM2 */
					0x4 0x00000004 0x0000000f
				>;
			};
			spi1_pins: pinmux_spi_pins {
				pinctrl-single,bits = <
					/* SIMO, SOMI, CLK */
					0x14 0x00110100 0x00ff0f00
				>;
			};
			spi1_cs0_pin: pinmux_spi1_cs0 {
				pinctrl-single,bits = <
					/* CS0 */
					0x14 0x00000010 0x000000f0
				>;
			};
		};
		serial0: serial@1c42000 {
			compatible = "ns16550a";
@@ -107,6 +170,52 @@
			reg = <0x21000 0x1000>;
			status = "disabled";
		};
		mmc0: mmc@1c40000 {
			compatible = "ti,da830-mmc";
			reg = <0x40000 0x1000>;
			interrupts = <16>;
			status = "disabled";
		};
		ehrpwm0: ehrpwm@01f00000 {
			compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
			#pwm-cells = <3>;
			reg = <0x300000 0x2000>;
			status = "disabled";
		};
		ehrpwm1: ehrpwm@01f02000 {
			compatible = "ti,da850-ehrpwm", "ti,am33xx-ehrpwm";
			#pwm-cells = <3>;
			reg = <0x302000 0x2000>;
			status = "disabled";
		};
		ecap0: ecap@01f06000 {
			compatible = "ti,da850-ecap", "ti,am33xx-ecap";
			#pwm-cells = <3>;
			reg = <0x306000 0x80>;
			status = "disabled";
		};
		ecap1: ecap@01f07000 {
			compatible = "ti,da850-ecap", "ti,am33xx-ecap";
			#pwm-cells = <3>;
			reg = <0x307000 0x80>;
			status = "disabled";
		};
		ecap2: ecap@01f08000 {
			compatible = "ti,da850-ecap", "ti,am33xx-ecap";
			#pwm-cells = <3>;
			reg = <0x308000 0x80>;
			status = "disabled";
		};
		spi1: spi@1f0e000 {
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "ti,da830-spi";
			reg = <0x30e000 0x1000>;
			num-cs = <4>;
			ti,davinci-spi-intr-line = <1>;
			interrupts = <56>;
			status = "disabled";
		};
	};
	nand_cs3@62000000 {
		compatible = "ti,davinci-nand";
+47 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
 *
 * 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.
 */

/*
 * Integrated Power Management Chip
 * http://www.ti.com/lit/ds/symlink/tps65070.pdf
 */

&tps {
	compatible = "ti,tps6507x";

	regulators {
		#address-cells = <1>;
		#size-cells = <0>;

		vdcdc1_reg: regulator@0 {
			reg = <0>;
			regulator-compatible = "VDCDC1";
		};

		vdcdc2_reg: regulator@1 {
			reg = <1>;
			regulator-compatible = "VDCDC2";
		};

		vdcdc3_reg: regulator@2 {
			reg = <2>;
			regulator-compatible = "VDCDC3";
		};

		ldo1_reg: regulator@3 {
			reg = <3>;
			regulator-compatible = "LDO1";
		};

		ldo2_reg: regulator@4 {
			reg = <4>;
			regulator-compatible = "LDO2";
		};

	};
};
Loading