1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (c) 2022, Collabora Ltd
4 * Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
5 */
6
7/dts-v1/;
8#include "mt6795.dtsi"
9
10/ {
11	model = "Sony Xperia M5";
12	compatible = "sony,xperia-m5", "mediatek,mt6795";
13	chassis-type = "handset";
14
15	aliases {
16		mmc0 = &mmc0;
17		mmc1 = &mmc1;
18		serial0 = &uart0;
19		serial1 = &uart1;
20	};
21
22	memory@40000000 {
23		device_type = "memory";
24		reg = <0 0x40000000 0 0x1e800000>;
25	};
26
27	reserved_memory: reserved-memory {
28		#address-cells = <2>;
29		#size-cells = <2>;
30		ranges;
31
32		/* 128 KiB reserved for ARM Trusted Firmware (BL31) */
33		bl31_secmon_reserved: secmon@43000000 {
34			reg = <0 0x43000000 0 0x30000>;
35			no-map;
36		};
37
38		/* preloader and bootloader regions cannot be touched */
39		preloader-region@44800000 {
40			reg = <0 0x44800000 0 0x100000>;
41			no-map;
42		};
43
44		bootloader-region@46000000 {
45			reg = <0 0x46000000 0 0x400000>;
46			no-map;
47		};
48	};
49};
50
51&pio {
52	uart0_pins: uart0-pins {
53		pins-rx {
54			pinmux = <PINMUX_GPIO113__FUNC_URXD0>;
55			bias-pull-up;
56			input-enable;
57		};
58		pins-tx {
59			pinmux = <PINMUX_GPIO114__FUNC_UTXD0>;
60			output-high;
61		};
62	};
63
64	uart2_pins: uart2-pins {
65		pins-rx {
66			pinmux = <PINMUX_GPIO31__FUNC_URXD2>;
67			bias-pull-up;
68			input-enable;
69		};
70		pins-tx {
71			pinmux = <PINMUX_GPIO32__FUNC_UTXD2>;
72		};
73	};
74};
75
76&uart0 {
77	status = "okay";
78
79	pinctrl-names = "default";
80	pinctrl-0 = <&uart0_pins>;
81};
82
83&uart2 {
84	status = "okay";
85
86	pinctrl-names = "default";
87	pinctrl-0 = <&uart2_pins>;
88};
89