m68k: move CONFIG_SYS_I2C to CFG_ namespace
Subsystems (3)
PATCH 1/6 m68k: move CONFIG_SYS_I2C to CFG_ namespace
Move CONFIG_SYS_I2C_X to CFG_ namespace.
This is a preliminary step to move to dm i2c.
--- arch/m68k/cpu/mcf5445x/cpu_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/m68k/cpu/mcf5445x/cpu_init.c +3 -3
@@ -159,14 +159,14 @@ void cpu_init_f(void)/* NAND */ out_8 (&pm->pmcr0,63 ); -#ifdef CONFIG_SYS_I2C_0 +#ifdef CFG_SYS_I2C_0 out_8 (&gpio->par_cani2c,0xF0 );/* I2C0 pull up */ out_be16 (&gpio->pcr_b,0x003C );/* I2C0 max speed */ out_8 (&gpio->srcr_cani2c,0x03 );#endif -#ifdef CONFIG_SYS_I2C_2 +#ifdef CFG_SYS_I2C_2 /* I2C2 */ out_8 (&gpio->par_ssi0h,0xA0 );/* I2C2, UART7 */
@@ -184,7 +184,7 @@ void cpu_init_f(void)/* I2C2 pull up */ out_be16 (&gpio->pcr_h,0xF000 );#endif -#ifdef CONFIG_SYS_I2C_5 +#ifdef CFG_SYS_I2C_5 /* I2C5 */ out_8 (&gpio->par_uart1,0x0A );/* I2C5 pull up */
Signature · 1 line
2.40.0
PATCH 2/6 board: stmark2: add i2c0 pinmux pad configuration
Add CFG option to enable proper pinmux pad setting for i2c0.
--- include/configs/stmark2.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/stmark2.h +2 -0
@@ -96,4 +96,6 @@ CFG_SYS_INIT_RAM_SIZE - 12) +#define CFG_SYS_I2C_0 +#endif /* __STMARK2_CONFIG_H */
Signature · 1 line
2.40.0
PATCH 4/6 i2c: fsl_i2c: fix m68k transferts
In reply to Angelo DureghelloThis driver is actually used for powerpc and m68k/ColdFire.
On ColdFire SoC's, interrupt flag get not set if IIEN flag (mbcr bit6, interrupt enabled) is not set appropriately before each transfert. As a result, the transfert hangs forever waiting for IIEN. This patch set IIEN before each transfert, while considering this fix as not harming powerpc arch.
--- arch/m68k/include/asm/fsl_i2c.h | 10 ++++++++++ drivers/i2c/fsl_i2c.c | 16 +++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-)
arch/m68k/include/asm/fsl_i2c.h +10 -0
@@ -57,4 +57,14 @@ typedef struct fsl_i2c_base {#define I2C_DR_RES ~(I2C_DR) } fsl_i2c_t; +#if CONFIG_IS_ENABLED (DM_I2C ) +struct fsl_i2c_dev { +struct fsl_i2c_base __iomem *base;/* register base */ +u32 i2c_clk; +u32 index; +u8 slaveadd; +uint speed; +}; +#endif +#endif /* _ASM_I2C_H_ */
drivers/i2c/fsl_i2c.c +9 -7
@@ -278,7 +278,8 @@ static void __i2c_init(const struct fsl_i2c_base *base, int speed, intset_i2c_bus_speed (base, i2c_clk, speed);writeb (slaveadd <<1 , &base->adr);/* write slave address */ writeb (0x0 , &base->sr);/* clear status register */ -writeb (I2C_CR_MEN , &base->cr);/* start I2C controller */ +/* start I2C controller */ +writeb (I2C_CR_MEN |I2C_CR_MIEN , &base->cr); timeval =get_ticks ();while (readb (&base->sr) &I2C_SR_MBB ) {
@@ -346,7 +347,7 @@ static int i2c_wait(const struct fsl_i2c_base *base, int write)static int i2c_write_addr (const struct fsl_i2c_base *base,u8 dev,u8 dir,int rsta) { -writeb (I2C_CR_MEN |I2C_CR_MSTA |I2C_CR_MTX +writeb (I2C_CR_MEN |I2C_CR_MIEN |I2C_CR_MSTA |I2C_CR_MTX | (rsta ?I2C_CR_RSTA :0 ), &base->cr);
@@ -378,7 +379,8 @@ static int __i2c_read_data(const struct fsl_i2c_base *base, u8 *data, {int i; -writeb (I2C_CR_MEN |I2C_CR_MSTA | ((length ==1 ) ?I2C_CR_TXAK :0 ), +writeb (I2C_CR_MEN |I2C_CR_MIEN | +I2C_CR_MSTA | ((length ==1 ) ?I2C_CR_TXAK :0 ), &base->cr);/* dummy read */
@@ -390,13 +392,13 @@ static int __i2c_read_data(const struct fsl_i2c_base *base, u8 *data,/* Generate ack on last next to last byte */ if (i == length -2 ) -writeb (I2C_CR_MEN |I2C_CR_MSTA |I2C_CR_TXAK , - &base->cr); +writeb (I2C_CR_MEN |I2C_CR_MIEN |I2C_CR_MSTA | +I2C_CR_TXAK , &base->cr);/* Do not generate stop on last byte */ if (i == length -1 ) -writeb (I2C_CR_MEN |I2C_CR_MSTA |I2C_CR_MTX , - &base->cr); +writeb (I2C_CR_MEN |I2C_CR_MIEN |I2C_CR_MSTA | +I2C_CR_MTX , &base->cr); data[i] =readb (&base->dr); }
Signature · 1 line
2.40.0
PATCH 3/6 m68k: mcf5441x: fix CONFIG_SYS_FSL_I2C definition
In reply to Angelo DureghelloFix CONFIG_SYS_FSL_I2C to correct name CONFIG_SYS_I2C_FSL.
--- arch/m68k/cpu/mcf5445x/speed.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/m68k/cpu/mcf5445x/speed.c +2 -3
@@ -129,9 +129,8 @@ int get_clocks(void)setup_5441x_clocks ();#endif -#ifdef CONFIG_SYS_FSL_I2C - gd->arch.i2c1_clk = gd->bus_clk; -#endif +if (IS_ENABLED (CONFIG_SYS_I2C_FSL )) + gd->arch.i2c1_clk = gd->bus_clk;return (0 ); }
Signature · 1 line
2.40.0
PATCH 5/6 m68k: dts: add i2c nodes
In reply to Angelo DureghelloAdd all the i2c nodes for each family, and add specific i2c overwrites in the related board-specific dts.
--- arch/m68k/dts/M5208EVBE.dts | 6 +++ arch/m68k/dts/M5253DEMO.dts | 5 +++ arch/m68k/dts/M5275EVB.dts | 6 +++ arch/m68k/dts/M53017EVB.dts | 6 +++ arch/m68k/dts/M5329AFEE.dts | 6 +++ arch/m68k/dts/M5329BFEE.dts | 6 +++ arch/m68k/dts/M5373EVB.dts | 4 ++ arch/m68k/dts/astro_mcf5373l.dts | 6 +++ arch/m68k/dts/eb_cpu5282.dts | 9 ++++ arch/m68k/dts/eb_cpu5282_internal.dts | 9 ++++ arch/m68k/dts/mcf5208.dtsi | 10 +++++ arch/m68k/dts/mcf523x.dtsi | 10 +++++ arch/m68k/dts/mcf5249.dtsi | 28 +++++++++++++ arch/m68k/dts/mcf5253.dtsi | 28 +++++++++++++ arch/m68k/dts/mcf5271.dtsi | 10 +++++ arch/m68k/dts/mcf5275.dtsi | 10 +++++ arch/m68k/dts/mcf5282.dtsi | 10 +++++ arch/m68k/dts/mcf5301x.dtsi | 10 +++++ arch/m68k/dts/mcf5307.dtsi | 10 +++++ arch/m68k/dts/mcf5329.dtsi | 10 +++++ arch/m68k/dts/mcf537x.dtsi | 10 +++++ arch/m68k/dts/mcf5441x.dtsi | 60 +++++++++++++++++++++++++++ arch/m68k/dts/stmark2.dts | 4 ++ 23 files changed, 273 insertions(+)
arch/m68k/dts/M5208EVBE.dts +6 -0
@@ -23,3 +23,9 @@ &fec0 { status = "okay"; }; + +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +};
arch/m68k/dts/M5253DEMO.dts +5 -0
@@ -20,3 +20,8 @@ status = "okay"; }; +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +};
arch/m68k/dts/M5275EVB.dts +6 -0
@@ -27,3 +27,9 @@ &fec1 { status = "okay"; }; + +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +};
arch/m68k/dts/M53017EVB.dts +6 -0
@@ -27,3 +27,9 @@ &fec1 { status = "okay"; }; + +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +};
arch/m68k/dts/M5329AFEE.dts +6 -0
@@ -23,3 +23,9 @@ &fec0 { status = "okay"; }; + +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +};
arch/m68k/dts/M5329BFEE.dts +6 -0
@@ -23,3 +23,9 @@ &fec0 { status = "okay"; }; + +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +};
arch/m68k/dts/M5373EVB.dts +4 -0
@@ -23,3 +23,7 @@ &fec0 { status = "okay"; }; + +&i2c0 { + status = "okay"; +};
arch/m68k/dts/astro_mcf5373l.dts +6 -0
@@ -20,3 +20,9 @@ status = "okay"; }; +&i2c0 { + clock-frequency = <80000>; + u-boot,i2c-slave-addr = <0x7f>; + status = "okay"; +}; +
arch/m68k/dts/eb_cpu5282.dts +9 -0
@@ -23,3 +23,12 @@ &fec0 { status = "okay"; }; + +&i2c0 { + status = "okay"; + + rtc@68 { + compatible = "dallas,ds1338"; + reg = <0x68>; + }; +};
arch/m68k/dts/eb_cpu5282_internal.dts +9 -0
@@ -23,3 +23,12 @@ &fec0 { status = "okay"; }; + +&i2c0 { + status = "okay"; + + rtc@68 { + compatible = "dallas,ds1338"; + reg = <0x68>; + }; +};
arch/m68k/dts/mcf5208.dtsi +10 -0
@@ -42,5 +42,15 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@fc058000 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0xfc058000 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; };
arch/m68k/dts/mcf523x.dtsi +10 -0
@@ -51,6 +51,16 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@300 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x300 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5249.dtsi +28 -0
@@ -33,6 +33,34 @@ reg = <0x200 0x40>; status = "disabled"; }; + + i2c0: i2c@280 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x280 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; + }; + + mbar2: mbar2@80000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x00000000 0x80000000 0x10000>; + reg = <0x80000000 0x10000>; + + i2c1: i2c@440 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x440 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5253.dtsi +28 -0
@@ -39,6 +39,34 @@ reg = <0xc00 0x40>; status = "disabled"; }; + + i2c0: i2c@280 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x280 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; + }; + + mbar2: mbar2@80000000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x00000000 0x80000000 0x10000>; + reg = <0x80000000 0x10000>; + + i2c1: i2c@440 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x440 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5271.dtsi +10 -0
@@ -49,6 +49,16 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@300 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x300 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5275.dtsi +10 -0
@@ -59,6 +59,16 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@300 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x300 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5282.dtsi +10 -0
@@ -49,6 +49,16 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@300 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x300 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5301x.dtsi +10 -0
@@ -65,5 +65,15 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@0xfc058000 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0xfc058000 0x100>; + clock-frequency = <100000>; + status = "disabled"; + }; }; };
arch/m68k/dts/mcf5307.dtsi +10 -0
@@ -34,6 +34,16 @@ reg = <0x200 0x40>; status = "disabled"; }; + + i2c0: i2c@280 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0x280 0x14>; + clock-frequency = <100000>; + status = "disabled"; + }; }; }; };
arch/m68k/dts/mcf5329.dtsi +10 -0
@@ -42,5 +42,15 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@0xfc058000 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0xfc058000 0x100>; + clock-frequency = <100000>; + status = "disabled"; + }; }; };
arch/m68k/dts/mcf537x.dtsi +10 -0
@@ -42,5 +42,15 @@ timeout-loop = <50000>; status = "disabled"; }; + + i2c0: i2c@0xfc058000 { + compatible = "fsl-i2c"; + #address-cells=<1>; + #size-cells=<0>; + cell-index = <0>; + reg = <0xfc058000 0x100>; + clock-frequency = <100000>; + status = "disabled"; + }; }; };
arch/m68k/dts/mcf5441x.dtsi +60 -0
65 lines not on this page · raw message
arch/m68k/dts/stmark2.dts +4 -0
@@ -41,3 +41,7 @@ status = "okay"; mii-base = <0>; }; + +&i2c0 { + status = "okay"; +};
Signature · 1 line
2.40.0
PATCH 6/6 m68k: upgrading all boards to dm i2c
In reply to Angelo DureghelloUpgrading all board configs where i2c is involved to DM i2c.
--- configs/M5208EVBE_defconfig | 5 +---- configs/M5235EVB_Flash32_defconfig | 1 + configs/M5235EVB_defconfig | 1 + configs/M5253DEMO_defconfig | 5 +---- configs/M5275EVB_defconfig | 5 +---- configs/M53017EVB_defconfig | 6 ++---- configs/M5329AFEE_defconfig | 6 ++---- configs/M5329BFEE_defconfig | 6 ++---- configs/M5373EVB_defconfig | 3 ++- configs/astro_mcf5373l_defconfig | 6 ++---- configs/eb_cpu5282_defconfig | 5 ++--- configs/eb_cpu5282_internal_defconfig | 5 ++--- configs/stmark2_defconfig | 4 ++++ 13 files changed, 23 insertions(+), 35 deletions(-)
configs/M5208EVBE_defconfig +1 -4
@@ -38,11 +38,8 @@ CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.162.1.1" CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x58000 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
configs/M5235EVB_Flash32_defconfig +1 -0
@@ -61,3 +61,4 @@ CONFIG_MCFFEC=y CONFIG_MII=y CONFIG_MCFUART=y CONFIG_WATCHDOG_TIMEOUT_MSECS=5000 +CONFIG_DM_I2C=y
configs/M5235EVB_defconfig +1 -0
@@ -61,3 +61,4 @@ CONFIG_MCFFEC=y CONFIG_MII=y CONFIG_MCFUART=y CONFIG_WATCHDOG_TIMEOUT_MSECS=5000 +CONFIG_DM_I2C=y
configs/M5253DEMO_defconfig +1 -4
@@ -37,11 +37,8 @@ CONFIG_SYS_ATA_ALT_OFFSET=0xC0 CONFIG_SYS_ATA_IDE0_OFFSET=0 CONFIG_ATAPI=y CONFIG_IDE_RESET=y -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x280 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD_NOR_FLASH=y CONFIG_SYS_MAX_FLASH_SECT=2048 CONFIG_USE_SYS_MAX_FLASH_BANKS=y
configs/M5275EVB_defconfig +1 -4
@@ -34,11 +34,8 @@ CONFIG_OVERWRITE_ETHADDR_ONCE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x300 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_FLASH_SHOW_PROGRESS=0
configs/M53017EVB_defconfig +2 -4
@@ -40,11 +40,8 @@ CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.162.1.1" CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x58000 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
@@ -57,6 +54,7 @@ CONFIG_SYS_MAX_FLASH_SECT=137 CONFIG_MCFFEC=y CONFIG_SYS_UNIFY_CACHE=y CONFIG_MII=y +CONFIG_DM_RTC=y CONFIG_MCFRTC=y CONFIG_SYS_MCFRTC_BASE=0xFC0A8000 CONFIG_MCFUART=y
configs/M5329AFEE_defconfig +2 -4
@@ -39,11 +39,8 @@ CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.162.1.1" CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x58000 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y
@@ -55,6 +52,7 @@ CONFIG_SYS_MAX_FLASH_SECT=137 CONFIG_MCFFEC=y CONFIG_SYS_UNIFY_CACHE=y CONFIG_MII=y +CONFIG_DM_RTC=y CONFIG_MCFRTC=y CONFIG_SYS_MCFRTC_BASE=0xFC0A8000 CONFIG_MCFUART=y
configs/M5329BFEE_defconfig +2 -4
@@ -40,11 +40,8 @@ CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.162.1.1" CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x58000 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y
@@ -57,6 +54,7 @@ CONFIG_MTD_RAW_NAND=y CONFIG_MCFFEC=y CONFIG_SYS_UNIFY_CACHE=y CONFIG_MII=y +CONFIG_DM_RTC=y CONFIG_MCFRTC=y CONFIG_SYS_MCFRTC_BASE=0xFC0A8000 CONFIG_MCFUART=y
configs/M5373EVB_defconfig +2 -1
@@ -40,7 +40,8 @@ CONFIG_NETMASK="255.255.255.0" CONFIG_USE_SERVERIP=y CONFIG_SERVERIP="192.162.1.1" CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y +CONFIG_DM_RTC=y CONFIG_SYS_I2C_FSL=y CONFIG_SYS_FSL_I2C_OFFSET=0x58000 CONFIG_SYS_I2C_SLAVE=0x7F
configs/astro_mcf5373l_defconfig +2 -4
@@ -34,11 +34,8 @@ CONFIG_FPGA_CYCLON2=y CONFIG_FPGA_XILINX=y CONFIG_FPGA_SPARTAN3=y CONFIG_SYS_FPGA_PROG_FEEDBACK=y -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x58000 -CONFIG_SYS_I2C_SLAVE=0x7F -CONFIG_SYS_I2C_SPEED=80000 CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y CONFIG_FLASH_SHOW_PROGRESS=0
@@ -46,6 +43,7 @@ CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y CONFIG_SYS_FLASH_PROTECTION=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_SECT=259 +CONFIG_DM_RTC=y CONFIG_MCFRTC=y CONFIG_SYS_MCFRTC_BASE=0xFC0A8000 CONFIG_MCFUART=y
configs/eb_cpu5282_defconfig +2 -3
@@ -34,10 +34,9 @@ CONFIG_CMD_DATE=y CONFIG_OVERWRITE_ETHADDR_ONCE=y CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x300 -CONFIG_SYS_I2C_SLAVE=0 +CONFIG_DM_I2C=y +CONFIG_DM_RTC=y CONFIG_LED_STATUS=y CONFIG_LED_STATUS0=y CONFIG_LED_STATUS_BIT=8
configs/eb_cpu5282_internal_defconfig +2 -3
@@ -32,10 +32,8 @@ CONFIG_CMD_DATE=y CONFIG_OVERWRITE_ETHADDR_ONCE=y CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y CONFIG_SYS_RX_ETH_BUFFER=8 -CONFIG_SYS_I2C_LEGACY=y +CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y -CONFIG_SYS_FSL_I2C_OFFSET=0x300 -CONFIG_SYS_I2C_SLAVE=0 CONFIG_LED_STATUS=y CONFIG_LED_STATUS0=y CONFIG_LED_STATUS_BIT=8
@@ -50,5 +48,6 @@ CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_SECT=128 CONFIG_MCFFEC=y CONFIG_MII=y +CONFIG_DM_RTC=y CONFIG_RTC_DS1338=y CONFIG_MCFUART=y
configs/stmark2_defconfig +4 -0
@@ -49,3 +49,7 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_CF_SPI=y CONFIG_REGEX=y +CONFIG_SPI_FLASH_MTD=y +CONFIG_DM_I2C=y +CONFIG_CMD_I2C=y +CONFIG_SYS_I2C_FSL=y
Signature · 1 line
2.40.0
Re: [PATCH 6/6] m68k: upgrading all boards to dm i2c
Hello Angelo,
Quoted 18 lines · Angelo Dureghello
Upgrading all board configs where i2c is involved to DM i2c.
Signed-off-by Angelo Dureghello <[email protected]>--- configs/M5208EVBE_defconfig | 5 +---- configs/M5235EVB_Flash32_defconfig | 1 + configs/M5235EVB_defconfig | 1 + configs/M5253DEMO_defconfig | 5 +---- configs/M5275EVB_defconfig | 5 +---- configs/M53017EVB_defconfig | 6 ++---- configs/M5329AFEE_defconfig | 6 ++---- configs/M5329BFEE_defconfig | 6 ++---- configs/M5373EVB_defconfig | 3 ++- configs/astro_mcf5373l_defconfig | 6 ++---- configs/eb_cpu5282_defconfig | 5 ++--- configs/eb_cpu5282_internal_defconfig | 5 ++--- configs/stmark2_defconfig | 4 ++++ 13 files changed, 23 insertions(+), 35 deletions(-)
Thanks for this series, I did not find a cover letter Email, so I have here a common question:
You rename in patch 1/6
CONFIG_SYS_I2C_0 -> CFG_SYS_I2C_0
but only add in patch 2/6 for the stmark2 this renamed define, and add DTS nodes for other boards in patch 5/6 and here the defconfig changes... may I oversee something obvious, but do the other boards not also need some CFG_SYS_I2C_0 define?
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH 6/6] m68k: upgrading all boards to dm i2c
Hi Helko,
Quoted 25 lines · Heiko Schocher
Hello Angelo,
Quoted 18 lines · Angelo Dureghello
Upgrading all board configs where i2c is involved to DM i2c.
Signed-off-by Angelo Dureghello <[email protected]>--- configs/M5208EVBE_defconfig | 5 +---- configs/M5235EVB_Flash32_defconfig | 1 + configs/M5235EVB_defconfig | 1 + configs/M5253DEMO_defconfig | 5 +---- configs/M5275EVB_defconfig | 5 +---- configs/M53017EVB_defconfig | 6 ++---- configs/M5329AFEE_defconfig | 6 ++---- configs/M5329BFEE_defconfig | 6 ++---- configs/M5373EVB_defconfig | 3 ++- configs/astro_mcf5373l_defconfig | 6 ++---- configs/eb_cpu5282_defconfig | 5 ++--- configs/eb_cpu5282_internal_defconfig | 5 ++--- configs/stmark2_defconfig | 4 ++++ 13 files changed, 23 insertions(+), 35 deletions(-)Thanks for this series, I did not find a cover letter Email, so I have here a common question:
Quoted 9 lines
You rename in patch 1/6
CONFIG_SYS_I2C_0->CFG_SYS_I2C_0but only add in patch 2/6 for the stmark2 this renamed define, and add DTS nodes for other boards in patch 5/6 and here the defconfig changes... may I oversee something obvious, but do the other boards not also need some
CFG_SYS_I2C_0define?
CFG_SYS_I2C_0 (0 to 5) it's a define to setup pads pinmux to i2c, but only for coldfire mcf5441x family that requires this.
m68k/cpu/mcf5445x/cpu_init.c:#ifdef CFG_SYS_I2C_0
Involved board is only stmark2, that is the board i am using here for test. I found this define to be set because i2c was not working, so i moved in the more proper CFG_ namespace.
I cannot test other boards actually, but i don't find any similar define/need in their start code, so i am supposing other cpu families are not needing it, or using other definitions for pinmux.
I would like one day to add pinmux setup from fdt, but not trivial, linux does not have fdt implementation for coldfire, so need to invent it from scratch.
Quoted 4 lines
Thanks!
bye,
Heiko
Thanks,
Regards,
angelo
Re: [PATCH 6/6] m68k: upgrading all boards to dm i2c
Hello Angelo,
Quoted 32 lines · Angelo Dureghello
Hi Helko,
Quoted 29 lines · Heiko Schocher
Hello Angelo,
Quoted 12 lines · Angelo Dureghello
Upgrading all board configs where i2c is involved to DM i2c.
Signed-off-by Angelo Dureghello <[email protected]>---
configs/M5208EVBE_defconfig | 5 +----
configs/M5235EVB_Flash32_defconfig | 1 +
configs/M5235EVB_defconfig | 1 +
configs/M5253DEMO_defconfig | 5 +----
configs/M5275EVB_defconfig | 5 +----configs/M53017EVB_defconfig | 6 ++---- configs/M5329AFEE_defconfig | 6 ++---- configs/M5329BFEE_defconfig | 6 ++----Quoted 6 lines
configs/M5373EVB_defconfig | 3 ++- configs/astro_mcf5373l_defconfig | 6 ++---- configs/eb_cpu5282_defconfig | 5 ++--- configs/eb_cpu5282_internal_defconfig | 5 ++--- configs/stmark2_defconfig | 4 ++++
13 files changed, 23 insertions(+), 35 deletions(-)Thanks for this series, I did not find a cover letter Email, so I have here a common question:
You rename in patch 1/6
CONFIG_SYS_I2C_0->CFG_SYS_I2C_0
Quoted 8 lines
Quoted 5 lines
but only add in patch 2/6 for the stmark2 this renamed define, and add DTS nodes for other boards in patch 5/6 and here the defconfig changes... may I oversee something obvious, but do the other boards not also need some
CFG_SYS_I2C_0define?
CFG_SYS_I2C_0(0 to 5) it's a define to setup pads pinmux to i2c, but only for coldfire mcf5441x family that requires this.
Ah!
Quoted 6 lines
m68k/cpu/mcf5445x/cpu_init.c:#ifdef
CFG_SYS_I2C_0Involved board is only stmark2, that is the board i am using here for test. I found this define to be set because i2c was not working, so i moved in the more proper
CFG_namespace.
Fine.
Quoted 6 lines
I cannot test other boards actually, but i don't find any similar define/need in their start code, so i am supposing other cpu families are not needing it, or using other definitions for pinmux.
I would like one day to add pinmux setup from fdt,
Nice to hear!
Quoted 2 lines
but not trivial, linux does not have fdt implementation for coldfire, so need to invent it from scratch.
Yes, that would be preferred solution!
So, for me, your series is fine to me, Thanks!
bye,
Heiko
Quoted 11 lines
Quoted 6 lines
Thanks!
bye,
HeikoThanks,
Regards,
angelo
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Hello Angelo,
Quoted 7 lines · Angelo Dureghello
Move
CONFIG_SYS_I2C_XtoCFG_namespace.
This is a preliminary step to move to dm i2c.Signed-off-by Angelo Dureghello <[email protected]>--- arch/m68k/cpu/mcf5445x/cpu_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH 2/6] board: stmark2: add i2c0 pinmux pad configuration
In reply to Angelo DureghelloHello Angelo,
Quoted 6 lines · Angelo Dureghello
Add CFG option to enable proper pinmux pad setting for i2c0.
Signed-off-by Angelo Dureghello <[email protected]>--- include/configs/stmark2.h | 2 ++ 1 file changed, 2 insertions(+)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH 3/6] m68k: mcf5441x: fix CONFIG_SYS_FSL_I2C definition
In reply to Angelo DureghelloHello Angelo,
Quoted 6 lines · Angelo Dureghello
Fix
CONFIG_SYS_FSL_I2Cto correct nameCONFIG_SYS_I2C_FSL.Signed-off-by Angelo Dureghello <[email protected]>--- arch/m68k/cpu/mcf5445x/speed.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH 4/6] i2c: fsl_i2c: fix m68k transferts
In reply to Angelo DureghelloHello Angelo,
Quoted 8 lines · Angelo Dureghello
This driver is actually used for powerpc and m68k/ColdFire.
On ColdFire SoC's, interrupt flag get not set if IIEN flag (mbcr bit6, interrupt enabled) is not set appropriately before each transfert. As a result, the transfert hangs forever waiting for IIEN. This patch set IIEN before each transfert, while considering this fix as not harming powerpc arch.
Quoted 5 lines
Signed-off-by Angelo Dureghello <[email protected]>--- arch/m68k/include/asm/fsl_i2c.h | 10 ++++++++++ drivers/i2c/fsl_i2c.c | 16 +++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH 5/6] m68k: dts: add i2c nodes
In reply to Angelo DureghelloHello Angelo,
Quoted 21 lines · Angelo Dureghello
Add all the i2c nodes for each family, and add specific i2c overwrites in the related board-specific dts.
Signed-off-by Angelo Dureghello <[email protected]>--- arch/m68k/dts/M5208EVBE.dts | 6 +++ arch/m68k/dts/M5253DEMO.dts | 5 +++ arch/m68k/dts/M5275EVB.dts | 6 +++ arch/m68k/dts/M53017EVB.dts | 6 +++ arch/m68k/dts/M5329AFEE.dts | 6 +++ arch/m68k/dts/M5329BFEE.dts | 6 +++ arch/m68k/dts/M5373EVB.dts | 4 ++ arch/m68k/dts/astro_mcf5373l.dts | 6 +++ arch/m68k/dts/eb_cpu5282.dts | 9 ++++ arch/m68k/dts/eb_cpu5282_internal.dts | 9 ++++ arch/m68k/dts/mcf5208.dtsi | 10 +++++ arch/m68k/dts/mcf523x.dtsi | 10 +++++ arch/m68k/dts/mcf5249.dtsi | 28 +++++++++++++ arch/m68k/dts/mcf5253.dtsi | 28 +++++++++++++ arch/m68k/dts/mcf5271.dtsi | 10 +++++ arch/m68k/dts/mcf5275.dtsi | 10 +++++
Quoted 8 lines
arch/m68k/dts/mcf5282.dtsi | 10 +++++ arch/m68k/dts/mcf5301x.dtsi | 10 +++++ arch/m68k/dts/mcf5307.dtsi | 10 +++++ arch/m68k/dts/mcf5329.dtsi | 10 +++++ arch/m68k/dts/mcf537x.dtsi | 10 +++++ arch/m68k/dts/mcf5441x.dtsi | 60 +++++++++++++++++++++++++++ arch/m68k/dts/stmark2.dts | 4 ++ 23 files changed, 273 insertions(+)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Re: [PATCH 6/6] m68k: upgrading all boards to dm i2c
In reply to Angelo DureghelloHello Angelo,
Quoted 18 lines · Angelo Dureghello
Upgrading all board configs where i2c is involved to DM i2c.
Signed-off-by Angelo Dureghello <[email protected]>--- configs/M5208EVBE_defconfig | 5 +---- configs/M5235EVB_Flash32_defconfig | 1 + configs/M5235EVB_defconfig | 1 + configs/M5253DEMO_defconfig | 5 +---- configs/M5275EVB_defconfig | 5 +---- configs/M53017EVB_defconfig | 6 ++---- configs/M5329AFEE_defconfig | 6 ++---- configs/M5329BFEE_defconfig | 6 ++---- configs/M5373EVB_defconfig | 3 ++- configs/astro_mcf5373l_defconfig | 6 ++---- configs/eb_cpu5282_defconfig | 5 ++--- configs/eb_cpu5282_internal_defconfig | 5 ++--- configs/stmark2_defconfig | 4 ++++ 13 files changed, 23 insertions(+), 35 deletions(-)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]