diff mbox series

[06/13] arm: dts: s5pv210: aries: Add support for more devices

Message ID BN6PR04MB0660563639D091548BFCCFF2A3AE0@BN6PR04MB0660.namprd04.prod.outlook.com (mailing list archive)
State Changes Requested
Headers show
Series S5PV210 and Aries DTS improvements | expand

Commit Message

Jonathan Bakker April 26, 2020, 6:35 p.m. UTC
Add support for following devices:
  - touchkeys connected over i2c-gpio
  - s6e63m0 panel connected over spi-gpio
  - fsa9480 microusb switch over i2c-gpio
  - wm8994 over i2c-gpio (no machine driver yet)
  - all common i2c-gpio devices

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 arch/arm/boot/dts/s5pv210-aries.dtsi      | 282 ++++++++++++++++++++--
 arch/arm/boot/dts/s5pv210-fascinate4g.dts |   6 +
 2 files changed, 270 insertions(+), 18 deletions(-)

Comments

Krzysztof Kozlowski April 28, 2020, 10:20 a.m. UTC | #1
On Sun, Apr 26, 2020 at 11:35:57AM -0700, Jonathan Bakker wrote:
> Add support for following devices:
>   - touchkeys connected over i2c-gpio
>   - s6e63m0 panel connected over spi-gpio
>   - fsa9480 microusb switch over i2c-gpio
>   - wm8994 over i2c-gpio (no machine driver yet)
>   - all common i2c-gpio devices

Please split it per functionality, e.g.:
1. Add sound,
2. Add panel,
3. Add touchkeys (unless part of panel),
4. The remaining i2c-gpio devices without bindings could go as one.

> 
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
>  arch/arm/boot/dts/s5pv210-aries.dtsi      | 282 ++++++++++++++++++++--
>  arch/arm/boot/dts/s5pv210-fascinate4g.dts |   6 +
>  2 files changed, 270 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
> index f83df426f2b6..ef966d13d83d 100644
> --- a/arch/arm/boot/dts/s5pv210-aries.dtsi
> +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
> @@ -12,8 +12,14 @@
>  	compatible = "samsung,aries", "samsung,s5pv210";
>  
>  	aliases {
> +		i2c4 = &i2c_sound;
> +		i2c5 = &i2c_accel;
>  		i2c6 = &i2c_pmic;
> +		i2c7 = &i2c_musb;
>  		i2c9 = &i2c_fuel;
> +		i2c10 = &i2c_touchkey;
> +		i2c11 = &i2c_prox;
> +		i2c12 = &i2c_magnetometer;
>  	};
>  
>  	memory@30000000 {
> @@ -48,6 +54,18 @@
>  		gpio = <&gpj1 1 GPIO_ACTIVE_HIGH>;
>  	};
>  
> +	touchkey_vdd: regulator-fixed-1 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "VTOUCH_3.3V";
> +		regulator-min-microvolt = <3300000>;
> +		regulator-max-microvolt = <3300000>;
> +		enable-active-high;
> +		gpio = <&gpj3 2 GPIO_ACTIVE_HIGH>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&touchkey_vdd_ena>;
> +	};
> +
>  	wifi_pwrseq: wifi-pwrseq {
>  		compatible = "mmc-pwrseq-simple";
>  		reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>;
> @@ -57,7 +75,69 @@
>  		power-off-delay-us = <500>;
>  	};
>  
> -	i2c_pmic: i2c-gpio-0 {
> +	i2c_sound: i2c-gpio-0 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&mp05 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&mp05 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <2>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&sound_i2c_pins>;
> +
> +		wm8994: wm8994@1a {
> +			compatible = "wlf,wm8994";
> +			reg = <0x1a>;
> +
> +			#sound-dai-cells = <0>;
> +
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +
> +			clocks = <&clocks MOUT_CLKOUT>;
> +			clock-names = "MCLK1";
> +
> +			AVDD2-supply = <&buck3_reg>;
> +			DBVDD-supply = <&buck3_reg>;

No such supply, check the bindings.

> +			CPVDD-supply = <&buck3_reg>;
> +			SPKVDD1-supply = <&buck3_reg>;
> +			SPKVDD2-supply = <&buck3_reg>;
> +
> +			wlf,gpio-cfg = <0xa101 0x8100 0x0100 0x0100 0x8100
> +					0xa101 0x0100 0x8100 0x0100 0x0100
> +					0x0100>;
> +
> +			wlf,ldo1ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
> +			wlf,ldo2ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
> +
> +			wlf,lineout1-se;
> +			wlf,lineout2-se;
> +
> +			assigned-clocks = <&clocks MOUT_CLKOUT>;
> +			assigned-clock-rates = <0>;
> +			assigned-clock-parents = <&xusbxti>;
> +
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&codec_ldo>;
> +		};
> +	};
> +
> +	i2c_accel: i2c-gpio-1 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&gpj3 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&gpj3 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <2>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&accel_i2c_pins>;
> +
> +		/* bma023 accelerometer, no mainline binding */

status disabled ... unless you need it for user-space I2C tools?

> +	};
> +
> +	i2c_pmic: i2c-gpio-2 {
>  		compatible = "i2c-gpio";
>  		sda-gpios = <&gpj4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>  		scl-gpios = <&gpj4 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> @@ -137,8 +217,6 @@
>  					regulator-name = "VLCD_1.8V";
>  					regulator-min-microvolt = <1800000>;
>  					regulator-max-microvolt = <1800000>;
> -					/* Till we get panel driver */
> -					regulator-always-on;
>  
>  					regulator-state-mem {
>  						regulator-off-in-suspend;
> @@ -237,8 +315,6 @@
>  					regulator-name = "VCC_3.0V_LCD";
>  					regulator-min-microvolt = <3000000>;
>  					regulator-max-microvolt = <3000000>;
> -					/* Till we get panel driver */
> -					regulator-always-on;
>  
>  					regulator-state-mem {
>  						regulator-off-in-suspend;
> @@ -309,7 +385,26 @@
>  		};
>  	};
>  
> -	i2c_fuel: i2c-gpio-1 {
> +	i2c_musb: i2c-gpio-3 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&gpj3 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&gpj3 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <2>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&musb_i2c_pins>;
> +
> +		fsa9480: musb@25 {
> +			compatible = "fcs,fsa9480";
> +			reg = <0x25>;
> +			interrupt-parent = <&gph2>;
> +			interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
> +		};
> +	};
> +
> +	i2c_fuel: i2c-gpio-4 {
>  		compatible = "i2c-gpio";
>  		sda-gpios = <&mp05 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>  		scl-gpios = <&mp05 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> @@ -328,6 +423,60 @@
>  		};
>  	};
>  
> +	i2c_touchkey: i2c-gpio-5 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&gpj3 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&gpj3 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <2>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&touchkey_i2c_pins>;
> +
> +		touchkey@20 {
> +			compatible = "cypress,aries-touchkey";
> +			reg = <0x20>;
> +			vdd-supply = <&touchkey_vdd>;
> +			vcc-supply = <&buck3_reg>;
> +			linux,keycodes = <KEY_MENU KEY_BACK
> +					  KEY_HOMEPAGE KEY_SEARCH>;
> +			interrupt-parent = <&gpj4>;
> +			interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
> +
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&touchkey_irq>;
> +		};
> +	};
> +
> +	i2c_prox: i2c-gpio-6 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&gpg2 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&gpg0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <2>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&prox_i2c_pins>;
> +
> +		/* Sharp gp2a prox/light sensor, incomplete mainline binding */

The same - disable, unless you access it from user-space.

> +	};
> +
> +	i2c_magnetometer: i2c-gpio-7 {
> +		compatible = "i2c-gpio";
> +		sda-gpios = <&gpj0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&gpj0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <2>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&magnetometer_i2c_pins>;
> +
> +		/* Yamaha yas529 magnetometer, no mainline binding */

The same - disable, unless you access it from user-space.

> +	};
> +
>  	vibrator: pwm-vibrator {
>  		compatible = "pwm-vibrator";
>  		pwms = <&pwm 1 44642 0>;
> @@ -343,6 +492,39 @@
>  		offset = <0x681c>; /* PS_HOLD_CONTROL */
>  		value = <0x5200>;
>  	};
> +
> +	spi_lcd: spi-gpio-0 {
> +		compatible = "spi-gpio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		sck-gpios = <&mp04 1 GPIO_ACTIVE_HIGH>;
> +		mosi-gpios = <&mp04 3 GPIO_ACTIVE_HIGH>;
> +		cs-gpios = <&mp01 1 GPIO_ACTIVE_HIGH>;
> +		num-chipselects = <1>;
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&lcd_spi_pins>;
> +
> +		panel@0 {
> +			compatible = "samsung,s6e63m0";
> +			reg = <0>;
> +			reset-gpios = <&mp05 5 GPIO_ACTIVE_LOW>;
> +			vdd3-supply = <&ldo7_reg>;
> +			vci-supply = <&ldo17_reg>;
> +			spi-cs-high;
> +			spi-max-frequency = <1200000>;
> +
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&panel_rst>;
> +
> +			port {
> +				lcd_ep: endpoint {
> +					remote-endpoint = <&fimd_ep>;
> +				};
> +			};
> +		};
> +	};
>  };
>  
>  &fimd {
> @@ -353,18 +535,13 @@
>  	samsung,invert-vden;
>  	samsung,invert-vclk;
>  
> -	display-timings {
> -		timing-0 {
> -			/* 480x800@60Hz */
> -			clock-frequency = <25628040>;
> -			hactive = <480>;
> -			vactive = <800>;
> -			hfront-porch = <16>;
> -			hback-porch = <16>;
> -			hsync-len = <2>;
> -			vfront-porch = <28>;
> -			vback-porch = <1>;
> -			vsync-len = <2>;
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +
> +	port@3 {
> +		reg = <3>;
> +		fimd_ep: endpoint {
> +			remote-endpoint = <&lcd_ep>;
>  		};
>  	};
>  };
> @@ -405,6 +582,19 @@
>  		samsung,pin-val = <1>;
>  	};
>  
> +	codec_ldo: codec-ldo {
> +		samsung,pins = "gpf3-4";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +	};
> +
> +	prox_i2c_pins: gp2a-i2c-pins {
> +		samsung,pins = "gpg0-2", "gpg2-2";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
>  	wlan_gpio_rst: wlan-gpio-rst {
>  		samsung,pins = "gpg1-2";
>  		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
> @@ -438,6 +628,13 @@
>  		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
>  	};
>  
> +	magnetometer_i2c_pins: yas529-i2c-pins {
> +		samsung,pins = "gpj0-0", "gpj0-1";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
>  	ts_irq: ts-irq {
>  		samsung,pins = "gpj0-5";
>  		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
> @@ -445,17 +642,66 @@
>  		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>  	};
>  
> +	touchkey_i2c_pins: touchkey-i2c-pins {
> +		samsung,pins = "gpj3-0", "gpj3-1";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
> +	touchkey_vdd_ena: touchkey-vdd-ena {
> +		samsung,pins = "gpj3-2";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
> +	musb_i2c_pins: musb-i2c-pins {
> +		samsung,pins = "gpj3-4", "gpj3-5";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
> +	accel_i2c_pins: accel-i2c-pins {
> +		samsung,pins = "gpj3-6", "gpj3-7";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
>  	pmic_i2c_pins: pmic-i2c-pins {
>  		samsung,pins = "gpj4-0", "gpj4-3";
>  		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
>  		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>  	};
>  
> +	touchkey_irq: touchkey-irq {
> +		samsung,pins = "gpj4-1";
> +		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_UP>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
> +	lcd_spi_pins: spi-lcd-pins {
> +		samsung,pins = "mp01-1", "mp04-1", "mp04-3";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
>  	fg_i2c_pins: fg-i2c-pins {
>  		samsung,pins = "mp05-0", "mp05-1";
>  		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
>  		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
>  	};
> +
> +	sound_i2c_pins: sound-i2c-pins {
> +		samsung,pins = "mp05-2", "mp05-3";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
> +
> +	panel_rst: panel-rst {
> +		samsung,pins = "mp05-5";
> +		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
> +		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
> +	};
>  };
>  
>  &pwm {
> diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> index 94dcb9b64b9a..42e6e2de197d 100644
> --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
> @@ -278,3 +278,9 @@
>  		PIN_SLP(mp07-7, INPUT, DOWN);
>  	};
>  };
> +
> +&wm8994 {
> +	/* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
> +	wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
> +		0x0100 0x8100 0x0100 0x0100 0x0100>;

Indent the line till opening <.

Best regards,
Krzysztof
Jonathan Bakker April 28, 2020, 11:32 p.m. UTC | #2
Hi Krzysztof,

On 2020-04-28 3:20 a.m., Krzysztof Kozlowski wrote:
> On Sun, Apr 26, 2020 at 11:35:57AM -0700, Jonathan Bakker wrote:
>> Add support for following devices:
>>   - touchkeys connected over i2c-gpio
>>   - s6e63m0 panel connected over spi-gpio
>>   - fsa9480 microusb switch over i2c-gpio
>>   - wm8994 over i2c-gpio (no machine driver yet)
>>   - all common i2c-gpio devices
> 
> Please split it per functionality, e.g.:
> 1. Add sound,
> 2. Add panel,
> 3. Add touchkeys (unless part of panel),
> 4. The remaining i2c-gpio devices without bindings could go as one.

Ok, will do.

> 
>>
>> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
>> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
>> ---
>>  arch/arm/boot/dts/s5pv210-aries.dtsi      | 282 ++++++++++++++++++++--
>>  arch/arm/boot/dts/s5pv210-fascinate4g.dts |   6 +
>>  2 files changed, 270 insertions(+), 18 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
>> index f83df426f2b6..ef966d13d83d 100644
>> --- a/arch/arm/boot/dts/s5pv210-aries.dtsi
>> +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
>> @@ -12,8 +12,14 @@
>>  	compatible = "samsung,aries", "samsung,s5pv210";
>>  
>>  	aliases {
>> +		i2c4 = &i2c_sound;
>> +		i2c5 = &i2c_accel;
>>  		i2c6 = &i2c_pmic;
>> +		i2c7 = &i2c_musb;
>>  		i2c9 = &i2c_fuel;
>> +		i2c10 = &i2c_touchkey;
>> +		i2c11 = &i2c_prox;
>> +		i2c12 = &i2c_magnetometer;
>>  	};
>>  
>>  	memory@30000000 {
>> @@ -48,6 +54,18 @@
>>  		gpio = <&gpj1 1 GPIO_ACTIVE_HIGH>;
>>  	};
>>  
>> +	touchkey_vdd: regulator-fixed-1 {
>> +		compatible = "regulator-fixed";
>> +		regulator-name = "VTOUCH_3.3V";
>> +		regulator-min-microvolt = <3300000>;
>> +		regulator-max-microvolt = <3300000>;
>> +		enable-active-high;
>> +		gpio = <&gpj3 2 GPIO_ACTIVE_HIGH>;
>> +
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&touchkey_vdd_ena>;
>> +	};
>> +
>>  	wifi_pwrseq: wifi-pwrseq {
>>  		compatible = "mmc-pwrseq-simple";
>>  		reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>;
>> @@ -57,7 +75,69 @@
>>  		power-off-delay-us = <500>;
>>  	};
>>  
>> -	i2c_pmic: i2c-gpio-0 {
>> +	i2c_sound: i2c-gpio-0 {
>> +		compatible = "i2c-gpio";
>> +		sda-gpios = <&mp05 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> +		scl-gpios = <&mp05 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> +		i2c-gpio,delay-us = <2>;
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&sound_i2c_pins>;
>> +
>> +		wm8994: wm8994@1a {
>> +			compatible = "wlf,wm8994";
>> +			reg = <0x1a>;
>> +
>> +			#sound-dai-cells = <0>;
>> +
>> +			gpio-controller;
>> +			#gpio-cells = <2>;
>> +
>> +			clocks = <&clocks MOUT_CLKOUT>;
>> +			clock-names = "MCLK1";
>> +
>> +			AVDD2-supply = <&buck3_reg>;
>> +			DBVDD-supply = <&buck3_reg>;
> 
> No such supply, check the bindings.
> 

Well, it may not be in the bindings, but the driver definitely requires it :) See drivers/mfd/wm8994-core.c

What's the best way of dealing with this situation?

>> +			CPVDD-supply = <&buck3_reg>;
>> +			SPKVDD1-supply = <&buck3_reg>;
>> +			SPKVDD2-supply = <&buck3_reg>;
>> +
>> +			wlf,gpio-cfg = <0xa101 0x8100 0x0100 0x0100 0x8100
>> +					0xa101 0x0100 0x8100 0x0100 0x0100
>> +					0x0100>;
>> +
>> +			wlf,ldo1ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
>> +			wlf,ldo2ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
>> +
>> +			wlf,lineout1-se;
>> +			wlf,lineout2-se;
>> +
>> +			assigned-clocks = <&clocks MOUT_CLKOUT>;
>> +			assigned-clock-rates = <0>;
>> +			assigned-clock-parents = <&xusbxti>;
>> +
>> +			pinctrl-names = "default";
>> +			pinctrl-0 = <&codec_ldo>;
>> +		};
>> +	};
>> +
>> +	i2c_accel: i2c-gpio-1 {
>> +		compatible = "i2c-gpio";
>> +		sda-gpios = <&gpj3 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> +		scl-gpios = <&gpj3 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>> +		i2c-gpio,delay-us = <2>;
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		pinctrl-names = "default";
>> +		pinctrl-0 = <&accel_i2c_pins>;
>> +
>> +		/* bma023 accelerometer, no mainline binding */
> 
> status disabled ... unless you need it for user-space I2C tools?
> 

Nope, but wanted to add them all in due to adding the si4709 in galaxys.  I was having
issues with accidentally overwriting previously named nodes (ie having i2c-gpio-0 in
both the common dtsi and the device specific dts) so I wanted to get the numbers
nailed down.



<snip>

>>  
>>  &pwm {
>> diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
>> index 94dcb9b64b9a..42e6e2de197d 100644
>> --- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
>> +++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
>> @@ -278,3 +278,9 @@
>>  		PIN_SLP(mp07-7, INPUT, DOWN);
>>  	};
>>  };
>> +
>> +&wm8994 {
>> +	/* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
>> +	wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
>> +		0x0100 0x8100 0x0100 0x0100 0x0100>;
> 
> Indent the line till opening <.

Will do.

> 
> Best regards,
> Krzysztof
> 


Thanks,
Jonathan
Krzysztof Kozlowski May 1, 2020, 1:31 p.m. UTC | #3
On Tue, Apr 28, 2020 at 04:32:56PM -0700, Jonathan Bakker wrote:
> Hi Krzysztof,
> 
> On 2020-04-28 3:20 a.m., Krzysztof Kozlowski wrote:
> > On Sun, Apr 26, 2020 at 11:35:57AM -0700, Jonathan Bakker wrote:
> >> Add support for following devices:
> >>   - touchkeys connected over i2c-gpio
> >>   - s6e63m0 panel connected over spi-gpio
> >>   - fsa9480 microusb switch over i2c-gpio
> >>   - wm8994 over i2c-gpio (no machine driver yet)
> >>   - all common i2c-gpio devices
> > 
> > Please split it per functionality, e.g.:
> > 1. Add sound,
> > 2. Add panel,
> > 3. Add touchkeys (unless part of panel),
> > 4. The remaining i2c-gpio devices without bindings could go as one.
> 
> Ok, will do.
> 
> > 
> >>
> >> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> >> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> >> ---
> >>  arch/arm/boot/dts/s5pv210-aries.dtsi      | 282 ++++++++++++++++++++--
> >>  arch/arm/boot/dts/s5pv210-fascinate4g.dts |   6 +
> >>  2 files changed, 270 insertions(+), 18 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
> >> index f83df426f2b6..ef966d13d83d 100644
> >> --- a/arch/arm/boot/dts/s5pv210-aries.dtsi
> >> +++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
> >> @@ -12,8 +12,14 @@
> >>  	compatible = "samsung,aries", "samsung,s5pv210";
> >>  
> >>  	aliases {
> >> +		i2c4 = &i2c_sound;
> >> +		i2c5 = &i2c_accel;
> >>  		i2c6 = &i2c_pmic;
> >> +		i2c7 = &i2c_musb;
> >>  		i2c9 = &i2c_fuel;
> >> +		i2c10 = &i2c_touchkey;
> >> +		i2c11 = &i2c_prox;
> >> +		i2c12 = &i2c_magnetometer;
> >>  	};
> >>  
> >>  	memory@30000000 {
> >> @@ -48,6 +54,18 @@
> >>  		gpio = <&gpj1 1 GPIO_ACTIVE_HIGH>;
> >>  	};
> >>  
> >> +	touchkey_vdd: regulator-fixed-1 {
> >> +		compatible = "regulator-fixed";
> >> +		regulator-name = "VTOUCH_3.3V";
> >> +		regulator-min-microvolt = <3300000>;
> >> +		regulator-max-microvolt = <3300000>;
> >> +		enable-active-high;
> >> +		gpio = <&gpj3 2 GPIO_ACTIVE_HIGH>;
> >> +
> >> +		pinctrl-names = "default";
> >> +		pinctrl-0 = <&touchkey_vdd_ena>;
> >> +	};
> >> +
> >>  	wifi_pwrseq: wifi-pwrseq {
> >>  		compatible = "mmc-pwrseq-simple";
> >>  		reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>;
> >> @@ -57,7 +75,69 @@
> >>  		power-off-delay-us = <500>;
> >>  	};
> >>  
> >> -	i2c_pmic: i2c-gpio-0 {
> >> +	i2c_sound: i2c-gpio-0 {
> >> +		compatible = "i2c-gpio";
> >> +		sda-gpios = <&mp05 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> >> +		scl-gpios = <&mp05 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> >> +		i2c-gpio,delay-us = <2>;
> >> +		#address-cells = <1>;
> >> +		#size-cells = <0>;
> >> +
> >> +		pinctrl-names = "default";
> >> +		pinctrl-0 = <&sound_i2c_pins>;
> >> +
> >> +		wm8994: wm8994@1a {
> >> +			compatible = "wlf,wm8994";
> >> +			reg = <0x1a>;
> >> +
> >> +			#sound-dai-cells = <0>;
> >> +
> >> +			gpio-controller;
> >> +			#gpio-cells = <2>;
> >> +
> >> +			clocks = <&clocks MOUT_CLKOUT>;
> >> +			clock-names = "MCLK1";
> >> +
> >> +			AVDD2-supply = <&buck3_reg>;
> >> +			DBVDD-supply = <&buck3_reg>;
> > 
> > No such supply, check the bindings.
> > 
> 
> Well, it may not be in the bindings, but the driver definitely requires it :) See drivers/mfd/wm8994-core.c
> 
> What's the best way of dealing with this situation?

I'll send a patch fixing the bindings. However don't you miss the
AVDD1-supply in such case? Driver should report error.

> 
> >> +			CPVDD-supply = <&buck3_reg>;
> >> +			SPKVDD1-supply = <&buck3_reg>;
> >> +			SPKVDD2-supply = <&buck3_reg>;
> >> +
> >> +			wlf,gpio-cfg = <0xa101 0x8100 0x0100 0x0100 0x8100
> >> +					0xa101 0x0100 0x8100 0x0100 0x0100
> >> +					0x0100>;
> >> +
> >> +			wlf,ldo1ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
> >> +			wlf,ldo2ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
> >> +
> >> +			wlf,lineout1-se;
> >> +			wlf,lineout2-se;
> >> +
> >> +			assigned-clocks = <&clocks MOUT_CLKOUT>;
> >> +			assigned-clock-rates = <0>;
> >> +			assigned-clock-parents = <&xusbxti>;
> >> +
> >> +			pinctrl-names = "default";
> >> +			pinctrl-0 = <&codec_ldo>;
> >> +		};
> >> +	};
> >> +
> >> +	i2c_accel: i2c-gpio-1 {
> >> +		compatible = "i2c-gpio";
> >> +		sda-gpios = <&gpj3 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> >> +		scl-gpios = <&gpj3 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> >> +		i2c-gpio,delay-us = <2>;
> >> +		#address-cells = <1>;
> >> +		#size-cells = <0>;
> >> +
> >> +		pinctrl-names = "default";
> >> +		pinctrl-0 = <&accel_i2c_pins>;
> >> +
> >> +		/* bma023 accelerometer, no mainline binding */
> > 
> > status disabled ... unless you need it for user-space I2C tools?
> > 
> 
> Nope, but wanted to add them all in due to adding the si4709 in galaxys.  I was having
> issues with accidentally overwriting previously named nodes (ie having i2c-gpio-0 in
> both the common dtsi and the device specific dts) so I wanted to get the numbers
> nailed down.

So add them with status disabled. This will document the HW without
enabling empty I2C GPIO bus.

Best regards,
Krzysztof
Jonathan Bakker May 1, 2020, 7:43 p.m. UTC | #4
Hi Krzysztof,

On 2020-05-01 6:31 a.m., Krzysztof Kozlowski wrote:
>>
>> Well, it may not be in the bindings, but the driver definitely requires it :) See drivers/mfd/wm8994-core.c
>>
>> What's the best way of dealing with this situation?
> 
> I'll send a patch fixing the bindings. However don't you miss the
> AVDD1-supply in such case? Driver should report error.
> 

Thanks for sending the patch.

AVDD1 and DCVDD are provided internally, via drivers/regulator/wm8994.c and are enabled
by wlf,ldo1ena and wlf,ldo2ena pins.  It's a bit messy, but that's how it's done.

>>
>>>> +			CPVDD-supply = <&buck3_reg>;
>>>> +			SPKVDD1-supply = <&buck3_reg>;
>>>> +			SPKVDD2-supply = <&buck3_reg>;
>>>> +
>>>> +			wlf,gpio-cfg = <0xa101 0x8100 0x0100 0x0100 0x8100
>>>> +					0xa101 0x0100 0x8100 0x0100 0x0100
>>>> +					0x0100>;
>>>> +
>>>> +			wlf,ldo1ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
>>>> +			wlf,ldo2ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
>>>> +
>>>> +			wlf,lineout1-se;
>>>> +			wlf,lineout2-se;
>>>> +
>>>> +			assigned-clocks = <&clocks MOUT_CLKOUT>;
>>>> +			assigned-clock-rates = <0>;
>>>> +			assigned-clock-parents = <&xusbxti>;
>>>> +
>>>> +			pinctrl-names = "default";
>>>> +			pinctrl-0 = <&codec_ldo>;
>>>> +		};
>>>> +	};
>>>> +
>>>> +	i2c_accel: i2c-gpio-1 {
>>>> +		compatible = "i2c-gpio";
>>>> +		sda-gpios = <&gpj3 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>>>> +		scl-gpios = <&gpj3 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
>>>> +		i2c-gpio,delay-us = <2>;
>>>> +		#address-cells = <1>;
>>>> +		#size-cells = <0>;
>>>> +
>>>> +		pinctrl-names = "default";
>>>> +		pinctrl-0 = <&accel_i2c_pins>;
>>>> +
>>>> +		/* bma023 accelerometer, no mainline binding */
>>>
>>> status disabled ... unless you need it for user-space I2C tools?
>>>
>>
>> Nope, but wanted to add them all in due to adding the si4709 in galaxys.  I was having
>> issues with accidentally overwriting previously named nodes (ie having i2c-gpio-0 in
>> both the common dtsi and the device specific dts) so I wanted to get the numbers
>> nailed down.
> 
> So add them with status disabled. This will document the HW without
> enabling empty I2C GPIO bus.

Sounds good, will do.

> 
> Best regards,
> Krzysztof
> 


Thanks,
Jonathan
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/s5pv210-aries.dtsi b/arch/arm/boot/dts/s5pv210-aries.dtsi
index f83df426f2b6..ef966d13d83d 100644
--- a/arch/arm/boot/dts/s5pv210-aries.dtsi
+++ b/arch/arm/boot/dts/s5pv210-aries.dtsi
@@ -12,8 +12,14 @@ 
 	compatible = "samsung,aries", "samsung,s5pv210";
 
 	aliases {
+		i2c4 = &i2c_sound;
+		i2c5 = &i2c_accel;
 		i2c6 = &i2c_pmic;
+		i2c7 = &i2c_musb;
 		i2c9 = &i2c_fuel;
+		i2c10 = &i2c_touchkey;
+		i2c11 = &i2c_prox;
+		i2c12 = &i2c_magnetometer;
 	};
 
 	memory@30000000 {
@@ -48,6 +54,18 @@ 
 		gpio = <&gpj1 1 GPIO_ACTIVE_HIGH>;
 	};
 
+	touchkey_vdd: regulator-fixed-1 {
+		compatible = "regulator-fixed";
+		regulator-name = "VTOUCH_3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		enable-active-high;
+		gpio = <&gpj3 2 GPIO_ACTIVE_HIGH>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touchkey_vdd_ena>;
+	};
+
 	wifi_pwrseq: wifi-pwrseq {
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&gpg1 2 GPIO_ACTIVE_LOW>;
@@ -57,7 +75,69 @@ 
 		power-off-delay-us = <500>;
 	};
 
-	i2c_pmic: i2c-gpio-0 {
+	i2c_sound: i2c-gpio-0 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&mp05 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&mp05 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&sound_i2c_pins>;
+
+		wm8994: wm8994@1a {
+			compatible = "wlf,wm8994";
+			reg = <0x1a>;
+
+			#sound-dai-cells = <0>;
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			clocks = <&clocks MOUT_CLKOUT>;
+			clock-names = "MCLK1";
+
+			AVDD2-supply = <&buck3_reg>;
+			DBVDD-supply = <&buck3_reg>;
+			CPVDD-supply = <&buck3_reg>;
+			SPKVDD1-supply = <&buck3_reg>;
+			SPKVDD2-supply = <&buck3_reg>;
+
+			wlf,gpio-cfg = <0xa101 0x8100 0x0100 0x0100 0x8100
+					0xa101 0x0100 0x8100 0x0100 0x0100
+					0x0100>;
+
+			wlf,ldo1ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
+			wlf,ldo2ena = <&gpf3 4 GPIO_ACTIVE_HIGH>;
+
+			wlf,lineout1-se;
+			wlf,lineout2-se;
+
+			assigned-clocks = <&clocks MOUT_CLKOUT>;
+			assigned-clock-rates = <0>;
+			assigned-clock-parents = <&xusbxti>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&codec_ldo>;
+		};
+	};
+
+	i2c_accel: i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpj3 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpj3 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&accel_i2c_pins>;
+
+		/* bma023 accelerometer, no mainline binding */
+	};
+
+	i2c_pmic: i2c-gpio-2 {
 		compatible = "i2c-gpio";
 		sda-gpios = <&gpj4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		scl-gpios = <&gpj4 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
@@ -137,8 +217,6 @@ 
 					regulator-name = "VLCD_1.8V";
 					regulator-min-microvolt = <1800000>;
 					regulator-max-microvolt = <1800000>;
-					/* Till we get panel driver */
-					regulator-always-on;
 
 					regulator-state-mem {
 						regulator-off-in-suspend;
@@ -237,8 +315,6 @@ 
 					regulator-name = "VCC_3.0V_LCD";
 					regulator-min-microvolt = <3000000>;
 					regulator-max-microvolt = <3000000>;
-					/* Till we get panel driver */
-					regulator-always-on;
 
 					regulator-state-mem {
 						regulator-off-in-suspend;
@@ -309,7 +385,26 @@ 
 		};
 	};
 
-	i2c_fuel: i2c-gpio-1 {
+	i2c_musb: i2c-gpio-3 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpj3 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpj3 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&musb_i2c_pins>;
+
+		fsa9480: musb@25 {
+			compatible = "fcs,fsa9480";
+			reg = <0x25>;
+			interrupt-parent = <&gph2>;
+			interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
+		};
+	};
+
+	i2c_fuel: i2c-gpio-4 {
 		compatible = "i2c-gpio";
 		sda-gpios = <&mp05 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
 		scl-gpios = <&mp05 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
@@ -328,6 +423,60 @@ 
 		};
 	};
 
+	i2c_touchkey: i2c-gpio-5 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpj3 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpj3 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&touchkey_i2c_pins>;
+
+		touchkey@20 {
+			compatible = "cypress,aries-touchkey";
+			reg = <0x20>;
+			vdd-supply = <&touchkey_vdd>;
+			vcc-supply = <&buck3_reg>;
+			linux,keycodes = <KEY_MENU KEY_BACK
+					  KEY_HOMEPAGE KEY_SEARCH>;
+			interrupt-parent = <&gpj4>;
+			interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&touchkey_irq>;
+		};
+	};
+
+	i2c_prox: i2c-gpio-6 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpg2 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpg0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&prox_i2c_pins>;
+
+		/* Sharp gp2a prox/light sensor, incomplete mainline binding */
+	};
+
+	i2c_magnetometer: i2c-gpio-7 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpj0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpj0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&magnetometer_i2c_pins>;
+
+		/* Yamaha yas529 magnetometer, no mainline binding */
+	};
+
 	vibrator: pwm-vibrator {
 		compatible = "pwm-vibrator";
 		pwms = <&pwm 1 44642 0>;
@@ -343,6 +492,39 @@ 
 		offset = <0x681c>; /* PS_HOLD_CONTROL */
 		value = <0x5200>;
 	};
+
+	spi_lcd: spi-gpio-0 {
+		compatible = "spi-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sck-gpios = <&mp04 1 GPIO_ACTIVE_HIGH>;
+		mosi-gpios = <&mp04 3 GPIO_ACTIVE_HIGH>;
+		cs-gpios = <&mp01 1 GPIO_ACTIVE_HIGH>;
+		num-chipselects = <1>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_spi_pins>;
+
+		panel@0 {
+			compatible = "samsung,s6e63m0";
+			reg = <0>;
+			reset-gpios = <&mp05 5 GPIO_ACTIVE_LOW>;
+			vdd3-supply = <&ldo7_reg>;
+			vci-supply = <&ldo17_reg>;
+			spi-cs-high;
+			spi-max-frequency = <1200000>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&panel_rst>;
+
+			port {
+				lcd_ep: endpoint {
+					remote-endpoint = <&fimd_ep>;
+				};
+			};
+		};
+	};
 };
 
 &fimd {
@@ -353,18 +535,13 @@ 
 	samsung,invert-vden;
 	samsung,invert-vclk;
 
-	display-timings {
-		timing-0 {
-			/* 480x800@60Hz */
-			clock-frequency = <25628040>;
-			hactive = <480>;
-			vactive = <800>;
-			hfront-porch = <16>;
-			hback-porch = <16>;
-			hsync-len = <2>;
-			vfront-porch = <28>;
-			vback-porch = <1>;
-			vsync-len = <2>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	port@3 {
+		reg = <3>;
+		fimd_ep: endpoint {
+			remote-endpoint = <&lcd_ep>;
 		};
 	};
 };
@@ -405,6 +582,19 @@ 
 		samsung,pin-val = <1>;
 	};
 
+	codec_ldo: codec-ldo {
+		samsung,pins = "gpf3-4";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+	};
+
+	prox_i2c_pins: gp2a-i2c-pins {
+		samsung,pins = "gpg0-2", "gpg2-2";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
 	wlan_gpio_rst: wlan-gpio-rst {
 		samsung,pins = "gpg1-2";
 		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
@@ -438,6 +628,13 @@ 
 		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
 	};
 
+	magnetometer_i2c_pins: yas529-i2c-pins {
+		samsung,pins = "gpj0-0", "gpj0-1";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
 	ts_irq: ts-irq {
 		samsung,pins = "gpj0-5";
 		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
@@ -445,17 +642,66 @@ 
 		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
 	};
 
+	touchkey_i2c_pins: touchkey-i2c-pins {
+		samsung,pins = "gpj3-0", "gpj3-1";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
+	touchkey_vdd_ena: touchkey-vdd-ena {
+		samsung,pins = "gpj3-2";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
+	musb_i2c_pins: musb-i2c-pins {
+		samsung,pins = "gpj3-4", "gpj3-5";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
+	accel_i2c_pins: accel-i2c-pins {
+		samsung,pins = "gpj3-6", "gpj3-7";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
 	pmic_i2c_pins: pmic-i2c-pins {
 		samsung,pins = "gpj4-0", "gpj4-3";
 		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
 		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
 	};
 
+	touchkey_irq: touchkey-irq {
+		samsung,pins = "gpj4-1";
+		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+		samsung,pin-pud = <S3C64XX_PIN_PULL_UP>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
+	lcd_spi_pins: spi-lcd-pins {
+		samsung,pins = "mp01-1", "mp04-1", "mp04-3";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
 	fg_i2c_pins: fg-i2c-pins {
 		samsung,pins = "mp05-0", "mp05-1";
 		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
 		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
 	};
+
+	sound_i2c_pins: sound-i2c-pins {
+		samsung,pins = "mp05-2", "mp05-3";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
+
+	panel_rst: panel-rst {
+		samsung,pins = "mp05-5";
+		samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
+		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
+	};
 };
 
 &pwm {
diff --git a/arch/arm/boot/dts/s5pv210-fascinate4g.dts b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
index 94dcb9b64b9a..42e6e2de197d 100644
--- a/arch/arm/boot/dts/s5pv210-fascinate4g.dts
+++ b/arch/arm/boot/dts/s5pv210-fascinate4g.dts
@@ -278,3 +278,9 @@ 
 		PIN_SLP(mp07-7, INPUT, DOWN);
 	};
 };
+
+&wm8994 {
+	/* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */
+	wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101
+		0x0100 0x8100 0x0100 0x0100 0x0100>;
+};