arm64: Introduce CIX P1 (SKY1) SoC
Subsystems (6)
v8 cover arm64: Introduce CIX P1 (SKY1) SoC
Cixtech P1 (internal name sky1) is high performance generic Armv9 SoC. Orion O6 is the Arm V9 Motherboard built by Radxa. You could find brief introduction for SoC and related boards at:
https://radxa.com/products/orion/o6#overview
Currently, to run upstream kernel at Orion O6 board, you need to use BIOS released by Radxa, and add "clk_ignore_unused=1" at bootargs.
https://docs.radxa.com/en/orion/o6/bios/install-bios
In this series, we add initial SoC and board support for Kernel building. Since mailbox is used for SCMI clock communication, mailbox driver is added in this series for the minimum SoC support.
Patch 1-2: add dt-binding doc for CIX and its sky1 SoC
Patch 3: add Arm64 build support
Patch 4-5: add CIX mailbox driver which needs to support SCMI clock protocol. Patch 6: add Arm64 defconfig support
Patch 7-8: add initial dts support for SoC and Orion O6 board Patch 9: add MAINTAINERS entry
Below are the review status:
Patch 1-4: received public Reviewed-by or Acked-by tags Patch 6-7: received public Reviewed-by or Acked-by tags Patch 8: received public Tested-by tags
Changes for v8:
- Patch 6: add Krzysztof Kozlowski's Reviewed-by tag
- Patch 7: add Krzysztof Kozlowski's Acked-by tag
Changes for v7:
- Patch 8:
- Refine *_scmi_mem nodes for their properties ordering
- Delete Krzysztof Kozlowski and Fugang Duan's tag due to substantial changes
- Add two Tested-by tags from Enric Balletbo i Serra and Kajetan Puchalski
- Patch 4: Add Krzysztof Kozlowski's Reviewed-by tag
- Squash two patches as one for arm64 defconfig
- Rename clock binding file from sky1-clk.h to cix,sky1.h
- Some of my Sob are missing, add them
Changes for v6:
- Rebase to v6.15-rc2
- Add mailbox driver
- Add device tree description for uart, mailbox and scmi firmware (for clock).
Changes for v5:
- Patch 5: Delete pmu-spe node which need to refine, and add it in future
- Patch 6: Refine MAINTAINERS for all CIX SoC and adding code tree location
Changes for v4:
- Move add MAINTAINERS entry patch to the last, and add two dts files entry in it.
- Add three Krzysztof Kozlowski's Reviewed-by Tags
- For sky1.dtsi, makes below changes:
- Add ppi-partition entry for gic-v3 node, and let pmu-a520 and pmu-a720's interrupt entry get its handle
- Remove gic-v3's #redistributor-regions and redistributor-stride properties
- Change gic-v3's #interrupt-cells as 4, and change all interrupt specifiers accordingly
- Remove "arm,no-tick-in-suspend" for timer due to global counter is at always-on power domain
- Remove timer's clock frequency due to firmware has already set it
Changes for v3:
- Patch 1: Add Krzysztof Kozlowski's Acked-by Tag
- Patch 2: Add Krzysztof Kozlowski's Reviewed-by Tag
- Patch 6: Fix two dts coding sytle issues
Changes for v2:
- Pass dts build check with below commands:
make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=vendor-prefixes.yaml make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=arm/cix.yaml make O=$OUTKNL CHECK_DTBS=y W=1 cix/sky1-orion-o6.dtb
- Re-order the patch set, and move vendor-perfixes to the 1st patch.
- Patch 4: Ordered Kconfig config entry by alpha-numerically
- Patch 5: Corrects the Ack tag's name
- Patch 6: see below.
1) Corrects the SoF tag's name
2) Fix several coding sytle issues
3) move linux,cma node to dts file
4) delete memory node, memory size is passed by firmware
5) delete uart2 node which will be added in future patches
6) Improve for pmu and cpu node to stands for more specific cpu model
7) Improve the timer node and add hypervisor virtual timer irq
Fugang Duan (1):
arm64: Kconfig: add ARCH_CIX for cix silicons
Gary Yang (1):
dt-bindings: clock: cix: Add CIX sky1 scmi clock id
Guomin Chen (2):
dt-bindings: mailbox: add cix,sky1-mbox
mailbox: add CIX mailbox driver
Peter Chen (5):
dt-bindings: vendor-prefixes: Add CIX Technology Group Co., Ltd.
dt-bindings: arm: add CIX P1 (SKY1) SoC
arm64: defconfig: Enable CIX SoC
arm64: dts: cix: Add sky1 base dts initial support
MAINTAINERS: Add CIX SoC maintainer entry
.../devicetree/bindings/arm/cix.yaml | 26 + .../bindings/mailbox/cix,sky1-mbox.yaml | 71 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 11 + arch/arm64/Kconfig.platforms | 6 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/cix/Makefile | 2 + arch/arm64/boot/dts/cix/sky1-orion-o6.dts | 39 ++ arch/arm64/boot/dts/cix/sky1.dtsi | 331 +++++++++ arch/arm64/configs/defconfig | 2 + drivers/mailbox/Kconfig | 10 + drivers/mailbox/Makefile | 2 + drivers/mailbox/cix-mailbox.c | 632 ++++++++++++++++++ include/dt-bindings/clock/cix,sky1.h | 279 ++++++++ 14 files changed, 1414 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/cix.yaml create mode 100644 Documentation/devicetree/bindings/mailbox/cix,sky1-mbox.yaml create mode 100644 arch/arm64/boot/dts/cix/Makefile create mode 100644 arch/arm64/boot/dts/cix/sky1-orion-o6.dts create mode 100644 arch/arm64/boot/dts/cix/sky1.dtsi create mode 100644 drivers/mailbox/cix-mailbox.c create mode 100644 include/dt-bindings/clock/cix,sky1.h
Signature · 1 line
2.25.1
PATCH v8 1/9 dt-bindings: vendor-prefixes: Add CIX Technology Group Co., Ltd.
CIX Technology Group Co., Ltd. is a high performance Arm SoC design company. Link: https://www.cixtech.com/.
--- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
@@ -304,6 +304,8 @@ patternProperties: description: Cirrus Logic, Inc. "^cisco,.*": description: Cisco Systems, Inc. + "^cix,.*": + description: CIX Technology Group Co., Ltd. "^clockwork,.*": description: Clockwork Tech LLC "^cloos,.*":
Signature · 1 line
2.25.1
PATCH v8 2/9 dt-bindings: arm: add CIX P1 (SKY1) SoC
In reply to Peter ChenAdd device tree bindings for CIX P1 (Internal name sky1) Arm SoC, it consists several SoC models like CP8180, CD8180, etc.
--- .../devicetree/bindings/arm/cix.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/cix.yaml
Documentation/devicetree/bindings/arm/cix.yaml new file +26 -0
@@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/cix.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: CIX platforms + +maintainers: + - Peter Chen <[email protected]> + - Fugang Duan <[email protected]> + +properties: + $nodename: + const: '/' + compatible: + oneOf: + + - description: Radxa Orion O6 + items: + - const: radxa,orion-o6 + - const: cix,sky1 + +additionalProperties: true + +...
Signature · 1 line
2.25.1
PATCH v8 3/9 arm64: Kconfig: add ARCH_CIX for cix silicons
In reply to Peter ChenFrom: Fugang Duan <[email protected]>
Add ARCH_CIX for CIX SoC series support.
--- arch/arm64/Kconfig.platforms | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/Kconfig.platforms +6 -0
@@ -106,6 +106,12 @@ config ARCH_BLAIZE help This enables support for the Blaize SoC family +config ARCH_CIX + bool "Cixtech SoC family" + help + This enables support for the Cixtech SoC family, + like P1(sky1). + config ARCH_EXYNOS bool "Samsung Exynos SoC family" select COMMON_CLK_SAMSUNG
Signature · 1 line
2.25.1
PATCH v8 4/9 dt-bindings: mailbox: add cix,sky1-mbox
In reply to Peter ChenFrom: Guomin Chen <[email protected]>
Add a dt-binding for the Cixtech Mailbox Controller.
---
Changes for v7:
- Add Krzysztof Kozlowski Reviewed-by tag
- Add my Sob tag
Changes for v3:
- Replace the direction attribute of the mailbox with the strings "rx" and "tx"
.../bindings/mailbox/cix,sky1-mbox.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/cix,sky1-mbox.yaml
Documentation/devicetree/bindings/mailbox/cix,sky1-mbox.yaml new file +71 -0
@@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/cix,sky1-mbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cixtech mailbox controller + +maintainers: + - Guomin Chen <[email protected]> + +description: + The Cixtech mailbox controller, used in the Cixtech Sky1 SoC, + is used for message transmission between multiple processors + within the SoC, such as the AP, PM, audio DSP, SensorHub MCU, + and others + + Each Cixtech mailbox controller is unidirectional, so they are + typically used in pairs-one for receiving and one for transmitting. + + Each Cixtech mailbox supports 11 channels with different transmission modes + channel 0-7 - Fast channel with 32bit transmit register and IRQ support + channel 8 - Doorbell mode,using the mailbox as an interrupt-generating + mechanism. + channel 9 - Fifo based channel with 32*32bit depth fifo and IRQ support + channel 10 - Reg based channel with 32*32bit transmit register and + Doorbell+transmit acknowledgment IRQ support + +properties: + compatible: + const: cix,sky1-mbox + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#mbox-cells": + const: 1 + + cix,mbox-dir: + $ref: /schemas/types.yaml#/definitions/string + description: Direction of the mailbox relative to the AP + enum: [tx, rx] + +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + - cix,mbox-dir + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + mbox_ap2pm: mailbox@30000000 { + compatible = "cix,sky1-mbox"; + reg = <0 0x30000000 0 0x10000>; + interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH 0>; + #mbox-cells = <1>; + cix,mbox-dir = "tx"; + }; + };
Signature · 1 line
2.25.1
PATCH v8 5/9 mailbox: add CIX mailbox driver
In reply to Peter ChenFrom: Guomin Chen <[email protected]>
The CIX mailbox controller, used in the Cix SoCs, like sky1. facilitates message transmission between multiple processors within the SoC, such as the AP, PM, audio DSP, SensorHub MCU, and others.
--- drivers/mailbox/Kconfig | 10 + drivers/mailbox/Makefile | 2 + drivers/mailbox/cix-mailbox.c | 632 ++++++++++++++++++++++++++++++++++ 3 files changed, 644 insertions(+) create mode 100644 drivers/mailbox/cix-mailbox.c
drivers/mailbox/Kconfig +10 -0
@@ -330,4 +330,14 @@ config THEAD_TH1520_MBOX kernel is running, and E902 core used for power management among other things. +config CIX_MBOX + tristate "CIX Mailbox" + depends on ARCH_CIX || COMPILE_TEST + depends on OF + help + Mailbox implementation for CIX IPC system. The controller supports + 11 mailbox channels with different operating mode and every channel + is unidirectional. Say Y here if you want to use the CIX Mailbox + support. + endif
drivers/mailbox/Makefile +2 -0
@@ -70,3 +70,5 @@ obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o obj-$(CONFIG_THEAD_TH1520_MBOX) += mailbox-th1520.o + +obj-$(CONFIG_CIX_MBOX) += cix-mailbox.o
drivers/mailbox/cix-mailbox.c new file +632 -0
632 lines not on this page · raw message
Signature · 1 line
2.25.1
Jassi Brar
maintainerRe: [PATCH v8 5/9] mailbox: add CIX mailbox driver
Hi,
Quoted 42 lines
drivers/mailbox/cix-mailbox.c new file +35
-0@@ -0,0 +1,632 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright 2025 Cix Technology Group Co., Ltd. +*/ + +#include <linux/device.h> +#include <linux/err.h> +#include <linux/io.h> +#include <linux/interrupt.h> +#include <linux/kernel.h> +#include <linux/mailbox_controller.h> +#include <linux/module.h> +#include <linux/platform_device.h> + +#include "mailbox.h" + +/* Register define */ +#define REG_MSG (n) (0x0 + 0x4*(n))/* 0x0~0x7c */ +#define REG_DB_ACK REG_MSG(CIX_MBOX_MSG_LEN)/* 0x80 */ +#define ERR_COMP (REG_DB_ACK + 0x4)/* 0x84 */ +#define ERR_COMP_CLR (REG_DB_ACK + 0x8)/* 0x88 */ +#define REG_F_INT (IDX ) (ERR_COMP_CLR + 0x4*(IDX+1))/* 0x8c~0xa8 */ +#define FIFO_WR (REG_F_INT(MBOX_FAST_IDX+1))/* 0xac */ +#define FIFO_RD (FIFO_WR + 0x4)/* 0xb0 */ +#define FIFO_STAS (FIFO_WR + 0x8)/* 0xb4 */ +#define FIFO_WM (FIFO_WR + 0xc)/* 0xb8 */ +#define INT_ENABLE (FIFO_WR + 0x10)/* 0xbc */ +#define INT_ENABLE_SIDE_B (FIFO_WR + 0x14)/* 0xc0 */ +#define INT_CLEAR (FIFO_WR + 0x18)/* 0xc4 */ +#define INT_STATUS (FIFO_WR + 0x1c)/* 0xc8 */ +#define FIFO_RST (FIFO_WR + 0x20)/* 0xcc */ + +/* [0~7] Fast channel +* [8] doorbell base channel +* [9]fifo base channel
drivers/mailbox/cix-mailbox.c line 45
Quoted 10 lines
drivers/mailbox/cix-mailbox.c new file +10
-0+* [10] register base channel +*/ +#define CIX_MBOX_CHANS (11) + +/* +* The maximum transmission size is 32 words or 128 bytes. +*/ +#define CIX_MBOX_MSG_LEN (32)/* Max length = 32 words */ +#define MBOX_MSG_LEN_MASK (0x7fL)/* Max length = 128 bytes */ +
Move these above register defines where these are used. Also, no need for brackets around numbers. Here and elsewhere.
....
drivers/mailbox/cix-mailbox.c line 288
Quoted 9 lines
drivers/mailbox/cix-mailbox.c new file +8
-0+ +static void cix_mbox_isr_reg (struct mbox_chan *chan) +{ +struct cix_mbox_priv *priv =to_cix_mbox_priv (chan->mbox); +u32 int_status; +u32 data[CIX_MBOX_MSG_LEN ]; +int i; +u32 len;
cosmetic: tidy these up by merging and sorting in reverse christmas tree.
Quoted 20 lines
drivers/mailbox/cix-mailbox.c new file +19
-0+ + int_status =cix_mbox_read (priv,INT_STATUS ); + +if (priv->dir ==MBOX_RX ) { +/* rx interrupt is triggered */ +if (int_status &DB_INT ) { +cix_mbox_write (priv,DB_INT ,INT_CLEAR ); + data[0 ] =cix_mbox_read (priv,REG_MSG (0 )); + len =mbox_get_msg_size (data); +for (i =0 ; i < len; i++) + data[i] =cix_mbox_read (priv,REG_MSG (i)); + +/* trigger ack interrupt */ +cix_mbox_write (priv,DB_ACK_INT_BIT ,REG_DB_ACK ); +mbox_chan_received_data (chan, data); + } + }else { +/* tx ack interrupt is triggered */ +if (int_status &ACK_INT ) {
drivers/mailbox/cix-mailbox.c line 317
Quoted 10 lines
drivers/mailbox/cix-mailbox.c new file +10
-0+cix_mbox_write (priv,ACK_INT ,INT_CLEAR ); +mbox_chan_txdone (chan,0 ); + } + } +} + +static void cix_mbox_isr_fifo (struct mbox_chan *chan) +{ +struct cix_mbox_priv *priv =to_cix_mbox_priv (chan->mbox); +u32 data[CIX_MBOX_MSG_LEN ] = {0 };
Is it really needed? Can we do with just zeroing the byte after valid data? At least move it under "FIFO waterMark interrupt is generated", so it is only done when needed.
....
drivers/mailbox/cix-mailbox.c line 413
Quoted 12 lines
drivers/mailbox/cix-mailbox.c new file +11
-0+ +static int cix_mbox_startup (struct mbox_chan *chan) +{ +struct cix_mbox_priv *priv =to_cix_mbox_priv (chan->mbox); +struct cix_mbox_con_priv *cp = chan->con_priv; +int ret; +int index = cp->index; +u32 val_32; + + ret =request_irq (priv->irq, cix_mbox_isr,0 , +dev_name (priv->dev), chan);
Can we do this later just before returning from the function? Or atleast free the irq before error returns.
Also please make sure you run scripts/checkpatch and have all warnings cleared.
Thanks
Jassi
Re: [PATCH v8 5/9] mailbox: add CIX mailbox driver
Quoted 6 lines · Jassi Brar
[Some people who received this message don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
EXTERNAL EMAIL
Hi,
Hi Jassi
Thank you for your feedback.
Quoted 47 lines
Quoted 47 lines
drivers/mailbox/cix-mailbox.c new file +41
-0@@ -0,0 +1,632 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright 2025 Cix Technology Group Co., Ltd. +*/ + +#include <linux/device.h> +#include <linux/err.h> +#include <linux/io.h> +#include <linux/interrupt.h> +#include <linux/kernel.h> +#include <linux/mailbox_controller.h> +#include <linux/module.h> +#include <linux/platform_device.h> + +#include "mailbox.h" + +/* Register define */ +#define REG_MSG (n) (0x0 + 0x4*(n))/* 0x0~0x7c */ +#define REG_DB_ACK REG_MSG(CIX_MBOX_MSG_LEN)/* 0x80 */ +#define ERR_COMP (REG_DB_ACK + 0x4)/* 0x84 */ +#define ERR_COMP_CLR (REG_DB_ACK + 0x8)/* 0x88 */ +#define REG_F_INT (IDX ) (ERR_COMP_CLR + 0x4*(IDX+1))/* 0x8c~0xa8 */ +#define FIFO_WR (REG_F_INT(MBOX_FAST_IDX+1))/* 0xac */ +#define FIFO_RD (FIFO_WR + 0x4)/* 0xb0 */ +#define FIFO_STAS (FIFO_WR + 0x8)/* 0xb4 */ +#define FIFO_WM (FIFO_WR + 0xc)/* 0xb8 */ +#define INT_ENABLE (FIFO_WR + 0x10)/* 0xbc */ +#define INT_ENABLE_SIDE_B (FIFO_WR + 0x14)/* 0xc0 */ +#define INT_CLEAR (FIFO_WR + 0x18)/* 0xc4 */ +#define INT_STATUS (FIFO_WR + 0x1c)/* 0xc8 */ +#define FIFO_RST (FIFO_WR + 0x20)/* 0xcc */ + +/* [0~7] Fast channel +* [8] doorbell base channel +* [9]fifo base channel +* [10] register base channel +*/ +#define CIX_MBOX_CHANS (11) + +/* +* The maximum transmission size is 32 words or 128 bytes.
Quoted 8 lines
drivers/mailbox/cix-mailbox.c line 45
Quoted 5 lines
drivers/mailbox/cix-mailbox.c new file +4
-0+*/ +#define CIX_MBOX_MSG_LEN (32)/* Max length = 32 words */ +#define MBOX_MSG_LEN_MASK (0x7fL)/* Max length = 128 bytes */ +Move these above register defines where these are used. Also, no need for brackets around numbers. Here and elsewhere.
....
Okay, I will move these two macros to the beginning and remove the brackets around numbers.
Quoted 11 lines
drivers/mailbox/cix-mailbox.c line 288
Quoted 9 lines
drivers/mailbox/cix-mailbox.c new file +8
-0+ +static void cix_mbox_isr_reg (struct mbox_chan *chan) +{ +struct cix_mbox_priv *priv =to_cix_mbox_priv (chan->mbox); +u32 int_status; +u32 data[CIX_MBOX_MSG_LEN ]; +int i; +u32 len;cosmetic: tidy these up by merging and sorting in reverse christmas tree.
Okay, I will make an overall adjustment according to this rule.
Quoted 25 lines
Quoted 25 lines
drivers/mailbox/cix-mailbox.c new file +25
-0+ + int_status =cix_mbox_read (priv,INT_STATUS ); + +if (priv->dir ==MBOX_RX ) { +/* rx interrupt is triggered */ +if (int_status &DB_INT ) { +cix_mbox_write (priv,DB_INT ,INT_CLEAR ); + data[0 ] =cix_mbox_read (priv,REG_MSG (0 )); + len =mbox_get_msg_size (data); +for (i =0 ; i < len; i++) + data[i] =cix_mbox_read (priv,REG_MSG (i)); + +/* trigger ack interrupt */ +cix_mbox_write (priv,DB_ACK_INT_BIT ,REG_DB_ACK ); +mbox_chan_received_data (chan, data); + } + }else { +/* tx ack interrupt is triggered */ +if (int_status &ACK_INT ) { +cix_mbox_write (priv,ACK_INT ,INT_CLEAR ); +mbox_chan_txdone (chan,0 ); + } + } +} +
Quoted 8 lines
drivers/mailbox/cix-mailbox.c line 317
Quoted 5 lines
drivers/mailbox/cix-mailbox.c new file +4
-0+static void cix_mbox_isr_fifo (struct mbox_chan *chan) +{ +struct cix_mbox_priv *priv =to_cix_mbox_priv (chan->mbox); +u32 data[CIX_MBOX_MSG_LEN ] = {0 };Is it really needed? Can we do with just zeroing the byte after valid data? At least move it under "FIFO waterMark interrupt is generated", so it is only done when needed.
Yes, In some cases it is not necessary.
I will move this under "FIFO waterMark interrupt is generated."
Quoted 6 lines
Quoted 6 lines
drivers/mailbox/cix-mailbox.c new file +6
-0+ +static int cix_mbox_startup (struct mbox_chan *chan) +{ +struct cix_mbox_priv *priv =to_cix_mbox_priv (chan->mbox); +struct cix_mbox_con_priv *cp = chan->con_priv; +int ret;
Quoted 8 lines
drivers/mailbox/cix-mailbox.c line 413
Quoted 6 lines
drivers/mailbox/cix-mailbox.c new file +5
-0+int index = cp->index; +u32 val_32; + + ret =request_irq (priv->irq, cix_mbox_isr,0 , +dev_name (priv->dev), chan);Can we do this later just before returning from the function? Or atleast free the irq before error returns.
This cannot be done before the return, as it needs to be registered before the interrupt enable register.
However, I do need to free this IRQ before the error return.
Quoted 1 line
Also please make sure you run
scripts/checkpatchand have all warnings cleared.
I have already run scripts/checkpatch to perform the check.
The warning you mentioned is due to the need to update the MAINTAINERS file for the newly added files, right?
Thanks
Guomin Chen
PATCH v8 6/9 arm64: defconfig: Enable CIX SoC
In reply to Peter Chen- Enable CIX SoC support at ARM64 defconfig
- Enable CIX mailbox
At CIX SoC platforms, the clock handling uses Arm SCMI protocol, the physical clock access is at sub processor, so it needs to enable mailbox by default.
---
Changes for v8:
- Add Krzysztof Kozlowski's Reviewed-by tag Changes for v7:
- Add both CIX SoC and mailbox configuration at one patch
arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/configs/defconfig +2 -0
@@ -45,6 +45,7 @@ CONFIG_ARCH_BCMBCA=y CONFIG_ARCH_BRCMSTB=y CONFIG_ARCH_BERLIN=y CONFIG_ARCH_BLAIZE=y +CONFIG_ARCH_CIX=y CONFIG_ARCH_EXYNOS=y CONFIG_ARCH_SPARX5=y CONFIG_ARCH_K3=y
@@ -1423,6 +1424,7 @@ CONFIG_BCM2835_MBOX=y CONFIG_QCOM_APCS_IPC=y CONFIG_MTK_ADSP_MBOX=m CONFIG_QCOM_IPCC=y +CONFIG_CIX_MBOX=y CONFIG_ROCKCHIP_IOMMU=y CONFIG_TEGRA_IOMMU_SMMU=y CONFIG_ARM_SMMU=y
Signature · 1 line
2.25.1
PATCH v8 7/9 dt-bindings: clock: cix: Add CIX sky1 scmi clock id
In reply to Peter ChenFrom: Gary Yang <[email protected]>
Add device tree bindings for the scmi clock id on
Cix sky1 platform.
---
Changes for v8:
- Add Krzysztof Kozlowski's Acked-by tag
Changes for v7:
- Rename clock binding file from sky1-clk.h to cix,sky1.h
- Add my Sob
include/dt-bindings/clock/cix,sky1.h | 279 +++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 include/dt-bindings/clock/cix,sky1.h
include/dt-bindings/clock/cix,sky1.h new file +279 -0
@@ -0,0 +1,279 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Copyright 2024-2025 Cix Technology Group Co., Ltd. +*/ + +#ifndef _DT_BINDINGS_CLK_CIX_SKY1_H +#define _DT_BINDINGS_CLK_CIX_SKY1_H + +#define CLK_TREE_CPU_GICxCLK 0 +#define CLK_TREE_CPU_PPUCLK 1 +#define CLK_TREE_CPU_PERIPHCLK 2 +#define CLK_TREE_DSU_CLK 3 +#define CLK_TREE_DSU_PCLK 4 +#define CLK_TREE_CPU_CLK_BC0 5 +#define CLK_TREE_CPU_CLK_BC1 6 +#define CLK_TREE_CPU_CLK_BC2 7 +#define CLK_TREE_CPU_CLK_BC3 8 +#define CLK_TREE_CPU_CLK_MC0 9 +#define CLK_TREE_CPU_CLK_MC1 10 +#define CLK_TREE_CPU_CLK_MC2 11 +#define CLK_TREE_CPU_CLK_MC3 12 +#define CLK_TREE_CPU_CLK_LC0 13 +#define CLK_TREE_CPU_CLK_LC1 14 +#define CLK_TREE_CPU_CLK_LC2 15 +#define CLK_TREE_CPU_CLK_LC3 16 +#define CLK_TREE_CSI_CTRL0_PCLK 17 +#define CLK_TREE_CSI_CTRL1_PCLK 18 +#define CLK_TREE_CSI_CTRL2_PCLK 19 +#define CLK_TREE_CSI_CTRL3_PCLK 20 +#define CLK_TREE_CSI_DMA0_PCLK 21 +#define CLK_TREE_CSI_DMA1_PCLK 22 +#define CLK_TREE_CSI_DMA2_PCLK 23 +#define CLK_TREE_CSI_DMA3_PCLK 24 +#define CLK_TREE_CSI_PHY0_PSM 25 +#define CLK_TREE_CSI_PHY1_PSM 26 +#define CLK_TREE_CSI_PHY0_APBCLK 27 +#define CLK_TREE_CSI_PHY1_APBCLK 28 +#define CLK_TREE_FCH_APB_CLK 29 +#define CLK_TREE_GPU_CLK_400M 30 +#define CLK_TREE_GPU_CLK_CORE 31 +#define CLK_TREE_GPU_CLK_STACKS 32 +#define CLK_TREE_DP0_PIXEL0 33 +#define CLK_TREE_DP0_PIXEL1 34 +#define CLK_TREE_DP1_PIXEL0 35 +#define CLK_TREE_DP1_PIXEL1 36 +#define CLK_TREE_DP2_PIXEL0 37 +#define CLK_TREE_DP2_PIXEL1 38 +#define CLK_TREE_DP3_PIXEL0 39 +#define CLK_TREE_DP3_PIXEL1 40 +#define CLK_TREE_DP4_PIXEL0 41 +#define CLK_TREE_DP4_PIXEL1 42 +#define CLK_TREE_DPU_CLK 43 +#define CLK_TREE_DPU0_ACLK 44 +#define CLK_TREE_DPU1_ACLK 45 +#define CLK_TREE_DPU2_ACLK 46 +#define CLK_TREE_DPU3_ACLK 47 +#define CLK_TREE_DPU4_ACLK 48 +#define CLK_TREE_DPC0_VIDCLK0 49 +#define CLK_TREE_DPC0_VIDCLK1 50 +#define CLK_TREE_DPC1_VIDCLK0 51 +#define CLK_TREE_DPC1_VIDCLK1 52 +#define CLK_TREE_DPC2_VIDCLK0 53 +#define CLK_TREE_DPC2_VIDCLK1 54 +#define CLK_TREE_DPC3_VIDCLK0 55 +#define CLK_TREE_DPC3_VIDCLK1 56 +#define CLK_TREE_DPC4_VIDCLK0 57 +#define CLK_TREE_DPC4_VIDCLK1 58 +#define CLK_TREE_DPC0_APBCLK 59 +#define CLK_TREE_DPC1_APBCLK 60 +#define CLK_TREE_DPC2_APBCLK 61 +#define CLK_TREE_DPC3_APBCLK 62 +#define CLK_TREE_DPC4_APBCLK 63 +#define CLK_TREE_NPU_MEMCLK 64 +#define CLK_TREE_NPU_SYSCLK 65 +#define CLK_TREE_NPU_DBGCLK 66 +#define CLK_TREE_VPU_APBCLK 67 +#define CLK_TREE_ISP_ACLK 68 +#define CLK_TREE_ISP_SCLK 69 +#define CLK_TREE_AUDIO_CLK4 70 +#define CLK_TREE_AUDIO_CLK5 71 +#define CLK_TREE_CAMERA_MCLK0 72 +#define CLK_TREE_CAMERA_MCLK1 73 +#define CLK_TREE_CAMERA_MCLK2 74 +#define CLK_TREE_CAMERA_MCLK3 75 +#define CLK_TREE_AUDIO_CLK0 76 +#define CLK_TREE_AUDIO_CLK1 77 +#define CLK_TREE_AUDIO_CLK2 78 +#define CLK_TREE_AUDIO_CLK3 79 +#define CLK_TREE_MM_NI700_CLK 80 +#define CLK_TREE_SYS_NI700_CLK 81 +#define CLK_TREE_GMAC0_ACLK 82 +#define CLK_TREE_GMAC1_ACLK 83 +#define CLK_TREE_GMAC0_DIV_ACLK 84 +#define CLK_TREE_GMAC0_DIV_TXCLK 85 +#define CLK_TREE_GMAC0_RGMII0_TXCLK 86 +#define CLK_TREE_GMAC1_DIV_ACLK 87 +#define CLK_TREE_GMAC1_DIV_TXCLK 88 +#define CLK_TREE_GMAC1_RGMII0_TXCLK 89 +#define CLK_TREE_GMAC0_PCLK 90 +#define CLK_TREE_GMAC1_PCLK 91 +#define CLK_TREE_USB2_0_AXI_GATE 92 +#define CLK_TREE_USB2_0_APB_GATE 93 +#define CLK_TREE_USB2_1_AXI_GATE 94 +#define CLK_TREE_USB2_1_APB_GATE 95 +#define CLK_TREE_USB2_2_AXI_GATE 96 +#define CLK_TREE_USB2_2_APB_GATE 97 +#define CLK_TREE_USB2_3_AXI_GATE 98 +#define CLK_TREE_USB2_3_APB_GATE 99 +#define CLK_TREE_USB2_0_PHY_GATE 100 +#define CLK_TREE_USB2_1_PHY_GATE 101 +#define CLK_TREE_USB2_2_PHY_GATE 102 +#define CLK_TREE_USB2_3_PHY_GATE 103 +#define CLK_TREE_USB3C_DRD_AXI_GATE 104 +#define CLK_TREE_USB3C_DRD_APB_GATE 105 +#define CLK_TREE_USB3C_DRD_PHY2_GATE 106 +#define CLK_TREE_USB3C_DRD_PHY3_GATE 107 +#define CLK_TREE_USB3C_0_AXI_GATE 108 +#define CLK_TREE_USB3C_0_APB_GATE 109 +#define CLK_TREE_USB3C_0_PHY2_GATE 110 +#define CLK_TREE_USB3C_0_PHY3_GATE 111 +#define CLK_TREE_USB3C_1_AXI_GATE 112 +#define CLK_TREE_USB3C_1_APB_GATE 113 +#define CLK_TREE_USB3C_1_PHY2_GATE 114 +#define CLK_TREE_USB3C_1_PHY3_GATE 115 +#define CLK_TREE_USB3C_2_AXI_GATE 116 +#define CLK_TREE_USB3C_2_APB_GATE 117 +#define CLK_TREE_USB3C_2_PHY2_GATE 118 +#define CLK_TREE_USB3C_2_PHY3_GATE 119 +#define CLK_TREE_USB3A_0_AXI_GATE 120 +#define CLK_TREE_USB3A_0_APB_GATE 121 +#define CLK_TREE_USB3A_0_PHY2_GATE 122 +#define CLK_TREE_USB3A_1_AXI_GATE 123 +#define CLK_TREE_USB3A_1_APB_GATE 124 +#define CLK_TREE_USB3A_1_PHY2_GATE 125 +#define CLK_TREE_USB3A_PHY3_GATE 126 +#define CLK_TREE_USB2_0_CLK_SOF 127 +#define CLK_TREE_USB2_1_CLK_SOF 128 +#define CLK_TREE_USB2_2_CLK_SOF 129 +#define CLK_TREE_USB2_3_CLK_SOF 130 +#define CLK_TREE_USB3C_DRD_CLK_SOF 131 +#define CLK_TREE_USB3C_H0_CLK_SOF 132 +#define CLK_TREE_USB3C_H1_CLK_SOF 133 +#define CLK_TREE_USB3C_H2_CLK_SOF 134 +#define CLK_TREE_USB3A_H0_CLK_SOF 135 +#define CLK_TREE_USB3A_H1_CLK_SOF 136 +#define CLK_TREE_USB2_0_CLK_LPM 137 +#define CLK_TREE_USB2_1_CLK_LPM 138 +#define CLK_TREE_USB2_2_CLK_LPM 139 +#define CLK_TREE_USB2_3_CLK_LPM 140 +#define CLK_TREE_USB3C_DRD_CLK_LPM 141 +#define CLK_TREE_USB3C_H0_CLK_LPM 142 +#define CLK_TREE_USB3C_H1_CLK_LPM 143 +#define CLK_TREE_USB3C_H2_CLK_LPM 144 +#define CLK_TREE_USB3A_H0_CLK_LPM 145 +#define CLK_TREE_USB3A_H1_CLK_LPM 146 +#define CLK_TREE_USB2_0_PHY_REF 147 +#define CLK_TREE_USB2_1_PHY_REF 148 +#define CLK_TREE_USB2_2_PHY_REF 149 +#define CLK_TREE_USB2_3_PHY_REF 150 +#define CLK_TREE_USB3C_DRD_PHY_REF 151 +#define CLK_TREE_USB3C_H0_PHY_REF 152 +#define CLK_TREE_USB3C_H1_PHY_REF 153 +#define CLK_TREE_USB3C_H2_PHY_REF 154 +#define CLK_TREE_USB3A_H0_PHY_REF 155 +#define CLK_TREE_USB3A_H1_PHY_REF 156 +#define CLK_TREE_USB3C_DRD_PHY_x4_REF 157 +#define CLK_TREE_USB3C_H0_PHY_x4_REF 158 +#define CLK_TREE_USB3C_H1_PHY_x4_REF 159 +#define CLK_TREE_USB3C_H2_PHY_x4_REF 160 +#define CLK_TREE_USB3A_PHY_x2_REF 161 +#define CLK_TREE_PCIE_X8CTRL_APB 162 +#define CLK_TREE_PCIE_X4CTRL_APB 163 +#define CLK_TREE_PCIE_X2CTRL_APB 164 +#define CLK_TREE_PCIE_X1_0CTRL_APB 165 +#define CLK_TREE_PCIE_X1_1CTRL_APB 166 +#define CLK_TREE_PCIE_X8_PHY_APB 167 +#define CLK_TREE_PCIE_X4_PHY_APB 168 +#define CLK_TREE_PCIE_X211_PHY_APB 169 +#define CLK_TREE_PCIE_NI700_CLK 170 +#define CLK_TREE_PCIE_CTRL0_CLK 171 +#define CLK_TREE_PCIE_CTRL1_CLK 172 +#define CLK_TREE_PCIE_CTRL2_CLK 173 +#define CLK_TREE_PCIE_CTRL3_CLK 174 +#define CLK_TREE_PCIE_CTRL4_CLK 175 +#define CLK_TREE_CSI_CTRL0_SYSCLK 176 +#define CLK_TREE_CSI_CTRL1_SYSCLK 177 +#define CLK_TREE_CSI_CTRL2_SYSCLK 178 +#define CLK_TREE_CSI_CTRL3_SYSCLK 179 +#define CLK_TREE_CSI_CTRL0_PIXEL0_CLK 180 +#define CLK_TREE_CSI_CTRL0_PIXEL1_CLK 181 +#define CLK_TREE_CSI_CTRL0_PIXEL2_CLK 182 +#define CLK_TREE_CSI_CTRL0_PIXEL3_CLK 183 +#define CLK_TREE_CSI_CTRL1_PIXEL0_CLK 184 +#define CLK_TREE_CSI_CTRL2_PIXEL0_CLK 185 +#define CLK_TREE_CSI_CTRL2_PIXEL1_CLK 186 +#define CLK_TREE_CSI_CTRL2_PIXEL2_CLK 187 +#define CLK_TREE_CSI_CTRL2_PIXEL3_CLK 188 +#define CLK_TREE_CSI_CTRL3_PIXEL0_CLK 189 +#define CLK_TREE_CI700_GCLK0 190 +#define CLK_TREE_DDRC0_ACLK_CLK 191 +#define CLK_TREE_DDRC1_ACLK_CLK 192 +#define CLK_TREE_DDRC2_ACLK_CLK 193 +#define CLK_TREE_DDRC3_ACLK_CLK 194 +#define CLK_TREE_DDRC0_DFICLK_CLK 195 +#define CLK_TREE_DDRC1_DFICLK_CLK 196 +#define CLK_TREE_DDRC2_DFICLK_CLK 197 +#define CLK_TREE_DDRC3_DFICLK_CLK 198 +#define CLK_TREE_PHY0_SYNC_CLK 199 +#define CLK_TREE_PHY1_SYNC_CLK 200 +#define CLK_TREE_PHY2_SYNC_CLK 201 +#define CLK_TREE_PHY3_SYNC_CLK 202 +#define CLK_TREE_PHY0_BYPASS_CLK 203 +#define CLK_TREE_PHY1_BYPASS_CLK 204 +#define CLK_TREE_PHY2_BYPASS_CLK 205 +#define CLK_TREE_PHY3_BYPASS_CLK 206 +#define CLK_TREE_DDRC_0_APB 207 +#define CLK_TREE_DDRC_1_APB 208 +#define CLK_TREE_DDRC_2_APB 209 +#define CLK_TREE_DDRC_3_APB 210 +#define CLK_TREE_TZC400_0_APB 211 +#define CLK_TREE_TZC400_1_APB 212 +#define CLK_TREE_TZC400_2_APB 213 +#define CLK_TREE_TZC400_3_APB 214 +#define CLK_TREE_S5_SENSOR_HUB_25M 215 +#define CLK_TREE_S5_SENSOR_HUB_400M 216 +#define CLK_TREE_S5_CSS600_100M 217 +#define CLK_TREE_S5_DFD_800M 218 +#define CLK_TREE_S5_CSU_SE_800M 219 +#define CLK_TREE_S5_CSU_PM_800M 220 +#define CLK_TREE_PCIE_REF_B0 221 +#define CLK_TREE_PCIE_REF_B1 222 +#define CLK_TREE_PCIE_REF_B2 223 +#define CLK_TREE_PCIE_REF_B3 224 +#define CLK_TREE_PCIE_REF_B4 225 +#define CLK_TREE_PCIE_REF_PHY_X8 226 +#define CLK_TREE_PCIE_REF_PHY_X4 227 +#define CLK_TREE_PCIE_REF_PHY_X211 228 +#define CLK_TREE_GMAC_REC_CLK 229 +#define CLK_TREE_GPUTOP_PLL 230 +#define CLK_TREE_GPUCORE_PLL 231 +#define CLK_TREE_CPU_PLL_LIT 232 +#define CLK_TREE_CPU_PLL0 233 +#define CLK_TREE_CPU_PLL1 234 +#define CLK_TREE_CPU_PLL2 235 +#define CLK_TREE_CPU_PLL3 236 +#define CLK_TREE_FCH_I3C0_FUNC 237 +#define CLK_TREE_FCH_I3C1_FUNC 238 +#define CLK_TREE_FCH_DMA_ACLK 239 +#define CLK_TREE_FCH_XSPI_FUNC 240 +#define CLK_TREE_FCH_XSPI_MACLK 241 +#define CLK_TREE_FCH_TIMER_FUN 242 +#define CLK_TREE_FCH_APB_IO_S0 243 +#define CLK_TREE_FCH_I3C0_APB 244 +#define CLK_TREE_FCH_I3C1_APB 245 +#define CLK_TREE_FCH_UART0_APB 246 +#define CLK_TREE_FCH_UART1_APB 247 +#define CLK_TREE_FCH_UART2_APB 248 +#define CLK_TREE_FCH_UART3_APB 249 +#define CLK_TREE_FCH_SPI0_APB 250 +#define CLK_TREE_FCH_SPI1_APB 251 +#define CLK_TREE_FCH_XSPI_APB 252 +#define CLK_TREE_FCH_I2C0_APB 253 +#define CLK_TREE_FCH_I2C1_APB 254 +#define CLK_TREE_FCH_I2C2_APB 255 +#define CLK_TREE_FCH_I2C3_APB 256 +#define CLK_TREE_FCH_I2C4_APB 257 +#define CLK_TREE_FCH_I2C5_APB 258 +#define CLK_TREE_FCH_I2C6_APB 259 +#define CLK_TREE_FCH_I2C7_APB 260 +#define CLK_TREE_FCH_TIMER_APB 261 +#define CLK_TREE_FCH_GPIO_APB 262 +#define CLK_TREE_FCH_UART0_FUNC 263 +#define CLK_TREE_FCH_UART1_FUNC 264 +#define CLK_TREE_FCH_UART2_FUNC 265 +#define CLK_TREE_FCH_UART3_FUNC 266 +/* 267~271 not used by AP, skip */ +#define CLK_TREE_GPU_CLK_200M 272 + +#endif
Signature · 1 line
2.25.1
PATCH v8 8/9 arm64: dts: cix: Add sky1 base dts initial support
In reply to Peter ChenCIX SKY1 SoC is high performance Armv9 SoC designed by Cixtech, and Orion O6 is the motherboard launched by Radxa. See below for detail:
https://docs.radxa.com/en/orion/o6/getting-started/introduction
In this commit, it only adds limited components for running initramfs at Orion O6.
--- arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/cix/Makefile | 2 + arch/arm64/boot/dts/cix/sky1-orion-o6.dts | 39 +++ arch/arm64/boot/dts/cix/sky1.dtsi | 331 ++++++++++++++++++++++ 4 files changed, 373 insertions(+) create mode 100644 arch/arm64/boot/dts/cix/Makefile create mode 100644 arch/arm64/boot/dts/cix/sky1-orion-o6.dts create mode 100644 arch/arm64/boot/dts/cix/sky1.dtsi
arch/arm64/boot/dts/Makefile +1 -0
@@ -13,6 +13,7 @@ subdir-y += bitmain subdir-y += blaize subdir-y += broadcom subdir-y += cavium +subdir-y += cix subdir-y += exynos subdir-y += freescale subdir-y += hisilicon
arch/arm64/boot/dts/cix/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_CIX) += sky1-orion-o6.dtb
arch/arm64/boot/dts/cix/sky1-orion-o6.dts new file +39 -0
@@ -0,0 +1,39 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright 2025 Cix Technology Group Co., Ltd. + * + */ + +/dts-v1/; + +#include "sky1.dtsi" +/ { + model = "Radxa Orion O6"; + compatible = "radxa,orion-o6", "cix,sky1"; + + aliases { + serial2 = &uart2; + }; + + chosen { + stdout-path = &uart2; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x28000000>; + linux,cma-default; + }; + }; + +}; + +&uart2 { + status = "okay"; +};
arch/arm64/boot/dts/cix/sky1.dtsi new file +331 -0
331 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 9/9 MAINTAINERS: Add CIX SoC maintainer entry
In reply to Peter ChenUsing this entry as the maintainers information for CIX SoCs.
--- MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+)
MAINTAINERS +11 -0
@@ -2404,6 +2404,17 @@ F: arch/arm/boot/compressed/misc-ep93xx.h F: arch/arm/mach-ep93xx/ F: drivers/iio/adc/ep93xx_adc.c +ARM/CIX SOC SUPPORT +M: Peter Chen <[email protected]> +M: Fugang Duan <[email protected]> +R: CIX Linux Kernel Upstream Group <[email protected]> +L: [email protected] (moderated for non-subscribers) +S: Maintained +T: git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/cix.git +F: Documentation/devicetree/bindings/arm/cix.yaml +F: arch/arm64/boot/dts/cix/ +K: \bcix\b + ARM/CLKDEV SUPPORT M: Russell King <[email protected]> L: [email protected] (moderated for non-subscribers)
Signature · 1 line
2.25.1