1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2020, Konrad Dybcio
4 */
5
6/dts-v1/;
7
8#include "sdm630.dtsi"
9#include "pm660.dtsi"
10#include "pm660l.dtsi"
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13#include <dt-bindings/input/gpio-keys.h>
14
15/ {
16	/* required for bootloader to select correct board */
17	qcom,msm-id = <318 0>;
18	qcom,board-id = <8 1>;
19	qcom,pmic-id = <0x1001b 0x101011a 0x00 0x00 0x1001b 0x201011a 0x00 0x00>;
20
21	/* This part enables graphical output via bootloader-enabled display */
22	chosen {
23		bootargs = "earlycon=tty0 console=tty0";
24
25		#address-cells = <2>;
26		#size-cells = <2>;
27		ranges;
28
29		stdout-path = "framebuffer0";
30
31		framebuffer0: framebuffer@9d400000 {
32			compatible = "simple-framebuffer";
33			reg = <0 0x9d400000 0 (1920 * 1080 * 4)>;
34			width = <1080>;
35			height = <1920>;
36			stride = <(1080 * 4)>;
37			format = "a8r8g8b8";
38			status= "okay";
39		};
40	};
41
42	gpio_keys {
43		status = "okay";
44		compatible = "gpio-keys";
45		input-name = "gpio-keys";
46		#address-cells = <1>;
47		#size-cells = <0>;
48		autorepeat;
49
50		camera_focus {
51			label = "Camera Focus";
52			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
53			linux,input-type = <1>;
54			linux,code = <KEY_CAMERA_FOCUS>;
55			debounce-interval = <15>;
56		};
57
58		camera_snapshot {
59			label = "Camera Snapshot";
60			gpios = <&tlmm 113 GPIO_ACTIVE_LOW>;
61			linux,input-type = <1>;
62			linux,code = <KEY_CAMERA>;
63			debounce-interval = <15>;
64		};
65
66		vol_down {
67			label = "Volume Down";
68			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
69			linux,input-type = <1>;
70			linux,code = <KEY_VOLUMEDOWN>;
71			gpio-key,wakeup;
72			debounce-interval = <15>;
73		};
74	};
75
76	reserved-memory {
77		#address-cells = <2>;
78		#size-cells = <2>;
79		ranges;
80
81		ramoops@ffc00000 {
82			compatible = "ramoops";
83			reg = <0x0 0xffc00000 0x0 0x100000>;
84			record-size = <0x10000>;
85			console-size = <0x60000>;
86			ftrace-size = <0x10000>;
87			pmsg-size = <0x20000>;
88			ecc-size = <16>;
89			status = "okay";
90		};
91
92		debug_region@ffb00000 {
93			reg = <0x00 0xffb00000 0x00 0x100000>;
94			no-map;
95		};
96
97		removed_region@85800000 {
98			reg = <0x00 0x85800000 0x00 0x3700000>;
99			no-map;
100		};
101	};
102
103	soc {
104		sdhci@c0c4000 {
105			status = "okay";
106
107			mmc-ddr-1_8v;
108			/* SoMC Nile platform's eMMC doesn't support HS200 mode */
109			mmc-hs400-1_8v;
110		};
111
112		i2c@c175000 {
113			status = "okay";
114
115			/* Synaptics touchscreen */
116		};
117
118		i2c@c176000 {
119			status = "okay";
120
121			/* SMB1351 charger */
122		};
123
124		serial@c1af000 {
125			status = "okay";
126		};
127
128		/* I2C3, 4, 5, 7 and 8 are disabled on this board. */
129
130		i2c@c1b6000 {
131			status = "okay";
132
133			/* NXP NFC */
134		};
135	};
136};
137