blob: eb3da93cc2f1d9d6db49c5a03b41ab6c746e94f2 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass558ec672017-04-05 16:23:36 -06002/*
3 * (C) Copyright 2012,2015 Stephen Warren
Simon Glass558ec672017-04-05 16:23:36 -06004 */
5
6#ifndef _BCM2835_MSG_H
7#define _BCM2835_MSG_H
8
9/**
10 * bcm2835_power_on_module() - power on an SoC module
11 *
12 * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...)
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010013 * Return: 0 if OK, -EIO on error
Simon Glass558ec672017-04-05 16:23:36 -060014 */
15int bcm2835_power_on_module(u32 module);
16
Simon Glass13ddef82017-04-05 16:23:37 -060017/**
18 * bcm2835_get_mmc_clock() - get the frequency of the MMC clock
19 *
Jonathan Grayf98c4852018-03-17 16:15:48 +110020 * @clock_id: ID of clock to get frequency for
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010021 * Return: clock frequency, or -ve on error
Simon Glass13ddef82017-04-05 16:23:37 -060022 */
Jonathan Grayf98c4852018-03-17 16:15:48 +110023int bcm2835_get_mmc_clock(u32 clock_id);
Simon Glass13ddef82017-04-05 16:23:37 -060024
Simon Glass31efc382017-04-05 16:23:40 -060025/**
26 * bcm2835_get_video_size() - get the current display size
27 *
28 * @widthp: Returns the width in pixels
29 * @heightp: Returns the height in pixels
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010030 * Return: 0 if OK, -ve on error
Simon Glass31efc382017-04-05 16:23:40 -060031 */
32int bcm2835_get_video_size(int *widthp, int *heightp);
33
Simon Glass929df012017-04-05 16:23:41 -060034/**
35 * bcm2835_set_video_params() - set the video parameters
36 *
37 * @widthp: Video width to request (returns the actual width selected)
38 * @heightp: Video height to request (returns the actual height selected)
39 * @depth_bpp: Requested bit depth
40 * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...)
41 * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...)
42 * @fb_basep: Returns base address of frame buffer
43 * @fb_sizep: Returns size of frame buffer
44 * @pitchp: Returns number of bytes in each frame buffer line
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010045 * Return: 0 if OK, -ve on error
Simon Glass929df012017-04-05 16:23:41 -060046 */
47int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp,
48 int pixel_order, int alpha_mode, ulong *fb_basep,
49 ulong *fb_sizep, int *pitchp);
50
Nicolas Saenz Julienne2ae573d2020-06-29 18:37:22 +020051/**
52 * bcm2711_load_vl805_firmware() - get vl805's firmware loaded
53 *
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010054 * Return: 0 if OK, -EIO on error
Nicolas Saenz Julienne2ae573d2020-06-29 18:37:22 +020055 */
56int bcm2711_notify_vl805_reset(void);
57
Simon Glass558ec672017-04-05 16:23:36 -060058#endif