Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2016 Andreas Färber
0004  */
0005 
0006 /dts-v1/;
0007 #include "rk3368.dtsi"
0008 #include <dt-bindings/input/input.h>
0009 
0010 / {
0011         model = "GeekBox";
0012         compatible = "geekbuying,geekbox", "rockchip,rk3368";
0013 
0014         aliases {
0015                 mmc0 = &emmc;
0016         };
0017 
0018         chosen {
0019                 stdout-path = "serial2:115200n8";
0020         };
0021 
0022         memory@0 {
0023                 device_type = "memory";
0024                 reg = <0x0 0x0 0x0 0x80000000>;
0025         };
0026 
0027         ext_gmac: gmac-clk {
0028                 compatible = "fixed-clock";
0029                 clock-frequency = <125000000>;
0030                 clock-output-names = "ext_gmac";
0031                 #clock-cells = <0>;
0032         };
0033 
0034         ir: ir-receiver {
0035                 compatible = "gpio-ir-receiver";
0036                 gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
0037                 pinctrl-names = "default";
0038                 pinctrl-0 = <&ir_int>;
0039         };
0040 
0041         keys: gpio-keys {
0042                 compatible = "gpio-keys";
0043                 pinctrl-names = "default";
0044                 pinctrl-0 = <&pwr_key>;
0045 
0046                 key-power {
0047                         gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
0048                         label = "GPIO Power";
0049                         linux,code = <KEY_POWER>;
0050                         wakeup-source;
0051                 };
0052         };
0053 
0054         leds: gpio-leds {
0055                 compatible = "gpio-leds";
0056 
0057                 blue_led: led-0 {
0058                         gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>;
0059                         label = "geekbox:blue:led";
0060                         default-state = "on";
0061                 };
0062 
0063                 red_led: led-1 {
0064                         gpios = <&gpio2 RK_PA3 GPIO_ACTIVE_HIGH>;
0065                         label = "geekbox:red:led";
0066                         default-state = "off";
0067                 };
0068         };
0069 
0070         vcc_sys: vcc-sys-regulator {
0071                 compatible = "regulator-fixed";
0072                 regulator-name = "vcc_sys";
0073                 regulator-min-microvolt = <5000000>;
0074                 regulator-max-microvolt = <5000000>;
0075                 regulator-always-on;
0076                 regulator-boot-on;
0077         };
0078 };
0079 
0080 &emmc {
0081         status = "okay";
0082         bus-width = <8>;
0083         cap-mmc-highspeed;
0084         clock-frequency = <150000000>;
0085         non-removable;
0086         vmmc-supply = <&vcc_io>;
0087         vqmmc-supply = <&vcc18_flash>;
0088         pinctrl-names = "default";
0089         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>;
0090 };
0091 
0092 &gmac {
0093         status = "okay";
0094         phy-supply = <&vcc_lan>;
0095         phy-mode = "rgmii";
0096         clock_in_out = "input";
0097         assigned-clocks = <&cru SCLK_MAC>;
0098         assigned-clock-parents = <&ext_gmac>;
0099         pinctrl-names = "default";
0100         pinctrl-0 = <&rgmii_pins>;
0101         tx_delay = <0x30>;
0102         rx_delay = <0x10>;
0103 };
0104 
0105 &i2c0 {
0106         status = "okay";
0107 
0108         rk808: pmic@1b {
0109                 compatible = "rockchip,rk808";
0110                 reg = <0x1b>;
0111                 pinctrl-names = "default";
0112                 pinctrl-0 = <&pmic_int>, <&pmic_sleep>;
0113                 interrupt-parent = <&gpio0>;
0114                 interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
0115                 rockchip,system-power-controller;
0116                 vcc1-supply = <&vcc_sys>;
0117                 vcc2-supply = <&vcc_sys>;
0118                 vcc3-supply = <&vcc_sys>;
0119                 vcc4-supply = <&vcc_sys>;
0120                 vcc6-supply = <&vcc_sys>;
0121                 vcc7-supply = <&vcc_sys>;
0122                 vcc8-supply = <&vcc_io>;
0123                 vcc9-supply = <&vcc_sys>;
0124                 vcc10-supply = <&vcc_sys>;
0125                 vcc11-supply = <&vcc_sys>;
0126                 vcc12-supply = <&vcc_io>;
0127                 clock-output-names = "xin32k", "rk808-clkout2";
0128                 #clock-cells = <1>;
0129 
0130                 regulators {
0131                         vdd_cpu: DCDC_REG1 {
0132                                 regulator-always-on;
0133                                 regulator-boot-on;
0134                                 regulator-min-microvolt = <700000>;
0135                                 regulator-max-microvolt = <1500000>;
0136                                 regulator-name = "vdd_cpu";
0137                         };
0138 
0139                         vdd_log: DCDC_REG2 {
0140                                 regulator-always-on;
0141                                 regulator-boot-on;
0142                                 regulator-min-microvolt = <700000>;
0143                                 regulator-max-microvolt = <1500000>;
0144                                 regulator-name = "vdd_log";
0145                         };
0146 
0147                         vcc_ddr: DCDC_REG3 {
0148                                 regulator-always-on;
0149                                 regulator-boot-on;
0150                                 regulator-name = "vcc_ddr";
0151                         };
0152 
0153                         vcc_io: DCDC_REG4 {
0154                                 regulator-always-on;
0155                                 regulator-boot-on;
0156                                 regulator-min-microvolt = <3300000>;
0157                                 regulator-max-microvolt = <3300000>;
0158                                 regulator-name = "vcc_io";
0159                         };
0160 
0161                         vcc18_flash: LDO_REG1 {
0162                                 regulator-always-on;
0163                                 regulator-boot-on;
0164                                 regulator-min-microvolt = <1800000>;
0165                                 regulator-max-microvolt = <1800000>;
0166                                 regulator-name = "vcc18_flash";
0167                         };
0168 
0169                         vcc33_lcd: LDO_REG2 {
0170                                 regulator-always-on;
0171                                 regulator-boot-on;
0172                                 regulator-min-microvolt = <3300000>;
0173                                 regulator-max-microvolt = <3300000>;
0174                                 regulator-name = "vcc33_lcd";
0175                         };
0176 
0177                         vdd_10: LDO_REG3 {
0178                                 regulator-always-on;
0179                                 regulator-boot-on;
0180                                 regulator-min-microvolt = <1000000>;
0181                                 regulator-max-microvolt = <1000000>;
0182                                 regulator-name = "vdd_10";
0183                         };
0184 
0185                         vcca_18: LDO_REG4 {
0186                                 regulator-boot-on;
0187                                 regulator-min-microvolt = <1800000>;
0188                                 regulator-max-microvolt = <1800000>;
0189                                 regulator-name = "vcca_18";
0190                         };
0191 
0192                         vccio_sd: LDO_REG5 {
0193                                 regulator-always-on;
0194                                 regulator-boot-on;
0195                                 regulator-min-microvolt = <1800000>;
0196                                 regulator-max-microvolt = <3300000>;
0197                                 regulator-name = "vccio_sd";
0198                         };
0199 
0200                         vdd10_lcd: LDO_REG6 {
0201                                 regulator-always-on;
0202                                 regulator-boot-on;
0203                                 regulator-min-microvolt = <1000000>;
0204                                 regulator-max-microvolt = <1000000>;
0205                                 regulator-name = "vdd10_lcd";
0206                         };
0207 
0208                         vcc_18: LDO_REG7 {
0209                                 regulator-always-on;
0210                                 regulator-boot-on;
0211                                 regulator-min-microvolt = <1800000>;
0212                                 regulator-max-microvolt = <1800000>;
0213                                 regulator-name = "vcc_18";
0214                         };
0215 
0216                         vcc18_lcd: LDO_REG8 {
0217                                 regulator-always-on;
0218                                 regulator-boot-on;
0219                                 regulator-min-microvolt = <1800000>;
0220                                 regulator-max-microvolt = <1800000>;
0221                                 regulator-name = "vcc18_lcd";
0222                         };
0223 
0224                         vcc_sd: SWITCH_REG1 {
0225                                 regulator-name = "vcc_sd";
0226                         };
0227 
0228                         vcc_lan: SWITCH_REG2 {
0229                                 regulator-always-on;
0230                                 regulator-boot-on;
0231                                 regulator-name = "vcc_lan";
0232                         };
0233                 };
0234         };
0235 };
0236 
0237 &pinctrl {
0238         ir {
0239                 ir_int: ir-int {
0240                         rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
0241                 };
0242         };
0243 
0244         keys {
0245                 pwr_key: pwr-key {
0246                         rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0247                 };
0248         };
0249 
0250         pmic {
0251                 pmic_sleep: pmic-sleep {
0252                         rockchip,pins = <0 RK_PA0 2 &pcfg_pull_none>;
0253                 };
0254 
0255                 pmic_int: pmic-int {
0256                         rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0257                 };
0258         };
0259 };
0260 
0261 &tsadc {
0262         status = "okay";
0263         rockchip,hw-tshut-mode = <0>; /* CRU */
0264         rockchip,hw-tshut-polarity = <1>; /* high */
0265 };
0266 
0267 &uart2 {
0268         status = "okay";
0269 };
0270 
0271 &usb_host0_ehci {
0272         status = "okay";
0273 };
0274 
0275 &usb_otg {
0276         status = "okay";
0277 };
0278 
0279 &wdt {
0280         status = "okay";
0281 };