18bab661aSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 28bab661aSEmmanuel Vadot/* 38bab661aSEmmanuel Vadot * Copyright (c) 2022 Theobroma Systems Design und Consulting GmbH 48bab661aSEmmanuel Vadot */ 58bab661aSEmmanuel Vadot 68bab661aSEmmanuel Vadot/dts-v1/; 78bab661aSEmmanuel Vadot#include "px30-ringneck.dtsi" 88bab661aSEmmanuel Vadot#include <dt-bindings/input/input.h> 98bab661aSEmmanuel Vadot#include <dt-bindings/leds/common.h> 108bab661aSEmmanuel Vadot 118bab661aSEmmanuel Vadot/ { 128bab661aSEmmanuel Vadot model = "Theobroma Systems PX30-uQ7 SoM on Haikou devkit"; 138bab661aSEmmanuel Vadot compatible = "tsd,px30-ringneck-haikou", "rockchip,px30"; 148bab661aSEmmanuel Vadot 158bab661aSEmmanuel Vadot aliases { 168d13bc63SEmmanuel Vadot ethernet0 = &gmac; 178bab661aSEmmanuel Vadot mmc2 = &sdmmc; 188bab661aSEmmanuel Vadot }; 198bab661aSEmmanuel Vadot 208bab661aSEmmanuel Vadot chosen { 218bab661aSEmmanuel Vadot stdout-path = "serial0:115200n8"; 228bab661aSEmmanuel Vadot }; 238bab661aSEmmanuel Vadot 248bab661aSEmmanuel Vadot gpio-keys { 258bab661aSEmmanuel Vadot compatible = "gpio-keys"; 268bab661aSEmmanuel Vadot pinctrl-0 = <&haikou_keys_pin>; 278bab661aSEmmanuel Vadot pinctrl-names = "default"; 288bab661aSEmmanuel Vadot 298bab661aSEmmanuel Vadot button-batlow-n { 308bab661aSEmmanuel Vadot label = "BATLOW#"; 318bab661aSEmmanuel Vadot linux,code = <KEY_BATTERY>; 328bab661aSEmmanuel Vadot gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>; 338bab661aSEmmanuel Vadot }; 348bab661aSEmmanuel Vadot 358bab661aSEmmanuel Vadot button-slp-btn-n { 368bab661aSEmmanuel Vadot label = "SLP_BTN#"; 378bab661aSEmmanuel Vadot linux,code = <KEY_SLEEP>; 388bab661aSEmmanuel Vadot gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_LOW>; 398bab661aSEmmanuel Vadot }; 408bab661aSEmmanuel Vadot 418bab661aSEmmanuel Vadot button-wake-n { 428bab661aSEmmanuel Vadot label = "WAKE#"; 438bab661aSEmmanuel Vadot linux,code = <KEY_WAKEUP>; 448bab661aSEmmanuel Vadot gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_LOW>; 458bab661aSEmmanuel Vadot wakeup-source; 468bab661aSEmmanuel Vadot }; 478bab661aSEmmanuel Vadot 488bab661aSEmmanuel Vadot switch-lid-btn-n { 498bab661aSEmmanuel Vadot label = "LID_BTN#"; 508bab661aSEmmanuel Vadot linux,code = <SW_LID>; 518bab661aSEmmanuel Vadot linux,input-type = <EV_SW>; 528bab661aSEmmanuel Vadot gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>; 538bab661aSEmmanuel Vadot }; 548bab661aSEmmanuel Vadot }; 558bab661aSEmmanuel Vadot 568bab661aSEmmanuel Vadot leds { 578bab661aSEmmanuel Vadot pinctrl-0 = <&module_led_pin>, <&sd_card_led_pin>; 588bab661aSEmmanuel Vadot 598bab661aSEmmanuel Vadot sd_card_led: led-1 { 608bab661aSEmmanuel Vadot gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_HIGH>; 618bab661aSEmmanuel Vadot linux,default-trigger = "mmc2"; 628bab661aSEmmanuel Vadot function = LED_FUNCTION_SD; 638bab661aSEmmanuel Vadot color = <LED_COLOR_ID_BLUE>; 648bab661aSEmmanuel Vadot }; 658bab661aSEmmanuel Vadot }; 668bab661aSEmmanuel Vadot 678bab661aSEmmanuel Vadot i2s0-sound { 688bab661aSEmmanuel Vadot compatible = "simple-audio-card"; 698bab661aSEmmanuel Vadot simple-audio-card,format = "i2s"; 708bab661aSEmmanuel Vadot simple-audio-card,name = "Haikou,I2S-codec"; 718bab661aSEmmanuel Vadot simple-audio-card,mclk-fs = <512>; 72aa1a8ff2SEmmanuel Vadot simple-audio-card,frame-master = <&sgtl5000_codec>; 73aa1a8ff2SEmmanuel Vadot simple-audio-card,bitclock-master = <&sgtl5000_codec>; 748bab661aSEmmanuel Vadot 75aa1a8ff2SEmmanuel Vadot sgtl5000_codec: simple-audio-card,codec { 768bab661aSEmmanuel Vadot sound-dai = <&sgtl5000>; 77aa1a8ff2SEmmanuel Vadot // Prevent the dai subsystem from overwriting the clock 78aa1a8ff2SEmmanuel Vadot // frequency. We are using a fixed-frequency oscillator. 79aa1a8ff2SEmmanuel Vadot system-clock-fixed; 808bab661aSEmmanuel Vadot }; 818bab661aSEmmanuel Vadot 828bab661aSEmmanuel Vadot simple-audio-card,cpu { 838bab661aSEmmanuel Vadot sound-dai = <&i2s0_8ch>; 848bab661aSEmmanuel Vadot }; 858bab661aSEmmanuel Vadot }; 868bab661aSEmmanuel Vadot 878bab661aSEmmanuel Vadot sgtl5000_clk: sgtl5000-oscillator { 888bab661aSEmmanuel Vadot compatible = "fixed-clock"; 898bab661aSEmmanuel Vadot #clock-cells = <0>; 908bab661aSEmmanuel Vadot clock-frequency = <24576000>; 918bab661aSEmmanuel Vadot }; 928bab661aSEmmanuel Vadot 938bab661aSEmmanuel Vadot dc_12v: dc-12v-regulator { 948bab661aSEmmanuel Vadot compatible = "regulator-fixed"; 958bab661aSEmmanuel Vadot regulator-name = "dc_12v"; 968bab661aSEmmanuel Vadot regulator-always-on; 978bab661aSEmmanuel Vadot regulator-boot-on; 988bab661aSEmmanuel Vadot regulator-min-microvolt = <12000000>; 998bab661aSEmmanuel Vadot regulator-max-microvolt = <12000000>; 1008bab661aSEmmanuel Vadot }; 1018bab661aSEmmanuel Vadot 1028bab661aSEmmanuel Vadot vcc3v3_baseboard: vcc3v3-baseboard-regulator { 1038bab661aSEmmanuel Vadot compatible = "regulator-fixed"; 1048bab661aSEmmanuel Vadot regulator-name = "vcc3v3_baseboard"; 1058bab661aSEmmanuel Vadot regulator-always-on; 1068bab661aSEmmanuel Vadot regulator-boot-on; 1078bab661aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 1088bab661aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 1098bab661aSEmmanuel Vadot vin-supply = <&dc_12v>; 1108bab661aSEmmanuel Vadot }; 1118bab661aSEmmanuel Vadot 1128bab661aSEmmanuel Vadot vcc5v0_baseboard: vcc5v0-baseboard-regulator { 1138bab661aSEmmanuel Vadot compatible = "regulator-fixed"; 1148bab661aSEmmanuel Vadot regulator-name = "vcc5v0_baseboard"; 1158bab661aSEmmanuel Vadot regulator-always-on; 1168bab661aSEmmanuel Vadot regulator-boot-on; 1178bab661aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 1188bab661aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 1198bab661aSEmmanuel Vadot vin-supply = <&dc_12v>; 1208bab661aSEmmanuel Vadot }; 1218bab661aSEmmanuel Vadot 1228bab661aSEmmanuel Vadot vdda_codec: vdda-codec-regulator { 1238bab661aSEmmanuel Vadot compatible = "regulator-fixed"; 1248bab661aSEmmanuel Vadot regulator-name = "vdda_codec"; 1258bab661aSEmmanuel Vadot regulator-boot-on; 1268bab661aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 1278bab661aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 1288bab661aSEmmanuel Vadot vin-supply = <&vcc5v0_baseboard>; 1298bab661aSEmmanuel Vadot }; 1308bab661aSEmmanuel Vadot 1318bab661aSEmmanuel Vadot vddd_codec: vddd-codec-regulator { 1328bab661aSEmmanuel Vadot compatible = "regulator-fixed"; 1338bab661aSEmmanuel Vadot regulator-name = "vddd_codec"; 1348bab661aSEmmanuel Vadot regulator-boot-on; 1358bab661aSEmmanuel Vadot regulator-min-microvolt = <1600000>; 1368bab661aSEmmanuel Vadot regulator-max-microvolt = <1600000>; 1378bab661aSEmmanuel Vadot vin-supply = <&vcc5v0_baseboard>; 1388bab661aSEmmanuel Vadot }; 1398bab661aSEmmanuel Vadot}; 1408bab661aSEmmanuel Vadot 1418bab661aSEmmanuel Vadot&i2c2 { 1428bab661aSEmmanuel Vadot status = "okay"; 1438bab661aSEmmanuel Vadot clock-frequency = <400000>; 1448bab661aSEmmanuel Vadot 1458bab661aSEmmanuel Vadot sgtl5000: codec@a { 1468bab661aSEmmanuel Vadot compatible = "fsl,sgtl5000"; 1478bab661aSEmmanuel Vadot reg = <0x0a>; 1488bab661aSEmmanuel Vadot clocks = <&sgtl5000_clk>; 1498bab661aSEmmanuel Vadot #sound-dai-cells = <0>; 1508bab661aSEmmanuel Vadot VDDA-supply = <&vdda_codec>; 1518bab661aSEmmanuel Vadot VDDIO-supply = <&vcc3v3_baseboard>; 1528bab661aSEmmanuel Vadot VDDD-supply = <&vddd_codec>; 1538bab661aSEmmanuel Vadot }; 1548bab661aSEmmanuel Vadot}; 1558bab661aSEmmanuel Vadot 1568bab661aSEmmanuel Vadot&i2c3 { 1578bab661aSEmmanuel Vadot eeprom@50 { 1588bab661aSEmmanuel Vadot reg = <0x50>; 1598bab661aSEmmanuel Vadot compatible = "atmel,24c01"; 1608bab661aSEmmanuel Vadot pagesize = <8>; 1618bab661aSEmmanuel Vadot size = <128>; 1628bab661aSEmmanuel Vadot vcc-supply = <&vcc3v3_baseboard>; 1638bab661aSEmmanuel Vadot }; 1648bab661aSEmmanuel Vadot}; 1658bab661aSEmmanuel Vadot 1668bab661aSEmmanuel Vadot&i2s0_8ch { 1678bab661aSEmmanuel Vadot status = "okay"; 1688bab661aSEmmanuel Vadot}; 1698bab661aSEmmanuel Vadot 1708bab661aSEmmanuel Vadot&gmac { 1718bab661aSEmmanuel Vadot status = "okay"; 1728bab661aSEmmanuel Vadot}; 1738bab661aSEmmanuel Vadot 1748bab661aSEmmanuel Vadot&pinctrl { 1758bab661aSEmmanuel Vadot haikou { 1768bab661aSEmmanuel Vadot haikou_keys_pin: haikou-keys-pin { 1778bab661aSEmmanuel Vadot rockchip,pins = 1788bab661aSEmmanuel Vadot /* WAKE# */ 1798bab661aSEmmanuel Vadot <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>, 1808bab661aSEmmanuel Vadot /* SLP_BTN# */ 1818bab661aSEmmanuel Vadot <1 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>, 1828bab661aSEmmanuel Vadot /* LID_BTN */ 1838bab661aSEmmanuel Vadot <3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>, 1848bab661aSEmmanuel Vadot /* BATLOW# */ 1858bab661aSEmmanuel Vadot <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>, 1868bab661aSEmmanuel Vadot /* BIOS_DISABLE# */ 1878bab661aSEmmanuel Vadot <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; 1888bab661aSEmmanuel Vadot }; 1898bab661aSEmmanuel Vadot }; 1908bab661aSEmmanuel Vadot 1918bab661aSEmmanuel Vadot leds { 1928bab661aSEmmanuel Vadot sd_card_led_pin: sd-card-led-pin { 1938bab661aSEmmanuel Vadot rockchip,pins = 1948bab661aSEmmanuel Vadot <3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 1958bab661aSEmmanuel Vadot }; 1968bab661aSEmmanuel Vadot }; 1978bab661aSEmmanuel Vadot}; 1988bab661aSEmmanuel Vadot 1998bab661aSEmmanuel Vadot&pwm0 { 2008bab661aSEmmanuel Vadot status = "okay"; 2018bab661aSEmmanuel Vadot}; 2028bab661aSEmmanuel Vadot 2038bab661aSEmmanuel Vadot&sdmmc { 2048bab661aSEmmanuel Vadot sd-uhs-sdr12; 2058bab661aSEmmanuel Vadot sd-uhs-sdr25; 2068bab661aSEmmanuel Vadot sd-uhs-sdr50; 2078bab661aSEmmanuel Vadot bus-width = <4>; 2088bab661aSEmmanuel Vadot cap-mmc-highspeed; 2098bab661aSEmmanuel Vadot cap-sd-highspeed; 2108bab661aSEmmanuel Vadot cd-gpios = <&gpio0 RK_PA3 GPIO_ACTIVE_LOW>; 2118bab661aSEmmanuel Vadot disable-wp; 2128bab661aSEmmanuel Vadot vmmc-supply = <&vcc3v3_baseboard>; 2138bab661aSEmmanuel Vadot status = "okay"; 2148bab661aSEmmanuel Vadot}; 2158bab661aSEmmanuel Vadot 2168bab661aSEmmanuel Vadot&spi1 { 2178bab661aSEmmanuel Vadot status = "okay"; 2188bab661aSEmmanuel Vadot}; 2198bab661aSEmmanuel Vadot 2208bab661aSEmmanuel Vadot&u2phy_otg { 2218bab661aSEmmanuel Vadot status = "okay"; 2228bab661aSEmmanuel Vadot}; 2238bab661aSEmmanuel Vadot 2248bab661aSEmmanuel Vadot&uart0 { 2258bab661aSEmmanuel Vadot status = "okay"; 2268bab661aSEmmanuel Vadot}; 2278bab661aSEmmanuel Vadot 2288bab661aSEmmanuel Vadot&uart5 { 2298bab661aSEmmanuel Vadot pinctrl-0 = <&uart5_xfer>; 230*01950c46SEmmanuel Vadot rts-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; 2318bab661aSEmmanuel Vadot status = "okay"; 2328bab661aSEmmanuel Vadot}; 2338bab661aSEmmanuel Vadot 2348bab661aSEmmanuel Vadot&usb20_otg { 2358bab661aSEmmanuel Vadot status = "okay"; 2368bab661aSEmmanuel Vadot}; 237