1*79f2a170SHsun Lai// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*79f2a170SHsun Lai/* 3*79f2a170SHsun Lai * Copyright (c) 2019 Akash Gajjar <akash@openedev.com> 4*79f2a170SHsun Lai * Copyright (c) 2019 Jagan Teki <jagan@openedev.com> 5*79f2a170SHsun Lai * Copyright (C) 2024 TheSnowfield <thesnowfield@sakurapi.org> 6*79f2a170SHsun Lai * Copyright (C) 2025 Hsun Lai <i@chainsx.cn> 7*79f2a170SHsun Lai */ 8*79f2a170SHsun Lai 9*79f2a170SHsun Lai/dts-v1/; 10*79f2a170SHsun Lai#include "rk3308.dtsi" 11*79f2a170SHsun Lai#include <dt-bindings/leds/common.h> 12*79f2a170SHsun Lai 13*79f2a170SHsun Lai/ { 14*79f2a170SHsun Lai model = "Sakura Pi RK3308B"; 15*79f2a170SHsun Lai compatible = "sakurapi,rk3308-sakurapi-rk3308b", "rockchip,rk3308"; 16*79f2a170SHsun Lai 17*79f2a170SHsun Lai aliases { 18*79f2a170SHsun Lai mmc0 = &emmc; 19*79f2a170SHsun Lai mmc1 = &sdmmc; 20*79f2a170SHsun Lai mmc2 = &sdio; 21*79f2a170SHsun Lai }; 22*79f2a170SHsun Lai 23*79f2a170SHsun Lai chosen { 24*79f2a170SHsun Lai stdout-path = "serial2:1500000n8"; 25*79f2a170SHsun Lai }; 26*79f2a170SHsun Lai 27*79f2a170SHsun Lai vcc5v0_sys: regulator-vcc5v0-sys { 28*79f2a170SHsun Lai compatible = "regulator-fixed"; 29*79f2a170SHsun Lai regulator-name = "vcc5v0_sys"; 30*79f2a170SHsun Lai regulator-always-on; 31*79f2a170SHsun Lai regulator-boot-on; 32*79f2a170SHsun Lai regulator-min-microvolt = <5000000>; 33*79f2a170SHsun Lai regulator-max-microvolt = <5000000>; 34*79f2a170SHsun Lai }; 35*79f2a170SHsun Lai 36*79f2a170SHsun Lai vdd_core: regulator-vdd-core { 37*79f2a170SHsun Lai compatible = "pwm-regulator"; 38*79f2a170SHsun Lai pwms = <&pwm0 0 5000 1>; 39*79f2a170SHsun Lai regulator-name = "vdd_core"; 40*79f2a170SHsun Lai regulator-min-microvolt = <827000>; 41*79f2a170SHsun Lai regulator-max-microvolt = <1340000>; 42*79f2a170SHsun Lai regulator-settling-time-up-us = <250>; 43*79f2a170SHsun Lai regulator-always-on; 44*79f2a170SHsun Lai regulator-boot-on; 45*79f2a170SHsun Lai pwm-supply = <&vcc5v0_sys>; 46*79f2a170SHsun Lai }; 47*79f2a170SHsun Lai 48*79f2a170SHsun Lai vdd_log: regulator-vdd-log { 49*79f2a170SHsun Lai compatible = "regulator-fixed"; 50*79f2a170SHsun Lai regulator-name = "vdd_log"; 51*79f2a170SHsun Lai regulator-always-on; 52*79f2a170SHsun Lai regulator-boot-on; 53*79f2a170SHsun Lai regulator-min-microvolt = <1050000>; 54*79f2a170SHsun Lai regulator-max-microvolt = <1050000>; 55*79f2a170SHsun Lai vin-supply = <&vcc5v0_sys>; 56*79f2a170SHsun Lai }; 57*79f2a170SHsun Lai 58*79f2a170SHsun Lai vcc_ddr: regulator-vcc-ddr { 59*79f2a170SHsun Lai compatible = "regulator-fixed"; 60*79f2a170SHsun Lai regulator-name = "vcc_ddr"; 61*79f2a170SHsun Lai regulator-always-on; 62*79f2a170SHsun Lai regulator-boot-on; 63*79f2a170SHsun Lai regulator-min-microvolt = <1500000>; 64*79f2a170SHsun Lai regulator-max-microvolt = <1500000>; 65*79f2a170SHsun Lai vin-supply = <&vcc5v0_sys>; 66*79f2a170SHsun Lai }; 67*79f2a170SHsun Lai 68*79f2a170SHsun Lai vcc_1v8: regulator-vcc-1v8 { 69*79f2a170SHsun Lai compatible = "regulator-fixed"; 70*79f2a170SHsun Lai regulator-name = "vcc_1v8"; 71*79f2a170SHsun Lai regulator-always-on; 72*79f2a170SHsun Lai regulator-boot-on; 73*79f2a170SHsun Lai regulator-min-microvolt = <1800000>; 74*79f2a170SHsun Lai regulator-max-microvolt = <1800000>; 75*79f2a170SHsun Lai vin-supply = <&vcc_io>; 76*79f2a170SHsun Lai }; 77*79f2a170SHsun Lai 78*79f2a170SHsun Lai vcc_io: regulator-vcc-io { 79*79f2a170SHsun Lai compatible = "regulator-fixed"; 80*79f2a170SHsun Lai regulator-name = "vcc_io"; 81*79f2a170SHsun Lai regulator-always-on; 82*79f2a170SHsun Lai regulator-boot-on; 83*79f2a170SHsun Lai regulator-min-microvolt = <3300000>; 84*79f2a170SHsun Lai regulator-max-microvolt = <3300000>; 85*79f2a170SHsun Lai vin-supply = <&vcc5v0_sys>; 86*79f2a170SHsun Lai }; 87*79f2a170SHsun Lai 88*79f2a170SHsun Lai vcc_phy: regulator-vcc-phy-regulator { 89*79f2a170SHsun Lai compatible = "regulator-fixed"; 90*79f2a170SHsun Lai regulator-name = "vcc_phy"; 91*79f2a170SHsun Lai regulator-always-on; 92*79f2a170SHsun Lai regulator-boot-on; 93*79f2a170SHsun Lai }; 94*79f2a170SHsun Lai 95*79f2a170SHsun Lai vcc5v0_otg: regulator-vcc5v0-otg { 96*79f2a170SHsun Lai compatible = "regulator-fixed"; 97*79f2a170SHsun Lai enable-active-high; 98*79f2a170SHsun Lai gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>; 99*79f2a170SHsun Lai pinctrl-names = "default"; 100*79f2a170SHsun Lai pinctrl-0 = <&otg_vbus_drv>; 101*79f2a170SHsun Lai regulator-name = "vcc5v0_otg"; 102*79f2a170SHsun Lai regulator-always-on; 103*79f2a170SHsun Lai vin-supply = <&vcc5v0_sys>; 104*79f2a170SHsun Lai }; 105*79f2a170SHsun Lai 106*79f2a170SHsun Lai sdio_pwrseq: sdio-pwrseq { 107*79f2a170SHsun Lai compatible = "mmc-pwrseq-simple"; 108*79f2a170SHsun Lai pinctrl-0 = <&wifi_enable_h>; 109*79f2a170SHsun Lai pinctrl-names = "default"; 110*79f2a170SHsun Lai /* 111*79f2a170SHsun Lai * On the module itself this is one of these (depending 112*79f2a170SHsun Lai * on the actual card populated): 113*79f2a170SHsun Lai * - SDIO_RESET_L_WL_REG_ON 114*79f2a170SHsun Lai * - PDN (power down when low) 115*79f2a170SHsun Lai */ 116*79f2a170SHsun Lai reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; 117*79f2a170SHsun Lai }; 118*79f2a170SHsun Lai}; 119*79f2a170SHsun Lai 120*79f2a170SHsun Lai&cpu0 { 121*79f2a170SHsun Lai cpu-supply = <&vdd_core>; 122*79f2a170SHsun Lai}; 123*79f2a170SHsun Lai 124*79f2a170SHsun Lai&emmc { 125*79f2a170SHsun Lai bus-width = <8>; 126*79f2a170SHsun Lai cap-mmc-highspeed; 127*79f2a170SHsun Lai non-removable; 128*79f2a170SHsun Lai status = "okay"; 129*79f2a170SHsun Lai}; 130*79f2a170SHsun Lai 131*79f2a170SHsun Lai&i2c1 { 132*79f2a170SHsun Lai status = "okay"; 133*79f2a170SHsun Lai}; 134*79f2a170SHsun Lai 135*79f2a170SHsun Lai&pinctrl { 136*79f2a170SHsun Lai pinctrl-names = "default"; 137*79f2a170SHsun Lai pinctrl-0 = <&rtc_32k>; 138*79f2a170SHsun Lai 139*79f2a170SHsun Lai bluetooth { 140*79f2a170SHsun Lai bt_reg_on: bt-reg-on { 141*79f2a170SHsun Lai rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 142*79f2a170SHsun Lai }; 143*79f2a170SHsun Lai 144*79f2a170SHsun Lai bt_wake_host: bt-wake-host { 145*79f2a170SHsun Lai rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; 146*79f2a170SHsun Lai }; 147*79f2a170SHsun Lai 148*79f2a170SHsun Lai host_wake_bt: host-wake-bt { 149*79f2a170SHsun Lai rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; 150*79f2a170SHsun Lai }; 151*79f2a170SHsun Lai }; 152*79f2a170SHsun Lai 153*79f2a170SHsun Lai sdio-pwrseq { 154*79f2a170SHsun Lai wifi_enable_h: wifi-enable-h { 155*79f2a170SHsun Lai rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 156*79f2a170SHsun Lai }; 157*79f2a170SHsun Lai }; 158*79f2a170SHsun Lai 159*79f2a170SHsun Lai usb { 160*79f2a170SHsun Lai otg_vbus_drv: otg-vbus-drv { 161*79f2a170SHsun Lai rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; 162*79f2a170SHsun Lai }; 163*79f2a170SHsun Lai }; 164*79f2a170SHsun Lai 165*79f2a170SHsun Lai wifi { 166*79f2a170SHsun Lai wifi_host_wake: wifi-host-wake { 167*79f2a170SHsun Lai rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>; 168*79f2a170SHsun Lai }; 169*79f2a170SHsun Lai }; 170*79f2a170SHsun Lai}; 171*79f2a170SHsun Lai 172*79f2a170SHsun Lai&pwm0 { 173*79f2a170SHsun Lai status = "okay"; 174*79f2a170SHsun Lai pinctrl-0 = <&pwm0_pin_pull_down>; 175*79f2a170SHsun Lai}; 176*79f2a170SHsun Lai 177*79f2a170SHsun Lai&pwm3 { 178*79f2a170SHsun Lai status = "okay"; 179*79f2a170SHsun Lai}; 180*79f2a170SHsun Lai 181*79f2a170SHsun Lai&saradc { 182*79f2a170SHsun Lai vref-supply = <&vcc_1v8>; 183*79f2a170SHsun Lai status = "okay"; 184*79f2a170SHsun Lai}; 185*79f2a170SHsun Lai 186*79f2a170SHsun Lai&sdio { 187*79f2a170SHsun Lai #address-cells = <1>; 188*79f2a170SHsun Lai #size-cells = <0>; 189*79f2a170SHsun Lai cap-sd-highspeed; 190*79f2a170SHsun Lai cap-sdio-irq; 191*79f2a170SHsun Lai keep-power-in-suspend; 192*79f2a170SHsun Lai mmc-pwrseq = <&sdio_pwrseq>; 193*79f2a170SHsun Lai non-removable; 194*79f2a170SHsun Lai no-mmc; 195*79f2a170SHsun Lai no-sd; 196*79f2a170SHsun Lai status = "okay"; 197*79f2a170SHsun Lai 198*79f2a170SHsun Lai brcmf: wifi@1 { 199*79f2a170SHsun Lai compatible = "brcm,bcm43455-fmac", "brcm,bcm4329-fmac"; 200*79f2a170SHsun Lai reg = <1>; 201*79f2a170SHsun Lai interrupt-parent = <&gpio0>; 202*79f2a170SHsun Lai interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>; 203*79f2a170SHsun Lai interrupt-names = "host-wake"; 204*79f2a170SHsun Lai pinctrl-names = "default"; 205*79f2a170SHsun Lai pinctrl-0 = <&wifi_host_wake>; 206*79f2a170SHsun Lai }; 207*79f2a170SHsun Lai}; 208*79f2a170SHsun Lai 209*79f2a170SHsun Lai&sdmmc { 210*79f2a170SHsun Lai cap-mmc-highspeed; 211*79f2a170SHsun Lai cap-sd-highspeed; 212*79f2a170SHsun Lai disable-wp; 213*79f2a170SHsun Lai pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>; 214*79f2a170SHsun Lai card-detect-delay = <800>; 215*79f2a170SHsun Lai status = "okay"; 216*79f2a170SHsun Lai}; 217*79f2a170SHsun Lai 218*79f2a170SHsun Lai&uart2 { 219*79f2a170SHsun Lai pinctrl-names = "default"; 220*79f2a170SHsun Lai pinctrl-0 = <&uart2m0_xfer>; 221*79f2a170SHsun Lai status = "okay"; 222*79f2a170SHsun Lai}; 223*79f2a170SHsun Lai 224*79f2a170SHsun Lai&uart4 { 225*79f2a170SHsun Lai pinctrl-names = "default"; 226*79f2a170SHsun Lai uart-has-rtscts; 227*79f2a170SHsun Lai status = "okay"; 228*79f2a170SHsun Lai 229*79f2a170SHsun Lai bluetooth { 230*79f2a170SHsun Lai compatible = "brcm,bcm4345c5"; 231*79f2a170SHsun Lai clocks = <&cru SCLK_RTC32K>; 232*79f2a170SHsun Lai clock-names = "lpo"; 233*79f2a170SHsun Lai pinctrl-names = "default"; 234*79f2a170SHsun Lai pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>; 235*79f2a170SHsun Lai device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 236*79f2a170SHsun Lai host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>; 237*79f2a170SHsun Lai shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 238*79f2a170SHsun Lai max-speed = <1500000>; 239*79f2a170SHsun Lai }; 240*79f2a170SHsun Lai}; 241*79f2a170SHsun Lai 242*79f2a170SHsun Lai&u2phy { 243*79f2a170SHsun Lai status = "okay"; 244*79f2a170SHsun Lai}; 245*79f2a170SHsun Lai 246*79f2a170SHsun Lai&u2phy_otg { 247*79f2a170SHsun Lai status = "okay"; 248*79f2a170SHsun Lai}; 249*79f2a170SHsun Lai 250*79f2a170SHsun Lai&u2phy_host { 251*79f2a170SHsun Lai status = "okay"; 252*79f2a170SHsun Lai}; 253*79f2a170SHsun Lai 254*79f2a170SHsun Lai&usb20_otg { 255*79f2a170SHsun Lai dr_mode = "peripheral"; 256*79f2a170SHsun Lai status = "okay"; 257*79f2a170SHsun Lai}; 258*79f2a170SHsun Lai 259*79f2a170SHsun Lai&usb_host_ehci { 260*79f2a170SHsun Lai status = "okay"; 261*79f2a170SHsun Lai}; 262*79f2a170SHsun Lai 263*79f2a170SHsun Lai&usb_host_ohci { 264*79f2a170SHsun Lai status = "okay"; 265*79f2a170SHsun Lai}; 266