Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Hardkernel Odroid XU3/XU3-Lite/XU4 boards common device tree source
0004  *
0005  * Copyright (c) 2013 Samsung Electronics Co., Ltd.
0006  *              http://www.samsung.com
0007  * Copyright (c) 2014 Collabora Ltd.
0008  * Copyright (c) 2015 Lukasz Majewski <l.majewski@samsung.com>
0009  *                    Anand Moon <linux.amoon@gmail.com>
0010  */
0011 
0012 #include <dt-bindings/input/input.h>
0013 #include "exynos5422-odroid-core.dtsi"
0014 
0015 / {
0016         gpio-keys {
0017                 compatible = "gpio-keys";
0018                 pinctrl-names = "default";
0019                 pinctrl-0 = <&power_key>;
0020 
0021                 power-key {
0022                         /*
0023                          * The power button (SW2) is connected to the PWRON
0024                          * pin (active high) of the S2MPS11 PMIC, which acts
0025                          * as a 16ms debouce filter and signal inverter with
0026                          * output on ONOB pin (active low). ONOB PMIC pin is
0027                          * then connected to XEINT3 SoC pin.
0028                          */
0029                         gpios = <&gpx0 3 GPIO_ACTIVE_LOW>;
0030                         linux,code = <KEY_POWER>;
0031                         label = "power key";
0032                         debounce-interval = <0>;
0033                         wakeup-source;
0034                 };
0035         };
0036 
0037         emmc_pwrseq: pwrseq {
0038                 pinctrl-0 = <&emmc_nrst_pin>;
0039                 pinctrl-names = "default";
0040                 compatible = "mmc-pwrseq-emmc";
0041                 reset-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>;
0042         };
0043 
0044         fan0: pwm-fan {
0045                 compatible = "pwm-fan";
0046                 pwms = <&pwm 0 20972 0>;
0047                 #cooling-cells = <2>;
0048                 cooling-levels = <0 130 170 230>;
0049         };
0050 
0051         thermal-zones {
0052                 cpu0_thermal: cpu0-thermal {
0053                         thermal-sensors = <&tmu_cpu0 0>;
0054                         polling-delay-passive = <250>;
0055                         polling-delay = <0>;
0056                         trips {
0057                                 cpu0_alert0: cpu-alert-0 {
0058                                         temperature = <50000>; /* millicelsius */
0059                                         hysteresis = <5000>; /* millicelsius */
0060                                         type = "active";
0061                                 };
0062                                 cpu0_alert1: cpu-alert-1 {
0063                                         temperature = <60000>; /* millicelsius */
0064                                         hysteresis = <5000>; /* millicelsius */
0065                                         type = "active";
0066                                 };
0067                                 cpu0_alert2: cpu-alert-2 {
0068                                         temperature = <70000>; /* millicelsius */
0069                                         hysteresis = <5000>; /* millicelsius */
0070                                         type = "active";
0071                                 };
0072                                 cpu0_crit0: cpu-crit-0 {
0073                                         temperature = <120000>; /* millicelsius */
0074                                         hysteresis = <0>; /* millicelsius */
0075                                         type = "critical";
0076                                 };
0077                                 /*
0078                                  * Exynos542x supports only 4 trip-points
0079                                  * so for these polling mode is required.
0080                                  * Start polling at temperature level of last
0081                                  * interrupt-driven trip: cpu0_alert2
0082                                  */
0083                                 cpu0_alert3: cpu-alert-3 {
0084                                         temperature = <70000>; /* millicelsius */
0085                                         hysteresis = <10000>; /* millicelsius */
0086                                         type = "passive";
0087                                 };
0088                                 cpu0_alert4: cpu-alert-4 {
0089                                         temperature = <85000>; /* millicelsius */
0090                                         hysteresis = <10000>; /* millicelsius */
0091                                         type = "passive";
0092                                 };
0093                         };
0094                         cooling-maps {
0095                                 map0 {
0096                                         trip = <&cpu0_alert0>;
0097                                         cooling-device = <&fan0 0 1>;
0098                                 };
0099                                 map1 {
0100                                         trip = <&cpu0_alert1>;
0101                                         cooling-device = <&fan0 1 2>;
0102                                 };
0103                                 map2 {
0104                                         trip = <&cpu0_alert2>;
0105                                         cooling-device = <&fan0 2 3>;
0106                                 };
0107                                 /*
0108                                  * When reaching cpu0_alert3, reduce CPU
0109                                  * by 2 steps. On Exynos5422/5800 that would
0110                                  * (usually) be: 1800 MHz and 1200 MHz.
0111                                  */
0112                                 map3 {
0113                                         trip = <&cpu0_alert3>;
0114                                         cooling-device = <&cpu0 0 2>,
0115                                                          <&cpu1 0 2>,
0116                                                          <&cpu2 0 2>,
0117                                                          <&cpu3 0 2>,
0118                                                          <&cpu4 0 2>,
0119                                                          <&cpu5 0 2>,
0120                                                          <&cpu6 0 2>,
0121                                                          <&cpu7 0 2>;
0122                                 };
0123                                 /*
0124                                  * When reaching cpu0_alert4, reduce CPU
0125                                  * further, down to 600 MHz (14 steps for big,
0126                                  * 8 steps for LITTLE).
0127                                  */
0128                                 cpu0_cooling_map4: map4 {
0129                                         trip = <&cpu0_alert4>;
0130                                         cooling-device = <&cpu0 3 8>,
0131                                                          <&cpu1 3 8>,
0132                                                          <&cpu2 3 8>,
0133                                                          <&cpu3 3 8>,
0134                                                          <&cpu4 3 14>,
0135                                                          <&cpu5 3 14>,
0136                                                          <&cpu6 3 14>,
0137                                                          <&cpu7 3 14>;
0138                                 };
0139                         };
0140                 };
0141                 cpu1_thermal: cpu1-thermal {
0142                         thermal-sensors = <&tmu_cpu1 0>;
0143                         polling-delay-passive = <250>;
0144                         polling-delay = <0>;
0145                         trips {
0146                                 cpu1_alert0: cpu-alert-0 {
0147                                         temperature = <50000>;
0148                                         hysteresis = <5000>;
0149                                         type = "active";
0150                                 };
0151                                 cpu1_alert1: cpu-alert-1 {
0152                                         temperature = <60000>;
0153                                         hysteresis = <5000>;
0154                                         type = "active";
0155                                 };
0156                                 cpu1_alert2: cpu-alert-2 {
0157                                         temperature = <70000>;
0158                                         hysteresis = <5000>;
0159                                         type = "active";
0160                                 };
0161                                 cpu1_crit0: cpu-crit-0 {
0162                                         temperature = <120000>;
0163                                         hysteresis = <0>;
0164                                         type = "critical";
0165                                 };
0166                                 cpu1_alert3: cpu-alert-3 {
0167                                         temperature = <70000>;
0168                                         hysteresis = <10000>;
0169                                         type = "passive";
0170                                 };
0171                                 cpu1_alert4: cpu-alert-4 {
0172                                         temperature = <85000>;
0173                                         hysteresis = <10000>;
0174                                         type = "passive";
0175                                 };
0176                         };
0177                         cooling-maps {
0178                                 map0 {
0179                                         trip = <&cpu1_alert0>;
0180                                         cooling-device = <&fan0 0 1>;
0181                                 };
0182                                 map1 {
0183                                         trip = <&cpu1_alert1>;
0184                                         cooling-device = <&fan0 1 2>;
0185                                 };
0186                                 map2 {
0187                                         trip = <&cpu1_alert2>;
0188                                         cooling-device = <&fan0 2 3>;
0189                                 };
0190                                 map3 {
0191                                         trip = <&cpu1_alert3>;
0192                                         cooling-device = <&cpu0 0 2>,
0193                                                          <&cpu1 0 2>,
0194                                                          <&cpu2 0 2>,
0195                                                          <&cpu3 0 2>,
0196                                                          <&cpu4 0 2>,
0197                                                          <&cpu5 0 2>,
0198                                                          <&cpu6 0 2>,
0199                                                          <&cpu7 0 2>;
0200                                 };
0201                                 cpu1_cooling_map4: map4 {
0202                                         trip = <&cpu1_alert4>;
0203                                         cooling-device = <&cpu0 3 8>,
0204                                                          <&cpu1 3 8>,
0205                                                          <&cpu2 3 8>,
0206                                                          <&cpu3 3 8>,
0207                                                          <&cpu4 3 14>,
0208                                                          <&cpu5 3 14>,
0209                                                          <&cpu6 3 14>,
0210                                                          <&cpu7 3 14>;
0211                                 };
0212                         };
0213                 };
0214                 cpu2_thermal: cpu2-thermal {
0215                         thermal-sensors = <&tmu_cpu2 0>;
0216                         polling-delay-passive = <250>;
0217                         polling-delay = <0>;
0218                         trips {
0219                                 cpu2_alert0: cpu-alert-0 {
0220                                         temperature = <50000>;
0221                                         hysteresis = <5000>;
0222                                         type = "active";
0223                                 };
0224                                 cpu2_alert1: cpu-alert-1 {
0225                                         temperature = <60000>;
0226                                         hysteresis = <5000>;
0227                                         type = "active";
0228                                 };
0229                                 cpu2_alert2: cpu-alert-2 {
0230                                         temperature = <70000>;
0231                                         hysteresis = <5000>;
0232                                         type = "active";
0233                                 };
0234                                 cpu2_crit0: cpu-crit-0 {
0235                                         temperature = <120000>;
0236                                         hysteresis = <0>;
0237                                         type = "critical";
0238                                 };
0239                                 cpu2_alert3: cpu-alert-3 {
0240                                         temperature = <70000>;
0241                                         hysteresis = <10000>;
0242                                         type = "passive";
0243                                 };
0244                                 cpu2_alert4: cpu-alert-4 {
0245                                         temperature = <85000>;
0246                                         hysteresis = <10000>;
0247                                         type = "passive";
0248                                 };
0249                         };
0250                         cooling-maps {
0251                                 map0 {
0252                                         trip = <&cpu2_alert0>;
0253                                         cooling-device = <&fan0 0 1>;
0254                                 };
0255                                 map1 {
0256                                         trip = <&cpu2_alert1>;
0257                                         cooling-device = <&fan0 1 2>;
0258                                 };
0259                                 map2 {
0260                                         trip = <&cpu2_alert2>;
0261                                         cooling-device = <&fan0 2 3>;
0262                                 };
0263                                 map3 {
0264                                         trip = <&cpu2_alert3>;
0265                                         cooling-device = <&cpu0 0 2>,
0266                                                          <&cpu1 0 2>,
0267                                                          <&cpu2 0 2>,
0268                                                          <&cpu3 0 2>,
0269                                                          <&cpu4 0 2>,
0270                                                          <&cpu5 0 2>,
0271                                                          <&cpu6 0 2>,
0272                                                          <&cpu7 0 2>;
0273                                 };
0274                                 cpu2_cooling_map4: map4 {
0275                                         trip = <&cpu2_alert4>;
0276                                         cooling-device = <&cpu0 3 8>,
0277                                                          <&cpu1 3 8>,
0278                                                          <&cpu2 3 8>,
0279                                                          <&cpu3 3 8>,
0280                                                          <&cpu4 3 14>,
0281                                                          <&cpu5 3 14>,
0282                                                          <&cpu6 3 14>,
0283                                                          <&cpu7 3 14>;
0284                                 };
0285                         };
0286                 };
0287                 cpu3_thermal: cpu3-thermal {
0288                         thermal-sensors = <&tmu_cpu3 0>;
0289                         polling-delay-passive = <250>;
0290                         polling-delay = <0>;
0291                         trips {
0292                                 cpu3_alert0: cpu-alert-0 {
0293                                         temperature = <50000>;
0294                                         hysteresis = <5000>;
0295                                         type = "active";
0296                                 };
0297                                 cpu3_alert1: cpu-alert-1 {
0298                                         temperature = <60000>;
0299                                         hysteresis = <5000>;
0300                                         type = "active";
0301                                 };
0302                                 cpu3_alert2: cpu-alert-2 {
0303                                         temperature = <70000>;
0304                                         hysteresis = <5000>;
0305                                         type = "active";
0306                                 };
0307                                 cpu3_crit0: cpu-crit-0 {
0308                                         temperature = <120000>;
0309                                         hysteresis = <0>;
0310                                         type = "critical";
0311                                 };
0312                                 cpu3_alert3: cpu-alert-3 {
0313                                         temperature = <70000>;
0314                                         hysteresis = <10000>;
0315                                         type = "passive";
0316                                 };
0317                                 cpu3_alert4: cpu-alert-4 {
0318                                         temperature = <85000>;
0319                                         hysteresis = <10000>;
0320                                         type = "passive";
0321                                 };
0322                         };
0323                         cooling-maps {
0324                                 map0 {
0325                                         trip = <&cpu3_alert0>;
0326                                         cooling-device = <&fan0 0 1>;
0327                                 };
0328                                 map1 {
0329                                         trip = <&cpu3_alert1>;
0330                                         cooling-device = <&fan0 1 2>;
0331                                 };
0332                                 map2 {
0333                                         trip = <&cpu3_alert2>;
0334                                         cooling-device = <&fan0 2 3>;
0335                                 };
0336                                 map3 {
0337                                         trip = <&cpu3_alert3>;
0338                                         cooling-device = <&cpu0 0 2>,
0339                                                          <&cpu1 0 2>,
0340                                                          <&cpu2 0 2>,
0341                                                          <&cpu3 0 2>,
0342                                                          <&cpu4 0 2>,
0343                                                          <&cpu5 0 2>,
0344                                                          <&cpu6 0 2>,
0345                                                          <&cpu7 0 2>;
0346                                 };
0347                                 cpu3_cooling_map4: map4 {
0348                                         trip = <&cpu3_alert4>;
0349                                         cooling-device = <&cpu0 3 8>,
0350                                                          <&cpu1 3 8>,
0351                                                          <&cpu2 3 8>,
0352                                                          <&cpu3 3 8>,
0353                                                          <&cpu4 3 14>,
0354                                                          <&cpu5 3 14>,
0355                                                          <&cpu6 3 14>,
0356                                                          <&cpu7 3 14>;
0357                                 };
0358                         };
0359                 };
0360                 gpu_thermal: gpu-thermal {
0361                         thermal-sensors = <&tmu_gpu 0>;
0362                         polling-delay-passive = <250>;
0363                         polling-delay = <0>;
0364                         trips {
0365                                 gpu_alert0: gpu-alert-0 {
0366                                         temperature = <50000>;
0367                                         hysteresis = <5000>;
0368                                         type = "active";
0369                                 };
0370                                 gpu_alert1: gpu-alert-1 {
0371                                         temperature = <60000>;
0372                                         hysteresis = <5000>;
0373                                         type = "active";
0374                                 };
0375                                 gpu_alert2: gpu-alert-2 {
0376                                         temperature = <70000>;
0377                                         hysteresis = <5000>;
0378                                         type = "active";
0379                                 };
0380                                 gpu_crit0: gpu-crit-0 {
0381                                         temperature = <120000>;
0382                                         hysteresis = <0>;
0383                                         type = "critical";
0384                                 };
0385                                 gpu_alert3: gpu-alert-3 {
0386                                         temperature = <70000>;
0387                                         hysteresis = <10000>;
0388                                         type = "passive";
0389                                 };
0390                                 gpu_alert4: gpu-alert-4 {
0391                                         temperature = <85000>;
0392                                         hysteresis = <10000>;
0393                                         type = "passive";
0394                                 };
0395                         };
0396                         cooling-maps {
0397                                 map0 {
0398                                         trip = <&gpu_alert0>;
0399                                         cooling-device = <&fan0 0 1>;
0400                                 };
0401                                 map1 {
0402                                         trip = <&gpu_alert1>;
0403                                         cooling-device = <&fan0 1 2>;
0404                                 };
0405                                 map2 {
0406                                         trip = <&gpu_alert2>;
0407                                         cooling-device = <&fan0 2 3>;
0408                                 };
0409                                 map3 {
0410                                         trip = <&gpu_alert3>;
0411                                         cooling-device = <&gpu 0 2>;
0412                                 };
0413                                 map4 {
0414                                         trip = <&gpu_alert4>;
0415                                         cooling-device = <&gpu 3 6>;
0416                                 };
0417                         };
0418                 };
0419         };
0420 };
0421 
0422 &buck10_reg {
0423         /* Supplies vmmc-supply of mmc_0 */
0424         regulator-always-on;
0425         regulator-boot-on;
0426 };
0427 
0428 &hdmi {
0429         status = "okay";
0430         ddc = <&i2c_2>;
0431         hpd-gpios = <&gpx3 7 GPIO_ACTIVE_HIGH>;
0432         pinctrl-names = "default";
0433         pinctrl-0 = <&hdmi_hpd_irq>;
0434 
0435         vdd_osc-supply = <&ldo7_reg>;
0436         vdd_pll-supply = <&ldo6_reg>;
0437         vdd-supply = <&ldo6_reg>;
0438 };
0439 
0440 &hdmicec {
0441         status = "okay";
0442         needs-hpd;
0443 };
0444 
0445 &i2c_2 {
0446         samsung,i2c-sda-delay = <100>;
0447         samsung,i2c-max-bus-freq = <66000>;
0448         /* used by HDMI DDC */
0449         status = "okay";
0450 };
0451 
0452 &ldo26_reg {
0453         regulator-min-microvolt = <3000000>;
0454         regulator-max-microvolt = <3000000>;
0455         regulator-always-on;
0456 };
0457 
0458 &mixer {
0459         status = "okay";
0460 };
0461 
0462 &mmc_0 {
0463         status = "okay";
0464         mmc-pwrseq = <&emmc_pwrseq>;
0465         card-detect-delay = <200>;
0466         samsung,dw-mshc-ciu-div = <3>;
0467         samsung,dw-mshc-sdr-timing = <0 4>;
0468         samsung,dw-mshc-ddr-timing = <0 2>;
0469         samsung,dw-mshc-hs400-timing = <0 2>;
0470         samsung,read-strobe-delay = <90>;
0471         pinctrl-names = "default";
0472         pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8 &sd0_cd &sd0_rclk>;
0473         bus-width = <8>;
0474         cap-mmc-highspeed;
0475         mmc-hs200-1_8v;
0476         mmc-hs400-1_8v;
0477         max-frequency = <200000000>;
0478         vmmc-supply = <&ldo18_reg>;
0479         vqmmc-supply = <&ldo3_reg>;
0480 };
0481 
0482 &pinctrl_0 {
0483         power_key: power-key-pins {
0484                 samsung,pins = "gpx0-3";
0485                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
0486                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
0487                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
0488         };
0489 
0490         hdmi_hpd_irq: hdmi-hpd-irq-pins {
0491                 samsung,pins = "gpx3-7";
0492                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
0493                 samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
0494                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
0495         };
0496 };
0497 
0498 &pinctrl_1 {
0499         emmc_nrst_pin: emmc-nrst-pins {
0500                 samsung,pins = "gpd1-0";
0501                 samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
0502                 samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
0503                 samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
0504         };
0505 };