1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2024 Rockchip Electronics Co. 3 * Copyright (c) 2024 Rockchip Electronics Co., Ltd. 4 * 4 * 5 */ 5 */ 6 6 7 /dts-v1/; 7 /dts-v1/; 8 8 9 #include <dt-bindings/leds/common.h> 9 #include <dt-bindings/leds/common.h> 10 #include "rk3588-coolpi-cm5.dtsi" 10 #include "rk3588-coolpi-cm5.dtsi" 11 11 12 / { 12 / { 13 model = "CoolPi CM5 GenBook"; 13 model = "CoolPi CM5 GenBook"; 14 compatible = "coolpi,pi-cm5-genbook", 14 compatible = "coolpi,pi-cm5-genbook", "coolpi,pi-cm5", "rockchip,rk3588"; 15 15 16 backlight: backlight { 16 backlight: backlight { 17 compatible = "pwm-backlight"; 17 compatible = "pwm-backlight"; 18 enable-gpios = <&gpio4 RK_PA3 18 enable-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>; 19 pinctrl-names = "default"; 19 pinctrl-names = "default"; 20 pinctrl-0 = <&bl_en>; 20 pinctrl-0 = <&bl_en>; 21 power-supply = <&vcc12v_dcin>; 21 power-supply = <&vcc12v_dcin>; 22 pwms = <&pwm6 0 25000 0>; 22 pwms = <&pwm6 0 25000 0>; 23 }; 23 }; 24 24 25 battery: battery { 25 battery: battery { 26 compatible = "simple-battery"; 26 compatible = "simple-battery"; 27 charge-full-design-microamp-ho 27 charge-full-design-microamp-hours = <9800000>; 28 voltage-max-design-microvolt = 28 voltage-max-design-microvolt = <4350000>; 29 voltage-min-design-microvolt = 29 voltage-min-design-microvolt = <3000000>; 30 }; 30 }; 31 31 32 charger: dc-charger { 32 charger: dc-charger { 33 compatible = "gpio-charger"; 33 compatible = "gpio-charger"; 34 charger-type = "mains"; 34 charger-type = "mains"; 35 gpios = <&gpio1 RK_PC0 GPIO_AC 35 gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>; 36 }; 36 }; 37 37 38 leds: leds { 38 leds: leds { 39 compatible = "gpio-leds"; 39 compatible = "gpio-leds"; 40 40 41 heartbeat_led: led-0 { 41 heartbeat_led: led-0 { 42 color = <LED_COLOR_ID_ 42 color = <LED_COLOR_ID_GREEN>; 43 function = LED_FUNCTIO 43 function = LED_FUNCTION_STATUS; 44 gpios = <&gpio1 RK_PB0 44 gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; 45 linux,default-trigger 45 linux,default-trigger = "heartbeat"; 46 }; 46 }; 47 47 48 wlan_led: led-1 { 48 wlan_led: led-1 { 49 color = <LED_COLOR_ID_ 49 color = <LED_COLOR_ID_GREEN>; 50 function = LED_FUNCTIO 50 function = LED_FUNCTION_WLAN; 51 gpios = <&gpio0 RK_PC5 51 gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 52 }; 52 }; 53 53 54 charging_red: led-2 { 54 charging_red: led-2 { 55 function = LED_FUNCTIO 55 function = LED_FUNCTION_CHARGING; 56 color = <LED_COLOR_ID_ 56 color = <LED_COLOR_ID_RED>; 57 gpios = <&gpio3 RK_PD2 57 gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; 58 }; 58 }; 59 }; 59 }; 60 60 61 vcc12v_dcin: vcc12v-dcin-regulator { 61 vcc12v_dcin: vcc12v-dcin-regulator { 62 compatible = "regulator-fixed" 62 compatible = "regulator-fixed"; 63 regulator-name = "vcc12v_dcin" 63 regulator-name = "vcc12v_dcin"; 64 regulator-always-on; 64 regulator-always-on; 65 regulator-boot-on; 65 regulator-boot-on; 66 regulator-min-microvolt = <120 66 regulator-min-microvolt = <12000000>; 67 regulator-max-microvolt = <120 67 regulator-max-microvolt = <12000000>; 68 }; 68 }; 69 69 70 vcc_sys: vcc-sys-regulator { 70 vcc_sys: vcc-sys-regulator { 71 compatible = "regulator-fixed" 71 compatible = "regulator-fixed"; 72 regulator-name = "vcc_sys"; 72 regulator-name = "vcc_sys"; 73 regulator-always-on; 73 regulator-always-on; 74 regulator-boot-on; 74 regulator-boot-on; 75 regulator-min-microvolt = <700 75 regulator-min-microvolt = <7000000>; 76 regulator-max-microvolt = <700 76 regulator-max-microvolt = <7000000>; 77 vin-supply = <&vcc12v_dcin>; 77 vin-supply = <&vcc12v_dcin>; 78 }; 78 }; 79 79 80 vcc5v0_sys: vcc5v0-sys-regulator { 80 vcc5v0_sys: vcc5v0-sys-regulator { 81 compatible = "regulator-fixed" 81 compatible = "regulator-fixed"; 82 regulator-name = "vcc5v0_sys"; 82 regulator-name = "vcc5v0_sys"; 83 regulator-always-on; 83 regulator-always-on; 84 regulator-boot-on; 84 regulator-boot-on; 85 regulator-min-microvolt = <700 85 regulator-min-microvolt = <7000000>; 86 regulator-max-microvolt = <700 86 regulator-max-microvolt = <7000000>; 87 vin-supply = <&vcc_sys>; 87 vin-supply = <&vcc_sys>; 88 }; 88 }; 89 89 90 vcc3v3_sys: vcc3v3-sys-regulator { 90 vcc3v3_sys: vcc3v3-sys-regulator { 91 compatible = "regulator-fixed" 91 compatible = "regulator-fixed"; 92 regulator-name = "vcc3v3_sys"; 92 regulator-name = "vcc3v3_sys"; 93 regulator-always-on; 93 regulator-always-on; 94 regulator-boot-on; 94 regulator-boot-on; 95 regulator-min-microvolt = <330 95 regulator-min-microvolt = <3300000>; 96 regulator-max-microvolt = <330 96 regulator-max-microvolt = <3300000>; 97 vin-supply = <&vcc5v0_sys>; 97 vin-supply = <&vcc5v0_sys>; 98 }; 98 }; 99 99 100 vcc3v3_lcd: vcc3v3-lcd-regulator { 100 vcc3v3_lcd: vcc3v3-lcd-regulator { 101 compatible = "regulator-fixed" 101 compatible = "regulator-fixed"; 102 regulator-name = "vcc3v3_lcd"; 102 regulator-name = "vcc3v3_lcd"; 103 enable-active-high; 103 enable-active-high; 104 gpio = <&gpio1 RK_PC4 GPIO_ACT 104 gpio = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>; 105 pinctrl-names = "default"; 105 pinctrl-names = "default"; 106 pinctrl-0 = <&lcdpwr_en>; 106 pinctrl-0 = <&lcdpwr_en>; 107 vin-supply = <&vcc3v3_sys>; 107 vin-supply = <&vcc3v3_sys>; 108 }; 108 }; 109 109 110 vcc5v0_usb: vcc5v0-usb-regulator { 110 vcc5v0_usb: vcc5v0-usb-regulator { 111 compatible = "regulator-fixed" 111 compatible = "regulator-fixed"; 112 regulator-name = "vcc5v0_usb"; 112 regulator-name = "vcc5v0_usb"; 113 regulator-boot-on; 113 regulator-boot-on; 114 regulator-always-on; 114 regulator-always-on; 115 enable-active-high; 115 enable-active-high; 116 regulator-min-microvolt = <500 116 regulator-min-microvolt = <5000000>; 117 regulator-max-microvolt = <500 117 regulator-max-microvolt = <5000000>; 118 gpio = <&gpio1 RK_PD5 GPIO_ACT 118 gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>; 119 pinctrl-names = "default"; 119 pinctrl-names = "default"; 120 pinctrl-0 = <&usb_pwren>; 120 pinctrl-0 = <&usb_pwren>; 121 vin-supply = <&vcc_sys>; 121 vin-supply = <&vcc_sys>; 122 }; 122 }; 123 123 124 vcc5v0_usb_host0: vcc5v0_usb30_host: v 124 vcc5v0_usb_host0: vcc5v0_usb30_host: vcc5v0-usb-host-regulator { 125 compatible = "regulator-fixed" 125 compatible = "regulator-fixed"; 126 regulator-name = "vcc5v0_host" 126 regulator-name = "vcc5v0_host"; 127 regulator-boot-on; 127 regulator-boot-on; 128 regulator-always-on; 128 regulator-always-on; 129 enable-active-high; 129 enable-active-high; 130 regulator-min-microvolt = <500 130 regulator-min-microvolt = <5000000>; 131 regulator-max-microvolt = <500 131 regulator-max-microvolt = <5000000>; 132 gpio = <&gpio1 RK_PA7 GPIO_ACT 132 gpio = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; 133 pinctrl-names = "default"; 133 pinctrl-names = "default"; 134 pinctrl-0 = <&usb_host_pwren>; 134 pinctrl-0 = <&usb_host_pwren>; 135 vin-supply = <&vcc5v0_usb>; 135 vin-supply = <&vcc5v0_usb>; 136 }; 136 }; 137 }; 137 }; 138 138 139 &i2c4 { 139 &i2c4 { 140 status = "okay"; 140 status = "okay"; 141 pinctrl-names = "default"; 141 pinctrl-names = "default"; 142 pinctrl-0 = <&i2c4m3_xfer>; 142 pinctrl-0 = <&i2c4m3_xfer>; 143 143 144 cw2015@62 { 144 cw2015@62 { 145 compatible = "cellwise,cw2015" 145 compatible = "cellwise,cw2015"; 146 reg = <0x62>; 146 reg = <0x62>; 147 147 148 cellwise,battery-profile = /bi 148 cellwise,battery-profile = /bits/ 8 < 149 0x17 0x67 0x69 0x63 0x 149 0x17 0x67 0x69 0x63 0x63 0x62 0x62 0x5F 150 0x52 0x73 0x4C 0x5A 0x 150 0x52 0x73 0x4C 0x5A 0x5B 0x4B 0x42 0x3A 151 0x33 0x2D 0x29 0x28 0x 151 0x33 0x2D 0x29 0x28 0x2E 0x31 0x3C 0x49 152 0x2C 0x2C 0x0C 0xCD 0x 152 0x2C 0x2C 0x0C 0xCD 0x30 0x51 0x50 0x66 153 0x74 0x74 0x75 0x78 0x 153 0x74 0x74 0x75 0x78 0x41 0x1B 0x84 0x5F 154 0x0B 0x34 0x1C 0x45 0x 154 0x0B 0x34 0x1C 0x45 0x89 0x92 0xA0 0x13 155 0x2C 0x55 0xAB 0xCB 0x 155 0x2C 0x55 0xAB 0xCB 0x80 0x5E 0x7B 0xCB 156 0x2F 0x00 0x64 0xA5 0x 156 0x2F 0x00 0x64 0xA5 0xB5 0x10 0x18 0x21 157 >; 157 >; 158 158 159 cellwise,monitor-interval-ms = 159 cellwise,monitor-interval-ms = <3000>; 160 monitored-battery = <&battery> 160 monitored-battery = <&battery>; 161 power-supplies = <&charger>; 161 power-supplies = <&charger>; 162 }; 162 }; 163 }; 163 }; 164 164 165 &i2c5 { 165 &i2c5 { 166 status = "okay"; 166 status = "okay"; 167 pinctrl-names = "default"; 167 pinctrl-names = "default"; 168 pinctrl-0 = <&i2c5m3_xfer>; 168 pinctrl-0 = <&i2c5m3_xfer>; 169 169 170 touchpad: touchpad@2c { 170 touchpad: touchpad@2c { 171 compatible = "hid-over-i2c"; 171 compatible = "hid-over-i2c"; 172 reg = <0x2c>; 172 reg = <0x2c>; 173 interrupt-parent = <&gpio1>; 173 interrupt-parent = <&gpio1>; 174 interrupts = <RK_PD6 IRQ_TYPE_ 174 interrupts = <RK_PD6 IRQ_TYPE_LEVEL_LOW>; 175 hid-descr-addr = <0x0020>; 175 hid-descr-addr = <0x0020>; 176 }; 176 }; 177 }; 177 }; 178 178 179 &gmac0 { 179 &gmac0 { 180 status = "disabled"; 180 status = "disabled"; 181 }; 181 }; 182 182 183 /* M.2 E-Key */ 183 /* M.2 E-Key */ 184 &pcie2x1l0 { 184 &pcie2x1l0 { 185 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTI 185 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; 186 vpcie3v3-supply = <&vcc3v3_sys>; 186 vpcie3v3-supply = <&vcc3v3_sys>; 187 pinctrl-names = "default"; 187 pinctrl-names = "default"; 188 pinctrl-0 = <&pcie_clkreq &pcie_wake & 188 pinctrl-0 = <&pcie_clkreq &pcie_wake &pcie_rst &wifi_pwron &bt_pwron>; 189 status = "okay"; 189 status = "okay"; 190 }; 190 }; 191 191 192 &pcie2x1l2 { 192 &pcie2x1l2 { 193 status = "disabled"; 193 status = "disabled"; 194 }; 194 }; 195 195 196 &pcie30phy { 196 &pcie30phy { 197 status = "okay"; 197 status = "okay"; 198 }; 198 }; 199 199 200 /* M.2 M-Key ssd */ 200 /* M.2 M-Key ssd */ 201 &pcie3x4 { 201 &pcie3x4 { 202 reset-gpios = <&gpio4 RK_PB6 GPIO_ACTI 202 reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; 203 vpcie3v3-supply = <&vcc3v3_sys>; 203 vpcie3v3-supply = <&vcc3v3_sys>; 204 status = "okay"; 204 status = "okay"; 205 }; 205 }; 206 206 207 &pinctrl { 207 &pinctrl { 208 lcd { 208 lcd { 209 lcdpwr_en: lcdpwr-en { 209 lcdpwr_en: lcdpwr-en { 210 rockchip,pins = <1 RK_ 210 rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>; 211 }; 211 }; 212 212 213 bl_en: bl-en { 213 bl_en: bl-en { 214 rockchip,pins = <4 RK_ 214 rockchip,pins = <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 215 }; 215 }; 216 }; 216 }; 217 217 218 usb { 218 usb { 219 usb_pwren: usb-pwren { 219 usb_pwren: usb-pwren { 220 rockchip,pins = <1 RK_ 220 rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; 221 }; 221 }; 222 222 223 usb_otg_pwren: usb-otg-pwren { 223 usb_otg_pwren: usb-otg-pwren { 224 rockchip,pins = <0 RK_ 224 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; 225 }; 225 }; 226 226 227 usb_host_pwren: usb-host-pwren 227 usb_host_pwren: usb-host-pwren { 228 rockchip,pins = <1 RK_ 228 rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>; 229 }; 229 }; 230 }; 230 }; 231 231 232 wifi { 232 wifi { 233 bt_pwron: bt-pwron { 233 bt_pwron: bt-pwron { 234 rockchip,pins = <3 RK_ 234 rockchip,pins = <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; 235 }; 235 }; 236 236 237 pcie_clkreq: pcie-clkreq { 237 pcie_clkreq: pcie-clkreq { 238 rockchip,pins = <4 RK_ 238 rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; 239 }; 239 }; 240 240 241 pcie_rst: pcie-rst { 241 pcie_rst: pcie-rst { 242 rockchip,pins = <4 RK_ 242 rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>; 243 }; 243 }; 244 244 245 wifi_pwron: wifi-pwron { 245 wifi_pwron: wifi-pwron { 246 rockchip,pins = <3 RK_ 246 rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; 247 }; 247 }; 248 248 249 pcie_wake: pcie-wake { 249 pcie_wake: pcie-wake { 250 rockchip,pins = <4 RK_ 250 rockchip,pins = <4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>; 251 }; 251 }; 252 }; 252 }; 253 }; 253 }; 254 254 255 &pwm6 { 255 &pwm6 { 256 pinctrl-0 = <&pwm6m1_pins>; 256 pinctrl-0 = <&pwm6m1_pins>; 257 status = "okay"; 257 status = "okay"; 258 }; 258 }; 259 259 260 &sdmmc { 260 &sdmmc { 261 status = "disabled"; 261 status = "disabled"; 262 }; 262 }; 263 263 264 &sfc { 264 &sfc { 265 pinctrl-names = "default"; 265 pinctrl-names = "default"; 266 pinctrl-0 = <&fspim2_pins>; 266 pinctrl-0 = <&fspim2_pins>; 267 status = "okay"; 267 status = "okay"; 268 268 269 flash@0 { 269 flash@0 { 270 compatible = "jedec,spi-nor"; 270 compatible = "jedec,spi-nor"; 271 reg = <0x0>; 271 reg = <0x0>; 272 spi-max-frequency = <100000000 272 spi-max-frequency = <100000000>; 273 spi-rx-bus-width = <4>; 273 spi-rx-bus-width = <4>; 274 spi-tx-bus-width = <1>; 274 spi-tx-bus-width = <1>; 275 }; 275 }; 276 }; 276 }; 277 277 278 &u2phy0 { 278 &u2phy0 { 279 status = "okay"; 279 status = "okay"; 280 }; 280 }; 281 281 282 &u2phy0_otg { 282 &u2phy0_otg { 283 status = "okay"; 283 status = "okay"; 284 }; 284 }; 285 285 286 &usbdp_phy0 { 286 &usbdp_phy0 { 287 status = "okay"; 287 status = "okay"; 288 }; 288 }; 289 289 290 &u2phy1 { 290 &u2phy1 { 291 status = "okay"; 291 status = "okay"; 292 }; 292 }; 293 293 294 &u2phy1_otg { 294 &u2phy1_otg { 295 status = "okay"; 295 status = "okay"; 296 }; 296 }; 297 297 298 &u2phy2 { 298 &u2phy2 { 299 status = "okay"; 299 status = "okay"; 300 }; 300 }; 301 301 302 &u2phy3 { 302 &u2phy3 { 303 status = "okay"; 303 status = "okay"; 304 }; 304 }; 305 305 306 &u2phy2_host { 306 &u2phy2_host { 307 phy-supply = <&vcc5v0_usb_host0>; 307 phy-supply = <&vcc5v0_usb_host0>; 308 status = "okay"; 308 status = "okay"; 309 }; 309 }; 310 310 311 &u2phy3_host { 311 &u2phy3_host { 312 phy-supply = <&vcc5v0_usb>; 312 phy-supply = <&vcc5v0_usb>; 313 status = "okay"; 313 status = "okay"; 314 }; 314 }; 315 315 316 &usbdp_phy1 { 316 &usbdp_phy1 { 317 status = "okay"; 317 status = "okay"; 318 }; 318 }; 319 319 320 /* For Keypad */ 320 /* For Keypad */ 321 &usb_host0_ehci { 321 &usb_host0_ehci { 322 status = "okay"; 322 status = "okay"; 323 }; 323 }; 324 324 325 &usb_host0_ohci { 325 &usb_host0_ohci { 326 status = "okay"; 326 status = "okay"; 327 }; 327 }; 328 328 329 /* Type C port */ 329 /* Type C port */ 330 &usb_host0_xhci { 330 &usb_host0_xhci { 331 dr_mode = "peripheral"; 331 dr_mode = "peripheral"; 332 maximum-speed = "high-speed"; 332 maximum-speed = "high-speed"; 333 status = "okay"; 333 status = "okay"; 334 }; 334 }; 335 335 336 /* connected to a HUB for camera and BT */ 336 /* connected to a HUB for camera and BT */ 337 &usb_host1_ehci { 337 &usb_host1_ehci { 338 status = "okay"; 338 status = "okay"; 339 }; 339 }; 340 340 341 &usb_host1_ohci { 341 &usb_host1_ohci { 342 status = "okay"; 342 status = "okay"; 343 }; 343 }; 344 344 345 /* USB A out */ 345 /* USB A out */ 346 &usb_host1_xhci { 346 &usb_host1_xhci { 347 dr_mode = "host"; 347 dr_mode = "host"; 348 status = "okay"; 348 status = "okay"; 349 }; 349 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.