Skip to contentSkip to conversation

ARM: mvebu: switch db-88f6820-amc to DM for i2c

PATCH New Chris Packham 3 participants 4 messages May 2, 2017 – May 9, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mvebu: switch db-88f6820-amc to DM for i2c

Move existing configuration from header file to defconfig or dts as appropriate.

---

 arch/arm/dts/armada-385-amc.dts  | 3 +++
 configs/db-88f6820-amc_defconfig | 2 ++
 include/configs/db-88f6820-amc.h | 7 -------
 3 files changed, 5 insertions(+), 7 deletions(-)
arch/arm/dts/armada-385-amc.dts +3 -0
index a5a8a7f186db..4649c910c7b0 100644
@@ -54,6 +54,7 @@
 	aliases {
 		ethernet0 = &eth0;
 		ethernet1 = &eth1;
+		i2c0 = &i2c0;
 		spi1 = &spi1;
 	};
 
@@ -68,6 +69,8 @@
 
 		internal-regs {
 			i2c at 11000 {
+				clock-frequency = <100000>;
+				u-boot,i2c-slave-addr = <0x0>;
 				pinctrl-names = "default";
 				pinctrl-0 = <&i2c0_pins>;
 				status = "okay";
configs/db-88f6820-amc_defconfig +2 -0
index e90526a40226..63fc4db6c882 100644
@@ -36,6 +36,8 @@ CONFIG_EFI_PARTITION=y
 # CONFIG_PARTITION_UUIDS is not set
 # CONFIG_SPL_PARTITION_UUIDS is not set
 CONFIG_SPL_OF_TRANSLATE=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MVTWSI=y
 # CONFIG_MMC is not set
 CONFIG_NAND_PXA3XX=y
 CONFIG_SPI_FLASH=y
include/configs/db-88f6820-amc.h +0 -7
index ba5c0901b1af..1cdefa054967 100644
@@ -27,13 +27,6 @@
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_PCI
 
-/* I2C */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_MVTWSI
-#define CONFIG_I2C_MVTWSI_BASE0		MVEBU_TWSI_BASE
-#define CONFIG_SYS_I2C_SLAVE		0x0
-#define CONFIG_SYS_I2C_SPEED		100000
-
 /* SPI NOR flash default params, used by sf commands */
 #define CONFIG_SF_DEFAULT_BUS		1
 #define CONFIG_SF_DEFAULT_SPEED		1000000
Signature · 1 line
2.11.0.24.ge6920cf
#1 lore raw

PATCH 1/1 ARM: mvebu: switch db-88f6820-amc to DM for i2c

Quoted 11 lines · Chris Packham

Move existing configuration from header file to defconfig or dts as appropriate.

---

 arch/arm/dts/armada-385-amc.dts  | 3 +++
 configs/db-88f6820-amc_defconfig | 2 ++
 include/configs/db-88f6820-amc.h | 7 -------
 3 files changed, 5 insertions(+), 7 deletions(-)