mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-07 04:20:43 +01:00
ipq6018: Enable i2c subsytem
Change-Id: Ia727b07803f738588241b8406f125ec3f9ac1472 Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
This commit is contained in:
parent
f015dd1bbb
commit
a80c2f0118
5 changed files with 79 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
aliases {
|
||||
console = "/serial@78af000";
|
||||
mmc = "/sdhci@7804000";
|
||||
i2c0 = "/i2c@78b6000";
|
||||
};
|
||||
serial@78af000 {
|
||||
compatible = "qca,ipq-uartdm";
|
||||
|
|
@ -47,4 +48,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>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
22
arch/arm/include/asm/arch-ipq6018/clk.h
Normal file
22
arch/arm/include/asm/arch-ipq6018/clk.h
Normal 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*/
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
23
board/qca/arm/ipq6018/clock.c
Normal file
23
board/qca/arm/ipq6018/clock.c
Normal 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
|
||||
|
||||
|
|
@ -64,6 +64,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 + \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue