Skip to content

[PW_SID:1064195] clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM#1586

Closed
linux-riscv-bot wants to merge 8 commits into
workflow__riscv__fixesfrom
pw1064195
Closed

[PW_SID:1064195] clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM#1586
linux-riscv-bot wants to merge 8 commits into
workflow__riscv__fixesfrom
pw1064195

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1064195 applied to workflow__riscv__fixes

Name: clk: sunxi-ng: Add support for Allwinner A733 CCU and PRCM
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1064195
Version: 1

The CCU and R-CCU (PRCM) modules provide clocks and reset functions for
the Allwinner A733 SoC. The clock architecture of the A733 is evolved
from the A523, though the root clocking strategy transitions from a
static oscillator frequency in the Devicetree to the "hosc" clock, which
is determined by choosing from three possible frequencies (19.2MHz,
24MHz, or 26MHz) by the RTC hardware, and finally feeds the CCU and
R-CCU.

Additionally, the MCU_CCU module found in previous designs is removed
from the A733, and the clock tree is expanded with more clock outputs
to support new functional modules.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
On newer Allwinner platforms like the A733, the Sigma-Delta Modulation
(SDM) control logic is more complex. The SDM enable bit, which was
previously located in the PLL register, is now moved to a second
pattern register (PATTERN1).

To support this, rename the existing "tuning" members to "pattern0" to
align with the datasheet, and introduce the _SUNXI_CCU_SDM_DUAL_PAT
macro to provide pattern1 register support. Related operations are also
updated.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add support for the Power Reset Clock Management (PRCM) module found in
the Allwinner A733 SoC. This clock controller manages the clock control
and reset functions for device modules within the CPUS domain.

The PRCM module includes the management of three primary buses: r-ahb,
r-apb0, and r-apb1. It also provides clocking for several key
peripherals, such as R-UART, R-I2C, R-SPI, and the R-RISCV subsystem.
Additionally, the reset lines for these modules are integrated.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add PLL clock support for the main CCU of the Allwinner A733 SoC. The
structure is mostly similar to the sun55i, with the addition of a
PLL_REF clock that normalizes the hardware-detected DCXO/hosc frequency
(19.2MHz, 24MHz, or 26MHz) into a consistent 24MHz reference for all
subsequent PLLs.

The behaviors of PLL_AUDIO0 and PLL_AUDIO1 are ported from the vendor
driver. Specifically, PLL_AUDIO0 is configured with SDM parameters to
provide a 22.5792MHz * 4 output, while PLL_AUDIO1 is integrated into
the main CCU without using SDM.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the essential bus clocks in the Allwinner A733 CCU, including AHB,
APB0, APB1, APB_UART, NSI, and MBUS. These buses are necessary for many
other functional modules. Additionally clocks such as trace, gic and
cpu_peri are also added as they fall within the register address range
of the bus clocks, even though they are not strictly bus clocks.

The MBUS clock is marked as critical to ensure the memory bus remains
operational at all times. For the NSI and MBUS clocks, the hardware
requires an update bit (bit 27) to be set so that the configuration
takes effect and the updated parameters can be correctly read back.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the module clocks found in the Allwinner A733 SoC, including video,
storage, interfaces and others. While most of these clocks are similar
to those in the A523 SoC, this implementation accounts for changes in
register offsets and introduces support for new modules.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the bus clock gates that control access to the devices' register
interface on the Allwinner A733 SoC. These clocks are typically
single-bit controls in the BGR registers, covering UARTs, SPI, I2C, and
various multimedia engines. It also includes bus gates for system
components like the IOMMU and MSI-lite interfaces.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add the reset lines for the Allwinner A733 SoC. These reset control bits
are integrated into the Bus Gate Reset (BGR) registers, typically
sharing the same register address with their corresponding bus clock
gates. Integrate them into the main CCU driver using the existing
sunxi-ng ccu_reset framework, allowing the CCU to also function as a
reset controller for the SoC.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1036.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1395.54 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.59 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.17 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 3.41 seconds
Result: WARNING
Output:

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#34: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 589 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 0db7bd12e26a ("dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 1 warnings, 0 checks, 589 lines checked
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[RFC,1/8] dt-bindings: clk: sun60i-a733-ccu: Add allwinner A733 support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 136.48 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1019.29 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1376.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 84.78 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[RFC,2/8] clk: sunxi-ng: sdm: Add dual patterns support"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[RFC,6/8] clk: sunxi-ng: a733: Add mod clocks support"
kdoc
Desc: Detects for kdoc errors
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[RFC,6/8] clk: sunxi-ng: a733: Add mod clocks support"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[RFC,6/8] clk: sunxi-ng: a733: Add mod clocks support"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[RFC,6/8] clk: sunxi-ng: a733: Add mod clocks support"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 137.37 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1016.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1389.19 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.75 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 2.32 seconds
Result: WARNING
Output:

CHECK: Please use a blank line after function/struct/union/enum declarations
#259: FILE: drivers/clk/sunxi-ng/ccu-sun60i-a733.c:856:
 };
+static SUNXI_CCU_GATE_HWS(bus_gpu_clk, "bus-gpu", ahb_hws, 0xb24, BIT(0), 0);

CHECK: Please use a blank line after function/struct/union/enum declarations
#419: FILE: drivers/clk/sunxi-ng/ccu-sun60i-a733.c:1223:
 };
+static SUNXI_CCU_GATE_HWS(bus_ohci0_clk, "bus-ohci0", ahb_hws, 0x1304, BIT(0), 0);

CHECK: Please use a blank line after function/struct/union/enum declarations
#429: FILE: drivers/clk/sunxi-ng/ccu-sun60i-a733.c:1242:
 };
+static SUNXI_CCU_GATE_HWS(bus_ohci1_clk, "bus-ohci1", ahb_hws, 0x130c, BIT(0), 0);

total: 0 errors, 0 warnings, 3 checks, 881 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Commit 9bcb862d238b ("clk: sunxi-ng: a733: Add bus clock gates") has style problems, please review.

NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 3 checks, 881 lines checked
CHECK: Please use a blank line after function/struct/union/enum declarations


@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.39 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
kdoc
Desc: Detects for kdoc errors
Duration: 0.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[RFC,7/8] clk: sunxi-ng: a733: Add bus clock gates"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 136.20 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1021.77 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1377.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.55 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 28.03 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.71 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
kdoc
Desc: Detects for kdoc errors
Duration: 0.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[RFC,8/8] clk: sunxi-ng: a733: Add reset lines"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1064195 branch March 12, 2026 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants