diff --git a/arch/arm64/boot/dts/seco/Makefile b/arch/arm64/boot/dts/seco/Makefile index d18f7cb542defbe37e47c5ab7b20ab3e3d30a874..154446e0658ec6bcd4f2c29578dff61d39d6cd8a 100644 --- a/arch/arm64/boot/dts/seco/Makefile +++ b/arch/arm64/boot/dts/seco/Makefile @@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += seco-px30-d23-revb-lvds.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += seco-px30-d23-revc-hdmi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += seco-px30-d23-revc-lvds.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += seco-px30-d23-revb-hdmi-lvds.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += seco-px30-d23-revc-hdmi-lvds.dtb dts-dirs += overlays diff --git a/arch/arm64/boot/dts/seco/seco-px30-d23-revc-hdmi-lvds.dts b/arch/arm64/boot/dts/seco/seco-px30-d23-revc-hdmi-lvds.dts new file mode 100644 index 0000000000000000000000000000000000000000..d55be9d25d8b4402a6f414acf96dd3dcf23cad13 --- /dev/null +++ b/arch/arm64/boot/dts/seco/seco-px30-d23-revc-hdmi-lvds.dts @@ -0,0 +1,246 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd + */ + +/dts-v1/; +#include "seco-px30-d23-revc.dtsi" + +/ { + model = "Seco D23 PX30 - HDMI + LVDS video output RevC"; + compatible = "rockchip,linux", "rockchip,rk3326"; + + chosen { + bootargs = "swiotlb=1 console=ttyFIQ0 rw rootwait board_revC-HDMI"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm1 0 25000 0>; + brightness-levels = < + 0 1 2 3 4 5 6 7 + 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22 23 + 24 25 26 27 28 29 30 31 + 32 33 34 35 36 37 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 + 64 65 66 67 68 69 70 71 + 72 73 74 75 76 77 78 79 + 80 81 82 83 84 85 86 87 + 88 89 90 91 92 93 94 95 + 96 97 98 99 100 101 102 103 + 104 105 106 107 108 109 110 111 + 112 113 114 115 116 117 118 119 + 120 121 122 123 124 125 126 127 + 128 129 130 131 132 133 134 135 + 136 137 138 139 140 141 142 143 + 144 145 146 147 148 149 150 151 + 152 153 154 155 156 157 158 159 + 160 161 162 163 164 165 166 167 + 168 169 170 171 172 173 174 175 + 176 177 178 179 180 181 182 183 + 184 185 186 187 188 189 190 191 + 192 193 194 195 196 197 198 199 + 200 201 202 203 204 205 206 207 + 208 209 210 211 212 213 214 215 + 216 217 218 219 220 221 222 223 + 224 225 226 227 228 229 230 231 + 232 233 234 235 236 237 238 239 + 240 241 242 243 244 245 246 247 + 248 249 250 251 252 253 254 255>; + default-brightness-level = <200>; + /*enable-gpios=<&gpio0 15 GPIO_ACTIVE_HIGH>*/ + }; + + panel_lvds { + compatible = "samsung,lsl070nl01", "simple-panel"; + backlight = <&backlight>; + power-supply = <&vcc3v3_lcd>; + enable-delay-ms = <20>; + prepare-delay-ms = <20>; + unprepare-delay-ms = <20>; + disable-delay-ms = <20>; + bus-format = <MEDIA_BUS_FMT_RGB666_1X7X3_SPWG>; + + width-mm = <217>; + height-mm = <136>; + + display-timings { + native-mode = <&timing0>; + + timing0: timing0 { + clock-frequency = <51000000>; + hactive = <1024>; + vactive = <600>; + hback-porch = <90>; + hfront-porch = <90>; + vback-porch = <10>; + vfront-porch = <10>; + hsync-len = <90>; + vsync-len = <10>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + }; + + port { + panel_in_lvds: endpoint { + remote-endpoint = <&lvds_out_panel>; + }; + }; + }; + + panel_rgb { + compatible = "simple-panel"; + backlight = <&backlight>; + enable-delay-ms = <120>; + prepare-delay-ms = <20>; + unprepare-delay-ms = <20>; + disable-delay-ms = <20>; + bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>; + + width-mm = <154>; + height-mm = <86>; + + display-timings { + native-mode = <&timing1>; + + timing1: timing1 { + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hback-porch = <80>; + hfront-porch = <80>; + vback-porch = <18>; + vfront-porch = <20>; + hsync-len = <80>; + vsync-len = <7>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + + timing2: timing2 { + clock-frequency = <148500000>; + hactive = <1920>; + vactive = <1080>; + hback-porch = <90>; + hfront-porch = <90>; + vback-porch = <10>; + vfront-porch = <10>; + hsync-len = <90>; + vsync-len = <10>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + + timing3: timing3 { + clock-frequency = <106500000>; + hactive = <1440>; + vactive = <900>; + hback-porch = <232>; + hfront-porch = <80>; + hsync-len = <152>; + vback-porch = <3>; + vfront-porch = <25>; + vsync-len = <6>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + }; + + }; + + port { + panel_in_rgb: endpoint { + remote-endpoint = <&rgb_out_panel>; + }; + }; + }; +}; + +&lvds { + status = "okay"; + + ports { + port@1 { + reg = <1>; + + lvds_out_panel: endpoint { + remote-endpoint = <&panel_in_lvds>; + }; + }; + }; +}; + +&rgb { + status = "okay"; + + ports { + port@1 { + reg = <1>; + + rgb_out_panel: endpoint { + remote-endpoint = <&panel_in_rgb>; + }; + }; + }; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <400000>; + + tda19988: tda19988@70 { + compatible = "udoo,tda19988"; + reg = <0x70>; + video-ports = <0x234501>; + status = "okay"; + }; +}; + +&dmc { + auto-freq-en = <0>; +}; + +&lvds_in_vopb { + status = "okay"; +}; + +&lvds_in_vopl { + status = "disabled"; +}; + +&rgb_in_vopb { + status = "disabled"; +}; + +&rgb_in_vopl { + status = "okay"; +}; + +&vopl { + status = "okay"; +}; + +&route_rgb { + connect = <&vopl_out_rgb>; + status = "okay"; +}; + +&video_phy { + status = "okay"; +}; + +&route_lvds { + connect = <&vopb_out_lvds>; + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/seco/seco-px30-d23-revc.dtsi b/arch/arm64/boot/dts/seco/seco-px30-d23-revc.dtsi index c518a53a596a4c8ac26dd0d5a6d862b92fc6d223..d6610f9cd17910815578980bd500a49a577cf383 100644 --- a/arch/arm64/boot/dts/seco/seco-px30-d23-revc.dtsi +++ b/arch/arm64/boot/dts/seco/seco-px30-d23-revc.dtsi @@ -120,6 +120,105 @@ regulator-max-microvolt = <5000000>; }; + vdd_m2: vdd_m2 { + compatible = "regulator-fixed"; + regulator-name = "vdd_m2"; + enable-active-high; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; + }; + + reg_1p8v_run_en: reg_1p8v_run_en { + compatible = "regulator-fixed"; + regulator-name = "reg_1p8v_run_en"; + enable-active-high; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; + }; + + usb1_pwr_en: usb1_pwr_en { + compatible = "regulator-fixed"; + regulator-boot-on; + regulator-always-on; + regulator-name = "usb1_pwr_en"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio_expanderA_u32 2 GPIO_ACTIVE_LOW>; + }; + + usb2_pwr_en: usb2_pwr_en { + compatible = "regulator-fixed"; + regulator-boot-on; + regulator-always-on; + regulator-name = "usb2_pwr_en"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio_expanderA_u32 3 GPIO_ACTIVE_LOW>; + }; + + usb3_pwr_en: usb3_pwr_en { + compatible = "regulator-fixed"; + regulator-boot-on; + regulator-always-on; + regulator-name = "usb3_pwr_en"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio_expanderA_u32 4 GPIO_ACTIVE_LOW>; + }; + + usb4_pwr_en: usb4_pwr_en { + compatible = "regulator-fixed"; + regulator-boot-on; + regulator-always-on; + regulator-name = "usb3_pwr_en"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio_expanderA_u32 5 GPIO_ACTIVE_LOW>; + }; + + pcie_rst: pcie_rst { + compatible = "regulator-fixed"; + regulator-boot-on; + regulator-always-on; + regulator-name = "pcie_rst"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + gpio = <&gpio_expanderA_u32 13 GPIO_ACTIVE_HIGH>; + }; + + vdd_m2_enabler: en_vdd-m2 { + compatible = "reg-userspace-consumer"; + regulator-name = "en_vdd-m2"; + regulator-supplies = "vdd_m2"; + vdd_m2-supply = <&vdd_m2>; + regulator-boot-on; + }; + + reg_1p8v_enabler: reg_1p8v_enabler { + compatible = "reg-userspace-consumer"; + regulator-name = "en_1p8v_run"; + regulator-supplies = "reg_1p8v_run_en"; + reg_1p8v_run_en-supply = <®_1p8v_run_en>; + regulator-boot-on; + }; + + vbus_pwr_enabler: vbus_pwr_enabler { + compatible = "reg-userspace-consumer"; + regulator-boot-on; + regulator-name = "vbus_pwr_enabler"; + regulator-supplies = "usb1_pwr_en", "usb2_pwr_en", "usb3_pwr_en", "usb4_pwr_en", "hub_usb_rst"; + usb1_pwr_en-supply = <&usb1_pwr_en>; + usb2_pwr_en-supply = <&usb2_pwr_en>; + usb3_pwr_en-supply = <&usb3_pwr_en>; + usb4_pwr_en-supply = <&usb4_pwr_en>; + }; + sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; @@ -132,6 +231,26 @@ reset-gpios = <&gpio_expanderA_u32 10 GPIO_ACTIVE_LOW>; }; + rk809_sound: rk809-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,rk809-codec"; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,widgets = + "Microphone", "Mic Jack", + "Headphone", "Headphone Jack"; + simple-audio-card,routing = + "Mic Jack", "MICBIAS1", + "IN1P", "Mic Jack", + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + simple-audio-card,cpu { + sound-dai = <&i2s1_2ch>; + }; + simple-audio-card,codec { + sound-dai = <&rk809_codec>; + }; + }; }; &bus_apll { @@ -234,9 +353,9 @@ assigned-clocks = <&cru SCLK_GMAC>; assigned-clock-parents = <&gmac_clkin>; clock_in_out = "input"; - phy-mode = "rmii"; - pinctrl-names = "default"; - pinctrl-0 = <&rmii_pins ð_phy_pwr>; + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rmii_pins &mac_refclk ð_phy_pwr ð_phy_int>; snps,reset-gpio = <&gpio2 RK_PB3 GPIO_ACTIVE_LOW>; snps,reset-active-low; snps,reset-delays-us = <0 100000 100000>; @@ -250,7 +369,7 @@ &spi0 { status = "okay"; - max-freq = <48000000>; +// max-freq = <48000000>; pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>; pinctrl-1 = <&spi0_clk_hs &spi0_csn &spi0_miso_hs &spi0_mosi_hs>; spi_dev@0 { @@ -268,6 +387,7 @@ &i2c0 { status = "okay"; + clock-frequency = <400000>; rk809: pmic@20 { compatible = "rockchip,rk809"; @@ -510,6 +630,7 @@ vcc3v3_lcd: SWITCH_REG1 { regulator-boot-on; + regulator-always-on; regulator-name = "vcc3v3_lcd"; }; @@ -519,19 +640,36 @@ regulator-name = "vcc5v0_host"; }; }; + + rk809_codec: codec { + #sound-dai-cells = <0>; + compatible = "rockchip,rk809-codec", "rockchip,rk817-codec"; + clocks = <&cru SCLK_I2S1_OUT>; + clock-names = "mclk"; + pinctrl-names = "default"; + pinctrl-0 = <&i2s1_2ch_mclk>; + hp-volume = <20>; + spk-volume = <3>; + status = "okay"; + }; }; }; &i2c1 { status = "okay"; clock-frequency = <400000>; - /*rtc pcf8563 i2c0-->i2c1*/ rtc@51 { - compatible = "nxp,pcf8563"; + compatible = "nxp,pcf85063"; reg = <0x51>; }; + at24@52 { + compatible = "at24,24aa025"; + pagesize = <256>; + reg = <0x52>; + }; + gpio_expanderA_u32: pcal6416@20 { compatible = "nxp,pcal6416"; reg = <0x20>; @@ -540,7 +678,7 @@ gpio-base = <256>; gpio-controller; #gpio-cells = <2>; - reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; // interrupt-parent = <&gpio4>; // interrupts = <16 0x2>; interrupt-controller; @@ -555,7 +693,7 @@ gpio-base = <272>; gpio-controller; #gpio-cells = <2>; - reset-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; +// reset-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>; interrupt-parent = <&gpio0>; interrupts = <RK_PA3 0x2>; interrupt-controller; @@ -648,11 +786,16 @@ &sdio { bus-width = <4>; + sd-uhs-sdr12; sd-uhs-sdr25; + sd-uhs-sdr50; + sd-uhs-sdr104; + mmc-hs200-1_8v; supports-sdio; ignore-pm-notify; keep-power-in-suspend; non-removable; + cap-sdio-irq; mmc-pwrseq = <&sdio_pwrseq>; status = "okay"; }; @@ -664,16 +807,16 @@ status = "okay"; }; -/*change to uart0 debug*/ +&i2s1_2ch { + status = "okay"; + #sound-dai-cells = <0>; +}; + &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_xfer /*&uart0_cts &uart0_rts*/>; status = "okay"; }; &uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&uart1_xfer /*&uart1_cts &uart1_rts*/>; status = "okay"; }; @@ -756,6 +899,11 @@ }; }; + eth_int { + eth_phy_int: eth_phy_int { + rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_input>; + }; + }; i2c_pcal6416a_u32 { pinctrl_pcal6416a_u32: pinctrl_pcal6416a_u32 { @@ -772,6 +920,20 @@ }; }; + i2s1 { + i2s1_2ch_bus: i2s1-2ch-bus { + rockchip,pins = + <2 RK_PC1 RK_FUNC_1 &pcfg_pull_none>, + <2 RK_PC2 RK_FUNC_1 &pcfg_pull_none>, + <2 RK_PC4 RK_FUNC_1 &pcfg_pull_none>, + <2 RK_PC5 RK_FUNC_1 &pcfg_pull_none>; + }; + + i2s_8ch_mclk: i2s-8ch-mclk { + rockchip,pins = <2 RK_PC3 RK_FUNC_1 &pcfg_pull_none>; + }; + }; + lcd_vdd_gpio { lcd_vdd_gpio_en: lcd_vdd_gpio_en { rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; diff --git a/arch/arm64/configs/seco_px30_d23-linux_defconfig b/arch/arm64/configs/seco_px30_d23-linux_defconfig index 5804ce263fcabf8d39de26b39164977eb7f14e28..f4a1ce68f84af5e8dc369c306585de7845e90236 100644 --- a/arch/arm64/configs/seco_px30_d23-linux_defconfig +++ b/arch/arm64/configs/seco_px30_d23-linux_defconfig @@ -409,7 +409,7 @@ CONFIG_LEDS_GPIO=y CONFIG_LEDS_IS31FL32XX=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_RK808=y -CONFIG_RTC_DRV_PCF8563=y +CONFIG_RTC_DRV_PCF85063=y CONFIG_DMADEVICES=y CONFIG_PL330_DMA=y CONFIG_STAGING=y