xref: /freebsd-src/sys/contrib/device-tree/src/arm64/amlogic/meson-gxbb-kii-pro.dts (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Copyright (c) 2019 Mohammad Rasim <mohammad.rasim96@gmail.com>
4c66ec88fSEmmanuel Vadot */
5c66ec88fSEmmanuel Vadot
6c66ec88fSEmmanuel Vadot/dts-v1/;
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadot#include "meson-gxbb-p20x.dtsi"
9c66ec88fSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10c66ec88fSEmmanuel Vadot#include <dt-bindings/input/input.h>
11c66ec88fSEmmanuel Vadot#include <dt-bindings/leds/common.h>
12fac71e4eSEmmanuel Vadot#include <dt-bindings/sound/meson-aiu.h>
13fac71e4eSEmmanuel Vadot
14c66ec88fSEmmanuel Vadot/ {
15c66ec88fSEmmanuel Vadot	compatible = "videostrong,kii-pro", "amlogic,meson-gxbb";
16c66ec88fSEmmanuel Vadot	model = "Videostrong KII Pro";
17c66ec88fSEmmanuel Vadot
18fac71e4eSEmmanuel Vadot	spdif_dit: audio-codec-0 {
19fac71e4eSEmmanuel Vadot		#sound-dai-cells = <0>;
20fac71e4eSEmmanuel Vadot		compatible = "linux,spdif-dit";
21fac71e4eSEmmanuel Vadot		sound-name-prefix = "DIT";
22fac71e4eSEmmanuel Vadot	};
23fac71e4eSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot	leds {
25c66ec88fSEmmanuel Vadot		compatible = "gpio-leds";
26cb7aa33aSEmmanuel Vadot		led {
27c66ec88fSEmmanuel Vadot			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
28c66ec88fSEmmanuel Vadot			color = <LED_COLOR_ID_RED>;
29c66ec88fSEmmanuel Vadot			function = LED_FUNCTION_STATUS;
30fac71e4eSEmmanuel Vadot			default-state = "off";
31c66ec88fSEmmanuel Vadot		};
32c66ec88fSEmmanuel Vadot	};
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot	gpio-keys-polled {
35c66ec88fSEmmanuel Vadot		compatible = "gpio-keys-polled";
36c66ec88fSEmmanuel Vadot		poll-interval = <20>;
37c66ec88fSEmmanuel Vadot
38c66ec88fSEmmanuel Vadot		button-reset {
39c66ec88fSEmmanuel Vadot			label = "reset";
40c66ec88fSEmmanuel Vadot			linux,code = <KEY_POWER>;
41c66ec88fSEmmanuel Vadot			gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
42c66ec88fSEmmanuel Vadot		};
43c66ec88fSEmmanuel Vadot	};
44c66ec88fSEmmanuel Vadot
45fac71e4eSEmmanuel Vadot	sound {
46fac71e4eSEmmanuel Vadot		compatible = "amlogic,gx-sound-card";
47fac71e4eSEmmanuel Vadot		model = "KII-PRO";
48*b2d2a78aSEmmanuel Vadot		clocks = <&clkc CLKID_MPLL0>,
49*b2d2a78aSEmmanuel Vadot			 <&clkc CLKID_MPLL1>,
50*b2d2a78aSEmmanuel Vadot			 <&clkc CLKID_MPLL2>;
51*b2d2a78aSEmmanuel Vadot
52fac71e4eSEmmanuel Vadot		assigned-clocks = <&clkc CLKID_MPLL0>,
53fac71e4eSEmmanuel Vadot				  <&clkc CLKID_MPLL1>,
54fac71e4eSEmmanuel Vadot				  <&clkc CLKID_MPLL2>;
55fac71e4eSEmmanuel Vadot		assigned-clock-parents = <0>, <0>, <0>;
56fac71e4eSEmmanuel Vadot		assigned-clock-rates = <294912000>,
57fac71e4eSEmmanuel Vadot				       <270950400>,
58fac71e4eSEmmanuel Vadot				       <393216000>;
59fac71e4eSEmmanuel Vadot
60fac71e4eSEmmanuel Vadot		dai-link-0 {
61fac71e4eSEmmanuel Vadot			sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
62c66ec88fSEmmanuel Vadot		};
63c66ec88fSEmmanuel Vadot
64fac71e4eSEmmanuel Vadot		dai-link-1 {
65fac71e4eSEmmanuel Vadot			sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
66fac71e4eSEmmanuel Vadot		};
67c66ec88fSEmmanuel Vadot
68fac71e4eSEmmanuel Vadot		dai-link-2 {
69fac71e4eSEmmanuel Vadot			sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
70fac71e4eSEmmanuel Vadot			dai-format = "i2s";
71fac71e4eSEmmanuel Vadot			mclk-fs = <256>;
72c66ec88fSEmmanuel Vadot
73fac71e4eSEmmanuel Vadot			codec-0 {
74fac71e4eSEmmanuel Vadot				sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
75fac71e4eSEmmanuel Vadot			};
76fac71e4eSEmmanuel Vadot		};
77fac71e4eSEmmanuel Vadot
78fac71e4eSEmmanuel Vadot		dai-link-3 {
79fac71e4eSEmmanuel Vadot			sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
80fac71e4eSEmmanuel Vadot
81fac71e4eSEmmanuel Vadot			codec-0 {
82fac71e4eSEmmanuel Vadot				sound-dai = <&spdif_dit>;
83fac71e4eSEmmanuel Vadot			};
84fac71e4eSEmmanuel Vadot		};
85fac71e4eSEmmanuel Vadot
86fac71e4eSEmmanuel Vadot		dai-link-4 {
87fac71e4eSEmmanuel Vadot			sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
88fac71e4eSEmmanuel Vadot
89fac71e4eSEmmanuel Vadot			codec-0 {
90fac71e4eSEmmanuel Vadot				sound-dai = <&hdmi_tx>;
91fac71e4eSEmmanuel Vadot			};
92fac71e4eSEmmanuel Vadot		};
93fac71e4eSEmmanuel Vadot	};
94fac71e4eSEmmanuel Vadot};
95fac71e4eSEmmanuel Vadot
96fac71e4eSEmmanuel Vadot&aiu {
97c66ec88fSEmmanuel Vadot	status = "okay";
98fac71e4eSEmmanuel Vadot	pinctrl-0 = <&spdif_out_y_pins>;
99c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
100c66ec88fSEmmanuel Vadot};
101c66ec88fSEmmanuel Vadot
102c66ec88fSEmmanuel Vadot&ethmac {
103c66ec88fSEmmanuel Vadot	status = "okay";
104c66ec88fSEmmanuel Vadot	pinctrl-0 = <&eth_rmii_pins>;
105c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
106c66ec88fSEmmanuel Vadot
107c66ec88fSEmmanuel Vadot	phy-handle = <&eth_phy0>;
108c66ec88fSEmmanuel Vadot	phy-mode = "rmii";
109c66ec88fSEmmanuel Vadot
110c66ec88fSEmmanuel Vadot	mdio {
111c66ec88fSEmmanuel Vadot		compatible = "snps,dwmac-mdio";
112c66ec88fSEmmanuel Vadot		#address-cells = <1>;
113c66ec88fSEmmanuel Vadot		#size-cells = <0>;
114c66ec88fSEmmanuel Vadot
115c66ec88fSEmmanuel Vadot		eth_phy0: ethernet-phy@0 {
116c66ec88fSEmmanuel Vadot			/* IC Plus IP101GR (0x02430c54) */
117c66ec88fSEmmanuel Vadot			reg = <0>;
118c66ec88fSEmmanuel Vadot			reset-assert-us = <10000>;
119c66ec88fSEmmanuel Vadot			reset-deassert-us = <10000>;
120c66ec88fSEmmanuel Vadot			reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
121c66ec88fSEmmanuel Vadot		};
122c66ec88fSEmmanuel Vadot	};
123c66ec88fSEmmanuel Vadot};
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadot&ir {
126c66ec88fSEmmanuel Vadot	linux,rc-map-name = "rc-videostrong-kii-pro";
127c66ec88fSEmmanuel Vadot};
128fac71e4eSEmmanuel Vadot
129fac71e4eSEmmanuel Vadot&uart_A {
130fac71e4eSEmmanuel Vadot	status = "okay";
131fac71e4eSEmmanuel Vadot	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
132fac71e4eSEmmanuel Vadot	pinctrl-names = "default";
133fac71e4eSEmmanuel Vadot	uart-has-rtscts;
134fac71e4eSEmmanuel Vadot
135fac71e4eSEmmanuel Vadot	bluetooth {
136fac71e4eSEmmanuel Vadot		compatible = "brcm,bcm4335a0";
137fac71e4eSEmmanuel Vadot		shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
138fac71e4eSEmmanuel Vadot		host-wakeup-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;
139fac71e4eSEmmanuel Vadot		max-speed = <2000000>;
140fac71e4eSEmmanuel Vadot		clocks = <&wifi32k>;
141fac71e4eSEmmanuel Vadot		clock-names = "lpo";
142fac71e4eSEmmanuel Vadot	};
143fac71e4eSEmmanuel Vadot};
144