Skip to content

Commit 68e3b32

Browse files
nbuchwitzpelwell
authored andcommitted
overlays: sc16is75x: Add generic SPI overlay
Currently four nearly identical overlays (sc16is750-spi0 / -spi1 and sc16is752-spi0 / -spi1) are provided. Besides the redundant configuration all of them lack support for other SPI interfaces than spi0 and spi1. Thus refactor the common definitions into a generic sc16is75x-spi overlay which provides support for all known spi / cs combinations. Also choose the chip type via dtparam rather than different overlay. Remove the existing overlays, replacing them with rename rules in the overlay map. Signed-off-by: Nicolai Buchwitz <n.buchwitz@kunbus.com> Signed-off-by: Phil Elwell <phil@raspberrypi.com>
1 parent 4023f95 commit 68e3b32

File tree

7 files changed

+176
-221
lines changed

7 files changed

+176
-221
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,8 @@ 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 \
254+
sc16is75x-spi.dtbo \
257255
sdhost.dtbo \
258256
sdio.dtbo \
259257
sdio-pi5.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 20 additions & 16 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,21 +4481,27 @@ 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.
4490+
Info: This overlay is now deprecated. Use
4491+
"dtoverlay=sc16is75x-spi,sc16is752,spi1-0,..." instead.
4492+
Load: <Deprecated>
44984493

4499-
Load: dtoverlay=sc16is752-spi1,<param>=<val>
4500-
Params: int_pin GPIO used for IRQ (default 24)
4494+
4495+
Name: sc16is75x-spi
4496+
Info: Overlay for the NXP SC16IS750/2 (Dual) UART with SPI Interface
4497+
Enables the chip on SPI.
4498+
4499+
Load: dtoverlay=sc16is75x-spi,<param>=<val>
4500+
Params: sc16is750 Device is a SC16IS750 UART (default on)
4501+
sc16is752 Device is a SC16IS752 Dual UART
4502+
spi<n>-<m> Configure device at spi<n>, cs<m>
4503+
(boolean, required)
4504+
int_pin GPIO used for IRQ (default 24)
45014505
xtal On-board crystal frequency (default 14745600)
45024506

45034507

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

Lines changed: 16 additions & 0 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;

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.

0 commit comments

Comments
 (0)