Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2018 Theobroma Systems Design und Consulting GmbH
0004  */
0005 
0006 /dts-v1/;
0007 #include "rk3368.dtsi"
0008 
0009 / {
0010         aliases {
0011                 mmc0 = &emmc;
0012         };
0013 
0014         chosen {
0015                 stdout-path = "serial0:115200n8";
0016         };
0017 
0018         ext_gmac: gmac-clk {
0019                 compatible = "fixed-clock";
0020                 clock-frequency = <125000000>;
0021                 clock-output-names = "ext_gmac";
0022                 #clock-cells = <0>;
0023         };
0024 
0025         i2cmux1 {
0026                 compatible = "i2c-mux-gpio";
0027                 #address-cells = <1>;
0028                 #size-cells = <0>;
0029                 i2c-parent = <&i2c1>;
0030                 mux-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>;
0031 
0032                 /* Q7_GP0_I2C */
0033                 i2c_gp0: i2c@0 {
0034                         reg = <0>;
0035                         #address-cells = <1>;
0036                         #size-cells = <0>;
0037                 };
0038 
0039                 /* Q7_SMB */
0040                 i2c_smb: i2c@1 {
0041                         reg = <1>;
0042                         #address-cells = <1>;
0043                         #size-cells = <0>;
0044                 };
0045         };
0046 
0047         i2cmux2 {
0048                 compatible = "i2c-mux-gpio";
0049                 #address-cells = <1>;
0050                 #size-cells = <0>;
0051                 i2c-parent = <&i2c2>;
0052                 mux-gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
0053 
0054                 /* Q7_LVDS_BLC_I2C */
0055                 i2c_lvds_blc: i2c@0 {
0056                         reg = <0>;
0057                         #address-cells = <1>;
0058                         #size-cells = <0>;
0059 
0060                         fan: fan@18 {
0061                                 compatible = "ti,amc6821";
0062                                 reg = <0x18>;
0063                                 #cooling-cells = <2>;
0064                         };
0065 
0066                         rtc_twi: rtc@6f {
0067                                 compatible = "isil,isl1208";
0068                                 reg = <0x6f>;
0069                         };
0070                 };
0071 
0072                 /* Q7_GP2_I2C = LVDS_DID_CLK/DAT */
0073                 i2c_gp2: i2c@1 {
0074                         reg = <1>;
0075                         #address-cells = <1>;
0076                         #size-cells = <0>;
0077                 };
0078         };
0079 
0080         leds {
0081                 compatible = "gpio-leds";
0082                 pinctrl-names = "default";
0083                 pinctrl-0 = <&module_led_pins>;
0084 
0085                 module_led1: led-1 {
0086                         label = "module_led1";
0087                         gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_HIGH>;
0088                         linux,default-trigger = "heartbeat";
0089                         panic-indicator;
0090                 };
0091 
0092                 module_led2: led-2 {
0093                         label = "module_led2";
0094                         gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
0095                         default-state = "off";
0096                 };
0097         };
0098 
0099         vcc_sys: vcc-sys-regulator {
0100                 compatible = "regulator-fixed";
0101                 regulator-name = "vcc_sys";
0102                 regulator-min-microvolt = <5000000>;
0103                 regulator-max-microvolt = <5000000>;
0104                 regulator-always-on;
0105                 regulator-boot-on;
0106         };
0107 };
0108 
0109 &cpu_l0 {
0110         cpu-supply = <&vdd_cpu>;
0111 };
0112 
0113 &cpu_l1 {
0114         cpu-supply = <&vdd_cpu>;
0115 };
0116 
0117 &cpu_l2 {
0118         cpu-supply = <&vdd_cpu>;
0119 };
0120 
0121 &cpu_l3 {
0122         cpu-supply = <&vdd_cpu>;
0123 };
0124 
0125 &cpu_b0 {
0126         cpu-supply = <&vdd_cpu>;
0127 };
0128 
0129 &cpu_b1 {
0130         cpu-supply = <&vdd_cpu>;
0131 };
0132 
0133 &cpu_b2 {
0134         cpu-supply = <&vdd_cpu>;
0135 };
0136 
0137 &cpu_b3 {
0138         cpu-supply = <&vdd_cpu>;
0139 };
0140 
0141 &emmc {
0142         bus-width = <8>;
0143         clock-frequency = <150000000>;
0144         mmc-hs200-1_8v;
0145         non-removable;
0146         vmmc-supply = <&vcc33_io>;
0147         vqmmc-supply = <&vcc_18>;
0148         pinctrl-names = "default";
0149         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
0150         status = "okay";
0151 };
0152 
0153 &gmac {
0154         assigned-clocks = <&cru SCLK_MAC>;
0155         assigned-clock-parents = <&ext_gmac>;
0156         clock_in_out = "input";
0157         phy-supply = <&vcc33_io>;
0158         phy-mode = "rgmii";
0159         pinctrl-names = "default";
0160         pinctrl-0 = <&rgmii_pins>;
0161         snps,reset-active-low;
0162         snps,reset-delays-us = <0 10000 50000>;
0163         snps,reset-gpio = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
0164         tx_delay = <0x10>;
0165         rx_delay = <0x10>;
0166         status = "okay";
0167 };
0168 
0169 &i2c0 {
0170         status = "okay";
0171 
0172         rk808: pmic@1b {
0173                 compatible = "rockchip,rk808";
0174                 reg = <0x1b>;
0175                 interrupt-parent = <&gpio0>;
0176                 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
0177                 clock-output-names = "xin32k", "rk808-clkout2";
0178                 #clock-cells = <1>;
0179                 pinctrl-names = "default";
0180                 pinctrl-0 = <&pmic_int_l>, <&pmic_sleep>;
0181                 rockchip,system-power-controller;
0182                 vcc1-supply = <&vcc_sys>;
0183                 vcc2-supply = <&vcc_sys>;
0184                 vcc3-supply = <&vcc_sys>;
0185                 vcc4-supply = <&vcc_sys>;
0186                 vcc6-supply = <&vcc_sys>;
0187                 vcc7-supply = <&vcc_sys>;
0188                 vcc8-supply = <&vcc_sys>;
0189                 vcc9-supply = <&vcc_sys>;
0190                 vcc10-supply = <&vcc_sys>;
0191                 vcc11-supply = <&vcc_sys>;
0192                 vcc12-supply = <&vcc_sys>;
0193 
0194                 regulators {
0195                         vdd_cpu: DCDC_REG1 {
0196                                 regulator-name = "vdd_cpu";
0197                                 regulator-min-microvolt = <700000>;
0198                                 regulator-max-microvolt = <1500000>;
0199                                 regulator-always-on;
0200                                 regulator-boot-on;
0201                         };
0202 
0203                         vdd_log: DCDC_REG2 {
0204                                 regulator-name = "vdd_log";
0205                                 regulator-min-microvolt = <700000>;
0206                                 regulator-max-microvolt = <1500000>;
0207                                 regulator-always-on;
0208                                 regulator-boot-on;
0209                         };
0210 
0211                         vcc_ddr: DCDC_REG3 {
0212                                 regulator-name = "vcc_ddr";
0213                                 regulator-always-on;
0214                                 regulator-boot-on;
0215                         };
0216 
0217                         vcc33_io: DCDC_REG4 {
0218                                 regulator-name = "vcc33_io";
0219                                 regulator-min-microvolt = <3300000>;
0220                                 regulator-max-microvolt = <3300000>;
0221                                 regulator-always-on;
0222                                 regulator-boot-on;
0223                         };
0224 
0225                         vcc33_video: LDO_REG2 {
0226                                 regulator-name = "vcc33_video";
0227                                 regulator-min-microvolt = <3300000>;
0228                                 regulator-max-microvolt = <3300000>;
0229                                 regulator-always-on;
0230                                 regulator-boot-on;
0231                         };
0232 
0233                         vdd10_pll: LDO_REG3 {
0234                                 regulator-name = "vdd10_pll";
0235                                 regulator-min-microvolt = <1000000>;
0236                                 regulator-max-microvolt = <1000000>;
0237                                 regulator-always-on;
0238                                 regulator-boot-on;
0239                         };
0240 
0241                         vdd10_video: LDO_REG6 {
0242                                 regulator-name = "vdd10_video";
0243                                 regulator-min-microvolt = <1000000>;
0244                                 regulator-max-microvolt = <1000000>;
0245                                 regulator-always-on;
0246                                 regulator-boot-on;
0247                         };
0248 
0249                         vcc_18: LDO_REG7 {
0250                                 regulator-always-on;
0251                                 regulator-boot-on;
0252                                 regulator-min-microvolt = <1800000>;
0253                                 regulator-max-microvolt = <1800000>;
0254                                 regulator-name = "vcc_18";
0255                         };
0256 
0257                         vcc18_video: LDO_REG8 {
0258                                 regulator-name = "vcc18_video";
0259                                 regulator-min-microvolt = <1800000>;
0260                                 regulator-max-microvolt = <1800000>;
0261                                 regulator-always-on;
0262                                 regulator-boot-on;
0263                         };
0264                 };
0265         };
0266 };
0267 
0268 &i2c1 {
0269         status = "okay";
0270 };
0271 
0272 &i2c2 {
0273         status = "okay";
0274 };
0275 
0276 /* The RK3368-uQ7 "Lion" has most IO voltages hardwired to 3.3V. */
0277 &io_domains {
0278         audio-supply = <&vcc33_io>;
0279         dvp-supply = <&vcc33_io>;
0280         flash0-supply = <&vcc_18>;
0281         gpio30-supply = <&vcc33_io>;
0282         gpio1830-supply = <&vcc33_io>;
0283         sdcard-supply = <&vcc33_io>;
0284         wifi-supply = <&vcc33_io>;
0285         status = "okay";
0286 };
0287 
0288 &pinctrl {
0289         leds {
0290                 module_led_pins: module-led-pins {
0291                         rockchip,pins =
0292                                 <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
0293                                 <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
0294                 };
0295         };
0296         pmic {
0297                 pmic_int_l: pmic-int-l {
0298                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0299                 };
0300 
0301                 pmic_sleep: pmic-sleep {
0302                         rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
0303                 };
0304         };
0305 };
0306 
0307 &pmu_io_domains {
0308         pmu-supply = <&vcc33_io>;
0309         vop-supply = <&vcc33_io>;
0310         status = "okay";
0311 };
0312 
0313 &spi1 {
0314         status = "okay";
0315 
0316         norflash: flash@0 {
0317                 compatible = "jedec,spi-nor";
0318                 reg = <0>;
0319                 spi-max-frequency = <50000000>;
0320         };
0321 };
0322 
0323 &uart1 {
0324         status = "okay";
0325 };
0326 
0327 &uart3 {
0328         status = "okay";
0329 };
0330 
0331 &usb_host0_ehci {
0332         status = "okay";
0333 };
0334 
0335 &wdt {
0336         status = "okay";
0337 };