Skip to content

Commit 289cf15

Browse files
committed
Merge tag 'devicetree-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring: - Sync dtc with upstream version v1.4.6-21-g84e414b0b5bc. This adds new warnings which are either fixed or disabled by default (enabled with W=1). - Validate an untrusted offset in DT overlay function update_usages_of_a_phandle_reference - Fix a use after free error of_platform_device_destroy - Fix an off by 1 string errors in unittest - Avoid creating a struct device for OPP nodes - Update DT specific submitting-patches.txt with patch content and subject requirements. - Move some bindings to their proper subsystem locations - Add vendor prefixes for Kaohsiung, SiFive, Avnet, Wi2Wi, Logic PD, and ArcherMind - Add documentation for "no-gpio-delays" property in FSI bus GPIO master - Add compatible for r8a77990 SoC ravb ethernet block - More wack-a-mole removal of 'status' property in examples * tag 'devicetree-for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (25 commits) dt-bindings: submitting-patches: add guidance on patch content and subject of: platform: stop accessing invalid dev in of_platform_device_destroy dt-bindings: net: ravb: Add support for r8a77990 SoC dt-bindings: Add vendor prefix for ArcherMind dt-bindings: fsi-master-gpio: Document "no-gpio-delays" property dt-bindings: Add vendor prefix for Logic PD of: overlay: validate offset from property fixups of: unittest: for strings, account for trailing \0 in property length field drm: rcar-du: disable dtc graph-endpoint warnings on DT overlays kbuild: disable new dtc graph and unit-address warnings scripts/dtc: Update to upstream version v1.4.6-21-g84e414b0b5bc MAINTAINERS: add keyword for devicetree overlay notifiers dt-bindings: define vendor prefix for Wi2Wi, Inc. dt-bindings: Add vendor prefix for Avnet, Inc. dt-bindings: Relocate Tegra20 memory controller bindings dt-bindings: Add "sifive" vendor prefix dt-bindings: exynos: move ADC binding to iio/adc/ directory dt-bindings: powerpc/4xx: move 4xx NDFC and EMAC bindings to subsystem directories dt-bindings: move various RNG bindings to rng/ directory dt-bindings: move various timer bindings to timer/ directory ...
2 parents 7423fd7 + 44acf10 commit 289cf15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+320
-49
lines changed

Documentation/devicetree/bindings/arm/ux500/boards.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interrupt-controller:
2626
see binding for interrupt-controller/arm,gic.txt
2727

2828
timer:
29-
see binding for arm/twd.txt
29+
see binding for timer/arm,twd.txt
3030

3131
clocks:
3232
see binding for clocks/ux500.txt

Documentation/devicetree/bindings/dma/k3dma.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Controller:
2323
dma-requests = <27>;
2424
interrupts = <0 12 4>;
2525
clocks = <&pclk>;
26-
status = "disable";
2726
};
2827

2928
Client:

Documentation/devicetree/bindings/dma/ti-edma.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ mmc0: mmc@23000000 {
190190
power-domains = <&k2g_pds 0xb>;
191191
clocks = <&k2g_clks 0xb 1>, <&k2g_clks 0xb 2>;
192192
clock-names = "fck", "mmchsdb_fck";
193-
status = "disabled";
194193
};
195194

196195
------------------------------------------------------------------------------

Documentation/devicetree/bindings/fsi/fsi-master-gpio.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Optional properties:
1111
- trans-gpios = <gpio-descriptor>; : GPIO for voltage translator enable
1212
- mux-gpios = <gpio-descriptor>; : GPIO for pin multiplexing with other
1313
functions (eg, external FSI masters)
14+
- no-gpio-delays; : Don't add extra delays between GPIO
15+
accesses. This is useful when the HW
16+
GPIO block is running at a low enough
17+
frequency.
1418

1519
Examples:
1620

Documentation/devicetree/bindings/mips/lantiq/rcu.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ Example of the RCU bindings on a xRX200 SoC:
6161
usb_phy0: usb2-phy@18 {
6262
compatible = "lantiq,xrx200-usb2-phy";
6363
reg = <0x18 4>, <0x38 4>;
64-
status = "disabled";
6564

6665
resets = <&reset1 4 4>, <&reset0 4 4>;
6766
reset-names = "phy", "ctrl";
@@ -71,7 +70,6 @@ Example of the RCU bindings on a xRX200 SoC:
7170
usb_phy1: usb2-phy@34 {
7271
compatible = "lantiq,xrx200-usb2-phy";
7372
reg = <0x34 4>, <0x3C 4>;
74-
status = "disabled";
7573

7674
resets = <&reset1 5 4>, <&reset0 4 4>;
7775
reset-names = "phy", "ctrl";

Documentation/devicetree/bindings/mmc/tmio_mmc.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ Example: R8A7790 (R-Car H2) SDHI controller nodes
6969
max-frequency = <195000000>;
7070
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
7171
resets = <&cpg 314>;
72-
status = "disabled";
7372
};
7473

7574
sdhi1: sd@ee120000 {
@@ -83,7 +82,6 @@ Example: R8A7790 (R-Car H2) SDHI controller nodes
8382
max-frequency = <195000000>;
8483
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
8584
resets = <&cpg 313>;
86-
status = "disabled";
8785
};
8886

8987
sdhi2: sd@ee140000 {
@@ -97,7 +95,6 @@ Example: R8A7790 (R-Car H2) SDHI controller nodes
9795
max-frequency = <97500000>;
9896
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
9997
resets = <&cpg 312>;
100-
status = "disabled";
10198
};
10299

103100
sdhi3: sd@ee160000 {
@@ -111,5 +108,4 @@ Example: R8A7790 (R-Car H2) SDHI controller nodes
111108
max-frequency = <97500000>;
112109
power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
113110
resets = <&cpg 311>;
114-
status = "disabled";
115111
};

Documentation/devicetree/bindings/mtd/mtk-nand.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Required NFI properties:
2020
- interrupts: Interrupts of NFI.
2121
- clocks: NFI required clocks.
2222
- clock-names: NFI clocks internal name.
23-
- status: Disabled default. Then set "okay" by platform.
2423
- ecc-engine: Required ECC Engine node.
2524
- #address-cells: NAND chip index, should be 1.
2625
- #size-cells: Should be 0.
@@ -34,7 +33,6 @@ Example:
3433
clocks = <&pericfg CLK_PERI_NFI>,
3534
<&pericfg CLK_PERI_NFI_PAD>;
3635
clock-names = "nfi_clk", "pad_clk";
37-
status = "disabled";
3836
ecc-engine = <&bch>;
3937
#address-cells = <1>;
4038
#size-cells = <0>;
@@ -152,7 +150,6 @@ Required BCH properties:
152150
- interrupts: Interrupts of ECC.
153151
- clocks: ECC required clocks.
154152
- clock-names: ECC clocks internal name.
155-
- status: Disabled default. Then set "okay" by platform.
156153

157154
Example:
158155

@@ -162,5 +159,4 @@ Example:
162159
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_LOW>;
163160
clocks = <&pericfg CLK_PERI_NFI_ECC>;
164161
clock-names = "nfiecc_clk";
165-
status = "disabled";
166162
};

Documentation/devicetree/bindings/net/renesas,ravb.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Required properties:
2121
- "renesas,etheravb-r8a77965" for the R8A77965 SoC.
2222
- "renesas,etheravb-r8a77970" for the R8A77970 SoC.
2323
- "renesas,etheravb-r8a77980" for the R8A77980 SoC.
24+
- "renesas,etheravb-r8a77990" for the R8A77990 SoC.
2425
- "renesas,etheravb-r8a77995" for the R8A77995 SoC.
2526
- "renesas,etheravb-rcar-gen3" as a fallback for the above
2627
R-Car Gen3 devices.

Documentation/devicetree/bindings/pci/xgene-pci.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ Optional properties:
2525

2626
Example:
2727

28-
SoC-specific DT Entry:
29-
3028
pcie0: pcie@1f2b0000 {
3129
status = "disabled";
3230
device_type = "pci";
@@ -50,8 +48,3 @@ SoC-specific DT Entry:
5048
clocks = <&pcie0clk 0>;
5149
};
5250

53-
54-
Board-specific DT Entry:
55-
&pcie0 {
56-
status = "ok";
57-
};

Documentation/devicetree/bindings/pps/pps-gpio.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ Example:
2020
assert-falling-edge;
2121

2222
compatible = "pps-gpio";
23-
status = "okay";
2423
};

Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Required properties:
44
- compatible: Shall contain "ti,omap-dmtimer-pwm".
5-
- ti,timers: phandle to PWM capable OMAP timer. See arm/omap/timer.txt for info
5+
- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer.txt for info
66
about these timers.
77
- #pwm-cells: Should be 3. See pwm.txt in this directory for a description of
88
the cells format.

Documentation/devicetree/bindings/submitting-patches.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ I. For patch submitters
66
0) Normal patch submission rules from Documentation/process/submitting-patches.rst
77
applies.
88

9-
1) The Documentation/ portion of the patch should be a separate patch.
9+
1) The Documentation/ and include/dt-bindings/ portion of the patch should
10+
be a separate patch. The preferred subject prefix for binding patches is:
11+
12+
"dt-bindings: <binding dir>: ..."
13+
14+
The 80 characters of the subject are precious. It is recommended to not
15+
use "Documentation" or "doc" because that is implied. All bindings are
16+
docs. Repeating "binding" again should also be avoided.
1017

1118
2) Submit the entire series to the devicetree mailinglist at
1219

Documentation/devicetree/bindings/thermal/rcar-gen3-thermal.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Example:
2727

2828
tsc: thermal@e6198000 {
2929
compatible = "renesas,r8a7795-thermal";
30-
reg = <0 0xe6198000 0 0x68>,
31-
<0 0xe61a0000 0 0x5c>,
32-
<0 0xe61a8000 0 0x5c>;
30+
reg = <0 0xe6198000 0 0x100>,
31+
<0 0xe61a0000 0 0x100>,
32+
<0 0xe61a8000 0 0x100>;
3333
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
3434
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
3535
<GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;

Documentation/devicetree/bindings/vendor-prefixes.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ andestech Andes Technology Corporation
3232
apm Applied Micro Circuits Corporation (APM)
3333
aptina Aptina Imaging
3434
arasan Arasan Chip Systems
35+
archermind ArcherMind Technology (Nanjing) Co., Ltd.
3536
arctic Arctic Sand
3637
aries Aries Embedded GmbH
3738
arm ARM Ltd.
@@ -47,6 +48,7 @@ auvidea Auvidea GmbH
4748
avago Avago Technologies
4849
avia avia semiconductor
4950
avic Shanghai AVIC Optoelectronics Co., Ltd.
51+
avnet Avnet, Inc.
5052
axentia Axentia Technologies AB
5153
axis Axis Communications AB
5254
bananapi BIPAI KEJI LIMITED
@@ -186,6 +188,7 @@ khadas Khadas
186188
kiebackpeter Kieback & Peter GmbH
187189
kinetic Kinetic Technologies
188190
kingnovel Kingnovel Technology Co., Ltd.
191+
koe Kaohsiung Opto-Electronics Inc.
189192
kosagi Sutajio Ko-Usagi PTE Ltd.
190193
kyo Kyocera Corporation
191194
lacie LaCie
@@ -200,6 +203,7 @@ linaro Linaro Limited
200203
linksys Belkin International, Inc. (Linksys)
201204
linux Linux-specific binding
202205
lltc Linear Technology Corporation
206+
logicpd Logic PD, Inc.
203207
lsi LSI Corp. (LSI Logic)
204208
lwn Liebherr-Werk Nenzing GmbH
205209
macnica Macnica Americas
@@ -320,6 +324,7 @@ sgx SGX Sensortech
320324
sharp Sharp Corporation
321325
shimafuji Shimafuji Electric, Inc.
322326
si-en Si-En Technology Ltd.
327+
sifive SiFive, Inc.
323328
sigma Sigma Designs, Inc.
324329
sii Seiko Instruments, Inc.
325330
sil Silicon Image
@@ -395,6 +400,7 @@ vot Vision Optical Technology Co., Ltd.
395400
wd Western Digital Corp.
396401
wetek WeTek Electronics, limited.
397402
wexler Wexler
403+
wi2wi Wi2Wi, Inc.
398404
winbond Winbond Electronics corp.
399405
winstar Winstar Display Corp.
400406
wlf Wolfson Microelectronics

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10510,12 +10510,14 @@ F: drivers/infiniband/ulp/opa_vnic
1051010510

1051110511
OPEN FIRMWARE AND DEVICE TREE OVERLAYS
1051210512
M: Pantelis Antoniou <[email protected]>
10513+
M: Frank Rowand <[email protected]>
1051310514
1051410515
S: Maintained
1051510516
F: Documentation/devicetree/dynamic-resolution-notes.txt
1051610517
F: Documentation/devicetree/overlay-notes.txt
1051710518
F: drivers/of/overlay.c
1051810519
F: drivers/of/resolver.c
10520+
K: of_overlay_notifier_
1051910521

1052010522
OPEN FIRMWARE AND FLATTENED DEVICE TREE
1052110523
M: Rob Herring <[email protected]>

drivers/gpu/drm/rcar-du/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_VSP) += rcar_du_vsp.o
1717
obj-$(CONFIG_DRM_RCAR_DU) += rcar-du-drm.o
1818
obj-$(CONFIG_DRM_RCAR_DW_HDMI) += rcar_dw_hdmi.o
1919
obj-$(CONFIG_DRM_RCAR_LVDS) += rcar_lvds.o
20+
21+
# 'remote-endpoint' is fixed up at run-time
22+
DTC_FLAGS_rcar_du_of_lvds_r8a7790 += -Wno-graph_endpoint
23+
DTC_FLAGS_rcar_du_of_lvds_r8a7791 += -Wno-graph_endpoint
24+
DTC_FLAGS_rcar_du_of_lvds_r8a7793 += -Wno-graph_endpoint
25+
DTC_FLAGS_rcar_du_of_lvds_r8a7795 += -Wno-graph_endpoint
26+
DTC_FLAGS_rcar_du_of_lvds_r8a7796 += -Wno-graph_endpoint

drivers/of/of_numa.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ int of_node_to_nid(struct device_node *device)
177177

178178
return NUMA_NO_NODE;
179179
}
180-
EXPORT_SYMBOL(of_node_to_nid);
181180

182181
int __init of_numa_init(void)
183182
{

drivers/of/platform.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ const struct of_device_id of_default_bus_match_table[] = {
3232
{} /* Empty terminated list */
3333
};
3434

35+
static const struct of_device_id of_skipped_node_table[] = {
36+
{ .compatible = "operating-points-v2", },
37+
{} /* Empty terminated list */
38+
};
39+
3540
static int of_dev_node_match(struct device *dev, void *data)
3641
{
3742
return dev->of_node == data;
@@ -356,6 +361,12 @@ static int of_platform_bus_create(struct device_node *bus,
356361
return 0;
357362
}
358363

364+
/* Skip nodes for which we don't want to create devices */
365+
if (unlikely(of_match_node(of_skipped_node_table, bus))) {
366+
pr_debug("%s() - skipping %pOF node\n", __func__, bus);
367+
return 0;
368+
}
369+
359370
if (of_node_check_flag(bus, OF_POPULATED_BUS)) {
360371
pr_debug("%s() - skipping %pOF, already populated\n",
361372
__func__, bus);
@@ -537,15 +548,16 @@ int of_platform_device_destroy(struct device *dev, void *data)
537548
if (of_node_check_flag(dev->of_node, OF_POPULATED_BUS))
538549
device_for_each_child(dev, NULL, of_platform_device_destroy);
539550

551+
of_node_clear_flag(dev->of_node, OF_POPULATED);
552+
of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
553+
540554
if (dev->bus == &platform_bus_type)
541555
platform_device_unregister(to_platform_device(dev));
542556
#ifdef CONFIG_ARM_AMBA
543557
else if (dev->bus == &amba_bustype)
544558
amba_device_unregister(to_amba_device(dev));
545559
#endif
546560

547-
of_node_clear_flag(dev->of_node, OF_POPULATED);
548-
of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
549561
return 0;
550562
}
551563
EXPORT_SYMBOL_GPL(of_platform_device_destroy);

drivers/of/resolver.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ static int update_usages_of_a_phandle_reference(struct device_node *overlay,
122122
goto err_fail;
123123
}
124124

125+
if (offset < 0 || offset + sizeof(__be32) > prop->length) {
126+
err = -EINVAL;
127+
goto err_fail;
128+
}
129+
125130
*(__be32 *)(prop->value + offset) = cpu_to_be32(phandle);
126131
}
127132

drivers/of/unittest.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,28 +165,28 @@ static void __init of_unittest_dynamic(void)
165165
/* Add a new property - should pass*/
166166
prop->name = "new-property";
167167
prop->value = "new-property-data";
168-
prop->length = strlen(prop->value);
168+
prop->length = strlen(prop->value) + 1;
169169
unittest(of_add_property(np, prop) == 0, "Adding a new property failed\n");
170170

171171
/* Try to add an existing property - should fail */
172172
prop++;
173173
prop->name = "new-property";
174174
prop->value = "new-property-data-should-fail";
175-
prop->length = strlen(prop->value);
175+
prop->length = strlen(prop->value) + 1;
176176
unittest(of_add_property(np, prop) != 0,
177177
"Adding an existing property should have failed\n");
178178

179179
/* Try to modify an existing property - should pass */
180180
prop->value = "modify-property-data-should-pass";
181-
prop->length = strlen(prop->value);
181+
prop->length = strlen(prop->value) + 1;
182182
unittest(of_update_property(np, prop) == 0,
183183
"Updating an existing property should have passed\n");
184184

185185
/* Try to modify non-existent property - should pass*/
186186
prop++;
187187
prop->name = "modify-property";
188188
prop->value = "modify-missing-property-data-should-pass";
189-
prop->length = strlen(prop->value);
189+
prop->length = strlen(prop->value) + 1;
190190
unittest(of_update_property(np, prop) == 0,
191191
"Updating a missing property should have passed\n");
192192

scripts/Makefile.lib

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
251251
-Wno-unit_address_format \
252252
-Wno-avoid_unnecessary_addr_size \
253253
-Wno-alias_paths \
254+
-Wno-graph_child_address \
255+
-Wno-graph_port \
256+
-Wno-unique_unit_address \
254257
-Wno-pci_device_reg
255258
endif
256259

0 commit comments

Comments
 (0)