xref: /freebsd/sys/contrib/device-tree/src/arm/renesas/r8a7742-iwg21m.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Device Tree Source for the iWave RZ/G1H Qseven SOM
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot * Copyright (C) 2020 Renesas Electronics Corp.
6*f126890aSEmmanuel Vadot */
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot#include "r8a7742.dtsi"
9*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10*f126890aSEmmanuel Vadot
11*f126890aSEmmanuel Vadot/ {
12*f126890aSEmmanuel Vadot	compatible = "iwave,g21m", "renesas,r8a7742";
13*f126890aSEmmanuel Vadot
14*f126890aSEmmanuel Vadot	memory@40000000 {
15*f126890aSEmmanuel Vadot		device_type = "memory";
16*f126890aSEmmanuel Vadot		reg = <0 0x40000000 0 0x40000000>;
17*f126890aSEmmanuel Vadot	};
18*f126890aSEmmanuel Vadot
19*f126890aSEmmanuel Vadot	memory@200000000 {
20*f126890aSEmmanuel Vadot		device_type = "memory";
21*f126890aSEmmanuel Vadot		reg = <2 0x00000000 0 0x40000000>;
22*f126890aSEmmanuel Vadot	};
23*f126890aSEmmanuel Vadot
24*f126890aSEmmanuel Vadot	reg_3p3v: 3p3v {
25*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
26*f126890aSEmmanuel Vadot		regulator-name = "3P3V";
27*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
28*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
29*f126890aSEmmanuel Vadot		regulator-always-on;
30*f126890aSEmmanuel Vadot		regulator-boot-on;
31*f126890aSEmmanuel Vadot	};
32*f126890aSEmmanuel Vadot};
33*f126890aSEmmanuel Vadot
34*f126890aSEmmanuel Vadot&extal_clk {
35*f126890aSEmmanuel Vadot	clock-frequency = <20000000>;
36*f126890aSEmmanuel Vadot};
37*f126890aSEmmanuel Vadot
38*f126890aSEmmanuel Vadot&gpio0 {
39*f126890aSEmmanuel Vadot	/* GP0_18 set low to select QSPI. Doing so will disable VIN2 */
40*f126890aSEmmanuel Vadot	qspi-en-hog {
41*f126890aSEmmanuel Vadot		gpio-hog;
42*f126890aSEmmanuel Vadot		gpios = <18 GPIO_ACTIVE_HIGH>;
43*f126890aSEmmanuel Vadot		output-low;
44*f126890aSEmmanuel Vadot		line-name = "QSPI_EN";
45*f126890aSEmmanuel Vadot	};
46*f126890aSEmmanuel Vadot};
47*f126890aSEmmanuel Vadot
48*f126890aSEmmanuel Vadot&i2c0 {
49*f126890aSEmmanuel Vadot	pinctrl-0 = <&i2c0_pins>;
50*f126890aSEmmanuel Vadot	pinctrl-names = "default";
51*f126890aSEmmanuel Vadot
52*f126890aSEmmanuel Vadot	status = "okay";
53*f126890aSEmmanuel Vadot	clock-frequency = <400000>;
54*f126890aSEmmanuel Vadot
55*f126890aSEmmanuel Vadot	rtc@68 {
56*f126890aSEmmanuel Vadot		compatible = "ti,bq32000";
57*f126890aSEmmanuel Vadot		reg = <0x68>;
58*f126890aSEmmanuel Vadot		interrupt-parent = <&gpio1>;
59*f126890aSEmmanuel Vadot		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
60*f126890aSEmmanuel Vadot	};
61*f126890aSEmmanuel Vadot};
62*f126890aSEmmanuel Vadot
63*f126890aSEmmanuel Vadot&mmcif1 {
64*f126890aSEmmanuel Vadot	pinctrl-0 = <&mmc1_pins>;
65*f126890aSEmmanuel Vadot	pinctrl-names = "default";
66*f126890aSEmmanuel Vadot
67*f126890aSEmmanuel Vadot	vmmc-supply = <&reg_3p3v>;
68*f126890aSEmmanuel Vadot	bus-width = <4>;
69*f126890aSEmmanuel Vadot	non-removable;
70*f126890aSEmmanuel Vadot	status = "okay";
71*f126890aSEmmanuel Vadot};
72*f126890aSEmmanuel Vadot
73*f126890aSEmmanuel Vadot&pfc {
74*f126890aSEmmanuel Vadot	i2c0_pins: i2c0 {
75*f126890aSEmmanuel Vadot		groups = "i2c0";
76*f126890aSEmmanuel Vadot		function = "i2c0";
77*f126890aSEmmanuel Vadot	};
78*f126890aSEmmanuel Vadot
79*f126890aSEmmanuel Vadot	mmc1_pins: mmc1 {
80*f126890aSEmmanuel Vadot		groups = "mmc1_data4", "mmc1_ctrl";
81*f126890aSEmmanuel Vadot		function = "mmc1";
82*f126890aSEmmanuel Vadot	};
83*f126890aSEmmanuel Vadot
84*f126890aSEmmanuel Vadot	qspi_pins: qspi {
85*f126890aSEmmanuel Vadot		groups = "qspi_ctrl", "qspi_data2";
86*f126890aSEmmanuel Vadot		function = "qspi";
87*f126890aSEmmanuel Vadot	};
88*f126890aSEmmanuel Vadot};
89*f126890aSEmmanuel Vadot
90*f126890aSEmmanuel Vadot&qspi {
91*f126890aSEmmanuel Vadot	pinctrl-0 = <&qspi_pins>;
92*f126890aSEmmanuel Vadot	pinctrl-names = "default";
93*f126890aSEmmanuel Vadot
94*f126890aSEmmanuel Vadot	status = "okay";
95*f126890aSEmmanuel Vadot
96*f126890aSEmmanuel Vadot	flash: flash@0 {
97*f126890aSEmmanuel Vadot		compatible = "sst,sst25vf016b", "jedec,spi-nor";
98*f126890aSEmmanuel Vadot		reg = <0>;
99*f126890aSEmmanuel Vadot		spi-max-frequency = <50000000>;
100*f126890aSEmmanuel Vadot		m25p,fast-read;
101*f126890aSEmmanuel Vadot		spi-cpol;
102*f126890aSEmmanuel Vadot		spi-cpha;
103*f126890aSEmmanuel Vadot
104*f126890aSEmmanuel Vadot		partitions {
105*f126890aSEmmanuel Vadot			compatible = "fixed-partitions";
106*f126890aSEmmanuel Vadot			#address-cells = <1>;
107*f126890aSEmmanuel Vadot			#size-cells = <1>;
108*f126890aSEmmanuel Vadot
109*f126890aSEmmanuel Vadot			partition@0 {
110*f126890aSEmmanuel Vadot				label = "bootloader";
111*f126890aSEmmanuel Vadot				reg = <0x00000000 0x000c0000>;
112*f126890aSEmmanuel Vadot				read-only;
113*f126890aSEmmanuel Vadot			};
114*f126890aSEmmanuel Vadot			partition@c0000 {
115*f126890aSEmmanuel Vadot				label = "env";
116*f126890aSEmmanuel Vadot				reg = <0x000c0000 0x00002000>;
117*f126890aSEmmanuel Vadot			};
118*f126890aSEmmanuel Vadot			partition@c2000 {
119*f126890aSEmmanuel Vadot				label = "user";
120*f126890aSEmmanuel Vadot				reg = <0x000c2000 0x0013e000>;
121*f126890aSEmmanuel Vadot			};
122*f126890aSEmmanuel Vadot		};
123*f126890aSEmmanuel Vadot	};
124*f126890aSEmmanuel Vadot};
125