• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2/*
3 * Device Tree Source for the RZ SMARC Carrier-II Board.
4 *
5 * Copyright (C) 2023 Renesas Electronics Corp.
6 */
7
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/input/input.h>
10#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
11
12/ {
13	aliases {
14		i2c0 = &i2c0;
15		serial3 = &scif0;
16		mmc1 = &sdhi1;
17	};
18
19	chosen {
20		bootargs = "ignore_loglevel";
21		stdout-path = "serial3:115200n8";
22	};
23
24	keys {
25		compatible = "gpio-keys";
26
27		key-1 {
28			interrupts = <RZG2L_GPIO(18, 0) IRQ_TYPE_EDGE_FALLING>;
29			interrupt-parent = <&pinctrl>;
30			linux,code = <KEY_1>;
31			label = "USER_SW1";
32			wakeup-source;
33			debounce-interval = <20>;
34		};
35
36		key-2 {
37			interrupts = <RZG2L_GPIO(0, 1) IRQ_TYPE_EDGE_FALLING>;
38			interrupt-parent = <&pinctrl>;
39			linux,code = <KEY_2>;
40			label = "USER_SW2";
41			wakeup-source;
42			debounce-interval = <20>;
43		};
44
45		key-3 {
46			interrupts = <RZG2L_GPIO(0, 3) IRQ_TYPE_EDGE_FALLING>;
47			interrupt-parent = <&pinctrl>;
48			linux,code = <KEY_3>;
49			label = "USER_SW3";
50			wakeup-source;
51			debounce-interval = <20>;
52		};
53	};
54
55	vcc_sdhi1: regulator-vcc-sdhi1 {
56		compatible = "regulator-fixed";
57		regulator-name = "SDHI1 Vcc";
58		regulator-min-microvolt = <3300000>;
59		regulator-max-microvolt = <3300000>;
60		gpios = <&pinctrl RZG2L_GPIO(2, 3) GPIO_ACTIVE_HIGH>;
61		enable-active-high;
62	};
63
64	vccq_sdhi1: regulator-vccq-sdhi1 {
65		compatible = "regulator-gpio";
66		regulator-name = "SDHI1 VccQ";
67		regulator-min-microvolt = <1800000>;
68		regulator-max-microvolt = <3300000>;
69		gpios = <&pinctrl RZG2L_GPIO(4, 2) GPIO_ACTIVE_HIGH>;
70		gpios-states = <1>;
71		states = <3300000 1>, <1800000 0>;
72	};
73};
74
75&i2c0 {
76	status = "okay";
77
78	clock-frequency = <1000000>;
79};
80
81&pinctrl {
82	key-1-gpio-hog {
83		gpio-hog;
84		gpios = <RZG2L_GPIO(18, 0) GPIO_ACTIVE_LOW>;
85		input;
86		line-name = "key-1-gpio-irq";
87	};
88
89	key-2-gpio-hog {
90		gpio-hog;
91		gpios = <RZG2L_GPIO(0, 1) GPIO_ACTIVE_LOW>;
92		input;
93		line-name = "key-2-gpio-irq";
94	};
95
96	key-3-gpio-hog {
97		gpio-hog;
98		gpios = <RZG2L_GPIO(0, 3) GPIO_ACTIVE_LOW>;
99		input;
100		line-name = "key-3-gpio-irq";
101	};
102
103	scif0_pins: scif0 {
104		pinmux = <RZG2L_PORT_PINMUX(6, 3, 1)>, /* RXD */
105			 <RZG2L_PORT_PINMUX(6, 4, 1)>; /* TXD */
106	};
107
108	sdhi1_pins: sd1 {
109		data {
110			pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
111			power-source = <3300>;
112		};
113
114		ctrl {
115			pins = "SD1_CLK", "SD1_CMD";
116			power-source = <3300>;
117		};
118
119		cd {
120			pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */
121		};
122	};
123
124	sdhi1_pins_uhs: sd1-uhs {
125		data {
126			pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3";
127			power-source = <1800>;
128		};
129
130		ctrl {
131			pins = "SD1_CLK", "SD1_CMD";
132			power-source = <1800>;
133		};
134
135		cd {
136			pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */
137		};
138	};
139};
140
141&scif0 {
142	pinctrl-names = "default";
143	pinctrl-0 = <&scif0_pins>;
144	status = "okay";
145};
146
147&sdhi1 {
148	pinctrl-0 = <&sdhi1_pins>;
149	pinctrl-1 = <&sdhi1_pins_uhs>;
150	pinctrl-names = "default", "state_uhs";
151	vmmc-supply = <&vcc_sdhi1>;
152	vqmmc-supply = <&vccq_sdhi1>;
153	bus-width = <4>;
154	sd-uhs-sdr50;
155	sd-uhs-sdr104;
156	max-frequency = <125000000>;
157	status = "okay";
158};
159