xref: /linux/arch/arm64/boot/dts/mediatek/mt8195-cherry-dojo-r1.dts (revision 4436e6da008fee87d54c038e983e5be9a6baf8fb)
1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright (C) 2022 MediaTek Inc.
4 */
5/dts-v1/;
6#include "mt8195-cherry.dtsi"
7
8/ {
9	model = "HP Dojo (sku 1, 3, 5, 7) board";
10	chassis-type = "convertible";
11	compatible = "google,dojo-sku7", "google,dojo-sku5",
12		     "google,dojo-sku3", "google,dojo-sku1",
13		     "google,dojo", "mediatek,mt8195";
14};
15
16&audio_codec {
17	compatible = "realtek,rt5682s";
18	realtek,amic-delay-ms = <250>;
19};
20
21&i2c2 {
22	spk_r_amp: amplifier@38 {
23		compatible = "maxim,max98390";
24		reg = <0x38>;
25		reset-gpios = <&pio 100 GPIO_ACTIVE_LOW>;
26		sound-name-prefix = "Right";
27		#sound-dai-cells = <0>;
28	};
29
30	spk_l_amp: amplifier@39 {
31		compatible = "maxim,max98390";
32		reg = <0x39>;
33		sound-name-prefix = "Left";
34		#sound-dai-cells = <0>;
35	};
36};
37
38&i2c4 {
39	touchscreen@15 {
40		compatible = "hid-over-i2c";
41		reg = <0x15>;
42		hid-descr-addr = <0x0001>;
43		interrupts-extended = <&pio 92 IRQ_TYPE_LEVEL_LOW>;
44		pinctrl-names = "default";
45		pinctrl-0 = <&touchscreen_pins>;
46		post-power-on-delay-ms = <10>;
47		vdd-supply = <&pp3300_s3>;
48	};
49};
50
51&keyboard_controller {
52	linux,keymap = <
53		CROS_STD_MAIN_KEYMAP
54
55		MATRIX_KEY(0x00, 0x02, KEY_BACK)
56		MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
57		MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
58		MATRIX_KEY(0x01, 0x02, KEY_SCALE)
59		MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
60		MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
61		MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
62		MATRIX_KEY(0x02, 0x09, KEY_KBDILLUMTOGGLE)
63		MATRIX_KEY(0x01, 0x09, KEY_PLAYPAUSE)
64		MATRIX_KEY(0x00, 0x04, KEY_MICMUTE)
65		MATRIX_KEY(0x00, 0x01, KEY_MUTE)
66		MATRIX_KEY(0x01, 0x05, KEY_VOLUMEDOWN)
67		MATRIX_KEY(0x03, 0x05, KEY_VOLUMEUP)
68	>;
69};
70
71&pcie0 {
72	pinctrl-names = "default";
73	pinctrl-0 = <&pcie0_pins_default>;
74	status = "okay";
75};
76
77&pciephy {
78	status = "okay";
79};
80
81&pio_default {
82	pins-low-power-hdmi-disable {
83		pinmux = <PINMUX_GPIO31__FUNC_GPIO31>,
84			 <PINMUX_GPIO32__FUNC_GPIO32>,
85			 <PINMUX_GPIO33__FUNC_GPIO33>,
86			 <PINMUX_GPIO34__FUNC_GPIO34>,
87			 <PINMUX_GPIO35__FUNC_GPIO35>;
88		input-enable;
89		bias-pull-down;
90	};
91};
92
93&sound {
94	compatible = "mediatek,mt8195_mt6359_max98390_rt5682";
95	model = "m8195_m98390_5682s";
96
97	audio-routing =
98		"Headphone", "HPOL",
99		"Headphone", "HPOR",
100		"IN1P", "Headset Mic",
101		"Right Spk", "Right BE_OUT",
102		"Left Spk", "Left BE_OUT";
103
104	spk-playback-dai-link {
105		codec {
106			sound-dai = <&spk_r_amp>, <&spk_l_amp>;
107		};
108	};
109};
110
111&spk_amplifier {
112	/* Disable RT1019P, not present on Dojo */
113	status = "disabled";
114};
115