u-boot-brain/arch/arm/dts/socfpga_cyclone5_socdk-u-boot.dtsi
Ley Foon Tan a0bda1dd83 arm: dts: socfpga: cyclone5: Update i2c-scl-falling-time-ns
Commit e71b6f6622 ("i2c: designware_i2c: Rewrite timing calculation")
change the hcnt and lcnt timing calculation. New timing calculation is
based on calculation from Designware i2c databook.

After this new timing calculation, hcnt will have negative value
with i2c-scl-falling-time-ns 5000 that set in socfpga_cyclone5_socdk.dts.

This patch overwrite i2c-scl-falling-time-ns to 300ns (default SCL fall
time used in Designware i2c driver) for Uboot.

Before the fix:
=> i2c dev 0
Setting bus to 0
Failure changing bus number (-22)

After the fix:
=> i2c dev 0
Setting bus to 0
=> i2c probe
Valid chip addresses: 17 51 55 5B 5C 5E 66 68 70

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2020-06-14 13:37:31 +02:00

75 lines
984 B
Plaintext

// SPDX-License-Identifier: GPL-2.0+
/*
* U-Boot additions
*
* Copyright (C) 2012 Altera Corporation <www.altera.com>
* Copyright (c) 2018 Simon Goldschmidt
*/
#include "socfpga-common-u-boot.dtsi"
/{
aliases {
spi0 = "/soc/spi@ff705000";
udc0 = &usb1;
};
};
&can0 {
status = "okay";
};
&watchdog0 {
status = "disabled";
};
&mmc {
u-boot,dm-pre-reloc;
};
&qspi {
u-boot,dm-pre-reloc;
};
&flash0 {
compatible = "n25q00", "jedec,spi-nor";
u-boot,dm-pre-reloc;
partition@qspi-boot {
/* 8MB for raw data. */
label = "Flash 0 Raw Data";
reg = <0x0 0x800000>;
};
partition@qspi-rootfs {
/* 120MB for jffs2 data. */
label = "Flash 0 jffs2 Filesystem";
reg = <0x800000 0x7800000>;
};
};
&uart0 {
clock-frequency = <100000000>;
u-boot,dm-pre-reloc;
};
&uart1 {
clock-frequency = <100000000>;
};
&porta {
bank-name = "porta";
};
&portb {
bank-name = "portb";
};
&portc {
bank-name = "portc";
};
&i2c0 {
i2c-scl-falling-time-ns = <300>;
};