From: Fil Dunsky via B4 Relay <devnull+filipp.dunsky.gmail.com@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>, Linus Walleij <linusw@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Drew Fustini <fustini@kernel.org>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org,
Fil Dunsky <filipp.dunsky@gmail.com>
Subject: [PATCH RFC 05/10] ARM: debug: Add Cortina Systems CS75xx UART0 support
Date: Wed, 30 Sep 2026 10:00:04 +0300 [thread overview]
Message-ID: <20260930-b4-cs75xx-v1-5-4617c4463529@gmail.com> (raw)
In-Reply-To: <20260930-b4-cs75xx-v1-0-4617c4463529@gmail.com>
From: Fil Dunsky <filipp.dunsky@gmail.com>
Add low-level debug output through UART0 of the Cortina Systems CS75xx
SoCs. The UART is mapped at a fixed virtual address by the generic
debug_ll_io_init(), so no platform map_io is needed.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
---
arch/arm/Kconfig.debug | 16 ++++++++++++++--
arch/arm/include/debug/cs75xx.S | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index abcf14f1027..61cd64fc152 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -308,6 +308,15 @@ choice
Say Y here if you want the debug print routines to direct
their output to the second serial port on these devices.
+ config DEBUG_CS75XX_UART0
+ bool "Kernel low-level debugging messages via CS75xx UART0"
+ depends on ARCH_CORTINA_CS75XX
+ help
+ Say Y here if you want the debug print routines to direct
+ their output to UART0 of Cortina Systems CS75xx SoCs. This
+ is the console port on the Securifi Almond+. The UART is
+ expected to be set up by the bootloader.
+
config DEBUG_DAVINCI_DA8XX_UART1
bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
depends on ARCH_DAVINCI_DA8XX
@@ -1531,6 +1540,7 @@ config DEBUG_LL_INCLUDE
default "debug/vt8500.S" if DEBUG_VT8500_UART0
default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
default "debug/bcm63xx.S" if DEBUG_BCM63XX_UART || DEBUG_BCMBCA
+ default "debug/cs75xx.S" if DEBUG_CS75XX_UART0
default "debug/digicolor.S" if DEBUG_DIGICOLOR_UA0
default "debug/brcmstb.S" if DEBUG_BRCMSTB_UART
default "mach/debug-macro.S"
@@ -1632,6 +1642,7 @@ config DEBUG_UART_PHYS
default 0xe8008000 if DEBUG_R7S72100_SCIF2 || DEBUG_R7S9210_SCIF2
default 0xe8009000 if DEBUG_R7S9210_SCIF4
default 0xf0000000 if DEBUG_DIGICOLOR_UA0
+ default 0xf0070110 if DEBUG_CS75XX_UART0
default 0xf1012000 if DEBUG_MVEBU_UART0_ALTERNATE
default 0xf1012100 if DEBUG_MVEBU_UART1_ALTERNATE
default 0xf7fc9000 if DEBUG_BERLIN_UART
@@ -1670,7 +1681,7 @@ config DEBUG_UART_PHYS
DEBUG_RMOBILE_SCIFA4 || \
DEBUG_S3C64XX_UART || \
DEBUG_BCM63XX_UART || DEBUG_BCMBCA || DEBUG_ASM9260_UART || \
- DEBUG_DIGICOLOR_UA0 || \
+ DEBUG_CS75XX_UART0 || DEBUG_DIGICOLOR_UA0 || \
DEBUG_AT91_UART || DEBUG_STM32_UART || \
DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1 || \
DEBUG_STIH418_SBC_ASC0
@@ -1708,6 +1719,7 @@ config DEBUG_UART_VIRT
default 0xf7000800 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART2
default 0xf7000c00 if DEBUG_S3C64XX_UART && DEBUG_S3C_UART3
default 0xf7020000 if DEBUG_AT91_SAMA5D2_UART1
+ default 0xf7070110 if DEBUG_CS75XX_UART0
default 0xf7fc9000 if DEBUG_BERLIN_UART
default 0xf8007000 if DEBUG_HIP04_UART
default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9
@@ -1772,7 +1784,7 @@ config DEBUG_UART_VIRT
DEBUG_QCOM_UARTDM || \
DEBUG_S3C64XX_UART || \
DEBUG_BCM63XX_UART || DEBUG_BCMBCA || DEBUG_ASM9260_UART || \
- DEBUG_DIGICOLOR_UA0 || \
+ DEBUG_CS75XX_UART0 || DEBUG_DIGICOLOR_UA0 || \
DEBUG_AT91_UART || DEBUG_STM32_UART || \
DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1 || \
DEBUG_STIH418_SBC_ASC0
diff --git a/arch/arm/include/debug/cs75xx.S b/arch/arm/include/debug/cs75xx.S
new file mode 100644
index 00000000000..d840384cc32
--- /dev/null
+++ b/arch/arm/include/debug/cs75xx.S
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Debugging macro include header for the Cortina Systems CS75xx UART
+ */
+
+#define CS75XX_UART_TXDAT 0x10
+#define CS75XX_UART_INFO 0x18
+#define CS75XX_UART_INFO_TX_FULL (1 << 2)
+#define CS75XX_UART_INFO_TX_EMPTY (1 << 3)
+
+ .macro addruart, rp, rv, tmp
+ ldr \rp, =CONFIG_DEBUG_UART_PHYS
+ ldr \rv, =CONFIG_DEBUG_UART_VIRT
+ .endm
+
+ .macro senduart, rd, rx
+ ARM_BE8(rev \rd, \rd)
+ str \rd, [\rx, #CS75XX_UART_TXDAT]
+ .endm
+
+ .macro waituartcts, rd, rx
+ .endm
+
+ .macro waituarttxrdy, rd, rx
+1001: ldr \rd, [\rx, #CS75XX_UART_INFO]
+ ARM_BE8(rev \rd, \rd)
+ tst \rd, #CS75XX_UART_INFO_TX_FULL
+ bne 1001b
+ .endm
+
+ .macro busyuart, rd, rx
+1002: ldr \rd, [\rx, #CS75XX_UART_INFO]
+ ARM_BE8(rev \rd, \rd)
+ tst \rd, #CS75XX_UART_INFO_TX_EMPTY
+ beq 1002b
+ .endm
--
2.53.0
next prev parent reply other threads:[~2026-09-30 7:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 6:59 [PATCH RFC 00/10] ARM: Add support for Cortina Systems CS75xx and Securifi Almond+ Fil Dunsky via B4 Relay
2026-09-30 7:00 ` [PATCH RFC 01/10] dt-bindings: vendor-prefixes: Add Securifi Fil Dunsky via B4 Relay
2026-09-30 9:58 ` Linus Walleij
2026-09-30 7:00 ` [PATCH RFC 02/10] dt-bindings: arm: Add Cortina Systems CS7542 and Securifi Almond+ Fil Dunsky via B4 Relay
2026-09-30 9:59 ` Linus Walleij
2026-09-30 7:00 ` [PATCH RFC 03/10] dt-bindings: arm: cpus: Add Cortina Systems CS7542 enable method Fil Dunsky via B4 Relay
2026-09-30 9:59 ` Linus Walleij
2026-09-30 7:00 ` [PATCH RFC 04/10] ARM: cortina: Add support for the CS75xx SoC family Fil Dunsky via B4 Relay
2026-09-30 10:11 ` Linus Walleij
2026-09-30 10:18 ` Fil Dunsky
2026-09-30 10:20 ` Krzysztof Kozlowski
2026-09-30 10:57 ` Fil Dunsky
2026-09-30 11:01 ` Linus Walleij
2026-09-30 11:36 ` Arnd Bergmann
2026-09-30 11:43 ` Fil Dunsky
2026-09-30 12:02 ` Arnd Bergmann
2026-09-30 12:11 ` Fil Dunsky
2026-09-30 12:55 ` Arnd Bergmann
2026-09-30 13:05 ` Fil Dunsky
2026-09-30 7:00 ` Fil Dunsky via B4 Relay [this message]
2026-09-30 10:23 ` [PATCH RFC 05/10] ARM: debug: Add Cortina Systems CS75xx UART0 support Linus Walleij
2026-09-30 7:00 ` [PATCH RFC 06/10] dt-bindings: serial: Add Cortina Systems CS7542 UART Fil Dunsky via B4 Relay
2026-09-30 7:00 ` [PATCH RFC 07/10] tty: serial: Add Cortina Systems CS75xx UART driver Fil Dunsky via B4 Relay
2026-09-30 7:14 ` Greg Kroah-Hartman
2026-09-30 7:52 ` Fil Dunsky
2026-09-30 10:57 ` Linus Walleij
2026-09-30 11:08 ` Arnd Bergmann
2026-09-30 11:24 ` Fil Dunsky
2026-09-30 12:05 ` Arnd Bergmann
2026-10-01 3:17 ` Jason Li
2026-10-01 3:26 ` Fil Dunsky
2026-10-01 5:14 ` Jason Li
2026-10-01 5:26 ` Fil Dunsky
2026-10-01 6:18 ` Arnd Bergmann
2026-10-01 6:29 ` Fil Dunsky
2026-10-01 7:03 ` Jason Li
2026-10-01 7:14 ` Fil Dunsky
2026-09-30 7:00 ` [PATCH RFC 08/10] ARM: dts: cortina: Add CS7542 SoC and Securifi Almond+ board Fil Dunsky via B4 Relay
2026-09-30 7:00 ` [PATCH RFC 09/10] ARM: multi_v7_defconfig: Enable Cortina Systems CS75xx support Fil Dunsky via B4 Relay
2026-09-30 7:00 ` [PATCH RFC 10/10] MAINTAINERS: Add entry for Cortina Systems CS75xx Fil Dunsky via B4 Relay
2026-09-30 10:39 ` [PATCH RFC 00/10] ARM: Add support for Cortina Systems CS75xx and Securifi Almond+ Linus Walleij
2026-09-30 10:57 ` Fil Dunsky
2026-09-30 11:06 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930-b4-cs75xx-v1-5-4617c4463529@gmail.com \
--to=devnull+filipp.dunsky.gmail.com@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=fustini@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®