2 * Copyright (C) 2008 Lyrtech <www.lyrtech.com>
4 * SPDX-License-Identifier: GPL-2.0+
10 /* pin muxer definitions */
11 #define PIN_MUX_NUM_FIELDS 8 /* Per register */
12 #define PIN_MUX_FIELD_SIZE 4 /* n in bits */
13 #define PIN_MUX_FIELD_MASK ((1 << PIN_MUX_FIELD_SIZE) - 1)
16 struct pinmux_config {
17 dv_reg *mux; /* Address of mux register */
18 unsigned char value; /* Value to set in field */
19 unsigned char field; /* field number */
22 /* pin table definition */
23 struct pinmux_resource {
24 const struct pinmux_config *pins;
28 #define PINMUX_ITEM(item) { \
30 .n_pins = ARRAY_SIZE(item) \
33 struct lpsc_resource {
37 int dvevm_read_mac_address(uint8_t *buf);
38 void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr);
39 int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins);
40 int davinci_configure_pin_mux_items(const struct pinmux_resource *item,
42 #if defined(CONFIG_DRIVER_TI_EMAC) && defined(CONFIG_SOC_DA8XX)
43 void davinci_emac_mii_mode_sel(int mode_sel);
45 #if defined(CONFIG_SOC_DA8XX)
47 int da8xx_configure_lpsc_items(const struct lpsc_resource *item,