Add the not connected bits

While here, tweak the usb3503 attachment
This commit is contained in:
reinoud 2014-09-24 20:38:33 +00:00
parent d1f0a6b031
commit 8c12cb8ada
1 changed files with 19 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: odroid_machdep.c,v 1.34 2014/09/21 20:49:31 reinoud Exp $ */
/* $NetBSD: odroid_machdep.c,v 1.35 2014/09/24 20:38:33 reinoud Exp $ */
/*
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.34 2014/09/21 20:49:31 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.35 2014/09/24 20:38:33 reinoud Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_exynos.h"
@ -643,6 +643,19 @@ odroid_exynos5_gpio_ncs(device_t self, prop_dictionary_t dict) {
prop_dictionary_set_uint32(dict, "nc-GPG2", 0x03 - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPH0", 0x0f - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPH1", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPJ0", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPJ1", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPJ2", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPJ3", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPJ4", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPK0", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPK1", 0xff - 0b00000000);
/* usb3 overcur1{2,3} at bits 4,5, vbus1 at pin 7 */
prop_dictionary_set_uint32(dict, "nc-GPK2", 0xff - 0b10110000);
/* usb3 overcur0{2,3} at bits 0,1, vbus0 at pin 3 */
prop_dictionary_set_uint32(dict, "nc-GPK3", 0xff - 0b00001011);
prop_dictionary_set_uint32(dict, "nc-GPV0", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-GPV1", 0xff - 0b00000000);
prop_dictionary_set_uint32(dict, "nc-ETC5", 0x03 - 0b00000000);
@ -779,23 +792,20 @@ exynos_usb_init_usb3503_hub(device_t self)
/* pull intn low */
exynos_gpio_pindata_ctl(&nint_pin, GPIO_PIN_PULLDOWN);
DELAY(10000);
/* set hubconnect low */
exynos_gpio_pindata_write(&hubconnect_pin, 0);
DELAY(10000);
/* reset pin up again, hub enters RefClk stage */
exynos_gpio_pindata_write(&nreset_pin, 1);
DELAY(10000);
/* set hubconnect high */
exynos_gpio_pindata_write(&hubconnect_pin, 1);
DELAY(10000);
/* release intn */
exynos_gpio_pindata_ctl(&nint_pin, GPIO_PIN_TRISTATE);
DELAY(10000);
/* set hubconnect high */
exynos_gpio_pindata_write(&hubconnect_pin, 1);
DELAY(40000);
/* DONE! */
}