1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * (C) Copyright 2020 Stefan Bosch <stefan_b@posteo.net>
4 *
5 * (C) Copyright 2017 FriendlyElec Computer Tech. Co., Ltd.
6 * (http://www.friendlyarm.com)
7 *
8 * (C) Copyright 2016 Nexell
9 * Youngbok, Park <park@nexell.co.kr>
10 */
11
12/dts-v1/;
13#include "s5p4418.dtsi"
14
15/ {
16	model = "FriendlyElec boards based on Nexell s5p4418";
17	cpu-model = "S5p4418";
18
19	compatible = "friendlyelec,nanopi2",
20		     "nexell,s5p4418";
21
22	aliases {
23		mmc0 = "/mmc@c0069000";
24		mmc1 = "/mmc@c0062000";
25		i2c0 = "/i2c@c00a4000";
26		i2c1 = "/i2c@c00a5000";
27		i2c2 = "/i2c@c00a6000";
28	};
29
30	mmc0:mmc@c0062000 {
31		frequency = <50000000>;
32		drive_dly = <0x0>;
33		drive_shift = <0x03>;
34		sample_dly = <0x00>;
35		sample_shift = <0x02>;
36		mmcboost = <0>;
37		status = "okay";
38	};
39
40	mmc2:mmc@c0069000 {
41		frequency = <50000000>;
42		drive_dly = <0x0>;
43		drive_shift = <0x03>;
44		sample_dly = <0x00>;
45		sample_shift = <0x02>;
46		mmcboost = <0>;
47		status = "okay";
48	};
49
50	/* NanoPi2: Header "CON2", NanoPC-T2: EEPROM (MAC-Addr.) and Audio */
51	i2c0:i2c@c00a4000 {
52		status ="okay";
53	};
54
55	/* NanoPi2: Header "CON2" and HDMI, NanoPC-T2: HDMI */
56	i2c1:i2c@c00a5000 {
57		status ="okay";
58	};
59
60	/* NanoPi2: LCD interface, NanoPC-T2: LCD, LVDS and MIPI interfaces */
61	i2c2:i2c@c00a6000 {
62		status ="okay";
63	};
64
65	dp0:dp@c0102800 {
66		status = "okay";
67		module = <0>;
68		lcd-type = "lvds";
69
70		dp-device {
71			format = <0>;	/* 0:VESA, 1:JEIDA */
72		};
73
74		dp-sync {
75			h_active_len = <1024>;
76			h_front_porch = <84>;
77			h_back_porch = <84>;
78			h_sync_width = <88>;
79			h_sync_invert = <0>;
80			v_active_len = <600>;
81			v_front_porch = <10>;
82			v_back_porch = <10>;
83			v_sync_width = <20>;
84			v_sync_invert = <0>;
85		};
86
87		dp-ctrl {
88			clk_src_lv0 = <3>;
89			clk_div_lv0 = <16>;
90			clk_src_lv1 = <7>;
91			clk_div_lv1 = <1>;
92			out_format = <2>;
93		};
94
95		dp-planes {
96			layer_top {
97				screen_width = <1024>;
98				screen_height = <600>;
99				back_color = <0x0>;
100			};
101
102			layer_1 {	/* RGB 1 */
103				width = <1024>;
104				height = <600>;
105				format = <0x06530000>;
106				pixel_byte = <4>;
107			};
108		};
109	};
110};
111