ARM: add machine and dts files for Amlogic Meson8
cover ARM: add machine and dts files for Amlogic Meson8
Hi,
this patchset introduces a machine definition and dts files for Amlogic Meson8, which is a family of quad-core Cortex-A9 SoCs used in tablets and set-top boxes.
Beniamino Galvani (6):
ARM: meson: add meson8 machine definition
ARM: dts: add dtsi for Amlogic Meson8 SoCs
ARM: dts: add dts for Tronsmart S89 Elite TV box
of: add vendor prefix for Tronsmart
ARM: document Tronsmart compatible properties
ARM: meson: document meson8 compatible properties
Documentation/devicetree/bindings/arm/amlogic.txt | 8 +- .../devicetree/bindings/arm/tronsmart.txt | 7 ++ .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/boot/dts/meson8-vega-s89e.dts | 65 ++++++++++++++++ arch/arm/boot/dts/meson8.dtsi | 90 ++++++++++++++++++++++ arch/arm/mach-meson/Kconfig | 5 ++ arch/arm/mach-meson/meson.c | 8 ++ 7 files changed, 181 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/tronsmart.txt create mode 100644 arch/arm/boot/dts/meson8-vega-s89e.dts create mode 100644 arch/arm/boot/dts/meson8.dtsi
Signature · 1 line
1.9.1
PATCH 1/6 ARM: meson: add meson8 machine definition
This patch adds a machine definition for Amlogic Meson8 SoCs.
--- arch/arm/mach-meson/Kconfig | 5 +++++ arch/arm/mach-meson/meson.c | 8 ++++++++ 2 files changed, 13 insertions(+)
arch/arm/mach-meson/Kconfig +5 -0
@@ -10,4 +10,9 @@ config MACH_MESON6 default ARCH_MESON select MESON6_TIMER +config MACH_MESON8 + bool "Amlogic Meson8 SoCs support" + default ARCH_MESON + select MESON6_TIMER + endif
arch/arm/mach-meson/meson.c +8 -0
@@ -21,7 +21,15 @@ static const char * const m6_common_board_compat[] = { NULL, }; +static const char *const m8_common_board_compat[] = { +"amlogic,meson8" , +NULL , +}; +DT_MACHINE_START (AML8726_MX ,"Amlogic Meson6 platform" ) .dt_compat = m6_common_board_compat, MACHINE_END +DT_MACHINE_START (MESON8 ,"Amlogic Meson8 platform" ) + .dt_compat = m8_common_board_compat, +MACHINE_END
Signature · 1 line
1.9.1
Re: [PATCH 1/6] ARM: meson: add meson8 machine definition
Quoted 4 lines · On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
arch/arm/mach-meson/meson.c +2
-0+static const char *const m8_common_board_compat[] = { +"amlogic,meson8" ,
arch/arm/mach-meson/meson.c static const char * const m6_common_board_compat[] = { · line 35
Quoted 10 lines
arch/arm/mach-meson/meson.c +6
-0+NULL , +}; +DT_MACHINE_START (AML8726_MX ,"Amlogic Meson6 platform" ) .dt_compat = m6_common_board_compat, MACHINE_END +DT_MACHINE_START (MESON8 ,"Amlogic Meson8 platform" ) + .dt_compat = m8_common_board_compat, +MACHINE_END
I'd just add the meson8 string to the m6_common_board_compat list and rename it.
Arnd
Re: [PATCH 1/6] ARM: meson: add meson8 machine definition
Quoted 19 lines · Arnd Bergmann
Quoted 4 lines · On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
arch/arm/mach-meson/meson.c +2
-0+static const char *const m8_common_board_compat[] = { +"amlogic,meson8" ,arch/arm/mach-meson/meson.c static const char * const m6_common_board_compat[] = { · line 35
Quoted 10 lines
arch/arm/mach-meson/meson.c +6
-0+NULL , +}; +DT_MACHINE_START (AML8726_MX ,"Amlogic Meson6 platform" ) .dt_compat = m6_common_board_compat, MACHINE_END +DT_MACHINE_START (MESON8 ,"Amlogic Meson8 platform" ) + .dt_compat = m8_common_board_compat, +MACHINE_END I'd just add the meson8 string to the
m6_common_board_compatlist and rename it.
Quoted 1 line
From what I've seen so far the two families are very similar and share
most of the IP cores, so a unique DT machine is a good idea.
Does the MACH_MESON8 Kconfig symbol still make sense or can I drop it and rename MACH_MESON6 to MACH_MESON?
Beniamino
Re: [PATCH 1/6] ARM: meson: add meson8 machine definition
Quoted 20 lines · Beniamino Galvani
Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
arch/arm/mach-meson/meson.c +5
-0+static const char *const m8_common_board_compat[] = { +"amlogic,meson8" , +NULL , +}; +DT_MACHINE_START (AML8726_MX ,"Amlogic Meson6 platform" ) .dt_compat = m6_common_board_compat,MACHINE_END Quoted 7 lines
arch/arm/mach-meson/meson.c static const char * const m6_common_board_compat[] = { · line 35
Quoted 4 lines
arch/arm/mach-meson/meson.c +3
-0+DT_MACHINE_START (MESON8 ,"Amlogic Meson8 platform" ) + .dt_compat = m8_common_board_compat, +MACHINE_END I'd just add the meson8 string to the
m6_common_board_compatlist and rename it.
Quoted 5 lines
From what I've seen so far the two families are very similar and share most of the IP cores, so a unique DT machine is a good idea.
Does the
MACH_MESON8Kconfigsymbol still make sense or can I drop it and renameMACH_MESON6toMACH_MESON?
I would still leave two different MACH_ for meson6 and meson8 since the two architectures aren't _so_ similar.
thanks,
Signature · 1 line
Carlo Caione
Re: [PATCH 1/6] ARM: meson: add meson8 machine definition
In reply to Beniamino Galvaniarch/arm/mach-meson/meson.c static const char * const m6_common_board_compat[] = { · line 35
Quoted 7 lines · On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
.dt_compat =m6_common_board_compat,
MACHINE_ENDarch/arm/mach-meson/meson.c +3
-0+DT_MACHINE_START (MESON8 ,"Amlogic Meson8 platform" ) + .dt_compat = m8_common_board_compat, +MACHINE_END
One more thing: since this is a cortex-a9, don't you have to enable the l2x0 cache controller explicitly? I think you need a
".l2c_aux_mask = ~0," entry here.
Arnd
Re: [PATCH 1/6] ARM: meson: add meson8 machine definition
Quoted 5 lines · Arnd Bergmann
Quoted 4 lines · On Wednesday 01 October 2014 23:29:41 Beniamino Galvani wrote:
DT_MACHINE_START(AML8726_MX, "Amlogic Meson6 platform")
.dt_compat =m6_common_board_compat,
MACHINE_END
Quoted 7 lines
arch/arm/mach-meson/meson.c static const char * const m6_common_board_compat[] = { · line 35
Quoted 3 lines
arch/arm/mach-meson/meson.c +3
-0+DT_MACHINE_START (MESON8 ,"Amlogic Meson8 platform" ) + .dt_compat = m8_common_board_compat, +MACHINE_END One more thing: since this is a cortex-a9, don't you have to enable the l2x0 cache controller explicitly? I think you need a
".l2c_aux_mask = ~0," entry here.
Will do, thanks.
Beniamino
PATCH 2/6 ARM: dts: add dtsi for Amlogic Meson8 SoCs
In reply to Beniamino GalvaniAdd a dtsi for the Amlogic Meson8 SoCs. It differs from the Meson6 dtsi for the number of Cortex-A9 cores (4 vs 2) and for the frequency of clk81.
--- arch/arm/boot/dts/meson8.dtsi | 90 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 arch/arm/boot/dts/meson8.dtsi
arch/arm/boot/dts/meson8.dtsi new file +90 -0
@@ -0,0 +1,90 @@ +/* + * Copyright 2014 Carlo Caione <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library 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 library 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. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/include/ "meson.dtsi" + +/ { + model = "Amlogic Meson8 SoC"; + compatible = "amlogic,meson8"; + + interrupt-parent = <&gic>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu at 200 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0x200>; + }; + + cpu at 201 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0x201>; + }; + + cpu at 202 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0x202>; + }; + + cpu at 203 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0x203>; + }; + }; + + clk81: clk at 0 { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <141666666>; + }; +}; /* end of / */
Signature · 1 line
1.9.1
PATCH 3/6 ARM: dts: add dts for Tronsmart S89 Elite TV box
In reply to Beniamino GalvaniThis adds a dts for the Tronsmart S89 Elite, a set-top box based on the Amlogic S802 SoC with a 8GiB NAND flash, USB ports, 10/100 Mbps Ethernet adapter, WiFi, HDMI and a micro SD slot.
--- arch/arm/boot/dts/meson8-vega-s89e.dts | 65 ++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 arch/arm/boot/dts/meson8-vega-s89e.dts
arch/arm/boot/dts/meson8-vega-s89e.dts new file +65 -0
@@ -0,0 +1,65 @@ +/* + * Copyright 2014 Beniamino Galvani <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This library 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 library 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + + +/dts-v1/; +/include/ "meson8.dtsi" + +/ { + model = "Tronsmart Vega S89 Elite"; + compatible = "tronsmart,vega-s89e", "amlogic,meson8"; + + aliases { + serial0 = &uart_AO; + }; + + memory { + reg = <0x40000000 0x80000000>; + }; +}; + +&uart_AO { + status = "okay"; +};
Signature · 1 line
1.9.1
PATCH 4/6 of: add vendor prefix for Tronsmart
In reply to Beniamino GalvaniThis adds Tronsmart to the list of device tree vendor prefixes.
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -141,6 +141,7 @@ tlm Trusted Logic Mobility toradex Toradex AG toshiba Toshiba Corporation toumaz Toumaz +tronsmart Tronsmart usi Universal Scientifc Industrial Co., Ltd. v3 V3 Semiconductor variscite Variscite Ltd.
Signature · 1 line
1.9.1
PATCH 5/6 ARM: document Tronsmart compatible properties
In reply to Beniamino GalvaniDocument device tree bindings for Tronsmart devices.
--- Documentation/devicetree/bindings/arm/tronsmart.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/tronsmart.txt
Documentation/devicetree/bindings/arm/tronsmart.txt new file +7 -0
@@ -0,0 +1,7 @@ +Tronsmart Platforms Device Tree Bindings +--------------------------------------- + +Vega S89 Elite TV box + +Required root node properties: + - compatible = "tronsmart,vega-s89e";
Signature · 1 line
1.9.1
PATCH 6/6 ARM: meson: document meson8 compatible properties
In reply to Beniamino GalvaniAdd device tree bindings documentation for Amlogic Meson8 SoCs.
--- Documentation/devicetree/bindings/arm/amlogic.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/arm/amlogic.txt +5 -3
@@ -2,7 +2,9 @@ Amlogic MesonX device tree bindings ------------------------------------------- Boards with the Amlogic Meson6 SoC shall have the following properties: + Required root node property: + compatible: "amlogic,meson6" -Required root node property: - -compatible = "amlogic,meson6"; +Boards with the Amlogic Meson8 SoC shall have the following properties: + Required root node property: + compatible: "amlogic,meson8";
Signature · 1 line
1.9.1