forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
....@@ -10,9 +10,13 @@
1010
1111 #include "hi3660.dtsi"
1212 #include "hikey960-pinctrl.dtsi"
13
+#include "hi3660-drm.dtsi"
14
+#include "hi3660-gpu.dtsi"
15
+
1316 #include <dt-bindings/gpio/gpio.h>
1417 #include <dt-bindings/input/input.h>
1518 #include <dt-bindings/interrupt-controller/irq.h>
19
+#include <dt-bindings/usb/pd.h>
1620
1721 / {
1822 model = "HiKey960";
....@@ -52,6 +56,14 @@
5256 console-size = <0x00020000>;
5357 ftrace-size = <0x00020000>;
5458 };
59
+
60
+ /* global autoconfigured region for contiguous allocations */
61
+ linux,cma {
62
+ compatible = "shared-dma-pool";
63
+ reg = <0x0 0x20C00000 0x0 0x4000000>;
64
+ reusable;
65
+ linux,cma-default;
66
+ };
5567 };
5668
5769 reboot-mode-syscon@32100000 {
....@@ -85,36 +97,36 @@
8597 compatible = "gpio-leds";
8698
8799 user_led1 {
88
- label = "user_led1";
100
+ label = "green:user1";
89101 /* gpio_150_user_led1 */
90102 gpios = <&gpio18 6 0>;
91103 linux,default-trigger = "heartbeat";
92104 };
93105
94106 user_led2 {
95
- label = "user_led2";
107
+ label = "green:user2";
96108 /* gpio_151_user_led2 */
97109 gpios = <&gpio18 7 0>;
98
- linux,default-trigger = "mmc0";
110
+ linux,default-trigger = "none";
99111 };
100112
101113 user_led3 {
102
- label = "user_led3";
114
+ label = "green:user3";
103115 /* gpio_189_user_led3 */
104116 gpios = <&gpio23 5 0>;
105
- default-state = "off";
117
+ linux,default-trigger = "mmc0";
106118 };
107119
108120 user_led4 {
109
- label = "user_led4";
121
+ label = "green:user4";
110122 /* gpio_190_user_led4 */
111123 gpios = <&gpio23 6 0>;
112124 panic-indicator;
113
- linux,default-trigger = "cpu0";
125
+ linux,default-trigger = "none";
114126 };
115127
116128 wlan_active_led {
117
- label = "wifi_active";
129
+ label = "yellow:wlan";
118130 /* gpio_205_wifi_active */
119131 gpios = <&gpio25 5 0>;
120132 linux,default-trigger = "phy0tx";
....@@ -122,7 +134,7 @@
122134 };
123135
124136 bt_active_led {
125
- label = "bt_active";
137
+ label = "blue:bt";
126138 gpios = <&gpio25 7 0>;
127139 /* gpio_207_user_led1 */
128140 linux,default-trigger = "hci0-power";
....@@ -194,6 +206,56 @@
194206 optee {
195207 compatible = "linaro,optee-tz";
196208 method = "smc";
209
+ };
210
+ };
211
+
212
+ hisi_hikey_usb: hisi_hikey_usb {
213
+ compatible = "hisilicon,gpio_hubv1";
214
+ typec-vbus-gpios = <&gpio25 2 GPIO_ACTIVE_HIGH>;
215
+ otg-switch-gpios = <&gpio25 6 GPIO_ACTIVE_HIGH>;
216
+ hub-vdd33-en-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>;
217
+ usb-role-switch;
218
+
219
+ port {
220
+ #address-cells = <1>;
221
+ #size-cells = <0>;
222
+
223
+ hikey_usb_ep0: endpoint@0 {
224
+ reg = <0>;
225
+ remote-endpoint = <&dwc3_role_switch>;
226
+ };
227
+ hikey_usb_ep1: endpoint@1 {
228
+ reg = <1>;
229
+ remote-endpoint = <&rt1711h_ep>;
230
+ };
231
+ };
232
+ };
233
+
234
+ i2s2: hi3660_i2s {
235
+ compatible = "hisilicon,hi3660-i2s-1.0";
236
+ reg = <0x0 0xe804f800 0x0 0x400>,
237
+ <0x0 0xe804e000 0x0 0x400>;
238
+ pinctrl-names = "default";
239
+ pinctrl-0 = <&i2s2_pmx_func &i2s2_cfg_func>;
240
+ dmas = <&asp_dmac 18 &asp_dmac 19>;
241
+ dma-names = "rx", "tx";
242
+ #sound-dai-cells = <0>;
243
+ };
244
+
245
+ sound {
246
+ compatible = "simple-audio-card";
247
+ simple-audio-card,name = "hikey-hdmi";
248
+ simple-audio-card,format = "i2s";
249
+
250
+ simple-audio-card,bitclock-master = <&sound_master>;
251
+ simple-audio-card,frame-master = <&sound_master>;
252
+
253
+ sound_master: simple-audio-card,cpu {
254
+ sound-dai = <&i2s2>;
255
+ };
256
+
257
+ simple-audio-card,codec {
258
+ sound-dai = <&adv7533>;
197259 };
198260 };
199261 };
....@@ -526,22 +588,77 @@
526588 &i2c1 {
527589 status = "okay";
528590
591
+ rt1711h: rt1711h@4e {
592
+ compatible = "richtek,rt1711h";
593
+ reg = <0x4e>;
594
+ status = "okay";
595
+ interrupt-parent = <&gpio27>;
596
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
597
+ pinctrl-names = "default";
598
+ pinctrl-0 = <&usb_cfg_func>;
599
+
600
+ usb_con: connector {
601
+ compatible = "usb-c-connector";
602
+ label = "USB-C";
603
+ data-role = "dual";
604
+ power-role = "dual";
605
+ try-power-role = "sink";
606
+ source-pdos = <PDO_FIXED(5000, 500, PDO_FIXED_USB_COMM)>;
607
+ sink-pdos = <PDO_FIXED(5000, 500, PDO_FIXED_USB_COMM)
608
+ PDO_VAR(5000, 5000, 1000)>;
609
+ op-sink-microwatt = <10000000>;
610
+
611
+ ports {
612
+ #address-cells = <1>;
613
+ #size-cells = <0>;
614
+ port@1 {
615
+ reg = <1>;
616
+ usb_con_ss: endpoint {
617
+ remote-endpoint = <&dwc3_ss>;
618
+ };
619
+ };
620
+ };
621
+ };
622
+ port {
623
+ #address-cells = <1>;
624
+ #size-cells = <0>;
625
+
626
+ rt1711h_ep: endpoint@0 {
627
+ reg = <0>;
628
+ remote-endpoint = <&hikey_usb_ep1>;
629
+ };
630
+ };
631
+ };
632
+
529633 adv7533: adv7533@39 {
530
- status = "ok";
634
+ status = "okay";
531635 compatible = "adi,adv7533";
532636 reg = <0x39>;
637
+ v1p2-supply = <&ldo3>;
638
+ vdd-supply = <&ldo3>;
639
+ interrupt-parent = <&gpio1>;
640
+ interrupts = <1 2>;
641
+ pd-gpio = <&gpio5 1 0>;
642
+ sel-gpio = <&gpio2 4 0>;
533643 adi,dsi-lanes = <4>;
644
+ adi,disable-timing-generator;
645
+ #sound-dai-cells = <0>;
646
+
534647 ports {
535648 #address-cells = <1>;
536649 #size-cells = <0>;
537650 port@0 {
538651 reg = <0>;
652
+ adv7533_in: endpoint {
653
+ remote-endpoint = <&dsi_out0>;
654
+ };
539655 };
540656 port@1 {
541657 reg = <1>;
542658 };
543659 };
544660 };
661
+
545662 };
546663
547664 &i2c7 {
....@@ -592,8 +709,7 @@
592709 sd-uhs-sdr50;
593710 sd-uhs-sdr104;
594711 disable-wp;
595
- cd-inverted;
596
- cd-gpios = <&gpio25 3 0>;
712
+ cd-gpios = <&gpio25 3 GPIO_ACTIVE_LOW>;
597713 pinctrl-names = "default";
598714 pinctrl-0 = <&sd_pmx_func
599715 &sd_clk_cfg_func
....@@ -614,7 +730,7 @@
614730 &sdio_cfg_func>;
615731 /* WL_EN */
616732 vmmc-supply = <&wlan_en>;
617
- status = "ok";
733
+ status = "okay";
618734
619735 wlcore: wlcore@2 {
620736 compatible = "ti,wl1837";
....@@ -624,3 +740,32 @@
624740 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
625741 };
626742 };
743
+
744
+&dwc3 { /* USB */
745
+ dr_mode = "otg";
746
+ maximum-speed = "super-speed";
747
+ phy_type = "utmi";
748
+ snps,dis-del-phy-power-chg-quirk;
749
+ snps,lfps_filter_quirk;
750
+ snps,dis_u2_susphy_quirk;
751
+ snps,dis_u3_susphy_quirk;
752
+ snps,tx_de_emphasis_quirk;
753
+ snps,tx_de_emphasis = <1>;
754
+ snps,dis_enblslpm_quirk;
755
+ snps,gctl-reset-quirk;
756
+ usb-role-switch;
757
+ role-switch-default-mode = "host";
758
+ port {
759
+ #address-cells = <1>;
760
+ #size-cells = <0>;
761
+ dwc3_role_switch: endpoint@0 {
762
+ reg = <0>;
763
+ remote-endpoint = <&hikey_usb_ep0>;
764
+ };
765
+
766
+ dwc3_ss: endpoint@1 {
767
+ reg = <1>;
768
+ remote-endpoint = <&usb_con_ss>;
769
+ };
770
+ };
771
+};