Neil Armstrong | 2e8d47c | 2021-09-17 09:37:00 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2020 Dongjin Kim <tobetter@gmail.com> |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "meson-sm1-odroid.dtsi" |
| 9 | |
| 10 | / { |
| 11 | compatible = "hardkernel,odroid-hc4", "amlogic,sm1"; |
| 12 | model = "Hardkernel ODROID-HC4"; |
| 13 | |
| 14 | aliases { |
| 15 | rtc0 = &rtc; |
| 16 | rtc1 = &vrtc; |
| 17 | }; |
| 18 | |
| 19 | fan0: pwm-fan { |
| 20 | compatible = "pwm-fan"; |
| 21 | #cooling-cells = <2>; |
| 22 | cooling-min-state = <0>; |
| 23 | cooling-max-state = <3>; |
| 24 | cooling-levels = <0 120 170 220>; |
| 25 | pwms = <&pwm_cd 1 40000 0>; |
| 26 | }; |
| 27 | |
| 28 | leds { |
| 29 | compatible = "gpio-leds"; |
| 30 | |
| 31 | led-blue { |
| 32 | color = <LED_COLOR_ID_BLUE>; |
| 33 | function = LED_FUNCTION_STATUS; |
| 34 | gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; |
| 35 | linux,default-trigger = "heartbeat"; |
| 36 | panic-indicator; |
| 37 | }; |
| 38 | |
| 39 | led-red { |
| 40 | color = <LED_COLOR_ID_RED>; |
| 41 | function = LED_FUNCTION_POWER; |
| 42 | gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; |
| 43 | default-state = "on"; |
| 44 | }; |
| 45 | }; |
| 46 | |
| 47 | /* Powers the SATA Disk 0 regulator, which is enabled when a disk load is detected */ |
| 48 | p12v_0: regulator-p12v_0 { |
| 49 | compatible = "regulator-fixed"; |
| 50 | regulator-name = "P12V_0"; |
| 51 | regulator-min-microvolt = <12000000>; |
| 52 | regulator-max-microvolt = <12000000>; |
| 53 | vin-supply = <&main_12v>; |
| 54 | |
| 55 | gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; |
| 56 | enable-active-high; |
| 57 | regulator-always-on; |
| 58 | }; |
| 59 | |
| 60 | /* Powers the SATA Disk 1 regulator, which is enabled when a disk load is detected */ |
| 61 | p12v_1: regulator-p12v_1 { |
| 62 | compatible = "regulator-fixed"; |
| 63 | regulator-name = "P12V_1"; |
| 64 | regulator-min-microvolt = <12000000>; |
| 65 | regulator-max-microvolt = <12000000>; |
| 66 | vin-supply = <&main_12v>; |
| 67 | |
| 68 | gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; |
| 69 | enable-active-high; |
| 70 | regulator-always-on; |
| 71 | }; |
| 72 | |
| 73 | sound { |
| 74 | model = "ODROID-HC4"; |
| 75 | }; |
| 76 | }; |
| 77 | |
| 78 | &cpu_thermal { |
| 79 | cooling-maps { |
| 80 | map { |
| 81 | trip = <&cpu_passive>; |
| 82 | cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; |
| 83 | }; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | &ir { |
| 88 | linux,rc-map-name = "rc-odroid"; |
| 89 | }; |
| 90 | |
| 91 | &i2c2 { |
| 92 | status = "okay"; |
| 93 | pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>; |
| 94 | pinctrl-names = "default"; |
| 95 | |
| 96 | rtc: rtc@51 { |
| 97 | status = "okay"; |
| 98 | compatible = "nxp,pcf8563"; |
| 99 | reg = <0x51>; |
| 100 | wakeup-source; |
| 101 | }; |
| 102 | }; |
| 103 | |
| 104 | &pcie { |
| 105 | status = "okay"; |
| 106 | reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>; |
| 107 | }; |
| 108 | |
| 109 | &pwm_cd { |
| 110 | status = "okay"; |
| 111 | pinctrl-names = "default"; |
| 112 | pinctrl-0 = <&pwm_d_x6_pins>; |
| 113 | }; |
| 114 | |
| 115 | &sd_emmc_c { |
| 116 | status = "disabled"; |
| 117 | }; |
| 118 | |
| 119 | &spifc { |
| 120 | status = "okay"; |
| 121 | pinctrl-0 = <&nor_pins>; |
| 122 | pinctrl-names = "default"; |
| 123 | |
| 124 | spi-flash@0 { |
| 125 | #address-cells = <1>; |
| 126 | #size-cells = <1>; |
| 127 | compatible = "jedec,spi-nor"; |
| 128 | reg = <0>; |
| 129 | spi-max-frequency = <104000000>; |
| 130 | }; |
| 131 | }; |
| 132 | |
| 133 | &usb { |
| 134 | phys = <&usb2_phy1>; |
| 135 | phy-names = "usb2-phy1"; |
| 136 | }; |
| 137 | |
| 138 | &usb2_phy0 { |
| 139 | status = "disabled"; |
| 140 | }; |