xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-mecool-kiii-pro.dts (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/*
4 * Author: Christian Hewitt <christianshewitt@gmail.com>
5 */
6
7/dts-v1/;
8
9#include "meson-gxm.dtsi"
10#include "meson-gx-p23x-q20x.dtsi"
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/leds/common.h>
13
14/ {
15	compatible = "videostrong,gxm-kiii-pro", "amlogic,s912", "amlogic,meson-gxm";
16	model = "MeCool KIII Pro";
17
18	memory@0 {
19		device_type = "memory";
20		reg = <0x0 0x0 0x0 0xC0000000>;
21	};
22
23	adc-keys {
24		compatible = "adc-keys";
25		io-channels = <&saradc 0>;
26		io-channel-names = "buttons";
27		keyup-threshold-microvolt = <1710000>;
28
29		button-function {
30			label = "Update";
31			linux,code = <KEY_VENDOR>;
32			press-threshold-microvolt = <10000>;
33		};
34	};
35
36	gpio-keys-polled {
37		compatible = "gpio-keys-polled";
38		poll-interval = <100>;
39
40		button {
41			label = "power";
42			linux,code = <KEY_POWER>;
43			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
44		};
45	};
46
47	leds {
48		compatible = "gpio-leds";
49
50		led-blue {
51			color = <LED_COLOR_ID_BLUE>;
52			function = LED_FUNCTION_POWER;
53			gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
54			default-state = "on";
55			panic-indicator;
56		};
57	};
58};
59
60&ethmac {
61	pinctrl-0 = <&eth_pins>;
62	pinctrl-names = "default";
63
64	phy-handle = <&external_phy>;
65
66	amlogic,tx-delay-ns = <2>;
67
68	phy-mode = "rgmii";
69};
70
71&external_mdio {
72	external_phy: ethernet-phy@0 {
73		/* Realtek RTL8211F (0x001cc916) */
74		reg = <0>;
75		max-speed = <1000>;
76
77		reset-assert-us = <10000>;
78		reset-deassert-us = <80000>;
79		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
80
81		interrupt-parent = <&gpio_intc>;
82		/* MAC_INTR on GPIOZ_15 */
83		interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
84	};
85};
86
87&ir {
88	linux,rc-map-name = "rc-mecool-kiii-pro";
89};
90
91&sd_emmc_a {
92	brcmf: wifi@1 {
93		reg = <1>;
94		compatible = "brcm,bcm4329-fmac";
95	};
96};
97
98&uart_A {
99	status = "okay";
100	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
101	pinctrl-names = "default";
102	uart-has-rtscts;
103
104	bluetooth {
105		compatible = "brcm,bcm43438-bt";
106		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
107		max-speed = <2000000>;
108		clocks = <&wifi32k>;
109		clock-names = "lpo";
110	};
111};
112