diff mbox

[U-Boot,1/5] rockchip: i2c: enable i2c for rk3399

Message ID 1491653858-9973-2-git-send-email-eric.gao@rock-chips.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

eric.gao@rock-chips.com April 8, 2017, 12:17 p.m. UTC
From: "eric.gao" <eric.gao@rock-chips.com>

To enable mipi display, we need to enable pmic
rk808 first for lcd3v3 power,which use i2c0 to
communicate with soc. So enable i2c0.

Signed-off-by: eric.gao <eric.gao@rock-chips.com>

eric.gao@rock-chips.com

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
---

 arch/arm/dts/rk3399.dtsi     | 16 ++++++++++++++++
 configs/evb-rk3399_defconfig |  1 +
 drivers/i2c/rk_i2c.c         |  1 +
 3 files changed, 18 insertions(+)

Comments

Simon Glass April 9, 2017, 7:28 p.m. UTC | #1
Hi Eric,

On 8 April 2017 at 06:17, Eric Gao <eric.gao@rock-chips.com> wrote:
> From: "eric.gao" <eric.gao@rock-chips.com>
>
> To enable mipi display, we need to enable pmic
> rk808 first for lcd3v3 power,which use i2c0 to
> communicate with soc. So enable i2c0.
>
> Signed-off-by: eric.gao <eric.gao@rock-chips.com>
>
> eric.gao@rock-chips.com

Can you fix up these duplicates? You see to have two slightly
different email addresses.

>
> Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
> ---
>
>  arch/arm/dts/rk3399.dtsi     | 16 ++++++++++++++++
>  configs/evb-rk3399_defconfig |  1 +
>  drivers/i2c/rk_i2c.c         |  1 +
>  3 files changed, 18 insertions(+)

Acked-by: Simon Glass <sjg@chromium.org>

This has come through as one thread with lots of resends in my email.
I'm not sure if you are using patman? It normally helps to make things
right. Also check your name and email in ~/.gitconfig

Regards,
Simon
diff mbox

Patch

diff --git a/arch/arm/dts/rk3399.dtsi b/arch/arm/dts/rk3399.dtsi
index 456fdb6..93e3bf4 100644
--- a/arch/arm/dts/rk3399.dtsi
+++ b/arch/arm/dts/rk3399.dtsi
@@ -26,6 +26,7 @@ 
 		serial4 = &uart4;
 		mmc0 = &sdhci;
 		mmc1 = &sdmmc;
+		i2c0 = &i2c0;
 	};
 
 	cpus {
@@ -651,6 +652,21 @@ 
 		status = "disabled";
 	};
 
+	i2c0: i2c@ff3c0000 {
+		compatible = "rockchip,rk3399-i2c";
+		reg = <0x0 0xff3c0000 0x0 0x1000>;
+		assigned-clocks = <&pmucru SCLK_I2C0_PMU>;
+		assigned-clock-rates = <200000000>;
+		clocks = <&pmucru SCLK_I2C0_PMU>, <&pmucru PCLK_I2C0_PMU>;
+		clock-names = "i2c", "pclk";
+		interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH 0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2c0_xfer>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
 	pinctrl: pinctrl {
 		u-boot,dm-pre-reloc;
 		compatible = "rockchip,rk3399-pinctrl";
diff --git a/configs/evb-rk3399_defconfig b/configs/evb-rk3399_defconfig
index bedc1fd..2e2f9a8 100644
--- a/configs/evb-rk3399_defconfig
+++ b/configs/evb-rk3399_defconfig
@@ -58,3 +58,4 @@  CONFIG_USB_EHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_ERRNO_STR=y
+CONFIG_SYS_I2C_ROCKCHIP=y
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 7c701cb..a4c8c2ba 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -381,6 +381,7 @@  static const struct dm_i2c_ops rockchip_i2c_ops = {
 
 static const struct udevice_id rockchip_i2c_ids[] = {
 	{ .compatible = "rockchip,rk3288-i2c" },
+	{ .compatible = "rockchip,rk3399-i2c" },
 	{ }
 };