1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2016 Andreas Färber
4 * Copyright (c) 2016 BayLibre, Inc.
5 * Author: Kevin Hilman <khilman@kernel.org>
6 */
7
8/dts-v1/;
9
10#include "meson-gxbb-p20x.dtsi"
11#include <dt-bindings/input/input.h>
12
13/ {
14	compatible = "amlogic,p200", "amlogic,meson-gxbb";
15	model = "Amlogic Meson GXBB P200 Development Board";
16
17	avdd18_usb_adc: regulator-avdd18_usb_adc {
18		compatible = "regulator-fixed";
19		regulator-name = "AVDD18_USB_ADC";
20		regulator-min-microvolt = <1800000>;
21		regulator-max-microvolt = <1800000>;
22	};
23
24	adc_keys {
25		compatible = "adc-keys";
26		io-channels = <&saradc 0>;
27		io-channel-names = "buttons";
28		keyup-threshold-microvolt = <1800000>;
29
30		button-home {
31			label = "Home";
32			linux,code = <KEY_HOME>;
33			press-threshold-microvolt = <900000>; /* 50% */
34		};
35
36		button-esc {
37			label = "Esc";
38			linux,code = <KEY_ESC>;
39			press-threshold-microvolt = <684000>; /* 38% */
40		};
41
42		button-up {
43			label = "Volume Up";
44			linux,code = <KEY_VOLUMEUP>;
45			press-threshold-microvolt = <468000>; /* 26% */
46		};
47
48		button-down {
49			label = "Volume Down";
50			linux,code = <KEY_VOLUMEDOWN>;
51			press-threshold-microvolt = <252000>; /* 14% */
52		};
53
54		button-menu {
55			label = "Menu";
56			linux,code = <KEY_MENU>;
57			press-threshold-microvolt = <0>; /* 0% */
58		};
59	};
60};
61
62&ethmac {
63	status = "okay";
64	pinctrl-0 = <&eth_rgmii_pins>;
65	pinctrl-names = "default";
66	phy-handle = <&eth_phy0>;
67	phy-mode = "rgmii";
68
69	amlogic,tx-delay-ns = <2>;
70
71	mdio {
72		compatible = "snps,dwmac-mdio";
73		#address-cells = <1>;
74		#size-cells = <0>;
75
76		eth_phy0: ethernet-phy@3 {
77			/* Micrel KSZ9031 (0x00221620) */
78			reg = <3>;
79
80			reset-assert-us = <10000>;
81			reset-deassert-us = <30000>;
82			reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
83
84			interrupt-parent = <&gpio_intc>;
85			/* MAC_INTR on GPIOZ_15 */
86			interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
87		};
88	};
89};
90
91&i2c_B {
92	status = "okay";
93	pinctrl-0 = <&i2c_b_pins>;
94	pinctrl-names = "default";
95};
96
97&saradc {
98	status = "okay";
99	vref-supply = <&avdd18_usb_adc>;
100};
101