xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sdm845-wcd9340.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1cb7aa33aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2cb7aa33aSEmmanuel Vadot/*
3cb7aa33aSEmmanuel Vadot * SDM845 SoC device tree source
4cb7aa33aSEmmanuel Vadot *
5cb7aa33aSEmmanuel Vadot * Copyright (c) 2018, The Linux Foundation. All rights reserved.
6cb7aa33aSEmmanuel Vadot */
7cb7aa33aSEmmanuel Vadot
8cb7aa33aSEmmanuel Vadot&slim {
9cb7aa33aSEmmanuel Vadot	status = "okay";
10cb7aa33aSEmmanuel Vadot
11cb7aa33aSEmmanuel Vadot	slim@1 {
12cb7aa33aSEmmanuel Vadot		reg = <1>;
13cb7aa33aSEmmanuel Vadot		#address-cells = <2>;
14cb7aa33aSEmmanuel Vadot		#size-cells = <0>;
15cb7aa33aSEmmanuel Vadot
16cb7aa33aSEmmanuel Vadot		wcd9340_ifd: ifd@0,0 {
17cb7aa33aSEmmanuel Vadot			compatible = "slim217,250";
18cb7aa33aSEmmanuel Vadot			reg = <0 0>;
19cb7aa33aSEmmanuel Vadot		};
20cb7aa33aSEmmanuel Vadot
21cb7aa33aSEmmanuel Vadot		wcd9340: codec@1,0 {
22cb7aa33aSEmmanuel Vadot			compatible = "slim217,250";
23cb7aa33aSEmmanuel Vadot			reg = <1 0>;
24cb7aa33aSEmmanuel Vadot			slim-ifc-dev = <&wcd9340_ifd>;
25cb7aa33aSEmmanuel Vadot
26cb7aa33aSEmmanuel Vadot			#sound-dai-cells = <1>;
27cb7aa33aSEmmanuel Vadot
28cb7aa33aSEmmanuel Vadot			interrupts-extended = <&tlmm 54 IRQ_TYPE_LEVEL_HIGH>;
29cb7aa33aSEmmanuel Vadot			interrupt-controller;
30cb7aa33aSEmmanuel Vadot			#interrupt-cells = <1>;
31cb7aa33aSEmmanuel Vadot
32cb7aa33aSEmmanuel Vadot			clock-names = "extclk";
33cb7aa33aSEmmanuel Vadot			clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
34cb7aa33aSEmmanuel Vadot
35cb7aa33aSEmmanuel Vadot			#clock-cells = <0>;
36cb7aa33aSEmmanuel Vadot			clock-frequency = <9600000>;
37cb7aa33aSEmmanuel Vadot			clock-output-names = "mclk";
38cb7aa33aSEmmanuel Vadot
39cb7aa33aSEmmanuel Vadot			pinctrl-0 = <&wcd_intr_default>;
40cb7aa33aSEmmanuel Vadot			pinctrl-names = "default";
41cb7aa33aSEmmanuel Vadot
42cb7aa33aSEmmanuel Vadot			qcom,micbias1-microvolt = <1800000>;
43cb7aa33aSEmmanuel Vadot			qcom,micbias2-microvolt = <1800000>;
44cb7aa33aSEmmanuel Vadot			qcom,micbias3-microvolt = <1800000>;
45cb7aa33aSEmmanuel Vadot			qcom,micbias4-microvolt = <1800000>;
46cb7aa33aSEmmanuel Vadot
47cb7aa33aSEmmanuel Vadot			#address-cells = <1>;
48cb7aa33aSEmmanuel Vadot			#size-cells = <1>;
49cb7aa33aSEmmanuel Vadot
50cb7aa33aSEmmanuel Vadot			wcdgpio: gpio-controller@42 {
51cb7aa33aSEmmanuel Vadot				compatible = "qcom,wcd9340-gpio";
52cb7aa33aSEmmanuel Vadot				gpio-controller;
53cb7aa33aSEmmanuel Vadot				#gpio-cells = <2>;
54cb7aa33aSEmmanuel Vadot				reg = <0x42 0x2>;
55cb7aa33aSEmmanuel Vadot			};
56cb7aa33aSEmmanuel Vadot
57*8d13bc63SEmmanuel Vadot			swm: soundwire@c85 {
58cb7aa33aSEmmanuel Vadot				compatible = "qcom,soundwire-v1.3.0";
59cb7aa33aSEmmanuel Vadot				reg = <0xc85 0x40>;
60cb7aa33aSEmmanuel Vadot				interrupts-extended = <&wcd9340 20>;
61cb7aa33aSEmmanuel Vadot
62cb7aa33aSEmmanuel Vadot				qcom,dout-ports = <6>;
63cb7aa33aSEmmanuel Vadot				qcom,din-ports = <2>;
64cb7aa33aSEmmanuel Vadot				qcom,ports-sinterval-low = /bits/ 8  <0x07 0x1f 0x3f 0x7 0x1f 0x3f 0x0f 0x0f>;
65cb7aa33aSEmmanuel Vadot				qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x6 0x12 0x0d 0x07 0x0a>;
66cb7aa33aSEmmanuel Vadot				qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x1f 0x00 0x00 0x1f 0x00 0x00>;
67cb7aa33aSEmmanuel Vadot
68cb7aa33aSEmmanuel Vadot				#sound-dai-cells = <1>;
69cb7aa33aSEmmanuel Vadot				clocks = <&wcd9340>;
70cb7aa33aSEmmanuel Vadot				clock-names = "iface";
71cb7aa33aSEmmanuel Vadot				#address-cells = <2>;
72cb7aa33aSEmmanuel Vadot				#size-cells = <0>;
73cb7aa33aSEmmanuel Vadot			};
74cb7aa33aSEmmanuel Vadot		};
75cb7aa33aSEmmanuel Vadot	};
76cb7aa33aSEmmanuel Vadot};
77cb7aa33aSEmmanuel Vadot
78cb7aa33aSEmmanuel Vadot&tlmm {
79cb7aa33aSEmmanuel Vadot	wcd_intr_default: wcd-intr-default-state {
80cb7aa33aSEmmanuel Vadot		pins = "gpio54";
81cb7aa33aSEmmanuel Vadot		function = "gpio";
82cb7aa33aSEmmanuel Vadot
83cb7aa33aSEmmanuel Vadot		bias-pull-down;
84cb7aa33aSEmmanuel Vadot		drive-strength = <2>;
85cb7aa33aSEmmanuel Vadot	};
86cb7aa33aSEmmanuel Vadot};
87