X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=arch%2Farm%2Fmach-uniphier%2Fsg-regs.h;h=029da91f8f8bab05428c9732879f823767a24e3f;hb=b07d044d5bfa8c440b172eb3f8a9d537f82e21b6;hp=2cdc2db26efb2fa919a544d857cee3f3b507cdd2;hpb=814013253fd4cf932d0fb32f7043f09a2a748d9a;p=u-boot diff --git a/arch/arm/mach-uniphier/sg-regs.h b/arch/arm/mach-uniphier/sg-regs.h index 2cdc2db26e..029da91f8f 100644 --- a/arch/arm/mach-uniphier/sg-regs.h +++ b/arch/arm/mach-uniphier/sg-regs.h @@ -1,13 +1,15 @@ /* * UniPhier SG (SoC Glue) block registers * - * Copyright (C) 2011-2015 Masahiro Yamada + * Copyright (C) 2011-2015 Copyright (C) 2011-2015 Panasonic Corporation + * Copyright (C) 2016-2017 Socionext Inc. + * Author: Masahiro Yamada * * SPDX-License-Identifier: GPL-2.0+ */ -#ifndef ARCH_SG_REGS_H -#define ARCH_SG_REGS_H +#ifndef UNIPHIER_SG_REGS_H +#define UNIPHIER_SG_REGS_H /* Base Address */ #define SG_CTRL_BASE 0x5f800000 @@ -15,12 +17,6 @@ /* Revision */ #define SG_REVISION (SG_CTRL_BASE | 0x0000) -#define SG_REVISION_TYPE_SHIFT 16 -#define SG_REVISION_TYPE_MASK (0xff << SG_REVISION_TYPE_SHIFT) -#define SG_REVISION_MODEL_SHIFT 8 -#define SG_REVISION_MODEL_MASK (0x3 << SG_REVISION_MODEL_SHIFT) -#define SG_REVISION_REV_SHIFT 0 -#define SG_REVISION_REV_MASK (0x1f << SG_REVISION_REV_SHIFT) /* Memory Configuration */ #define SG_MEMCONF (SG_CTRL_BASE | 0x0400) @@ -50,14 +46,19 @@ #define SG_MEMCONF_CH2_SZ_128M ((0x0 << 26) | (0x02 << 16)) #define SG_MEMCONF_CH2_SZ_256M ((0x0 << 26) | (0x03 << 16)) #define SG_MEMCONF_CH2_SZ_512M ((0x1 << 26) | (0x00 << 16)) +#define SG_MEMCONF_CH2_SZ_1G ((0x1 << 26) | (0x01 << 16)) #define SG_MEMCONF_CH2_NUM_MASK (0x1 << 24) #define SG_MEMCONF_CH2_NUM_1 (0x1 << 24) #define SG_MEMCONF_CH2_NUM_2 (0x0 << 24) -/* PH1-LD6b, ProXstream2 only */ +/* PH1-LD6b, ProXstream2, PH1-LD20 only */ #define SG_MEMCONF_CH2_DISABLE (0x1 << 21) #define SG_MEMCONF_SPARSEMEM (0x1 << 4) +#define SG_USBPHYCTRL (SG_CTRL_BASE | 0x500) +#define SG_ETPHYPSHUT (SG_CTRL_BASE | 0x554) +#define SG_ETPHYCNT (SG_CTRL_BASE | 0x550) + /* Pin Control */ #define SG_PINCTRL_BASE (SG_CTRL_BASE | 0x1000) @@ -69,6 +70,7 @@ /* Pin Monitor */ #define SG_PINMON0 (SG_DBG_BASE | 0x0100) +#define SG_PINMON2 (SG_DBG_BASE | 0x0108) #define SG_PINMON0_CLK_MODE_UPLLSRC_MASK (0x3 << 19) #define SG_PINMON0_CLK_MODE_UPLLSRC_DEFAULT (0x0 << 19) @@ -126,6 +128,14 @@ static inline void sg_set_iectrl(unsigned pin) writel(tmp, reg); } +static inline void sg_set_iectrl_range(unsigned min, unsigned max) +{ + int i; + + for (i = min; i <= max; i++) + sg_set_iectrl(i); +} + #endif /* __ASSEMBLY__ */ -#endif /* ARCH_SG_REGS_H */ +#endif /* UNIPHIER_SG_REGS_H */