1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2/*
3 * Device Tree Source for Yuridenki-Shokai the Kakip board
4 *
5 * Copyright (C) 2024 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/pinctrl/renesas,r9a09g057-pinctrl.h>
11#include <dt-bindings/gpio/gpio.h>
12#include "r9a09g057.dtsi"
13
14/ {
15	model = "Yuridenki-Shokai Kakip Board based on r9a09g057h48";
16	compatible = "yuridenki,kakip", "renesas,r9a09g057h48", "renesas,r9a09g057";
17
18	aliases {
19		serial0 = &scif;
20		mmc0 = &sdhi0;
21	};
22
23	chosen {
24		stdout-path = "serial0:115200n8";
25	};
26
27	memory@48000000 {
28		device_type = "memory";
29		/* first 128MB is reserved for secure area. */
30		reg = <0x0 0x48000000 0x1 0xF8000000>;
31	};
32
33	reg_3p3v: regulator-3v3 {
34		compatible = "regulator-fixed";
35		regulator-name = "fixed-3.3V";
36		regulator-min-microvolt = <3300000>;
37		regulator-max-microvolt = <3300000>;
38		regulator-boot-on;
39		regulator-always-on;
40	};
41
42	vqmmc_sdhi0: regulator-vccq-sdhi0 {
43		compatible = "regulator-gpio";
44		regulator-name = "SDHI0 VccQ";
45		gpios = <&pinctrl RZV2H_GPIO(A, 0) GPIO_ACTIVE_HIGH>;
46		regulator-min-microvolt = <1800000>;
47		regulator-max-microvolt = <3300000>;
48		gpios-states = <0>;
49		states = <3300000 0>, <1800000 1>;
50	};
51};
52
53&ostm0 {
54	status = "okay";
55};
56
57&ostm1 {
58	status = "okay";
59};
60
61&ostm2 {
62	status = "okay";
63};
64
65&ostm3 {
66	status = "okay";
67};
68
69&ostm4 {
70	status = "okay";
71};
72
73&ostm5 {
74	status = "okay";
75};
76
77&ostm6 {
78	status = "okay";
79};
80
81&ostm7 {
82	status = "okay";
83};
84
85&pinctrl {
86	scif_pins: scif {
87		pins =  "SCIF_RXD", "SCIF_TXD";
88	};
89
90	sd0-pwr-en-hog {
91		gpio-hog;
92		gpios = <RZV2H_GPIO(A, 1) GPIO_ACTIVE_HIGH>;
93		output-high;
94		line-name = "sd0_pwr_en";
95	};
96
97	sdhi0_pins: sd0 {
98		sd0-clk {
99			pins = "SD0CLK";
100			renesas,output-impedance = <3>;
101			slew-rate = <0>;
102		};
103
104		sd0-data {
105			pins = "SD0DAT0", "SD0DAT1", "SD0DAT2", "SD0DAT3", "SD0CMD";
106			input-enable;
107			renesas,output-impedance = <3>;
108			slew-rate = <0>;
109		};
110
111		sd0-mux {
112			pinmux = <RZV2H_PORT_PINMUX(A, 5, 15)>; /* SD0_CD */
113		};
114	};
115};
116
117&qextal_clk {
118	clock-frequency = <24000000>;
119};
120
121&scif {
122	pinctrl-0 = <&scif_pins>;
123	pinctrl-names = "default";
124
125	status = "okay";
126};
127
128&sdhi0 {
129	pinctrl-0 = <&sdhi0_pins>;
130	pinctrl-names = "default";
131	vmmc-supply = <&reg_3p3v>;
132	vqmmc-supply = <&vqmmc_sdhi0>;
133	bus-width = <4>;
134
135	status = "okay";
136};
137