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		#address-cells = <1>;
3482838e6fSNeil Armstrong		#size-cells = <0>;
3582838e6fSNeil Armstrong		poll-interval = <100>;
3682838e6fSNeil Armstrong
3782838e6fSNeil Armstrong		button@0 {
3882838e6fSNeil Armstrong			label = "power";
3982838e6fSNeil Armstrong			linux,code = <KEY_POWER>;
4082838e6fSNeil Armstrong			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
4182838e6fSNeil Armstrong		};
4282838e6fSNeil Armstrong	};
434e611897SNeil Armstrong};
444e611897SNeil Armstrong
454e611897SNeil Armstrong/* Q200 has exclusive choice between internal or external PHY */
464e611897SNeil Armstrong&ethmac {
474e611897SNeil Armstrong	pinctrl-0 = <&eth_pins>;
484e611897SNeil Armstrong	pinctrl-names = "default";
494e611897SNeil Armstrong
504e611897SNeil Armstrong	/* Select external PHY by default */
514e611897SNeil Armstrong	phy-handle = <&external_phy>;
524e611897SNeil Armstrong
53093d23dbSMartin Blumenstingl	amlogic,tx-delay-ns = <2>;
54093d23dbSMartin Blumenstingl
554e611897SNeil Armstrong	/* External PHY reset is shared with internal PHY Led signals */
564e611897SNeil Armstrong	snps,reset-gpio = <&gpio GPIOZ_14 0>;
574e611897SNeil Armstrong	snps,reset-delays-us = <0 10000 1000000>;
584e611897SNeil Armstrong	snps,reset-active-low;
594e611897SNeil Armstrong
604e611897SNeil Armstrong	/* External PHY is in RGMII */
614e611897SNeil Armstrong	phy-mode = "rgmii";
624e611897SNeil Armstrong};
634e611897SNeil Armstrong
644e611897SNeil Armstrong&external_mdio {
654e611897SNeil Armstrong	external_phy: ethernet-phy@0 {
664e611897SNeil Armstrong		compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
674e611897SNeil Armstrong		reg = <0>;
684e611897SNeil Armstrong		max-speed = <1000>;
69b94d22d9SJerome Brunet		interrupt-parent = <&gpio_intc>;
703106507eSJerome Brunet		/* MAC_INTR on GPIOZ_15 */
713106507eSJerome Brunet		interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
724e611897SNeil Armstrong	};
734e611897SNeil Armstrong};
741b2b1e75SMartin Blumenstingl
751b2b1e75SMartin Blumenstingl&sd_emmc_a {
761b2b1e75SMartin Blumenstingl	brcmf: wifi@1 {
771b2b1e75SMartin Blumenstingl		reg = <1>;
781b2b1e75SMartin Blumenstingl		compatible = "brcm,bcm4329-fmac";
791b2b1e75SMartin Blumenstingl	};
801b2b1e75SMartin Blumenstingl};
81