Skip to content

Commit 2c53a7f

Browse files
committed
SQUASH: Updates to PR 6865
As discussed, here are a few minor improvements to the original PR: 1. Use target-path with aliases to allow the overlay to be loaded on older devices that lack the higher numbered SPI interfacs. 2. Change the "deprecated" errors to "renamed", so that the old names continue to work without requiring a config.txt change. 3. Use the same parameter names as the old overlays, partly so that existing installations continue to work even though they are now using the new overlay, and partly to match the -i2c variants. 4. Actually delete the old overlays. Signed-off-by: Phil Elwell <[email protected]>
1 parent f1a78ab commit 2c53a7f

File tree

7 files changed

+45
-251
lines changed

7 files changed

+45
-251
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
250250
rra-digidac1-wm8741-audio.dtbo \
251251
sainsmart18.dtbo \
252252
sc16is750-i2c.dtbo \
253-
sc16is750-spi0.dtbo \
254253
sc16is752-i2c.dtbo \
255-
sc16is752-spi0.dtbo \
256-
sc16is752-spi1.dtbo \
257254
sc16is75x-spi.dtbo \
258255
sdhost.dtbo \
259256
sdio.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4463,11 +4463,9 @@ Params: int_pin GPIO used for IRQ (default 24)
44634463

44644464

44654465
Name: sc16is750-spi0
4466-
Info: Overlay for the NXP SC16IS750 UART with SPI Interface
4467-
Enables the chip on SPI0.
4468-
Load: dtoverlay=sc16is750-spi0,<param>=<val>
4469-
Params: int_pin GPIO used for IRQ (default 24)
4470-
xtal On-board crystal frequency (default 14745600)
4466+
Info: This overlay is now deprecated. Use
4467+
"dtoverlay=sc16is75x-spi,sc16is750,spi0-0,..." instead.
4468+
Load: <Deprecated>
44714469

44724470

44734471
Name: sc16is752-i2c
@@ -4483,22 +4481,15 @@ Params: int_pin GPIO used for IRQ (default 24)
44834481

44844482

44854483
Name: sc16is752-spi0
4486-
Info: Overlay for the NXP SC16IS752 Dual UART with SPI Interface
4487-
Enables the chip on SPI0.
4488-
Load: dtoverlay=sc16is752-spi0,<param>=<val>
4489-
Params: int_pin GPIO used for IRQ (default 24)
4490-
xtal On-board crystal frequency (default 14745600)
4484+
Info: This overlay is now deprecated. Use
4485+
"dtoverlay=sc16is75x-spi,sc16is752,spi0-0,..." instead.
4486+
Load: <Deprecated>
44914487

44924488

44934489
Name: sc16is752-spi1
4494-
Info: Overlay for the NXP SC16IS752 Dual UART with SPI Interface
4495-
Enables the chip on SPI1.
4496-
N.B.: spi1 is only accessible on devices with a 40pin header, eg:
4497-
A+, B+, Zero and PI2 B; as well as the Compute Module.
4498-
4499-
Load: dtoverlay=sc16is752-spi1,<param>=<val>
4500-
Params: int_pin GPIO used for IRQ (default 24)
4501-
xtal On-board crystal frequency (default 14745600)
4490+
Info: This overlay is now deprecated. Use
4491+
"dtoverlay=sc16is75x-spi,sc16is752,spi1-0,..." instead.
4492+
Load: <Deprecated>
45024493

45034494

45044495
Name: sc16is75x-spi
@@ -4510,8 +4501,8 @@ Params: sc16is750 Device is a SC16IS750 UART (default on)
45104501
sc16is752 Device is a SC16IS752 Dual UART
45114502
spi<n>-<m> Configure device at spi<n>, cs<m>
45124503
(boolean, required)
4513-
interrupt GPIO used for IRQ (default 24)
4514-
oscillator On-board crystal frequency (default 14745600)
4504+
int_pin GPIO used for IRQ (default 24)
4505+
xtal On-board crystal frequency (default 14745600)
45154506

45164507

45174508
Name: sdhost

arch/arm/boot/dts/overlays/overlay_map.dts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,22 @@
284284
deprecated = "no longer necessary";
285285
};
286286

287+
sc16is750-spi0 {
288+
renamed = "sc16is75x-spi,sc16is750,spi0-0";
289+
};
290+
291+
sc16is750-spi1 {
292+
renamed = "sc16is75x-spi,sc16is750,spi1-0";
293+
};
294+
295+
sc16is752-spi0 {
296+
renamed = "sc16is75x-spi,sc16is752,spi0-0";
297+
};
298+
299+
sc16is752-spi1 {
300+
renamed = "sc16is75x-spi,sc16is752,spi1-0";
301+
};
302+
287303
sdhost {
288304
bcm2835;
289305
bcm2711;
@@ -530,20 +546,4 @@
530546
bcm2835;
531547
bcm2711;
532548
};
533-
534-
sc16is750-spi0 {
535-
deprecated = "use sc16is75x,spi0-*";
536-
};
537-
538-
sc16is750-spi1 {
539-
deprecated = "use sc16is75x,spi1-*";
540-
};
541-
542-
sc16is752-spi0 {
543-
deprecated = "use sc16is75x,sc16is752,spi0-*";
544-
};
545-
546-
sc16is752-spi1 {
547-
deprecated = "use sc16is75x,sc16is752,spi1-*";
548-
};
549549
};

arch/arm/boot/dts/overlays/sc16is750-spi0-overlay.dts

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

arch/arm/boot/dts/overlays/sc16is752-spi0-overlay.dts

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

arch/arm/boot/dts/overlays/sc16is752-spi1-overlay.dts

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

arch/arm/boot/dts/overlays/sc16is75x-spi-overlay.dts

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@
6666
<&sc16is75x>, "name=sc16is750@0";
6767
sc16is752 = <&sc16is75x>,"compatible=nxp,sc16is752",
6868
<&sc16is75x>, "name=sc16is752@0";
69-
interrupt = <&sc16is75x>,"interrupts:0",
69+
int_pin = <&sc16is75x>,"interrupts:0",
7070
<&sc16is75x_pins>,"brcm,pins:0",
7171
<&sc16is75x_pins>,"reg:0";
72-
oscillator = <&sc16is75x_clk>,"clock-frequency:0";
72+
xtal = <&sc16is75x_clk>,"clock-frequency:0";
7373
spi0-0 = <&spidev_frag>, "target-path=spi0/spidev@0",
7474
<&sc16is75x_frag>, "target:0=", <&spi0>,
7575
<&sc16is75x_pins>, "name=sc16is75x_spi0_0_pins";
@@ -100,31 +100,39 @@
100100
<&sc16is75x>, "reg:0=2",
101101
<&sc16is75x_pins>, "name=sc16is75x_spi2_2_pins";
102102
spi3-0 = <0>, "-0",
103-
<&sc16is75x_frag>, "target:0=", <&spi3>,
103+
<&sc16is75x_frag>, "target?=0",
104+
<&sc16is75x_frag>, "target-path=spi3",
104105
<&sc16is75x_pins>, "name=sc16is75x_spi3_0_pins";
105106
spi3-1 = <0>, "-0",
106-
<&sc16is75x_frag>, "target:0=", <&spi3>,
107+
<&sc16is75x_frag>, "target?=0",
108+
<&sc16is75x_frag>, "target-path=spi3",
107109
<&sc16is75x>, "reg:0=1",
108110
<&sc16is75x_pins>, "name=sc16is75x_spi3_1_pins";
109111
spi4-0 = <0>, "-0",
110-
<&sc16is75x_frag>, "target:0=", <&spi4>,
112+
<&sc16is75x_frag>, "target?=0",
113+
<&sc16is75x_frag>, "target-path=spi4",
111114
<&sc16is75x_pins>, "name=sc16is75x_spi4_0_pins";
112115
spi4-1 = <0>, "-0",
113-
<&sc16is75x_frag>, "target:0=", <&spi4>,
116+
<&sc16is75x_frag>, "target?=0",
117+
<&sc16is75x_frag>, "target-path=spi4",
114118
<&sc16is75x>, "reg:0=1",
115119
<&sc16is75x_pins>, "name=sc16is75x_spi4_1_pins";
116120
spi5-0 = <0>, "-0",
117-
<&sc16is75x_frag>, "target:0=", <&spi5>,
121+
<&sc16is75x_frag>, "target?=0",
122+
<&sc16is75x_frag>, "target-path=spi5",
118123
<&sc16is75x_pins>, "name=sc16is75x_spi5_0_pins";
119124
spi5-1 = <0>, "-0",
120-
<&sc16is75x_frag>, "target:0=", <&spi5>,
125+
<&sc16is75x_frag>, "target?=0",
126+
<&sc16is75x_frag>, "target-path=spi5",
121127
<&sc16is75x>, "reg:0=1",
122128
<&sc16is75x_pins>, "name=sc16is75x_spi5_1_pins";
123129
spi6-0 = <0>, "-0",
124-
<&sc16is75x_frag>, "target:0=", <&spi6>,
130+
<&sc16is75x_frag>, "target?=0",
131+
<&sc16is75x_frag>, "target-path=spi6",
125132
<&sc16is75x_pins>, "name=sc16is75x_spi6_0_pins";
126133
spi6-1 = <0>, "-0",
127-
<&sc16is75x_frag>, "target:0=", <&spi6>,
134+
<&sc16is75x_frag>, "target?=0",
135+
<&sc16is75x_frag>, "target-path=spi6",
128136
<&sc16is75x>, "reg:0=1",
129137
<&sc16is75x_pins>, "name=sc16is75x_spi6_1_pins";
130138
};

0 commit comments

Comments
 (0)