mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
meson64: first commit
PD#138714: initial commit for meson64 bringup 1. add meson64 defconfig 2. add uart driver 3. add iomap driver 4. add scripts 5. add p212 & q200 dts Change-Id: Idbc0d4e33f024eaeb97fc9f7948188b9596aea4c Signed-off-by: Jianxin Pan <jianxin.pan@amlogic.com>
This commit is contained in:
3
Makefile
3
Makefile
@@ -399,6 +399,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -fno-common \
|
||||
-Werror-implicit-function-declaration \
|
||||
-Wno-format-security \
|
||||
-Werror \
|
||||
-std=gnu89 $(call cc-option,-fno-PIE)
|
||||
|
||||
|
||||
@@ -447,6 +448,8 @@ PHONY += scripts_basic
|
||||
scripts_basic:
|
||||
$(Q)$(MAKE) $(build)=scripts/basic
|
||||
$(Q)rm -f .tmp_quiet_recordmcount
|
||||
$(Q)cp $(srctree)/scripts/amlogic/pre-commit $(srctree)/.git/hooks/pre-commit
|
||||
$(Q)chmod +x $(srctree)/.git/hooks/pre-commit
|
||||
|
||||
# To avoid any implicit rule to kick in, define an empty command.
|
||||
scripts/basic/%: scripts_basic ;
|
||||
|
||||
@@ -73,7 +73,7 @@ TEXT_OFFSET := $(shell awk "BEGIN {srand(); printf \"0x%06x\n\", \
|
||||
int(2 * 1024 * 1024 / (2 ^ $(CONFIG_ARM64_PAGE_SHIFT)) * \
|
||||
rand()) * (2 ^ $(CONFIG_ARM64_PAGE_SHIFT))}")
|
||||
else
|
||||
TEXT_OFFSET := 0x00080000
|
||||
TEXT_OFFSET := 0x0180000
|
||||
endif
|
||||
|
||||
# KASAN_SHADOW_OFFSET = VA_START + (1 << (VA_BITS - 3)) - (1 << 61)
|
||||
@@ -111,7 +111,7 @@ zinstall install:
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
%.dtb: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts/amlogic $(boot)/dts/amlogic/$@
|
||||
|
||||
PHONY += dtbs dtbs_install
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p200.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-p201.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-pro.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-meta.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-vega-s95-telos.dtb
|
||||
|
||||
always := $(dtb-y)
|
||||
subdir-y := $(dts-dirs)
|
||||
clean-files := *.dtb
|
||||
targets += dtbs
|
||||
|
||||
DTB_NAMES := $(subst $\",,$(CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE_NAMES))
|
||||
ifneq ($(DTB_NAMES),)
|
||||
DTB_LIST := $(addsuffix .dtb,$(DTB_NAMES))
|
||||
else
|
||||
DTB_LIST := $(dtb-y)
|
||||
endif
|
||||
targets += $(DTB_LIST)
|
||||
|
||||
dtbs: $(addprefix $(obj)/, $(DTB_LIST))
|
||||
|
||||
clean-files := *.dtb
|
||||
|
||||
60
arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts
Normal file
60
arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include "mesongxl.dtsi"
|
||||
/ {
|
||||
model = "Amlogic";
|
||||
amlogic-dt-id = "gxl_p212_1g";
|
||||
compatible = "amlogic, Gxl";
|
||||
interrupt-parent = <&gic>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
memory@00000000 {
|
||||
device_type = "memory";
|
||||
linux,usable-memory = <0x0 0x0100000 0x0 0x3ff00000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/* global autoconfigured region for contiguous allocations */
|
||||
secmon_reserved:linux,secmon {
|
||||
compatible = "amlogic, aml_secmon_memory";
|
||||
reg = <0x0 0x10000000 0x0 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
uart_AO: serial@c81004c0 {
|
||||
compatible = "amlogic, meson-uart";
|
||||
reg = <0x0 0xc81004c0 0x0 0x18>;
|
||||
interrupts = <0 193 1>;
|
||||
status = "okay";
|
||||
xtal_tick_en = <1>;
|
||||
fifosize = < 64 >;
|
||||
support-sysrq = <0>; /* 0 not support , 1 support */
|
||||
};
|
||||
};
|
||||
60
arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts
Normal file
60
arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/gxl_p212_2g.dts
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include "mesongxl.dtsi"
|
||||
/ {
|
||||
model = "Amlogic";
|
||||
amlogic-dt-id = "gxl_p212_2g";
|
||||
compatible = "amlogic, Gxl";
|
||||
interrupt-parent = <&gic>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
memory@00000000 {
|
||||
device_type = "memory";
|
||||
linux,usable-memory = <0x0 0x0100000 0x0 0x7ff00000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/* global autoconfigured region for contiguous allocations */
|
||||
secmon_reserved:linux,secmon {
|
||||
compatible = "amlogic, aml_secmon_memory";
|
||||
reg = <0x0 0x10000000 0x0 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
uart_AO: serial@c81004c0 {
|
||||
compatible = "amlogic, meson-uart";
|
||||
reg = <0x0 0xc81004c0 0x0 0x18>;
|
||||
interrupts = <0 193 1>;
|
||||
status = "okay";
|
||||
xtal_tick_en = <1>;
|
||||
fifosize = < 64 >;
|
||||
support-sysrq = <0>; /* 0 not support , 1 support */
|
||||
};
|
||||
};
|
||||
60
arch/arm64/boot/dts/amlogic/gxm_q200_2g.dts
Normal file
60
arch/arm64/boot/dts/amlogic/gxm_q200_2g.dts
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/gxm_q200_2g.dts
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include "mesongxm.dtsi"
|
||||
/ {
|
||||
model = "Amlogic";
|
||||
compatible = "amlogic, Gxm";
|
||||
amlogic-dt-id = "gxm_q200_2g";
|
||||
interrupt-parent = <&gic>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
memory@00000000 {
|
||||
device_type = "memory";
|
||||
linux,usable-memory = <0x0 0x0100000 0x0 0x7ff00000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/* global autoconfigured region for contiguous allocations */
|
||||
secmon_reserved:linux,secmon {
|
||||
compatible = "amlogic, aml_secmon_memory";
|
||||
reg = <0x0 0x10000000 0x0 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
uart_AO: serial@c81004c0 {
|
||||
compatible = "amlogic, meson-uart";
|
||||
reg = <0x0 0xc81004c0 0x0 0x18>;
|
||||
interrupts = <0 193 1>;
|
||||
status = "okay";
|
||||
xtal_tick_en = <1>;
|
||||
fifosize = < 64 >;
|
||||
support-sysrq = <0>; /* 0 not support , 1 support */
|
||||
};
|
||||
};
|
||||
59
arch/arm64/boot/dts/amlogic/gxm_skt.dts
Normal file
59
arch/arm64/boot/dts/amlogic/gxm_skt.dts
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/gxm_skt.dts
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include "mesongxm.dtsi"
|
||||
/ {
|
||||
model = "Amlogic";
|
||||
compatible = "amlogic, Gxm";
|
||||
interrupt-parent = <&gic>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
memory@00000000 {
|
||||
device_type = "memory";
|
||||
linux,usable-memory = <0x0 0x1000000 0x0 0x3f000000>;
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
/* global autoconfigured region for contiguous allocations */
|
||||
secmon_reserved:linux,secmon {
|
||||
compatible = "amlogic, aml_secmon_memory";
|
||||
reg = <0x0 0x10000000 0x0 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
|
||||
uart_AO: serial@c81004c0 {
|
||||
compatible = "amlogic, meson-uart";
|
||||
reg = <0x0 0xc81004c0 0x0 0x18>;
|
||||
interrupts = <0 193 1>;
|
||||
status = "okay";
|
||||
xtal_tick_en = <1>;
|
||||
fifosize = < 64 >;
|
||||
support-sysrq = <0>; /* 0 not support , 1 support */
|
||||
};
|
||||
};
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
* Copyright (c) 2016 BayLibre, Inc.
|
||||
* Author: Kevin Hilman <khilman@kernel.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 "meson-gxbb.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/ {
|
||||
compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
|
||||
model = "Hardkernel ODROID-C2";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x0 0x0 0x80000000>;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue {
|
||||
label = "c2:blue:alive";
|
||||
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ðmac {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ð_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&ir {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&remote_input_ao_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&i2c_A {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c_a_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
* Copyright (c) 2016 BayLibre, Inc.
|
||||
* Author: Kevin Hilman <khilman@kernel.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 "meson-gxbb-p20x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "amlogic,p200", "amlogic,meson-gxbb";
|
||||
model = "Amlogic Meson GXBB P200 Development Board";
|
||||
};
|
||||
|
||||
&i2c_B {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c_b_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
* Copyright (c) 2016 BayLibre, Inc.
|
||||
* Author: Kevin Hilman <khilman@kernel.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 "meson-gxbb-p20x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "amlogic,p201", "amlogic,meson-gxbb";
|
||||
model = "Amlogic Meson GXBB P201 Development Board";
|
||||
};
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
* Copyright (c) 2016 BayLibre, Inc.
|
||||
* Author: Kevin Hilman <khilman@kernel.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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-gxbb.dtsi"
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x0 0x0 0x40000000>;
|
||||
};
|
||||
|
||||
usb_pwr: regulator-usb-pwrs {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "USB_PWR";
|
||||
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
|
||||
/* signal name in schematic: USB_PWR_EN */
|
||||
gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
/* This UART is brought out to the DB9 connector */
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ðmac {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ð_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&ir {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&remote_input_ao_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&usb0_phy {
|
||||
status = "okay";
|
||||
phy-supply = <&usb_pwr>;
|
||||
};
|
||||
|
||||
&usb1_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 "meson-gxbb-vega-s95.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tronsmart,vega-s95-meta", "tronsmart,vega-s95", "amlogic,meson-gxbb";
|
||||
model = "Tronsmart Vega S95 Meta";
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x0 0x0 0x80000000>;
|
||||
};
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 "meson-gxbb-vega-s95.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tronsmart,vega-s95-pro", "tronsmart,vega-s95", "amlogic,meson-gxbb";
|
||||
model = "Tronsmart Vega S95 Pro";
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x0 0x0 0x40000000>;
|
||||
};
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 "meson-gxbb-vega-s95.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tronsmart,vega-s95-telos", "tronsmart,vega-s95", "amlogic,meson-gxbb";
|
||||
model = "Tronsmart Vega S95 Telos";
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
reg = <0x0 0x0 0x0 0x80000000>;
|
||||
};
|
||||
};
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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-gxbb.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
usb_vbus: regulator-usb0-vbus {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "USB0_VBUS";
|
||||
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
|
||||
gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
};
|
||||
|
||||
&ir {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&remote_input_ao_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
ðmac {
|
||||
status = "okay";
|
||||
pinctrl-0 = <ð_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&usb0_phy {
|
||||
status = "okay";
|
||||
phy-supply = <&usb_vbus>;
|
||||
};
|
||||
|
||||
&usb1_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -1,669 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Andreas Färber
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
#include <dt-bindings/gpio/meson-gxbb-gpio.h>
|
||||
#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
|
||||
#include <dt-bindings/clock/gxbb-clkc.h>
|
||||
#include <dt-bindings/clock/gxbb-aoclkc.h>
|
||||
#include <dt-bindings/reset/gxbb-aoclkc.h>
|
||||
|
||||
/ {
|
||||
compatible = "amlogic,meson-gxbb";
|
||||
interrupt-parent = <&gic>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
|
||||
cpus {
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x0>;
|
||||
|
||||
cpu0: cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0x0 0x0>;
|
||||
enable-method = "psci";
|
||||
};
|
||||
|
||||
cpu1: cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0x0 0x1>;
|
||||
enable-method = "psci";
|
||||
};
|
||||
|
||||
cpu2: cpu@2 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0x0 0x2>;
|
||||
enable-method = "psci";
|
||||
};
|
||||
|
||||
cpu3: cpu@3 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53", "arm,armv8";
|
||||
reg = <0x0 0x3>;
|
||||
enable-method = "psci";
|
||||
};
|
||||
};
|
||||
|
||||
arm-pmu {
|
||||
compatible = "arm,cortex-a53-pmu";
|
||||
interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
|
||||
};
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci-0.2";
|
||||
method = "smc";
|
||||
};
|
||||
|
||||
firmware {
|
||||
sm: secure-monitor {
|
||||
compatible = "amlogic,meson-gxbb-sm";
|
||||
};
|
||||
};
|
||||
|
||||
efuse: efuse {
|
||||
compatible = "amlogic,meson-gxbb-efuse";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sn: sn@14 {
|
||||
reg = <0x14 0x10>;
|
||||
};
|
||||
|
||||
eth_mac: eth_mac@34 {
|
||||
reg = <0x34 0x10>;
|
||||
};
|
||||
|
||||
bid: bid@46 {
|
||||
reg = <0x46 0x30>;
|
||||
};
|
||||
};
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 14
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 11
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 10
|
||||
(GIC_CPU_MASK_RAW(0xff) | IRQ_TYPE_LEVEL_LOW)>;
|
||||
};
|
||||
|
||||
xtal: xtal-clk {
|
||||
compatible = "fixed-clock";
|
||||
clock-frequency = <24000000>;
|
||||
clock-output-names = "xtal";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
soc {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
usb0_phy: phy@c0000000 {
|
||||
compatible = "amlogic,meson-gxbb-usb2-phy";
|
||||
#phy-cells = <0>;
|
||||
reg = <0x0 0xc0000000 0x0 0x20>;
|
||||
resets = <&reset RESET_USB_OTG>;
|
||||
clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
|
||||
clock-names = "usb_general", "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb1_phy: phy@c0000020 {
|
||||
compatible = "amlogic,meson-gxbb-usb2-phy";
|
||||
#phy-cells = <0>;
|
||||
reg = <0x0 0xc0000020 0x0 0x20>;
|
||||
clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB1>;
|
||||
clock-names = "usb_general", "usb";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
cbus: cbus@c1100000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0xc1100000 0x0 0x100000>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc1100000 0x0 0x100000>;
|
||||
|
||||
reset: reset-controller@4404 {
|
||||
compatible = "amlogic,meson-gxbb-reset";
|
||||
reg = <0x0 0x04404 0x0 0x20>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
uart_A: serial@84c0 {
|
||||
compatible = "amlogic,meson-uart";
|
||||
reg = <0x0 0x84c0 0x0 0x14>;
|
||||
interrupts = <GIC_SPI 26 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&xtal>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart_B: serial@84dc {
|
||||
compatible = "amlogic,meson-uart";
|
||||
reg = <0x0 0x84dc 0x0 0x14>;
|
||||
interrupts = <GIC_SPI 75 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&xtal>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm_ab: pwm@8550 {
|
||||
compatible = "amlogic,meson-gxbb-pwm";
|
||||
reg = <0x0 0x08550 0x0 0x10>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm_cd: pwm@8650 {
|
||||
compatible = "amlogic,meson-gxbb-pwm";
|
||||
reg = <0x0 0x08650 0x0 0x10>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm_ef: pwm@86c0 {
|
||||
compatible = "amlogic,meson-gxbb-pwm";
|
||||
reg = <0x0 0x086c0 0x0 0x10>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart_C: serial@8700 {
|
||||
compatible = "amlogic,meson-uart";
|
||||
reg = <0x0 0x8700 0x0 0x14>;
|
||||
interrupts = <GIC_SPI 93 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&xtal>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
watchdog@98d0 {
|
||||
compatible = "amlogic,meson-gxbb-wdt";
|
||||
reg = <0x0 0x098d0 0x0 0x10>;
|
||||
clocks = <&xtal>;
|
||||
};
|
||||
|
||||
spifc: spi@8c80 {
|
||||
compatible = "amlogic,meson-gxbb-spifc";
|
||||
reg = <0x0 0x08c80 0x0 0x80>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
clocks = <&clkc CLKID_SPI>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c_A: i2c@8500 {
|
||||
compatible = "amlogic,meson-gxbb-i2c";
|
||||
reg = <0x0 0x08500 0x0 0x20>;
|
||||
interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&clkc CLKID_I2C>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c_B: i2c@87c0 {
|
||||
compatible = "amlogic,meson-gxbb-i2c";
|
||||
reg = <0x0 0x087c0 0x0 0x20>;
|
||||
interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&clkc CLKID_I2C>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c_C: i2c@87e0 {
|
||||
compatible = "amlogic,meson-gxbb-i2c";
|
||||
reg = <0x0 0x087e0 0x0 0x20>;
|
||||
interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&clkc CLKID_I2C>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
gic: interrupt-controller@c4301000 {
|
||||
compatible = "arm,gic-400";
|
||||
reg = <0x0 0xc4301000 0 0x1000>,
|
||||
<0x0 0xc4302000 0 0x2000>,
|
||||
<0x0 0xc4304000 0 0x2000>,
|
||||
<0x0 0xc4306000 0 0x2000>;
|
||||
interrupt-controller;
|
||||
interrupts = <GIC_PPI 9
|
||||
(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <0>;
|
||||
};
|
||||
|
||||
aobus: aobus@c8100000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0xc8100000 0x0 0x100000>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;
|
||||
|
||||
pinctrl_aobus: pinctrl@14 {
|
||||
compatible = "amlogic,meson-gxbb-aobus-pinctrl";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
gpio_ao: bank@14 {
|
||||
reg = <0x0 0x00014 0x0 0x8>,
|
||||
<0x0 0x0002c 0x0 0x4>,
|
||||
<0x0 0x00024 0x0 0x8>;
|
||||
reg-names = "mux", "pull", "gpio";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
|
||||
uart_ao_a_pins: uart_ao_a {
|
||||
mux {
|
||||
groups = "uart_tx_ao_a", "uart_rx_ao_a";
|
||||
function = "uart_ao";
|
||||
};
|
||||
};
|
||||
|
||||
remote_input_ao_pins: remote_input_ao {
|
||||
mux {
|
||||
groups = "remote_input_ao";
|
||||
function = "remote_input_ao";
|
||||
};
|
||||
};
|
||||
|
||||
i2c_ao_pins: i2c_ao {
|
||||
mux {
|
||||
groups = "i2c_sck_ao",
|
||||
"i2c_sda_ao";
|
||||
function = "i2c_ao";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_ao_a_3_pins: pwm_ao_a_3 {
|
||||
mux {
|
||||
groups = "pwm_ao_a_3";
|
||||
function = "pwm_ao_a_3";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_ao_a_6_pins: pwm_ao_a_6 {
|
||||
mux {
|
||||
groups = "pwm_ao_a_6";
|
||||
function = "pwm_ao_a_6";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_ao_a_12_pins: pwm_ao_a_12 {
|
||||
mux {
|
||||
groups = "pwm_ao_a_12";
|
||||
function = "pwm_ao_a_12";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_ao_b_pins: pwm_ao_b {
|
||||
mux {
|
||||
groups = "pwm_ao_b";
|
||||
function = "pwm_ao_b";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
clkc_AO: clock-controller@040 {
|
||||
compatible = "amlogic,gxbb-aoclkc";
|
||||
reg = <0x0 0x00040 0x0 0x4>;
|
||||
#clock-cells = <1>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
|
||||
uart_AO: serial@4c0 {
|
||||
compatible = "amlogic,meson-uart";
|
||||
reg = <0x0 0x004c0 0x0 0x14>;
|
||||
interrupts = <GIC_SPI 193 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&xtal>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ir: ir@580 {
|
||||
compatible = "amlogic,meson-gxbb-ir";
|
||||
reg = <0x0 0x00580 0x0 0x40>;
|
||||
interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm_ab_AO: pwm@550 {
|
||||
compatible = "amlogic,meson-gxbb-pwm";
|
||||
reg = <0x0 0x0550 0x0 0x10>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c_AO: i2c@500 {
|
||||
compatible = "amlogic,meson-gxbb-i2c";
|
||||
reg = <0x0 0x500 0x0 0x20>;
|
||||
interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&clkc CLKID_AO_I2C>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
periphs: periphs@c8834000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0xc8834000 0x0 0x2000>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;
|
||||
|
||||
rng {
|
||||
compatible = "amlogic,meson-rng";
|
||||
reg = <0x0 0x0 0x0 0x4>;
|
||||
};
|
||||
|
||||
pinctrl_periphs: pinctrl@4b0 {
|
||||
compatible = "amlogic,meson-gxbb-periphs-pinctrl";
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
gpio: bank@4b0 {
|
||||
reg = <0x0 0x004b0 0x0 0x28>,
|
||||
<0x0 0x004e8 0x0 0x14>,
|
||||
<0x0 0x00120 0x0 0x14>,
|
||||
<0x0 0x00430 0x0 0x40>;
|
||||
reg-names = "mux", "pull", "pull-enable", "gpio";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
|
||||
emmc_pins: emmc {
|
||||
mux {
|
||||
groups = "emmc_nand_d07",
|
||||
"emmc_cmd",
|
||||
"emmc_clk";
|
||||
function = "emmc";
|
||||
};
|
||||
};
|
||||
|
||||
nor_pins: nor {
|
||||
mux {
|
||||
groups = "nor_d",
|
||||
"nor_q",
|
||||
"nor_c",
|
||||
"nor_cs";
|
||||
function = "nor";
|
||||
};
|
||||
};
|
||||
|
||||
sdcard_pins: sdcard {
|
||||
mux {
|
||||
groups = "sdcard_d0",
|
||||
"sdcard_d1",
|
||||
"sdcard_d2",
|
||||
"sdcard_d3",
|
||||
"sdcard_cmd",
|
||||
"sdcard_clk";
|
||||
function = "sdcard";
|
||||
};
|
||||
};
|
||||
|
||||
sdio_pins: sdio {
|
||||
mux {
|
||||
groups = "sdio_d0",
|
||||
"sdio_d1",
|
||||
"sdio_d2",
|
||||
"sdio_d3",
|
||||
"sdio_cmd",
|
||||
"sdio_clk";
|
||||
function = "sdio";
|
||||
};
|
||||
};
|
||||
|
||||
sdio_irq_pins: sdio_irq {
|
||||
mux {
|
||||
groups = "sdio_irq";
|
||||
function = "sdio";
|
||||
};
|
||||
};
|
||||
|
||||
uart_a_pins: uart_a {
|
||||
mux {
|
||||
groups = "uart_tx_a",
|
||||
"uart_rx_a";
|
||||
function = "uart_a";
|
||||
};
|
||||
};
|
||||
|
||||
uart_b_pins: uart_b {
|
||||
mux {
|
||||
groups = "uart_tx_b",
|
||||
"uart_rx_b";
|
||||
function = "uart_b";
|
||||
};
|
||||
};
|
||||
|
||||
uart_c_pins: uart_c {
|
||||
mux {
|
||||
groups = "uart_tx_c",
|
||||
"uart_rx_c";
|
||||
function = "uart_c";
|
||||
};
|
||||
};
|
||||
|
||||
i2c_a_pins: i2c_a {
|
||||
mux {
|
||||
groups = "i2c_sck_a",
|
||||
"i2c_sda_a";
|
||||
function = "i2c_a";
|
||||
};
|
||||
};
|
||||
|
||||
i2c_b_pins: i2c_b {
|
||||
mux {
|
||||
groups = "i2c_sck_b",
|
||||
"i2c_sda_b";
|
||||
function = "i2c_b";
|
||||
};
|
||||
};
|
||||
|
||||
i2c_c_pins: i2c_c {
|
||||
mux {
|
||||
groups = "i2c_sck_c",
|
||||
"i2c_sda_c";
|
||||
function = "i2c_c";
|
||||
};
|
||||
};
|
||||
|
||||
eth_pins: eth_c {
|
||||
mux {
|
||||
groups = "eth_mdio",
|
||||
"eth_mdc",
|
||||
"eth_clk_rx_clk",
|
||||
"eth_rx_dv",
|
||||
"eth_rxd0",
|
||||
"eth_rxd1",
|
||||
"eth_rxd2",
|
||||
"eth_rxd3",
|
||||
"eth_rgmii_tx_clk",
|
||||
"eth_tx_en",
|
||||
"eth_txd0",
|
||||
"eth_txd1",
|
||||
"eth_txd2",
|
||||
"eth_txd3";
|
||||
function = "eth";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_a_x_pins: pwm_a_x {
|
||||
mux {
|
||||
groups = "pwm_a_x";
|
||||
function = "pwm_a_x";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_a_y_pins: pwm_a_y {
|
||||
mux {
|
||||
groups = "pwm_a_y";
|
||||
function = "pwm_a_y";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_b_pins: pwm_b {
|
||||
mux {
|
||||
groups = "pwm_b";
|
||||
function = "pwm_b";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_d_pins: pwm_d {
|
||||
mux {
|
||||
groups = "pwm_d";
|
||||
function = "pwm_d";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_e_pins: pwm_e {
|
||||
mux {
|
||||
groups = "pwm_e";
|
||||
function = "pwm_e";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_f_x_pins: pwm_f_x {
|
||||
mux {
|
||||
groups = "pwm_f_x";
|
||||
function = "pwm_f_x";
|
||||
};
|
||||
};
|
||||
|
||||
pwm_f_y_pins: pwm_f_y {
|
||||
mux {
|
||||
groups = "pwm_f_y";
|
||||
function = "pwm_f_y";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hiubus: hiubus@c883c000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0xc883c000 0x0 0x2000>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xc883c000 0x0 0x2000>;
|
||||
|
||||
clkc: clock-controller@0 {
|
||||
compatible = "amlogic,gxbb-clkc";
|
||||
#clock-cells = <1>;
|
||||
reg = <0x0 0x0 0x0 0x3db>;
|
||||
};
|
||||
|
||||
mailbox: mailbox@404 {
|
||||
compatible = "amlogic,meson-gxbb-mhu";
|
||||
reg = <0 0x404 0 0x4c>;
|
||||
interrupts = <0 208 IRQ_TYPE_EDGE_RISING>,
|
||||
<0 209 IRQ_TYPE_EDGE_RISING>,
|
||||
<0 210 IRQ_TYPE_EDGE_RISING>;
|
||||
#mbox-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
apb: apb@d0000000 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0xd0000000 0x0 0x200000>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
ranges = <0x0 0x0 0x0 0xd0000000 0x0 0x200000>;
|
||||
};
|
||||
|
||||
usb0: usb@c9000000 {
|
||||
compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
|
||||
reg = <0x0 0xc9000000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clkc CLKID_USB0_DDR_BRIDGE>;
|
||||
clock-names = "otg";
|
||||
phys = <&usb0_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
dr_mode = "host";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb1: usb@c9100000 {
|
||||
compatible = "amlogic,meson-gxbb-usb", "snps,dwc2";
|
||||
reg = <0x0 0xc9100000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clkc CLKID_USB1_DDR_BRIDGE>;
|
||||
clock-names = "otg";
|
||||
phys = <&usb1_phy>;
|
||||
phy-names = "usb2-phy";
|
||||
dr_mode = "host";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ethmac: ethernet@c9410000 {
|
||||
compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
|
||||
reg = <0x0 0xc9410000 0x0 0x10000
|
||||
0x0 0xc8834540 0x0 0x4>;
|
||||
interrupts = <0 8 1>;
|
||||
interrupt-names = "macirq";
|
||||
clocks = <&clkc CLKID_ETH>,
|
||||
<&clkc CLKID_FCLK_DIV2>,
|
||||
<&clkc CLKID_MPLL2>;
|
||||
clock-names = "stmmaceth", "clkin0", "clkin1";
|
||||
phy-mode = "rgmii";
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
167
arch/arm64/boot/dts/amlogic/mesongxl.dtsi
Normal file
167
arch/arm64/boot/dts/amlogic/mesongxl.dtsi
Normal file
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/mesongxl.dtsi
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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 <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
/ {
|
||||
cpus:cpus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu-map {
|
||||
cluster0:cluster0 {
|
||||
#cooling-cells = <2>; /* min followed by max */
|
||||
core0 {
|
||||
cpu = <&CPU0>;
|
||||
};
|
||||
core1 {
|
||||
cpu = <&CPU1>;
|
||||
};
|
||||
core2 {
|
||||
cpu = <&CPU2>;
|
||||
};
|
||||
core3 {
|
||||
cpu = <&CPU3>;
|
||||
};
|
||||
};
|
||||
};
|
||||
CPU0:cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x0>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU1:cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x1>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
CPU2:cpu@2 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x2>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU3:cpu@3 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x3>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
|
||||
idle-states {
|
||||
entry-method = "arm,psci";
|
||||
|
||||
CPU_SLEEP_0: cpu-sleep-0 {
|
||||
compatible = "arm, idle-state";
|
||||
arm,psci-suspend-param = <0x0010000>;
|
||||
local-timer-stop;
|
||||
entry-latency-us = <3000>;
|
||||
exit-latency-us = <3000>;
|
||||
min-residency-us = <8000>;
|
||||
};
|
||||
|
||||
CLUSTER_SLEEP_0: cluster-sleep-0 {
|
||||
compatible = "arm, idle-state";
|
||||
arm,psci-suspend-param = <0x1010000>;
|
||||
local-timer-stop;
|
||||
entry-latency-us = <3000>;
|
||||
exit-latency-us = <3000>;
|
||||
min-residency-us = <15000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 0xff01>,
|
||||
<GIC_PPI 14 0xff01>,
|
||||
<GIC_PPI 11 0xff01>,
|
||||
<GIC_PPI 10 0xff01>;
|
||||
};
|
||||
timer_bc {
|
||||
compatible = "arm, meson-bc-timer";
|
||||
reg= <0x0 0xc1109990 0x0 0x4 0x0 0xc1109994 0x0 0x4>;
|
||||
timer_name = "Meson TimerF";
|
||||
clockevent-rating=<300>;
|
||||
clockevent-shift=<20>;
|
||||
clockevent-features=<0x23>;
|
||||
interrupts = <0 60 1>;
|
||||
bit_enable=<16>;
|
||||
bit_mode=<12>;
|
||||
bit_resolution=<0>;
|
||||
};
|
||||
arm_pmu {
|
||||
compatible = "arm,armv8-pmuv3";
|
||||
interrupts = <0 137 4>,
|
||||
<0 138 4>,
|
||||
<0 153 4>,
|
||||
<0 154 4>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@2c001000 {
|
||||
compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <0>;
|
||||
interrupt-controller;
|
||||
reg = <0x0 0xc4301000 0 0x1000>,
|
||||
<0x0 0xc4302000 0 0x0100>;
|
||||
interrupts = <GIC_PPI 9 0xf04>;
|
||||
};
|
||||
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci";
|
||||
method = "smc";
|
||||
cpu_suspend = <0xC4000001>;
|
||||
cpu_off = <0x84000002>;
|
||||
cpu_on = <0xC4000003>;
|
||||
migrate = <0xC4000005>;
|
||||
};
|
||||
secmon {
|
||||
compatible = "amlogic, secmon";
|
||||
memory-region = <&secmon_reserved>;
|
||||
in_base_func = <0x82000020>;
|
||||
out_base_func = <0x82000021>;
|
||||
};
|
||||
cpu_iomap{
|
||||
compatible = "amlogic, iomap";
|
||||
#address-cells=<2>;
|
||||
#size-cells=<2>;
|
||||
ranges;
|
||||
io_cbus_base{
|
||||
reg = <0x0 0xc1100000 0x0 0x100000>;
|
||||
};
|
||||
io_apb_base{
|
||||
reg = <0x0 0xd0000000 0x0 0x200000>;
|
||||
};
|
||||
io_aobus_base{
|
||||
reg = <0x0 0xc8100000 0x0 0x100000>;
|
||||
};
|
||||
};
|
||||
|
||||
cpu_version{
|
||||
reg=<0x0 0xc8100220 0x0 0x4>;
|
||||
};
|
||||
};/* end of / */
|
||||
212
arch/arm64/boot/dts/amlogic/mesongxm.dtsi
Normal file
212
arch/arm64/boot/dts/amlogic/mesongxm.dtsi
Normal file
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
* arch/arm64/boot/dts/amlogic/mesongxm.dtsi
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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 <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
/ {
|
||||
cpus:cpus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
|
||||
cpu-map {
|
||||
cluster0:cluster0 {
|
||||
#cooling-cells = <2>; /* min followed by max */
|
||||
core0 {
|
||||
cpu = <&CPU0>;
|
||||
};
|
||||
core1 {
|
||||
cpu = <&CPU1>;
|
||||
};
|
||||
core2 {
|
||||
cpu = <&CPU2>;
|
||||
};
|
||||
core3 {
|
||||
cpu = <&CPU3>;
|
||||
};
|
||||
};
|
||||
cluster1:cluster1 {
|
||||
#cooling-cells = <2>; /* min followed by max */
|
||||
core0 {
|
||||
cpu = <&CPU4>;
|
||||
};
|
||||
core1 {
|
||||
cpu = <&CPU5>;
|
||||
};
|
||||
core2 {
|
||||
cpu = <&CPU6>;
|
||||
};
|
||||
core3 {
|
||||
cpu = <&CPU7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
CPU0:cpu@0 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x0>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU1:cpu@1 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x1>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
CPU2:cpu@2 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x2>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU3:cpu@3 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x3>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU4:cpu@100 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x100>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU5:cpu@101 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x101>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
CPU6:cpu@102 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x102>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
CPU7:cpu@103 {
|
||||
device_type = "cpu";
|
||||
compatible = "arm,cortex-a53","arm,armv8";
|
||||
reg = <0x0 0x103>;
|
||||
enable-method = "psci";
|
||||
cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
|
||||
};
|
||||
|
||||
idle-states {
|
||||
entry-method = "arm,psci";
|
||||
|
||||
CPU_SLEEP_0: cpu-sleep-0 {
|
||||
compatible = "arm, idle-state";
|
||||
arm,psci-suspend-param = <0x0010000>;
|
||||
local-timer-stop;
|
||||
entry-latency-us = <3000>;
|
||||
exit-latency-us = <3000>;
|
||||
min-residency-us = <8000>;
|
||||
};
|
||||
|
||||
CLUSTER_SLEEP_0: cluster-sleep-0 {
|
||||
compatible = "arm, idle-state";
|
||||
arm,psci-suspend-param = <0x1010000>;
|
||||
local-timer-stop;
|
||||
entry-latency-us = <3000>;
|
||||
exit-latency-us = <3000>;
|
||||
min-residency-us = <15000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
timer {
|
||||
compatible = "arm,armv8-timer";
|
||||
interrupts = <GIC_PPI 13 0xff01>,
|
||||
<GIC_PPI 14 0xff01>,
|
||||
<GIC_PPI 11 0xff01>,
|
||||
<GIC_PPI 10 0xff01>;
|
||||
};
|
||||
timer_bc {
|
||||
compatible = "arm, meson-bc-timer";
|
||||
reg= <0x0 0xc1109990 0x0 0x4 0x0 0xc1109994 0x0 0x4>;
|
||||
timer_name = "Meson TimerF";
|
||||
clockevent-rating=<300>;
|
||||
clockevent-shift=<20>;
|
||||
clockevent-features=<0x23>;
|
||||
interrupts = <0 60 1>;
|
||||
bit_enable=<16>;
|
||||
bit_mode=<12>;
|
||||
bit_resolution=<0>;
|
||||
};
|
||||
arm_pmu {
|
||||
compatible = "arm,armv8-pmuv3";
|
||||
interrupts = <0 137 4>,
|
||||
<0 138 4>,
|
||||
<0 153 4>,
|
||||
<0 154 4>;
|
||||
};
|
||||
|
||||
gic: interrupt-controller@2c001000 {
|
||||
compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <0>;
|
||||
interrupt-controller;
|
||||
reg = <0x0 0xc4301000 0 0x1000>,
|
||||
<0x0 0xc4302000 0 0x0100>;
|
||||
interrupts = <GIC_PPI 9 0xf04>;
|
||||
};
|
||||
|
||||
|
||||
psci {
|
||||
compatible = "arm,psci";
|
||||
method = "smc";
|
||||
cpu_suspend = <0xC4000001>;
|
||||
cpu_off = <0x84000002>;
|
||||
cpu_on = <0xC4000003>;
|
||||
migrate = <0xC4000005>;
|
||||
};
|
||||
secmon {
|
||||
compatible = "amlogic, secmon";
|
||||
memory-region = <&secmon_reserved>;
|
||||
in_base_func = <0x82000020>;
|
||||
out_base_func = <0x82000021>;
|
||||
};
|
||||
cpu_iomap{
|
||||
compatible = "amlogic, iomap";
|
||||
#address-cells=<2>;
|
||||
#size-cells=<2>;
|
||||
ranges;
|
||||
io_cbus_base{
|
||||
reg = <0x0 0xc1100000 0x0 0x100000>;
|
||||
};
|
||||
io_apb_base{
|
||||
reg = <0x0 0xd0000000 0x0 0x200000>;
|
||||
};
|
||||
io_aobus_base{
|
||||
reg = <0x0 0xc8100000 0x0 0x100000>;
|
||||
};
|
||||
};
|
||||
|
||||
cpu_version{
|
||||
reg=<0x0 0xc8100220 0x0 0x4>;
|
||||
};
|
||||
};/* end of / */
|
||||
307
arch/arm64/configs/meson64_defconfig
Normal file
307
arch/arm64/configs/meson64_defconfig
Normal file
@@ -0,0 +1,307 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_LOG_BUF_SHIFT=19
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_DEBUG=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
|
||||
CONFIG_CMA=y
|
||||
CONFIG_ZSMALLOC=y
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_ARM_BIG_LITTLE_CPUFREQ=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_DIAG=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_UNIX_DIAG=y
|
||||
CONFIG_XFRM_USER=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_IP_PNP_RARP=y
|
||||
CONFIG_NET_IPIP=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_INET_ESP=y
|
||||
CONFIG_IPV6_ROUTER_PREF=y
|
||||
CONFIG_IPV6_ROUTE_INFO=y
|
||||
CONFIG_IPV6_OPTIMISTIC_DAD=y
|
||||
CONFIG_INET6_AH=y
|
||||
CONFIG_INET6_ESP=y
|
||||
CONFIG_INET6_IPCOMP=y
|
||||
CONFIG_IPV6_MIP6=y
|
||||
CONFIG_IPV6_TUNNEL=y
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NF_CONNTRACK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
CONFIG_NF_CT_PROTO_DCCP=y
|
||||
CONFIG_NF_CT_PROTO_SCTP=y
|
||||
CONFIG_NF_CT_PROTO_UDPLITE=y
|
||||
CONFIG_NF_CONNTRACK_AMANDA=y
|
||||
CONFIG_NF_CONNTRACK_FTP=y
|
||||
CONFIG_NF_CONNTRACK_H323=y
|
||||
CONFIG_NF_CONNTRACK_IRC=y
|
||||
CONFIG_NF_CONNTRACK_NETBIOS_NS=y
|
||||
CONFIG_NF_CONNTRACK_PPTP=y
|
||||
CONFIG_NF_CONNTRACK_SANE=y
|
||||
CONFIG_NF_CONNTRACK_TFTP=y
|
||||
CONFIG_NF_CT_NETLINK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
|
||||
CONFIG_NETFILTER_XT_TARGET_MARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TPROXY=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TRACE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_HELPER=y
|
||||
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
|
||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_MAC=y
|
||||
CONFIG_NETFILTER_XT_MATCH_MARK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_POLICY=y
|
||||
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
|
||||
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STRING=y
|
||||
CONFIG_NETFILTER_XT_MATCH_TIME=y
|
||||
CONFIG_NETFILTER_XT_MATCH_U32=y
|
||||
CONFIG_NF_CONNTRACK_IPV4=y
|
||||
CONFIG_NF_NAT_IPV4=y
|
||||
CONFIG_IP_NF_IPTABLES=y
|
||||
CONFIG_IP_NF_MATCH_AH=y
|
||||
CONFIG_IP_NF_MATCH_ECN=y
|
||||
CONFIG_IP_NF_MATCH_TTL=y
|
||||
CONFIG_IP_NF_FILTER=y
|
||||
CONFIG_IP_NF_TARGET_REJECT=y
|
||||
CONFIG_IP_NF_MANGLE=y
|
||||
CONFIG_IP_NF_RAW=y
|
||||
CONFIG_IP_NF_ARPTABLES=y
|
||||
CONFIG_IP_NF_ARPFILTER=y
|
||||
CONFIG_IP_NF_ARP_MANGLE=y
|
||||
CONFIG_NF_CONNTRACK_IPV6=y
|
||||
CONFIG_NF_NAT_IPV6=y
|
||||
CONFIG_IP6_NF_IPTABLES=y
|
||||
CONFIG_IP6_NF_FILTER=y
|
||||
CONFIG_IP6_NF_TARGET_REJECT=y
|
||||
CONFIG_IP6_NF_MANGLE=y
|
||||
CONFIG_IP6_NF_RAW=y
|
||||
CONFIG_L2TP=y
|
||||
CONFIG_L2TP_DEBUGFS=y
|
||||
CONFIG_L2TP_V3=y
|
||||
CONFIG_L2TP_IP=y
|
||||
CONFIG_L2TP_ETH=y
|
||||
CONFIG_BRIDGE=y
|
||||
# CONFIG_BRIDGE_IGMP_SNOOPING is not set
|
||||
CONFIG_PHONET=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_HTB=y
|
||||
CONFIG_NET_SCH_INGRESS=y
|
||||
CONFIG_NET_CLS_U32=y
|
||||
CONFIG_NET_EMATCH=y
|
||||
CONFIG_NET_EMATCH_U32=y
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
CONFIG_NET_ACT_POLICE=y
|
||||
CONFIG_NET_ACT_GACT=y
|
||||
CONFIG_NET_ACT_MIRRED=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_RFCOMM=y
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
CONFIG_BT_BNEP=y
|
||||
CONFIG_BT_BNEP_MC_FILTER=y
|
||||
CONFIG_BT_BNEP_PROTO_FILTER=y
|
||||
CONFIG_BT_HIDP=y
|
||||
CONFIG_BT_HCIUART=y
|
||||
CONFIG_BT_HCIUART_H4=y
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_AMLOGIC_DRIVER=y
|
||||
CONFIG_AMLOGIC_UART=y
|
||||
CONFIG_AMLOGIC_SERIAL_MESON_CONSOLE=y
|
||||
CONFIG_AMLOGIC_IOMAP=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_CONNECTOR=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_OOPS=y
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
CONFIG_MTD_NAND=y
|
||||
CONFIG_ZRAM=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_DM_CRYPT=y
|
||||
CONFIG_DM_VERITY=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_TUN=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_ICPLUS_PHY=y
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_PPP=y
|
||||
CONFIG_PPP_BSDCOMP=y
|
||||
CONFIG_PPP_DEFLATE=y
|
||||
CONFIG_PPP_FILTER=y
|
||||
CONFIG_PPP_MPPE=y
|
||||
CONFIG_PPP_MULTILINK=y
|
||||
CONFIG_PPPOE=y
|
||||
CONFIG_PPPOL2TP=y
|
||||
CONFIG_PPP_ASYNC=y
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_INPUT_POLLDEV=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_JOYSTICK_XPAD_FF=y
|
||||
CONFIG_JOYSTICK_XPAD_LEDS=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
# CONFIG_DEVMEM is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_WRITABLE_TRIPS=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
|
||||
CONFIG_THERMAL_GOV_USER_SPACE=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_DEVFREQ_THERMAL=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_USB_VIDEO_CLASS=y
|
||||
CONFIG_UHID=y
|
||||
CONFIG_USB_HIDDEV=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_ACM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC3_HOST=y
|
||||
CONFIG_USB_SERIAL=y
|
||||
CONFIG_USB_ISP1301=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
|
||||
CONFIG_UIO=y
|
||||
CONFIG_UIO_PDRV_GENIRQ=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_PM_DEVFREQ=y
|
||||
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
|
||||
CONFIG_DEVFREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_DEVFREQ_GOV_POWERSAVE=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT3_FS_POSIX_ACL=y
|
||||
CONFIG_EXT3_FS_SECURITY=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_QFMT_V2=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_ISO9660_FS=y
|
||||
CONFIG_JOLIET=y
|
||||
CONFIG_ZISOFS=y
|
||||
CONFIG_UDF_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_ECRYPT_FS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_SUMMARY=y
|
||||
CONFIG_JFFS2_FS_XATTR=y
|
||||
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
|
||||
CONFIG_JFFS2_LZO=y
|
||||
CONFIG_JFFS2_RUBIN=y
|
||||
CONFIG_CRAMFS=y
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
CONFIG_NFS_FS=y
|
||||
# CONFIG_NFS_V2 is not set
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
CONFIG_TIMER_STATS=y
|
||||
CONFIG_FTRACE_SYSCALLS=y
|
||||
CONFIG_STACK_TRACER=y
|
||||
CONFIG_FUNCTION_PROFILER=y
|
||||
CONFIG_KGDB=y
|
||||
CONFIG_KGDB_TESTS=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITYFS=y
|
||||
CONFIG_SECURITY_PATH=y
|
||||
CONFIG_LSM_MMAP_MIN_ADDR=0
|
||||
CONFIG_SECURITY_SELINUX=y
|
||||
CONFIG_SECURITY_SMACK=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_MICHAEL_MIC=y
|
||||
CONFIG_CRYPTO_TWOFISH=y
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_CRYPTO_USER_API_HASH=y
|
||||
CONFIG_CRYPTO_USER_API_SKCIPHER=y
|
||||
CONFIG_CRC_T10DIF=y
|
||||
CONFIG_CRC7=y
|
||||
@@ -1,5 +1,7 @@
|
||||
menu "Device Drivers"
|
||||
|
||||
source "drivers/amlogic/Kconfig"
|
||||
|
||||
source "drivers/amba/Kconfig"
|
||||
|
||||
source "drivers/base/Kconfig"
|
||||
|
||||
@@ -173,3 +173,4 @@ obj-$(CONFIG_STM) += hwtracing/stm/
|
||||
obj-$(CONFIG_ANDROID) += android/
|
||||
obj-$(CONFIG_NVMEM) += nvmem/
|
||||
obj-$(CONFIG_FPGA) += fpga/
|
||||
obj-$(CONFIG_AMLOGIC_DRIVER) += amlogic/
|
||||
|
||||
19
drivers/amlogic/Kconfig
Normal file
19
drivers/amlogic/Kconfig
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Amlogic driver configuration
|
||||
#
|
||||
config AMLOGIC_DRIVER
|
||||
bool "Amlogic Peripheral drivers"
|
||||
default n
|
||||
help
|
||||
this option is provided for control amlogic
|
||||
drivers, if you want to use amlogic driver
|
||||
please open it
|
||||
if AMLOGIC_DRIVER
|
||||
menu "Amlogic Device Drivers"
|
||||
|
||||
source "drivers/amlogic/uart/Kconfig"
|
||||
|
||||
source "drivers/amlogic/iomap/Kconfig"
|
||||
|
||||
endmenu
|
||||
endif
|
||||
13
drivers/amlogic/Makefile
Normal file
13
drivers/amlogic/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
##########################################
|
||||
########## Amlogic Drivers ###############
|
||||
##########################################
|
||||
|
||||
##########################################
|
||||
## The order of directories matter.
|
||||
## Do not change.
|
||||
##########################################
|
||||
|
||||
|
||||
obj-$(CONFIG_AMLOGIC_UART) += uart/
|
||||
|
||||
obj-$(CONFIG_AMLOGIC_IOMAP) += iomap/
|
||||
7
drivers/amlogic/iomap/Kconfig
Normal file
7
drivers/amlogic/iomap/Kconfig
Normal file
@@ -0,0 +1,7 @@
|
||||
# Amlogic iomap driver
|
||||
#
|
||||
config AMLOGIC_IOMAP
|
||||
bool "Amlogic iomap support"
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
This is the Amlogic Iomap driver
|
||||
1
drivers/amlogic/iomap/Makefile
Normal file
1
drivers/amlogic/iomap/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
obj-$(CONFIG_AMLOGIC_IOMAP) +=iomap.o
|
||||
270
drivers/amlogic/iomap/iomap.c
Normal file
270
drivers/amlogic/iomap/iomap.c
Normal file
@@ -0,0 +1,270 @@
|
||||
/*
|
||||
* drivers/amlogic/iomap/iomap.c
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/amlogic/iomap.h>
|
||||
#include <asm/compiler.h>
|
||||
#undef pr_fmt
|
||||
#define pr_fmt(fmt) "aml_iomap: " fmt
|
||||
|
||||
|
||||
static const struct of_device_id iomap_dt_match[] = {
|
||||
{ .compatible = "amlogic, iomap" },
|
||||
{ /* sentinel */ },
|
||||
};
|
||||
void __iomem *meson_reg_map[IO_BUS_MAX];
|
||||
|
||||
int aml_reg_read(u32 bus_type, unsigned int reg, unsigned int *val)
|
||||
{
|
||||
if ((bus_type >= IO_CBUS_BASE) && (bus_type < IO_BUS_MAX)) {
|
||||
*val = readl((meson_reg_map[bus_type]+reg));
|
||||
return 0;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_reg_read);
|
||||
|
||||
int aml_reg_write(u32 bus_type, unsigned int reg, unsigned int val)
|
||||
{
|
||||
if ((bus_type >= IO_CBUS_BASE) && (bus_type < IO_BUS_MAX)) {
|
||||
writel(val, (meson_reg_map[bus_type]+reg));
|
||||
return 0;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_reg_write);
|
||||
|
||||
int aml_regmap_update_bits(u32 bus_type,
|
||||
unsigned int reg, unsigned int mask,
|
||||
unsigned int val)
|
||||
{
|
||||
if ((bus_type >= IO_CBUS_BASE) && (bus_type < IO_BUS_MAX)) {
|
||||
unsigned int tmp, orig;
|
||||
|
||||
aml_reg_read(bus_type, reg, &orig);
|
||||
tmp = orig & ~mask;
|
||||
tmp |= val & mask;
|
||||
aml_reg_write(bus_type, reg, tmp);
|
||||
return 0;
|
||||
} else
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_regmap_update_bits);
|
||||
|
||||
/*
|
||||
* CBUS REG Read Write and Update some bits
|
||||
*/
|
||||
int aml_read_cbus(unsigned int reg)
|
||||
{
|
||||
int ret, val;
|
||||
|
||||
ret = aml_reg_read(IO_CBUS_BASE, reg<<2, &val);
|
||||
if (ret) {
|
||||
pr_err("read cbus reg %x error %d\n", reg, ret);
|
||||
return -1;
|
||||
} else
|
||||
return val;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_read_cbus);
|
||||
|
||||
void aml_write_cbus(unsigned int reg, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_reg_write(IO_CBUS_BASE, reg<<2, val);
|
||||
if (ret)
|
||||
pr_err("write cbus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_write_cbus);
|
||||
|
||||
void aml_cbus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_regmap_update_bits(IO_CBUS_BASE, reg<<2, mask, val);
|
||||
if (ret)
|
||||
pr_err("write cbus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_cbus_update_bits);
|
||||
|
||||
/*
|
||||
* AO REG Read Write and Update some bits
|
||||
*/
|
||||
int aml_read_aobus(unsigned int reg)
|
||||
{
|
||||
int ret, val;
|
||||
|
||||
ret = aml_reg_read(IO_AOBUS_BASE, reg, &val);
|
||||
if (ret) {
|
||||
pr_err("read ao bus reg %x error %d\n", reg, ret);
|
||||
return -1;
|
||||
} else
|
||||
return val;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_read_aobus);
|
||||
|
||||
void aml_write_aobus(unsigned int reg, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_reg_write(IO_AOBUS_BASE, reg, val);
|
||||
if (ret)
|
||||
pr_err("write ao bus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_write_aobus);
|
||||
|
||||
void aml_aobus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_regmap_update_bits(IO_AOBUS_BASE, reg, mask, val);
|
||||
if (ret)
|
||||
pr_err("write aobus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_aobus_update_bits);
|
||||
|
||||
|
||||
/*
|
||||
** VCBUS Bus REG Read Write and Update some bits
|
||||
*/
|
||||
int aml_read_vcbus(unsigned int reg)
|
||||
{
|
||||
int ret, val;
|
||||
|
||||
ret = aml_reg_read(IO_APB_BUS_BASE, (0x100000+(reg<<2)), &val);
|
||||
if (ret) {
|
||||
pr_err("read vcbus reg %x error %d\n", reg, ret);
|
||||
return -1;
|
||||
} else
|
||||
return val;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_read_vcbus);
|
||||
|
||||
|
||||
void aml_write_vcbus(unsigned int reg, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_reg_write(IO_APB_BUS_BASE, (0x100000+(reg<<2)), val);
|
||||
if (ret)
|
||||
pr_err("write vcbus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_write_vcbus);
|
||||
|
||||
void aml_vcbus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_regmap_update_bits(IO_APB_BUS_BASE,
|
||||
(0x100000+(reg<<2)), mask, val);
|
||||
if (ret)
|
||||
pr_err("write vcbus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_vcbus_update_bits);
|
||||
|
||||
|
||||
/*
|
||||
** DOS BUS Bus REG Read Write and Update some bits
|
||||
*/
|
||||
int aml_read_dosbus(unsigned int reg)
|
||||
{
|
||||
int ret, val;
|
||||
|
||||
ret = aml_reg_read(IO_APB_BUS_BASE, (0x50000+(reg<<2)), &val);
|
||||
if (ret) {
|
||||
pr_err("read vcbus reg %x error %d\n", reg, ret);
|
||||
return -1;
|
||||
} else
|
||||
return val;
|
||||
}
|
||||
EXPORT_SYMBOL(aml_read_dosbus);
|
||||
|
||||
void aml_write_dosbus(unsigned int reg, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_reg_write(IO_APB_BUS_BASE, (0x50000+(reg<<2)), val);
|
||||
if (ret)
|
||||
pr_err("write vcbus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_write_dosbus);
|
||||
|
||||
void aml_dosbus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = aml_regmap_update_bits(IO_APB_BUS_BASE,
|
||||
(0x50000+(reg<<2)), mask, val);
|
||||
if (ret)
|
||||
pr_err("write vcbus reg %x error %d\n", reg, ret);
|
||||
}
|
||||
EXPORT_SYMBOL(aml_dosbus_update_bits);
|
||||
|
||||
static int iomap_probe(struct platform_device *pdev)
|
||||
{
|
||||
int i = 0;
|
||||
/* void __iomem *base; */
|
||||
struct resource res;
|
||||
struct device_node *np, *child;
|
||||
|
||||
np = pdev->dev.of_node;
|
||||
|
||||
for_each_child_of_node(np, child) {
|
||||
if (of_address_to_resource(child, 0, &res))
|
||||
return -1;
|
||||
meson_reg_map[i] = ioremap(res.start, resource_size(&res));
|
||||
i++;
|
||||
}
|
||||
pr_info("amlogic iomap probe done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct platform_driver iomap_platform_driver = {
|
||||
.probe = iomap_probe,
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "iomap_version",
|
||||
.of_match_table = iomap_dt_match,
|
||||
},
|
||||
};
|
||||
|
||||
int __init meson_iomap_version_init(void)
|
||||
{
|
||||
|
||||
int ret;
|
||||
|
||||
ret = platform_driver_register(&iomap_platform_driver);
|
||||
|
||||
return ret;
|
||||
}
|
||||
core_initcall(meson_iomap_version_init);
|
||||
34
drivers/amlogic/uart/Kconfig
Normal file
34
drivers/amlogic/uart/Kconfig
Normal file
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Amlogic driver configuration
|
||||
#
|
||||
|
||||
config AMLOGIC_UART
|
||||
bool "Serial support"
|
||||
select SERIAL_CORE
|
||||
select SERIAL_EARLYCON
|
||||
default n
|
||||
help
|
||||
Add support for the Amlogic serial port.
|
||||
this config only ctrl in makefile
|
||||
this config do not in meson_uart.c
|
||||
this config add
|
||||
|
||||
config AMLOGIC_SERIAL_MESON_CONSOLE
|
||||
bool "Console on Amlogic Serial port"
|
||||
select SERIAL_CORE_CONSOLE
|
||||
default n
|
||||
help
|
||||
Support for running a console on the Amlogic serial
|
||||
this config is only
|
||||
used in meson_uart.c
|
||||
so so
|
||||
|
||||
config AMLOGIC_PRINTK_NOBLOCK_MODE
|
||||
bool "printk with no block"
|
||||
depends on AMLOGIC_SERIAL_MESON_CONSOLE
|
||||
default n
|
||||
help
|
||||
printk with no block
|
||||
push tx data to internal buffer first
|
||||
default size of internal buffer is 128K
|
||||
when enabled, new_printk_enabled=1
|
||||
1
drivers/amlogic/uart/Makefile
Normal file
1
drivers/amlogic/uart/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
obj-$(CONFIG_AMLOGIC_UART) += meson_uart.o
|
||||
1251
drivers/amlogic/uart/meson_uart.c
Normal file
1251
drivers/amlogic/uart/meson_uart.c
Normal file
File diff suppressed because it is too large
Load Diff
102
drivers/amlogic/uart/meson_uart.h
Normal file
102
drivers/amlogic/uart/meson_uart.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* drivers/amlogic/uart/meson_uart.h
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_AM_UART_H
|
||||
#define _LINUX_AM_UART_H
|
||||
/* #include <mach/am_regs.h> */
|
||||
|
||||
#define UART_OVERFLOW_ERR (0x01<<18)
|
||||
#define UART_FRAME_ERR (0x01<<17)
|
||||
#define UART_PARITY_ERR (0x01<<16)
|
||||
|
||||
#define UART_CLEAR_ERR (0x01<<24)
|
||||
|
||||
#define UART_RXENB (0x01<<13)
|
||||
#define UART_RXEMPTY (0x01<<20)
|
||||
#define UART_RXFULL (0x01<<19)
|
||||
#define UART_TXENB (0x01<<12)
|
||||
#define UART_TXEMPTY (0x01<<22)
|
||||
#define UART_TXFULL (0x01<<21)
|
||||
|
||||
#define UART_TXRST (0x01<<22)
|
||||
#define UART_RXRST (0x01<<23)
|
||||
#define UART_RXINT_EN (0x01<<27)
|
||||
#define UART_TXINT_EN (0x01<<28)
|
||||
|
||||
#define UART_WFIFO 0
|
||||
#define UART_RFIFO 1
|
||||
#define UART_CONTROL 2
|
||||
#define UART_STATUS 3
|
||||
#define UART_MISC 4
|
||||
#define UART_REG5 5
|
||||
|
||||
#define P_UART(uart_base, reg) CBUS_REG_ADDR(uart_base+reg)
|
||||
#define P_UART_WFIFO(uart_base) P_UART(uart_base, UART_WFIFO)
|
||||
#define P_UART_RFIFO(uart_base) P_UART(uart_base, UART_RFIFO)
|
||||
|
||||
#define P_UART_CONTROL(uart_base) P_UART(uart_base, UART_CONTROL)
|
||||
#define UART_CNTL_MASK_BAUD_RATE (0xfff)
|
||||
#define UART_CNTL_MASK_TX_EN (1<<12)
|
||||
#define UART_CNTL_MASK_RX_EN (1<<13)
|
||||
#define UART_CNTL_MASK_2WIRE (1<<15)
|
||||
#define UART_CNTL_MASK_STP_BITS (3<<16)
|
||||
#define UART_CNTL_MASK_STP_1BIT (0<<16)
|
||||
#define UART_CNTL_MASK_STP_2BIT (1<<16)
|
||||
#define UART_CNTL_MASK_PRTY_EVEN (0<<18)
|
||||
#define UART_CNTL_MASK_PRTY_ODD (1<<18)
|
||||
#define UART_CNTL_MASK_PRTY_TYPE (1<<18)
|
||||
#define UART_CNTL_MASK_PRTY_EN (1<<19)
|
||||
#define UART_CNTL_MASK_CHAR_LEN (3<<20)
|
||||
#define UART_CNTL_MASK_CHAR_8BIT (0<<20)
|
||||
#define UART_CNTL_MASK_CHAR_7BIT (1<<20)
|
||||
#define UART_CNTL_MASK_CHAR_6BIT (2<<20)
|
||||
#define UART_CNTL_MASK_CHAR_5BIT (3<<20)
|
||||
#define UART_CNTL_MASK_RST_TX (1<<22)
|
||||
#define UART_CNTL_MASK_RST_RX (1<<23)
|
||||
#define UART_CNTL_MASK_CLR_ERR (1<<24)
|
||||
#define UART_CNTL_MASK_INV_RX (1<<25)
|
||||
#define UART_CNTL_MASK_INV_TX (1<<26)
|
||||
#define UART_CNTL_MASK_RINT_EN (1<<27)
|
||||
#define UART_CNTL_MASK_TINT_EN (1<<28)
|
||||
#define UART_CNTL_MASK_INV_CTS (1<<29)
|
||||
#define UART_CNTL_MASK_MASK_ERR (1<<30)
|
||||
#define UART_CNTL_MASK_INV_RTS (1<<31)
|
||||
#define P_UART_STATUS(uart_base) P_UART(uart_base, UART_STATUS)
|
||||
#define UART_STAT_MASK_RFIFO_CNT (0x7f<<0)
|
||||
#define UART_STAT_MASK_TFIFO_CNT (0x7f<<8)
|
||||
#define UART_STAT_MASK_PRTY_ERR (1<<16)
|
||||
#define UART_STAT_MASK_FRAM_ERR (1<<17)
|
||||
#define UART_STAT_MASK_WFULL_ERR (1<<18)
|
||||
#define UART_STAT_MASK_RFIFO_FULL (1<<19)
|
||||
#define UART_STAT_MASK_RFIFO_EMPTY (1<<20)
|
||||
#define UART_STAT_MASK_TFIFO_FULL (1<<21)
|
||||
#define UART_STAT_MASK_TFIFO_EMPTY (1<<22)
|
||||
#define P_UART_MISC(uart_base) P_UART(uart_base, UART_MISC)
|
||||
|
||||
|
||||
#define SERIAL_MAGIC 0x5301
|
||||
|
||||
/*
|
||||
* This should be used by drivers which want to register
|
||||
* their own 8250 ports without registering their own
|
||||
* platform device. Using these will make your driver
|
||||
* dependent on the 8250 driver.
|
||||
*/
|
||||
struct uart_port;
|
||||
|
||||
|
||||
#endif
|
||||
83
include/linux/amlogic/iomap.h
Normal file
83
include/linux/amlogic/iomap.h
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* include/linux/amlogic/iomap.h
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SOC_IO_H
|
||||
#define __SOC_IO_H
|
||||
|
||||
enum{
|
||||
IO_CBUS_BASE = 0,
|
||||
IO_APB_BUS_BASE,
|
||||
IO_AOBUS_BASE,
|
||||
IO_HIUBUS_BASE,
|
||||
IO_BUS_MAX,
|
||||
};
|
||||
extern int aml_reg_read(u32 bus_type, unsigned int reg, unsigned int *val);
|
||||
extern int aml_reg_write(u32 bus_type, unsigned int reg, unsigned int val);
|
||||
extern int aml_regmap_update_bits(u32 bus_type,
|
||||
unsigned int reg, unsigned int mask,
|
||||
unsigned int val);
|
||||
/*
|
||||
** CBUS REG Read Write and Update some bits
|
||||
*/
|
||||
extern int aml_read_cbus(unsigned int reg);
|
||||
|
||||
|
||||
extern void aml_write_cbus(unsigned int reg, unsigned int val);
|
||||
|
||||
|
||||
extern void aml_cbus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val);
|
||||
|
||||
/*
|
||||
** AO REG Read Write and Update some bits
|
||||
*/
|
||||
extern int aml_read_aobus(unsigned int reg);
|
||||
|
||||
|
||||
extern void aml_write_aobus(unsigned int reg, unsigned int val);
|
||||
|
||||
|
||||
extern void aml_aobus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** VCBUS Bus REG Read Write and Update some bits
|
||||
*/
|
||||
extern int aml_read_vcbus(unsigned int reg);
|
||||
|
||||
extern void aml_write_vcbus(unsigned int reg, unsigned int val);
|
||||
|
||||
extern void aml_vcbus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val);
|
||||
|
||||
|
||||
/*
|
||||
** DOS BUS Bus REG Read Write and Update some bits
|
||||
*/
|
||||
extern int aml_read_dosbus(unsigned int reg);
|
||||
|
||||
extern void aml_write_dosbus(unsigned int reg, unsigned int val);
|
||||
|
||||
extern void aml_dosbus_update_bits(unsigned int reg,
|
||||
unsigned int mask, unsigned int val);
|
||||
|
||||
extern int aml_read_sec_reg(unsigned int reg);
|
||||
extern void aml_write_sec_reg(unsigned int reg, unsigned int val);
|
||||
|
||||
#endif
|
||||
185
scripts/amlogic/licence_check.pl
Executable file
185
scripts/amlogic/licence_check.pl
Executable file
@@ -0,0 +1,185 @@
|
||||
#!/usr/bin/perl -W
|
||||
#
|
||||
# licence_check.pl V0.10
|
||||
#
|
||||
# jianxin.pan@2016-11-25
|
||||
|
||||
|
||||
use File::Basename;
|
||||
use File::Find;
|
||||
|
||||
$sc_dir = File::Spec->rel2abs(dirname( "$0") ) ;
|
||||
$sc_dir =~ s/\/scripts\/amlogic//;
|
||||
my $top = "$sc_dir";
|
||||
|
||||
my $nofix = 0;
|
||||
my $failno = 0;
|
||||
my $shname = $0;
|
||||
#@ARGV=("../../include/linux/amlogic","../../drivers/amlogic" ) ;
|
||||
my @path;
|
||||
for(@ARGV)
|
||||
{
|
||||
my $dir =$_;
|
||||
if(/^\//)
|
||||
{
|
||||
}
|
||||
elsif(/--nofix/)
|
||||
{
|
||||
$nofix = 1;
|
||||
next;
|
||||
}
|
||||
else
|
||||
{
|
||||
$dir = File::Spec->rel2abs($dir);
|
||||
#print "\n Real2abs Dir: --$dir-- \n";
|
||||
}
|
||||
push(@path,$dir);
|
||||
}
|
||||
|
||||
|
||||
my $licence=
|
||||
"/*
|
||||
* File_name_here
|
||||
*
|
||||
* Copyright (C) 2017 Amlogic, Inc. All rights reserved.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/\n\n";
|
||||
|
||||
|
||||
#print $licence;
|
||||
|
||||
sub licence_process
|
||||
{
|
||||
my ($file_name) = @_;
|
||||
my $d = dirname($file_name);
|
||||
my $f = basename($file_name);
|
||||
#print "\n Abs <$d>, f_ $f";
|
||||
#print "\n Top: <$top> ";
|
||||
my $log_name = File::Spec->abs2rel($d, $top);
|
||||
$log_name =$log_name."\/";
|
||||
$log_name .=basename($file_name);
|
||||
my $len = length($log_name);
|
||||
if($len > 76)
|
||||
{
|
||||
$log_name =basename($file_name);
|
||||
$len = length($log_name);
|
||||
if($len > 76)
|
||||
{
|
||||
$log_name ="";
|
||||
}
|
||||
}
|
||||
#print "\n Process: ",$log_name;
|
||||
$licence_0=$licence;
|
||||
$licence_0=~s/File_name_here/$log_name/;
|
||||
my $count = 0;
|
||||
my $text_0="";
|
||||
my $text_all=$licence_0;
|
||||
open(my $f_in, '<', $file_name) or die "Can't Open $file_name: For Read \n";
|
||||
my ($left,$right, $lineno,$space) = (0, 0, 0,0);
|
||||
while ($line = <$f_in>)
|
||||
{
|
||||
$text_0 .= $line;
|
||||
#Empty Line or Line marked by //
|
||||
if(($space==0) &&(($line =~/^\s*$/)||
|
||||
(($line =~/^\s*\/\//)&&($line !~ /\*\//))))
|
||||
{
|
||||
#print "\n Line $lineno is empty.";
|
||||
}
|
||||
elsif(($space==0) &&($line =~ /^\s*\/\*/)) #Match /*
|
||||
{
|
||||
$left ++;
|
||||
#print "\n L Matched: $lineno $line, $left "; #Match that /* and */ in the same line
|
||||
if($line =~ /\*\//)
|
||||
{
|
||||
$right ++;
|
||||
#print "\n L Matched: $lineno $line, $left ";
|
||||
}
|
||||
}
|
||||
elsif(($space==0) &&($line =~ /\*\//)&& ($line !~ /\/\*/) ) #Match */
|
||||
{
|
||||
$right ++;
|
||||
#print "\n R Matched: $lineno $line, $right ";
|
||||
if($left == $right)
|
||||
{
|
||||
$space = 1;
|
||||
}
|
||||
}
|
||||
elsif($left==$right) #Content Lines
|
||||
{
|
||||
if(($line =~/^\s*$/)&& ($count==0))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
#print $line;
|
||||
$space = 1;
|
||||
$count +=1;
|
||||
$text_all .=$line;
|
||||
}
|
||||
}
|
||||
$lineno++;
|
||||
}
|
||||
close($f_in);
|
||||
|
||||
if($text_0 ne $text_all)
|
||||
{
|
||||
$failno ++;
|
||||
if($nofix)
|
||||
{
|
||||
print "\n Licence_WARN: <";
|
||||
print File::Spec->abs2rel($file_name, $top).">\n";;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "\n Licence_FIXED: <";
|
||||
print File::Spec->abs2rel($file_name, $top).">\n";;
|
||||
open(my $f_out, '>', $file_name)
|
||||
or die "Can't Open $file_name\n";
|
||||
print $f_out $text_all;
|
||||
close $f_out;
|
||||
}
|
||||
}
|
||||
$text_all='';
|
||||
}
|
||||
|
||||
|
||||
my ($c_cnt, $h_cnt) = (0, 0);
|
||||
sub process
|
||||
{
|
||||
my $file = $File::Find::name;
|
||||
if (-f $file)
|
||||
{
|
||||
if(($file =~ /.*\.[CchH]$/i))
|
||||
{
|
||||
$c_cnt++;
|
||||
licence_process($file);
|
||||
}
|
||||
if(($file =~ /.*\.dts$/i))
|
||||
{
|
||||
$c_cnt++;
|
||||
licence_process($file);
|
||||
}
|
||||
if(($file =~ /.*\.dtsi$/i))
|
||||
{
|
||||
$c_cnt++;
|
||||
licence_process($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(@path)
|
||||
{
|
||||
#print "\n Fine $_ \n";
|
||||
find(\&process, $_);
|
||||
}
|
||||
57
scripts/amlogic/licence_pre.pl
Executable file
57
scripts/amlogic/licence_pre.pl
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/perl -W
|
||||
|
||||
|
||||
my $FILE;
|
||||
$flist = " ";
|
||||
$driv = "drivers/amlogic/";
|
||||
$incs = "include/linux/amlogic/";
|
||||
$dts = "arch/arm64/boot/dts/amlogic/";
|
||||
open($FILE, '<&STDIN');
|
||||
while (<$FILE>) {
|
||||
chomp;
|
||||
my $line = $_;
|
||||
my $new = "";
|
||||
if($line =~/^A\s+(.+\.[cChH])/)
|
||||
{
|
||||
$new = $1;
|
||||
}
|
||||
elsif(/^A\s+(.+\.dts*)/i)
|
||||
{
|
||||
$new = $1;
|
||||
}
|
||||
if( -e $new)
|
||||
{
|
||||
if($new =~/$driv/ || $new =~/$incs/ || $new =~/$dts/)
|
||||
{
|
||||
$flist = $flist.$new." ";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
close $FILE;
|
||||
|
||||
if($flist =~/^\s*$/)
|
||||
{
|
||||
#print "\n LicenceCheck exit:No *.[CcHh] added.\n\n";
|
||||
exit 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
print "\n Check :$flist\n";
|
||||
}
|
||||
|
||||
$match = "Licence_WARN: <";
|
||||
$pl = "./scripts/amlogic/licence_check.pl";
|
||||
$out = 0;
|
||||
$result_0 = `$pl --nofix $flist`;
|
||||
if($result_0 =~/$match/)
|
||||
{
|
||||
$out =1;
|
||||
print $result_0;
|
||||
print "\n Licence Check Error, please try to fix:\n $pl $flist\n\n"
|
||||
}
|
||||
else
|
||||
{
|
||||
print "\n Licence Check OK\n\n"
|
||||
}
|
||||
exit $out;
|
||||
12
scripts/amlogic/mk_dtb.sh
Executable file
12
scripts/amlogic/mk_dtb.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#! /bin/bash
|
||||
|
||||
export CROSS_COMPILE=/opt/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
|
||||
|
||||
|
||||
make ARCH=arm64 gxm_q200_2g.dtb || echo "Compile dtb Fail !!"
|
||||
|
||||
make ARCH=arm64 gxm_skt.dtb || echo "Compile dtb Fail !!"
|
||||
|
||||
make ARCH=arm64 gxl_p212_2g.dtb || echo "Compile dtb Fail !!"
|
||||
|
||||
make ARCH=arm64 gxl_p212_1g.dtb || echo "Compile dtb Fail !!"
|
||||
6
scripts/amlogic/mk_gx.sh
Executable file
6
scripts/amlogic/mk_gx.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#! /bin/bash
|
||||
|
||||
export CROSS_COMPILE=/opt/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
|
||||
|
||||
make ARCH=arm64 meson64_defconfig
|
||||
make ARCH=arm64 -j8 Image || echo "Compile Image Fail !!"
|
||||
23
scripts/amlogic/pre-commit
Executable file
23
scripts/amlogic/pre-commit
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# pre-commit hook to run check-patch on the output and stop any commits
|
||||
# that do not pass. Note, only for git-commit, and not for any of the
|
||||
# other scenarios
|
||||
#
|
||||
# Copyright 2010 Ben Dooks, <ben-linux@fluff.org>
|
||||
|
||||
if git rev-parse --verify HEAD 2>/dev/null >/dev/null
|
||||
then
|
||||
against=HEAD
|
||||
else
|
||||
# Initial commit: diff against an empty tree object
|
||||
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
||||
fi
|
||||
|
||||
git diff --cached --stat -p $against -- | ./scripts/checkpatch.pl --no-signoff -
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
git diff --name-status --cached $against -- | ./scripts/amlogic/licence_pre.pl -
|
||||
Reference in New Issue
Block a user