From d7834b46faf152641724382bb6a89c2f216c9e66 Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Wed, 16 Mar 2016 12:27:28 +0800 Subject: [PATCH] ARM64: dts: rockchip: add dts files for rk3399 The dts files include three level: - rk3399.dtsi includes nodes who closed to SoC, such as cpu\pmu\cru\i2c\pinctl\iommu... - rk3399-tb.dtsi includes nodes who required by main board, they are common nodes for both chromeos and android; also to enable node from rk3399.dtsi if needs - rk3399-monkey.dts used by evb board with android system - rk3399-chrome.dts used by evb board with chromeos system Change-Id: I02e21a8d184e74c96807f3b8b72075d466e1027f Signed-off-by: Jianqun Xu --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../arm64/boot/dts/rockchip/rk3399-chrome.dts | 15 +--- .../arm64/boot/dts/rockchip/rk3399-monkey.dts | 81 +++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-tb.dtsi | 62 ++++++++++++++ 4 files changed, 145 insertions(+), 14 deletions(-) create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-monkey.dts create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-tb.dtsi diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 3a15b471e282..972df23f6022 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-tb-sheep.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-chrome.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-fpga.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-monkey.dtb always := $(dtb-y) subdir-y := $(dts-dirs) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-chrome.dts b/arch/arm64/boot/dts/rockchip/rk3399-chrome.dts index 4ef705663bcb..691866896651 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-chrome.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-chrome.dts @@ -41,7 +41,7 @@ */ /dts-v1/; -#include "rk3399.dtsi" +#include "rk3399-tb.dtsi" / { model = "Rockchip Chrome"; @@ -57,16 +57,3 @@ }; }; -&i2s0 { - status = "okay"; -}; - -&tsadc { - rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ - rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-monkey.dts b/arch/arm64/boot/dts/rockchip/rk3399-monkey.dts new file mode 100644 index 000000000000..8e15ac476d53 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-monkey.dts @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd + * + * 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 file 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 file 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 "rk3399-tb.dtsi" + +/ { + model = "Rockchip monkey"; + compatible = "rockchip,android", "rockchip,rk3399"; + + chosen { + bootargs = "console=uart,mmio32,0xff690000"; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* global autoconfigured region for contiguous allocations */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x8000000>; + linux,cma-default; + }; + }; + + ion { + compatible = "rockchip,ion"; + #address-cells = <1>; + #size-cells = <0>; + + cma-heap { + reg = <0x00000000 0x02000000>; + }; + + system-heap { + }; + }; +}; + diff --git a/arch/arm64/boot/dts/rockchip/rk3399-tb.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-tb.dtsi new file mode 100644 index 000000000000..9f272c1f245c --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3399-tb.dtsi @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd + * + * 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 file 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 file 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 "rk3399.dtsi" + +/ { + compatible = "rockchip,tb", "rockchip,rk3399"; +}; + +&i2s0 { + status = "okay"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + -- 2.34.1