aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-10 18:00:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-10 18:00:03 -0500
commitb44a3d2a85c64208a57362a1728efb58a6556cd6 (patch)
tree293302b3ac918eb75b442fa035eb976850163b1d /include/soc
parent56e0464980febfa50432a070261579415c72664e (diff)
parentd13a5c8c4c3dbe299659bcff805f79a2c83e2bbc (diff)
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Olof Johansson: "As we've enabled multiplatform kernels on ARM, and greatly done away with the contents under arch/arm/mach-*, there's still need for SoC-related drivers to go somewhere. Many of them go in through other driver trees, but we still have drivers/soc to hold some of the "doesn't fit anywhere" lowlevel code that might be shared between ARM and ARM64 (or just in general makes sense to not have under the architecture directory). This branch contains mostly such code: - Drivers for qualcomm SoCs for SMEM, SMD and SMD-RPM, used to communicate with power management blocks on these SoCs for use by clock, regulator and bus frequency drivers. - Allwinner Reduced Serial Bus driver, again used to communicate with PMICs. - Drivers for ARM's SCPI (System Control Processor). Not to be confused with PSCI (Power State Coordination Interface). SCPI is used to communicate with the assistant embedded cores doing power management, and we have yet to see how many of them will implement this for their hardware vs abstracting in other ways (or not at all like in the past). - To make confusion between SCPI and PSCI more likely, this release also includes an update of PSCI to interface version 1.0. - Rockchip support for power domains. - A driver to talk to the firmware on Raspberry Pi" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (57 commits) soc: qcom: smd-rpm: Correct size of outgoing message bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus bus: sunxi-rsb: Add Allwinner Reduced Serial Bus (RSB) controller bindings ARM: bcm2835: add mutual inclusion protection drivers: psci: make PSCI 1.0 functions initialization version dependent dt-bindings: Correct paths in Rockchip power domains binding document soc: rockchip: power-domain: don't try to print the clock name in error case soc: qcom/smem: add HWSPINLOCK dependency clk: berlin: add cpuclk ARM: berlin: dts: add CLKID_CPU for BG2Q ARM: bcm2835: Add the Raspberry Pi firmware driver soc: qcom: smem: Move RPM message ram out of smem DT node soc: qcom: smd-rpm: Correct the active vs sleep state flagging soc: qcom: smd: delete unneeded of_node_put firmware: qcom-scm: build for correct architecture level soc: qcom: smd: Correct SMEM items for upper channels qcom-scm: add missing prototype for qcom_scm_is_available() qcom-scm: fix endianess issue in __qcom_scm_is_call_available soc: qcom: smd: Reject send of too big packets soc: qcom: smd: Handle big endian CPUs ...
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/bcm2835/raspberrypi-firmware.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
new file mode 100644
index 000000000000..c07d74aa39bf
--- /dev/null
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -0,0 +1,120 @@
1/*
2 * Copyright © 2015 Broadcom
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __SOC_RASPBERRY_FIRMWARE_H__
10#define __SOC_RASPBERRY_FIRMWARE_H__
11
12#include <linux/types.h>
13#include <linux/of_device.h>
14
15struct rpi_firmware;
16
17enum rpi_firmware_property_status {
18 RPI_FIRMWARE_STATUS_REQUEST = 0,
19 RPI_FIRMWARE_STATUS_SUCCESS = 0x80000000,
20 RPI_FIRMWARE_STATUS_ERROR = 0x80000001,
21};
22
23/**
24 * struct rpi_firmware_property_tag_header - Firmware property tag header
25 * @tag: One of enum_mbox_property_tag.
26 * @buf_size: The number of bytes in the value buffer following this
27 * struct.
28 * @req_resp_size: On submit, the length of the request (though it doesn't
29 * appear to be currently used by the firmware). On return,
30 * the length of the response (always 4 byte aligned), with
31 * the low bit set.
32 */
33struct rpi_firmware_property_tag_header {
34 u32 tag;
35 u32 buf_size;
36 u32 req_resp_size;
37};
38
39enum rpi_firmware_property_tag {
40 RPI_FIRMWARE_PROPERTY_END = 0,
41 RPI_FIRMWARE_GET_FIRMWARE_REVISION = 0x00000001,
42
43 RPI_FIRMWARE_SET_CURSOR_INFO = 0x00008010,
44 RPI_FIRMWARE_SET_CURSOR_STATE = 0x00008011,
45
46 RPI_FIRMWARE_GET_BOARD_MODEL = 0x00010001,
47 RPI_FIRMWARE_GET_BOARD_REVISION = 0x00010002,
48 RPI_FIRMWARE_GET_BOARD_MAC_ADDRESS = 0x00010003,
49 RPI_FIRMWARE_GET_BOARD_SERIAL = 0x00010004,
50 RPI_FIRMWARE_GET_ARM_MEMORY = 0x00010005,
51 RPI_FIRMWARE_GET_VC_MEMORY = 0x00010006,
52 RPI_FIRMWARE_GET_CLOCKS = 0x00010007,
53 RPI_FIRMWARE_GET_POWER_STATE = 0x00020001,
54 RPI_FIRMWARE_GET_TIMING = 0x00020002,
55 RPI_FIRMWARE_SET_POWER_STATE = 0x00028001,
56 RPI_FIRMWARE_GET_CLOCK_STATE = 0x00030001,
57 RPI_FIRMWARE_GET_CLOCK_RATE = 0x00030002,
58 RPI_FIRMWARE_GET_VOLTAGE = 0x00030003,
59 RPI_FIRMWARE_GET_MAX_CLOCK_RATE = 0x00030004,
60 RPI_FIRMWARE_GET_MAX_VOLTAGE = 0x00030005,
61 RPI_FIRMWARE_GET_TEMPERATURE = 0x00030006,
62 RPI_FIRMWARE_GET_MIN_CLOCK_RATE = 0x00030007,
63 RPI_FIRMWARE_GET_MIN_VOLTAGE = 0x00030008,
64 RPI_FIRMWARE_GET_TURBO = 0x00030009,
65 RPI_FIRMWARE_GET_MAX_TEMPERATURE = 0x0003000a,
66 RPI_FIRMWARE_ALLOCATE_MEMORY = 0x0003000c,
67 RPI_FIRMWARE_LOCK_MEMORY = 0x0003000d,
68 RPI_FIRMWARE_UNLOCK_MEMORY = 0x0003000e,
69 RPI_FIRMWARE_RELEASE_MEMORY = 0x0003000f,
70 RPI_FIRMWARE_EXECUTE_CODE = 0x00030010,
71 RPI_FIRMWARE_EXECUTE_QPU = 0x00030011,
72 RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012,
73 RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014,
74 RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
75 RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
76 RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
77 RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
78 RPI_FIRMWARE_SET_TURBO = 0x00038009,
79
80 /* Dispmanx TAGS */
81 RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,
82 RPI_FIRMWARE_FRAMEBUFFER_BLANK = 0x00040002,
83 RPI_FIRMWARE_FRAMEBUFFER_GET_PHYSICAL_WIDTH_HEIGHT = 0x00040003,
84 RPI_FIRMWARE_FRAMEBUFFER_GET_VIRTUAL_WIDTH_HEIGHT = 0x00040004,
85 RPI_FIRMWARE_FRAMEBUFFER_GET_DEPTH = 0x00040005,
86 RPI_FIRMWARE_FRAMEBUFFER_GET_PIXEL_ORDER = 0x00040006,
87 RPI_FIRMWARE_FRAMEBUFFER_GET_ALPHA_MODE = 0x00040007,
88 RPI_FIRMWARE_FRAMEBUFFER_GET_PITCH = 0x00040008,
89 RPI_FIRMWARE_FRAMEBUFFER_GET_VIRTUAL_OFFSET = 0x00040009,
90 RPI_FIRMWARE_FRAMEBUFFER_GET_OVERSCAN = 0x0004000a,
91 RPI_FIRMWARE_FRAMEBUFFER_GET_PALETTE = 0x0004000b,
92 RPI_FIRMWARE_FRAMEBUFFER_RELEASE = 0x00048001,
93 RPI_FIRMWARE_FRAMEBUFFER_TEST_PHYSICAL_WIDTH_HEIGHT = 0x00044003,
94 RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_WIDTH_HEIGHT = 0x00044004,
95 RPI_FIRMWARE_FRAMEBUFFER_TEST_DEPTH = 0x00044005,
96 RPI_FIRMWARE_FRAMEBUFFER_TEST_PIXEL_ORDER = 0x00044006,
97 RPI_FIRMWARE_FRAMEBUFFER_TEST_ALPHA_MODE = 0x00044007,
98 RPI_FIRMWARE_FRAMEBUFFER_TEST_VIRTUAL_OFFSET = 0x00044009,
99 RPI_FIRMWARE_FRAMEBUFFER_TEST_OVERSCAN = 0x0004400a,
100 RPI_FIRMWARE_FRAMEBUFFER_TEST_PALETTE = 0x0004400b,
101 RPI_FIRMWARE_FRAMEBUFFER_SET_PHYSICAL_WIDTH_HEIGHT = 0x00048003,
102 RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_WIDTH_HEIGHT = 0x00048004,
103 RPI_FIRMWARE_FRAMEBUFFER_SET_DEPTH = 0x00048005,
104 RPI_FIRMWARE_FRAMEBUFFER_SET_PIXEL_ORDER = 0x00048006,
105 RPI_FIRMWARE_FRAMEBUFFER_SET_ALPHA_MODE = 0x00048007,
106 RPI_FIRMWARE_FRAMEBUFFER_SET_VIRTUAL_OFFSET = 0x00048009,
107 RPI_FIRMWARE_FRAMEBUFFER_SET_OVERSCAN = 0x0004800a,
108 RPI_FIRMWARE_FRAMEBUFFER_SET_PALETTE = 0x0004800b,
109
110 RPI_FIRMWARE_GET_COMMAND_LINE = 0x00050001,
111 RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001,
112};
113
114int rpi_firmware_property(struct rpi_firmware *fw,
115 u32 tag, void *data, size_t len);
116int rpi_firmware_property_list(struct rpi_firmware *fw,
117 void *data, size_t tag_size);
118struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node);
119
120#endif /* __SOC_RASPBERRY_FIRMWARE_H__ */