From e18a0d0cd77a8d9dbedbe251c4e822c9241a41fc Mon Sep 17 00:00:00 2001 From: David Wu Date: Tue, 8 Mar 2016 02:49:44 +0800 Subject: [PATCH] ARM64: dts: rockchip: add i2c2, i2c4 gpio func support for rk3366 Change-Id: I8a3c5dac5c23d90706c21ffb48f4ac15e4f1cffb Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3366-tb.dts | 52 +++++++++++++++------- arch/arm64/boot/dts/rockchip/rk3366.dtsi | 12 +++++ 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3366-tb.dts b/arch/arm64/boot/dts/rockchip/rk3366-tb.dts index 2221722e947a..e11a951142f0 100644 --- a/arch/arm64/boot/dts/rockchip/rk3366-tb.dts +++ b/arch/arm64/boot/dts/rockchip/rk3366-tb.dts @@ -260,6 +260,42 @@ rk_usb,dcpattach = <0x498 29 1>; }; }; + + i2c@2 { + compatible = "i2c-gpio"; + gpios = <&gpio5 15 GPIO_ACTIVE_HIGH>, /* sda */ + <&gpio5 16 GPIO_ACTIVE_HIGH>; /* scl */ + i2c-gpio,delay-us = <2>; /* ~100 kHz */ + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_gpio>; + status = "disabled"; + }; + + i2c@4 { + compatible = "i2c-gpio"; + gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>, /* sda */ + <&gpio5 8 GPIO_ACTIVE_HIGH>; /* scl */ + i2c-gpio,delay-us = <2>; /* ~100 kHz */ + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c4_gpio>; + status = "okay"; + + gt9xx: gt9xx@14 { + compatible = "goodix,gt9xx"; + reg = <0x14>; + touch-gpio = <&gpio5 11 IRQ_TYPE_LEVEL_LOW>; + reset-gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>; + max-x = <1200>; + max-y = <1900>; + tp-size = <911>; + tp-supply = <&vcc_tp>; + status = "okay"; + }; + }; }; &emmc { @@ -532,22 +568,6 @@ }; }; -&i2c4 { - status = "okay"; - - gt9xx: gt9xx@14 { - compatible = "goodix,gt9xx"; - reg = <0x14>; - touch-gpio = <&gpio5 11 IRQ_TYPE_LEVEL_LOW>; - reset-gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>; - max-x = <1200>; - max-y = <1900>; - tp-size = <911>; - tp-supply = <&vcc_tp>; - status = "okay"; - }; -}; - &i2s_8ch { status = "okay"; rockchip,i2s-broken-burst-len; diff --git a/arch/arm64/boot/dts/rockchip/rk3366.dtsi b/arch/arm64/boot/dts/rockchip/rk3366.dtsi index 4ceaa4d917c2..a8cfeed37d80 100644 --- a/arch/arm64/boot/dts/rockchip/rk3366.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3366.dtsi @@ -1025,6 +1025,12 @@ <5 15 RK_FUNC_2 &pcfg_pull_none>, <5 16 RK_FUNC_2 &pcfg_pull_none>; }; + + i2c2_gpio: i2c2-gpio { + rockchip,pins = + <5 15 RK_FUNC_GPIO &pcfg_pull_none>, + <5 16 RK_FUNC_GPIO &pcfg_pull_none>; + }; }; i2c3 { @@ -1041,6 +1047,12 @@ <5 8 RK_FUNC_1 &pcfg_pull_none>, <5 9 RK_FUNC_1 &pcfg_pull_none>; }; + + i2c4_gpio: i2c4-gpio { + rockchip,pins = + <5 8 RK_FUNC_GPIO &pcfg_pull_none>, + <5 9 RK_FUNC_GPIO &pcfg_pull_none>; + }; }; i2c5 { -- 2.34.1