xref: /freebsd-src/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-mecool-kiii-pro.dts (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
12eb4d8dcSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
22eb4d8dcSEmmanuel Vadot
32eb4d8dcSEmmanuel Vadot/*
42eb4d8dcSEmmanuel Vadot * Author: Christian Hewitt <christianshewitt@gmail.com>
52eb4d8dcSEmmanuel Vadot */
62eb4d8dcSEmmanuel Vadot
72eb4d8dcSEmmanuel Vadot/dts-v1/;
82eb4d8dcSEmmanuel Vadot
92eb4d8dcSEmmanuel Vadot#include "meson-gxm.dtsi"
102eb4d8dcSEmmanuel Vadot#include "meson-gx-p23x-q20x.dtsi"
112eb4d8dcSEmmanuel Vadot#include <dt-bindings/input/input.h>
122eb4d8dcSEmmanuel Vadot#include <dt-bindings/leds/common.h>
132eb4d8dcSEmmanuel Vadot
142eb4d8dcSEmmanuel Vadot/ {
152eb4d8dcSEmmanuel Vadot	compatible = "videostrong,gxm-kiii-pro", "amlogic,s912", "amlogic,meson-gxm";
162eb4d8dcSEmmanuel Vadot	model = "MeCool KIII Pro";
172eb4d8dcSEmmanuel Vadot
182eb4d8dcSEmmanuel Vadot	memory@0 {
192eb4d8dcSEmmanuel Vadot		device_type = "memory";
202eb4d8dcSEmmanuel Vadot		reg = <0x0 0x0 0x0 0xC0000000>;
212eb4d8dcSEmmanuel Vadot	};
222eb4d8dcSEmmanuel Vadot
232eb4d8dcSEmmanuel Vadot	adc-keys {
242eb4d8dcSEmmanuel Vadot		compatible = "adc-keys";
252eb4d8dcSEmmanuel Vadot		io-channels = <&saradc 0>;
262eb4d8dcSEmmanuel Vadot		io-channel-names = "buttons";
272eb4d8dcSEmmanuel Vadot		keyup-threshold-microvolt = <1710000>;
282eb4d8dcSEmmanuel Vadot
292eb4d8dcSEmmanuel Vadot		button-function {
302eb4d8dcSEmmanuel Vadot			label = "Update";
312eb4d8dcSEmmanuel Vadot			linux,code = <KEY_VENDOR>;
322eb4d8dcSEmmanuel Vadot			press-threshold-microvolt = <10000>;
332eb4d8dcSEmmanuel Vadot		};
342eb4d8dcSEmmanuel Vadot	};
352eb4d8dcSEmmanuel Vadot
362eb4d8dcSEmmanuel Vadot	gpio-keys-polled {
372eb4d8dcSEmmanuel Vadot		compatible = "gpio-keys-polled";
382eb4d8dcSEmmanuel Vadot		poll-interval = <100>;
392eb4d8dcSEmmanuel Vadot
40*b97ee269SEmmanuel Vadot		button {
412eb4d8dcSEmmanuel Vadot			label = "power";
422eb4d8dcSEmmanuel Vadot			linux,code = <KEY_POWER>;
432eb4d8dcSEmmanuel Vadot			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
442eb4d8dcSEmmanuel Vadot		};
452eb4d8dcSEmmanuel Vadot	};
462eb4d8dcSEmmanuel Vadot
472eb4d8dcSEmmanuel Vadot	leds {
482eb4d8dcSEmmanuel Vadot		compatible = "gpio-leds";
492eb4d8dcSEmmanuel Vadot
502eb4d8dcSEmmanuel Vadot		led-blue {
512eb4d8dcSEmmanuel Vadot			color = <LED_COLOR_ID_BLUE>;
522eb4d8dcSEmmanuel Vadot			function = LED_FUNCTION_POWER;
532eb4d8dcSEmmanuel Vadot			gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
542eb4d8dcSEmmanuel Vadot			default-state = "on";
552eb4d8dcSEmmanuel Vadot			panic-indicator;
562eb4d8dcSEmmanuel Vadot		};
572eb4d8dcSEmmanuel Vadot	};
582eb4d8dcSEmmanuel Vadot};
592eb4d8dcSEmmanuel Vadot
602eb4d8dcSEmmanuel Vadot&ethmac {
612eb4d8dcSEmmanuel Vadot	pinctrl-0 = <&eth_pins>;
622eb4d8dcSEmmanuel Vadot	pinctrl-names = "default";
632eb4d8dcSEmmanuel Vadot
642eb4d8dcSEmmanuel Vadot	phy-handle = <&external_phy>;
652eb4d8dcSEmmanuel Vadot
662eb4d8dcSEmmanuel Vadot	amlogic,tx-delay-ns = <2>;
672eb4d8dcSEmmanuel Vadot
682eb4d8dcSEmmanuel Vadot	phy-mode = "rgmii";
692eb4d8dcSEmmanuel Vadot};
702eb4d8dcSEmmanuel Vadot
712eb4d8dcSEmmanuel Vadot&external_mdio {
722eb4d8dcSEmmanuel Vadot	external_phy: ethernet-phy@0 {
732eb4d8dcSEmmanuel Vadot		/* Realtek RTL8211F (0x001cc916) */
742eb4d8dcSEmmanuel Vadot		reg = <0>;
752eb4d8dcSEmmanuel Vadot		max-speed = <1000>;
762eb4d8dcSEmmanuel Vadot
772eb4d8dcSEmmanuel Vadot		reset-assert-us = <10000>;
782eb4d8dcSEmmanuel Vadot		reset-deassert-us = <80000>;
792eb4d8dcSEmmanuel Vadot		reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
802eb4d8dcSEmmanuel Vadot
812eb4d8dcSEmmanuel Vadot		interrupt-parent = <&gpio_intc>;
822eb4d8dcSEmmanuel Vadot		/* MAC_INTR on GPIOZ_15 */
832eb4d8dcSEmmanuel Vadot		interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
842eb4d8dcSEmmanuel Vadot	};
852eb4d8dcSEmmanuel Vadot};
862eb4d8dcSEmmanuel Vadot
872eb4d8dcSEmmanuel Vadot&ir {
882eb4d8dcSEmmanuel Vadot	linux,rc-map-name = "rc-mecool-kiii-pro";
892eb4d8dcSEmmanuel Vadot};
902eb4d8dcSEmmanuel Vadot
912eb4d8dcSEmmanuel Vadot&sd_emmc_a {
922eb4d8dcSEmmanuel Vadot	brcmf: wifi@1 {
932eb4d8dcSEmmanuel Vadot		reg = <1>;
942eb4d8dcSEmmanuel Vadot		compatible = "brcm,bcm4329-fmac";
952eb4d8dcSEmmanuel Vadot	};
962eb4d8dcSEmmanuel Vadot};
972eb4d8dcSEmmanuel Vadot
982eb4d8dcSEmmanuel Vadot&uart_A {
992eb4d8dcSEmmanuel Vadot	status = "okay";
1002eb4d8dcSEmmanuel Vadot	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
1012eb4d8dcSEmmanuel Vadot	pinctrl-names = "default";
1022eb4d8dcSEmmanuel Vadot	uart-has-rtscts;
1032eb4d8dcSEmmanuel Vadot
1042eb4d8dcSEmmanuel Vadot	bluetooth {
1052eb4d8dcSEmmanuel Vadot		compatible = "brcm,bcm43438-bt";
1062eb4d8dcSEmmanuel Vadot		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
1072eb4d8dcSEmmanuel Vadot		max-speed = <2000000>;
1082eb4d8dcSEmmanuel Vadot		clocks = <&wifi32k>;
1092eb4d8dcSEmmanuel Vadot		clock-names = "lpo";
1102eb4d8dcSEmmanuel Vadot	};
1112eb4d8dcSEmmanuel Vadot};
112