0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
0004 */
0005
0006 /dts-v1/;
0007 #include "rk3399-puma.dtsi"
0008
0009 / {
0010 model = "Theobroma Systems RK3399-Q7 SoM";
0011 compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399";
0012
0013 aliases {
0014 mmc1 = &sdmmc;
0015 };
0016
0017 chosen {
0018 stdout-path = "serial0:115200n8";
0019 };
0020
0021 leds {
0022 pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>;
0023
0024 sd_card_led: led-1 {
0025 label = "sd_card_led";
0026 gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
0027 linux,default-trigger = "mmc0";
0028 };
0029 };
0030
0031 i2s0-sound {
0032 compatible = "simple-audio-card";
0033 simple-audio-card,format = "i2s";
0034 simple-audio-card,name = "Haikou,I2S-codec";
0035 simple-audio-card,mclk-fs = <512>;
0036
0037 simple-audio-card,codec {
0038 clocks = <&sgtl5000_clk>;
0039 sound-dai = <&sgtl5000>;
0040 };
0041
0042 simple-audio-card,cpu {
0043 bitclock-master;
0044 frame-master;
0045 sound-dai = <&i2s0>;
0046 };
0047 };
0048
0049 sgtl5000_clk: sgtl5000-oscillator {
0050 compatible = "fixed-clock";
0051 #clock-cells = <0>;
0052 clock-frequency = <24576000>;
0053 };
0054
0055 dc_12v: dc-12v {
0056 compatible = "regulator-fixed";
0057 regulator-name = "dc_12v";
0058 regulator-always-on;
0059 regulator-boot-on;
0060 regulator-min-microvolt = <12000000>;
0061 regulator-max-microvolt = <12000000>;
0062 };
0063
0064 vcc3v3_baseboard: vcc3v3-baseboard {
0065 compatible = "regulator-fixed";
0066 regulator-name = "vcc3v3_baseboard";
0067 regulator-always-on;
0068 regulator-boot-on;
0069 regulator-min-microvolt = <3300000>;
0070 regulator-max-microvolt = <3300000>;
0071 vin-supply = <&dc_12v>;
0072 };
0073
0074 vcc5v0_baseboard: vcc5v0-baseboard {
0075 compatible = "regulator-fixed";
0076 regulator-name = "vcc5v0_baseboard";
0077 regulator-always-on;
0078 regulator-boot-on;
0079 regulator-min-microvolt = <5000000>;
0080 regulator-max-microvolt = <5000000>;
0081 vin-supply = <&dc_12v>;
0082 };
0083
0084 vcc5v0_otg: vcc5v0-otg-regulator {
0085 compatible = "regulator-fixed";
0086 enable-active-high;
0087 gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
0088 pinctrl-names = "default";
0089 pinctrl-0 = <&otg_vbus_drv>;
0090 regulator-name = "vcc5v0_otg";
0091 regulator-always-on;
0092 };
0093
0094 vdda_codec: vdda-codec {
0095 compatible = "regulator-fixed";
0096 regulator-name = "vdda_codec";
0097 regulator-boot-on;
0098 regulator-min-microvolt = <3300000>;
0099 regulator-max-microvolt = <3300000>;
0100 vin-supply = <&vcc5v0_baseboard>;
0101 };
0102
0103 vddd_codec: vddd-codec {
0104 compatible = "regulator-fixed";
0105 regulator-name = "vddd_codec";
0106 regulator-boot-on;
0107 regulator-min-microvolt = <1600000>;
0108 regulator-max-microvolt = <1600000>;
0109 vin-supply = <&vcc5v0_baseboard>;
0110 };
0111 };
0112
0113 &hdmi {
0114 ddc-i2c-bus = <&i2c3>;
0115 status = "okay";
0116 };
0117
0118 &i2c1 {
0119 status = "okay";
0120 clock-frequency = <400000>;
0121 };
0122
0123 &i2c2 {
0124 status = "okay";
0125 clock-frequency = <400000>;
0126 };
0127
0128 &i2c3 {
0129 i2c-scl-rising-time-ns = <450>;
0130 i2c-scl-falling-time-ns = <15>;
0131 status = "okay";
0132 };
0133
0134 &i2c4 {
0135 status = "okay";
0136 clock-frequency = <400000>;
0137
0138 sgtl5000: codec@a {
0139 compatible = "fsl,sgtl5000";
0140 reg = <0x0a>;
0141 clocks = <&sgtl5000_clk>;
0142 #sound-dai-cells = <0>;
0143 VDDA-supply = <&vdda_codec>;
0144 VDDIO-supply = <&vdda_codec>;
0145 VDDD-supply = <&vddd_codec>;
0146 status = "okay";
0147 };
0148 };
0149
0150 &i2c6 {
0151 status = "okay";
0152 clock-frequency = <400000>;
0153 };
0154
0155 &pcie_phy {
0156 status = "okay";
0157 };
0158
0159 &pcie0 {
0160 ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
0161 num-lanes = <4>;
0162 pinctrl-names = "default";
0163 pinctrl-0 = <&pcie_clkreqn_cpm>;
0164 status = "okay";
0165 };
0166
0167 &pinctrl {
0168 pinctrl-names = "default";
0169 pinctrl-0 = <&haikou_pin_hog>;
0170
0171 hog {
0172 haikou_pin_hog: haikou-pin-hog {
0173 rockchip,pins =
0174 /* LID_BTN */
0175 <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
0176 /* BATLOW# */
0177 <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
0178 /* SLP_BTN# */
0179 <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
0180 /* BIOS_DISABLE# */
0181 <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
0182 };
0183 };
0184
0185 leds {
0186 sd_card_led_pin: sd-card-led-pin {
0187 rockchip,pins =
0188 <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0189 };
0190 };
0191
0192 usb2 {
0193 otg_vbus_drv: otg-vbus-drv {
0194 rockchip,pins =
0195 <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0196 };
0197 };
0198 };
0199
0200 &pwm0 {
0201 status = "okay";
0202 };
0203
0204 &sdmmc {
0205 bus-width = <4>;
0206 cap-mmc-highspeed;
0207 cap-sd-highspeed;
0208 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
0209 disable-wp;
0210 max-frequency = <150000000>;
0211 pinctrl-names = "default";
0212 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
0213 vmmc-supply = <&vcc3v3_baseboard>;
0214 status = "okay";
0215 };
0216
0217 &spi5 {
0218 status = "okay";
0219 };
0220
0221 &tcphy0 {
0222 status = "okay";
0223 };
0224
0225 &u2phy0 {
0226 status = "okay";
0227 };
0228
0229 &usbdrd3_0 {
0230 status = "okay";
0231 };
0232
0233 &usbdrd_dwc3_0 {
0234 dr_mode = "otg";
0235 extcon = <&extcon_usb3>;
0236 status = "okay";
0237 };
0238
0239 &u2phy0_host {
0240 phy-supply = <&vcc5v0_otg>;
0241 status = "okay";
0242 };
0243
0244 &uart0 {
0245 pinctrl-names = "default";
0246 pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
0247 status = "okay";
0248 };
0249
0250 &uart2 {
0251 status = "okay";
0252 };
0253
0254 &usb_host0_ehci {
0255 status = "okay";
0256 };
0257
0258 &usb_host0_ohci {
0259 status = "okay";
0260 };
0261
0262 &vopb {
0263 status = "okay";
0264 };
0265
0266 &vopb_mmu {
0267 status = "okay";
0268 };
0269
0270 &vopl {
0271 status = "okay";
0272 };
0273
0274 &vopl_mmu {
0275 status = "okay";
0276 };