Skip to contentSkip to conversation

ARM: dts: Add camera and magnetometer support for TRATS(2) board

PATCH Superseded Sylwester Nawrocki 3 participants 24 messages Jul 1, 2013 – Jul 24, 2013

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover ARM: dts: Add camera and magnetometer support for TRATS(2) board

This patch series includes some fixes and extensions to the Exynos dts files to add the camera and magnetometer sensor support for the TRATS and TRATS2 board. It depends on a patch from Tomasz adding initial TRATS2 board dts file [1].

Comparing to the previous version of this patch set I've added a few more patches, for the Exynos4210 based TRATS board and a patch adding MIPI CSIS/DSIM PHY provider nodes and related properties to the PHY consumer nodes.

This series has been tested with the S5K6A3/FIMC-IS and S5K5BAFX (front facing) cameras on top of next-20130627 tag. It can be found also at:
http://git.linuxtv.org/snawrocki/samsung.git/next-20130627-dts-trats-v3

Detailed changes since v2 are listed in each patch.

Changes since v1:
- enabled pull down in cam-port-{a, b}-clk-idle nodes (1/8)
- added node alias for i2c-gpio at 0 I2C controller node (7/8).

[1] http://www.spinics.net/lists/arm-kernel/msg253184.html

Andrzej Hajda (2):
ARM: dts: Add Exynos4210 SoC camera port pinctrl nodes
ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Jacek Anaszewski (1):
ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

Sylwester Nawrocki (10):
ARM: dts: Correct camera pinctrl nodes for Exynos4x12 SoCs
ARM: dts: Add pinctrl entries for Exynos4x12 FIMC-IS peripherals
ARM: dts: Add ISP power domain node for Exynos4x12
ARM: dts: Use generic DMA bindings for Exynos4 SPI devices
ARM: dts: Add camera subsystem device nodes to exynos4.dtsi
ARM: dts: Add camera subsystem nodes to exynos4x12.dtsi
ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board
ARM: dts: Add camera device nodes for Exynos4210 SoCs
ARM: dts: Add FIMC nodes for Exynos4210 Trats board
ARM: dts: Add MIPI PHY node to exynos4.dtsi

 arch/arm/boot/dts/exynos4.dtsi            |  102 ++++++++++++++++++++++++--
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi |   23 ++++++
 arch/arm/boot/dts/exynos4210-trats.dts    |  103 ++++++++++++++++++++++-----
 arch/arm/boot/dts/exynos4210.dtsi         |   30 ++++++++
 arch/arm/boot/dts/exynos4412-trats2.dts   |  110 +++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   61 ++++++++++++++--
 arch/arm/boot/dts/exynos4x12.dtsi         |  103 +++++++++++++++++++++++++++
 7 files changed, 503 insertions(+), 29 deletions(-)

--
1.7.9.5

#1 lore raw

PATCH v3 1/13 ARM: dts: Correct camera pinctrl nodes for Exynos4x12 SoCs

Add separate nodes for the CAMCLK pin and turn off pull-up on camera ports A, B. The video bus pins and the clock output (CAMCLK) pin need separate nodes since full camera port is not used in some configurations, e.g. for MIPI CSI-2 bus only CAMCLK is required and data/clock signal use separate dedicated pins.

---
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   40 ++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 7 deletions(-)
arch/arm/boot/dts/exynos4x12-pinctrl.dtsi +33 -7
index 704290f..55ff73b 100644
@@ -401,13 +401,26 @@
 			samsung,pin-drv = <0>;
 		};
 
-		cam_port_a: cam-port-a {
+		cam_port_a_io: cam-port-a-io {
 			samsung,pins = "gpj0-0", "gpj0-1", "gpj0-2", "gpj0-3",
 					"gpj0-4", "gpj0-5", "gpj0-6", "gpj0-7",
-					"gpj1-0", "gpj1-1", "gpj1-2", "gpj1-3",
-					"gpj1-4";
+					"gpj1-0", "gpj1-1", "gpj1-2", "gpj1-4";
 			samsung,pin-function = <2>;
-			samsung,pin-pud = <3>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <0>;
+		};
+
+		cam_port_a_clk_active: cam-port-a-clk-active {
+			samsung,pins = "gpj1-3";
+			samsung,pin-function = <2>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <3>;
+		};
+
+		cam_port_a_clk_idle: cam-port-a-clk-idle {
+			samsung,pins = "gpj1-3";
+			samsung,pin-function = <0>;
+			samsung,pin-pud = <1>;
 			samsung,pin-drv = <0>;
 		};
 	};
@@ -778,16 +791,29 @@
 			samsung,pin-drv = <3>;
 		};
 
-		cam_port_b: cam-port-b {
+		cam_port_b_io: cam-port-b-io {
 			samsung,pins = "gpm0-0", "gpm0-1", "gpm0-2", "gpm0-3",
 					"gpm0-4", "gpm0-5", "gpm0-6", "gpm0-7",
-					"gpm1-0", "gpm1-1", "gpm2-0", "gpm2-1",
-					"gpm2-2";
+					"gpm1-0", "gpm1-1", "gpm2-0", "gpm2-1";
 			samsung,pin-function = <3>;
 			samsung,pin-pud = <3>;
 			samsung,pin-drv = <0>;
 		};
 
+		cam_port_b_clk_active: cam-port-b-clk-active {
+			samsung,pins = "gpm2-2";
+			samsung,pin-function = <3>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <3>;
+		};
+
+		cam_port_b_clk_idle: cam-port-b-clk-idle {
+			samsung,pins = "gpm2-2";
+			samsung,pin-function = <0>;
+			samsung,pin-pud = <1>;
+			samsung,pin-drv = <0>;
+		};
+
 		eint0: ext-int0 {
 			samsung,pins = "gpx0-0";
 			samsung,pin-function = <0xf>;
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v3 2/13 ARM: dts: Add pinctrl entries for Exynos4x12 FIMC-IS peripherals

In reply to Sylwester Nawrocki

Add pinctrl nodes for the ISP I2C0, ISP I2C1 and ISP UART devices.

---
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/boot/dts/exynos4x12-pinctrl.dtsi +21 -0
index 55ff73b..99b26df 100644
@@ -848,6 +848,27 @@
 			samsung,pin-pud = <0>;
 			samsung,pin-drv = <0>;
 		};
+
+		fimc_is_i2c0: fimc-is-i2c0 {
+			samsung,pins = "gpm4-0", "gpm4-1";
+			samsung,pin-function = <2>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <0>;
+		};
+
+		fimc_is_i2c1: fimc-is-i2c1 {
+			samsung,pins = "gpm4-2", "gpm4-3";
+			samsung,pin-function = <2>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <0>;
+		};
+
+		fimc_is_uart: fimc-is-uart {
+			samsung,pins = "gpm3-5", "gpm3-7";
+			samsung,pin-function = <3>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <0>;
+		};
 	};
 
 	pinctrl at 03860000 {
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v3 3/13 ARM: dts: Add ISP power domain node for Exynos4x12

In reply to Sylwester Nawrocki

The ISP power domain is a common power domain for FIMC-LITE and FIMC-IS (camera ISP) devices.

---
 arch/arm/boot/dts/exynos4x12.dtsi |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4x12.dtsi +5 -0
index 01da194..0e24d85 100644
@@ -28,6 +28,11 @@
 		pinctrl3 = &pinctrl_3;
 	};
 
+	pd_isp: isp-power-domain at 10023CA0 {
+		compatible = "samsung,exynos4210-pd";
+		reg = <0x10023CA0 0x20>;
+	};
+
 	clock: clock-controller at 0x10030000 {
 		compatible = "samsung,exynos4412-clock";
 		reg = <0x10030000 0x20000>;
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v3 4/13 ARM: dts: Use generic DMA bindings for Exynos4 SPI devices

In reply to Sylwester Nawrocki

The Exynos4 SPI controller has migrated to the generic DMA bindings since commit b5be04d35dbb2e00
"spi: s3c64xx: Modify SPI driver to use generic DMA DT support". Use the generic bindings to specify the corresponding DMA to make the SPI usable again on Exynos4x12 SoCs.

---
Changes since v2:
- edited commit description.

---
 arch/arm/boot/dts/exynos4.dtsi |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/exynos4.dtsi +6 -6
index 3f94fe8..bce2254 100644
@@ -297,8 +297,8 @@
 		compatible = "samsung,exynos4210-spi";
 		reg = <0x13920000 0x100>;
 		interrupts = <0 66 0>;
-		tx-dma-channel = <&pdma0 7>; /* preliminary */
-		rx-dma-channel = <&pdma0 6>; /* preliminary */
+		dmas = <&pdma0 7>, <&pdma0 6>;
+		dma-names = "tx", "rx";
 		#address-cells = <1>;
 		#size-cells = <0>;
 		clocks = <&clock 327>, <&clock 159>;
@@ -312,8 +312,8 @@
 		compatible = "samsung,exynos4210-spi";
 		reg = <0x13930000 0x100>;
 		interrupts = <0 67 0>;
-		tx-dma-channel = <&pdma1 7>; /* preliminary */
-		rx-dma-channel = <&pdma1 6>; /* preliminary */
+		dmas = <&pdma1 7>, <&pdma1 6>;
+		dma-names = "tx", "rx";
 		#address-cells = <1>;
 		#size-cells = <0>;
 		clocks = <&clock 328>, <&clock 160>;
@@ -327,8 +327,8 @@
 		compatible = "samsung,exynos4210-spi";
 		reg = <0x13940000 0x100>;
 		interrupts = <0 68 0>;
-		tx-dma-channel = <&pdma0 9>; /* preliminary */
-		rx-dma-channel = <&pdma0 8>; /* preliminary */
+		dmas = <&pdma0 9>, <&pdma0 8>;
+		dma-names = "tx", "rx";
 		#address-cells = <1>;
 		#size-cells = <0>;
 		clocks = <&clock 329>, <&clock 161>;
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v3 5/13 ARM: dts: Add camera subsystem device nodes to exynos4.dtsi

In reply to Sylwester Nawrocki

This patch adds the FIMC and MIPI CSIS device nodes common to the Exynos4 SoC series.

---
Changes since v2:
- added fimc/csis clock properties common for exynos4210 and exynos4x12

---
 arch/arm/boot/dts/exynos4.dtsi |   80 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +80 -0
index bce2254..752624f 100644
@@ -36,6 +36,12 @@
 		i2c5 = &i2c_5;
 		i2c6 = &i2c_6;
 		i2c7 = &i2c_7;
+		csis0 = &csis_0;
+		csis1 = &csis_1;
+		fimc0 = &fimc_0;
+		fimc1 = &fimc_1;
+		fimc2 = &fimc_2;
+		fimc3 = &fimc_3;
 	};
 
 	chipid at 10000000 {
@@ -92,6 +98,80 @@
 		reg = <0x10010000 0x400>;
 	};
 
+	camera {
+		compatible = "samsung,fimc", "simple-bus";
+		status = "disabled";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		fimc_0: fimc at 11800000 {
+			compatible = "samsung,exynos4210-fimc";
+			reg = <0x11800000 0x1000>;
+			interrupts = <0 84 0>;
+			clocks = <&clock 256>, <&clock 128>;
+			clock-names = "fimc", "sclk_fimc";
+			samsung,power-domain = <&pd_cam>;
+			samsung,sysreg = <&sys_reg>;
+			status = "disabled";
+		};
+
+		fimc_1: fimc at 11810000 {
+			compatible = "samsung,exynos4210-fimc";
+			reg = <0x11810000 0x1000>;
+			interrupts = <0 85 0>;
+			clocks = <&clock 257>, <&clock 129>;
+			clock-names = "fimc", "sclk_fimc";
+			samsung,power-domain = <&pd_cam>;
+			samsung,sysreg = <&sys_reg>;
+			status = "disabled";
+		};
+
+		fimc_2: fimc at 11820000 {
+			compatible = "samsung,exynos4210-fimc";
+			reg = <0x11820000 0x1000>;
+			interrupts = <0 86 0>;
+			clocks = <&clock 258>, <&clock 130>;
+			clock-names = "fimc", "sclk_fimc";
+			samsung,power-domain = <&pd_cam>;
+			samsung,sysreg = <&sys_reg>;
+			status = "disabled";
+		};
+
+		fimc_3: fimc at 11830000 {
+			compatible = "samsung,exynos4210-fimc";
+			reg = <0x11830000 0x1000>;
+			interrupts = <0 87 0>;
+			clocks = <&clock 259>, <&clock 131>;
+			clock-names = "fimc", "sclk_fimc";
+			samsung,power-domain = <&pd_cam>;
+			samsung,sysreg = <&sys_reg>;
+			status = "disabled";
+		};
+
+		csis_0: csis at 11880000 {
+			compatible = "samsung,exynos4210-csis";
+			reg = <0x11880000 0x4000>;
+			interrupts = <0 78 0>;
+			clocks = <&clock 260>, <&clock 134>;
+			clock-names = "csis", "sclk_csis";
+			bus-width = <4>;
+			samsung,power-domain = <&pd_cam>;
+			status = "disabled";
+		};
+
+		csis_1: csis at 11890000 {
+			compatible = "samsung,exynos4210-csis";
+			reg = <0x11890000 0x4000>;
+			interrupts = <0 80 0>;
+			clocks = <&clock 261>, <&clock 135>;
+			clock-names = "csis", "sclk_csis";
+			bus-width = <2>;
+			samsung,power-domain = <&pd_cam>;
+			status = "disabled";
+		};
+	};
+
 	watchdog at 10060000 {
 		compatible = "samsung,s3c2410-wdt";
 		reg = <0x10060000 0x100>;

--
1.7.9.5

#6 lore raw

PATCH v3 6/13 ARM: dts: Add camera subsystem nodes to exynos4x12.dtsi

In reply to Sylwester Nawrocki

Add common camera node and Exynos4212/4412 specific nodes for FIMC, MIPI-CSIS, FIMC-LITE and FIMC-IS devices.

---
Changes since v2:
- fixed typo in exynos4x12 i2c_isp node reg property,
- removed the clock properties which are now moved to exynos4.dtsi, "mux" and "parent" clock entries are dropped.

---
 arch/arm/boot/dts/exynos4x12.dtsi |   98 +++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
arch/arm/boot/dts/exynos4x12.dtsi +98 -0
index 0e24d85..954628c 100644
@@ -26,6 +26,8 @@
 		pinctrl1 = &pinctrl_1;
 		pinctrl2 = &pinctrl_2;
 		pinctrl3 = &pinctrl_3;
+		fimc-lite0 = &fimc_lite_0;
+		fimc-lite1 = &fimc_lite_1;
 	};
 
 	pd_isp: isp-power-domain at 10023CA0 {
@@ -78,4 +80,100 @@
 		clock-names = "sclk_fimg2d", "fimg2d";
 		status = "disabled";
 	};
+
+	camera {
+		clocks = <&clock 132>, <&clock 133>, <&clock 351>, <&clock 352>;
+		clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
+
+		fimc_0: fimc at 11800000 {
+			compatible = "samsung,exynos4212-fimc";
+			samsung,pix-limits = <4224 8192 1920 4224>;
+			samsung,mainscaler-ext;
+			samsung,isp-wb;
+			samsung,cam-if;
+		};
+
+		fimc_1: fimc at 11810000 {
+			compatible = "samsung,exynos4212-fimc";
+			samsung,pix-limits = <4224 8192 1920 4224>;
+			samsung,mainscaler-ext;
+			samsung,isp-wb;
+			samsung,cam-if;
+		};
+
+		fimc_2: fimc at 11820000 {
+			compatible = "samsung,exynos4212-fimc";
+			samsung,pix-limits = <4224 8192 1920 4224>;
+			samsung,mainscaler-ext;
+			samsung,isp-wb;
+			samsung,lcd-wb;
+			samsung,cam-if;
+		};
+
+		fimc_3: fimc at 11830000 {
+			compatible = "samsung,exynos4212-fimc";
+			samsung,pix-limits = <1920 8192 1366 1920>;
+			samsung,rotators = <0>;
+			samsung,mainscaler-ext;
+			samsung,isp-wb;
+			samsung,lcd-wb;
+		};
+
+		fimc_lite_0: fimc-lite at 12390000 {
+			compatible = "samsung,exynos4212-fimc-lite";
+			reg = <0x12390000 0x1000>;
+			interrupts = <0 105 0>;
+			samsung,power-domain = <&pd_isp>;
+			clocks = <&clock 353>;
+			clock-names = "flite";
+			status = "disabled";
+		};
+
+		fimc_lite_1: fimc-lite at 123A0000 {
+			compatible = "samsung,exynos4212-fimc-lite";
+			reg = <0x123A0000 0x1000>;
+			interrupts = <0 106 0>;
+			samsung,power-domain = <&pd_isp>;
+			clocks = <&clock 354>;
+			clock-names = "flite";
+			status = "disabled";
+		};
+
+		fimc_is: fimc-is at 12000000 {
+			compatible = "samsung,exynos4212-fimc-is", "simple-bus";
+			reg = <0x12000000 0x260000>;
+			interrupts = <0 90 0>, <0 95 0>;
+			samsung,power-domain = <&pd_isp>;
+			clocks = <&clock 353>, <&clock 354>, <&clock 355>,
+				<&clock 356>, <&clock 17>, <&clock 357>,
+				<&clock 358>, <&clock 359>, <&clock 360>,
+				<&clock 450>,<&clock 451>, <&clock 452>,
+				<&clock 453>, <&clock 176>, <&clock 13>,
+				<&clock 454>, <&clock 395>, <&clock 455>;
+			clock-names = "lite0", "lite1", "ppmuispx",
+				      "ppmuispmx", "mpll", "isp",
+				      "drc", "fd", "mcuisp",
+				      "ispdiv0", "ispdiv1", "mcuispdiv0",
+				      "mcuispdiv1", "uart", "aclk200",
+				      "div_aclk200", "aclk400mcuisp",
+				      "div_aclk400mcuisp";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			status = "disabled";
+
+			pmu {
+				reg = <0x10020000 0x3000>;
+			};
+
+			i2c1_isp: i2c-isp at 12140000 {
+				compatible = "samsung,exynos4212-i2c-isp";
+				reg = <0x12140000 0x100>;
+				clocks = <&clock 370>;
+				clock-names = "i2c_isp";
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
+	};
 };
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH v3 7/13 ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

In reply to Sylwester Nawrocki

From: Jacek Anaszewski <[email protected]>

This patch adds AK8975 magnetometer node and corresponding i2c-gpio bus node for TRATS2 board.

---
 arch/arm/boot/dts/exynos4412-trats2.dts |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm/boot/dts/exynos4412-trats2.dts +19 -0
index 056b835..b9de3b5 100644
@@ -19,6 +19,10 @@
 	model = "Samsung Trats 2 based on Exynos4412";
 	compatible = "samsung,trats2", "samsung,exynos4412";
 
+	aliases {
+		i2c8 = &i2c_ak8975;
+	};
+
 	memory {
 		reg =  <0x40000000 0x40000000>;
 	};
@@ -453,4 +457,19 @@
 	serial at 13830000 {
 		status = "okay";
 	};
+
+	i2c_ak8975: i2c-gpio at 0 {
+		compatible = "i2c-gpio";
+		gpios = <&gpy2 4 0>, <&gpy2 5 0>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "okay";
+
+		ak8975 at 0c {
+			compatible = "asahi-kasei,ak8975";
+			reg = <0x0c>;
+			gpios = <&gpj0 7 0>;
+		};
+	};
 };
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH v3 7/13 ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

Hi Sylwester, Jacek,

Quoted 28 lines · On Monday 01 of July 2013 17:22:29 Sylwester Nawrocki wrote:

From: Jacek Anaszewski <[email protected]>

This patch adds AK8975 magnetometer node and corresponding i2c-gpio bus node for TRATS2 board.

---
 arch/arm/boot/dts/exynos4412-trats2.dts |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4412-trats2.dts index 056b835..b9de3b5 100644

arch/arm/boot/dts/exynos4412-trats2.dts +4 -0
@@ -19,6 +19,10 @@
 	model = "Samsung Trats 2 based on Exynos4412";
 	compatible = "samsung,trats2", "samsung,exynos4412";
 
+	aliases {
+		i2c8 = &i2c_ak8975;
+	};
+
 	memory {
 		reg =  <0x40000000 0x40000000>;
 	};

arch/arm/boot/dts/exynos4412-trats2.dts line 461

Quoted 5 lines
arch/arm/boot/dts/exynos4412-trats2.dts +2 -0
@@ -453,4 +457,19 @@
 	serial at 13830000 {
 		status = "okay";
 	};
+
+	i2c_ak8975: i2c-gpio at 0 {

I think this @0 is slightly incorrect here, as it seems like there is no reg property present inside the node and so the device isn't located at any address.

For logical indices like in this case I would rather use i2c-gpio-0 instead.

Quoted 4 lines
arch/arm/boot/dts/exynos4412-trats2.dts +4 -0
+		compatible = "i2c-gpio";
+		gpios = <&gpy2 4 0>, <&gpy2 5 0>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;

arch/arm/boot/dts/exynos4412-trats2.dts line 475

Quoted 10 lines
arch/arm/boot/dts/exynos4412-trats2.dts +9 -0
+		#size-cells = <0>;
+		status = "okay";
+
+		ak8975 at 0c {
+			compatible = "asahi-kasei,ak8975";
+			reg = <0x0c>;
+			gpios = <&gpj0 7 0>;
+		};
+	};
 };

Otherwise looks good.

Best regards,
Tomasz

#9 lore raw

PATCH v3 7/13 ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

Hi Tomasz,

Quoted 39 lines · Tomasz Figa
Quoted 28 lines · On Monday 01 of July 2013 17:22:29 Sylwester Nawrocki wrote:

From: Jacek Anaszewski <[email protected]>

This patch adds AK8975 magnetometer node and corresponding i2c-gpio bus node for TRATS2 board.

---
 arch/arm/boot/dts/exynos4412-trats2.dts |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4412-trats2.dts index 056b835..b9de3b5 100644

arch/arm/boot/dts/exynos4412-trats2.dts +4 -0
@@ -19,6 +19,10 @@
 	model = "Samsung Trats 2 based on Exynos4412";
 	compatible = "samsung,trats2", "samsung,exynos4412";
 
+	aliases {
+		i2c8 = &i2c_ak8975;
+	};
+
 	memory {
 		reg =  <0x40000000 0x40000000>;
 	};

arch/arm/boot/dts/exynos4412-trats2.dts line 461

Quoted 5 lines
arch/arm/boot/dts/exynos4412-trats2.dts +2 -0
@@ -453,4 +457,19 @@
 	serial at 13830000 {
 		status = "okay";
 	};
+
+	i2c_ak8975: i2c-gpio at 0 {

I think this @0 is slightly incorrect here, as it seems like there is no reg property present inside the node and so the device isn't located at any address.

Quoted 2 lines

For logical indices like in this case I would rather use i2c-gpio-0 instead.

Indeed, using "-<N>" postfix sounds like a better alternative. I'll change it and repost the series after 3.11-rc1 is released.

Quoted 17 lines
Quoted 4 lines
arch/arm/boot/dts/exynos4412-trats2.dts +4 -0
+		compatible = "i2c-gpio";
+		gpios = <&gpy2 4 0>, <&gpy2 5 0>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;

arch/arm/boot/dts/exynos4412-trats2.dts line 475

Quoted 10 lines
arch/arm/boot/dts/exynos4412-trats2.dts +9 -0
+		#size-cells = <0>;
+		status = "okay";
+
+		ak8975 at 0c {
+			compatible = "asahi-kasei,ak8975";
+			reg = <0x0c>;
+			gpios = <&gpj0 7 0>;
+		};
+	};
 };

Otherwise looks good.

Quoted 1 line

--
Thanks,
Sylwester

#10 lore raw

PATCH v3 8/13 ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board

In reply to Sylwester Nawrocki

This patch enables the front camera using the internal camera ISP (FIMC-IS).

---
 arch/arm/boot/dts/exynos4412-trats2.dts |   91 +++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
arch/arm/boot/dts/exynos4412-trats2.dts +91 -0
index b9de3b5..e9fb3de 100644
@@ -62,6 +62,15 @@
 			enable-active-high;
 		};
 
+		cam_io_reg: voltage-regulator at 3 {
+			compatible = "regulator-fixed";
+			regulator-name = "CAM_SENSOR_A";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpm0 2 0>;
+			enable-active-high;
+		};
+
 		/* More to come */
 	};
 
@@ -472,4 +481,86 @@
 			gpios = <&gpj0 7 0>;
 		};
 	};
+
+	camera {
+		pinctrl-names = "default";
+		pinctrl-0 = <&cam_port_b_clk_active>;
+		status = "okay";
+
+		fimc_0: fimc at 11800000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_1: fimc at 11810000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_2: fimc at 11820000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_3: fimc at 11830000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		csis_1: csis at 11890000 {
+			vddcore-supply = <&ldo8_reg>;
+			vddio-supply = <&ldo10_reg>;
+			clock-frequency = <160000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			/* Camera D (4) MIPI CSI-2 (CSIS1) */
+			port at 4 {
+				reg = <4>;
+				csis1_ep: endpoint {
+					remote-endpoint = <&is_s5k6a3_ep>;
+					data-lanes = <1>;
+					samsung,csis-hs-settle = <18>;
+					samsung,csis-wclk;
+				};
+			};
+		};
+
+		fimc_lite_0: fimc-lite at 12390000 {
+			status = "okay";
+		};
+
+		fimc_lite_1: fimc-lite at 123A0000 {
+			status = "okay";
+		};
+
+		fimc-is at 12000000 {
+			pinctrl-0 = <&fimc_is_uart>;
+			pinctrl-names = "default";
+			status = "okay";
+
+			i2c1_isp: i2c-isp at 12140000 {
+				pinctrl-0 = <&fimc_is_i2c1>;
+				pinctrl-names = "default";
+
+				s5k6a3 at 10 {
+					compatible = "samsung,s5k6a3";
+					reg = <0x10>;
+					svdda-supply = <&cam_io_reg>;
+					svddio-supply = <&ldo19_reg>;
+					clock-frequency = <24000000>;
+					samsung,camclk-out = <1>;
+					gpios = <&gpm1 6 0>;
+
+					port {
+						is_s5k6a3_ep: endpoint {
+							remote-endpoint = <&csis1_ep>;
+							data-lanes = <1>;
+						};
+					};
+				};
+			};
+		};
+	};
 };
Signature · 1 line
1.7.9.5
#11 lore raw

PATCH v3 8/13 ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board

Hi Sylwester,

Quoted 14 lines · On Monday 01 of July 2013 17:22:30 Sylwester Nawrocki wrote:

This patch enables the front camera using the internal camera ISP (FIMC-IS).

---
 arch/arm/boot/dts/exynos4412-trats2.dts |   91

+++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+)

(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4412-trats2.dts index b9de3b5..e9fb3de 100644

arch/arm/boot/dts/exynos4412-trats2.dts line 65

Quoted 4 lines
arch/arm/boot/dts/exynos4412-trats2.dts +1 -0
@@ -62,6 +62,15 @@
 			enable-active-high;
 		};
 
+		cam_io_reg: voltage-regulator at 3 {

Same comment here as for patch 7/13. This is not an address of this regulator, so I would rather use -3 prefix.

Quoted 37 lines
arch/arm/boot/dts/exynos4412-trats2.dts +30 -0
+			compatible = "regulator-fixed";
+			regulator-name = "CAM_SENSOR_A";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpm0 2 0>;
+			enable-active-high;
+		};
+
 		/* More to come */
 	};
 
@@ -472,4 +481,86 @@
 			gpios = <&gpj0 7 0>;
 		};
 	};
+
+	camera {
+		pinctrl-names = "default";
+		pinctrl-0 = <&cam_port_b_clk_active>;
+		status = "okay";
+
+		fimc_0: fimc at 11800000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_1: fimc at 11810000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_2: fimc at 11820000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_3: fimc at 11830000 {

arch/arm/boot/dts/exynos4412-trats2.dts line 515

Quoted 10 lines
arch/arm/boot/dts/exynos4412-trats2.dts +10 -0
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		csis_1: csis at 11890000 {
+			vddcore-supply = <&ldo8_reg>;
+			vddio-supply = <&ldo10_reg>;
+			clock-frequency = <160000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;

Hmm. Couldn't the two #properties above be moved to exynos4.dtsi instead?

Otherwise looks good.

Best regards,
Tomasz

Quoted 33 lines
arch/arm/boot/dts/exynos4412-trats2.dts +33 -0
+			status = "okay";
+
+			/* Camera D (4) MIPI CSI-2 (CSIS1) */
+			port at 4 {
+				reg = <4>;
+				csis1_ep: endpoint {
+					remote-endpoint = <&is_s5k6a3_ep>;
+					data-lanes = <1>;
+					samsung,csis-hs-settle = <18>;
+					samsung,csis-wclk;
+				};
+			};
+		};
+
+		fimc_lite_0: fimc-lite at 12390000 {
+			status = "okay";
+		};
+
+		fimc_lite_1: fimc-lite at 123A0000 {
+			status = "okay";
+		};
+
+		fimc-is at 12000000 {
+			pinctrl-0 = <&fimc_is_uart>;
+			pinctrl-names = "default";
+			status = "okay";
+
+			i2c1_isp: i2c-isp at 12140000 {
+				pinctrl-0 = <&fimc_is_i2c1>;
+				pinctrl-names = "default";
+
+				s5k6a3 at 10 {
+					compatible = "samsung,s5k6a3";

arch/arm/boot/dts/exynos4412-trats2.dts

Quoted 10 lines
arch/arm/boot/dts/exynos4412-trats2.dts +10 -0
+					reg = <0x10>;
+					svdda-supply = <&cam_io_reg>;
+					svddio-supply = <&ldo19_reg>;
+					clock-frequency = <24000000>;
+					samsung,camclk-out = <1>;
+					gpios = <&gpm1 6 0>;
+
+					port {
+						is_s5k6a3_ep: endpoint {
+							remote-endpoint = 

<&csis1_ep>;

Quoted 8 lines
arch/arm/boot/dts/exynos4412-trats2.dts +7 -0
+							data-lanes = <1>;
+						};
+					};
+				};
+			};
+		};
+	};
 };
#12 lore raw

PATCH v3 8/13 ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board

Quoted 18 lines · Tomasz Figa
Quoted 17 lines · On Monday 01 of July 2013 17:22:30 Sylwester Nawrocki wrote:

This patch enables the front camera using the internal camera ISP (FIMC-IS).

---
 arch/arm/boot/dts/exynos4412-trats2.dts |   91

+++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+)

(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4412-trats2.dts index b9de3b5..e9fb3de 100644

arch/arm/boot/dts/exynos4412-trats2.dts +0 -0
@@ -62,6 +62,15 @@
 			enable-active-high;
 		};
 
Quoted 4 lines

arch/arm/boot/dts/exynos4412-trats2.dts line 65

Quoted 1 line
arch/arm/boot/dts/exynos4412-trats2.dts +1 -0
+		cam_io_reg: voltage-regulator at 3 {

Same comment here as for patch 7/13. This is not an address of this regulator, so I would rather use -3 prefix.

Yes, and this is the convention already used in this 'regulators' node. I'll rename that node to 'voltage-regulator-1'.

Quoted 41 lines
Quoted 41 lines
arch/arm/boot/dts/exynos4412-trats2.dts +34 -0
+			compatible = "regulator-fixed";
+			regulator-name = "CAM_SENSOR_A";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpm0 2 0>;
+			enable-active-high;
+		};
+
 		/* More to come */
 	};
 
@@ -472,4 +481,86 @@
 			gpios = <&gpj0 7 0>;
 		};
 	};
+
+	camera {
+		pinctrl-names = "default";
+		pinctrl-0 = <&cam_port_b_clk_active>;
+		status = "okay";
+
+		fimc_0: fimc at 11800000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_1: fimc at 11810000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_2: fimc at 11820000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
+		fimc_3: fimc at 11830000 {
+			clock-frequency = <160000000>;
+			status = "okay";
+		};
+
Quoted 8 lines

arch/arm/boot/dts/exynos4412-trats2.dts line 515

Quoted 6 lines
arch/arm/boot/dts/exynos4412-trats2.dts +6 -0
+		csis_1: csis at 11890000 {
+			vddcore-supply = <&ldo8_reg>;
+			vddio-supply = <&ldo10_reg>;
+			clock-frequency = <160000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;

Hmm. Couldn't the two #properties above be moved to exynos4.dtsi instead?

Normally the port/endpoint nodes are board specific. But since the binding requires at least one port and endpoint node, these properties will always need to be specified. Thus it's a good idea to move them to exynos4.dtsi.

--
Thanks,
Sylwester

#13 lore raw

PATCH v3 9/13 ARM: dts: Add camera device nodes for Exynos4210 SoCs

In reply to Sylwester Nawrocki

Add common camera node and detailed properties for the Exynos4210 FIMC devices.

---
 arch/arm/boot/dts/exynos4210.dtsi |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm/boot/dts/exynos4210.dtsi +30 -0
index b7f358a..ef8c2a5 100644
@@ -125,4 +125,34 @@
 		clock-names = "sclk_fimg2d", "fimg2d";
 		status = "disabled";
 	};
+
+	camera {
+		clocks = <&clock 132>, <&clock 133>, <&clock 351>, <&clock 352>;
+		clock-names = "sclk_cam0", "sclk_cam1", "pxl_async0", "pxl_async1";
+
+		fimc_0: fimc at 11800000 {
+			samsung,pix-limits = <4224 8192 1920 4224>;
+			samsung,mainscaler-ext;
+			samsung,cam-if;
+		};
+
+		fimc_1: fimc at 11810000 {
+			samsung,pix-limits = <4224 8192 1920 4224>;
+			samsung,mainscaler-ext;
+			samsung,cam-if;
+		};
+
+		fimc_2: fimc at 11820000 {
+			samsung,pix-limits = <4224 8192 1920 4224>;
+			samsung,mainscaler-ext;
+			samsung,lcd-wb;
+		};
+
+		fimc_3: fimc at 11830000 {
+			samsung,pix-limits = <1920 8192 1366 1920>;
+			samsung,rotators = <0>;
+			samsung,mainscaler-ext;
+			samsung,lcd-wb;
+		};
+	};
 };
Signature · 1 line
1.7.9.5
#14 lore raw

PATCH v3 10/13 ARM: dts: Add FIMC nodes for Exynos4210 Trats board

In reply to Sylwester Nawrocki

Enable FIMC devices on the Trats board. This allows using the device in memory-to-memory mode only. The camera port pinctrl property is now empty and will be updated while support for the camera sensors is added.

---
 arch/arm/boot/dts/exynos4210-trats.dts |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/exynos4210-trats.dts +23 -0
index 94eebff..6b1568e 100644
@@ -301,4 +301,27 @@
 			clock-frequency = <24000000>;
 		};
 	};
+
+	camera {
+		status = "okay";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <>;
+
+		fimc_0: fimc at 11800000 {
+			status = "okay";
+		};
+
+		fimc_1: fimc at 11810000 {
+			status = "okay";
+		};
+
+		fimc_2: fimc at 11820000 {
+			status = "okay";
+		};
+
+		fimc_3: fimc at 11830000 {
+			status = "okay";
+		};
+	};
 };
Signature · 1 line
1.7.9.5
#15 lore raw

PATCH v3 11/13 ARM: dts: Add Exynos4210 SoC camera port pinctrl nodes

In reply to Sylwester Nawrocki

From: Andrzej Hajda <[email protected]>

Add pinctrl nodes for the camera parallel port CAM_A data bus and the CAM_A_CLKOUT clock output pin.

---
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/exynos4210-pinctrl.dtsi +23 -0
index 553bcea..a7c2128 100644
@@ -797,6 +797,29 @@
 			samsung,pin-pud = <0>;
 			samsung,pin-drv = <0>;
 		};
+
+		cam_port_a_io: cam-port-a-io {
+			samsung,pins = "gpj0-0", "gpj0-1", "gpj0-2", "gpj0-3",
+					"gpj0-4", "gpj0-5", "gpj0-6", "gpj0-7",
+					"gpj1-0", "gpj1-1", "gpj1-2", "gpj1-4";
+			samsung,pin-function = <2>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <0>;
+		};
+
+		cam_port_a_clk_active: cam-port-a-clk-active {
+			samsung,pins = "gpj1-3";
+			samsung,pin-function = <2>;
+			samsung,pin-pud = <0>;
+			samsung,pin-drv = <3>;
+		};
+
+		cam_port_a_clk_idle: cam-port-a-clk-idle {
+			samsung,pins = "gpj1-3";
+			samsung,pin-function = <0>;
+			samsung,pin-pud = <1>;
+			samsung,pin-drv = <0>;
+		};
 	};
 
 	pinctrl at 03860000 {
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH v3 12/13 ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

In reply to Sylwester Nawrocki

From: Andrzej Hajda <[email protected]>

Add MAX8998 LDO12 and fixed voltage regulator nodes. While at it, all fixed voltage regulator nodes are grouped in a 'regulators' node.

---
 arch/arm/boot/dts/exynos4210-trats.dts |   80 +++++++++++++++++++++++++-------
 1 file changed, 64 insertions(+), 16 deletions(-)
arch/arm/boot/dts/exynos4210-trats.dts +64 -16
index 6b1568e..f62e299 100644
@@ -30,13 +30,64 @@
 		bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 rootwait earlyprintk panic=5";
 	};
 
-	vemmc_reg: voltage-regulator at 0 {
-	        compatible = "regulator-fixed";
-		regulator-name = "VMEM_VDD_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpk0 2 0>;
-		enable-active-high;
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vemmc_reg: regulator at 0 {
+			compatible = "regulator-fixed";
+			regulator-name = "VMEM_VDD_2.8V";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk0 2 0>;
+			enable-active-high;
+		};
+
+		tsp_reg: regulator at 1 {
+			compatible = "regulator-fixed";
+			regulator-name = "TSP_FIXED_VOLTAGES";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpl0 3 0>;
+			enable-active-high;
+		};
+
+		cam_af_28v_reg: regulator at 2 {
+			compatible = "regulator-fixed";
+			regulator-name = "8M_AF_2.8V_EN";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk1 1 0>;
+			enable-active-high;
+		};
+
+		cam_io_en_reg: regulator at 3 {
+			compatible = "regulator-fixed";
+			regulator-name = "CAM_IO_EN";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpe2 1 0>;
+			enable-active-high;
+		};
+
+		cam_io_12v_reg: regulator at 4 {
+			compatible = "regulator-fixed";
+			regulator-name = "8M_1.2V_EN";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			gpio = <&gpe2 5 0>;
+			enable-active-high;
+		};
+
+		vt_core_15v_reg: regulator at 5 {
+			compatible = "regulator-fixed";
+			regulator-name = "VT_CORE_1.5V";
+			regulator-min-microvolt = <1500000>;
+			regulator-max-microvolt = <1500000>;
+			gpio = <&gpe2 2 0>;
+			enable-active-high;
+		};
 	};
 
 	sdhci_emmc: sdhci at 12510000 {
@@ -97,15 +148,6 @@
 		};
 	};
 
-	tsp_reg: voltage-regulator {
-		compatible = "regulator-fixed";
-		regulator-name = "TSP_FIXED_VOLTAGES";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpl0 3 0>;
-		enable-active-high;
-	};
-
 	i2c at 13890000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-slave-addr = <0x10>;
@@ -218,6 +260,12 @@
 				     regulator-always-on;
 				};
 
+				vtcam_reg: LDO12 {
+				     regulator-name = "VT_CAM_1.8V";
+				     regulator-min-microvolt = <1800000>;
+				     regulator-max-microvolt = <1800000>;
+				};
+
 				vcclcd_reg: LDO13 {
 				     regulator-name = "VCC_3.3V_LCD";
 				     regulator-min-microvolt = <3300000>;
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH v3 12/13 ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Hi Sylwester, Andrzej,

Quoted 18 lines · On Monday 01 of July 2013 17:22:34 Sylwester Nawrocki wrote:

From: Andrzej Hajda <[email protected]>

Add MAX8998 LDO12 and fixed voltage regulator nodes. While at it, all fixed voltage regulator nodes are grouped in a 'regulators' node.

---
 arch/arm/boot/dts/exynos4210-trats.dts |   80

+++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 16 deletions(-)

(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4210-trats.dts index 6b1568e..f62e299 100644

arch/arm/boot/dts/exynos4210-trats.dts line 30

Quoted 1 line
arch/arm/boot/dts/exynos4210-trats.dts +0 -0
@@ -30,13 +30,64 @@
 		bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 

rootwait

arch/arm/boot/dts/exynos4210-trats.dts line 36

Quoted 13 lines
arch/arm/boot/dts/exynos4210-trats.dts +4 -7
 earlyprintk panic=5"; };
 
-	vemmc_reg: voltage-regulator at 0 {
-	        compatible = "regulator-fixed";
-		regulator-name = "VMEM_VDD_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpk0 2 0>;
-		enable-active-high;
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;

I don't think any addressing is needed for these regulators, so I'd suggest removing those #properties and replacing @N with -N suffix.

Otherwise looks good.

Best regards,
Tomasz

Quoted 86 lines
arch/arm/boot/dts/exynos4210-trats.dts +60 -9
+
+		vemmc_reg: regulator at 0 {
+			compatible = "regulator-fixed";
+			regulator-name = "VMEM_VDD_2.8V";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk0 2 0>;
+			enable-active-high;
+		};
+
+		tsp_reg: regulator at 1 {
+			compatible = "regulator-fixed";
+			regulator-name = "TSP_FIXED_VOLTAGES";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpl0 3 0>;
+			enable-active-high;
+		};
+
+		cam_af_28v_reg: regulator at 2 {
+			compatible = "regulator-fixed";
+			regulator-name = "8M_AF_2.8V_EN";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk1 1 0>;
+			enable-active-high;
+		};
+
+		cam_io_en_reg: regulator at 3 {
+			compatible = "regulator-fixed";
+			regulator-name = "CAM_IO_EN";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpe2 1 0>;
+			enable-active-high;
+		};
+
+		cam_io_12v_reg: regulator at 4 {
+			compatible = "regulator-fixed";
+			regulator-name = "8M_1.2V_EN";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			gpio = <&gpe2 5 0>;
+			enable-active-high;
+		};
+
+		vt_core_15v_reg: regulator at 5 {
+			compatible = "regulator-fixed";
+			regulator-name = "VT_CORE_1.5V";
+			regulator-min-microvolt = <1500000>;
+			regulator-max-microvolt = <1500000>;
+			gpio = <&gpe2 2 0>;
+			enable-active-high;
+		};
 	};
 
 	sdhci_emmc: sdhci at 12510000 {
@@ -97,15 +148,6 @@
 		};
 	};
 
-	tsp_reg: voltage-regulator {
-		compatible = "regulator-fixed";
-		regulator-name = "TSP_FIXED_VOLTAGES";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpl0 3 0>;
-		enable-active-high;
-	};
-
 	i2c at 13890000 {
 		samsung,i2c-sda-delay = <100>;
 		samsung,i2c-slave-addr = <0x10>;
@@ -218,6 +260,12 @@
 				     regulator-always-on;
 				};
 
+				vtcam_reg: LDO12 {
+				     regulator-name = "VT_CAM_1.8V";
+				     regulator-min-microvolt = <1800000>;
+				     regulator-max-microvolt = <1800000>;
+				};
+
 				vcclcd_reg: LDO13 {
 				     regulator-name = "VCC_3.3V_LCD";
 				     regulator-min-microvolt = <3300000>;
#18 lore raw

PATCH v3 12/13 ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Hi,

Quoted 23 lines · Tomasz Figa
Quoted 18 lines · On Monday 01 of July 2013 17:22:34 Sylwester Nawrocki wrote:

From: Andrzej Hajda <[email protected]>

Add MAX8998 LDO12 and fixed voltage regulator nodes. While at it, all fixed voltage regulator nodes are grouped in a 'regulators' node.

---
 arch/arm/boot/dts/exynos4210-trats.dts |   80

+++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 16 deletions(-)

(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4210-trats.dts index 6b1568e..f62e299 100644

arch/arm/boot/dts/exynos4210-trats.dts line 30

Quoted 1 line
arch/arm/boot/dts/exynos4210-trats.dts +0 -0
@@ -30,13 +30,64 @@
 		bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5 

rootwait

Quoted 2 lines
arch/arm/boot/dts/exynos4210-trats.dts +0 -0
 earlyprintk panic=5"; };
 
Quoted 14 lines

arch/arm/boot/dts/exynos4210-trats.dts line 36

Quoted 11 lines
arch/arm/boot/dts/exynos4210-trats.dts +4 -7
-	vemmc_reg: voltage-regulator at 0 {
-	        compatible = "regulator-fixed";
-		regulator-name = "VMEM_VDD_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpk0 2 0>;
-		enable-active-high;
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;

I don't think any addressing is needed for these regulators, so I'd suggest removing those #properties and replacing @N with -N suffix.

Originally there were also 'reg' properties in the individual regulator nodes, but these were unused and I've removed them before posting. Just missed to get rid of #size/address-cells as well. Please note you similarly use such properties in patch [1].

I suppose it is correct to have something like:

regulators {
	compatible = "simple-bus";
	regulator-0 {
		...
	};

	regulator-1 {
		...
	};
	...
};

rather than:

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

	regulator at 0 {
		reg = <...>;
		...
	};

	regulator at 1 {
		reg = <...>;
		...
	};
};

Both patterns seem to be used in existing *.dts files.

I'm going to use the first option in the next iteration, unless someone suggest otherwise.

[1] http://www.spinics.net/lists/arm-kernel/msg253184.html

Quoted 52 lines

Otherwise looks good.

Best regards,
Tomasz

Quoted 47 lines
arch/arm/boot/dts/exynos4210-trats.dts +47 -0
+
+		vemmc_reg: regulator at 0 {
+			compatible = "regulator-fixed";
+			regulator-name = "VMEM_VDD_2.8V";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk0 2 0>;
+			enable-active-high;
+		};
+
+		tsp_reg: regulator at 1 {
+			compatible = "regulator-fixed";
+			regulator-name = "TSP_FIXED_VOLTAGES";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpl0 3 0>;
+			enable-active-high;
+		};
+
+		cam_af_28v_reg: regulator at 2 {
+			compatible = "regulator-fixed";
+			regulator-name = "8M_AF_2.8V_EN";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpk1 1 0>;
+			enable-active-high;
+		};
+
+		cam_io_en_reg: regulator at 3 {
+			compatible = "regulator-fixed";
+			regulator-name = "CAM_IO_EN";
+			regulator-min-microvolt = <2800000>;
+			regulator-max-microvolt = <2800000>;
+			gpio = <&gpe2 1 0>;
+			enable-active-high;
+		};
+
+		cam_io_12v_reg: regulator at 4 {
+			compatible = "regulator-fixed";
+			regulator-name = "8M_1.2V_EN";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			gpio = <&gpe2 5 0>;
+			enable-active-high;
+		};
+
+		vt_core_15v_reg: regulator at 5 {
Quoted 8 lines

arch/arm/boot/dts/exynos4210-trats.dts line 91

Quoted 8 lines
arch/arm/boot/dts/exynos4210-trats.dts +7 -0
+			compatible = "regulator-fixed";
+			regulator-name = "VT_CORE_1.5V";
+			regulator-min-microvolt = <1500000>;
+			regulator-max-microvolt = <1500000>;
+			gpio = <&gpe2 2 0>;
+			enable-active-high;
+		};
 	};

Thanks,
Sylwester

#19 lore raw

PATCH v3 12/13 ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Quoted 46 lines · On Monday 08 of July 2013 16:12:56 Sylwester Nawrocki wrote:

Hi,

Quoted 28 lines · Tomasz Figa
Quoted 20 lines · On Monday 01 of July 2013 17:22:34 Sylwester Nawrocki wrote:

From: Andrzej Hajda <[email protected]>

Add MAX8998 LDO12 and fixed voltage regulator nodes. While at it, all fixed voltage regulator nodes are grouped in a 'regulators' node.

---

 arch/arm/boot/dts/exynos4210-trats.dts |   80

+++++++++++++++++++++++++------- 1 file changed, 64 insertions(+), 16 deletions(-)

(quoted diff) +0 -0

b/arch/arm/boot/dts/exynos4210-trats.dts index 6b1568e..f62e299 100644

arch/arm/boot/dts/exynos4210-trats.dts line 31

Quoted 2 lines
arch/arm/boot/dts/exynos4210-trats.dts +0 -0
@@ -30,13 +30,64 @@
 
 		bootargs = "console=ttySAC2,115200N8 root=/dev/mmcblk0p5

rootwait

Quoted 2 lines
arch/arm/boot/dts/exynos4210-trats.dts +0 -0
 earlyprintk panic=5"; };
 
Quoted 14 lines

arch/arm/boot/dts/exynos4210-trats.dts line 36

Quoted 11 lines
arch/arm/boot/dts/exynos4210-trats.dts +4 -7
-	vemmc_reg: voltage-regulator at 0 {
-	        compatible = "regulator-fixed";
-		regulator-name = "VMEM_VDD_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		gpio = <&gpk0 2 0>;
-		enable-active-high;
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;

I don't think any addressing is needed for these regulators, so I'd suggest removing those #properties and replacing @N with -N suffix.

Quoted 4 lines

Originally there were also 'reg' properties in the individual regulator nodes, but these were unused and I've removed them before posting. Just missed to get rid of #size/address-cells as well. Please note you similarly use such properties in patch [1].

Oh, you got me here. I must have forgotten to remove them as well.

As we already noticed some time ago, mistakes propagate much faster than correct solutions. ;)

Quoted 32 lines

I suppose it is correct to have something like:

regulators {
	compatible = "simple-bus";
	regulator-0 {
		...
	};

	regulator-1 {
		...
	};
	...
};

rather than:

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

	regulator at 0 {
		reg = <...>;
		...
	};

	regulator at 1 {
		reg = <...>;
		...
	};
};
Quoted 1 line

Both patterns seem to be used in existing *.dts files.

Both patterns are correct, I guess. I'm not sure if it makes sense to specify address of something that is not addressable and so approach 1 makes more sense to me.

Quoted 2 lines

I'm going to use the first option in the next iteration, unless someone suggest otherwise.

OK.

Best regards,
Tomasz

#20 lore raw

PATCH v3 13/13 ARM: dts: Add MIPI PHY node to exynos4.dtsi

In reply to Sylwester Nawrocki

Add PHY provider node for the MIPI CSIS and MIPI DSIM PHYs.

---
 arch/arm/boot/dts/exynos4.dtsi |   10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +10 -0
index 752624f..e27eba8 100644
@@ -49,6 +49,12 @@
 		reg = <0x10000000 0x100>;
 	};
 
+	mipi_phy: video-phy at 10020710 {
+		compatible = "samsung,s5pv210-mipi-video-phy";
+		reg = <0x10020710 8>;
+		#phy-cells = <1>;
+	};
+
 	pd_mfc: mfc-power-domain at 10023C40 {
 		compatible = "samsung,exynos4210-pd";
 		reg = <0x10023C40 0x20>;
@@ -157,6 +163,8 @@
 			clock-names = "csis", "sclk_csis";
 			bus-width = <4>;
 			samsung,power-domain = <&pd_cam>;
+			phys = <&mipi_phy 0>;
+			phy-names = "csis";
 			status = "disabled";
 		};
 
@@ -168,6 +176,8 @@
 			clock-names = "csis", "sclk_csis";
 			bus-width = <2>;
 			samsung,power-domain = <&pd_cam>;
+			phys = <&mipi_phy 2>;
+			phy-names = "csis";
 			status = "disabled";
 		};
 	};
Signature · 1 line
1.7.9.5
#21 lore raw

v3 cover ARM: dts: Add camera and magnetometer support for TRATS(2) board

In reply to Sylwester Nawrocki

Hi Sylwester,

Quoted 49 lines · On Monday 01 of July 2013 17:22:22 Sylwester Nawrocki wrote:

This patch series includes some fixes and extensions to the Exynos dts files to add the camera and magnetometer sensor support for the TRATS and TRATS2 board. It depends on a patch from Tomasz adding initial TRATS2 board dts file [1].

Comparing to the previous version of this patch set I've added a few more patches, for the Exynos4210 based TRATS board and a patch adding MIPI CSIS/DSIM PHY provider nodes and related properties to the PHY consumer nodes.

This series has been tested with the S5K6A3/FIMC-IS and S5K5BAFX (front facing) cameras on top of next-20130627 tag. It can be found also at:
http://git.linuxtv.org/snawrocki/samsung.git/next-20130627-dts-trats-v3

Detailed changes since v2 are listed in each patch.

Changes since v1:
- enabled pull down in cam-port-{a, b}-clk-idle nodes (1/8)
- added node alias for i2c-gpio at 0 I2C controller node (7/8).

[1] http://www.spinics.net/lists/arm-kernel/msg253184.html

Andrzej Hajda (2):
ARM: dts: Add Exynos4210 SoC camera port pinctrl nodes
ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Jacek Anaszewski (1):
ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

Sylwester Nawrocki (10):
ARM: dts: Correct camera pinctrl nodes for Exynos4x12 SoCs
ARM: dts: Add pinctrl entries for Exynos4x12 FIMC-IS peripherals
ARM: dts: Add ISP power domain node for Exynos4x12
ARM: dts: Use generic DMA bindings for Exynos4 SPI devices
ARM: dts: Add camera subsystem device nodes to exynos4.dtsi
ARM: dts: Add camera subsystem nodes to exynos4x12.dtsi
ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board
ARM: dts: Add camera device nodes for Exynos4210 SoCs
ARM: dts: Add FIMC nodes for Exynos4210 Trats board
ARM: dts: Add MIPI PHY node to exynos4.dtsi

 arch/arm/boot/dts/exynos4.dtsi            |  102
++++++++++++++++++++++++-- arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 
 23 ++++++
 arch/arm/boot/dts/exynos4210-trats.dts    |  103
++++++++++++++++++++++----- arch/arm/boot/dts/exynos4210.dtsi         |
  30 ++++++++
 arch/arm/boot/dts/exynos4412-trats2.dts   |  110
Quoted 4 lines

+++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos4x12-pinctrl.dtsi
| 61 ++++++++++++++-- arch/arm/boot/dts/exynos4x12.dtsi |
103 +++++++++++++++++++++++++++ 7 files changed, 503 insertions(+), 29 deletions(-)

For all the patches I haven't commented on:

Best regards,
Tomasz

#22 lore raw

v3 cover ARM: dts: Add camera and magnetometer support for TRATS(2) board

In reply to Sylwester Nawrocki
Quoted 6 lines · Sylwester Nawrocki

This patch series includes some fixes and extensions to the Exynos dts files to add the camera and magnetometer sensor support for the TRATS and TRATS2 board. It depends on a patch from Tomasz adding initial TRATS2 board dts file [1].

Already it is in my tree :)

Quoted 37 lines

Comparing to the previous version of this patch set I've added a few more patches, for the Exynos4210 based TRATS board and a patch adding MIPI CSIS/DSIM PHY provider nodes and related properties to the PHY consumer nodes.

This series has been tested with the S5K6A3/FIMC-IS and S5K5BAFX (front facing) cameras on top of next-20130627 tag. It can be found also at:
http://git.linuxtv.org/snawrocki/samsung.git/next-20130627-dts-trats-v3

Detailed changes since v2 are listed in each patch.

Changes since v1:
- enabled pull down in cam-port-{a, b}-clk-idle nodes (1/8)
- added node alias for i2c-gpio at 0 I2C controller node (7/8).

[1] http://www.spinics.net/lists/arm-kernel/msg253184.html

Andrzej Hajda (2):
ARM: dts: Add Exynos4210 SoC camera port pinctrl nodes
ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Jacek Anaszewski (1):
ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

Sylwester Nawrocki (10):
ARM: dts: Correct camera pinctrl nodes for Exynos4x12 SoCs
ARM: dts: Add pinctrl entries for Exynos4x12 FIMC-IS peripherals
ARM: dts: Add ISP power domain node for Exynos4x12
ARM: dts: Use generic DMA bindings for Exynos4 SPI devices
ARM: dts: Add camera subsystem device nodes to exynos4.dtsi
ARM: dts: Add camera subsystem nodes to exynos4x12.dtsi
ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board
ARM: dts: Add camera device nodes for Exynos4210 SoCs
ARM: dts: Add FIMC nodes for Exynos4210 Trats board
ARM: dts: Add MIPI PHY node to exynos4.dtsi

Quoted 1 line
 arch/arm/boot/dts/exynos4.dtsi            |  102

++++++++++++++++++++++++--

Quoted 2 lines
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi |   23 ++++++
 arch/arm/boot/dts/exynos4210-trats.dts    |  103

++++++++++++++++++++++---

Quoted 6 lines

--

 arch/arm/boot/dts/exynos4210.dtsi         |   30 ++++++++
 arch/arm/boot/dts/exynos4412-trats2.dts   |  110
+++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   61 ++++++++++++++--
 arch/arm/boot/dts/exynos4x12.dtsi         |  103

+++++++++++++++++++++++++++

Quoted 4 lines
 7 files changed, 503 insertions(+), 29 deletions(-)

--
1.7.9.5

Basically, I'm fine on this series but you said, you will address comments on some patches :)

Thanks,
Kukjin

#23 lore raw

v3 cover ARM: dts: Add camera and magnetometer support for TRATS(2) board

Quoted 8 lines · Kukjin Kim
Quoted 6 lines · Sylwester Nawrocki

This patch series includes some fixes and extensions to the Exynos dts files to add the camera and magnetometer sensor support for the TRATS and TRATS2 board. It depends on a patch from Tomasz adding initial TRATS2 board dts file [1].

Already it is in my tree :)

Great, I guess some time is needed until it shows up in the public git tree.

Quoted 48 lines
Quoted 37 lines

Comparing to the previous version of this patch set I've added a few more patches, for the Exynos4210 based TRATS board and a patch adding MIPI CSIS/DSIM PHY provider nodes and related properties to the PHY consumer nodes.

This series has been tested with the S5K6A3/FIMC-IS and S5K5BAFX (front facing) cameras on top of next-20130627 tag. It can be found also at:
http://git.linuxtv.org/snawrocki/samsung.git/next-20130627-dts-trats-v3

Detailed changes since v2 are listed in each patch.

Changes since v1:
- enabled pull down in cam-port-{a, b}-clk-idle nodes (1/8)
- added node alias for i2c-gpio at 0 I2C controller node (7/8).

[1] http://www.spinics.net/lists/arm-kernel/msg253184.html

Andrzej Hajda (2):
ARM: dts: Add Exynos4210 SoC camera port pinctrl nodes
ARM: dts: Add S5K5BA sensor regulator definitions for Trats board

Jacek Anaszewski (1):
ARM: dts: Add AK8975 device node for Exynos4412 TRATS2 board

Sylwester Nawrocki (10):
ARM: dts: Correct camera pinctrl nodes for Exynos4x12 SoCs
ARM: dts: Add pinctrl entries for Exynos4x12 FIMC-IS peripherals
ARM: dts: Add ISP power domain node for Exynos4x12
ARM: dts: Use generic DMA bindings for Exynos4 SPI devices
ARM: dts: Add camera subsystem device nodes to exynos4.dtsi
ARM: dts: Add camera subsystem nodes to exynos4x12.dtsi
ARM: dts: Add camera device nodes for Exynos4412 TRATS2 board
ARM: dts: Add camera device nodes for Exynos4210 SoCs
ARM: dts: Add FIMC nodes for Exynos4210 Trats board
ARM: dts: Add MIPI PHY node to exynos4.dtsi

Quoted 1 line
 arch/arm/boot/dts/exynos4.dtsi            |  102

++++++++++++++++++++++++--

Quoted 2 lines
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi |   23 ++++++
 arch/arm/boot/dts/exynos4210-trats.dts    |  103

++++++++++++++++++++++---

Quoted 6 lines

--

 arch/arm/boot/dts/exynos4210.dtsi         |   30 ++++++++
 arch/arm/boot/dts/exynos4412-trats2.dts   |  110
+++++++++++++++++++++++++++++
 arch/arm/boot/dts/exynos4x12-pinctrl.dtsi |   61 ++++++++++++++--
 arch/arm/boot/dts/exynos4x12.dtsi         |  103
Quoted 8 lines

+++++++++++++++++++++++++++

Quoted 4 lines
 7 files changed, 503 insertions(+), 29 deletions(-)

--
1.7.9.5

Basically, I'm fine on this series but you said, you will address comments on some patches :)

Thanks, I've just sent an updated series. Would be good to finally merge it if it looks OK. I have a few more patches on top of it but that likely could be merged only in a week or two, after related driver changes are finally reviewed and queued for 3.12.

--
Thanks,
Sylwester