xref: /freebsd-src/sys/contrib/device-tree/src/arm64/amlogic/meson-gxm-wetek-core2.dts (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Copyright (c) 2020 Christian Hewitt <christianshewitt@gmail.com>
4c66ec88fSEmmanuel Vadot */
5c66ec88fSEmmanuel Vadot
6c66ec88fSEmmanuel Vadot/dts-v1/;
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadot#include "meson-gxm.dtsi"
9c66ec88fSEmmanuel Vadot#include "meson-gx-p23x-q20x.dtsi"
10c66ec88fSEmmanuel Vadot#include <dt-bindings/input/input.h>
11c66ec88fSEmmanuel Vadot#include <dt-bindings/leds/common.h>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadot/ {
14c66ec88fSEmmanuel Vadot	compatible = "wetek,core2", "amlogic,s912", "amlogic,meson-gxm";
15c66ec88fSEmmanuel Vadot	model = "WeTek Core 2";
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadot	memory@0 {
18c66ec88fSEmmanuel Vadot		device_type = "memory";
19c66ec88fSEmmanuel Vadot		reg = <0x0 0x0 0x0 0x80000000>; /* 2 GiB or 3 GiB */
20c66ec88fSEmmanuel Vadot	};
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot	leds {
23c66ec88fSEmmanuel Vadot		compatible = "gpio-leds";
24c66ec88fSEmmanuel Vadot
25*2eb4d8dcSEmmanuel Vadot		led-blue {
26c66ec88fSEmmanuel Vadot			color = <LED_COLOR_ID_BLUE>;
27c66ec88fSEmmanuel Vadot			function = LED_FUNCTION_STATUS;
28c66ec88fSEmmanuel Vadot			gpios = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
29c66ec88fSEmmanuel Vadot			default-state = "on";
30c66ec88fSEmmanuel Vadot		};
31c66ec88fSEmmanuel Vadot	};
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot	adc-keys {
34c66ec88fSEmmanuel Vadot		compatible = "adc-keys";
35c66ec88fSEmmanuel Vadot		io-channels = <&saradc 0>;
36c66ec88fSEmmanuel Vadot		io-channel-names = "buttons";
37c66ec88fSEmmanuel Vadot		keyup-threshold-microvolt = <1710000>;
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot		button-update {
40c66ec88fSEmmanuel Vadot			label = "update";
41c66ec88fSEmmanuel Vadot			linux,code = <KEY_VENDOR>;
42c66ec88fSEmmanuel Vadot			press-threshold-microvolt = <10000>;
43c66ec88fSEmmanuel Vadot		};
44c66ec88fSEmmanuel Vadot	};
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadot	gpio-keys-polled {
47c66ec88fSEmmanuel Vadot		compatible = "gpio-keys-polled";
48c66ec88fSEmmanuel Vadot		poll-interval = <100>;
49c66ec88fSEmmanuel Vadot
50c66ec88fSEmmanuel Vadot		button-power {
51c66ec88fSEmmanuel Vadot			label = "power";
52c66ec88fSEmmanuel Vadot			linux,code = <KEY_POWER>;
53c66ec88fSEmmanuel Vadot			gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
54c66ec88fSEmmanuel Vadot		};
55c66ec88fSEmmanuel Vadot	};
56c66ec88fSEmmanuel Vadot};
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel Vadot/* Disabled as Realtek RTL8152 USB provides Ethernet */
59c66ec88fSEmmanuel Vadot&ethmac {
60c66ec88fSEmmanuel Vadot	status = "disabled";
61c66ec88fSEmmanuel Vadot};
62c66ec88fSEmmanuel Vadot
63c66ec88fSEmmanuel Vadot&internal_phy {
64c66ec88fSEmmanuel Vadot	status = "disabled";
65c66ec88fSEmmanuel Vadot};
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadot&ir {
68c66ec88fSEmmanuel Vadot	linux,rc-map-name = "rc-wetek-play2";
69c66ec88fSEmmanuel Vadot};
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot/* This is connected to the Bluetooth module: */
72c66ec88fSEmmanuel Vadot&uart_A {
73c66ec88fSEmmanuel Vadot	status = "okay";
74c66ec88fSEmmanuel Vadot	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
75c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
76c66ec88fSEmmanuel Vadot	uart-has-rtscts;
77c66ec88fSEmmanuel Vadot
78c66ec88fSEmmanuel Vadot	bluetooth {
79c66ec88fSEmmanuel Vadot		compatible = "brcm,bcm43438-bt";
80c66ec88fSEmmanuel Vadot		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
81c66ec88fSEmmanuel Vadot		max-speed = <2000000>;
82c66ec88fSEmmanuel Vadot		clocks = <&wifi32k>;
83c66ec88fSEmmanuel Vadot		clock-names = "lpo";
84c66ec88fSEmmanuel Vadot	};
85c66ec88fSEmmanuel Vadot};
86