1c246e9d6SNeil Armstrong/*
2c246e9d6SNeil Armstrong * Copyright (c) 2016 Andreas Färber
3c246e9d6SNeil Armstrong * Copyright (c) 2016 BayLibre, Inc.
4c246e9d6SNeil Armstrong * Author: Neil Armstrong <narmstrong@kernel.org>
5c246e9d6SNeil Armstrong *
6c246e9d6SNeil Armstrong * This file is dual-licensed: you can use it either under the terms
7c246e9d6SNeil Armstrong * of the GPL or the X11 license, at your option. Note that this dual
8c246e9d6SNeil Armstrong * licensing only applies to this file, and not this project as a
9c246e9d6SNeil Armstrong * whole.
10c246e9d6SNeil Armstrong *
11c246e9d6SNeil Armstrong *  a) This library is free software; you can redistribute it and/or
12c246e9d6SNeil Armstrong *     modify it under the terms of the GNU General Public License as
13c246e9d6SNeil Armstrong *     published by the Free Software Foundation; either version 2 of the
14c246e9d6SNeil Armstrong *     License, or (at your option) any later version.
15c246e9d6SNeil Armstrong *
16c246e9d6SNeil Armstrong *     This library is distributed in the hope that it will be useful,
17c246e9d6SNeil Armstrong *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18c246e9d6SNeil Armstrong *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19c246e9d6SNeil Armstrong *     GNU General Public License for more details.
20c246e9d6SNeil Armstrong *
21c246e9d6SNeil Armstrong * Or, alternatively,
22c246e9d6SNeil Armstrong *
23c246e9d6SNeil Armstrong *  b) Permission is hereby granted, free of charge, to any person
24c246e9d6SNeil Armstrong *     obtaining a copy of this software and associated documentation
25c246e9d6SNeil Armstrong *     files (the "Software"), to deal in the Software without
26c246e9d6SNeil Armstrong *     restriction, including without limitation the rights to use,
27c246e9d6SNeil Armstrong *     copy, modify, merge, publish, distribute, sublicense, and/or
28c246e9d6SNeil Armstrong *     sell copies of the Software, and to permit persons to whom the
29c246e9d6SNeil Armstrong *     Software is furnished to do so, subject to the following
30c246e9d6SNeil Armstrong *     conditions:
31c246e9d6SNeil Armstrong *
32c246e9d6SNeil Armstrong *     The above copyright notice and this permission notice shall be
33c246e9d6SNeil Armstrong *     included in all copies or substantial portions of the Software.
34c246e9d6SNeil Armstrong *
35c246e9d6SNeil Armstrong *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36c246e9d6SNeil Armstrong *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37c246e9d6SNeil Armstrong *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38c246e9d6SNeil Armstrong *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39c246e9d6SNeil Armstrong *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40c246e9d6SNeil Armstrong *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41c246e9d6SNeil Armstrong *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42c246e9d6SNeil Armstrong *     OTHER DEALINGS IN THE SOFTWARE.
43c246e9d6SNeil Armstrong */
44c246e9d6SNeil Armstrong
45c246e9d6SNeil Armstrong/dts-v1/;
46c246e9d6SNeil Armstrong
47c246e9d6SNeil Armstrong#include "meson-gxbb.dtsi"
48c246e9d6SNeil Armstrong#include <dt-bindings/gpio/gpio.h>
49c246e9d6SNeil Armstrong#include <dt-bindings/input/input.h>
50c246e9d6SNeil Armstrong
51c246e9d6SNeil Armstrong/ {
52c246e9d6SNeil Armstrong	compatible = "nexbox,a95x", "amlogic,meson-gxbb";
53c246e9d6SNeil Armstrong	model = "NEXBOX A95X";
54c246e9d6SNeil Armstrong
55c246e9d6SNeil Armstrong	aliases {
56c246e9d6SNeil Armstrong		serial0 = &uart_AO;
57c246e9d6SNeil Armstrong	};
58c246e9d6SNeil Armstrong
59c246e9d6SNeil Armstrong	chosen {
60c246e9d6SNeil Armstrong		stdout-path = "serial0:115200n8";
61c246e9d6SNeil Armstrong	};
62c246e9d6SNeil Armstrong
63c246e9d6SNeil Armstrong	memory@0 {
64c246e9d6SNeil Armstrong		device_type = "memory";
65c246e9d6SNeil Armstrong		reg = <0x0 0x0 0x0 0x40000000>;
66c246e9d6SNeil Armstrong	};
67c246e9d6SNeil Armstrong
68c246e9d6SNeil Armstrong	leds {
69c246e9d6SNeil Armstrong		compatible = "gpio-leds";
70c246e9d6SNeil Armstrong		blue {
71c246e9d6SNeil Armstrong			label = "a95x:system-status";
72c246e9d6SNeil Armstrong			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
73c246e9d6SNeil Armstrong			linux,default-trigger = "heartbeat";
74c246e9d6SNeil Armstrong			default-state = "off";
75c246e9d6SNeil Armstrong		};
76c246e9d6SNeil Armstrong	};
77c246e9d6SNeil Armstrong
78c246e9d6SNeil Armstrong	gpio-keys-polled {
79c246e9d6SNeil Armstrong		compatible = "gpio-keys-polled";
80c246e9d6SNeil Armstrong		#address-cells = <1>;
81c246e9d6SNeil Armstrong		#size-cells = <0>;
82c246e9d6SNeil Armstrong		poll-interval = <100>;
83c246e9d6SNeil Armstrong
84c246e9d6SNeil Armstrong		button@0 {
85c246e9d6SNeil Armstrong			label = "reset";
86c246e9d6SNeil Armstrong			linux,code = <KEY_RESTART>;
87c246e9d6SNeil Armstrong			gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
88c246e9d6SNeil Armstrong		};
89c246e9d6SNeil Armstrong	};
90c246e9d6SNeil Armstrong};
91c246e9d6SNeil Armstrong
92c246e9d6SNeil Armstrong&uart_AO {
93c246e9d6SNeil Armstrong	status = "okay";
94c246e9d6SNeil Armstrong	pinctrl-0 = <&uart_ao_a_pins>;
95c246e9d6SNeil Armstrong	pinctrl-names = "default";
96c246e9d6SNeil Armstrong};
97c246e9d6SNeil Armstrong
98c246e9d6SNeil Armstrong&ethmac {
99c246e9d6SNeil Armstrong	status = "okay";
1003be2d9cfSNeil Armstrong	pinctrl-0 = <&eth_rmii_pins>;
101c246e9d6SNeil Armstrong	pinctrl-names = "default";
1023be2d9cfSNeil Armstrong	phy-mode = "rmii";
103c246e9d6SNeil Armstrong};
104c246e9d6SNeil Armstrong
105c246e9d6SNeil Armstrong&ir {
106c246e9d6SNeil Armstrong	status = "okay";
107c246e9d6SNeil Armstrong	pinctrl-0 = <&remote_input_ao_pins>;
108c246e9d6SNeil Armstrong	pinctrl-names = "default";
109c246e9d6SNeil Armstrong};
110