summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-04 17:50:20 -0400
committerTom Rini <trini@konsulko.com>2015-05-04 17:50:20 -0400
commit622da1c36aee9c39075f2109848228a5737925c0 (patch)
treee08cd8d033fd09e415d603bab26691d776365adb /include
parent281239ad9dc2a695a53ab34dda44cdbe31c69122 (diff)
parentfd01ae1384a67c354eb53fc8a4c1e0d519014ae8 (diff)
downloadtalos-obmc-uboot-622da1c36aee9c39075f2109848228a5737925c0.tar.gz
talos-obmc-uboot-622da1c36aee9c39075f2109848228a5737925c0.zip
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
Diffstat (limited to 'include')
-rw-r--r--include/axp152.h11
-rw-r--r--include/axp209.h31
-rw-r--r--include/axp221.h26
-rw-r--r--include/configs/sun4i.h2
-rw-r--r--include/configs/sun5i.h2
-rw-r--r--include/configs/sun6i.h2
-rw-r--r--include/configs/sun7i.h2
-rw-r--r--include/configs/sun8i.h2
-rw-r--r--include/configs/sunxi-common.h13
-rw-r--r--include/dt-bindings/dma/sun4i-a10.h56
-rw-r--r--include/dt-bindings/pinctrl/sun4i-a10.h62
-rw-r--r--include/dt-bindings/thermal/thermal.h17
-rw-r--r--include/netdev.h2
13 files changed, 184 insertions, 44 deletions
diff --git a/include/axp152.h b/include/axp152.h
index 9d205f8d3a..c3aef77210 100644
--- a/include/axp152.h
+++ b/include/axp152.h
@@ -15,6 +15,17 @@ enum axp152_reg {
#define AXP152_POWEROFF (1 << 7)
+/* For axp_gpio.c */
+#define AXP_GPIO0_CTRL 0x90
+#define AXP_GPIO1_CTRL 0x91
+#define AXP_GPIO2_CTRL 0x92
+#define AXP_GPIO3_CTRL 0x93
+#define AXP_GPIO_CTRL_OUTPUT_LOW 0x00 /* Drive pin low */
+#define AXP_GPIO_CTRL_OUTPUT_HIGH 0x01 /* Drive pin high */
+#define AXP_GPIO_CTRL_INPUT 0x02 /* Input */
+#define AXP_GPIO_STATE 0x97
+#define AXP_GPIO_STATE_OFFSET 0
+
int axp152_set_dcdc2(int mvolt);
int axp152_set_dcdc3(int mvolt);
int axp152_set_dcdc4(int mvolt);
diff --git a/include/axp209.h b/include/axp209.h
index d36da41a5e..6170202b4c 100644
--- a/include/axp209.h
+++ b/include/axp209.h
@@ -18,11 +18,6 @@ enum axp209_reg {
AXP209_IRQ_ENABLE5 = 0x44,
AXP209_IRQ_STATUS5 = 0x4c,
AXP209_SHUTDOWN = 0x32,
- AXP209_GPIO0_CTRL = 0x90,
- AXP209_GPIO1_CTRL = 0x92,
- AXP209_GPIO2_CTRL = 0x93,
- AXP209_GPIO_STATE = 0x94,
- AXP209_GPIO3_CTRL = 0x95,
};
#define AXP209_POWER_STATUS_ON_BY_DC (1 << 0)
@@ -33,16 +28,17 @@ enum axp209_reg {
#define AXP209_POWEROFF (1 << 7)
-#define AXP209_GPIO_OUTPUT_LOW 0x00 /* Drive pin low */
-#define AXP209_GPIO_OUTPUT_HIGH 0x01 /* Drive pin high */
-#define AXP209_GPIO_INPUT 0x02 /* Float pin */
-
-/* GPIO3 is different from the others */
-#define AXP209_GPIO3_OUTPUT_LOW 0x00 /* Drive pin low, Output mode */
-#define AXP209_GPIO3_OUTPUT_HIGH 0x02 /* Float pin, Output mode */
-#define AXP209_GPIO3_INPUT 0x06 /* Float pin, Input mode */
-
-#define AXP_GPIO
+/* For axp_gpio.c */
+#define AXP_POWER_STATUS 0x00
+#define AXP_POWER_STATUS_VBUS_PRESENT (1 << 5)
+#define AXP_GPIO0_CTRL 0x90
+#define AXP_GPIO1_CTRL 0x92
+#define AXP_GPIO2_CTRL 0x93
+#define AXP_GPIO_CTRL_OUTPUT_LOW 0x00 /* Drive pin low */
+#define AXP_GPIO_CTRL_OUTPUT_HIGH 0x01 /* Drive pin high */
+#define AXP_GPIO_CTRL_INPUT 0x02 /* Input */
+#define AXP_GPIO_STATE 0x94
+#define AXP_GPIO_STATE_OFFSET 4
extern int axp209_set_dcdc2(int mvolt);
extern int axp209_set_dcdc3(int mvolt);
@@ -52,8 +48,3 @@ extern int axp209_set_ldo4(int mvolt);
extern int axp209_init(void);
extern int axp209_poweron_by_dc(void);
extern int axp209_power_button(void);
-
-extern int axp_gpio_direction_input(unsigned int pin);
-extern int axp_gpio_direction_output(unsigned int pin, unsigned int val);
-extern int axp_gpio_get_value(unsigned int pin);
-extern int axp_gpio_set_value(unsigned int pin, unsigned int val);
diff --git a/include/axp221.h b/include/axp221.h
index 0aac04dfeb..9c871623a8 100644
--- a/include/axp221.h
+++ b/include/axp221.h
@@ -6,17 +6,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-#define AXP221_CHIP_ADDR 0x68
-#define AXP221_CTRL_ADDR 0x3e
-#define AXP221_INIT_DATA 0x3e
-
-#define AXP223_DEVICE_ADDR 0x3a3
-#define AXP223_RUNTIME_ADDR 0x2d
-
/* Page 0 addresses */
-#define AXP221_POWER_STATUS 0x00
-#define AXP221_POWER_STATUS_VBUS_AVAIL (1 << 5)
-#define AXP221_POWER_STATUS_VBUS_USABLE (1 << 4)
#define AXP221_CHIP_ID 0x03
#define AXP221_OUTPUT_CTRL1 0x10
#define AXP221_OUTPUT_CTRL1_DCDC0_EN (1 << 0)
@@ -62,7 +52,16 @@
/* Page 1 addresses */
#define AXP221_SID 0x20
-#define AXP_GPIO
+/* For axp_gpio.c */
+#define AXP_POWER_STATUS 0x00
+#define AXP_POWER_STATUS_VBUS_PRESENT (1 << 5)
+#define AXP_GPIO0_CTRL 0x90
+#define AXP_GPIO1_CTRL 0x92
+#define AXP_GPIO_CTRL_OUTPUT_LOW 0x00 /* Drive pin low */
+#define AXP_GPIO_CTRL_OUTPUT_HIGH 0x01 /* Drive pin high */
+#define AXP_GPIO_CTRL_INPUT 0x02 /* Input */
+#define AXP_GPIO_STATE 0x94
+#define AXP_GPIO_STATE_OFFSET 0
int axp221_set_dcdc1(unsigned int mvolt);
int axp221_set_dcdc2(unsigned int mvolt);
@@ -79,8 +78,3 @@ int axp221_set_aldo3(unsigned int mvolt);
int axp221_set_eldo(int eldo_num, unsigned int mvolt);
int axp221_init(void);
int axp221_get_sid(unsigned int *sid);
-
-int axp_gpio_direction_input(unsigned int pin);
-int axp_gpio_direction_output(unsigned int pin, unsigned int val);
-int axp_gpio_get_value(unsigned int pin);
-int axp_gpio_set_value(unsigned int pin, unsigned int val);
diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h
index 7cd5c69d3a..ea079eb5f7 100644
--- a/include/configs/sun4i.h
+++ b/include/configs/sun4i.h
@@ -17,6 +17,8 @@
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
#endif
+#define CONFIG_SUNXI_USB_PHYS 3
+
/*
* Include common sunxi configuration where most the settings are
*/
diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h
index e0470d4282..d257659903 100644
--- a/include/configs/sun5i.h
+++ b/include/configs/sun5i.h
@@ -17,6 +17,8 @@
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
#endif
+#define CONFIG_SUNXI_USB_PHYS 2
+
/*
* Include common sunxi configuration where most the settings are
*/
diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h
index 617c1cdfde..2c24bd2312 100644
--- a/include/configs/sun6i.h
+++ b/include/configs/sun6i.h
@@ -20,6 +20,8 @@
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
#endif
+#define CONFIG_SUNXI_USB_PHYS 3
+
/*
* Include common sunxi configuration where most the settings are
*/
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index 7fa7cec244..56101a9ffc 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -18,6 +18,8 @@
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
#endif
+#define CONFIG_SUNXI_USB_PHYS 3
+
#define CONFIG_ARMV7_PSCI 1
#define CONFIG_ARMV7_SECURE_BASE SUNXI_SRAM_B_BASE
#define CONFIG_TIMER_CLK_FREQ 24000000
diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h
index 79796d75d3..7111c635c1 100644
--- a/include/configs/sun8i.h
+++ b/include/configs/sun8i.h
@@ -18,6 +18,8 @@
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
#endif
+#define CONFIG_SUNXI_USB_PHYS 2
+
/*
* Include common sunxi configuration where most the settings are
*/
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 365d9a50b5..c8ebb54f37 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -41,7 +41,7 @@
#define CONFIG_SYS_TEXT_BASE 0x4a000000
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM_SERIAL)
# define CONFIG_DW_SERIAL
#endif
@@ -195,14 +195,15 @@
#define CONFIG_SPL_I2C_SUPPORT
#endif
-#define CONFIG_SYS_I2C
#if defined CONFIG_I2C0_ENABLE || defined CONFIG_I2C1_ENABLE || \
defined CONFIG_I2C2_ENABLE || defined CONFIG_I2C3_ENABLE || \
defined CONFIG_I2C4_ENABLE
+#define CONFIG_SYS_I2C
#define CONFIG_SYS_I2C_MVTWSI
-#endif
#define CONFIG_SYS_I2C_SPEED 400000
#define CONFIG_SYS_I2C_SLAVE 0x7f
+#define CONFIG_CMD_I2C
+#endif
#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
#define CONFIG_SYS_I2C_SOFT
@@ -222,8 +223,6 @@ extern int soft_i2c_gpio_scl;
#define CONFIG_VIDEO_LCD_I2C_BUS -1 /* NA, but necessary to compile */
#endif
-#define CONFIG_CMD_I2C
-
/* PMU */
#if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || defined CONFIG_AXP221_POWER
#define CONFIG_SPL_POWER_SUPPORT
@@ -284,7 +283,9 @@ extern int soft_i2c_gpio_scl;
/* Ethernet support */
#ifdef CONFIG_SUNXI_EMAC
+#define CONFIG_PHY_ADDR 1
#define CONFIG_MII /* MII PHY management */
+#define CONFIG_PHYLIB
#endif
#ifdef CONFIG_SUNXI_GMAC
@@ -401,7 +402,7 @@ extern int soft_i2c_gpio_scl;
#define CONFIG_EXTRA_ENV_SETTINGS \
CONSOLE_ENV_SETTINGS \
MEM_LAYOUT_ENV_SETTINGS \
- "fdtfile=" CONFIG_FDTFILE "\0" \
+ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0" \
BOOTENV
diff --git a/include/dt-bindings/dma/sun4i-a10.h b/include/dt-bindings/dma/sun4i-a10.h
new file mode 100644
index 0000000000..8caba9ef7e
--- /dev/null
+++ b/include/dt-bindings/dma/sun4i-a10.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2014 Maxime Ripard
+ *
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this file; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __DT_BINDINGS_DMA_SUN4I_A10_H_
+#define __DT_BINDINGS_DMA_SUN4I_A10_H_
+
+#define SUN4I_DMA_NORMAL 0
+#define SUN4I_DMA_DEDICATED 1
+
+#endif /* __DT_BINDINGS_DMA_SUN4I_A10_H_ */
diff --git a/include/dt-bindings/pinctrl/sun4i-a10.h b/include/dt-bindings/pinctrl/sun4i-a10.h
new file mode 100644
index 0000000000..f7553c143b
--- /dev/null
+++ b/include/dt-bindings/pinctrl/sun4i-a10.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2014 Maxime Ripard
+ *
+ * Maxime Ripard <maxime.ripard@free-electrons.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ * a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this file; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef __DT_BINDINGS_PINCTRL_SUN4I_A10_H_
+#define __DT_BINDINGS_PINCTRL_SUN4I_A10_H_
+
+#define SUN4I_PINCTRL_10_MA 0
+#define SUN4I_PINCTRL_20_MA 1
+#define SUN4I_PINCTRL_30_MA 2
+#define SUN4I_PINCTRL_40_MA 3
+
+#define SUN4I_PINCTRL_NO_PULL 0
+#define SUN4I_PINCTRL_PULL_UP 1
+#define SUN4I_PINCTRL_PULL_DOWN 2
+
+#endif /* __DT_BINDINGS_PINCTRL_SUN4I_A10_H_ */
diff --git a/include/dt-bindings/thermal/thermal.h b/include/dt-bindings/thermal/thermal.h
new file mode 100644
index 0000000000..b5e6b0069a
--- /dev/null
+++ b/include/dt-bindings/thermal/thermal.h
@@ -0,0 +1,17 @@
+/*
+ * This header provides constants for most thermal bindings.
+ *
+ * Copyright (C) 2013 Texas Instruments
+ * Eduardo Valentin <eduardo.valentin@ti.com>
+ *
+ * GPLv2 only
+ */
+
+#ifndef _DT_BINDINGS_THERMAL_THERMAL_H
+#define _DT_BINDINGS_THERMAL_THERMAL_H
+
+/* On cooling devices upper and lower limits */
+#define THERMAL_NO_LIMIT (~0)
+
+#endif
+
diff --git a/include/netdev.h b/include/netdev.h
index d96e1dabf9..662d1735db 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -80,8 +80,6 @@ int sh_eth_initialize(bd_t *bis);
int skge_initialize(bd_t *bis);
int smc91111_initialize(u8 dev_num, int base_addr);
int smc911x_initialize(u8 dev_num, int base_addr);
-int sunxi_emac_initialize(bd_t *bis);
-int sunxi_gmac_initialize(bd_t *bis);
int tsi108_eth_initialize(bd_t *bis);
int uec_standard_init(bd_t *bis);
int uli526x_initialize(bd_t *bis);
OpenPOWER on IntegriCloud