]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: mvebu: switch db-88f6820-amc to DM for i2c
authorChris Packham <judge.packham@gmail.com>
Tue, 2 May 2017 08:35:25 +0000 (20:35 +1200)
committerStefan Roese <sr@denx.de>
Tue, 9 May 2017 11:38:18 +0000 (13:38 +0200)
Move existing configuration from header file to defconfig or dts as
appropriate.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/dts/armada-385-amc.dts
configs/db-88f6820-amc_defconfig
include/configs/db-88f6820-amc.h

index a5a8a7f186db5d1918eda3c9ff2568ebcde0150b..4649c910c7b0c55859b0c24d3275fcb15becadad 100644 (file)
@@ -54,6 +54,7 @@
        aliases {
                ethernet0 = &eth0;
                ethernet1 = &eth1;
+               i2c0 = &i2c0;
                spi1 = &spi1;
        };
 
@@ -68,6 +69,8 @@
 
                internal-regs {
                        i2c@11000 {
+                               clock-frequency = <100000>;
+                               u-boot,i2c-slave-addr = <0x0>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&i2c0_pins>;
                                status = "okay";
index e90526a4022681131e2eb3cafd0cb20961353618..63fc4db6c88245dd3845829a7df339fd059cde7a 100644 (file)
@@ -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
index ba5c0901b1af6ddb2ee605867e1bfbd1d453657a..1cdefa05496746a89e44841e6fd1be00108d14ed 100644 (file)
 #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