clk: sunxi-ng: add the Allwinner B288 CCU
Subsystems (4)
v5 cover clk: sunxi-ng: add the Allwinner B288 CCU
The Allwinner B288 (sun8iw10p1) is a dual Cortex-A7 SoC used in e-book readers. This adds its CCU.
These are the CCU patches of the B288 series v4, sent on their own so they don't wait for the pin controller. The rest of the series follows later.
The B288 is closest to the A64: most of its PLLs are bit-identical. The clock descriptions come from Allwinner's BSP, cross-checked against ccu-sun50i-a64.c. Tested on a PocketBook Verse (PB629).
Changes since v4:
- rename some clocks and resets to the names the other sunxi-ng bindings use
- build the module as sun8i-b288-ccu, like the other CCUs
- add the CPU PLL and mux notifiers
Pablo Mazzini (2):
dt-bindings: clock: sun4i-a10-ccu: add Allwinner B288
clk: sunxi-ng: add Allwinner B288 CCU driver
.../clock/allwinner,sun4i-a10-ccu.yaml | 1 + drivers/clk/sunxi-ng/Kconfig | 5 + drivers/clk/sunxi-ng/Makefile | 2 + drivers/clk/sunxi-ng/ccu-sun8i-b288.c | 775 ++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun8i-b288.h | 10 + include/dt-bindings/clock/sun8i-b288-ccu.h | 82 ++ include/dt-bindings/reset/sun8i-b288-ccu.h | 45 + 7 files changed, 920 insertions(+) create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-b288.c create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-b288.h create mode 100644 include/dt-bindings/clock/sun8i-b288-ccu.h create mode 100644 include/dt-bindings/reset/sun8i-b288-ccu.h
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
Signature · 1 line
2.52.0
PATCH v5 1/2 dt-bindings: clock: sun4i-a10-ccu: add Allwinner B288
The B288 (sun8iw10p1) is a dual Cortex-A7 SoC used in e-book readers. Its CCU needs only the two oscillator inputs, so it fits the existing schema without changes.
---
v5: renamed some clocks and resets to the names the other sunxi-ng bindings use; only names changed, so I kept the Ack.
--- .../clock/allwinner,sun4i-a10-ccu.yaml | 1 + include/dt-bindings/clock/sun8i-b288-ccu.h | 82 +++++++++++++++++++ include/dt-bindings/reset/sun8i-b288-ccu.h | 45 ++++++++++ 3 files changed, 128 insertions(+) create mode 100644 include/dt-bindings/clock/sun8i-b288-ccu.h create mode 100644 include/dt-bindings/reset/sun8i-b288-ccu.h
Documentation/devicetree/bindings/clock/allwinner,sun4i-a10-ccu.yaml +1 -0
@@ -28,6 +28,7 @@ properties: - allwinner,sun8i-a33-ccu - allwinner,sun8i-a83t-ccu - allwinner,sun8i-a83t-r-ccu + - allwinner,sun8i-b288-ccu - allwinner,sun8i-h3-ccu - allwinner,sun8i-h3-r-ccu - allwinner,sun8i-r40-ccu
include/dt-bindings/clock/sun8i-b288-ccu.h new file +82 -0
82 lines not on this page · raw message
include/dt-bindings/reset/sun8i-b288-ccu.h new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.52.0
PATCH v5 2/2 clk: sunxi-ng: add Allwinner B288 CCU driver
In reply to Pablo MazziniCovers the PLLs, the CPU/AHB/APB tree, the module clocks and the bus gates and resets.
--- drivers/clk/sunxi-ng/Kconfig | 5 + drivers/clk/sunxi-ng/Makefile | 2 + drivers/clk/sunxi-ng/ccu-sun8i-b288.c | 775 ++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-sun8i-b288.h | 10 + 4 files changed, 792 insertions(+) create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-b288.c create mode 100644 drivers/clk/sunxi-ng/ccu-sun8i-b288.h
drivers/clk/sunxi-ng/Kconfig +5 -0
@@ -88,6 +88,11 @@ config SUN6I_RTC_CCU default ARCH_SUNXI depends on MACH_SUN8I || ARM64 || RISCV || COMPILE_TEST +config SUN8I_B288_CCU + tristate "Support for the Allwinner B288 CCU" + default ARCH_SUNXI + depends on MACH_SUN8I || COMPILE_TEST + config SUN8I_A23_CCU tristate "Support for the Allwinner A23 CCU" default ARCH_SUNXI
drivers/clk/sunxi-ng/Makefile +2 -0
@@ -43,6 +43,7 @@ obj-$(CONFIG_SUN6I_RTC_CCU) += sun6i-rtc-ccu.o obj-$(CONFIG_SUN8I_A23_CCU) += sun8i-a23-ccu.o obj-$(CONFIG_SUN8I_A33_CCU) += sun8i-a33-ccu.o obj-$(CONFIG_SUN8I_A83T_CCU) += sun8i-a83t-ccu.o +obj-$(CONFIG_SUN8I_B288_CCU) += sun8i-b288-ccu.o obj-$(CONFIG_SUN8I_H3_CCU) += sun8i-h3-ccu.o obj-$(CONFIG_SUN8I_R40_CCU) += sun8i-r40-ccu.o obj-$(CONFIG_SUN8I_V3S_CCU) += sun8i-v3s-ccu.o
@@ -71,6 +72,7 @@ sun6i-rtc-ccu-y += ccu-sun6i-rtc.o sun8i-a23-ccu-y += ccu-sun8i-a23.o sun8i-a33-ccu-y += ccu-sun8i-a33.o sun8i-a83t-ccu-y += ccu-sun8i-a83t.o +sun8i-b288-ccu-y += ccu-sun8i-b288.o sun8i-h3-ccu-y += ccu-sun8i-h3.o sun8i-r40-ccu-y += ccu-sun8i-r40.o sun8i-v3s-ccu-y += ccu-sun8i-v3s.o
drivers/clk/sunxi-ng/ccu-sun8i-b288.c new file +775 -0
775 lines not on this page · raw message
drivers/clk/sunxi-ng/ccu-sun8i-b288.h new file +10 -0
@@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _CCU_SUN8I_B288_H_ +#define _CCU_SUN8I_B288_H_ + +#include <dt-bindings/clock/sun8i-b288-ccu.h> +#include <dt-bindings/reset/sun8i-b288-ccu.h> + +#define CLK_NUMBER (CLK_MMC1_OUTPUT + 1) + +#endif /* _CCU_SUN8I_B288_H_ */
Signature · 1 line
2.52.0