board: ti: am57xx-idk: Configure the CDCE913 clock synthesizer

AM57xx-IDK boards contain the CDCE913 clock synthesizer, and their
reset crystal capacitance load value of 10pF is wrong leading into
lost packets in certain networking tests. Add DT data for this
device, and probe it from the board file to program the crystal
capacitance load value to 0pF to avoid any problems.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
This commit is contained in:
Tero Kristo 2019-09-27 19:14:27 +03:00 committed by Tom Rini
parent 260777fc23
commit e8e683d33b
6 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,5 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
*/
#include "am57xx-idk-common-u-boot.dtsi"

View File

@ -0,0 +1,5 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
*/
#include "am57xx-idk-common-u-boot.dtsi"

View File

@ -0,0 +1,5 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
*/
#include "am57xx-idk-common-u-boot.dtsi"

View File

@ -0,0 +1,23 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
*/
#include "omap5-u-boot.dtsi"
/ {
xtal25mhz: xtal25mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <25000000>;
};
};
&i2c1 {
cdce913: cdce913@65 {
compatible = "ti,cdce913";
reg = <0x65>;
clocks = <&xtal25mhz>;
#clock-cells = <1>;
xtal-load-pf = <0>;
};
};

View File

@ -30,6 +30,7 @@
#include <dwc3-omap-uboot.h>
#include <ti-usb-phy-uboot.h>
#include <mmc.h>
#include <dm/uclass.h>
#include "../common/board_detect.h"
#include "mux_data.h"
@ -689,6 +690,7 @@ int board_late_init(void)
{
setup_board_eeprom_env();
u8 val;
struct udevice *dev;
/*
* DEV_CTRL.DEV_ON = 1 please - else palmas switches off in 8 seconds
@ -720,6 +722,9 @@ int board_late_init(void)
am57x_idk_lcd_detect();
/* Just probe the potentially supported cdce913 device */
uclass_get_device(UCLASS_CLK, 0, &dev);
#if !defined(CONFIG_SPL_BUILD)
board_ti_set_ethaddr(2);
#endif

View File

@ -98,3 +98,5 @@ CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
CONFIG_USB_GADGET_VENDOR_NUM=0x0451
CONFIG_USB_GADGET_PRODUCT_NUM=0xd022
CONFIG_CLK=y
CONFIG_CLK_CDCE9XX=y