2 * (C) Copyright 2009 Wolfgang Denk <wd@denx.de>
3 * (C) Copyright 2009 Dave Srl www.dave.eu
5 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/bitops.h>
12 #include <asm/processor.h>
13 #include <asm/mpc512x.h>
14 #include <fdt_support.h>
15 #ifdef CONFIG_MISC_INIT_R
19 DECLARE_GLOBAL_DATA_PTR;
23 gd->ram_size = fixed_sdram(NULL, NULL, 0);
32 /* we use I2C-2 for on-board eeprom */
35 tmp = in_be32((u32*)CONFIG_SYS_ARIA_FPGA_BASE);
36 printf("FPGA: %u-%u.%u.%u\n",
37 (tmp & 0xFF000000) >> 24,
38 (tmp & 0x00FF0000) >> 16,
39 (tmp & 0x0000FF00) >> 8,
46 static iopin_t ioregs_init[] = {
53 offsetof(struct ioctrl512x, io_control_psc0_0), 5, 0,
54 IO_PIN_FMUX(1) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
55 IO_PIN_PUE(0) | IO_PIN_ST(0) | IO_PIN_DS(3)
58 offsetof(struct ioctrl512x, io_control_psc1_0), 10, 0,
59 IO_PIN_FMUX(1) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
60 IO_PIN_PUE(0) | IO_PIN_ST(0) | IO_PIN_DS(3)
63 offsetof(struct ioctrl512x, io_control_spdif_txclk), 3, 0,
64 IO_PIN_FMUX(1) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
65 IO_PIN_PUE(0) | IO_PIN_ST(0) | IO_PIN_DS(3)
73 offsetof(struct ioctrl512x, io_control_psc6_0), 1, 0,
74 IO_PIN_FMUX(2) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
75 IO_PIN_PUE(0) | IO_PIN_ST(1) | IO_PIN_DS(3)
79 offsetof(struct ioctrl512x, io_control_psc6_1), 1, 0,
80 IO_PIN_FMUX(2) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
81 IO_PIN_PUE(0) | IO_PIN_ST(0) | IO_PIN_DS(3)
83 /* FUNC2=DIUVSYNC Sets Next 26 to DIU Pads */
85 offsetof(struct ioctrl512x, io_control_psc6_4), 26, 0,
86 IO_PIN_FMUX(2) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
87 IO_PIN_PUE(0) | IO_PIN_ST(0) | IO_PIN_DS(3)
94 offsetof(struct ioctrl512x, io_control_j1850_rx), 1, 0,
95 IO_PIN_FMUX(2) | IO_PIN_HOLD(0) | IO_PIN_PUD(0) |
96 IO_PIN_PUE(1) | IO_PIN_ST(1) | IO_PIN_DS(3)
100 int checkboard (void)
102 puts("Board: ARIA\n");
104 /* initialize function mux & slew rate IO inter alia on IO Pins */
106 iopin_initialize(ioregs_init, ARRAY_SIZE(ioregs_init));
111 #ifdef CONFIG_OF_BOARD_SETUP
112 int ft_board_setup(void *blob, bd_t *bd)
114 ft_cpu_setup(blob, bd);
118 #endif /* CONFIG_OF_BOARD_SETUP */