Skip to content

Commit a84e0b3

Browse files
committed
Merge tag 'devicetree-fixes-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree fixes from Rob Herring: - Revert schema checks on %.dtb targets. This was problematic for some external build tools. - A few DT binding example fixes - Add back dropped 'enet-phy-lane-no-swap' Ethernet PHY property - Drop erroneous if/then schema in nxp,imx7-mipi-csi2 - Add a quirk to fix some interrupt controllers use of 'interrupt-map' * tag 'devicetree-fixes-for-5.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: Revert "kbuild: Enable DT schema checks for %.dtb targets" dt-bindings: bq25980: Fixup the example dt-bindings: input: gpio-keys: Fix interrupts in example dt-bindings: net: Reintroduce PHY no lane swap binding dt-bindings: media: nxp,imx7-mipi-csi2: Drop bad if/then schema of/irq: Add a quirk for controllers with their own definition of interrupt-map dt-bindings: iio: adc: exynos-adc: Fix node name in example
2 parents df442a4 + 75e8953 commit a84e0b3

File tree

7 files changed

+43
-22
lines changed

7 files changed

+43
-22
lines changed

Documentation/devicetree/bindings/iio/adc/samsung,exynos-adc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ examples:
136136
samsung,syscon-phandle = <&pmu_system_controller>;
137137
138138
/* NTC thermistor is a hwmon device */
139-
ncp15wb473 {
139+
thermistor {
140140
compatible = "murata,ncp15wb473";
141141
pullup-uv = <1800000>;
142142
pullup-ohm = <47000>;

Documentation/devicetree/bindings/input/gpio-keys.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ examples:
142142
down {
143143
label = "GPIO Key DOWN";
144144
linux,code = <108>;
145-
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
145+
interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
146146
};
147147
};
148148

Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ properties:
7979

8080
properties:
8181
data-lanes:
82+
description:
83+
Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines.
8284
items:
8385
minItems: 1
8486
maxItems: 4
@@ -91,18 +93,6 @@ properties:
9193
required:
9294
- data-lanes
9395

94-
allOf:
95-
- if:
96-
properties:
97-
compatible:
98-
contains:
99-
const: fsl,imx7-mipi-csi2
100-
then:
101-
properties:
102-
data-lanes:
103-
items:
104-
maxItems: 2
105-
10696
port@1:
10797
$ref: /schemas/graph.yaml#/properties/port
10898
description:

Documentation/devicetree/bindings/net/ethernet-phy.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ properties:
9191
compensate for the board being designed with the lanes
9292
swapped.
9393

94+
enet-phy-lane-no-swap:
95+
$ref: /schemas/types.yaml#/definitions/flag
96+
description:
97+
If set, indicates that PHY will disable swap of the
98+
TX/RX lanes. This property allows the PHY to work correcly after
99+
e.g. wrong bootstrap configuration caused by issues in PCB
100+
layout design.
101+
94102
eee-broken-100tx:
95103
$ref: /schemas/types.yaml#/definitions/flag
96104
description:

Documentation/devicetree/bindings/power/supply/bq25980.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ examples:
105105
reg = <0x65>;
106106
interrupt-parent = <&gpio1>;
107107
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
108-
ti,watchdog-timer = <0>;
108+
ti,watchdog-timeout-ms = <0>;
109109
ti,sc-ocp-limit-microamp = <2000000>;
110110
ti,sc-ovp-limit-microvolt = <17800000>;
111111
monitored-battery = <&bat>;

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,17 +1374,17 @@ endif
13741374

13751375
ifneq ($(dtstree),)
13761376

1377-
%.dtb: dt_binding_check include/config/kernel.release scripts_dtc
1378-
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
1377+
%.dtb: include/config/kernel.release scripts_dtc
1378+
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
13791379

1380-
%.dtbo: dt_binding_check include/config/kernel.release scripts_dtc
1381-
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml
1380+
%.dtbo: include/config/kernel.release scripts_dtc
1381+
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
13821382

13831383
PHONY += dtbs dtbs_install dtbs_check
13841384
dtbs: include/config/kernel.release scripts_dtc
13851385
$(Q)$(MAKE) $(build)=$(dtstree)
13861386

1387-
ifneq ($(filter dtbs_check %.dtb %.dtbo, $(MAKECMDGOALS)),)
1387+
ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
13881388
export CHECK_DTBS=y
13891389
dtbs: dt_binding_check
13901390
endif

drivers/of/irq.c

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,26 @@ struct device_node *of_irq_find_parent(struct device_node *child)
7676
}
7777
EXPORT_SYMBOL_GPL(of_irq_find_parent);
7878

79+
/*
80+
* These interrupt controllers abuse interrupt-map for unspeakable
81+
* reasons and rely on the core code to *ignore* it (the drivers do
82+
* their own parsing of the property).
83+
*
84+
* If you think of adding to the list for something *new*, think
85+
* again. There is a high chance that you will be sent back to the
86+
* drawing board.
87+
*/
88+
static const char * const of_irq_imap_abusers[] = {
89+
"CBEA,platform-spider-pic",
90+
"sti,platform-spider-pic",
91+
"realtek,rtl-intc",
92+
"fsl,ls1021a-extirq",
93+
"fsl,ls1043a-extirq",
94+
"fsl,ls1088a-extirq",
95+
"renesas,rza1-irqc",
96+
NULL,
97+
};
98+
7999
/**
80100
* of_irq_parse_raw - Low level interrupt tree parsing
81101
* @addr: address specifier (start of "reg" property of the device) in be32 format
@@ -159,12 +179,15 @@ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq)
159179
/*
160180
* Now check if cursor is an interrupt-controller and
161181
* if it is then we are done, unless there is an
162-
* interrupt-map which takes precedence.
182+
* interrupt-map which takes precedence except on one
183+
* of these broken platforms that want to parse
184+
* interrupt-map themselves for $reason.
163185
*/
164186
bool intc = of_property_read_bool(ipar, "interrupt-controller");
165187

166188
imap = of_get_property(ipar, "interrupt-map", &imaplen);
167-
if (imap == NULL && intc) {
189+
if (intc &&
190+
(!imap || of_device_compatible_match(ipar, of_irq_imap_abusers))) {
168191
pr_debug(" -> got it !\n");
169192
return 0;
170193
}

0 commit comments

Comments
 (0)