xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/hihope-rev4.dtsi (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot/*
3c66ec88fSEmmanuel Vadot * Device Tree Source for the HiHope RZ/G2H Rev.4.0 and
4c66ec88fSEmmanuel Vadot * HiHope RZ/G2[MN] Rev.3.0/4.0 main board common parts
5c66ec88fSEmmanuel Vadot *
6c66ec88fSEmmanuel Vadot * Copyright (C) 2020 Renesas Electronics Corp.
7c66ec88fSEmmanuel Vadot */
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
10c66ec88fSEmmanuel Vadot#include "hihope-common.dtsi"
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel Vadot/ {
13c66ec88fSEmmanuel Vadot	audio_clkout: audio-clkout {
14c66ec88fSEmmanuel Vadot		/*
15c66ec88fSEmmanuel Vadot		 * This is same as <&rcar_sound 0>
16c66ec88fSEmmanuel Vadot		 * but needed to avoid cs2000/rcar_sound probe dead-lock
17c66ec88fSEmmanuel Vadot		 */
18c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
19c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
20c66ec88fSEmmanuel Vadot		clock-frequency = <12288000>;
21c66ec88fSEmmanuel Vadot	};
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel Vadot	wlan_en_reg: regulator-wlan_en {
24c66ec88fSEmmanuel Vadot		compatible = "regulator-fixed";
25c66ec88fSEmmanuel Vadot		regulator-name = "wlan-en-regulator";
26c66ec88fSEmmanuel Vadot		regulator-min-microvolt = <1800000>;
27c66ec88fSEmmanuel Vadot		regulator-max-microvolt = <1800000>;
28c66ec88fSEmmanuel Vadot		startup-delay-us = <70000>;
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot		gpio = <&gpio4 6 GPIO_ACTIVE_HIGH>;
31c66ec88fSEmmanuel Vadot		enable-active-high;
32c66ec88fSEmmanuel Vadot	};
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot	x1801_clk: x1801-clock {
35c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
36c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
37c66ec88fSEmmanuel Vadot		clock-frequency = <24576000>;
38c66ec88fSEmmanuel Vadot	};
39c66ec88fSEmmanuel Vadot};
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadot&hscif0 {
42c66ec88fSEmmanuel Vadot	bluetooth {
43c66ec88fSEmmanuel Vadot		compatible = "ti,wl1837-st";
44c66ec88fSEmmanuel Vadot		enable-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
45c66ec88fSEmmanuel Vadot	};
46c66ec88fSEmmanuel Vadot};
47c66ec88fSEmmanuel Vadot
48c66ec88fSEmmanuel Vadot&i2c2 {
49c66ec88fSEmmanuel Vadot	pinctrl-0 = <&i2c2_pins>;
50c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
51c66ec88fSEmmanuel Vadot	status = "okay";
52c66ec88fSEmmanuel Vadot
53c66ec88fSEmmanuel Vadot	cs2000: clk_multiplier@4f {
54c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
55c66ec88fSEmmanuel Vadot		compatible = "cirrus,cs2000-cp";
56c66ec88fSEmmanuel Vadot		reg = <0x4f>;
57c66ec88fSEmmanuel Vadot		clocks = <&audio_clkout>, <&x1801_clk>;
58c66ec88fSEmmanuel Vadot		clock-names = "clk_in", "ref_clk";
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadot		assigned-clocks = <&cs2000>;
61c66ec88fSEmmanuel Vadot		assigned-clock-rates = <24576000>; /* 1/1 divide */
62c66ec88fSEmmanuel Vadot	};
63c66ec88fSEmmanuel Vadot};
64c66ec88fSEmmanuel Vadot
65c66ec88fSEmmanuel Vadot&pfc {
66c66ec88fSEmmanuel Vadot	i2c2_pins: i2c2 {
67c66ec88fSEmmanuel Vadot		groups = "i2c2_a";
68c66ec88fSEmmanuel Vadot		function = "i2c2";
69c66ec88fSEmmanuel Vadot	};
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot	sound_clk_pins: sound_clk {
72c66ec88fSEmmanuel Vadot		groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clkout_a";
73c66ec88fSEmmanuel Vadot		function = "audio_clk";
74c66ec88fSEmmanuel Vadot	};
75c66ec88fSEmmanuel Vadot
76c66ec88fSEmmanuel Vadot	sound_pins: sound {
77c66ec88fSEmmanuel Vadot		groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
78c66ec88fSEmmanuel Vadot		function = "ssi";
79c66ec88fSEmmanuel Vadot	};
80c66ec88fSEmmanuel Vadot};
81c66ec88fSEmmanuel Vadot
82c66ec88fSEmmanuel Vadot&rcar_sound {
832eb4d8dcSEmmanuel Vadot	pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
84c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
85c66ec88fSEmmanuel Vadot	status = "okay";
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadot	/* Single DAI */
88c66ec88fSEmmanuel Vadot	#sound-dai-cells = <0>;
89c66ec88fSEmmanuel Vadot
90c66ec88fSEmmanuel Vadot	/* audio_clkout0/1/2/3 */
91c66ec88fSEmmanuel Vadot	#clock-cells = <1>;
92c66ec88fSEmmanuel Vadot	clock-frequency = <12288000 11289600>;
93c66ec88fSEmmanuel Vadot
945def4c47SEmmanuel Vadot	/*
955def4c47SEmmanuel Vadot	 * Update <audio_clk_b> to <cs2000>
965def4c47SEmmanuel Vadot	 * Switch SW2404 should be at position 1 so that clock from
975def4c47SEmmanuel Vadot	 * CS2000 is connected to AUDIO_CLKB_A
985def4c47SEmmanuel Vadot	 */
99c66ec88fSEmmanuel Vadot	clocks = <&cpg CPG_MOD 1005>,
100c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
101c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
102c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
103c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
104c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
105c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
106c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
107c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
108c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
109c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
110c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
111c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
112c66ec88fSEmmanuel Vadot		 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
113c66ec88fSEmmanuel Vadot		 <&audio_clk_a>, <&cs2000>,
114c66ec88fSEmmanuel Vadot		 <&audio_clk_c>,
115*84943d6fSEmmanuel Vadot		 <&cpg CPG_MOD 922>;
116c66ec88fSEmmanuel Vadot
117c66ec88fSEmmanuel Vadot	rsnd_port: port {
118c66ec88fSEmmanuel Vadot		rsnd_endpoint: endpoint {
119c66ec88fSEmmanuel Vadot			remote-endpoint = <&dw_hdmi0_snd_in>;
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel Vadot			dai-format = "i2s";
122c66ec88fSEmmanuel Vadot			bitclock-master = <&rsnd_endpoint>;
123c66ec88fSEmmanuel Vadot			frame-master = <&rsnd_endpoint>;
124c66ec88fSEmmanuel Vadot
125c66ec88fSEmmanuel Vadot			playback = <&ssi2>;
126c66ec88fSEmmanuel Vadot		};
127c66ec88fSEmmanuel Vadot	};
128c66ec88fSEmmanuel Vadot};
129