ARM: Initial Actions Semi S500 and S900 enablement
Subsystems (8)
Andreas Färber
maintainercover ARM: Initial Actions Semi S500 and S900 enablement
Hello,
Based on earlier work of mine for the LeMaker Guitar, this series adds initial support for the Actions Semiconductor S500 (ARMv7) and S900 (ARMv8) SoCs.
Despite Actions Semi being a Linaro member since 2015, sadly I have not seen a single upstream kernel patch submission since. Nor has the XApple community taken any such initiative.
The GitHub LeMaker/linux-actions and xapp-le/kernel trees have 3.10 based S500 drivers in arch/arm/mach-owl/, whereas the 96boards-bubblegum/linux tree has new-style but still 3.10 based S900 drivers. I also spotted GPLv2+ vs. GPLv2 license differences.
This series therefore provides a proof of concept for a combined S500 and S900 mainline implementation. Only earlycon serial output is available for now.
Focusing on Bubblegum-96, no S500 clocksource implementation is provided yet, thus output on Guitar is less than on Bubblegum-96, but still it demonstrates that a single driver can be shared for both, using compatible strings for future differentiation.
https://github.com/afaerber/linux/commits/bg96-next
Booting from U-Boot is straightforward on both boards.
https://en.opensuse.org/HCL:Guitar
https://en.opensuse.org/HCL:Bubblegum-96
Have a lot of fun!
Cheers,
Andreas
Andreas F?rber (11):
Documentation: devicetree: Add vendor prefix for Actions Semi
Documentation: devicetree: arm: Document Actions Semi S500
ARM: Prepare Actions Semi S500
ARM64: Prepare Actions Semi S900
Documentation: devicetree: serial: Document Actions Semi Owl UARTs
tty: serial: Add Actions Semi Owl UART earlycon
Documentation: kernel-parameters: Document owl earlycon
ARM: dts: Prepare Actions Semi S500 and LeMaker Guitar
Documentation: devicetree: Add vendor prefix for uCRobotics
Documentation: devicetree: arm: Document Actions Semi S900
ARM64: dts: Prepare Actions Semi S900 and Bubblegum-96
Documentation/admin-guide/kernel-parameters.txt | 6 + Documentation/devicetree/bindings/arm/acts.txt | 32 +++++ .../devicetree/bindings/serial/acts,owl-uart.txt | 16 +++ .../devicetree/bindings/vendor-prefixes.txt | 2 + arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/s500-guitar-bb-rev-b.dts | 63 ++++++++++ arch/arm/boot/dts/s500-guitar.dtsi | 49 ++++++++ arch/arm/boot/dts/s500.dtsi | 116 +++++++++++++++++ arch/arm/mach-owl/Kconfig | 9 ++ arch/arm/mach-owl/Makefile | 1 + arch/arm/mach-owl/owl.c | 28 +++++ arch/arm64/Kconfig.platforms | 5 + arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/actions/Makefile | 5 + arch/arm64/boot/dts/actions/s900-bubblegum96.dts | 62 +++++++++ arch/arm64/boot/dts/actions/s900.dtsi | 140 +++++++++++++++++++++ drivers/tty/serial/Kconfig | 19 +++ drivers/tty/serial/Makefile | 1 + drivers/tty/serial/owl-uart.c | 135 ++++++++++++++++++++ 21 files changed, 695 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/acts.txt create mode 100644 Documentation/devicetree/bindings/serial/acts,owl-uart.txt create mode 100644 arch/arm/boot/dts/s500-guitar-bb-rev-b.dts create mode 100644 arch/arm/boot/dts/s500-guitar.dtsi create mode 100644 arch/arm/boot/dts/s500.dtsi create mode 100644 arch/arm/mach-owl/Kconfig create mode 100644 arch/arm/mach-owl/Makefile create mode 100644 arch/arm/mach-owl/owl.c create mode 100644 arch/arm64/boot/dts/actions/Makefile create mode 100644 arch/arm64/boot/dts/actions/s900-bubblegum96.dts create mode 100644 arch/arm64/boot/dts/actions/s900.dtsi create mode 100644 drivers/tty/serial/owl-uart.c
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 1/11 Documentation: devicetree: Add vendor prefix for Actions Semi
Actions Semiconductor was listed on NASDAQ as ACTS until Dec 16, 2016.
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -6,6 +6,7 @@ using them to avoid name-space collisions. abcn Abracon Corporation abilis Abilis Systems active-semi Active-Semi International Inc +acts Actions Semiconductor Co., Ltd. ad Avionic Design GmbH adapteva Adapteva, Inc. adh AD Holdings Plc.
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 2/11 Documentation: devicetree: arm: Document Actions Semi S500
In reply to Andreas Färber--- Documentation/devicetree/bindings/arm/acts.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/acts.txt
Documentation/devicetree/bindings/arm/acts.txt new file +19 -0
@@ -0,0 +1,19 @@ +Actions Semi platforms device tree bindings +------------------------------------------- + + +S500 SoC +======== + +Required root node properties: + + - compatible : "acts,s500" + + +Modules: + + - LeMaker Guitar: "lemaker,guitar" + +Boards: + + - LeMaker Guitar Base Board rev. B: "lemaker,guitar-bb-rev-b", "lemaker,guitar"
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 3/11 ARM: Prepare Actions Semi S500
In reply to Andreas FärberAdd ARCH_OWL and mach-owl for "acts,s500".
--- arch/arm/Kconfig | 2 ++ arch/arm/Makefile | 1 + arch/arm/mach-owl/Kconfig | 9 +++++++++ arch/arm/mach-owl/Makefile | 1 + arch/arm/mach-owl/owl.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 arch/arm/mach-owl/Kconfig create mode 100644 arch/arm/mach-owl/Makefile create mode 100644 arch/arm/mach-owl/owl.c
arch/arm/Kconfig +2 -0
@@ -795,6 +795,8 @@ source "arch/arm/mach-omap2/Kconfig" source "arch/arm/mach-orion5x/Kconfig" +source "arch/arm/mach-owl/Kconfig" + source "arch/arm/mach-picoxcell/Kconfig" source "arch/arm/mach-pxa/Kconfig"
arch/arm/Makefile +1 -0
@@ -195,6 +195,7 @@ machine-$(CONFIG_ARCH_OXNAS) += oxnas machine-$(CONFIG_ARCH_OMAP1) += omap1 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_ORION5X) += orion5x +machine-$(CONFIG_ARCH_OWL) += owl machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell machine-$(CONFIG_ARCH_PXA) += pxa machine-$(CONFIG_ARCH_QCOM) += qcom
arch/arm/mach-owl/Kconfig new file +9 -0
@@ -0,0 +1,9 @@ +menuconfig ARCH_OWL + bool "Actions Semi Owl family SoCs" + depends on ARCH_MULTI_V7 + select GENERIC_IRQ_CHIP + select ARM_GIC + select CACHE_L2X0 + select COMMON_CLK + help + This enables support for the Actions Semiconductor S500 SoC family.
arch/arm/mach-owl/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_ARCH_OWL) += owl.o
arch/arm/mach-owl/owl.c new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (C) 2017 Andreas F?rber +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +*/ + +#include <linux/of_platform.h> +#include <asm/mach/arch.h> + +static const char *const owl_dt_compat[] = { +"acts,s500" , +NULL +}; + +DT_MACHINE_START (MESON ,"Actions Semi Owl platform" ) + .dt_compat = owl_dt_compat, + .l2c_aux_val = 0, + .l2c_aux_mask = ~0 , +MACHINE_END
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 4/11 ARM64: Prepare Actions Semi S900
In reply to Andreas FärberAdd ARCH_OWL.
--- arch/arm64/Kconfig.platforms | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/Kconfig.platforms +5 -0
@@ -1,5 +1,10 @@ menu "Platform selection" +config ARCH_OWL + bool "Actions Semi S900 SoC Family" + help + This enables support for the Actions Semiconductor S900 SoC family. + config ARCH_SUNXI bool "Allwinner sunxi 64-bit SoC Family" select GENERIC_IRQ_CHIP
Signature · 1 line
2.10.2
Arnd Bergmann
maintainerRe: [PATCH 04/11] ARM64: Prepare Actions Semi S900
arch/arm64/Kconfig.platforms line 7
Quoted 7 lines · CET Andreas F?rber
arch/arm64/Kconfig.platforms +5
-0+config ARCH_OWL + bool "Actions Semi S900 SoC Family" + help + This enables support for the Actions Semiconductor S900 SoC family. +
There seem to be a couple of other SoCs in the same family, so maybe use a more generic name than S900 in the one-line Kconfig description.
Arnd
Andreas Färber
maintainerRe: [PATCH 04/11] ARM64: Prepare Actions Semi S900
Am 16.02.2017 um 14:43 schrieb Arnd Bergmann:
Quoted 12 lines · CET Andreas F?rber
arch/arm64/Kconfig.platforms line 7
Quoted 7 lines
arch/arm64/Kconfig.platforms +5
-0+config ARCH_OWL + bool "Actions Semi S900 SoC Family" + help + This enables support for the Actions Semiconductor S900 SoC family. +There seem to be a couple of other SoCs in the same family, so maybe use a more generic name than S900 in the one-line
Kconfigdescription.
Good point. I only tested with make oldconfig, so using "Owl" should tidy the sort order in make menuconfig while at it. (I believe there were more inconsistent examples, such as Armada 3700 vs. MVEBU...)
Note that I have not come across any explanation for "OWL" as an acronym, so I'm guessing it's the bird and therefore capitalizing it.
Apart from S900, actions-semi.com shows V series S900VR and S700 as well as GT series GT7 Cortex-A53 based SoCs. My guess[*] is these could all be handled as ARCH_OWL, adding further differentiation below if necessary; but Bubblegum-96 seemed the only available arm64 board for testing so far, so any comments from Actions will be appreciated.
[*] The S500 vendor device tree was actually using ATM series models for various nodes, so I'm inferring that the product series are closely enough related.
However, if you would prefer ARCH_ACTIONS I wouldn't mind either - we just need to keep it consistent across arm and arm64.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Arnd Bergmann
maintainerRe: [PATCH 04/11] ARM64: Prepare Actions Semi S900
Quoted 27 lines · Andreas F?rber
Am 16.02.2017 um 14:43 schrieb Arnd Bergmann:
Quoted 12 lines · CET Andreas F?rber
arch/arm64/Kconfig.platforms line 7
Quoted 7 lines
arch/arm64/Kconfig.platforms +5
-0+config ARCH_OWL + bool "Actions Semi S900 SoC Family" + help + This enables support for the Actions Semiconductor S900 SoC family. +There seem to be a couple of other SoCs in the same family, so maybe use a more generic name than S900 in the one-line
Kconfigdescription.Good point. I only tested with
make oldconfig, so using "Owl" should tidy the sort order inmake menuconfigwhile at it. (I believe there were more inconsistent examples, such as Armada 3700 vs. MVEBU...)Note that I have not come across any explanation for "OWL" as an acronym, so I'm guessing it's the bird and therefore capitalizing it.
Apart from S900, actions-semi.com shows V series S900VR and S700 as well as GT series GT7 Cortex-A53 based SoCs. My guess[*] is these could all be handled as
ARCH_OWL, adding further differentiation below if necessary; but Bubblegum-96 seemed the only available arm64 board for testing so far, so any comments from Actions will be appreciated.
Quoted 6 lines
[*] The S500 vendor device tree was actually using ATM series models for various nodes, so I'm inferring that the product series are closely enough related.
However, if you would prefer
ARCH_ACTIONSI wouldn't mind either - we just need to keep it consistent across arm and arm64.
ARCH_ACTIONS seems best to me. We tend to go for the broader names per company these days even when things are not closely related. This avoids having to rename things when a new line of products comes up that shares a subset of the components but doesn't fit under the old name.
Arnd
Andreas Färber
maintainerPATCH 5/11 Documentation: devicetree: serial: Document Actions Semi Owl UARTs
In reply to Andreas Färber--- .../devicetree/bindings/serial/acts,owl-uart.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Documentation/devicetree/bindings/serial/acts,owl-uart.txt
Documentation/devicetree/bindings/serial/acts,owl-uart.txt new file +16 -0
@@ -0,0 +1,16 @@ +Actions Semi Owl UART + +Required properties: +- compatible : "acts,s500-uart", "acts,owl-uart" for S500 + "acts,s900-uart", "acts,owl-uart" for S900 +- reg : Offset and length of the register set for the device. +- interrupts : Should contain UART interrupt. + + +Example: + + uart3: serial at b0126000 { + compatible = "acts,s500-uart", "acts,owl-uart"; + reg = <0xb0126000 0x1000>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; + };
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 6/11 tty: serial: Add Actions Semi Owl UART earlycon
In reply to Andreas FärberThis implements an earlycon for Actions Semi S500/S900 SoCs.
Based on LeMaker linux-actions tree.
--- drivers/tty/serial/Kconfig | 19 ++++++ drivers/tty/serial/Makefile | 1 + drivers/tty/serial/owl-uart.c | 135 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 drivers/tty/serial/owl-uart.c
drivers/tty/serial/Kconfig +19 -0
@@ -1677,6 +1677,25 @@ config SERIAL_MVEBU_CONSOLE and warnings and which allows logins in single user mode) Otherwise, say 'N'. +config SERIAL_OWL + bool "Actions Semi Owl serial port support" + depends on ARCH_OWL || COMPILE_TEST + select SERIAL_CORE + help + This driver is for Actions Semi S500/S900 SoC's UART. + Say 'Y' here if you wish to use the on-board serial port. + Otherwise, say 'N'. + +config SERIAL_OWL_CONSOLE + bool "Console on Actions Semi Owl serial port" + depends on SERIAL_OWL=y + select SERIAL_CORE_CONSOLE + select SERIAL_EARLYCON + default y + help + Say 'Y' here if you wish to use Actions Semi S500/S900 UART as the + system console. + endmenu config SERIAL_MCTRL_GPIO
drivers/tty/serial/Makefile +1 -0
@@ -91,6 +91,7 @@ obj-$(CONFIG_SERIAL_STM32) += stm32-usart.o obj-$(CONFIG_SERIAL_MVEBU_UART) += mvebu-uart.o obj-$(CONFIG_SERIAL_PIC32) += pic32_uart.o obj-$(CONFIG_SERIAL_MPS2_UART) += mps2-uart.o +obj-$(CONFIG_SERIAL_OWL) += owl-uart.o # GPIOLIB helpers for modem control lines obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o
drivers/tty/serial/owl-uart.c new file +135 -0
135 lines not on this page · raw message
Signature · 1 line
2.10.2
Arnd Bergmann
maintainerRe: [PATCH 06/11] tty: serial: Add Actions Semi Owl UART earlycon
Quoted 8 lines · CET Andreas F?rber
drivers/tty/serial/Kconfig +0
-0@@ -1677,6 +1677,25 @@ config SERIAL_MVEBU_CONSOLE and warnings and which allows logins in single user mode) Otherwise, say 'N'.
drivers/tty/serial/Kconfig config SERIAL_MVEBU_CONSOLE · line 1689
Quoted 10 lines
drivers/tty/serial/Kconfig +9
-0+config SERIAL_OWL + bool "Actions Semi Owl serial port support" + depends on ARCH_OWL || COMPILE_TEST + select SERIAL_CORE + help + This driver is for Actions Semi S500/S900 SoC's UART. + Say 'Y' here if you wish to use the on-board serial port. + Otherwise, say 'N'. +
This could maybe use a word of information about how there isn't actually a uart driver in this series, only an earlycon driver.
Do you plan to add the actual tty driver soon? If not, maybe only add one Kconfig symbol for the earlycon support.
Arnd
Andreas Färber
maintainerRe: [PATCH 06/11] tty: serial: Add Actions Semi Owl UART earlycon
Am 16.02.2017 um 14:41 schrieb Arnd Bergmann:
Quoted 9 lines · CET Andreas F?rber
Quoted 8 lines
drivers/tty/serial/Kconfig +0
-0@@ -1677,6 +1677,25 @@ config SERIAL_MVEBU_CONSOLE and warnings and which allows logins in single user mode) Otherwise, say 'N'.
Quoted 13 lines
drivers/tty/serial/Kconfig config SERIAL_MVEBU_CONSOLE · line 1700
Quoted 10 lines
drivers/tty/serial/Kconfig +9
-0+config SERIAL_OWL + bool "Actions Semi Owl serial port support" + depends on ARCH_OWL || COMPILE_TEST + select SERIAL_CORE + help + This driver is for Actions Semi S500/S900 SoC's UART. + Say 'Y' here if you wish to use the on-board serial port. + Otherwise, say 'N'. +This could maybe use a word of information about how there isn't actually a uart driver in this series, only an earlycon driver.
Yeah, I have added a sentence to the other one. Maybe also add a select?
Quoted 2 lines
Do you plan to add the actual tty driver soon? If not, maybe only add one
Kconfigsymbol for the earlycon support.
So, I completed the driver the weekend and can see the full console output, but there are still output glitches, possible locking issues up to RCU stalls and soft lockups, and only stubbed out baudrate support.
Therefore I would rather keep the full driver as follow-up RFC in v2, unless I get it fixed during Hackweek. In the earlycon I am confident, and the only Kconfig change then is to switch from bool to tristate and to drop the newly added sentence again.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Arnd Bergmann
maintainerRe: [PATCH 06/11] tty: serial: Add Actions Semi Owl UART earlycon
Quoted 24 lines · Andreas F?rber
Am 16.02.2017 um 14:41 schrieb Arnd Bergmann:
Quoted 9 lines · CET Andreas F?rber
Quoted 8 lines
drivers/tty/serial/Kconfig +0
-0@@ -1677,6 +1677,25 @@ config SERIAL_MVEBU_CONSOLE and warnings and which allows logins in single user mode) Otherwise, say 'N'.Quoted 13 lines
drivers/tty/serial/Kconfig config SERIAL_MVEBU_CONSOLE · line 1700
Quoted 10 lines
drivers/tty/serial/Kconfig +9
-0+config SERIAL_OWL + bool "Actions Semi Owl serial port support" + depends on ARCH_OWL || COMPILE_TEST + select SERIAL_CORE + help + This driver is for Actions Semi S500/S900 SoC's UART. + Say 'Y' here if you wish to use the on-board serial port. + Otherwise, say 'N'. +This could maybe use a word of information about how there isn't actually a uart driver in this series, only an earlycon driver.
Quoted 1 line
Yeah, I have added a sentence to the other one. Maybe also add a select?
I generally only use 'select' to avoid build failures, not to save the user the time to make a choice.
Quoted 11 lines
Quoted 2 lines
Do you plan to add the actual tty driver soon? If not, maybe only add one
Kconfigsymbol for the earlycon support.So, I completed the driver the weekend and can see the full console output, but there are still output glitches, possible locking issues up to RCU stalls and soft lockups, and only stubbed out baudrate support.
Therefore I would rather keep the full driver as follow-up RFC in v2, unless I get it fixed during Hackweek. In the earlycon I am confident, and the only
Kconfigchange then is to switch from bool to tristate and to drop the newly added sentence again.
Ok, sounds good.
Arnd
Andreas Färber
maintainerPATCH 7/11 Documentation: kernel-parameters: Document owl earlycon
In reply to Andreas Färber--- Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +6 -0
@@ -952,6 +952,12 @@ must already be setup and configured. Options are not yet supported. + owl,<addr> + Start an early, polled-mode console on an Owl serial + port at the specified address. The serial port must + already be setup and configured. Options are not yet + supported. + smh Use ARM semihosting calls for early console. s3c2410,<addr>
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 8/11 ARM: dts: Prepare Actions Semi S500 and LeMaker Guitar
In reply to Andreas Färber--- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/s500-guitar-bb-rev-b.dts | 63 ++++++++++++++++ arch/arm/boot/dts/s500-guitar.dtsi | 49 ++++++++++++ arch/arm/boot/dts/s500.dtsi | 116 +++++++++++++++++++++++++++++ 4 files changed, 230 insertions(+) create mode 100644 arch/arm/boot/dts/s500-guitar-bb-rev-b.dts create mode 100644 arch/arm/boot/dts/s500-guitar.dtsi create mode 100644 arch/arm/boot/dts/s500.dtsi
arch/arm/boot/dts/Makefile +2 -0
@@ -638,6 +638,8 @@ dtb-$(CONFIG_ARCH_ORION5X) += \ orion5x-maxtor-shared-storage-2.dtb \ orion5x-netgear-wnr854t.dtb \ orion5x-rd88f5182-nas.dtb +dtb-$(CONFIG_ARCH_OWL) += \ + s500-guitar-bb-rev-b.dtb dtb-$(CONFIG_ARCH_PRIMA2) += \ prima2-evb.dtb dtb-$(CONFIG_ARCH_OXNAS) += \
arch/arm/boot/dts/s500-guitar-bb-rev-b.dts new file +63 -0
63 lines not on this page · raw message
arch/arm/boot/dts/s500-guitar.dtsi new file +49 -0
49 lines not on this page · raw message
arch/arm/boot/dts/s500.dtsi new file +116 -0
116 lines not on this page · raw message
Signature · 1 line
2.10.2
Mark Rutland
reviewerRe: [PATCH 08/11] ARM: dts: Prepare Actions Semi S500 and LeMaker Guitar
arch/arm/boot/dts/s500.dtsi line 85
Quoted 7 lines · Andreas F?rber
arch/arm/boot/dts/s500.dtsi new file +7
-0+ arm-pmu { + compatible = "arm,cortex-a9-pmu"; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + };
Please add an interrupt-affinity property, as described in Documentation/devicetree/bindings/arm/pmu.txt
Thanks,
Mark.
Andreas Färber
maintainerRe: [PATCH 08/11] ARM: dts: Prepare Actions Semi S500 and LeMaker Guitar
Hi Mark,
Am 15.02.2017 um 18:07 schrieb Mark Rutland:
Quoted 11 lines · Andreas F?rber
Review
Quoted 7 lines
(quoted diff) +7
-0+ arm-pmu { + compatible = "arm,cortex-a9-pmu"; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + };Please add an interrupt-affinity property, as described in
Documentation/devicetree/bindings/arm/pmu.txt
That's not in the vendor tree... My guess is it would be like this then?
arch/arm/boot/dts/s500.dtsi +2 -1
@@ -82,7 +82,8 @@ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; - }; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + }; soc { compatible = "simple-bus";
(also fixing indentation)
Thanks for pointing out,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Mark Rutland
reviewerRe: [PATCH 08/11] ARM: dts: Prepare Actions Semi S500 and LeMaker Guitar
Quoted 22 lines · Andreas F?rber
Hi Mark,
Am 15.02.2017 um 18:07 schrieb Mark Rutland:
Quoted 11 lines · Andreas F?rber
Review
Quoted 7 lines
(quoted diff) +7
-0+ arm-pmu { + compatible = "arm,cortex-a9-pmu"; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + };Please add an interrupt-affinity property, as described in
Documentation/devicetree/bindings/arm/pmu.txtThat's not in the vendor tree... My guess is it would be like this then?
arch/arm/boot/dts/s500.dtsi +0
-0
arch/arm/boot/dts/s500.dtsi line 86
Quoted 6 lines
arch/arm/boot/dts/s500.dtsi +2
-1@@ -82,7 +82,8 @@ <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; - }; + interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; + };
Assuming that's how they're wired up, yes.
You should be able to test this by using perf record in per-cpu mode, on an application with its affintiy fixed to a particular CPU, and verifying that overflow interrupts are recevied on the same CPU.
Thanks,
Mark.
Andreas Färber
maintainerRe: [PATCH 08/11] ARM: dts: Prepare Actions Semi S500 and LeMaker Guitar
In reply to Andreas FärberAm 15.02.2017 um 17:55 schrieb Andreas F?rber:
arch/arm/boot/dts/s500.dtsi line 97
Quoted 5 lines
arch/arm/boot/dts/s500.dtsi new file +5
-0+ gic: interrupt-controller at b0021000 { + compatible = "arm,cortex-a9-gic"; + reg = <0xb0021000 0x1000>, + <0xb0020100 0x0100>; + };
This was lacking:
interrupt-controller; #interrupt-cells = <3>;
leading to a hang when mapping an irq.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Andreas Färber
maintainerPATCH 9/11 Documentation: devicetree: Add vendor prefix for uCRobotics
In reply to Andreas Färber--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -319,6 +319,7 @@ tronfy Tronfy tronsmart Tronsmart truly Truly Semiconductors Limited tyan Tyan Computer Corporation +ucrobotics uCRobotics udoo Udoo uniwest United Western Technologies Corp (UniWest) upisemi uPI Semiconductor Corp.
Signature · 1 line
2.10.2
Andreas Färber
maintainerPATCH 10/11 Documentation: devicetree: arm: Document Actions Semi S900
In reply to Andreas Färber--- Documentation/devicetree/bindings/arm/acts.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Documentation/devicetree/bindings/arm/acts.txt +13 -0
@@ -17,3 +17,16 @@ Modules: Boards: - LeMaker Guitar Base Board rev. B: "lemaker,guitar-bb-rev-b", "lemaker,guitar" + + +S900 SoC +======== + +Required root node properties: + +- compatible : "acts,s900" + + +Boards: + + - uCRobotics Bubblegum-96: "ucrobotics,bubblegum-96"
Signature · 1 line
2.10.2
Re: [PATCH 10/11] Documentation: devicetree: arm: Document Actions Semi S900
Quoted 4 lines · Andreas F?rber
Signed-off-by Andreas F?rber <[email protected]>--- Documentation/devicetree/bindings/arm/acts.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+)
Andreas Färber
maintainerPATCH 11/11 ARM64: dts: Prepare Actions Semi S900 and Bubblegum-96
In reply to Andreas Färber--- arch/arm64/boot/dts/Makefile | 1 + arch/arm64/boot/dts/actions/Makefile | 5 + arch/arm64/boot/dts/actions/s900-bubblegum96.dts | 62 ++++++++++ arch/arm64/boot/dts/actions/s900.dtsi | 140 +++++++++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 arch/arm64/boot/dts/actions/Makefile create mode 100644 arch/arm64/boot/dts/actions/s900-bubblegum96.dts create mode 100644 arch/arm64/boot/dts/actions/s900.dtsi
arch/arm64/boot/dts/Makefile +1 -0
@@ -1,3 +1,4 @@ +dts-dirs += actions dts-dirs += al dts-dirs += allwinner dts-dirs += altera
arch/arm64/boot/dts/actions/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +dtb-$(CONFIG_ARCH_OWL) += s900-bubblegum96.dtb + +always := $(dtb-y) +subdir-y := $(dts-dirs) +clean-files := *.dtb
arch/arm64/boot/dts/actions/s900-bubblegum96.dts new file +62 -0
62 lines not on this page · raw message
arch/arm64/boot/dts/actions/s900.dtsi new file +140 -0
140 lines not on this page · raw message
Signature · 1 line
2.10.2
Mark Rutland
reviewerRe: [PATCH 11/11] ARM64: dts: Prepare Actions Semi S900 and Bubblegum-96
Hi,
Quoted 4 lines · Andreas F?rber
arch/arm64/boot/dts/actions/s900-bubblegum96.dts new file +4
-0+#include "s900.dtsi" + +/ { + compatible = "ucrobotics,bubblegum-96", "acts,s900";
arch/arm64/boot/dts/actions/s900-bubblegum96.dts line 58
Quoted 10 lines
arch/arm64/boot/dts/actions/s900-bubblegum96.dts new file +10
-0+ model = "Bubblegum-96"; + + aliases { + serial5 = &uart5; + }; + + chosen { + stdout-path = "serial5:115200n8"; + }; +};
I didn't spot a memory node here or in the dtsi. Does the FW/bootloader create one?
arch/arm64/boot/dts/actions/s900.dtsi line 89
Quoted 5 lines
arch/arm64/boot/dts/actions/s900.dtsi new file +5
-0+ reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + };
Why have this empty node?
arch/arm64/boot/dts/actions/s900.dtsi line 102
Quoted 13 lines
arch/arm64/boot/dts/actions/s900.dtsi new file +13
-0+ + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + arm-pmu { + compatible = "arm,cortex-a53-pmu"; + interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + };
Please ad an interrupt-affinity property, as described in Documentation/devicetree/bindings/arm/pmu.txt.
Quoted 15 lines
arch/arm64/boot/dts/actions/s900.dtsi new file +15
-0+ + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + }; + + soc { + compatible = "simple-bus";
arch/arm64/boot/dts/actions/s900.dtsi line 127
Quoted 10 lines
arch/arm64/boot/dts/actions/s900.dtsi new file +10
-0+ #address-cells = <2>; + #size-cells = <2>; + ranges; + + gic: interrupt-controller at e00f1000 { + compatible = "arm,gic-400"; + reg = <0x0 0xe00f1000 0x0 0x1000>, + <0x0 0xe00f2000 0x0 0x1000>, + <0x0 0xe00f4000 0x0 0x2000>, + <0x0 0xe00f6000 0x0 0x2000>;
I believe that the second entry should be 0x2000 in length.
Thanks,
Mark.
Andreas Färber
maintainerRe: [PATCH 11/11] ARM64: dts: Prepare Actions Semi S900 and Bubblegum-96
Hi,
Am 15.02.2017 um 18:12 schrieb Mark Rutland:
Quoted 10 lines · Andreas F?rber
Quoted 9 lines
(quoted diff) +9
-0+#include "s900.dtsi" + +/ { + compatible = "ucrobotics,bubblegum-96", "acts,s900"; + model = "Bubblegum-96"; + + aliases { + serial5 = &uart5; + };
Quoted 8 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ + chosen { + stdout-path = "serial5:115200n8"; + }; +};I didn't spot a memory node here or in the dtsi. Does the FW/bootloader create one?
Heh, apparently... For S500, skeleton.dtsi added that - not entirely clean either. I'll add one here in the .dts and think about adding one in s500-guitar.dtsi as well.
arch/arm64/boot/dts/actions/s900-bubblegum96.dts +5 -0
@@ -55,6 +55,11 @@ chosen { stdout-path = "serial5:115200n8"; }; + + memory { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; }; &uart5 {
Quoted 7 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + };Why have this empty node?
Forgotten about... I see these:
reserving fdt memory region: addr=19000000 size=3000000 reserving fdt memory region: addr=20000000 size=20000000 reserving fdt memory region: addr=18fff000 size=1000 reserving fdt memory region: addr=1f000000 size=1000000
Vendor tree says 0x1f000000 is for secure monitor; 0x19000000 for fb, 0x20000000 for ion (ignoring), and 0x20000000 for afinfo - whatever that may be (not me! :)).
So as minimum:
arch/arm64/boot/dts/actions/s900.dtsi +5 -0
@@ -86,6 +86,11 @@ #address-cells = <2>; #size-cells = <2>; ranges; + + secmon at 1f000000 { + reg = <0x0 0x1f000000 0x0 0x1000000>; + no-map; + }; }; psci {
Quoted 8 lines
Quoted 8 lines
(quoted diff) +8
-0+ + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + + arm-pmu { + compatible = "arm,cortex-a53-pmu";
Quoted 8 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + };Please ad an interrupt-affinity property, as described in
Documentation/devicetree/bindings/arm/pmu.txt.
I had done my best to check my properties matched the bindings, but you caught me not checking for any missing properties.
Again, my guess is:
@@ -99,6 +104,7 @@
<GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
};
timer {Quoted 19 lines
Quoted 19 lines
(quoted diff) +19
-0+ + timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; +
Quoted 8 lines
Review
Quoted 6 lines
(quoted diff) +6
-0+ gic: interrupt-controller at e00f1000 { + compatible = "arm,gic-400"; + reg = <0x0 0xe00f1000 0x0 0x1000>, + <0x0 0xe00f2000 0x0 0x1000>, + <0x0 0xe00f4000 0x0 0x2000>, + <0x0 0xe00f6000 0x0 0x2000>;I believe that the second entry should be
0x2000in length.
The vendor tree does have 0x1000, but that might be a mistake of course. I vaguely recall having such discussions elsewhere in the past.
@@ -122,7 +128,7 @@
gic: interrupt-controller at e00f1000 {
compatible = "arm,gic-400";
reg = <0x0 0xe00f1000 0x0 0x1000>,
- <0x0 0xe00f2000 0x0 0x1000>,
+ <0x0 0xe00f2000 0x0 0x2000>,
<0x0 0xe00f4000 0x0 0x2000>,
<0x0 0xe00f6000 0x0 0x2000>;
interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4)| IRQ_TYPE_LEVEL_LOW)>;
Thanks for the quick review,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Mark Rutland
reviewerRe: [PATCH 11/11] ARM64: dts: Prepare Actions Semi S900 and Bubblegum-96
Hi,
Quoted 27 lines · Andreas F?rber
Am 15.02.2017 um 18:12 schrieb Mark Rutland:
Quoted 8 lines · Andreas F?rber
Review
Quoted 5 lines
(quoted diff) +5
-0+ reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + };Why have this empty node?
Forgotten about... I see these:
reserving fdt memory region: addr=19000000 size=3000000 reserving fdt memory region: addr=20000000 size=20000000 reserving fdt memory region: addr=18fff000 size=1000 reserving fdt memory region: addr=1f000000 size=1000000Vendor tree says
0x1f000000is for secure monitor;0x19000000for fb,0x20000000for ion (ignoring), and0x20000000for afinfo - whatever that may be (not me! :)).So as minimum:
arch/arm64/boot/dts/actions/s900.dtsi +0
-0@@ -86,6 +86,11 @@ #address-cells = <2>;
arch/arm64/boot/dts/actions/s900.dtsi line 96
Quoted 10 lines
arch/arm64/boot/dts/actions/s900.dtsi +5
-0#size-cells = <2>; ranges; + + secmon at 1f000000 { + reg = <0x0 0x1f000000 0x0 0x1000000>; + no-map; + }; }; psci {
Once you've added that node, could you try booting with "memtest" on the command line?
Assuming CONFIG_MEMTEST is enabled, that'll go and verify that the kernel can access all of the (unresereved) memory without issues, which should save us lots of pain later on if there's something else that needs to be reserved.
Quoted 27 lines
Quoted 18 lines
Quoted 18 lines
(quoted diff) +18
-0+ timer { + compatible = "arm,armv8-timer"; + interrupts = <GIC_PPI 13 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 + (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; +Quoted 8 lines
Review
Quoted 6 lines
(quoted diff) +6
-0+ gic: interrupt-controller at e00f1000 { + compatible = "arm,gic-400"; + reg = <0x0 0xe00f1000 0x0 0x1000>, + <0x0 0xe00f2000 0x0 0x1000>, + <0x0 0xe00f4000 0x0 0x2000>, + <0x0 0xe00f6000 0x0 0x2000>;I believe that the second entry should be
0x2000in length.
Quoted 2 lines
The vendor tree does have
0x1000, but that might be a mistake of course. I vaguely recall having such discussions elsewhere in the past.
It is a mistake, and a common one [1] at that! :)
Thanks,
Mark.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2017-January/480590.html
Arnd Bergmann
maintainerQuoted 14 lines · CET Andreas F?rber
Hello,
Based on earlier work of mine for the LeMaker Guitar, this series adds initial support for the Actions Semiconductor S500 (ARMv7) and S900 (ARMv8) SoCs.
Despite Actions Semi being a Linaro member since 2015, sadly I have not seen a single upstream kernel patch submission since. Nor has the XApple community taken any such initiative.
The GitHub LeMaker/linux-actions and xapp-le/kernel trees have 3.10 based S500 drivers in
arch/arm/mach-owl/, whereas the 96boards-bubblegum/linux tree has new-style but still 3.10 based S900 drivers. I also spotted GPLv2+ vs. GPLv2 license differences.
Quoted 7 lines
This series therefore provides a proof of concept for a combined S500 and S900 mainline implementation. Only earlycon serial output is available for now.
Focusing on Bubblegum-96, no S500 clocksource implementation is provided yet, thus output on Guitar is less than on Bubblegum-96, but still it demonstrates that a single driver can be shared for both, using compatible strings for future differentiation.
Thanks for getting this started! It's unfortunately too late for 4.11 now, but there should be no problem getting this merged into arm-soc early on after the coming merge window.
I'd suggest keeping it as a set of patches for the moment, and we'll apply them to the respective arm-soc branches as needed, with the exception of the tty patch that should go through Greg's tree.
When you have addressed the review comments, please send the updated series to arm at kernel.org.
Arnd