Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/odroid Add gpio not connected definitions fo...



details:   https://anonhg.NetBSD.org/src/rev/dde526ff8bee
branches:  trunk
changeset: 331561:dde526ff8bee
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Thu Aug 14 15:44:42 2014 +0000

description:
Add gpio not connected definitions for Exynos5

While here, increase delay around lan9730 powercycle timing to improve its
reset.

diffstat:

 sys/arch/evbarm/odroid/odroid_machdep.c |  60 +++++++++++++++++++++++++++++---
 1 files changed, 54 insertions(+), 6 deletions(-)

diffs (103 lines):

diff -r 9077478af140 -r dde526ff8bee sys/arch/evbarm/odroid/odroid_machdep.c
--- a/sys/arch/evbarm/odroid/odroid_machdep.c   Thu Aug 14 15:42:31 2014 +0000
+++ b/sys/arch/evbarm/odroid/odroid_machdep.c   Thu Aug 14 15:44:42 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: odroid_machdep.c,v 1.24 2014/08/04 18:14:43 reinoud Exp $ */
+/*     $NetBSD: odroid_machdep.c,v 1.25 2014/08/14 15:44:42 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.24 2014/08/04 18:14:43 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: odroid_machdep.c,v 1.25 2014/08/14 15:44:42 reinoud Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_exynos.h"
@@ -536,7 +536,7 @@
        prop_dictionary_set_uint32(dict, "nc-GPA1", 0x3f - 0b00001000);
        prop_dictionary_set_uint32(dict, "nc-GPB",  0xff - 0b00000000);
        prop_dictionary_set_uint32(dict, "nc-GPC0", 0x1f - 0b00000000);
-       /* blue led at bit 0 : */
+       /* blue led at bit 0 : heartbeat */
        prop_dictionary_set_uint32(dict, "nc-GPC1", 0x1f - 0b00000001);
        prop_dictionary_set_uint32(dict, "nc-GPD0", 0x0f - 0b00000000);
        /* i2c0 at pin 0,1 and i2c1 at pin 2,3 : */
@@ -595,7 +595,54 @@
         * generated by the gpio bootstrap and the values substracted are
         * explicitly allowed
         */
-       /* TBD: generate these values, see exynos_gpio.c boostrap */
+       prop_dictionary_set_uint32(dict, "nc-GPA0", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPA1", 0x3f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPA2", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPB0", 0x1f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPB1", 0x1f - 0b00000000);
+       /* green led at bit 1 : eMMC activity */
+       /* red   led at bit 2 : heartbeat */
+       prop_dictionary_set_uint32(dict, "nc-GPB2", 0x0f - 0b00000110);
+       prop_dictionary_set_uint32(dict, "nc-GPB3", 0x0f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPC0", 0x7f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPC1", 0x0f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPC2", 0x7f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPC3", 0x7f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPD0", 0x0f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPD1", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY0", 0x3f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY1", 0x0f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY2", 0x3f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY3", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY4", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY5", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPY6", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-ETC0", 0x3f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-ETC6", 0x7f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-ETC7", 0x1f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPC4", 0x3f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPX0", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPX1", 0xff - 0b00000000);
+       /* blue led at bit 3 : microSD activity */
+       prop_dictionary_set_uint32(dict, "nc-GPX2", 0xff - 0b00001000);
+       prop_dictionary_set_uint32(dict, "nc-GPX3", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPE0", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPE1", 0x03 - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPF0", 0x0f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPF1", 0x0f - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPG0", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPG1", 0xff - 0b00000000);
+       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-GPV0", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPV1", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-ETC5", 0x03 - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPV2", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPV3", 0xff - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-ETC8", 0x03 - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPV4", 0x03 - 0b00000000);
+       prop_dictionary_set_uint32(dict, "nc-GPZ",  0x7f - 0b00000000);
 }
 #endif
 
@@ -804,7 +851,7 @@
        error = iic_exec(i2c, I2C_OP_WRITE_WITH_STOP, chipid, &reg, 1,
                        &rdata, sizeof(rdata), 0);
        KASSERT(!error);
-       DELAY(10000);
+       DELAY(20000);
 
        iic_release_bus(i2c, 0);
 
@@ -817,8 +864,9 @@
                                "can't reserve GPIO pin %s\n", pin_enable);
                } else {
                        exynos_gpio_pindata_write(&enable_pin, 0);
+                       DELAY(20000);
+                       exynos_gpio_pindata_write(&enable_pin, 1);
                        DELAY(10000);
-                       exynos_gpio_pindata_write(&enable_pin, 1);
                }
        } else {
                aprint_error_dev(self, "failed to lookup lan_power GPIO pin");



Home | Main Index | Thread Index | Old Index