1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#pragma once 14 15#include <platsupport/io.h> 16 17#define EXYNOS5_POWER_PADDR 0x10040000 18#define EXYNOS5_POWER_SIZE 0x5000 19#define EXYNOS5_SYSREG_PADDR 0x10050000 20#define EXYNOS5_SYSREG_SIZE 0x1000 21 22struct sysreg { 23 void* sysreg_vaddr[1]; 24 void* pwrreg_vaddr[5]; 25}; 26typedef struct sysreg sysreg_t; 27 28/** 29 * Initialise the system register subsystem 30 * @param[in] ops a structure containing OS specific operations for memory access 31 * @param[out] sysreg A sysreg structure to initialise 32 * @return 0 on success 33 */ 34int exynos5_sysreg_init(ps_io_ops_t* ops, sysreg_t* sysreg); 35 36enum usb_phy_id { 37 USBPHY_USB2, 38 USBPHY_NUSBPHY 39}; 40 41/** 42 * Enable power for USB PHYs 43 * @param[in] phy_id The ID of the phy to power up 44 * @param[in] sysreg A handle to the sysreg subsystem 45 * @return 0 on success 46 */ 47int exynos5_sysreg_usbphy_enable(enum usb_phy_id phy_id, sysreg_t* sysreg); 48 49