summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backlight.h31
-rw-r--r--include/clk.h24
-rw-r--r--include/configs/chromebook_jerry.h19
-rw-r--r--include/configs/firefly-rk3288.h9
-rw-r--r--include/configs/kylin_rk3036.h44
-rw-r--r--include/configs/rk3288_common.h10
-rw-r--r--include/configs/rock2.h31
-rw-r--r--include/configs/sandbox.h8
-rw-r--r--include/display.h (renamed from include/displayport.h)33
-rw-r--r--include/dm/pinctrl.h45
-rw-r--r--include/dm/uclass-id.h6
-rw-r--r--include/dm/uclass-internal.h16
-rw-r--r--include/edid.h1
-rw-r--r--include/panel.h31
-rw-r--r--include/power/rk808_pmic.h77
-rw-r--r--include/pwm.h53
-rw-r--r--include/pwrseq.h18
-rw-r--r--include/video.h8
18 files changed, 446 insertions, 18 deletions
diff --git a/include/backlight.h b/include/backlight.h
new file mode 100644
index 0000000000..90e1d981e1
--- /dev/null
+++ b/include/backlight.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _BACKLIGHT_H
+#define _BACKLIGHT_H
+
+struct backlight_ops {
+ /**
+ * enable() - Enable a backlight
+ *
+ * @dev: Backlight device to enable
+ * @return 0 if OK, -ve on error
+ */
+ int (*enable)(struct udevice *dev);
+};
+
+#define backlight_get_ops(dev) ((struct backlight_ops *)(dev)->driver->ops)
+
+/**
+ * backlight_enable() - Enable a backlight
+ *
+ * @dev: Backlight device to enable
+ * @return 0 if OK, -ve on error
+ */
+int backlight_enable(struct udevice *dev);
+
+#endif
diff --git a/include/clk.h b/include/clk.h
index 941808a50e..ca20c3dd27 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -8,6 +8,7 @@
#ifndef _CLK_H_
#define _CLK_H_
+#include <errno.h>
#include <linux/types.h>
struct udevice;
@@ -105,4 +106,27 @@ ulong clk_get_periph_rate(struct udevice *dev, int periph);
*/
ulong clk_set_periph_rate(struct udevice *dev, int periph, ulong rate);
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+/**
+ * clk_get_by_index() - look up a clock referenced by a device
+ *
+ * Parse a device's 'clocks' list, returning information on the indexed clock,
+ * ensuring that it is activated.
+ *
+ * @dev: Device containing the clock reference
+ * @index: Clock index to return (0 = first)
+ * @clk_devp: Returns clock device
+ * @return: Peripheral ID for the device to control. This is the first
+ * argument after the clock node phandle. If there is no arguemnt,
+ * returns 0. Return -ve error code on any error
+ */
+int clk_get_by_index(struct udevice *dev, int index, struct udevice **clk_devp);
+#else
+static inline int clk_get_by_index(struct udevice *dev, int index,
+ struct udevice **clk_devp)
+{
+ return -ENOSYS;
+}
+#endif
+
#endif /* _CLK_H_ */
diff --git a/include/configs/chromebook_jerry.h b/include/configs/chromebook_jerry.h
index e29d77695b..150e8765d6 100644
--- a/include/configs/chromebook_jerry.h
+++ b/include/configs/chromebook_jerry.h
@@ -7,6 +7,11 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define ROCKCHIP_DEVICE_SETTINGS \
+ "stdin=serial,cros-ec-keyb\0" \
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
+
#include <configs/rk3288_common.h>
#define CONFIG_ENV_IS_NOWHERE
@@ -15,4 +20,18 @@
#define CONFIG_SPL_SPI_LOAD
#define CONFIG_SPI_FLASH_GIGADEVICE
+#define CONFIG_CMD_SF_TEST
+#define CONFIG_CMD_TIME
+
+#undef CONFIG_SPL_GPIO_SUPPORT
+
+#define CONFIG_KEYBOARD
+
+#define CONFIG_SPL_POWER_SUPPORT
+#define CONFIG_SPL_I2C_SUPPORT
+
+#define CONFIG_I2C_EDID
+#define CONFIG_SYS_WHITE_ON_BLACK
+#define CONFIG_CONSOLE_SCROLL_LINES 10
+
#endif
diff --git a/include/configs/firefly-rk3288.h b/include/configs/firefly-rk3288.h
index 4c5c4ddefd..d6423e7e55 100644
--- a/include/configs/firefly-rk3288.h
+++ b/include/configs/firefly-rk3288.h
@@ -7,6 +7,11 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#define ROCKCHIP_DEVICE_SETTINGS \
+ "stdin=serial,cros-ec-keyb\0" \
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
+
#include <configs/rk3288_common.h>
#define CONFIG_SPL_MMC_SUPPORT
@@ -19,4 +24,8 @@
*/
#define CONFIG_ENV_OFFSET (96 * 1024)
+#define CONFIG_I2C_EDID
+#define CONFIG_SYS_WHITE_ON_BLACK
+#define CONFIG_CONSOLE_SCROLL_LINES 10
+
#endif
diff --git a/include/configs/kylin_rk3036.h b/include/configs/kylin_rk3036.h
index aa07889ff2..b16c03fc0a 100644
--- a/include/configs/kylin_rk3036.h
+++ b/include/configs/kylin_rk3036.h
@@ -7,6 +7,50 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/sizes.h>
#include <configs/rk3036_common.h>
+#ifndef CONFIG_SPL_BUILD
+
+/* Store env in emmc */
+#undef CONFIG_ENV_SIZE
+#define CONFIG_ENV_SIZE SZ_32K
+#undef CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV 0 /* emmc */
+#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
+#define CONFIG_ENV_OFFSET (SZ_4M - SZ_64K) /* reserved area */
+#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+
+/* Enable gpt partition table */
+#define CONFIG_CMD_GPT
+#define CONFIG_RANDOM_UUID
+#define CONFIG_EFI_PARTITION
+#define PARTS_DEFAULT \
+ "uuid_disk=${uuid_gpt_disk};" \
+ "name=loader,start=32K,size=4000K,uuid=${uuid_gpt_loader};" \
+ "name=reserved,size=64K,uuid=${uuid_gpt_reserved};" \
+ "name=misc,size=4M,uuid=${uuid_gpt_misc};" \
+ "name=recovery,size=32M,uuid=${uuid_gpt_recovery};" \
+ "name=boot_a,size=32M,uuid=${uuid_gpt_boot_a};" \
+ "name=boot_b,size=32M,uuid=${uuid_gpt_boot_b};" \
+ "name=system_a,size=818M,uuid=${uuid_gpt_system_a};" \
+ "name=system_b,size=818M,uuid=${uuid_gpt_system_b};" \
+ "name=vendor_a,size=50M,uuid=${uuid_gpt_vendor_a};" \
+ "name=vendor_b,size=50M,uuid=${uuid_gpt_vendor_b};" \
+ "name=cache,size=100M,uuid=${uuid_gpt_cache};" \
+ "name=metadata,size=16M,uuid=${uuid_gpt_metadata};" \
+ "name=persist,size=4M,uuid=${uuid_gpt_persist};" \
+ "name=userdata,size=-,uuid=${uuid_gpt_userdata};\0" \
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "partitions=" PARTS_DEFAULT \
+
+#endif
+
+#define CONFIG_BOARD_LATE_INIT
+#define CONFIG_PREBOOT
+
#endif
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 238711a699..ebf1ab09b3 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -16,7 +16,6 @@
#define CONFIG_BAUDRATE 115200
#define CONFIG_SYS_MALLOC_LEN (32 << 20)
#define CONFIG_SYS_CBSIZE 1024
-#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SYS_THUMB_BUILD
#define CONFIG_OF_LIBFDT
#define CONFIG_DISPLAY_BOARDINFO
@@ -26,6 +25,7 @@
#define CONFIG_SYS_TIMER_COUNTER (CONFIG_SYS_TIMER_BASE + 8)
#define CONFIG_SPL_FRAMEWORK
+#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
#define CONFIG_SPL_LIBCOMMON_SUPPORT
#define CONFIG_SPL_LIBGENERIC_SUPPORT
#define CONFIG_SPL_SERIAL_SUPPORT
@@ -41,6 +41,12 @@
#define CONFIG_ROCKCHIP_COMMON
#define CONFIG_SPL_ROCKCHIP_COMMON
+#define CONFIG_SILENT_CONSOLE
+#ifndef CONFIG_SPL_BUILD
+# define CONFIG_SYS_CONSOLE_IS_IN_ENV
+# define CONFIG_CONSOLE_MUX
+#endif
+
/* MMC/SD IP block */
#define CONFIG_MMC
#define CONFIG_GENERIC_MMC
@@ -73,6 +79,7 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_TIME
+#define CONFIG_CMD_GPIO
#define CONFIG_SYS_SDRAM_BASE 0
#define CONFIG_NR_DRAM_BANKS 1
@@ -109,6 +116,7 @@
"fdt_high=0x1fffffff\0" \
"initrd_high=0x1fffffff\0" \
ENV_MEM_LAYOUT_SETTINGS \
+ ROCKCHIP_DEVICE_SETTINGS \
BOOTENV
#endif
diff --git a/include/configs/rock2.h b/include/configs/rock2.h
new file mode 100644
index 0000000000..d6423e7e55
--- /dev/null
+++ b/include/configs/rock2.h
@@ -0,0 +1,31 @@
+/*
+ * (C) Copyright 2015 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#define ROCKCHIP_DEVICE_SETTINGS \
+ "stdin=serial,cros-ec-keyb\0" \
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
+
+#include <configs/rk3288_common.h>
+
+#define CONFIG_SPL_MMC_SUPPORT
+
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV 0
+/* SPL @ 32k for ~36k
+ * ENV @ 96k
+ * u-boot @ 128K
+ */
+#define CONFIG_ENV_OFFSET (96 * 1024)
+
+#define CONFIG_I2C_EDID
+#define CONFIG_SYS_WHITE_ON_BLACK
+#define CONFIG_CONSOLE_SCROLL_LINES 10
+
+#endif
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 6498981cef..4bffd8d3d3 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -169,12 +169,12 @@
#define CONFIG_KEYBOARD
#define SANDBOX_SERIAL_SETTINGS "stdin=serial,cros-ec-keyb,usbkbd\0" \
- "stdout=serial,lcd.vidconsole\0" \
- "stderr=serial,lcd.vidconsole\0"
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
#else
#define SANDBOX_SERIAL_SETTINGS "stdin=serial\0" \
- "stdout=serial,lcd.vidconsole\0" \
- "stderr=serial,lcd.vidconsole\0"
+ "stdout=serial,vidconsole\0" \
+ "stderr=serial,vidconsole\0"
#endif
#define SANDBOX_ETH_SETTINGS "ethaddr=00:00:11:22:33:44\0" \
diff --git a/include/displayport.h b/include/display.h
index f7c7e25285..c180e76e53 100644
--- a/include/displayport.h
+++ b/include/display.h
@@ -4,21 +4,31 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-#ifndef _DISPLAYPORT_H
-#define _DISPLAYPORT_H
+#ifndef _DISPLAY_H
+#define _DISPLAY_H
struct udevice;
struct display_timing;
/**
- * display_port_read_edid() - Read information from EDID
+ * Display uclass platform data for each device
+ *
+ * @source_id: ID for the source of the display data, typically a video
+ * controller
+ * @src_dev: Source device providing the video
+ */
+struct display_plat {
+ int source_id;
+ struct udevice *src_dev;
+};
+
+/**
+ * display_read_timing() - Read timing information from EDID
*
* @dev: Device to read from
- * @buf: Buffer to read into (should be EDID_SIZE bytes)
- * @buf_size: Buffer size (should be EDID_SIZE)
- * @return number of bytes read, <=0 for error
+ * @return 0 if OK, -ve on error
*/
-int display_port_read_edid(struct udevice *dev, u8 *buf, int buf_size);
+int display_read_timing(struct udevice *dev, struct display_timing *timing);
/**
* display_port_enable() - Enable a display port device
@@ -28,10 +38,10 @@ int display_port_read_edid(struct udevice *dev, u8 *buf, int buf_size);
* @timing: Display timings
* @return 0 if OK, -ve on error
*/
-int display_port_enable(struct udevice *dev, int panel_bpp,
- const struct display_timing *timing);
+int display_enable(struct udevice *dev, int panel_bpp,
+ const struct display_timing *timing);
-struct dm_display_port_ops {
+struct dm_display_ops {
/**
* read_edid() - Read information from EDID
*
@@ -54,7 +64,6 @@ struct dm_display_port_ops {
const struct display_timing *timing);
};
-#define display_port_get_ops(dev) \
- ((struct dm_display_port_ops *)(dev)->driver->ops)
+#define display_get_ops(dev) ((struct dm_display_ops *)(dev)->driver->ops)
#endif
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index f6025f618e..0eb4b924d4 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -114,6 +114,22 @@ struct pinctrl_ops {
* @return peripheral ID of @periph, or -ENOENT on error
*/
int (*get_periph_id)(struct udevice *dev, struct udevice *periph);
+
+ /**
+ * get_gpio_mux() - get the mux value for a particular GPIO
+ *
+ * This allows the raw mux value for a GPIO to be obtained. It is
+ * useful for displaying the function being used by that GPIO, such
+ * as with the 'gpio' command. This function is internal to the GPIO
+ * subsystem and should not be used by generic code. Typically it is
+ * used by a GPIO driver with knowledge of the SoC pinctrl setup.
+ *
+ * @dev: Pinctrl device to use
+ * @banknum: GPIO bank number
+ * @index: GPIO index within the bank
+ * @return mux value (SoC-specific, e.g. 0 for input, 1 for output)
+ */
+ int (*get_gpio_mux)(struct udevice *dev, int banknum, int index);
};
#define pinctrl_get_ops(dev) ((struct pinctrl_ops *)(dev)->driver->ops)
@@ -284,4 +300,33 @@ int pinctrl_request_noflags(struct udevice *dev, int func);
*/
int pinctrl_get_periph_id(struct udevice *dev, struct udevice *periph);
+/**
+ * pinctrl_decode_pin_config() - decode pin configuration flags
+ *
+ * This decodes some of the PIN_CONFIG values into flags, with each value
+ * being (1 << pin_cfg). This does not support things with values like the
+ * slew rate.
+ *
+ * @blob: Device tree blob
+ * @node: Node containing the PIN_CONFIG values
+ * @return decoded flag value, or -ve on error
+ */
+int pinctrl_decode_pin_config(const void *blob, int node);
+
+/**
+ * pinctrl_get_gpio_mux() - get the mux value for a particular GPIO
+ *
+ * This allows the raw mux value for a GPIO to be obtained. It is
+ * useful for displaying the function being used by that GPIO, such
+ * as with the 'gpio' command. This function is internal to the GPIO
+ * subsystem and should not be used by generic code. Typically it is
+ * used by a GPIO driver with knowledge of the SoC pinctrl setup.
+ *
+ * @dev: Pinctrl device to use
+ * @banknum: GPIO bank number
+ * @index: GPIO index within the bank
+ * @return mux value (SoC-specific, e.g. 0 for input, 1 for output)
+*/
+int pinctrl_get_gpio_mux(struct udevice *dev, int banknum, int index);
+
#endif /* __PINCTRL_H */
diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h
index a0a3a79aac..8391e381fa 100644
--- a/include/dm/uclass-id.h
+++ b/include/dm/uclass-id.h
@@ -29,7 +29,7 @@ enum uclass_id {
UCLASS_CLK, /* Clock source, e.g. used by peripherals */
UCLASS_CPU, /* CPU, typically part of an SoC */
UCLASS_CROS_EC, /* Chrome OS EC */
- UCLASS_DISPLAY_PORT, /* Display port video */
+ UCLASS_DISPLAY, /* Display (e.g. DisplayPort, HDMI) */
UCLASS_RAM, /* RAM controller */
UCLASS_ETH, /* Ethernet device */
UCLASS_GPIO, /* Bank of general-purpose I/O pins */
@@ -45,12 +45,16 @@ enum uclass_id {
UCLASS_MMC, /* SD / MMC card or chip */
UCLASS_MOD_EXP, /* RSA Mod Exp device */
UCLASS_MTD, /* Memory Technology Device (MTD) device */
+ UCLASS_PANEL, /* Display panel, such as an LCD */
+ UCLASS_PANEL_BACKLIGHT, /* Backlight controller for panel */
UCLASS_PCH, /* x86 platform controller hub */
UCLASS_PCI, /* PCI bus */
UCLASS_PCI_GENERIC, /* Generic PCI bus device */
UCLASS_PINCTRL, /* Pinctrl (pin muxing/configuration) device */
UCLASS_PINCONFIG, /* Pin configuration node device */
UCLASS_PMIC, /* PMIC I/O device */
+ UCLASS_PWM, /* Pulse-width modulator */
+ UCLASS_PWRSEQ, /* Power sequence device */
UCLASS_REGULATOR, /* Regulator device */
UCLASS_RESET, /* Reset device */
UCLASS_REMOTEPROC, /* Remote Processor device */
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index b51e1da5c1..ad284b8445 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -99,6 +99,22 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
bool find_req_seq, struct udevice **devp);
/**
+ * uclass_find_device_by_of_offset() - Find a uclass device by device tree node
+ *
+ * This searches the devices in the uclass for one attached to the given
+ * device tree node.
+ *
+ * The device is NOT probed, it is merely returned.
+ *
+ * @id: ID to look up
+ * @node: Device tree offset to search for (if -ve then -ENODEV is returned)
+ * @devp: Returns pointer to device (there is only one for each node)
+ * @return 0 if OK, -ve on error
+ */
+int uclass_find_device_by_of_offset(enum uclass_id id, int node,
+ struct udevice **devp);
+
+/**
* uclass_bind_device() - Associate device with a uclass
*
* Connect the device into uclass's list of devices.
diff --git a/include/edid.h b/include/edid.h
index 88b4b7d854..8b022fa98a 100644
--- a/include/edid.h
+++ b/include/edid.h
@@ -17,6 +17,7 @@
/* Size of the EDID data */
#define EDID_SIZE 128
+#define EDID_EXT_SIZE 256
#define GET_BIT(_x, _pos) \
(((_x) >> (_pos)) & 1)
diff --git a/include/panel.h b/include/panel.h
new file mode 100644
index 0000000000..57fccf222e
--- /dev/null
+++ b/include/panel.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2016 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _PANEL_H
+#define _PANEL_H
+
+struct panel_ops {
+ /**
+ * enable_backlight() - Enable the panel backlight
+ *
+ * @dev: Panel device containing the backlight to enable
+ * @return 0 if OK, -ve on error
+ */
+ int (*enable_backlight)(struct udevice *dev);
+};
+
+#define panel_get_ops(dev) ((struct panel_ops *)(dev)->driver->ops)
+
+/**
+ * panel_enable_backlight() - Enable the panel backlight
+ *
+ * @dev: Panel device containing the backlight to enable
+ * @return 0 if OK, -ve on error
+ */
+int panel_enable_backlight(struct udevice *dev);
+
+#endif
diff --git a/include/power/rk808_pmic.h b/include/power/rk808_pmic.h
new file mode 100644
index 0000000000..fb0800b9cb
--- /dev/null
+++ b/include/power/rk808_pmic.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2015 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _PMIC_RK808_H_
+#define _PMIC_RK808_H_
+
+enum {
+ REG_DCDC_EN = 0x23,
+ REG_LDO_EN,
+ REG_SLEEP_SET_OFF1,
+ REG_SLEEP_SET_OFF2,
+ REG_DCDC_UV_STS,
+
+ REG_DCDC_UV_ACT,
+ REG_LDO_UV_STS,
+ REG_LDO_UV_ACT,
+ REG_DCDC_PG,
+ REG_LDO_PG,
+ REG_VOUT_MON_TDB,
+ REG_BUCK1_CONFIG,
+ REG_BUCK1_ON_VSEL,
+
+ REG_BUCK1_SLP_VSEL,
+ REG_BUCK1_DVS_VSEL,
+ REG_BUCK2_CONFIG,
+ REG_BUCK2_ON_VSEL,
+ REG_BUCK2_SLP_VSEL,
+ REG_BUCK2_DVS_VSEL,
+ REG_BUCK3_CONFIG,
+ REG_BUCK4_CONFIG,
+
+ REG_BUCK4_ON_VSEL,
+ REG_BUCK4_SLP_VSEL,
+ LDO1_ON_VSEL = 0x3b,
+ LDO1_SLP_VSEL,
+ LDO2_ON_VSEL,
+ LDO2_SLP_VSEL,
+ LDO3_ON_VSEL,
+
+ LDO3_SLP_VSEL,
+ LDO4_ON_VSEL,
+ LDO4_SLP_VSEL,
+ LDO5_ON_VSEL,
+ LDO5_SLP_VSEL,
+ LDO6_ON_VSEL,
+ LDO6_SLP_VSEL,
+ LDO7_ON_VSEL,
+
+ LDO7_SLP_VSEL,
+ LDO8_ON_VSEL,
+ LDO8_SLP_VSEL,
+ DEVCTRL,
+ INT_STS1,
+ INT_STS_MSK1,
+ INT_STS2,
+ INT_STS_MSK2,
+ IO_POL,
+
+ /* Not sure what this does */
+ DCDC_ILMAX = 0x90,
+
+ RK808_NUM_OF_REGS,
+};
+
+struct rk808_reg_table {
+ char *name;
+ u8 reg_ctl;
+ u8 reg_vol;
+};
+
+int rk808_spl_configure_buck(struct udevice *pmic, int buck, int uvolt);
+
+#endif
diff --git a/include/pwm.h b/include/pwm.h
index f24f2202f4..851915eb87 100644
--- a/include/pwm.h
+++ b/include/pwm.h
@@ -1,6 +1,7 @@
/*
* header file for pwm driver.
*
+ * Copyright 2016 Google Inc.
* Copyright (c) 2011 samsung electronics
* Donghwa Lee <dh09.lee@samsung.com>
*
@@ -10,9 +11,61 @@
#ifndef _pwm_h_
#define _pwm_h_
+/* struct pwm_ops: Operations for the PWM uclass */
+struct pwm_ops {
+ /**
+ * set_config() - Set the PWM configuration
+ *
+ * @dev: PWM device to update
+ * @channel: PWM channel to update
+ * @period_ns: PWM period in nanoseconds
+ * @duty_ns: PWM duty period in nanoseconds
+ * @return 0 if OK, -ve on error
+ */
+ int (*set_config)(struct udevice *dev, uint channel, uint period_ns,
+ uint duty_ns);
+
+ /**
+ * set_enable() - Enable or disable the PWM
+ *
+ * @dev: PWM device to update
+ * @channel: PWM channel to update
+ * @enable: true to enable, false to disable
+ * @return 0 if OK, -ve on error
+ */
+ int (*set_enable)(struct udevice *dev, uint channel, bool enable);
+};
+
+#define pwm_get_ops(dev) ((struct pwm_ops *)(dev)->driver->ops)
+
+/**
+ * pwm_set_config() - Set the PWM configuration
+ *
+ * @dev: PWM device to update
+ * @channel: PWM channel to update
+ * @period_ns: PWM period in nanoseconds
+ * @duty_ns: PWM duty period in nanoseconds
+ * @return 0 if OK, -ve on error
+ */
+int pwm_set_config(struct udevice *dev, uint channel, uint period_ns,
+ uint duty_ns);
+
+/**
+ * pwm_set_enable() - Enable or disable the PWM
+ *
+ * @dev: PWM device to update
+ * @channel: PWM channel to update
+ * @enable: true to enable, false to disable
+ * @return 0 if OK, -ve on error
+ */
+int pwm_set_enable(struct udevice *dev, uint channel, bool enable);
+
+/* Legacy interface */
+#ifndef CONFIG_DM_PWM
int pwm_init (int pwm_id, int div, int invert);
int pwm_config (int pwm_id, int duty_ns, int period_ns);
int pwm_enable (int pwm_id);
void pwm_disable (int pwm_id);
+#endif
#endif /* _pwm_h_ */
diff --git a/include/pwrseq.h b/include/pwrseq.h
new file mode 100644
index 0000000000..b934f29fac
--- /dev/null
+++ b/include/pwrseq.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2013 Google, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __pwrseq_h
+#define __pwrseq_h
+
+struct pwrseq_ops {
+ int (*set_power)(struct udevice *dev, bool enable);
+};
+
+#define pwrseq_get_ops(dev) ((struct pwrseq_ops *)(dev)->driver->ops)
+
+int pwrseq_set_power(struct udevice *dev, bool enable);
+
+#endif
diff --git a/include/video.h b/include/video.h
index b20f06f335..fa643ca5ab 100644
--- a/include/video.h
+++ b/include/video.h
@@ -158,6 +158,14 @@ int video_get_xsize(struct udevice *dev);
*/
int video_get_ysize(struct udevice *dev);
+/**
+ * Set whether we need to flush the dcache when changing the image. This
+ * defaults to off.
+ *
+ * @param flush non-zero to flush cache after update, 0 to skip
+ */
+void video_set_flush_dcache(struct udevice *dev, bool flush);
+
#endif /* CONFIG_DM_VIDEO */
#ifndef CONFIG_DM_VIDEO