Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip RK3188 iomux/gpio setup for emac
details: https://anonhg.NetBSD.org/src/rev/3ad4d1c5d859
branches: trunk
changeset: 335350:3ad4d1c5d859
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Jan 04 03:55:44 2015 +0000
description:
RK3188 iomux/gpio setup for emac
diffstat:
sys/arch/arm/rockchip/obio.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (51 lines):
diff -r 16499ba6f92e -r 3ad4d1c5d859 sys/arch/arm/rockchip/obio.c
--- a/sys/arch/arm/rockchip/obio.c Sun Jan 04 03:55:11 2015 +0000
+++ b/sys/arch/arm/rockchip/obio.c Sun Jan 04 03:55:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obio.c,v 1.11 2015/01/03 13:26:31 jmcneill Exp $ */
+/* $NetBSD: obio.c,v 1.12 2015/01/04 03:55:44 jmcneill Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -38,7 +38,7 @@
#include "opt_rockchip.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.11 2015/01/03 13:26:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio.c,v 1.12 2015/01/04 03:55:44 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -198,6 +198,8 @@
#define RK3188_GRF_SOC_CON2_OFFSET 0x00A8
#define RK3188_GRF_SOC_STATUS_OFFSET 0x00AC
+#define RK3188_GRF_IO_CON3_OFFSET 0x0100
+
#define GRF_GPIO0A_IOMUX_OFFSET 0x00a8
#define GRF_GPIO3A_IOMUX_OFFSET 0x00d8
#define GRF_GPIO3B_IOMUX_OFFSET 0x00dc
@@ -212,6 +214,12 @@
obio_iomux(RK3188_GRF_GPIO1D_IOMUX_OFFSET, 0x55555555); /* I2C[0124] */
obio_iomux(RK3188_GRF_GPIO3B_IOMUX_OFFSET, 0xa000a000); /* I2C3 */
obio_iomux(RK3188_GRF_SOC_CON1_OFFSET, 0xf800f800); /* I2C[01234] */
+
+ obio_iomux(RK3188_GRF_GPIO0C_IOMUX_OFFSET, 0x00030000); /* PHY */
+ obio_iomux(RK3188_GRF_GPIO3C_IOMUX_OFFSET, 0xffffaaaa); /* PHY */
+ obio_iomux(RK3188_GRF_GPIO3D_IOMUX_OFFSET, 0x003f000a); /* PHY */
+ obio_iomux(RK3188_GRF_SOC_CON1_OFFSET, 0x00030002); /* VMAC */
+ obio_iomux(RK3188_GRF_IO_CON3_OFFSET, 0x000f000f); /* VMAC */
#else
/* ChipSPARK Rayeager PX2 */
obio_iomux(GRF_GPIO0A_IOMUX_OFFSET, 0x14000000); /* VBUS */
@@ -248,6 +256,10 @@
obio_swporta(ROCKCHIP_GPIO2_OFFSET, GPIO_SWPORTA_DR_OFFSET, __BIT(31));
obio_swporta(ROCKCHIP_GPIO2_OFFSET, GPIO_SWPORTA_DD_OFFSET, __BIT(31));
+ /* PHY */
+ obio_swporta(ROCKCHIP_GPIO3_OFFSET, GPIO_SWPORTA_DR_OFFSET, __BIT(26));
+ obio_swporta(ROCKCHIP_GPIO3_OFFSET, GPIO_SWPORTA_DD_OFFSET, __BIT(26));
+
/* IT66121 HDMI */
obio_swporta(ROCKCHIP_GPIO3_OFFSET, GPIO_SWPORTA_DR_OFFSET, __BIT(10));
obio_swporta(ROCKCHIP_GPIO3_OFFSET, GPIO_SWPORTA_DD_OFFSET, __BIT(10));
Home |
Main Index |
Thread Index |
Old Index