Skip to content

Commit e623611

Browse files
committed
Merge branch 'dt/linus' into dt/next
Pick a fix which didn't make it into v5.16.
2 parents 785576c + b398123 commit e623611

File tree

10 files changed

+63
-28
lines changed

10 files changed

+63
-28
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/firmware/efi/efi-init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ void __init efi_init(void)
235235
}
236236

237237
reserve_regions();
238+
/*
239+
* For memblock manipulation, the cap should come after the memblock_add().
240+
* And now, memblock is fully populated, it is time to do capping.
241+
*/
242+
early_init_dt_check_for_usable_mem_range();
238243
efi_esrt_init();
239244
efi_mokvar_table_init();
240245

drivers/of/fdt.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -967,18 +967,22 @@ static void __init early_init_dt_check_for_elfcorehdr(unsigned long node)
967967
elfcorehdr_addr, elfcorehdr_size);
968968
}
969969

970-
static phys_addr_t cap_mem_addr;
971-
static phys_addr_t cap_mem_size;
970+
static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND;
972971

973972
/**
974973
* early_init_dt_check_for_usable_mem_range - Decode usable memory range
975974
* location from flat tree
976-
* @node: reference to node containing usable memory range location ('chosen')
977975
*/
978-
static void __init early_init_dt_check_for_usable_mem_range(unsigned long node)
976+
void __init early_init_dt_check_for_usable_mem_range(void)
979977
{
980978
const __be32 *prop;
981979
int len;
980+
phys_addr_t cap_mem_addr;
981+
phys_addr_t cap_mem_size;
982+
unsigned long node = chosen_node_offset;
983+
984+
if ((long)node < 0)
985+
return;
982986

983987
pr_debug("Looking for usable-memory-range property... ");
984988

@@ -991,6 +995,8 @@ static void __init early_init_dt_check_for_usable_mem_range(unsigned long node)
991995

992996
pr_debug("cap_mem_start=%pa cap_mem_size=%pa\n", &cap_mem_addr,
993997
&cap_mem_size);
998+
999+
memblock_cap_memory_range(cap_mem_addr, cap_mem_size);
9941000
}
9951001

9961002
#ifdef CONFIG_SERIAL_EARLYCON
@@ -1143,9 +1149,10 @@ int __init early_init_dt_scan_chosen(char *cmdline)
11431149
if (node < 0)
11441150
return -ENOENT;
11451151

1152+
chosen_node_offset = node;
1153+
11461154
early_init_dt_check_for_initrd(node);
11471155
early_init_dt_check_for_elfcorehdr(node);
1148-
early_init_dt_check_for_usable_mem_range(node);
11491156

11501157
/* Retrieve command line */
11511158
p = of_get_flat_dt_prop(node, "bootargs", &l);
@@ -1280,7 +1287,7 @@ void __init early_init_dt_scan_nodes(void)
12801287
early_init_dt_scan_memory();
12811288

12821289
/* Handle linux,usable-memory-range property */
1283-
memblock_cap_memory_range(cap_mem_addr, cap_mem_size);
1290+
early_init_dt_check_for_usable_mem_range();
12841291
}
12851292

12861293
bool __init early_init_dt_scan(void *params)

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
}

include/linux/of_fdt.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ extern uint32_t of_get_flat_dt_phandle(unsigned long node);
6060

6161
extern int early_init_dt_scan_chosen(char *cmdline);
6262
extern int early_init_dt_scan_memory(void);
63+
extern void early_init_dt_check_for_usable_mem_range(void);
6364
extern int early_init_dt_scan_chosen_stdout(void);
6465
extern void early_init_fdt_scan_reserved_mem(void);
6566
extern void early_init_fdt_reserve_self(void);
@@ -83,6 +84,7 @@ extern void unflatten_and_copy_device_tree(void);
8384
extern void early_init_devtree(void *);
8485
extern void early_get_first_memblock_info(void *, phys_addr_t *);
8586
#else /* CONFIG_OF_EARLY_FLATTREE */
87+
static inline void early_init_dt_check_for_usable_mem_range(void) {}
8688
static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
8789
static inline void early_init_fdt_scan_reserved_mem(void) {}
8890
static inline void early_init_fdt_reserve_self(void) {}

0 commit comments

Comments
 (0)