Merge "ipq6018: Enable i2c subsytem"

This commit is contained in:
Linux Build Service Account 2018-11-20 22:15:57 -08:00 committed by Gerrit - the friendly Code Review server
commit caac981e1b
5 changed files with 79 additions and 0 deletions

View file

@ -22,6 +22,7 @@
aliases {
console = "/serial@78af000";
mmc = "/sdhci@7804000";
i2c0 = "/i2c@78b6000";
};
serial@78af000 {
compatible = "qca,ipq-uartdm";
@ -48,4 +49,30 @@
compatible = "qcom,sdhci-msm";
};
i2c0: i2c@78b6000 {
compatible = "qcom,qup-i2c";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x78b6000 0x600>;
clock-frequency = <400000>;
i2c_gpio {
gpio1 {
gpio = <42>;
func = <2>;
pull = <GPIO_NO_PULL>;
drvstr = <GPIO_8MA>;
oe = <GPIO_OE_ENABLE>;
};
gpio2 {
gpio = <43>;
func = <2>;
pull = <GPIO_NO_PULL>;
drvstr = <GPIO_8MA>;
oe = <GPIO_OE_ENABLE>;
};
};
};
};

View file

@ -0,0 +1,22 @@
/*
* Copyright (c) 2015-2016, 2018 The Linux Foundation. All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef IPQ6018_CLK_H
#define IPQ6018_CLK_H
/* I2C clocks configuration */
#ifdef CONFIG_IPQ6018_I2C
void i2c_clock_config(void);
#endif
#endif /*IPQ6018_CLK_H*/

View file

@ -1,4 +1,5 @@
ccflags-y += -I$(srctree)/board/qca/arm/ipq6018
cppflags-y += -I$(srctree)/board/qca/arm/ipq6018
obj-y := ipq6018.o
obj-y += clock.o

View file

@ -0,0 +1,23 @@
/*
* Copyright (c) 2015-2016, 2018 The Linux Foundation. All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <common.h>
#include <asm/arch-ipq6018/clk.h>
#ifdef CONFIG_IPQ6018_I2C
void i2c_clock_config(void)
{
return;
}
#endif

View file

@ -67,6 +67,12 @@
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE -\
CONFIG_SYS_MALLOC_LEN - CONFIG_ENV_SIZE -\
GENERATED_BD_INFO_SIZE)
#define CONFIG_IPQ6018_I2C 1
#ifdef CONFIG_IPQ6018_I2C
#define CONFIG_SYS_I2C_QUP
#define CONFIG_CMD_I2C
#define CONFIG_DM_I2C
#endif
#define CONFIG_SYS_MAXARGS 16
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \