1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Author: Christian Hewitt <christianshewitt@gmail.com>
4 */
5
6/dts-v1/;
7
8#include "meson-gxl-s905d.dtsi"
9#include "meson-gx-p23x-q20x.dtsi"
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/leds/common.h>
12
13/ {
14	compatible = "osmc,vero4k-plus", "amlogic,s905d", "amlogic,meson-gxl";
15	model = "OSMC Vero 4K Plus";
16
17	gpio-keys-polled {
18		compatible = "gpio-keys-polled";
19		#address-cells = <1>;
20		#size-cells = <0>;
21		poll-interval = <20>;
22
23		button@0 {
24			label = "power";
25			linux,code = <KEY_POWER>;
26			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
27		};
28	};
29
30	leds {
31		compatible = "gpio-leds";
32
33		led-standby {
34			color = <LED_COLOR_ID_RED>;
35			function = LED_FUNCTION_POWER;
36			gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_LOW>;
37			default-state = "off";
38			panic-indicator;
39		};
40	};
41};
42
43&ethmac {
44	pinctrl-0 = <&eth_pins>;
45	pinctrl-names = "default";
46
47	phy-mode = "rgmii-txid";
48	phy-handle = <&external_phy>;
49
50	amlogic,tx-delay-ns = <0>;
51};
52
53&external_mdio {
54	external_phy: ethernet-phy@0 {
55		/* Realtek RTL8211F (0x001cc916) */
56		pinctrl-0 = <&eth_phy_irq_pin>;
57		pinctrl-names = "default";
58
59		reg = <0>;
60		max-speed = <1000>;
61
62		reset-assert-us = <10000>;
63		reset-deassert-us = <80000>;
64		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
65
66		interrupt-parent = <&gpio_intc>;
67		interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
68	};
69};
70
71&pinctrl_periphs {
72	/* Ensure the phy irq pin is properly configured as input */
73	eth_phy_irq_pin: eth-phy-irq {
74		mux {
75			groups = "GPIOZ_15";
76			function = "gpio_periphs";
77			bias-disable;
78			output-disable;
79		};
80	};
81};
82
83&sd_emmc_a {
84	brcmf: wifi@1 {
85		reg = <1>;
86		compatible = "brcm,bcm4329-fmac";
87	};
88};
89
90&uart_A {
91	status = "okay";
92	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
93	pinctrl-names = "default";
94	uart-has-rtscts;
95
96	bluetooth {
97		compatible = "brcm,bcm43438-bt";
98		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
99		max-speed = <2000000>;
100		clocks = <&wifi32k>;
101		clock-names = "lpo";
102	};
103};
104
105&usb {
106	dr_mode = "host";
107};
108
109&usb2_phy0 {
110	/* HDMI_5V also supplies the USB VBUS */
111	phy-supply = <&hdmi_5v>;
112};
113
114&usb2_phy0 {
115	/* HDMI_5V also supplies the USB VBUS */
116	phy-supply = <&hdmi_5v>;
117};
118