initial support for "suniv" Allwinner new ARM9 SoC
Subsystems (11)
v2 cover initial support for "suniv" Allwinner new ARM9 SoC
This is the second version of RFC patchset for Allwinner ARMv5 F1C100s SoC. Icenowy (author of the initial patchset) allowed me to continue. For patch 1~3 which introduces first ARMv5 Allwinner SoC I looked freescale,imx configs and tried to organize patches better. Addressed comment from Maxime Ripard and added SoC name to compatibles and filenames.
Addressed comment from Rob Herring and added dt-bindings.
This is my first patch. Sorry for any inconvenience :-)
Original cover later:
This is the RFC initial patchset for the "new" Allwinner SUNIV ARM9 SoC.
The same die is packaged differently, come with different co-packaged DRAM or shipped with different SDK; and then made many model names: F23, F25, F1C100A, F1C100S, F1C200S, F1C500, F1C600, R6, etc. These SoCs all share a common feature set and are packaged similarly (eLQFP128 for SoCs without co-packaged DRAM, QFN88 for with DRAM). As their's no functionality hidden on the QFN88 models (except DRAM interface not exported), it's not clever to differentiate them. So I will use suniv as common name of all these SoCs.
As it's the first not ARMv7+ Allwinner SoC to get supported, this patchset firstly made CONFIG_ARCH_SUNXI a common config item, and let selectable CONFIG_ARCH_SUNXI_V{5,7} to internally select it. This makes reusing most work possible. This is PATCH 1~2.
The ARM9 has neither GIC nor arch_timer, like the sun4i/5i Cortex-A8 SoCs. So adapt the IRQ and timer driver used by sun4i/5i to support suniv. This is PATCH 3~5.
Then it's the common way to support a new SoC -- pinctrl, CCU and initial DT.
Changes since v1:
- Patch "ARM: add CONFIG_ARCH_SUNXI_V7 for differentiate ARMv5/v7 Allwinner SoCs"
- Instead of using a common bool config use a common menuconfig.
- Use ARCH_MULTI_V7 to differentiate V7 SoCs.
- Addressed comment from Julian Calaby
- Patch "ARM: sunxi: add Allwinner ARMv5 SoCs"
- Use ARCH_MULTI_V5 to differentiate V5 SoCs.
- removed "allwinner,suniv" board compatible string
- Added dt-bindings
- Patch "irqchip/sun4i: add support for suniv interrupt controller"
- Added dt-bindings
- Changed "allwinner,suniv-ic" to "allwinner,suniv-f1c100s-ic"
- Patch "clocksource: sun4i: add a compatible for suniv"
- Added dt-bindings
- Changed "allwinner,suniv-timer" to "allwinner,suniv-f1c100s-timer"
- Patch "pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)"
- Added dt-bindings
- Renamed suniv-pinctrl to suniv-f1c100s-pinctrl
- Patch "clk: sunxi-ng: add support for suniv F1C100s SoC"
- Added dt-bindings
- Renamed suniv-ccu to suniv-f1c100s-ccu
- Patch "ARM: suniv: f1c100s: add device tree for Lichee Pi Nano"
- Addressed comment from Rask Ingemann Lambertsen
Mesih Kilinc (14):
ARM: add CONFIG_ARCH_SUNXI_V7 for differentiate ARMv5/v7 Allwinner
SoCs
dt-bindings: arm: Add new Allwinner ARMv5 F1C100s SoC
ARM: sunxi: add Allwinner ARMv5 SoCs
dt-bindings: interrupt-controller: Add suniv interrupt-controller irqchip/sun4i: add support for suniv interrupt controller
dt-bindings: timer: Add Allwinner suniv timer
clocksource: sun4i: add a compatible for suniv clocksource/drivers/sun4i: register as sched_clock on suniv
dt-bindings: pinctrl: Add Allwinner suniv F1C100s pinctrl
pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)
dt-bindings: clock: Add Allwinner suniv F1C100s CCU
clk: sunxi-ng: add support for suniv F1C100s SoC
ARM: dts: suniv: add initial DTSI file for F1C100s
ARM: suniv: f1c100s: add device tree for Lichee Pi Nano
Documentation/devicetree/bindings/arm/sunxi.txt | 1 + .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + .../interrupt-controller/allwinner,sun4i-ic.txt | 5 +- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + .../bindings/timer/allwinner,sun4i-timer.txt | 5 +- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts | 26 + arch/arm/boot/dts/suniv-f1c100s.dtsi | 158 ++++++ arch/arm/mach-sunxi/Kconfig | 39 +- arch/arm/mach-sunxi/Makefile | 3 +- arch/arm/mach-sunxi/sunxi_v5.c | 22 + drivers/clk/sunxi-ng/Kconfig | 5 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 536 +++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h | 34 ++ drivers/clocksource/sun4i_timer.c | 5 +- drivers/irqchip/irq-sun4i.c | 47 +- drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-suniv-f1c100s.c | 417 ++++++++++++++++ include/dt-bindings/clock/suniv-ccu-f1c100s.h | 69 +++ include/dt-bindings/reset/suniv-ccu-f1c100s.h | 37 ++ 22 files changed, 1401 insertions(+), 18 deletions(-) create mode 100644 arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts create mode 100644 arch/arm/boot/dts/suniv-f1c100s.dtsi create mode 100644 arch/arm/mach-sunxi/sunxi_v5.c create mode 100644 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c create mode 100644 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h create mode 100644 drivers/pinctrl/sunxi/pinctrl-suniv-f1c100s.c create mode 100644 include/dt-bindings/clock/suniv-ccu-f1c100s.h create mode 100644 include/dt-bindings/reset/suniv-ccu-f1c100s.h
Signature · 1 line
2.7.4
RFC PATCH v2 1/14 ARM: add CONFIG_ARCH_SUNXI_V7 for differentiate ARMv5/v7 Allwinner SoCs
Allwinner also has some ARMv5 SoCs.
In order to add support for them, add a CONFIG_ARCH_SUNXI_V7 bool config which is selected when a ARMv7 soc is selected, and make CONFIG_ARCH_SUNXI a common option which is selected by both V7 and V5 sunxi option.
--- arch/arm/mach-sunxi/Kconfig | 25 +++++++++++++++++-------- arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-)
arch/arm/mach-sunxi/Kconfig +17 -8
@@ -6,31 +6,38 @@ menuconfig ARCH_SUNXI select GENERIC_IRQ_CHIP select GPIOLIB select PINCTRL - select PM_OPP - select SUN4I_TIMER select RESET_CONTROLLER + help + Support for Allwinner ARM-based family of processors if ARCH_SUNXI +if ARCH_MULTI_V7 + +config ARCH_SUNXI_V7 + bool + select PM_OPP + select SUN4I_TIMER + config MACH_SUN4I bool "Allwinner A10 (sun4i) SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7 config MACH_SUN5I bool "Allwinner A10s / A13 (sun5i) SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7 select SUN5I_HSTIMER config MACH_SUN6I bool "Allwinner A31 (sun6i) SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7 select ARM_GIC select MFD_SUN6I_PRCM select SUN5I_HSTIMER config MACH_SUN7I bool "Allwinner A20 (sun7i) SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7 select ARM_GIC select ARM_PSCI select ARCH_SUPPORTS_BIG_ENDIAN
@@ -39,13 +46,13 @@ config MACH_SUN7I config MACH_SUN8I bool "Allwinner sun8i Family SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7 select ARM_GIC select MFD_SUN6I_PRCM config MACH_SUN9I bool "Allwinner (sun9i) SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7 select ARM_GIC config ARCH_SUNXI_MC_SMP
@@ -56,3 +63,5 @@ config ARCH_SUNXI_MC_SMP select ARM_CPU_SUSPEND endif + +endif
arch/arm/mach-sunxi/Makefile +1 -1
@@ -1,5 +1,5 @@ CFLAGS_mc_smp.o += -march=armv7-a -obj-$(CONFIG_ARCH_SUNXI) += sunxi.o +obj-$(CONFIG_ARCH_SUNXI_V7) += sunxi.o obj-$(CONFIG_ARCH_SUNXI_MC_SMP) += mc_smp.o headsmp.o obj-$(CONFIG_SMP) += platsmp.o
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 01/14] ARM: add CONFIG_ARCH_SUNXI_V7 for differentiate ARMv5/v7 Allwinner SoCs
Hi,
Quoted 8 lines · Mesih Kilinc
Allwinner also has some ARMv5 SoCs.
In order to add support for them, add a
CONFIG_ARCH_SUNXI_V7bool config which is selected when a ARMv7 soc is selected, and makeCONFIG_ARCH_SUNXIa common option which is selected by both V7 and V5 sunxi option.Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Mesih Kilinc <[email protected]>
I'm not sure why Icenowy has her SoB here?
Quoted 22 lines
--- arch/arm/mach-sunxi/Kconfig | 25 +++++++++++++++++-------- arch/arm/mach-sunxi/Makefile | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-)arch/arm/mach-sunxi/Kconfig +3
-2@@ -6,31 +6,38 @@ menuconfig ARCH_SUNXI select GENERIC_IRQ_CHIP select GPIOLIB select PINCTRL - select PM_OPP - select SUN4I_TIMER select RESET_CONTROLLER + help + Support for Allwinner ARM-based family of processors if ARCH_SUNXI +if ARCH_MULTI_V7
arch/arm/mach-sunxi/Kconfig menuconfig ARCH_SUNXI · line 24
Quoted 10 lines
arch/arm/mach-sunxi/Kconfig +7
-1+ +config ARCH_SUNXI_V7 + bool + select PM_OPP + select SUN4I_TIMER + config MACH_SUN4I bool "Allwinner A10 (sun4i) SoCs support" - default ARCH_SUNXI + select ARCH_SUNXI_V7
It changes the behaviour a bit. It used to be enabled by default, it doesn't anymore.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/c4cd052e/attachment-0001.sig>
RFC PATCH v2 2/14 dt-bindings: arm: Add new Allwinner ARMv5 F1C100s SoC
In reply to Mesih KilincAdd new Allwinner ARMv5 F1C100s SoC's compatible string
--- Documentation/devicetree/bindings/arm/sunxi.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/sunxi.txt +1 -0
@@ -3,6 +3,7 @@ Allwinner sunXi Platforms Device Tree Bindings Each device tree must specify which Allwinner SoC it uses, using one of the following compatible strings: + allwinner,suniv-f1c100s allwinner,sun4i-a10 allwinner,sun5i-a10s allwinner,sun5i-a13
Signature · 1 line
2.7.4
RFC PATCH v2 3/14 ARM: sunxi: add Allwinner ARMv5 SoCs
In reply to Mesih KilincAdd option for Allwinner ARMv5 SoCs and SoC F1C100s (which has a die used for many new F-series products, including F1C100A, F1C100s, F1C200s, F1C500, F1C600).
--- arch/arm/mach-sunxi/Kconfig | 14 +++++++++++++- arch/arm/mach-sunxi/Makefile | 1 + arch/arm/mach-sunxi/sunxi_v5.c | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-sunxi/sunxi_v5.c
arch/arm/mach-sunxi/Kconfig +13 -1
@@ -1,6 +1,6 @@ menuconfig ARCH_SUNXI bool "Allwinner SoCs" - depends on ARCH_MULTI_V7 + depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select CLKSRC_MMIO select GENERIC_IRQ_CHIP
@@ -64,4 +64,16 @@ config ARCH_SUNXI_MC_SMP endif +if ARCH_MULTI_V5 + +config ARCH_SUNXI_V5 + bool + select SUN4I_TIMER + +config MACH_SUNIV + bool "Allwinner new F-series (suniv) SoCs support" + select ARCH_SUNXI_V5 + +endif + endif
arch/arm/mach-sunxi/Makefile +1 -0
@@ -1,5 +1,6 @@ CFLAGS_mc_smp.o += -march=armv7-a obj-$(CONFIG_ARCH_SUNXI_V7) += sunxi.o +obj-$(CONFIG_ARCH_SUNXI_V5) += sunxi_v5.o obj-$(CONFIG_ARCH_SUNXI_MC_SMP) += mc_smp.o headsmp.o obj-$(CONFIG_SMP) += platsmp.o
arch/arm/mach-sunxi/sunxi_v5.c new file +22 -0
@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Device Tree support for Allwinner F series SoCs +* +* Copyright (C) 2017 Icenowy Zheng <[email protected]> +* Copyright (C) 2018 Mesih Kilinc <[email protected]> +* +* This file is licensed under the terms of the GNU General Public +* License version 2. This program is licensed "as is" without any +* warranty of any kind, whether express or implied. +*/ + +#include <asm/mach/arch.h> + +static const char *const suniv_board_dt_compat[] = { +"allwinner,suniv-f1c100s" , +NULL , +}; + +DT_MACHINE_START (SUNXI_DT ,"Allwinner suniv Family" ) + .dt_compat = suniv_board_dt_compat, +MACHINE_END
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 03/14] ARM: sunxi: add Allwinner ARMv5 SoCs
Quoted 26 lines · Mesih Kilinc
Add option for Allwinner ARMv5 SoCs and SoC F1C100s (which has a die used for many new F-series products, including F1C100A, F1C100s, F1C200s, F1C500, F1C600).
Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Mesih Kilinc <[email protected]>--- arch/arm/mach-sunxi/Kconfig | 14 +++++++++++++- arch/arm/mach-sunxi/Makefile | 1 + arch/arm/mach-sunxi/sunxi_v5.c | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-sunxi/sunxi_v5.carch/arm/mach-sunxi/Kconfig +1
-1@@ -1,6 +1,6 @@ menuconfig ARCH_SUNXI bool "Allwinner SoCs" - depends on ARCH_MULTI_V7 + depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select CLKSRC_MMIO select GENERIC_IRQ_CHIP
arch/arm/mach-sunxi/Kconfig config ARCH_SUNXI_MC_SMP · line 71
Quoted 8 lines
arch/arm/mach-sunxi/Kconfig +5
-0@@ -64,4 +64,16 @@ config ARCH_SUNXI_MC_SMP endif +if ARCH_MULTI_V5 + +config ARCH_SUNXI_V5 + bool + select SUN4I_TIMER
If SUN4I_TIMER is needed both by the armv5 and armv7 cores, why did we need to move it out of ARCH_SUNXI?
arch/arm/mach-sunxi/Kconfig config ARCH_SUNXI_MC_SMP · line 74
Quoted 2 lines
arch/arm/mach-sunxi/Kconfig +2
-0+config MACH_SUNIV + bool "Allwinner new F-series (suniv) SoCs support"
I would drop the "new" here.
Quoted 14 lines
arch/arm/mach-sunxi/Kconfig +13
-0+++ b/arch/arm/mach-sunxi/sunxi_v5.c@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree support for Allwinner F series SoCs + * + * Copyright (C) 2017 Icenowy Zheng <[email protected]> + * Copyright (C) 2018 Mesih Kilinc <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +
arch/arm/mach-sunxi/Kconfig line 22
Quoted 10 lines
arch/arm/mach-sunxi/Kconfig +10
-0+#include <asm/mach/arch.h> + +static const char * const suniv_board_dt_compat[] = { + "allwinner,suniv-f1c100s", + NULL, +}; + +DT_MACHINE_START(SUNXI_DT, "Allwinner suniv Family") + .dt_compat = suniv_board_dt_compat, +MACHINE_END
Do we really need a separate file for that?
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/8fce95a1/attachment-0001.sig>
Re: [RFC PATCH v2 03/14] ARM: sunxi: add Allwinner ARMv5 SoCs
于 2018年11月20日 GMT+08:00 下午4:42:45, Maxime Ripard <[email protected]> 写到:
Quoted 41 lines · Mesih Kilinc
Quoted 2 lines
Add option for Allwinner ARMv5 SoCs and SoC F1C100s (which has a die used for many new F-series products, including F1C100A, F1C100s,
F1C200s,
Quoted 4 lines
F1C500, F1C600).
Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Mesih Kilinc <[email protected]>Review
Quoted 8 lines
--- arch/arm/mach-sunxi/Kconfig | 14 +++++++++++++- arch/arm/mach-sunxi/Makefile | 1 + arch/arm/mach-sunxi/sunxi_v5.c | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 arch/arm/mach-sunxi/sunxi_v5.c(quoted diff) +0
-0b/arch/arm/mach-sunxi/Kconfig
Quoted 12 lines
index 5db17ec..066644c 100644
arch/arm/mach-sunxi/Kconfig +1
-1@@ -1,6 +1,6 @@ menuconfig ARCH_SUNXI bool "Allwinner SoCs" - depends on ARCH_MULTI_V7 + depends on ARCH_MULTI_V5 || ARCH_MULTI_V7 select ARCH_HAS_RESET_CONTROLLER select CLKSRC_MMIO select GENERIC_IRQ_CHIParch/arm/mach-sunxi/Kconfig config ARCH_SUNXI_MC_SMP · line 71
Quoted 8 lines
arch/arm/mach-sunxi/Kconfig +5
-0@@ -64,4 +64,16 @@ config ARCH_SUNXI_MC_SMP endif +if ARCH_MULTI_V5 + +config ARCH_SUNXI_V5 + bool + select SUN4I_TIMERIf
SUN4I_TIMERis needed both by the armv5 and armv7 cores, why did we need to move it out ofARCH_SUNXI?
Quoted 4 lines
arch/arm/mach-sunxi/Kconfig config ARCH_SUNXI_MC_SMP · line 74
Quoted 2 lines
arch/arm/mach-sunxi/Kconfig +2
-0+config MACH_SUNIV + bool "Allwinner new F-series (suniv) SoCs support"I would drop the "new" here.
Sorry, but old F-series SoCs are not suniv. They are sunii or sun3i.
Quoted 29 lines
Quoted 15 lines
arch/arm/mach-sunxi/Kconfig +13
-0+++ b/arch/arm/mach-sunxi/sunxi_v5.c@@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree support for Allwinner F series SoCs + * + * Copyright (C) 2017 Icenowy Zheng <[email protected]> + * Copyright (C) 2018 Mesih Kilinc <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +arch/arm/mach-sunxi/Kconfig line 22
Quoted 10 lines
arch/arm/mach-sunxi/Kconfig +10
-0+#include <asm/mach/arch.h> + +static const char * const suniv_board_dt_compat[] = { + "allwinner,suniv-f1c100s", + NULL, +}; + +DT_MACHINE_START(SUNXI_DT, "Allwinner suniv Family") + .dt_compat = suniv_board_dt_compat, +MACHINE_ENDDo we really need a separate file for that?
Maxime
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
RFC PATCH v2 4/14 dt-bindings: interrupt-controller: Add suniv interrupt-controller
In reply to Mesih KilincAdd compatible string for Alwinner suniv F1C100s SoC interrupt controller which is stripped version of sun4i
--- .../devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +4 -1
@@ -2,7 +2,10 @@ Allwinner Sunxi Interrupt Controller Required properties: -- compatible : should be "allwinner,sun4i-a10-ic" +- compatible: should be "allwinner,<soc-familiy>-<soc-name>-ic" to identify + Allwinner IRQ chip such as: + "allwinner,sun4i-a10-ic" + "allwinner,suniv-f1c100s-ic" - reg : Specifies base physical address and size of the registers. - interrupt-controller : Identifies the node as an interrupt controller - #interrupt-cells : Specifies the number of cells needed to encode an
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 04/14] dt-bindings: interrupt-controller: Add suniv interrupt-controller
Hi,
Quoted 13 lines · Mesih Kilinc
Add compatible string for Alwinner suniv F1C100s SoC interrupt controller which is stripped version of sun4i
Signed-off-by Mesih Kilinc <[email protected]>--- .../devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +0
-0
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt Allwinner Sunxi Interrupt Controller · line 5
Quoted 5 lines
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +1
-1@@ -2,7 +2,10 @@ Allwinner Sunxi Interrupt Controller Required properties: -- compatible : should be "allwinner,sun4i-a10-ic" +- compatible: should be "allwinner,<soc-familiy>-<soc-name>-ic" to identify
There's no need to define the pattern, just list the compatibles supported. Otherwise, you give the idea that all the combinations are supported, and they aren't.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/e7506352/attachment-0001.sig>
RFC PATCH v2 5/14 irqchip/sun4i: add support for suniv interrupt controller
In reply to Mesih KilincThe new F-series SoCs (suniv) from Allwinner use an stripped version of the interrupt controller in A10/A13.
Add support for it in irq-sun4i driver.
--- drivers/irqchip/irq-sun4i.c | 47 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-)
drivers/irqchip/irq-sun4i.c +42 -5
@@ -23,13 +23,26 @@#include <asm/exception.h> +enum sun4i_irq_type { + sun4i_ic, + suniv_ic +}; + +static enum sun4i_irq_type sun4i_irq_type; +static int sun4i_irq_enable_reg_offset; +static int sun4i_irq_mask_reg_offset; +#define SUN4I_IRQ_VECTOR_REG 0x00#define SUN4I_IRQ_PROTECTION_REG 0x08#define SUN4I_IRQ_NMI_CTRL_REG 0x0c#define SUN4I_IRQ_PENDING_REG (x) (0x10 + 0x4 * x)#define SUN4I_IRQ_FIQ_PENDING_REG (x) (0x20 + 0x4 * x) -#define SUN4I_IRQ_ENABLE_REG (x) (0x40 + 0x4 * x) -#define SUN4I_IRQ_MASK_REG (x) (0x50 + 0x4 * x) +#define SUN4I_IRQ_ENABLE_REG_OFFSET 0x40 +#define SUN4I_IRQ_MASK_REG_OFFSET 0x50 +#define SUNIV_IRQ_ENABLE_REG_OFFSET 0x20 +#define SUNIV_IRQ_MASK_REG_OFFSET 0x30 +#define SUN4I_IRQ_ENABLE_REG (x) (sun4i_irq_enable_reg_offset + 0x4 * x) +#define SUN4I_IRQ_MASK_REG (x) (sun4i_irq_mask_reg_offset + 0x4 * x)static void __iomem *sun4i_irq_base;static struct irq_domain *sun4i_irq_domain;
@@ -115,8 +128,9 @@ static int __init sun4i_of_init(struct device_node *node,writel (0xffffffff , sun4i_irq_base +SUN4I_IRQ_PENDING_REG (1 ));writel (0xffffffff , sun4i_irq_base +SUN4I_IRQ_PENDING_REG (2 )); -/* Enable protection mode */ -writel (0x01 , sun4i_irq_base +SUN4I_IRQ_PROTECTION_REG ); +/* Enable protection mode (not available in suniv) */ +if (sun4i_irq_type == sun4i_ic) +writel (0x01 , sun4i_irq_base +SUN4I_IRQ_PROTECTION_REG );/* Configure the external interrupt source type */ writel (0x00 , sun4i_irq_base +SUN4I_IRQ_NMI_CTRL_REG );
@@ -130,7 +144,30 @@ static int __init sun4i_of_init(struct device_node *node,return 0 ; } -IRQCHIP_DECLARE (allwinner_sun4i_ic,"allwinner,sun4i-a10-ic" , sun4i_of_init); + +static int __init sun4i_ic_of_init (struct device_node *node, +struct device_node *parent) +{ + sun4i_irq_type = sun4i_ic; + sun4i_irq_enable_reg_offset =SUN4I_IRQ_ENABLE_REG_OFFSET ; + sun4i_irq_mask_reg_offset =SUN4I_IRQ_MASK_REG_OFFSET ; +sun4i_of_init (node, parent); + +return 0 ; +} +IRQCHIP_DECLARE (allwinner_sun4i_ic,"allwinner,sun4i-a10-ic" , sun4i_ic_of_init); + +static int __init suniv_ic_of_init (struct device_node *node, +struct device_node *parent) +{ + sun4i_irq_type = suniv_ic; + sun4i_irq_enable_reg_offset =SUNIV_IRQ_ENABLE_REG_OFFSET ; + sun4i_irq_mask_reg_offset =SUNIV_IRQ_MASK_REG_OFFSET ; +sun4i_of_init (node, parent); + +return 0 ; +} +IRQCHIP_DECLARE (allwinner_suniv_ic,"allwinner,suniv-f1c100s-ic" , suniv_ic_of_init); static void __exception_irq_entry sun4i_handle_irq(struct pt_regs *regs) {
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 05/14] irqchip/sun4i: add support for suniv interrupt controller
Hi,
Quoted 16 lines · Mesih Kilinc
The new F-series SoCs (suniv) from Allwinner use an stripped version of the interrupt controller in A10/A13.
Add support for it in irq-sun4i driver.
Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Mesih Kilinc <[email protected]>--- drivers/irqchip/irq-sun4i.c | 47 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-)drivers/irqchip/irq-sun4i.c +0
-0
drivers/irqchip/irq-sun4i.c line 31
Quoted 9 lines
drivers/irqchip/irq-sun4i.c +6
-0@@ -23,13 +23,26 @@#include <asm/exception.h> +enum sun4i_irq_type { + sun4i_ic, + suniv_ic +}; + +static enum sun4i_irq_type sun4i_irq_type;
You don't really need that type. It's completely redundant with the compatible.
drivers/irqchip/irq-sun4i.c line 33
Quoted 2 lines
drivers/irqchip/irq-sun4i.c +2
-0+static int sun4i_irq_enable_reg_offset; +static int sun4i_irq_mask_reg_offset;
Ideally, this should be a structure so that we can easily extend it without adding more and more global variables. And the type shouldn't be signed.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/f43113d5/attachment-0001.sig>
RFC PATCH v2 6/14 dt-bindings: timer: Add Allwinner suniv timer
In reply to Mesih KilincAdd compatible string for Allwinner suniv timer which is similar to sun4i timer.
--- Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +4 -1
@@ -2,7 +2,10 @@ Allwinner A1X SoCs Timer Controller Required properties: -- compatible : should be "allwinner,sun4i-a10-timer" +- compatible: should be "allwinner,<soc-familiy>-<soc-name>-timer" to identify + Allwinner SoCs timer such as: + "allwinner,sun4i-a10-timer" + "allwinner,suniv-f1c100s-timer" - reg : Specifies base physical address and size of the registers. - interrupts : The interrupt of the first timer - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
Signature · 1 line
2.7.4
RFC PATCH v2 7/14 clocksource: sun4i: add a compatible for suniv
In reply to Mesih KilincThe suniv (new F-series) chip has a timer with less functionality than the A10 timer, e.g. it has only 3 channels.
Add a new compatible for it. As we didn't use the extra channels on A10 either now, the code needn't to be changed.
--- drivers/clocksource/sun4i_timer.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/clocksource/sun4i_timer.c +2 -0
@@ -218,3 +218,5 @@ static int __init sun4i_timer_init(struct device_node *node) }TIMER_OF_DECLARE (sun4i,"allwinner,sun4i-a10-timer" , sun4i_timer_init); +TIMER_OF_DECLARE (suniv,"allwinner,suniv-f1c100s-timer" , + sun4i_timer_init);
Signature · 1 line
2.7.4
RFC PATCH v2 8/14 clocksource/drivers/sun4i: register as sched_clock on suniv
In reply to Mesih KilincThe suniv chip (newer F-series Allwinner SoCs) is based on ARM926EJ-S CPU, thus it has no architecture timer.
Register sun4i_timer as sched_clock on it.
--- drivers/clocksource/sun4i_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/sun4i_timer.c +2 -1
@@ -186,7 +186,8 @@ static int __init sun4i_timer_init(struct device_node *node)*/ if (of_machine_is_compatible ("allwinner,sun4i-a10" ) ||of_machine_is_compatible ("allwinner,sun5i-a13" ) || -of_machine_is_compatible ("allwinner,sun5i-a10s" )) +of_machine_is_compatible ("allwinner,sun5i-a10s" ) || +of_machine_is_compatible ("allwinner,suniv-f1c100s" ))sched_clock_register (sun4i_timer_sched_read,32 ,timer_of_rate (&to));
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 08/14] clocksource/drivers/sun4i: register as sched_clock on suniv
Quoted 7 lines · Mesih Kilinc
The suniv chip (newer F-series Allwinner SoCs) is based on ARM926EJ-S CPU, thus it has no architecture timer.
Register
sun4i_timerassched_clockon it.Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Mesih Kilinc <[email protected]>
This one should be squashed in the previous patch.
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/b3c20907/attachment-0001.sig>
RFC PATCH v2 9/14 dt-bindings: pinctrl: Add Allwinner suniv F1C100s pinctrl
In reply to Mesih KilincAdd compatible string for Allwinner suniv F1C100s SoC's pinctrl.
--- Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +1 -0
@@ -7,6 +7,7 @@ the pins includes drive strength and pull-up. Required properties: - compatible: Should be one of the following (depending on your SoC): + "allwinner,suniv-f1c100s-pinctrl" "allwinner,sun4i-a10-pinctrl" "allwinner,sun5i-a10s-pinctrl" "allwinner,sun5i-a13-pinctrl"
Signature · 1 line
2.7.4
RFC PATCH v2 10/14 pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)
In reply to Mesih KilincThe suniv F1C100s chip (several new F-series SoCs) of Allwinner has a pin
controller like other SoCs from Allwinner.
Add support for it.
--- drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-suniv-f1c100s.c | 417 ++++++++++++++++++++++++++ 3 files changed, 422 insertions(+) create mode 100644 drivers/pinctrl/sunxi/pinctrl-suniv-f1c100s.c
drivers/pinctrl/sunxi/Kconfig +4 -0
@@ -6,6 +6,10 @@ config PINCTRL_SUNXI select GENERIC_PINCONF select GPIOLIB +config PINCTRL_SUNIV_F1C100S + def_bool MACH_SUNIV + select PINCTRL_SUNXI + config PINCTRL_SUN4I_A10 def_bool MACH_SUN4I || MACH_SUN7I || MACH_SUN8I select PINCTRL_SUNXI
drivers/pinctrl/sunxi/Makefile +1 -0
@@ -3,6 +3,7 @@ obj-y += pinctrl-sunxi.o # SoC Drivers +obj-$(CONFIG_PINCTRL_SUNIV_F1C100S) += pinctrl-suniv-f1c100s.o obj-$(CONFIG_PINCTRL_SUN4I_A10) += pinctrl-sun4i-a10.o obj-$(CONFIG_PINCTRL_SUN5I) += pinctrl-sun5i.o obj-$(CONFIG_PINCTRL_SUN6I_A31) += pinctrl-sun6i-a31.o
drivers/pinctrl/sunxi/pinctrl-suniv-f1c100s.c new file +417 -0
417 lines not on this page · raw message
Signature · 1 line
2.7.4
RFC PATCH v2 11/14 dt-bindings: clock: Add Allwinner suniv F1C100s CCU
In reply to Mesih KilincAdd compatiple string for Allwinner suniv F1C100s CCU. Add clock and reset definitions.
--- .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + include/dt-bindings/clock/suniv-ccu-f1c100s.h | 69 ++++++++++++++++++++++ include/dt-bindings/reset/suniv-ccu-f1c100s.h | 37 ++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 include/dt-bindings/clock/suniv-ccu-f1c100s.h create mode 100644 include/dt-bindings/reset/suniv-ccu-f1c100s.h
Documentation/devicetree/bindings/clock/sunxi-ccu.txt +1 -0
@@ -3,6 +3,7 @@ Allwinner Clock Control Unit Binding Required properties : - compatible: must contain one of the following compatibles: + - "allwinner,suniv-f1c100s-ccu" - "allwinner,sun4i-a10-ccu" - "allwinner,sun5i-a10s-ccu" - "allwinner,sun5i-a13-ccu"
include/dt-bindings/clock/suniv-ccu-f1c100s.h new file +69 -0
69 lines not on this page · raw message
include/dt-bindings/reset/suniv-ccu-f1c100s.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright (C) 2018 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: (GPL-2.0+ OR MIT) +*/ + +#ifndef _DT_BINDINGS_RST_SUNIV_F1C100S_H_ +#define _DT_BINDINGS_RST_SUNIV_F1C100S_H_ + +#define RST_USB_PHY0 0 +#define RST_BUS_MMC0 1 +#define RST_BUS_MMC1 2 +#define RST_BUS_DRAM 3 +#define RST_BUS_SPI0 4 +#define RST_BUS_SPI1 5 +#define RST_BUS_OTG 6 +#define RST_BUS_VE 7 +#define RST_BUS_LCD 8 +#define RST_BUS_DEINTERLACE 9 +#define RST_BUS_CSI 10 +#define RST_BUS_TVD 11 +#define RST_BUS_TVE 12 +#define RST_BUS_DE_BE 13 +#define RST_BUS_DE_FE 14 +#define RST_BUS_CODEC 15 +#define RST_BUS_SPDIF 16 +#define RST_BUS_IR 17 +#define RST_BUS_RSB 18 +#define RST_BUS_I2S0 19 +#define RST_BUS_I2C0 20 +#define RST_BUS_I2C1 21 +#define RST_BUS_I2C2 22 +#define RST_BUS_UART0 23 +#define RST_BUS_UART1 24 +#define RST_BUS_UART2 25 + +#endif /* _DT_BINDINGS_RST_SUNIV_F1C100S_H_ */
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 11/14] dt-bindings: clock: Add Allwinner suniv F1C100s CCU
Quoted 17 lines · Mesih Kilinc
Add compatiple string for Allwinner suniv F1C100s CCU. Add clock and reset definitions.
Signed-off-by Mesih Kilinc <[email protected]>--- .../devicetree/bindings/clock/sunxi-ccu.txt | 1 + include/dt-bindings/clock/suniv-ccu-f1c100s.h | 69 ++++++++++++++++++++++ include/dt-bindings/reset/suniv-ccu-f1c100s.h | 37 ++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 include/dt-bindings/clock/suniv-ccu-f1c100s.h create mode 100644 include/dt-bindings/reset/suniv-ccu-f1c100s.hDocumentation/devicetree/bindings/clock/sunxi-ccu.txt +0
-0
Documentation/devicetree/bindings/clock/sunxi-ccu.txt Allwinner Clock Control Unit Binding · line 6
Quoted 4 lines
Documentation/devicetree/bindings/clock/sunxi-ccu.txt +1
-0@@ -3,6 +3,7 @@ Allwinner Clock Control Unit Binding Required properties : - compatible: must contain one of the following compatibles: + - "allwinner,suniv-f1c100s-ccu"
Letters come after the numbers in alphabetical order, so that should be moved at the end of that list (and you have that issue in a couple of other patches).
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/76b489e1/attachment.sig>
RFC PATCH v2 12/14 clk: sunxi-ng: add support for suniv F1C100s SoC
In reply to Mesih KilincThe suniv F1C100s SoC (the chip in some new F-series products of Allwinner)
has a CCU which seems to be a stripped version of the CCU in SoCs after sun6i.
Add support for the CCU.
--- drivers/clk/sunxi-ng/Kconfig | 5 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c | 536 +++++++++++++++++++++++++++++++ drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h | 34 ++ 4 files changed, 576 insertions(+) create mode 100644 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c create mode 100644 drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h
drivers/clk/sunxi-ng/Kconfig +5 -0
@@ -6,6 +6,11 @@ config SUNXI_CCU if SUNXI_CCU +config SUNIV_F1C100S_CCU + bool "Support for the Allwinner newer F1C100s CCU" + default MACH_SUNIV + depends on MACH_SUNIV || COMPILE_TEST + config SUN50I_A64_CCU bool "Support for the Allwinner A64 CCU" default ARM64 && ARCH_SUNXI
drivers/clk/sunxi-ng/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-y += ccu_nm.o obj-y += ccu_mp.o # SoC support +obj-$(CONFIG_SUNIV_F1C100S_CCU) += ccu-suniv-f1c100s.o obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o obj-$(CONFIG_SUN50I_H6_CCU) += ccu-sun50i-h6.o obj-$(CONFIG_SUN50I_H6_R_CCU) += ccu-sun50i-h6-r.o
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c new file +536 -0
536 lines not on this page · raw message
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright 2017 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _CCU_SUNIV_F1C100S_H_ +#define _CCU_SUNIV_F1C100S_H_ + +#include <dt-bindings/clock/suniv-ccu-f1c100s.h> +#include <dt-bindings/reset/suniv-ccu-f1c100s.h> + +#define CLK_PLL_CPU 0 +#define CLK_PLL_AUDIO_BASE 1 +#define CLK_PLL_AUDIO 2 +#define CLK_PLL_AUDIO_2X 3 +#define CLK_PLL_AUDIO_4X 4 +#define CLK_PLL_AUDIO_8X 5 +#define CLK_PLL_VIDEO 6 +#define CLK_PLL_VIDEO_2X 7 +#define CLK_PLL_VE 8 +#define CLK_PLL_DDR0 9 +#define CLK_PLL_PERIPH 10 + +/* CPU clock is exported */ + +#define CLK_AHB 12 +#define CLK_APB 13 + +/* All bus gates, DRAM gates and mod clocks are exported */ + +#define CLK_NUMBER (CLK_AVS + 1) + +#endif /* _CCU_SUNIV_F1C100S_H_ */
Signature · 1 line
2.7.4
RFC PATCH v2 13/14 ARM: dts: suniv: add initial DTSI file for F1C100s
In reply to Mesih KilincF1C100s is one product with the suniv die, which has a 32MiB co-packaged DDR1 DRAM chip. As we have the support for suniv pin controller and CCU now, add a initial DTSI for it.
--- arch/arm/boot/dts/suniv-f1c100s.dtsi | 158 +++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 arch/arm/boot/dts/suniv-f1c100s.dtsi
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +158 -0
@@ -0,0 +1,158 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2018 Icenowy Zheng <[email protected]> + * Copyright 2018 Mesih Kilinc <[email protected]> + */ + +#include <dt-bindings/clock/suniv-ccu-f1c100s.h> +#include <dt-bindings/reset/suniv-ccu-f1c100s.h> + +/ { + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc24M: clk-24M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "osc24M"; + }; + + osc32k: clk-32k { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + fake100M: clk-100M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <100000000>; + clock-output-names = "fake-100M"; + }; + }; + + cpus { + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; + }; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + sram-controller at 1c00000 { + compatible = "allwinner,sun4i-a10-sram-controller"; + reg = <0x01c00000 0x30>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + sram_d: sram at 10000 { + compatible = "mmio-sram"; + reg = <0x00010000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x00010000 0x1000>; + + otg_sram: sram-section at 0 { + compatible = "allwinner,sun4i-a10-sram-d"; + reg = <0x0000 0x1000>; + status = "disabled"; + }; + }; + }; + + ccu: clock at 1c20000 { + compatible = "allwinner,suniv-f1c100s-ccu"; + reg = <0x01c20000 0x400>; + clocks = <&osc24M>, <&osc32k>; + clock-names = "hosc", "losc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + intc: interrupt-controller at 1c20400 { + compatible = "allwinner,suniv-f1c100s-ic"; + reg = <0x01c20400 0x400>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + pio: pinctrl at 1c20800 { + compatible = "allwinner,suniv-f1c100s-pinctrl"; + reg = <0x01c20800 0x400>; + interrupts = <38>, <39>, <40>; + clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>; + clock-names = "apb", "hosc", "losc"; + gpio-controller; + interrupt-controller; + #interrupt-cells = <3>; + #gpio-cells = <3>; + + uart0_pins_a: uart-pins-pe { + pins = "PE0", "PE1"; + function = "uart0"; + }; + }; + + timer at 1c20c00 { + compatible = "allwinner,suniv-f1c100s-timer"; + reg = <0x01c20c00 0x90>; + interrupts = <13>; + clocks = <&osc24M>; + }; + + wdt: watchdog at 1c20ca0 { + compatible = "allwinner,sun6i-a31-wdt"; + reg = <0x01c20ca0 0x20>; + }; + + uart0: serial at 1c25000 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c25000 0x400>; + interrupts = <1>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART0>; + resets = <&ccu RST_BUS_UART0>; + status = "disabled"; + }; + + uart1: serial at 1c25400 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c25400 0x400>; + interrupts = <2>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART1>; + resets = <&ccu RST_BUS_UART1>; + status = "disabled"; + }; + + uart2: serial at 1c25800 { + compatible = "snps,dw-apb-uart"; + reg = <0x01c25800 0x400>; + interrupts = <3>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&ccu CLK_BUS_UART2>; + resets = <&ccu RST_BUS_UART2>; + status = "disabled"; + }; + }; +};
Signature · 1 line
2.7.4
Re: [RFC PATCH v2 13/14] ARM: dts: suniv: add initial DTSI file for F1C100s
Quoted 46 lines · Mesih Kilinc
F1C100s is one product with the suniv die, which has a 32MiB co-packaged DDR1 DRAM chip. As we have the support for suniv pin controller and CCU now, add a initial DTSI for it.
Signed-off-by Icenowy Zheng <[email protected]>Signed-off-by Mesih Kilinc <[email protected]>--- arch/arm/boot/dts/suniv-f1c100s.dtsi | 158 +++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 arch/arm/boot/dts/suniv-f1c100s.dtsiarch/arm/boot/dts/suniv-f1c100s.dtsi new file +29
-0@@ -0,0 +1,158 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2018 Icenowy Zheng <[email protected]> + * Copyright 2018 Mesih Kilinc <[email protected]> + */ + +#include <dt-bindings/clock/suniv-ccu-f1c100s.h> +#include <dt-bindings/reset/suniv-ccu-f1c100s.h> + +/ { + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&intc>; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + osc24M: clk-24M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + clock-output-names = "osc24M"; + }; + + osc32k: clk-32k { + #clock-cells = <0>; + compatible = "fixed-clock";
arch/arm/boot/dts/suniv-f1c100s.dtsi line 39
Quoted 10 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +10
-0+ clock-frequency = <32768>; + clock-output-names = "osc32k"; + }; + + fake100M: clk-100M { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <100000000>; + clock-output-names = "fake-100M"; + };
Why do you need that fake clock?
Quoted 10 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +10
-0+ }; + + cpus { + #address-cells = <0>; + #size-cells = <0>; + + cpu { + compatible = "arm,arm926ej-s"; + device_type = "cpu"; + };
arch/arm/boot/dts/suniv-f1c100s.dtsi line 59
Quoted 10 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +10
-0+ }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + sram-controller at 1c00000 { + compatible = "allwinner,sun4i-a10-sram-controller";
You should have a compatible for that SoC there (possibly keeping the A10 compatible if that makes sense).
Quoted 4 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +4
-0+ reg = <0x01c00000 0x30>; + #address-cells = <1>; + #size-cells = <1>; + ranges;
arch/arm/boot/dts/suniv-f1c100s.dtsi line 73
Quoted 10 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +10
-0+ + sram_d: sram at 10000 { + compatible = "mmio-sram"; + reg = <0x00010000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x00010000 0x1000>; + + otg_sram: sram-section at 0 { + compatible = "allwinner,sun4i-a10-sram-d";
Ditto
Quoted 38 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +38
-0+ reg = <0x0000 0x1000>; + status = "disabled"; + }; + }; + }; + + ccu: clock at 1c20000 { + compatible = "allwinner,suniv-f1c100s-ccu"; + reg = <0x01c20000 0x400>; + clocks = <&osc24M>, <&osc32k>; + clock-names = "hosc", "losc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; + + intc: interrupt-controller at 1c20400 { + compatible = "allwinner,suniv-f1c100s-ic"; + reg = <0x01c20400 0x400>; + interrupt-controller; + #interrupt-cells = <1>; + }; + + pio: pinctrl at 1c20800 { + compatible = "allwinner,suniv-f1c100s-pinctrl"; + reg = <0x01c20800 0x400>; + interrupts = <38>, <39>, <40>; + clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>; + clock-names = "apb", "hosc", "losc"; + gpio-controller; + interrupt-controller; + #interrupt-cells = <3>; + #gpio-cells = <3>; + + uart0_pins_a: uart-pins-pe { + pins = "PE0", "PE1"; + function = "uart0"; + }; + };
arch/arm/boot/dts/suniv-f1c100s.dtsi line 121
Quoted 10 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +10
-0+ + timer at 1c20c00 { + compatible = "allwinner,suniv-f1c100s-timer"; + reg = <0x01c20c00 0x90>; + interrupts = <13>; + clocks = <&osc24M>; + }; + + wdt: watchdog at 1c20ca0 { + compatible = "allwinner,sun6i-a31-wdt";
Ditto.
Thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/05545ac8/attachment-0001.sig>
RFC PATCH v2 14/14 ARM: suniv: f1c100s: add device tree for Lichee Pi Nano
In reply to Mesih KilincLichee Pi Nano is a F1C100s board by Lichee Pi.
Add initial device tree for it.
--- arch/arm/boot/dts/Makefile | 2 ++ arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts | 26 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
arch/arm/boot/dts/Makefile +2 -0
@@ -1066,6 +1066,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb +dtb-$(CONFIG_MACH_SUNIV) += \ + suniv-f1c100s-licheepi-nano.dtb dtb-$(CONFIG_ARCH_TANGO) += \ tango4-vantage-1172.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \
arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts new file +26 -0
@@ -0,0 +1,26 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR X11) +/* + * Copyright 2018 Icenowy Zheng <[email protected]> + */ + +/dts-v1/; +#include "suniv-f1c100s.dtsi" + +/ { + model = "Lichee Pi Nano"; + compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +};
Signature · 1 line
2.7.4
Hi,
Quoted 9 lines · Mesih Kilinc
This is the second version of RFC patchset for Allwinner ARMv5 F1C100s SoC. Icenowy (author of the initial patchset) allowed me to continue. For patch 1~3 which introduces first ARMv5 Allwinner SoC I looked freescale,imx configs and tried to organize patches better. Addressed comment from Maxime Ripard and added SoC name to compatibles and filenames.
Addressed comment from Rob Herring and added dt-bindings.This is my first patch. Sorry for any inconvenience :-)
Apart from the minor comments you'll find with each patches, you did great :)
Maxime
Signature · 10 lines
Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181120/26925267/attachment-0001.sig>