Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | #include "rk3308.dtsi" |
| 8 | |
| 9 | / { |
| 10 | model = "Firefly ROC-RK3308-CC board"; |
| 11 | compatible = "firefly,roc-rk3308-cc", "rockchip,rk3308"; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 12 | |
| 13 | aliases { |
| 14 | mmc0 = &sdmmc; |
| 15 | mmc1 = &emmc; |
| 16 | }; |
| 17 | |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 18 | chosen { |
| 19 | stdout-path = "serial2:1500000n8"; |
| 20 | }; |
| 21 | |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 22 | ir-receiver { |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 23 | compatible = "gpio-ir-receiver"; |
| 24 | gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>; |
| 25 | pinctrl-names = "default"; |
| 26 | pinctrl-0 = <&ir_recv_pin>; |
| 27 | }; |
| 28 | |
| 29 | ir_tx { |
| 30 | compatible = "pwm-ir-tx"; |
| 31 | pwms = <&pwm5 0 25000 0>; |
| 32 | }; |
| 33 | |
| 34 | leds { |
| 35 | compatible = "gpio-leds"; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 36 | |
| 37 | power_led: led-0 { |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 38 | label = "firefly:red:power"; |
| 39 | linux,default-trigger = "ir-power-click"; |
| 40 | default-state = "on"; |
| 41 | gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; |
| 42 | }; |
| 43 | |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 44 | user_led: led-1 { |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 45 | label = "firefly:blue:user"; |
| 46 | linux,default-trigger = "ir-user-click"; |
| 47 | default-state = "off"; |
| 48 | gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>; |
| 49 | }; |
| 50 | }; |
| 51 | |
| 52 | typec_vcc5v: typec-vcc5v { |
| 53 | compatible = "regulator-fixed"; |
| 54 | regulator-name = "typec_vcc5v"; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 55 | regulator-min-microvolt = <5000000>; |
| 56 | regulator-max-microvolt = <5000000>; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 57 | regulator-always-on; |
| 58 | regulator-boot-on; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 59 | }; |
| 60 | |
| 61 | vcc5v0_sys: vcc5v0-sys { |
| 62 | compatible = "regulator-fixed"; |
| 63 | regulator-name = "vcc5v0_sys"; |
| 64 | regulator-min-microvolt = <5000000>; |
| 65 | regulator-max-microvolt = <5000000>; |
| 66 | regulator-always-on; |
| 67 | regulator-boot-on; |
| 68 | vin-supply = <&typec_vcc5v>; |
| 69 | }; |
| 70 | |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 71 | vcc_io: vcc-io { |
| 72 | compatible = "regulator-fixed"; |
| 73 | regulator-name = "vcc_io"; |
| 74 | regulator-min-microvolt = <3300000>; |
| 75 | regulator-max-microvolt = <3300000>; |
| 76 | regulator-always-on; |
| 77 | regulator-boot-on; |
| 78 | vin-supply = <&vcc5v0_sys>; |
| 79 | }; |
| 80 | |
| 81 | vcc_sdmmc: vcc-sdmmc { |
| 82 | compatible = "regulator-gpio"; |
| 83 | regulator-name = "vcc_sdmmc"; |
| 84 | regulator-min-microvolt = <1800000>; |
| 85 | regulator-max-microvolt = <3300000>; |
| 86 | gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 87 | states = <1800000 0x0>, |
| 88 | <3300000 0x1>; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 89 | vin-supply = <&vcc5v0_sys>; |
| 90 | }; |
| 91 | |
| 92 | vcc_sd: vcc-sd { |
| 93 | compatible = "regulator-fixed"; |
| 94 | gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>; |
| 95 | regulator-name = "vcc_sd"; |
| 96 | regulator-min-microvolt = <3300000>; |
| 97 | regulator-max-microvolt = <3300000>; |
| 98 | regulator-always-on; |
| 99 | regulator-boot-on; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 100 | vin-supply = <&vcc_io>; |
| 101 | }; |
| 102 | |
| 103 | vdd_core: vdd-core { |
| 104 | compatible = "pwm-regulator"; |
| 105 | pwms = <&pwm0 0 5000 1>; |
| 106 | regulator-name = "vdd_core"; |
| 107 | regulator-min-microvolt = <827000>; |
| 108 | regulator-max-microvolt = <1340000>; |
| 109 | regulator-settling-time-up-us = <250>; |
| 110 | regulator-always-on; |
| 111 | regulator-boot-on; |
| 112 | pwm-supply = <&vcc5v0_sys>; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 113 | }; |
| 114 | |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 115 | vdd_log: vdd-log { |
| 116 | compatible = "regulator-fixed"; |
| 117 | regulator-name = "vdd_log"; |
| 118 | regulator-min-microvolt = <1050000>; |
| 119 | regulator-max-microvolt = <1050000>; |
| 120 | regulator-always-on; |
| 121 | regulator-boot-on; |
| 122 | vin-supply = <&vcc5v0_sys>; |
| 123 | }; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | &cpu0 { |
| 127 | cpu-supply = <&vdd_core>; |
| 128 | }; |
| 129 | |
| 130 | &emmc { |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 131 | cap-mmc-highspeed; |
Jonas Karlman | c8c2009 | 2024-04-08 18:14:07 +0000 | [diff] [blame] | 132 | mmc-hs200-1_8v; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 133 | non-removable; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 134 | status = "okay"; |
| 135 | }; |
| 136 | |
| 137 | &i2c1 { |
| 138 | clock-frequency = <400000>; |
| 139 | status = "okay"; |
| 140 | |
| 141 | rtc: rtc@51 { |
| 142 | compatible = "nxp,pcf8563"; |
| 143 | reg = <0x51>; |
| 144 | #clock-cells = <0>; |
| 145 | }; |
| 146 | }; |
| 147 | |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 148 | &pwm5 { |
| 149 | status = "okay"; |
| 150 | pinctrl-names = "active"; |
| 151 | pinctrl-0 = <&pwm5_pin_pull_down>; |
| 152 | }; |
| 153 | |
| 154 | &pinctrl { |
| 155 | pinctrl-names = "default"; |
| 156 | pinctrl-0 = <&rtc_32k>; |
| 157 | |
| 158 | ir-receiver { |
| 159 | ir_recv_pin: ir-recv-pin { |
| 160 | rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 161 | }; |
| 162 | }; |
| 163 | |
| 164 | buttons { |
| 165 | pwr_key: pwr-key { |
| 166 | rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; |
| 167 | }; |
| 168 | }; |
| 169 | }; |
| 170 | |
| 171 | &pwm0 { |
| 172 | status = "okay"; |
| 173 | pinctrl-0 = <&pwm0_pin_pull_down>; |
| 174 | }; |
| 175 | |
| 176 | &sdmmc { |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 177 | cap-mmc-highspeed; |
| 178 | cap-sd-highspeed; |
Andy Yan | 7c2b2bb | 2019-11-14 11:22:47 +0800 | [diff] [blame] | 179 | card-detect-delay = <300>; |
| 180 | sd-uhs-sdr25; |
| 181 | sd-uhs-sdr50; |
| 182 | sd-uhs-sdr104; |
| 183 | vmmc-supply = <&vcc_sd>; |
| 184 | vqmmc-supply = <&vcc_sdmmc>; |
| 185 | status = "okay"; |
| 186 | }; |
| 187 | |
| 188 | &uart2 { |
| 189 | status = "okay"; |
| 190 | }; |