14ee99cebSKlaus Goger// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 260fd9f72SKlaus Goger/* 360fd9f72SKlaus Goger * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH 460fd9f72SKlaus Goger */ 560fd9f72SKlaus Goger 660fd9f72SKlaus Goger/dts-v1/; 760fd9f72SKlaus Goger#include "rk3399-puma.dtsi" 84a8cd5cbSVahe Grigoryan#include <dt-bindings/input/input.h> 960fd9f72SKlaus Goger 1060fd9f72SKlaus Goger/ { 1160fd9f72SKlaus Goger model = "Theobroma Systems RK3399-Q7 SoM"; 1260fd9f72SKlaus Goger compatible = "tsd,rk3399-puma-haikou", "rockchip,rk3399"; 1360fd9f72SKlaus Goger 145dcbe7e3SHeiko Stuebner aliases { 155dcbe7e3SHeiko Stuebner mmc1 = &sdmmc; 165dcbe7e3SHeiko Stuebner }; 175dcbe7e3SHeiko Stuebner 1860fd9f72SKlaus Goger chosen { 1960fd9f72SKlaus Goger stdout-path = "serial0:115200n8"; 2060fd9f72SKlaus Goger }; 2160fd9f72SKlaus Goger 224a8cd5cbSVahe Grigoryan gpio-keys { 234a8cd5cbSVahe Grigoryan compatible = "gpio-keys"; 244a8cd5cbSVahe Grigoryan pinctrl-0 = <&haikou_keys_pin>; 254a8cd5cbSVahe Grigoryan pinctrl-names = "default"; 264a8cd5cbSVahe Grigoryan 274a8cd5cbSVahe Grigoryan button-batlow-n { 284a8cd5cbSVahe Grigoryan gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; 294a8cd5cbSVahe Grigoryan label = "BATLOW#"; 304a8cd5cbSVahe Grigoryan linux,code = <KEY_BATTERY>; 314a8cd5cbSVahe Grigoryan }; 324a8cd5cbSVahe Grigoryan 334a8cd5cbSVahe Grigoryan button-slp-btn-n { 344a8cd5cbSVahe Grigoryan gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_LOW>; 354a8cd5cbSVahe Grigoryan label = "SLP_BTN#"; 364a8cd5cbSVahe Grigoryan linux,code = <KEY_SLEEP>; 374a8cd5cbSVahe Grigoryan }; 384a8cd5cbSVahe Grigoryan 394a8cd5cbSVahe Grigoryan button-wake-n { 404a8cd5cbSVahe Grigoryan gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>; 414a8cd5cbSVahe Grigoryan label = "WAKE#"; 424a8cd5cbSVahe Grigoryan linux,code = <KEY_WAKEUP>; 434a8cd5cbSVahe Grigoryan wakeup-source; 444a8cd5cbSVahe Grigoryan }; 454a8cd5cbSVahe Grigoryan 464a8cd5cbSVahe Grigoryan switch-lid-btn-n { 474a8cd5cbSVahe Grigoryan gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>; 484a8cd5cbSVahe Grigoryan label = "LID_BTN#"; 494a8cd5cbSVahe Grigoryan linux,code = <SW_LID>; 504a8cd5cbSVahe Grigoryan linux,input-type = <EV_SW>; 514a8cd5cbSVahe Grigoryan }; 524a8cd5cbSVahe Grigoryan }; 534a8cd5cbSVahe Grigoryan 5460fd9f72SKlaus Goger leds { 556dd5e12cSJohan Jonker pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>; 5660fd9f72SKlaus Goger 576dd5e12cSJohan Jonker sd_card_led: led-1 { 5860fd9f72SKlaus Goger label = "sd_card_led"; 5960fd9f72SKlaus Goger gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>; 6060fd9f72SKlaus Goger linux,default-trigger = "mmc0"; 6160fd9f72SKlaus Goger }; 6260fd9f72SKlaus Goger }; 6360fd9f72SKlaus Goger 64d95ed430SKlaus Goger i2s0-sound { 65d95ed430SKlaus Goger compatible = "simple-audio-card"; 66d95ed430SKlaus Goger simple-audio-card,format = "i2s"; 67d95ed430SKlaus Goger simple-audio-card,name = "Haikou,I2S-codec"; 68d95ed430SKlaus Goger simple-audio-card,mclk-fs = <512>; 69d95ed430SKlaus Goger 70d95ed430SKlaus Goger simple-audio-card,codec { 71d95ed430SKlaus Goger clocks = <&sgtl5000_clk>; 72d95ed430SKlaus Goger sound-dai = <&sgtl5000>; 73d95ed430SKlaus Goger }; 74d95ed430SKlaus Goger 75d95ed430SKlaus Goger simple-audio-card,cpu { 76d95ed430SKlaus Goger bitclock-master; 77d95ed430SKlaus Goger frame-master; 78d95ed430SKlaus Goger sound-dai = <&i2s0>; 79d95ed430SKlaus Goger }; 80d95ed430SKlaus Goger }; 81d95ed430SKlaus Goger 82d95ed430SKlaus Goger sgtl5000_clk: sgtl5000-oscillator { 83d95ed430SKlaus Goger compatible = "fixed-clock"; 84d95ed430SKlaus Goger #clock-cells = <0>; 85d95ed430SKlaus Goger clock-frequency = <24576000>; 86d95ed430SKlaus Goger }; 87d95ed430SKlaus Goger 8860fd9f72SKlaus Goger dc_12v: dc-12v { 8960fd9f72SKlaus Goger compatible = "regulator-fixed"; 9060fd9f72SKlaus Goger regulator-name = "dc_12v"; 9160fd9f72SKlaus Goger regulator-always-on; 9260fd9f72SKlaus Goger regulator-boot-on; 9360fd9f72SKlaus Goger regulator-min-microvolt = <12000000>; 9460fd9f72SKlaus Goger regulator-max-microvolt = <12000000>; 9560fd9f72SKlaus Goger }; 9660fd9f72SKlaus Goger 9760fd9f72SKlaus Goger vcc3v3_baseboard: vcc3v3-baseboard { 9860fd9f72SKlaus Goger compatible = "regulator-fixed"; 9960fd9f72SKlaus Goger regulator-name = "vcc3v3_baseboard"; 10060fd9f72SKlaus Goger regulator-always-on; 10160fd9f72SKlaus Goger regulator-boot-on; 10260fd9f72SKlaus Goger regulator-min-microvolt = <3300000>; 10360fd9f72SKlaus Goger regulator-max-microvolt = <3300000>; 10460fd9f72SKlaus Goger vin-supply = <&dc_12v>; 10560fd9f72SKlaus Goger }; 10660fd9f72SKlaus Goger 107d95ed430SKlaus Goger vcc5v0_baseboard: vcc5v0-baseboard { 108d95ed430SKlaus Goger compatible = "regulator-fixed"; 109d95ed430SKlaus Goger regulator-name = "vcc5v0_baseboard"; 110d95ed430SKlaus Goger regulator-always-on; 111d95ed430SKlaus Goger regulator-boot-on; 112d95ed430SKlaus Goger regulator-min-microvolt = <5000000>; 113d95ed430SKlaus Goger regulator-max-microvolt = <5000000>; 114d95ed430SKlaus Goger vin-supply = <&dc_12v>; 115d95ed430SKlaus Goger }; 116d95ed430SKlaus Goger 11760fd9f72SKlaus Goger vcc5v0_otg: vcc5v0-otg-regulator { 11860fd9f72SKlaus Goger compatible = "regulator-fixed"; 11960fd9f72SKlaus Goger enable-active-high; 12060fd9f72SKlaus Goger gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; 12160fd9f72SKlaus Goger pinctrl-names = "default"; 12260fd9f72SKlaus Goger pinctrl-0 = <&otg_vbus_drv>; 12360fd9f72SKlaus Goger regulator-name = "vcc5v0_otg"; 12460fd9f72SKlaus Goger regulator-always-on; 12560fd9f72SKlaus Goger }; 126d95ed430SKlaus Goger 127d95ed430SKlaus Goger vdda_codec: vdda-codec { 128d95ed430SKlaus Goger compatible = "regulator-fixed"; 129d95ed430SKlaus Goger regulator-name = "vdda_codec"; 130d95ed430SKlaus Goger regulator-boot-on; 131d95ed430SKlaus Goger regulator-min-microvolt = <3300000>; 132d95ed430SKlaus Goger regulator-max-microvolt = <3300000>; 133d95ed430SKlaus Goger vin-supply = <&vcc5v0_baseboard>; 134d95ed430SKlaus Goger }; 135d95ed430SKlaus Goger 136d95ed430SKlaus Goger vddd_codec: vddd-codec { 137d95ed430SKlaus Goger compatible = "regulator-fixed"; 138d95ed430SKlaus Goger regulator-name = "vddd_codec"; 139d95ed430SKlaus Goger regulator-boot-on; 140d95ed430SKlaus Goger regulator-min-microvolt = <1600000>; 141d95ed430SKlaus Goger regulator-max-microvolt = <1600000>; 142d95ed430SKlaus Goger vin-supply = <&vcc5v0_baseboard>; 143d95ed430SKlaus Goger }; 14460fd9f72SKlaus Goger}; 14560fd9f72SKlaus Goger 14617bd0737SJakob Unterwurzacher&hdmi { 14717bd0737SJakob Unterwurzacher ddc-i2c-bus = <&i2c3>; 14817bd0737SJakob Unterwurzacher status = "okay"; 14917bd0737SJakob Unterwurzacher}; 15017bd0737SJakob Unterwurzacher 15160fd9f72SKlaus Goger&i2c1 { 15260fd9f72SKlaus Goger status = "okay"; 15360fd9f72SKlaus Goger clock-frequency = <400000>; 15460fd9f72SKlaus Goger}; 15560fd9f72SKlaus Goger 15660fd9f72SKlaus Goger&i2c2 { 15760fd9f72SKlaus Goger status = "okay"; 15860fd9f72SKlaus Goger clock-frequency = <400000>; 15960fd9f72SKlaus Goger}; 16060fd9f72SKlaus Goger 16160fd9f72SKlaus Goger&i2c3 { 16260fd9f72SKlaus Goger i2c-scl-rising-time-ns = <450>; 16360fd9f72SKlaus Goger i2c-scl-falling-time-ns = <15>; 16460fd9f72SKlaus Goger status = "okay"; 16560fd9f72SKlaus Goger}; 16660fd9f72SKlaus Goger 16760fd9f72SKlaus Goger&i2c4 { 16860fd9f72SKlaus Goger status = "okay"; 16960fd9f72SKlaus Goger clock-frequency = <400000>; 170d95ed430SKlaus Goger 171501500e6SRob Herring sgtl5000: codec@a { 172d95ed430SKlaus Goger compatible = "fsl,sgtl5000"; 173d95ed430SKlaus Goger reg = <0x0a>; 174d95ed430SKlaus Goger clocks = <&sgtl5000_clk>; 175d95ed430SKlaus Goger #sound-dai-cells = <0>; 176d95ed430SKlaus Goger VDDA-supply = <&vdda_codec>; 177d95ed430SKlaus Goger VDDIO-supply = <&vdda_codec>; 178d95ed430SKlaus Goger VDDD-supply = <&vddd_codec>; 179d95ed430SKlaus Goger status = "okay"; 180d95ed430SKlaus Goger }; 18160fd9f72SKlaus Goger}; 18260fd9f72SKlaus Goger 18360fd9f72SKlaus Goger&i2c6 { 18460fd9f72SKlaus Goger status = "okay"; 18560fd9f72SKlaus Goger clock-frequency = <400000>; 18660fd9f72SKlaus Goger}; 18760fd9f72SKlaus Goger 18860fd9f72SKlaus Goger&pcie_phy { 18960fd9f72SKlaus Goger status = "okay"; 19060fd9f72SKlaus Goger}; 19160fd9f72SKlaus Goger 19260fd9f72SKlaus Goger&pcie0 { 193c1d91f86SChristoph Muellner ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>; 19460fd9f72SKlaus Goger num-lanes = <4>; 19560fd9f72SKlaus Goger pinctrl-names = "default"; 19660fd9f72SKlaus Goger pinctrl-0 = <&pcie_clkreqn_cpm>; 197*d7ed698aSQuentin Schulz vpcie3v3-supply = <&vcc3v3_baseboard>; 198*d7ed698aSQuentin Schulz vpcie12v-supply = <&dc_12v>; 19960fd9f72SKlaus Goger status = "okay"; 20060fd9f72SKlaus Goger}; 20160fd9f72SKlaus Goger 20260fd9f72SKlaus Goger&pinctrl { 2034a8cd5cbSVahe Grigoryan buttons { 2044a8cd5cbSVahe Grigoryan haikou_keys_pin: haikou-keys-pin { 20560fd9f72SKlaus Goger rockchip,pins = 20660fd9f72SKlaus Goger /* LID_BTN */ 207d64420e8SHeiko Stuebner <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>, 20860fd9f72SKlaus Goger /* BATLOW# */ 209d64420e8SHeiko Stuebner <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>, 21060fd9f72SKlaus Goger /* SLP_BTN# */ 211d64420e8SHeiko Stuebner <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>, 2129050aefaSVahe Grigoryan /* WAKE# */ 213d64420e8SHeiko Stuebner <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>; 21460fd9f72SKlaus Goger }; 21560fd9f72SKlaus Goger }; 21660fd9f72SKlaus Goger 21760fd9f72SKlaus Goger leds { 2186dd5e12cSJohan Jonker sd_card_led_pin: sd-card-led-pin { 21960fd9f72SKlaus Goger rockchip,pins = 220d64420e8SHeiko Stuebner <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 22160fd9f72SKlaus Goger }; 22260fd9f72SKlaus Goger }; 22360fd9f72SKlaus Goger 22460fd9f72SKlaus Goger usb2 { 22560fd9f72SKlaus Goger otg_vbus_drv: otg-vbus-drv { 22660fd9f72SKlaus Goger rockchip,pins = 227d64420e8SHeiko Stuebner <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 22860fd9f72SKlaus Goger }; 22960fd9f72SKlaus Goger }; 23060fd9f72SKlaus Goger}; 23160fd9f72SKlaus Goger 23260fd9f72SKlaus Goger&pwm0 { 23360fd9f72SKlaus Goger status = "okay"; 23460fd9f72SKlaus Goger}; 23560fd9f72SKlaus Goger 23660fd9f72SKlaus Goger&sdmmc { 23760fd9f72SKlaus Goger bus-width = <4>; 23860fd9f72SKlaus Goger cap-mmc-highspeed; 23960fd9f72SKlaus Goger cap-sd-highspeed; 24060fd9f72SKlaus Goger cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 24160fd9f72SKlaus Goger disable-wp; 24291e8b74fSJakob Unterwurzacher max-frequency = <40000000>; 24360fd9f72SKlaus Goger pinctrl-names = "default"; 24460fd9f72SKlaus Goger pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 24560fd9f72SKlaus Goger vmmc-supply = <&vcc3v3_baseboard>; 24660fd9f72SKlaus Goger status = "okay"; 24760fd9f72SKlaus Goger}; 24860fd9f72SKlaus Goger 24960fd9f72SKlaus Goger&spi5 { 25060fd9f72SKlaus Goger status = "okay"; 25160fd9f72SKlaus Goger}; 25260fd9f72SKlaus Goger 2537c573e37SEnric Balletbo i Serra&tcphy0 { 2547c573e37SEnric Balletbo i Serra status = "okay"; 2557c573e37SEnric Balletbo i Serra}; 2567c573e37SEnric Balletbo i Serra 25760fd9f72SKlaus Goger&u2phy0 { 25860fd9f72SKlaus Goger status = "okay"; 25960fd9f72SKlaus Goger}; 26060fd9f72SKlaus Goger 26160fd9f72SKlaus Goger&usbdrd3_0 { 26260fd9f72SKlaus Goger status = "okay"; 26360fd9f72SKlaus Goger}; 26460fd9f72SKlaus Goger 26560fd9f72SKlaus Goger&usbdrd_dwc3_0 { 26660fd9f72SKlaus Goger dr_mode = "otg"; 267ed2c66a9SQuentin Schulz extcon = <&extcon_usb3>; 26860fd9f72SKlaus Goger status = "okay"; 26960fd9f72SKlaus Goger}; 27060fd9f72SKlaus Goger 27160fd9f72SKlaus Goger&u2phy0_host { 27260fd9f72SKlaus Goger phy-supply = <&vcc5v0_otg>; 27360fd9f72SKlaus Goger status = "okay"; 27460fd9f72SKlaus Goger}; 27560fd9f72SKlaus Goger 27660fd9f72SKlaus Goger&uart0 { 27760fd9f72SKlaus Goger pinctrl-names = "default"; 27854448f71SFarouk Bouabid pinctrl-0 = <&uart0_xfer>; 27960fd9f72SKlaus Goger status = "okay"; 28060fd9f72SKlaus Goger}; 28160fd9f72SKlaus Goger 28260fd9f72SKlaus Goger&uart2 { 28354448f71SFarouk Bouabid rts-gpios = <&gpio2 RK_PC3 GPIO_ACTIVE_HIGH>; 28460fd9f72SKlaus Goger status = "okay"; 28560fd9f72SKlaus Goger}; 28660fd9f72SKlaus Goger 28760fd9f72SKlaus Goger&usb_host0_ehci { 28860fd9f72SKlaus Goger status = "okay"; 28960fd9f72SKlaus Goger}; 29060fd9f72SKlaus Goger 29160fd9f72SKlaus Goger&usb_host0_ohci { 29260fd9f72SKlaus Goger status = "okay"; 29360fd9f72SKlaus Goger}; 29417bd0737SJakob Unterwurzacher 29517bd0737SJakob Unterwurzacher&vopb { 29617bd0737SJakob Unterwurzacher status = "okay"; 29717bd0737SJakob Unterwurzacher}; 29817bd0737SJakob Unterwurzacher 29917bd0737SJakob Unterwurzacher&vopb_mmu { 30017bd0737SJakob Unterwurzacher status = "okay"; 30117bd0737SJakob Unterwurzacher}; 30217bd0737SJakob Unterwurzacher 30317bd0737SJakob Unterwurzacher&vopl { 30417bd0737SJakob Unterwurzacher status = "okay"; 30517bd0737SJakob Unterwurzacher}; 30617bd0737SJakob Unterwurzacher 30717bd0737SJakob Unterwurzacher&vopl_mmu { 30817bd0737SJakob Unterwurzacher status = "okay"; 30917bd0737SJakob Unterwurzacher}; 310