kernel: bump 4.9 to 4.9.207
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.19 / 950-0380-overlays-Fix-multiple-instantiation-of-sc16is7xx.patch
1 From 649efe5db3900ed3bbfd3c3daa3b96d8fc0b9d68 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 22 Mar 2019 16:44:47 +0000
4 Subject: [PATCH 380/806] overlays: Fix multiple-instantiation of sc16is7xx*
5
6 The registration of the fixed clocks uses the node name as the clock
7 name, causing a clash if two clock nodes have the same name, regardless
8 of the path to the node. Fix the issue by overwriting the clock node
9 names using the value of the "addr" parameter, providing a crude
10 disambiguation. (A bit of string pasting to form "sc16is752_clk_<addr>"
11 would have been nice, but that is outside the abilities of the overlay
12 parameter mechanism.)
13
14 Also give the sc16is750-i2c overlay the xtal parameter for symmetry.
15
16 See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=235650
17
18 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
19 ---
20 arch/arm/boot/dts/overlays/README | 1 +
21 arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts | 3 ++-
22 arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts | 2 +-
23 3 files changed, 4 insertions(+), 2 deletions(-)
24
25 --- a/arch/arm/boot/dts/overlays/README
26 +++ b/arch/arm/boot/dts/overlays/README
27 @@ -1725,6 +1725,7 @@ Info: Overlay for the NXP SC16IS750 UA
28 Load: dtoverlay=sc16is750-i2c,<param>=<val>
29 Params: int_pin GPIO used for IRQ (default 24)
30 addr Address (default 0x48)
31 + xtal On-board crystal frequency (default 14745600)
32
33
34 Name: sc16is752-i2c
35 --- a/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts
36 +++ b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts
37 @@ -31,7 +31,8 @@
38
39 __overrides__ {
40 int_pin = <&sc16is750>,"interrupts:0";
41 - addr = <&sc16is750>,"reg:0";
42 + addr = <&sc16is750>,"reg:0",<&sc16is750_clk>,"name";
43 + xtal = <&sc16is750>,"clock-frequency:0";
44 };
45
46 };
47 --- a/arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts
48 +++ b/arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts
49 @@ -34,7 +34,7 @@
50
51 __overrides__ {
52 int_pin = <&sc16is752>,"interrupts:0";
53 - addr = <&sc16is752>,"reg:0";
54 + addr = <&sc16is752>,"reg:0",<&sc16is752_clk>,"name";
55 xtal = <&sc16is752>,"clock-frequency:0";
56 };
57 };