Skip to content

Commit 82efe43

Browse files
committed
Merge tag 'devicetree-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull Devicetree updates from Rob Herring: - Fix possible memory leak in reserved-memory failure case - Support for DMA parent bus which are not a parent node - Clang -Wunsequenced fix - Remove some unnecessary prints on memory alloc failures - Various printk msg and comment fixes - Update DT schema tools repository location - Convert simple-framebuffer binding to DT schema - Bindings for isl68137 and ir38064 trivial devices - New documentation on binding do's and don't's for binding writers to ignore * tag 'devicetree-for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (22 commits) of: unittest: Remove error printing on OOM of: irq: Remove WARN_ON() for kzalloc() failure dt-bindings: pinctrl: fix bias-pull,up typo dt-bindings: Update schema project location to devicetree.org github group of: fix clang -Wunsequenced for be32_to_cpu() of/device.c: fix the wrong comments dt-bindings: Add isl68137 as a trivial device dt-bindings: Add ir38064 as a trivial device of: del redundant type conversion dt-bindings: mfd: axp20x: Add fallback for axp805 of: Improve of_phandle_iterator_next() error message dt-bindings: connector: Spelling mistake dt-bindings: Add schemas for simple-framebuffer of: address: Add support for the parent DMA bus of: address: Retrieve a parent through a callback in __of_translate_address dt-bindings: bus: Add binding for the Allwinner MBUS controller dt-bindings: interconnect: Add a dma interconnect name of: use correct function prototype for of_overlay_fdt_apply() of: reserved_mem: fix reserve memory leak of: property: Document that of_graph_get_endpoint_by_regs needs of_node_put ...
2 parents dd5001e + 2a656cb commit 82efe43

28 files changed

+341
-196
lines changed

Documentation/devicetree/bindings/arm/cpus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ properties:
6767

6868
patternProperties:
6969
'^cpu@[0-9a-f]+$':
70+
type: object
7071
properties:
7172
device_type:
7273
const: cpu
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Allwinner Memory Bus (MBUS) controller
2+
3+
The MBUS controller drives the MBUS that other devices in the SoC will
4+
use to perform DMA. It also has a register interface that allows to
5+
monitor and control the bandwidth and priorities for masters on that
6+
bus.
7+
8+
Required properties:
9+
- compatible: Must be one of:
10+
- allwinner,sun5i-a13-mbus
11+
- reg: Offset and length of the register set for the controller
12+
- clocks: phandle to the clock driving the controller
13+
- dma-ranges: See section 2.3.9 of the DeviceTree Specification
14+
- #interconnect-cells: Must be one, with the argument being the MBUS
15+
port ID
16+
17+
Each device having to perform their DMA through the MBUS must have the
18+
interconnects and interconnect-names properties set to the MBUS
19+
controller and with "dma-mem" as the interconnect name.
20+
21+
Example:
22+
23+
mbus: dram-controller@1c01000 {
24+
compatible = "allwinner,sun5i-a13-mbus";
25+
reg = <0x01c01000 0x1000>;
26+
clocks = <&ccu CLK_MBUS>;
27+
dma-ranges = <0x00000000 0x40000000 0x20000000>;
28+
#interconnect-cells = <1>;
29+
};
30+
31+
fe0: display-frontend@1e00000 {
32+
compatible = "allwinner,sun5i-a13-display-frontend";
33+
...
34+
interconnects = <&mbus 19>;
35+
interconnect-names = "dma-mem";
36+
};

Documentation/devicetree/bindings/connector/usb-connector.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Required properties for usb-c-connector with power delivery support:
4747
Required nodes:
4848
- any data bus to the connector should be modeled using the OF graph bindings
4949
specified in bindings/graph.txt, unless the bus is between parent node and
50-
the connector. Since single connector can have multpile data buses every bus
50+
the connector. Since single connector can have multiple data buses every bus
5151
has assigned OF graph port number as follows:
5252
0: High Speed (HS), present in all connectors,
5353
1: Super Speed (SS), present in SS capable connectors,

Documentation/devicetree/bindings/display/amlogic,simple-framebuffer.txt

Lines changed: 0 additions & 33 deletions
This file was deleted.

Documentation/devicetree/bindings/display/simple-framebuffer-sunxi.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

Documentation/devicetree/bindings/display/simple-framebuffer.txt

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/simple-framebuffer.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Simple Framebuffer Device Tree Bindings
8+
9+
maintainers:
10+
- Bartlomiej Zolnierkiewicz <[email protected]>
11+
- Hans de Goede <[email protected]>
12+
13+
description: |+
14+
A simple frame-buffer describes a frame-buffer setup by firmware or
15+
the bootloader, with the assumption that the display hardware has
16+
already been set up to scan out from the memory pointed to by the
17+
reg property.
18+
19+
Since simplefb nodes represent runtime information they must be
20+
sub-nodes of the chosen node (*). Simplefb nodes must be named
21+
framebuffer@<address>.
22+
23+
If the devicetree contains nodes for the display hardware used by a
24+
simplefb, then the simplefb node must contain a property called
25+
display, which contains a phandle pointing to the primary display
26+
hw node, so that the OS knows which simplefb to disable when handing
27+
over control to a driver for the real hardware. The bindings for the
28+
hw nodes must specify which node is considered the primary node.
29+
30+
It is advised to add display# aliases to help the OS determine how
31+
to number things. If display# aliases are used, then if the simplefb
32+
node contains a display property then the /aliases/display# path
33+
must point to the display hw node the display property points to,
34+
otherwise it must point directly to the simplefb node.
35+
36+
If a simplefb node represents the preferred console for user
37+
interaction, then the chosen node stdout-path property should point
38+
to it, or to the primary display hw node, as with display#
39+
aliases. If display aliases are used then it should be set to the
40+
alias instead.
41+
42+
It is advised that devicetree files contain pre-filled, disabled
43+
framebuffer nodes, so that the firmware only needs to update the
44+
mode information and enable them. This way if e.g. later on support
45+
for more display clocks get added, the simplefb nodes will already
46+
contain this info and the firmware does not need to be updated.
47+
48+
If pre-filled framebuffer nodes are used, the firmware may need
49+
extra information to find the right node. In that case an extra
50+
platform specific compatible and platform specific properties should
51+
be used and documented.
52+
53+
properties:
54+
compatible:
55+
items:
56+
- enum:
57+
- allwinner,simple-framebuffer
58+
- amlogic,simple-framebuffer
59+
- const: simple-framebuffer
60+
61+
reg:
62+
description: Location and size of the framebuffer memory
63+
64+
clocks:
65+
description: List of clocks used by the framebuffer.
66+
67+
power-domains:
68+
description: List of power domains used by the framebuffer.
69+
70+
width:
71+
$ref: /schemas/types.yaml#/definitions/uint32
72+
description: Width of the framebuffer in pixels
73+
74+
height:
75+
$ref: /schemas/types.yaml#/definitions/uint32
76+
description: Height of the framebuffer in pixels
77+
78+
stride:
79+
$ref: /schemas/types.yaml#/definitions/uint32
80+
description: Number of bytes of a line in the framebuffer
81+
82+
format:
83+
description: >
84+
Format of the framebuffer:
85+
* `a8b8g8r8` - 32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r
86+
* `r5g6b5` - 16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b
87+
enum:
88+
- a8b8g8r8
89+
- r5g6b5
90+
91+
display:
92+
$ref: /schemas/types.yaml#/definitions/phandle
93+
description: Primary display hardware node
94+
95+
allwinner,pipeline:
96+
description: Pipeline used by the framebuffer on Allwinner SoCs
97+
enum:
98+
- de_be0-lcd0
99+
- de_be0-lcd0-hdmi
100+
- de_be0-lcd0-tve0
101+
- de_be1-lcd0
102+
- de_be1-lcd1-hdmi
103+
- de_fe0-de_be0-lcd0
104+
- de_fe0-de_be0-lcd0-hdmi
105+
- de_fe0-de_be0-lcd0-tve0
106+
- mixer0-lcd0
107+
- mixer0-lcd0-hdmi
108+
- mixer1-lcd1-hdmi
109+
- mixer1-lcd1-tve
110+
111+
amlogic,pipeline:
112+
description: Pipeline used by the framebuffer on Amlogic SoCs
113+
enum:
114+
- vpu-cvbs
115+
- vpu-hdmi
116+
117+
patternProperties:
118+
"^[a-zA-Z0-9-]+-supply$":
119+
$ref: /schemas/types.yaml#/definitions/phandle
120+
description:
121+
Regulators used by the framebuffer. These should be named
122+
according to the names in the device design.
123+
124+
required:
125+
# The binding requires also reg, width, height, stride and format,
126+
# but usually they will be filled by the bootloader.
127+
- compatible
128+
129+
additionalProperties: false
130+
131+
examples:
132+
- |
133+
aliases {
134+
display0 = &lcdc0;
135+
};
136+
137+
chosen {
138+
#address-cells = <1>;
139+
#size-cells = <1>;
140+
stdout-path = "display0";
141+
framebuffer0: framebuffer@1d385000 {
142+
compatible = "simple-framebuffer";
143+
reg = <0x1d385000 3840000>;
144+
width = <1600>;
145+
height = <1200>;
146+
stride = <3200>;
147+
format = "r5g6b5";
148+
clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>;
149+
lcd-supply = <&reg_dc1sw>;
150+
display = <&lcdc0>;
151+
};
152+
};
153+
154+
soc@1c00000 {
155+
lcdc0: lcdc@1c0c000 {
156+
compatible = "allwinner,sun4i-a10-lcdc";
157+
};
158+
};
159+
160+
...

Documentation/devicetree/bindings/interconnect/interconnect.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ interconnect-names : List of interconnect path name strings sorted in the same
5151
interconnect-names to match interconnect paths with interconnect
5252
specifier pairs.
5353

54+
Reserved interconnect names:
55+
* dma-mem: Path from the device to the main memory of
56+
the system
57+
5458
Example:
5559

5660
sdhci@7864000 {

Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ required:
129129

130130
patternProperties:
131131
"^v2m@[0-9a-f]+$":
132+
type: object
132133
description: |
133134
* GICv2m extension for MSI/MSI-x support (Optional)
134135

0 commit comments

Comments
 (0)