Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
0004  */
0005 
0006 /dts-v1/;
0007 #include "rk3399-roc-pc.dtsi"
0008 
0009 /*
0010  * Notice:
0011  * 1. rk3399-roc-pc-plus is powered by dc_12v directly.
0012  * 2. rk3399-roc-pc-plus has only vcc_bus_typec0 in schematic, which is coresponding
0013  *    to vcc_vbus_typec1 in rk3399-roc-pc.
0014  *    For simplicity, reserve the node name of vcc_vbus_typec1.
0015  * 3. vcc5v0_host is actually 2 regulators (host0, 1) controlled by the same gpio.
0016  */
0017 
0018 /delete-node/ &fusb1;
0019 /delete-node/ &hub_rst;
0020 /delete-node/ &mp8859;
0021 /delete-node/ &vcc_sys_en;
0022 /delete-node/ &vcc_vbus_typec0;
0023 /delete-node/ &yellow_led;
0024 
0025 / {
0026         model = "Firefly ROC-RK3399-PC-PLUS Board";
0027         compatible = "firefly,roc-rk3399-pc-plus", "rockchip,rk3399";
0028 
0029         dc_12v: dc-12v {
0030                 compatible = "regulator-fixed";
0031                 regulator-name = "dc_12v";
0032                 regulator-always-on;
0033                 regulator-boot-on;
0034                 regulator-min-microvolt = <12000000>;
0035                 regulator-max-microvolt = <12000000>;
0036         };
0037 
0038         es8388-sound {
0039                 compatible = "simple-audio-card";
0040                 pinctrl-names = "default";
0041                 pinctrl-0 = <&hp_det_pin>;
0042                 simple-audio-card,name = "rockchip,es8388-codec";
0043                 simple-audio-card,format = "i2s";
0044                 simple-audio-card,mclk-fs = <256>;
0045                 simple-audio-card,widgets =
0046                         "Microphone", "Mic Jack",
0047                         "Headphone", "Headphones";
0048                 simple-audio-card,routing =
0049                         "LINPUT1", "Mic Jack",
0050                         "Headphone Amp INL", "LOUT2",
0051                         "Headphone Amp INR", "ROUT2",
0052                         "Headphones", "Headphone Amp OUTL",
0053                         "Headphones", "Headphone Amp OUTR";
0054                 simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
0055                 simple-audio-card,aux-devs = <&headphones_amp>;
0056                 simple-audio-card,pin-switches = "Headphones";
0057 
0058                 simple-audio-card,codec {
0059                         sound-dai = <&es8388>;
0060                 };
0061 
0062                 simple-audio-card,cpu {
0063                         sound-dai = <&i2s1>;
0064                 };
0065         };
0066 
0067         gpio-fan {
0068                 #cooling-cells = <2>;
0069                 compatible = "gpio-fan";
0070                 gpio-fan,speed-map = <0 0 3000 1>;
0071                 gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
0072         };
0073 
0074         /delete-node/ gpio-keys;
0075 
0076         /* not amplifier, used as switcher only */
0077         headphones_amp: headphones-amp {
0078                 compatible = "simple-audio-amplifier";
0079                 pinctrl-names = "default";
0080                 pinctrl-0 = <&ear_ctl_pin>;
0081                 enable-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
0082                 sound-name-prefix = "Headphone Amp";
0083                 VCC-supply = <&vcca3v0_codec>;
0084         };
0085 
0086         ir-receiver {
0087                 linux,rc-map-name = "rc-khadas";
0088         };
0089 
0090         leds {
0091                 pinctrl-names = "default";
0092                 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
0093         };
0094 };
0095 
0096 &fusb0 {
0097         vbus-supply = <&vcc_vbus_typec1>;
0098 };
0099 
0100 &i2c0 {
0101         hym8563: hym8563@51 {
0102                 compatible = "haoyu,hym8563";
0103                 reg = <0x51>;
0104                 interrupt-parent = <&gpio0>;
0105                 interrupts = <RK_PA5 IRQ_TYPE_EDGE_FALLING>;
0106                 #clock-cells = <0>;
0107                 clock-frequency = <32768>;
0108                 clock-output-names = "xin32k";
0109                 pinctrl-names = "default";
0110                 pinctrl-0 = <&hym8563_int>;
0111         };
0112 };
0113 
0114 &i2c1 {
0115         es8388: es8388@11 {
0116                 compatible = "everest,es8388";
0117                 reg = <0x11>;
0118                 clock-names = "mclk";
0119                 clocks = <&cru SCLK_I2S_8CH_OUT>;
0120                 #sound-dai-cells = <0>;
0121         };
0122 };
0123 
0124 /* <4 RK_PA0 1 &pcfg_pull_none> is used as i2s_8ch_mclk_pin */
0125 &i2s0_8ch_bus {
0126         rockchip,pins =
0127                 <3 RK_PD0 1 &pcfg_pull_none>,
0128                 <3 RK_PD1 1 &pcfg_pull_none>,
0129                 <3 RK_PD2 1 &pcfg_pull_none>,
0130                 <3 RK_PD3 1 &pcfg_pull_none>,
0131                 <3 RK_PD4 1 &pcfg_pull_none>,
0132                 <3 RK_PD5 1 &pcfg_pull_none>,
0133                 <3 RK_PD6 1 &pcfg_pull_none>,
0134                 <3 RK_PD7 1 &pcfg_pull_none>;
0135 };
0136 
0137 &i2s1 {
0138         pinctrl-names = "default";
0139         pinctrl-0 = <&i2s_8ch_mclk_pin>, <&i2s1_2ch_bus>;
0140         rockchip,playback-channels = <2>;
0141         rockchip,capture-channels = <2>;
0142         status = "okay";
0143 };
0144 
0145 &pinctrl {
0146         es8388 {
0147                 ear_ctl_pin: ear-ctl-pin {
0148                         rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_output_high>;
0149                 };
0150 
0151                 hp_det_pin: hp-det-pin {
0152                         rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_down>;
0153                 };
0154         };
0155 
0156         hym8563 {
0157                 hym8563_int: hym8563-int {
0158                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0159                 };
0160         };
0161 
0162         i2s1 {
0163                 i2s_8ch_mclk_pin: i2s-8ch-mclk-pin {
0164                         rockchip,pins = <4 RK_PA0 1 &pcfg_pull_none>;
0165                 };
0166         };
0167 };
0168 
0169 &u2phy0 {
0170         status = "okay";
0171 
0172         u2phy0_otg: otg-port {
0173                 phy-supply = <&vcc_vbus_typec1>;
0174                 status = "okay";
0175         };
0176 
0177         u2phy0_host: host-port {
0178                 phy-supply = <&vcc5v0_host>;
0179                 status = "okay";
0180         };
0181 };
0182 
0183 &u2phy1 {
0184         status = "okay";
0185 
0186         u2phy1_otg: otg-port {
0187                 phy-supply = <&vcc5v0_host>;
0188                 status = "okay";
0189         };
0190 
0191         u2phy1_host: host-port {
0192                 phy-supply = <&vcc5v0_host>;
0193                 status = "okay";
0194         };
0195 };
0196 
0197 &uart0 {
0198         pinctrl-names = "default";
0199         pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
0200         status = "okay";
0201 };
0202 
0203 &usbdrd_dwc3_0 {
0204         dr_mode = "host";
0205         status = "okay";
0206 };
0207 
0208 &vcc_sys {
0209         /* vcc_sys is fixed, not controlled by any gpio */
0210         /delete-property/ gpio;
0211         /delete-property/ pinctrl-names;
0212         /delete-property/ pinctrl-0;
0213 };
0214 
0215 &vcc5v0_host {
0216         pinctrl-names = "default";
0217         pinctrl-0 = <&vcc5v0_host_en>;
0218 };