summaryrefslogtreecommitdiffstats
path: root/board/samsung
diff options
context:
space:
mode:
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/common/Makefile1
-rw-r--r--board/samsung/common/thor.c21
-rw-r--r--board/samsung/dts/exynos5250-smdk5250.dts4
-rw-r--r--board/samsung/dts/exynos5250-snow.dts8
-rw-r--r--board/samsung/smdk5250/exynos5-dt.c19
-rw-r--r--board/samsung/trats/trats.c5
6 files changed, 37 insertions, 21 deletions
diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile
index 9e48a7b6e5..ad7564cddf 100644
--- a/board/samsung/common/Makefile
+++ b/board/samsung/common/Makefile
@@ -10,6 +10,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libsamsung.o
COBJS-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
+COBJS-$(CONFIG_THOR_FUNCTION) += thor.o
SRCS := $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS-y))
diff --git a/board/samsung/common/thor.c b/board/samsung/common/thor.c
new file mode 100644
index 0000000000..1c7630df08
--- /dev/null
+++ b/board/samsung/common/thor.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ * Lukasz Majewski <l.majewski@samsung.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <linux/usb/ch9.h>
+
+int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
+{
+ if (!strcmp(name, "usb_dnl_thor")) {
+ put_unaligned(CONFIG_G_DNL_THOR_VENDOR_NUM, &dev->idVendor);
+ put_unaligned(CONFIG_G_DNL_THOR_PRODUCT_NUM, &dev->idProduct);
+ } else {
+ put_unaligned(CONFIG_G_DNL_VENDOR_NUM, &dev->idVendor);
+ put_unaligned(CONFIG_G_DNL_PRODUCT_NUM, &dev->idProduct);
+ }
+ return 0;
+}
diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts
index b1bba9662e..c4ed3467cb 100644
--- a/board/samsung/dts/exynos5250-smdk5250.dts
+++ b/board/samsung/dts/exynos5250-smdk5250.dts
@@ -144,4 +144,8 @@
mmc@12230000 {
status = "disabled";
};
+
+ ehci@12110000 {
+ samsung,vbus-gpio = <&gpio 0xbe 0>; /* X26 */
+ };
};
diff --git a/board/samsung/dts/exynos5250-snow.dts b/board/samsung/dts/exynos5250-snow.dts
index 12cd67e49c..091cdb9e86 100644
--- a/board/samsung/dts/exynos5250-snow.dts
+++ b/board/samsung/dts/exynos5250-snow.dts
@@ -109,6 +109,14 @@
status = "disabled";
};
+ ehci@12110000 {
+ samsung,vbus-gpio = <&gpio 0xb1 0>; /* X11 */
+ };
+
+ xhci@12000000 {
+ samsung,vbus-gpio = <&gpio 0xbf 0>; /* X27 */
+ };
+
tmu@10060000 {
samsung,min-temp = <25>;
samsung,max-temp = <125>;
diff --git a/board/samsung/smdk5250/exynos5-dt.c b/board/samsung/smdk5250/exynos5-dt.c
index bb4a82f449..6bcc883b10 100644
--- a/board/samsung/smdk5250/exynos5-dt.c
+++ b/board/samsung/smdk5250/exynos5-dt.c
@@ -61,22 +61,6 @@ struct local_info {
static struct local_info local;
-#ifdef CONFIG_USB_EHCI_EXYNOS
-int board_usb_vbus_init(void)
-{
- struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *)
- samsung_get_base_gpio_part1();
-
- /* Enable VBUS power switch */
- s5p_gpio_direction_output(&gpio1->x2, 6, 1);
-
- /* VBUS turn ON time */
- mdelay(3);
-
- return 0;
-}
-#endif
-
#ifdef CONFIG_SOUND_MAX98095
static void board_enable_audio_codec(void)
{
@@ -122,9 +106,6 @@ int board_init(void)
if (board_init_cros_ec_devices(gd->fdt_blob))
return -1;
-#ifdef CONFIG_USB_EHCI_EXYNOS
- board_usb_vbus_init();
-#endif
#ifdef CONFIG_SOUND_MAX98095
board_enable_audio_codec();
#endif
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 7f61d17abb..d31d511e39 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -26,6 +26,7 @@
#include <power/max8997_muic.h>
#include <power/battery.h>
#include <power/max17042_fg.h>
+#include <usb.h>
#include <usb_mass_storage.h>
#include "setup.h"
@@ -495,10 +496,10 @@ struct s3c_plat_otg_data s5pc210_otg_data = {
.usb_flags = PHY0_SLEEP,
};
-void board_usb_init(void)
+int board_usb_init(int index, enum usb_init_type init)
{
debug("USB_udc_probe\n");
- s3c_udc_probe(&s5pc210_otg_data);
+ return s3c_udc_probe(&s5pc210_otg_data);
}
#endif
OpenPOWER on IntegriCloud