Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 558ec67 | 2017-04-05 16:23:36 -0600 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2012,2015 Stephen Warren |
Simon Glass | 558ec67 | 2017-04-05 16:23:36 -0600 | [diff] [blame] | 4 | */ |
| 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 Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 13 | * Return: 0 if OK, -EIO on error |
Simon Glass | 558ec67 | 2017-04-05 16:23:36 -0600 | [diff] [blame] | 14 | */ |
| 15 | int bcm2835_power_on_module(u32 module); |
| 16 | |
Simon Glass | 13ddef8 | 2017-04-05 16:23:37 -0600 | [diff] [blame] | 17 | /** |
| 18 | * bcm2835_get_mmc_clock() - get the frequency of the MMC clock |
| 19 | * |
Jonathan Gray | f98c485 | 2018-03-17 16:15:48 +1100 | [diff] [blame] | 20 | * @clock_id: ID of clock to get frequency for |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 21 | * Return: clock frequency, or -ve on error |
Simon Glass | 13ddef8 | 2017-04-05 16:23:37 -0600 | [diff] [blame] | 22 | */ |
Jonathan Gray | f98c485 | 2018-03-17 16:15:48 +1100 | [diff] [blame] | 23 | int bcm2835_get_mmc_clock(u32 clock_id); |
Simon Glass | 13ddef8 | 2017-04-05 16:23:37 -0600 | [diff] [blame] | 24 | |
Simon Glass | 31efc38 | 2017-04-05 16:23:40 -0600 | [diff] [blame] | 25 | /** |
Vincent Fazio | c9c9539 | 2021-09-14 13:19:19 -0500 | [diff] [blame] | 26 | * bcm2835_set_sdhost_clock() - determine if firmware controls sdhost cdiv |
| 27 | * |
| 28 | * @rate_hz: Input clock frequency |
| 29 | * @rate_1: Returns a clock frequency |
| 30 | * @rate_2: Returns a clock frequency |
| 31 | * @return 0 of OK, -EIO on error |
| 32 | */ |
| 33 | int bcm2835_set_sdhost_clock(u32 rate_hz, u32 *rate_1, u32 *rate_2); |
| 34 | |
| 35 | /** |
Simon Glass | 31efc38 | 2017-04-05 16:23:40 -0600 | [diff] [blame] | 36 | * bcm2835_get_video_size() - get the current display size |
| 37 | * |
| 38 | * @widthp: Returns the width in pixels |
| 39 | * @heightp: Returns the height in pixels |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 40 | * Return: 0 if OK, -ve on error |
Simon Glass | 31efc38 | 2017-04-05 16:23:40 -0600 | [diff] [blame] | 41 | */ |
| 42 | int bcm2835_get_video_size(int *widthp, int *heightp); |
| 43 | |
Simon Glass | 929df01 | 2017-04-05 16:23:41 -0600 | [diff] [blame] | 44 | /** |
| 45 | * bcm2835_set_video_params() - set the video parameters |
| 46 | * |
| 47 | * @widthp: Video width to request (returns the actual width selected) |
| 48 | * @heightp: Video height to request (returns the actual height selected) |
| 49 | * @depth_bpp: Requested bit depth |
| 50 | * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...) |
| 51 | * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...) |
| 52 | * @fb_basep: Returns base address of frame buffer |
| 53 | * @fb_sizep: Returns size of frame buffer |
| 54 | * @pitchp: Returns number of bytes in each frame buffer line |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 55 | * Return: 0 if OK, -ve on error |
Simon Glass | 929df01 | 2017-04-05 16:23:41 -0600 | [diff] [blame] | 56 | */ |
| 57 | int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp, |
| 58 | int pixel_order, int alpha_mode, ulong *fb_basep, |
| 59 | ulong *fb_sizep, int *pitchp); |
| 60 | |
Nicolas Saenz Julienne | 2ae573d | 2020-06-29 18:37:22 +0200 | [diff] [blame] | 61 | /** |
| 62 | * bcm2711_load_vl805_firmware() - get vl805's firmware loaded |
| 63 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 64 | * Return: 0 if OK, -EIO on error |
Nicolas Saenz Julienne | 2ae573d | 2020-06-29 18:37:22 +0200 | [diff] [blame] | 65 | */ |
| 66 | int bcm2711_notify_vl805_reset(void); |
| 67 | |
Simon Glass | 558ec67 | 2017-04-05 16:23:36 -0600 | [diff] [blame] | 68 | #endif |