mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-07 17:57:38 +01:00
ipq5018: Enable I2C support
Change-Id: Ifd672462a78f48a51f7c0d4fc5fdfb08d9ae9d57 Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
This commit is contained in:
parent
346d35a139
commit
f92636faf1
7 changed files with 89 additions and 2 deletions
|
|
@ -22,6 +22,7 @@
|
|||
aliases {
|
||||
console = "/serial@78AF000";
|
||||
mmc = "/sdhci@7804000";
|
||||
i2c0 = "/i2c@78b6000";
|
||||
};
|
||||
|
||||
mmc: sdhci@7804000 {
|
||||
|
|
|
|||
|
|
@ -113,4 +113,31 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
i2c@78b6000 {
|
||||
compatible = "qcom,qup-i2c";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x78b6000 0x600>;
|
||||
clock-frequency = <400000>;
|
||||
|
||||
i2c_gpio {
|
||||
gpio1 {
|
||||
gpio = <5>;
|
||||
func = <5>;
|
||||
pull = <GPIO_NO_PULL>;
|
||||
drvstr = <GPIO_8MA>;
|
||||
oe = <GPIO_OE_ENABLE>;
|
||||
};
|
||||
|
||||
gpio2 {
|
||||
gpio = <6>;
|
||||
func = <5>;
|
||||
pull = <GPIO_NO_PULL>;
|
||||
drvstr = <GPIO_8MA>;
|
||||
oe = <GPIO_OE_ENABLE>;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
22
arch/arm/include/asm/arch-ipq5018/clk.h
Normal file
22
arch/arm/include/asm/arch-ipq5018/clk.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2016, 2018-2019 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 IPQ5018_CLK_H
|
||||
#define IPQ5018_CLK_H
|
||||
|
||||
/* I2C clocks configuration */
|
||||
#ifdef CONFIG_IPQ5018_I2C
|
||||
void i2c_clock_config(void);
|
||||
#endif
|
||||
|
||||
#endif /*IPQ5018_CLK_H*/
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2017, 2019 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
|
||||
|
|
@ -16,6 +16,10 @@
|
|||
#include <asm/u-boot.h>
|
||||
#include <asm/arch-qca-common/smem.h>
|
||||
|
||||
#ifdef CONFIG_ARCH_IPQ5018
|
||||
#include <asm/arch-ipq5018/clk.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_IPQ6018
|
||||
#include <asm/arch-ipq6018/clk.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
ccflags-y += -I$(srctree)/board/qca/arm/ipq5018
|
||||
cppflags-y += -I$(srctree)/board/qca/arm/ipq5018
|
||||
obj-y := ipq5018.o
|
||||
|
||||
obj-y += clock.o
|
||||
|
||||
|
|
|
|||
23
board/qca/arm/ipq5018/clock.c
Normal file
23
board/qca/arm/ipq5018/clock.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2016, 2018-2019 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-ipq5018/clk.h>
|
||||
|
||||
#ifdef CONFIG_IPQ5018_I2C
|
||||
void i2c_clock_config(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -185,6 +185,16 @@ extern loff_t board_env_size;
|
|||
#define CONFIG_MMC_FORCE_CAP_4BIT_BUSWIDTH
|
||||
#endif
|
||||
|
||||
/*
|
||||
* I2C Enable
|
||||
*/
|
||||
#define CONFIG_IPQ5018_I2C
|
||||
|
||||
#ifdef CONFIG_IPQ5018_I2C
|
||||
#define CONFIG_SYS_I2C_QUP
|
||||
#define CONFIG_CMD_I2C
|
||||
#define CONFIG_DM_I2C
|
||||
#endif
|
||||
/*
|
||||
* Expose SPI driver as a pseudo NAND driver to make use
|
||||
* of U-Boot's MTD framework.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue