[PATCH u-boot v1 3/6] aspeed/scu: Add definitions needed to configure pins for I2C

Simon Glass sjg at chromium.org
Thu Nov 24 07:26:33 AEDT 2016


Hi Maxim,

2016-11-23 12:49 GMT-07:00 Maxim Sloyko <maxims at google.com>:
> Add missing definitions for configuring I2C pins
>
> Signed-off-by: Maxim Sloyko <maxims at google.com>

Please add a change log (try using patman!)

> ---
>  arch/arm/include/asm/arch-aspeed/regs-scu.h | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-aspeed/regs-scu.h b/arch/arm/include/asm/arch-aspeed/regs-scu.h
> index 5445023..6cb4d0d 100644
> --- a/arch/arm/include/asm/arch-aspeed/regs-scu.h
> +++ b/arch/arm/include/asm/arch-aspeed/regs-scu.h
> @@ -844,11 +844,15 @@
>  #define SCU_FUN_PIN_I2C5               (0x1 << 18)
>  #define SCU_FUN_PIN_I2C4               (0x1 << 17)
>  #define SCU_FUN_PIN_I2C3               (0x1 << 16)
> +#define SCU_FUN_PIN_I2C(n)             (0x1 << (16 + (n) - 3))
>  #define SCU_FUN_PIN_MII2_RX_DWN_DIS    (0x1 << 15)
>  #define SCU_FUN_PIN_MII2_TX_DWN_DIS    (0x1 << 14)
>  #define SCU_FUN_PIN_MII1_RX_DWN_DIS    (0x1 << 13)
>  #define SCU_FUN_PIN_MII1_TX_DWN_DIS    (0x1 << 12)
>
> +#define SCU_I2C_MIN_BUS_NUM                    (1)
> +#define SCU_I2C_MAX_BUS_NUM                    (14)

Please drop the () on these

> +
>  #define SCU_FUN_PIN_MII2_TX_DRIV(x)    (x << 10)
>  #define SCU_FUN_PIN_MII2_TX_DRIV_MASK  (0x3 << 10)
>  #define SCU_FUN_PIN_MII1_TX_DRIV(x)    (x << 8)
> @@ -914,6 +918,11 @@
>  #define SCU_FUN_PIN_ROMA4              (0x1 << 18)
>  #define SCU_FUN_PIN_ROMA3              (0x1 << 17)
>  #define SCU_FUN_PIN_ROMA2              (0x1 << 16)
> +/* AST2500 only */
> +#define SCU_FUN_PIN_SDA2               (0x1 << 15)
> +#define SCU_FUN_PIN_SCL2               (0x1 << 14)
> +#define SCU_FUN_PIN_SDA1               (0x1 << 13)
> +#define SCU_FUN_PIN_SCL1               (0x1 << 12)
>
>  /* AST_SCU_FUN_PIN_CTRL9               0xA8 - Multi-function Pin Control#9 */
>  #define SCU_FUN_PIN_ROMA21             (0x1 << 3)
> --
> 2.8.0.rc3.226.g39d4020
>

Regards,
Simon


More information about the openbmc mailing list