initial support for "suniv" Allwinner new ARM9 SoC
Subsystems (12)
v4 cover initial support for "suniv" Allwinner new ARM9 SoC
This is the fourth version of RFC patchset for Allwinner ARMv5 F1C100s SoC. Addressed comments from Maxime Ripard, added Acked-by signatures.
Changes since v3:
- Patch "ARM: Check ARCH_MULTI_V7 to differentiate ARMv5/v7 Allwinner SoCs"
- Remove CONFIG_ARCH_SUNXI_Vx. Use ARCH_MULTI_Vx to differentiate SoC's
- Change KConfig ARCH_SUNXI selection: 'select' to 'default'.
- Patch "irqchip/sun4i: Add a struct to hold global variables"
- Split irq_sun4i.c changes to 3 patch.
- Patch "pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)"
- pinctrl-suniv-f1c100s: remove: disable_strict_mode = true
- Patch "ARM: dts: suniv: add initial DTSI file for F1C100s"
- suniv-f1c100s.dtsi: remove unnecessary componenets.
- Instead of patching drivers, add original compatible string with
f1c100s compatibles.
- Add Acked-by signatures.
Changes since v2:
- Patch "ARM: sunxi: add Allwinner ARMv5 SoCs"
- Move SUN4I_TIMER option to ARCH_SUNXI
- Added help text for MACH_SUNIV
- Patch "irqchip/sun4i: add support for suniv interrupt controller"
- Defined sunxi_irq_chip_data struct and used it to differentiate registers between different chips.
- Patch " ARM: dts: suniv: add initial DTSI file for F1C100s"
- Removed unnecessary fake clock.
- Fixed compatible strings.
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
Thanks!
Mesih Kilinc (17):
ARM: Check ARCH_MULTI_V7 to 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 a struct to hold global variables irqchip/sun4i: Move IC specific register offsets to struct irqchip/sun4i: Add support for Allwinner ARMv5 F1C100s
dt-bindings: timer: Add Allwinner suniv timer
clocksource: sun4i: add a compatible for 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
dt-bindings: sram: Add Allwinner suniv F1C100s
dt-bindings: watchdog: Add Allwinner ARMv5 F1C100s wdt
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 | 4 +- .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 + .../devicetree/bindings/sram/sunxi-sram.txt | 4 + .../bindings/timer/allwinner,sun4i-timer.txt | 4 +- .../devicetree/bindings/watchdog/sunxi-wdt.txt | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts | 26 + arch/arm/boot/dts/suniv-f1c100s.dtsi | 147 ++++++ arch/arm/mach-sunxi/Kconfig | 19 +- arch/arm/mach-sunxi/sunxi.c | 10 + 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 | 106 ++-- drivers/pinctrl/sunxi/Kconfig | 4 + drivers/pinctrl/sunxi/Makefile | 1 + drivers/pinctrl/sunxi/pinctrl-suniv-f1c100s.c | 416 ++++++++++++++++ include/dt-bindings/clock/suniv-ccu-f1c100s.h | 69 +++ include/dt-bindings/reset/suniv-ccu-f1c100s.h | 37 ++ 23 files changed, 1401 insertions(+), 33 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 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 v4 1/17 ARM: Check ARCH_MULTI_V7 to differentiate ARMv5/v7 Allwinner SoCs
Allwinner also has some ARMv5 SoCs.
In order to add support for them, check ARM_MULTI_V7 before enabling ARMv7 SoC's. Add help text for ARCH_SUNXI menuconfig.
--- arch/arm/mach-sunxi/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-sunxi/Kconfig +6 -0
@@ -9,9 +9,13 @@ menuconfig ARCH_SUNXI 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 MACH_SUN4I bool "Allwinner A10 (sun4i) SoCs support" default ARCH_SUNXI
@@ -56,3 +60,5 @@ config ARCH_SUNXI_MC_SMP select ARM_CPU_SUSPEND endif + +endif
Signature · 1 line
2.7.4
RFC PATCH v4 2/17 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
@@ -18,4 +18,5 @@ using one of the following compatible strings: allwinner,sun8i-v3s allwinner,sun9i-a80 allwinner,sun50i-a64 + allwinner,suniv-f1c100s nextthing,gr8
Signature · 1 line
2.7.4
RFC PATCH v4 3/17 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 | 13 ++++++++++++- arch/arm/mach-sunxi/sunxi.c | 10 ++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)
arch/arm/mach-sunxi/Kconfig +12 -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
@@ -61,4 +61,15 @@ config ARCH_SUNXI_MC_SMP endif +if ARCH_MULTI_V5 + +config MACH_SUNIV + bool "Allwinner ARMv5 F-series (suniv) SoCs support" + default ARCH_SUNXI + help + Support for Allwinner suniv ARMv5 SoCs. + (F1C100A, F1C100s, F1C200s, F1C500, F1C600) + +endif + endif
arch/arm/mach-sunxi/sunxi.c +10 -0
@@ -101,3 +101,13 @@ static const char * const sun9i_board_dt_compat[] = {DT_MACHINE_START (SUN9I_DT ,"Allwinner sun9i Family" ) .dt_compat = sun9i_board_dt_compat, MACHINE_END + +static const char *const suniv_board_dt_compat[] = { +"allwinner,suniv-f1c100s" , +NULL , +}; + +DT_MACHINE_START (SUNIV_DT ,"Allwinner suniv Family" ) + .dt_compat = suniv_board_dt_compat, +MACHINE_END +
Signature · 1 line
2.7.4
RFC PATCH v4 4/17 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +3 -1
@@ -2,7 +2,9 @@ Allwinner Sunxi Interrupt Controller Required properties: -- compatible : should be "allwinner,sun4i-a10-ic" +- compatible : should be one of the following: + "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
RFC PATCH v4 5/17 irqchip/sun4i: Add a struct to hold global variables
In reply to Mesih KilincIn order to support different chips, IC specific data should be hold in a struct. This patch moves irq_base and irq_domain global variables to struct.
--- drivers/irqchip/irq-sun4i.c | 64 +++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 26 deletions(-)
drivers/irqchip/irq-sun4i.c +38 -26
@@ -31,8 +31,12 @@#define SUN4I_IRQ_ENABLE_REG (x) (0x40 + 0x4 * x)#define SUN4I_IRQ_MASK_REG (x) (0x50 + 0x4 * x) -static void __iomem *sun4i_irq_base; -static struct irq_domain *sun4i_irq_domain; +struct sun4i_irq_chip_data { +void __iomem *irq_base; +struct irq_domain *irq_domain; +}; + +static struct sun4i_irq_chip_data *irq_ic_data; static void __exception_irq_entry sun4i_handle_irq(struct pt_regs *regs);
@@ -43,7 +47,7 @@ static void sun4i_irq_ack(struct irq_data *irqd)if (irq !=0 )return ;/* Only IRQ 0 / the ENMI needs to be acked */ -writel (BIT (0 ), sun4i_irq_base +SUN4I_IRQ_PENDING_REG (0 )); +writel (BIT (0 ), irq_ic_data->irq_base +SUN4I_IRQ_PENDING_REG (0 )); }static void sun4i_irq_mask (struct irq_data *irqd)
@@ -53,9 +57,9 @@ static void sun4i_irq_mask(struct irq_data *irqd)int reg = irq /32 ;u32 val; - val =readl (sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + val =readl (irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg));writel (val & ~(1 << irq_off), - sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg)); }static void sun4i_irq_unmask (struct irq_data *irqd)
@@ -65,9 +69,9 @@ static void sun4i_irq_unmask(struct irq_data *irqd)int reg = irq /32 ;u32 val; - val =readl (sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + val =readl (irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg));writel (val | (1 << irq_off), - sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg)); }static struct irq_chip sun4i_irq_chip = {
@@ -95,35 +99,41 @@ static const struct irq_domain_ops sun4i_irq_ops = {static int __init sun4i_of_init (struct device_node *node,struct device_node *parent) { - sun4i_irq_base =of_iomap (node,0 ); -if (!sun4i_irq_base) + irq_ic_data =kzalloc (sizeof (struct sun4i_irq_chip_data ),GFP_KERNEL ); +if (!irq_ic_data) { +pr_err ("kzalloc failed!\n" ); +return -ENOMEM ; + } + + irq_ic_data->irq_base =of_iomap (node,0 ); +if (!irq_ic_data->irq_base)panic ("%pOF: unable to map IC registers\n" , node);/* Disable all interrupts */ -writel (0 , sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (0 )); -writel (0 , sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (1 )); -writel (0 , sun4i_irq_base +SUN4I_IRQ_ENABLE_REG (2 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (0 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (1 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (2 ));/* Unmask all the interrupts, ENABLE_REG(x) is used for masking */ -writel (0 , sun4i_irq_base +SUN4I_IRQ_MASK_REG (0 )); -writel (0 , sun4i_irq_base +SUN4I_IRQ_MASK_REG (1 )); -writel (0 , sun4i_irq_base +SUN4I_IRQ_MASK_REG (2 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (0 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (1 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (2 ));/* Clear all the pending interrupts */ -writel (0xffffffff , sun4i_irq_base +SUN4I_IRQ_PENDING_REG (0 )); -writel (0xffffffff , sun4i_irq_base +SUN4I_IRQ_PENDING_REG (1 )); -writel (0xffffffff , sun4i_irq_base +SUN4I_IRQ_PENDING_REG (2 )); +writel (0xffffffff , irq_ic_data->irq_base +SUN4I_IRQ_PENDING_REG (0 )); +writel (0xffffffff , irq_ic_data->irq_base +SUN4I_IRQ_PENDING_REG (1 )); +writel (0xffffffff , irq_ic_data->irq_base +SUN4I_IRQ_PENDING_REG (2 ));/* Enable protection mode */ -writel (0x01 , sun4i_irq_base +SUN4I_IRQ_PROTECTION_REG ); +writel (0x01 , irq_ic_data->irq_base +SUN4I_IRQ_PROTECTION_REG );/* Configure the external interrupt source type */ -writel (0x00 , sun4i_irq_base +SUN4I_IRQ_NMI_CTRL_REG ); +writel (0x00 , irq_ic_data->irq_base +SUN4I_IRQ_NMI_CTRL_REG ); - sun4i_irq_domain =irq_domain_add_linear (node,3 *32 , + irq_ic_data->irq_domain =irq_domain_add_linear (node,3 *32 , &sun4i_irq_ops,NULL ); -if (!sun4i_irq_domain) +if (!irq_ic_data->irq_domain)panic ("%pOF: unable to create IRQ domain\n" , node);set_handle_irq (sun4i_handle_irq);
@@ -146,13 +156,15 @@ static void __exception_irq_entry sun4i_handle_irq(struct pt_regs *regs)* the extra check in the common case of 1 hapening after having * read the vector-reg once. */ - hwirq =readl (sun4i_irq_base +SUN4I_IRQ_VECTOR_REG ) >>2 ; + hwirq =readl (irq_ic_data->irq_base +SUN4I_IRQ_VECTOR_REG ) >>2 ;if (hwirq ==0 && - !(readl (sun4i_irq_base +SUN4I_IRQ_PENDING_REG (0 )) &BIT (0 ))) + !(readl (irq_ic_data->irq_base +SUN4I_IRQ_PENDING_REG (0 )) & +BIT (0 )))return ;do { -handle_domain_irq (sun4i_irq_domain, hwirq, regs); - hwirq =readl (sun4i_irq_base +SUN4I_IRQ_VECTOR_REG ) >>2 ; +handle_domain_irq (irq_ic_data->irq_domain, hwirq, regs); + hwirq =readl (irq_ic_data->irq_base + +SUN4I_IRQ_VECTOR_REG ) >>2 ; }while (hwirq !=0 ); }
Signature · 1 line
2.7.4
RFC PATCH v4 6/17 irqchip/sun4i: Move IC specific register offsets to struct
In reply to Mesih KilincThis patch moves IC specific register offsets to sun4i_irq_chip_data struct in order to support different chips.
--- drivers/irqchip/irq-sun4i.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-)
drivers/irqchip/irq-sun4i.c +21 -12
@@ -28,12 +28,16 @@#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 (data, x) ((data)->enable_reg_offset + 0x4 * x) +#define SUN4I_IRQ_MASK_REG (data, x) ((data)->mask_reg_offset + 0x4 * x) +#define SUN4I_IRQ_ENABLE_REG_OFFSET 0x40 +#define SUN4I_IRQ_MASK_REG_OFFSET 0x50struct sun4i_irq_chip_data {void __iomem *irq_base;struct irq_domain *irq_domain; +u32 enable_reg_offset; +u32 mask_reg_offset; };static struct sun4i_irq_chip_data *irq_ic_data;
@@ -57,9 +61,10 @@ static void sun4i_irq_mask(struct irq_data *irqd)int reg = irq /32 ;u32 val; - val =readl (irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + val =readl (irq_ic_data->irq_base + +SUN4I_IRQ_ENABLE_REG (irq_ic_data, reg));writel (val & ~(1 << irq_off), - irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (irq_ic_data, reg)); }static void sun4i_irq_unmask (struct irq_data *irqd)
@@ -69,9 +74,10 @@ static void sun4i_irq_unmask(struct irq_data *irqd)int reg = irq /32 ;u32 val; - val =readl (irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + val =readl (irq_ic_data->irq_base + +SUN4I_IRQ_ENABLE_REG (irq_ic_data, reg));writel (val | (1 << irq_off), - irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (reg)); + irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (irq_ic_data, reg)); }static struct irq_chip sun4i_irq_chip = {
@@ -105,20 +111,23 @@ static int __init sun4i_of_init(struct device_node *node,return -ENOMEM ; } + irq_ic_data->enable_reg_offset =SUN4I_IRQ_ENABLE_REG_OFFSET ; + irq_ic_data->mask_reg_offset =SUN4I_IRQ_MASK_REG_OFFSET ; + irq_ic_data->irq_base =of_iomap (node,0 );if (!irq_ic_data->irq_base)panic ("%pOF: unable to map IC registers\n" , node);/* Disable all interrupts */ -writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (0 )); -writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (1 )); -writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (2 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (irq_ic_data,0 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (irq_ic_data,1 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_ENABLE_REG (irq_ic_data,2 ));/* Unmask all the interrupts, ENABLE_REG(x) is used for masking */ -writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (0 )); -writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (1 )); -writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (2 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (irq_ic_data,0 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (irq_ic_data,1 )); +writel (0 , irq_ic_data->irq_base +SUN4I_IRQ_MASK_REG (irq_ic_data,2 ));/* Clear all the pending interrupts */ writel (0xffffffff , irq_ic_data->irq_base +SUN4I_IRQ_PENDING_REG (0 ));
Signature · 1 line
2.7.4
RFC PATCH v4 7/17 irqchip/sun4i: Add support for Allwinner ARMv5 F1C100s
In reply to Mesih KilincThis patch adds support for suniv Allwinner ARMv5 F1C100s SoC which has stripped version of interrupt controller that found in A10/A13.
--- drivers/irqchip/irq-sun4i.c | 47 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-)
drivers/irqchip/irq-sun4i.c +37 -10
@@ -32,6 +32,8 @@#define SUN4I_IRQ_MASK_REG (data, x) ((data)->mask_reg_offset + 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 0x30struct sun4i_irq_chip_data {void __iomem *irq_base;
@@ -105,15 +107,6 @@ static const struct irq_domain_ops sun4i_irq_ops = {static int __init sun4i_of_init (struct device_node *node,struct device_node *parent) { - irq_ic_data =kzalloc (sizeof (struct sun4i_irq_chip_data ),GFP_KERNEL ); -if (!irq_ic_data) { -pr_err ("kzalloc failed!\n" ); -return -ENOMEM ; - } - - irq_ic_data->enable_reg_offset =SUN4I_IRQ_ENABLE_REG_OFFSET ; - irq_ic_data->mask_reg_offset =SUN4I_IRQ_MASK_REG_OFFSET ; - irq_ic_data->irq_base =of_iomap (node,0 );if (!irq_ic_data->irq_base) panic("%pOF: unable to map IC registers\n",
@@ -149,7 +142,41 @@ 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) +{ + irq_ic_data =kzalloc (sizeof (struct sun4i_irq_chip_data ),GFP_KERNEL ); +if (!irq_ic_data) { +pr_err ("kzalloc failed!\n" ); +return -ENOMEM ; + } + + irq_ic_data->enable_reg_offset =SUN4I_IRQ_ENABLE_REG_OFFSET ; + irq_ic_data->mask_reg_offset =SUN4I_IRQ_MASK_REG_OFFSET ; + +return sun4i_of_init (node, parent); +} + +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) +{ + irq_ic_data =kzalloc (sizeof (struct sun4i_irq_chip_data ),GFP_KERNEL ); +if (!irq_ic_data) { +pr_err ("kzalloc failed!\n" ); +return -ENOMEM ; + } + + irq_ic_data->enable_reg_offset =SUNIV_IRQ_ENABLE_REG_OFFSET ; + irq_ic_data->mask_reg_offset =SUNIV_IRQ_MASK_REG_OFFSET ; + +return sun4i_of_init (node, parent); +} + +IRQCHIP_DECLARE (allwinner_sunvi_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
RFC PATCH v4 8/17 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +3 -1
@@ -2,7 +2,9 @@ Allwinner A1X SoCs Timer Controller Required properties: -- compatible : should be "allwinner,sun4i-a10-timer" +- compatible : should be one of the following: + "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 v4 9/17 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.
The suniv chip 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/clocksource/sun4i_timer.c +4 -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));
@@ -218,3 +219,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 v4 10/17 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
@@ -29,6 +29,7 @@ Required properties: "allwinner,sun50i-h5-pinctrl" "allwinner,sun50i-h6-pinctrl" "allwinner,sun50i-h6-r-pinctrl" + "allwinner,suniv-f1c100s-pinctrl" "nextthing,gr8-pinctrl" - reg: Should contain the register physical address and length for the
Signature · 1 line
2.7.4
RFC PATCH v4 11/17 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 | 416 ++++++++++++++++++++++++++ 3 files changed, 421 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 +416 -0
416 lines not on this page · raw message
Signature · 1 line
2.7.4
RFC PATCH v4 12/17 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
@@ -22,6 +22,7 @@ Required properties : - "allwinner,sun50i-h5-ccu" - "allwinner,sun50i-h6-ccu" - "allwinner,sun50i-h6-r-ccu" + - "allwinner,suniv-f1c100s-ccu" - "nextthing,gr8-ccu" - reg: Must contain the registers base address and length
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
RFC PATCH v4 13/17 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 v4 14/17 dt-bindings: sram: Add Allwinner suniv F1C100s
In reply to Mesih KilincThe suniv ARMv5 F1C100s chip has similar sram controller to sun4i A10. Add compatible string for it.
--- Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/sram/sunxi-sram.txt +4 -0
@@ -19,6 +19,7 @@ Required properties: - "allwinner,sun50i-a64-sram-controller" (deprecated) - "allwinner,sun50i-a64-system-control" - "allwinner,sun50i-h6-system-control", "allwinner,sun50i-a64-system-control" + - "allwinner,suniv-f1c100s-system-control", "allwinner,sun4i-a10-system-control" - reg : sram controller register offset + length SRAM nodes
@@ -58,6 +59,9 @@ The valid sections compatible for A64 are: The valid sections compatible for H6 are: - allwinner,sun50i-h6-sram-c, allwinner,sun50i-a64-sram-c +The valid sections compatible for F1C100s are: + - allwinner,suniv-f1c100s-sram-d, allwinner,sun4i-a10-sram-d + Devices using SRAM sections ---------------------------
Signature · 1 line
2.7.4
RFC PATCH v4 15/17 dt-bindings: watchdog: Add Allwinner ARMv5 F1C100s wdt
In reply to Mesih KilincAllwinner ARMv5 F1C100s has similar watchdog timer to sun6i A31. Add definition for it.
--- Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt +1 -0
@@ -6,6 +6,7 @@ Required properties: "allwinner,sun4i-a10-wdt" "allwinner,sun6i-a31-wdt" "allwinner,sun50i-a64-wdt","allwinner,sun6i-a31-wdt" + "allwinner,suniv-f1c100s-wdt", "allwinner,sun4i-a10-wdt" - reg : Specifies base physical address and size of the registers. Optional properties:
Signature · 1 line
2.7.4
RFC PATCH v4 16/17 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 | 147 +++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 arch/arm/boot/dts/suniv-f1c100s.dtsi
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +147 -0
@@ -0,0 +1,147 @@ +// 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 { + 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"; + }; + }; + + cpus { + 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,suniv-f1c100s-system-control", + "allwinner,sun4i-a10-system-control"; + 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,suniv-f1c100s-sram-d", + "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,suniv-f1c100s-wdt", + "allwinner,sun4i-a10-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
RFC PATCH v4 17/17 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
Re: [RFC PATCH v4 10/17] dt-bindings: pinctrl: Add Allwinner suniv F1C100s pinctrl
In reply to Mesih KilincQuoted 4 lines · Mesih Kilinc
Add compatible string for Allwinner suniv F1C100s SoC's pinctrl.
Signed-off-by Mesih Kilinc <[email protected]>Acked-by Maxime Ripard <[email protected]>
Patch applied to the pin control tree for v4.21.
Yours,
Linus Walleij
Re: [RFC PATCH v4 11/17] pinctrl: sunxi: add support for suniv F1C100s (newer F-series SoCs)
In reply to Mesih KilincQuoted 8 lines · Mesih Kilinc
The suniv F1C100s chip (several new F-series SoCs) of Allwinner has a pin
controller like other SoCs from Allwinner.Add support for it.
Signed-off-by Mesih Kilinc <[email protected]>Acked-by Maxime Ripard <[email protected]>
Patch applied to the pin control tree for v4.21.
Yours,
Linus Walleij
Re: [RFC PATCH v4 02/17] dt-bindings: arm: Add new Allwinner ARMv5 F1C100s SoC
In reply to Mesih KilincQuoted 8 lines · Mesih Kilinc
Add new Allwinner ARMv5 F1C100s SoC's compatible string
Signed-off-by Mesih Kilinc <[email protected]>Acked-by Maxime Ripard <[email protected]>--- Documentation/devicetree/bindings/arm/sunxi.txt | 1 + 1 file changed, 1 insertion(+)
Re: [RFC PATCH v4 04/17] dt-bindings: interrupt-controller: Add suniv interrupt-controller
In reply to Mesih KilincQuoted 9 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]>Acked-by Maxime Ripard <[email protected]>--- .../devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Re: [RFC PATCH v4 08/17] dt-bindings: timer: Add Allwinner suniv timer
In reply to Mesih KilincQuoted 9 lines · Mesih Kilinc
Add compatible string for Allwinner suniv timer which is similar to sun4i timer.
Signed-off-by Mesih Kilinc <[email protected]>Acked-by Maxime Ripard <[email protected]>--- Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Rob Herring
maintainerRe: [RFC PATCH v4 12/17] dt-bindings: clock: Add Allwinner suniv F1C100s CCU
In reply to Mesih KilincQuoted 31 lines · Mesih Kilinc
Add compatiple string for Allwinner suniv F1C100s CCU. Add clock and reset definitions.
Signed-off-by Mesih Kilinc <[email protected]>Acked-by Maxime Ripard <[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 +1
-0@@ -22,6 +22,7 @@ Required properties : - "allwinner,sun50i-h5-ccu" - "allwinner,sun50i-h6-ccu" - "allwinner,sun50i-h6-r-ccu" + - "allwinner,suniv-f1c100s-ccu" - "nextthing,gr8-ccu" - reg: Must contain the registers base address and lengthinclude/dt-bindings/clock/suniv-ccu-f1c100s.h new file +0
-0
include/dt-bindings/clock/suniv-ccu-f1c100s.h line 4
Quoted 4 lines
include/dt-bindings/clock/suniv-ccu-f1c100s.h new file +4
-0@@ -0,0 +1,69 @@ +/* +* Copyright (c) 2018 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Goes on 1st line.
Quoted 71 lines
include/dt-bindings/clock/suniv-ccu-f1c100s.h new file +65
-0+*/ + +#ifndef _DT_BINDINGS_CLK_SUNIV_F1C100S_H_ +#define _DT_BINDINGS_CLK_SUNIV_F1C100S_H_ + +#define CLK_CPU 11 + +#define CLK_BUS_MMC0 14 +#define CLK_BUS_MMC1 15 +#define CLK_BUS_DRAM 16 +#define CLK_BUS_SPI0 17 +#define CLK_BUS_SPI1 18 +#define CLK_BUS_OTG 19 +#define CLK_BUS_VE 20 +#define CLK_BUS_LCD 21 +#define CLK_BUS_DEINTERLACE 22 +#define CLK_BUS_CSI 23 +#define CLK_BUS_TVD 24 +#define CLK_BUS_TVE 25 +#define CLK_BUS_DE_BE 26 +#define CLK_BUS_DE_FE 27 +#define CLK_BUS_CODEC 28 +#define CLK_BUS_SPDIF 29 +#define CLK_BUS_IR 30 +#define CLK_BUS_RSB 31 +#define CLK_BUS_I2S0 32 +#define CLK_BUS_I2C0 33 +#define CLK_BUS_I2C1 34 +#define CLK_BUS_I2C2 35 +#define CLK_BUS_PIO 36 +#define CLK_BUS_UART0 37 +#define CLK_BUS_UART1 38 +#define CLK_BUS_UART2 39 + +#define CLK_MMC0 40 +#define CLK_MMC0_SAMPLE 41 +#define CLK_MMC0_OUTPUT 42 +#define CLK_MMC1 43 +#define CLK_MMC1_SAMPLE 44 +#define CLK_MMC1_OUTPUT 45 +#define CLK_I2S 46 +#define CLK_SPDIF 47 + +#define CLK_USB_PHY0 48 + +#define CLK_DRAM_VE 49 +#define CLK_DRAM_CSI 50 +#define CLK_DRAM_DEINTERLACE 51 +#define CLK_DRAM_TVD 52 +#define CLK_DRAM_DE_FE 53 +#define CLK_DRAM_DE_BE 54 + +#define CLK_DE_BE 55 +#define CLK_DE_FE 56 +#define CLK_TCON 57 +#define CLK_DEINTERLACE 58 +#define CLK_TVE2_CLK 59 +#define CLK_TVE1_CLK 60 +#define CLK_TVD 61 +#define CLK_CSI 62 +#define CLK_VE 63 +#define CLK_CODEC 64 +#define CLK_AVS 65 + +#endif include/dt-bindings/reset/suniv-ccu-f1c100s.h new file +0
-0
include/dt-bindings/reset/suniv-ccu-f1c100s.h line 4
Quoted 4 lines
include/dt-bindings/reset/suniv-ccu-f1c100s.h new file +4
-0@@ -0,0 +1,37 @@ +/* +* Copyright (C) 2018 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: (GPL-2.0+ OR MIT)
ditto
Quoted 36 lines
include/dt-bindings/reset/suniv-ccu-f1c100s.h new file +33
-0+*/ + +#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 v4 14/17] dt-bindings: sram: Add Allwinner suniv F1C100s
In reply to Mesih KilincQuoted 8 lines · Mesih Kilinc
The suniv ARMv5 F1C100s chip has similar sram controller to sun4i A10. Add compatible string for it.
Signed-off-by Mesih Kilinc <[email protected]>--- Documentation/devicetree/bindings/sram/sunxi-sram.txt | 4 ++++ 1 file changed, 4 insertions(+)
Re: [RFC PATCH v4 15/17] dt-bindings: watchdog: Add Allwinner ARMv5 F1C100s wdt
In reply to Mesih KilincQuoted 8 lines · Mesih Kilinc
Allwinner ARMv5 F1C100s has similar watchdog timer to sun6i A31. Add definition for it.
Signed-off-by Mesih Kilinc <[email protected]>--- Documentation/devicetree/bindings/watchdog/sunxi-wdt.txt | 1 + 1 file changed, 1 insertion(+)
Re: [RFC PATCH v4 05/17] irqchip/sun4i: Add a struct to hold global variables
In reply to Mesih KilincQuoted 5 lines · Mesih Kilinc
In order to support different chips, IC specific data should be hold in a struct. This patch moves
irq_baseandirq_domainglobal variables to struct.Signed-off-by Mesih Kilinc <[email protected]>
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/20181127/766c1e30/attachment.sig>
Re: [RFC PATCH v4 06/17] irqchip/sun4i: Move IC specific register offsets to struct
In reply to Mesih KilincQuoted 4 lines · Mesih Kilinc
This patch moves IC specific register offsets to
sun4i_irq_chip_datastruct in order to support different chips.Signed-off-by Mesih Kilinc <[email protected]>
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/20181127/1727ee3d/attachment.sig>
Re: [RFC PATCH v4 07/17] irqchip/sun4i: Add support for Allwinner ARMv5 F1C100s
In reply to Mesih Kilinc65;5402;1c
Quoted 4 lines · Mesih Kilinc
This patch adds support for suniv Allwinner ARMv5 F1C100s SoC which has stripped version of interrupt controller that found in A10/A13.
Signed-off-by Mesih Kilinc <[email protected]>
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/20181127/da120221/attachment.sig>
Re: [RFC PATCH v4 16/17] ARM: dts: suniv: add initial DTSI file for F1C100s
In reply to Mesih KilincQuoted 94 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 Mesih Kilinc <[email protected]>--- arch/arm/boot/dts/suniv-f1c100s.dtsi | 147 +++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 arch/arm/boot/dts/suniv-f1c100s.dtsiarch/arm/boot/dts/suniv-f1c100s.dtsi new file +78
-0@@ -0,0 +1,147 @@ +// 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 { + 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"; + }; + }; + + cpus { + 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,suniv-f1c100s-system-control", + "allwinner,sun4i-a10-system-control"; + 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,suniv-f1c100s-sram-d", + "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";
arch/arm/boot/dts/suniv-f1c100s.dtsi line 88
Quoted 10 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +10
-0+ 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>;
The dt bindings headers and those DT are going to be merged through separate trees, so you can't use these defines yet. Please use the actual numbers in the DT for now, and send a patch fixing this when 4.21-rc1 will be out.
arch/arm/boot/dts/suniv-f1c100s.dtsi line 95
Quoted 7 lines
arch/arm/boot/dts/suniv-f1c100s.dtsi new file +7
-0+ clock-names = "apb", "hosc", "losc"; + gpio-controller; + interrupt-controller; + #interrupt-cells = <3>; + #gpio-cells = <3>; + + uart0_pins_a: uart-pins-pe {
This would be uart0_pe_pins: uart0-pe-pins.
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/20181127/3c90d43b/attachment.sig>
Stephen Boyd
maintainerRe: [RFC PATCH v4 13/17] clk: sunxi-ng: add support for suniv F1C100s SoC
In reply to Mesih KilincQuoting Mesih Kilinc (2018-11-24 23:43:16)
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c line 4
Quoted 10 lines
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c new file +4
-0@@ -0,0 +1,536 @@ +/* +* Copyright (c) 2016 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0
Echoing Rob. Goes on first line.
Quoted 10 lines
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.c new file +4
-0+*/ + +#include <linux/clk-provider.h> +#include <linux/of_address.h> drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h new file +0
-0
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h line 4
Quoted 4 lines
drivers/clk/sunxi-ng/ccu-suniv-f1c100s.h new file +4
-0@@ -0,0 +1,34 @@ +/* +* Copyright 2017 Icenowy Zheng <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+
ditto.