1114abfe1SNeil Armstrong// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
24e611897SNeil Armstrong/*
34e611897SNeil Armstrong * Copyright (c) 2016 Endless Computers, Inc.
44e611897SNeil Armstrong * Author: Carlo Caione <carlo@endlessm.com>
54e611897SNeil Armstrong */
64e611897SNeil Armstrong
74e611897SNeil Armstrong/dts-v1/;
84e611897SNeil Armstrong
982838e6fSNeil Armstrong#include <dt-bindings/input/input.h>
1082838e6fSNeil Armstrong
114e611897SNeil Armstrong#include "meson-gxm.dtsi"
124e611897SNeil Armstrong#include "meson-gx-p23x-q20x.dtsi"
134e611897SNeil Armstrong
144e611897SNeil Armstrong/ {
154e611897SNeil Armstrong	compatible = "amlogic,q200", "amlogic,s912", "amlogic,meson-gxm";
164e611897SNeil Armstrong	model = "Amlogic Meson GXM (S912) Q200 Development Board";
1782838e6fSNeil Armstrong
1882838e6fSNeil Armstrong	adc-keys {
1982838e6fSNeil Armstrong		compatible = "adc-keys";
2082838e6fSNeil Armstrong		io-channels = <&saradc 0>;
2182838e6fSNeil Armstrong		io-channel-names = "buttons";
2282838e6fSNeil Armstrong		keyup-threshold-microvolt = <1710000>;
2382838e6fSNeil Armstrong
2482838e6fSNeil Armstrong		button-function {
2582838e6fSNeil Armstrong			label = "Update";
2682838e6fSNeil Armstrong			linux,code = <KEY_VENDOR>;
2782838e6fSNeil Armstrong			press-threshold-microvolt = <10000>;
2882838e6fSNeil Armstrong		};
2982838e6fSNeil Armstrong	};
3082838e6fSNeil Armstrong
3182838e6fSNeil Armstrong	gpio-keys-polled {
3282838e6fSNeil Armstrong		compatible = "gpio-keys-polled";
3382838e6fSNeil Armstrong		poll-interval = <100>;
3482838e6fSNeil Armstrong
35*4956be99SKrzysztof Kozlowski		button {
3682838e6fSNeil Armstrong			label = "power";
3782838e6fSNeil Armstrong			linux,code = <KEY_POWER>;
3882838e6fSNeil Armstrong			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
3982838e6fSNeil Armstrong		};
4082838e6fSNeil Armstrong	};
414e611897SNeil Armstrong};
424e611897SNeil Armstrong
434e611897SNeil Armstrong/* Q200 has exclusive choice between internal or external PHY */
444e611897SNeil Armstrong&ethmac {
454e611897SNeil Armstrong	pinctrl-0 = <&eth_pins>;
464e611897SNeil Armstrong	pinctrl-names = "default";
474e611897SNeil Armstrong
484e611897SNeil Armstrong	/* Select external PHY by default */
494e611897SNeil Armstrong	phy-handle = <&external_phy>;
504e611897SNeil Armstrong
51093d23dbSMartin Blumenstingl	amlogic,tx-delay-ns = <2>;
52093d23dbSMartin Blumenstingl
534e611897SNeil Armstrong	/* External PHY is in RGMII */
544e611897SNeil Armstrong	phy-mode = "rgmii";
554e611897SNeil Armstrong};
564e611897SNeil Armstrong
574e611897SNeil Armstrong&external_mdio {
584e611897SNeil Armstrong	external_phy: ethernet-phy@0 {
59890265c9SMartin Blumenstingl		/* Realtek RTL8211F (0x001cc916) */
604e611897SNeil Armstrong		reg = <0>;
614e611897SNeil Armstrong		max-speed = <1000>;
62f29cabf2SMartin Blumenstingl
63f29cabf2SMartin Blumenstingl		/* External PHY reset is shared with internal PHY Led signal */
64f29cabf2SMartin Blumenstingl		reset-assert-us = <10000>;
65c183c406SStefan Agner		reset-deassert-us = <80000>;
66f29cabf2SMartin Blumenstingl		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
67f29cabf2SMartin Blumenstingl
68b94d22d9SJerome Brunet		interrupt-parent = <&gpio_intc>;
693106507eSJerome Brunet		/* MAC_INTR on GPIOZ_15 */
703106507eSJerome Brunet		interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
714e611897SNeil Armstrong	};
724e611897SNeil Armstrong};
731b2b1e75SMartin Blumenstingl
741b2b1e75SMartin Blumenstingl&sd_emmc_a {
751b2b1e75SMartin Blumenstingl	brcmf: wifi@1 {
761b2b1e75SMartin Blumenstingl		reg = <1>;
771b2b1e75SMartin Blumenstingl		compatible = "brcm,bcm4329-fmac";
781b2b1e75SMartin Blumenstingl	};
791b2b1e75SMartin Blumenstingl};
80