123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864 |
- #include <dt-bindings/input/input.h>
- #include "rk3399.dtsi"
- #include "rk3399-op1-opp.dtsi"
- / {
- aliases {
- mmc0 = &sdmmc;
- mmc1 = &sdhci;
- };
- chosen {
- stdout-path = "serial2:115200n8";
- };
-
- ppvar_sys: ppvar-sys {
- compatible = "regulator-fixed";
- regulator-name = "ppvar_sys";
- regulator-always-on;
- regulator-boot-on;
- };
- pp1200_lpddr: pp1200-lpddr {
- compatible = "regulator-fixed";
- regulator-name = "pp1200_lpddr";
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- vin-supply = <&ppvar_sys>;
- };
- pp1800: pp1800 {
- compatible = "regulator-fixed";
- regulator-name = "pp1800";
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- vin-supply = <&ppvar_sys>;
- };
- pp3300: pp3300 {
- compatible = "regulator-fixed";
- regulator-name = "pp3300";
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- vin-supply = <&ppvar_sys>;
- };
- pp5000: pp5000 {
- compatible = "regulator-fixed";
- regulator-name = "pp5000";
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- vin-supply = <&ppvar_sys>;
- };
- ppvar_bigcpu_pwm: ppvar-bigcpu-pwm {
- compatible = "pwm-regulator";
- regulator-name = "ppvar_bigcpu_pwm";
- pwms = <&pwm1 0 3337 0>;
- pwm-supply = <&ppvar_sys>;
- pwm-dutycycle-range = <100 0>;
- pwm-dutycycle-unit = <100>;
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <800107>;
- regulator-max-microvolt = <1302232>;
- };
- ppvar_bigcpu: ppvar-bigcpu {
- compatible = "vctrl-regulator";
- regulator-name = "ppvar_bigcpu";
- regulator-min-microvolt = <800107>;
- regulator-max-microvolt = <1302232>;
- ctrl-supply = <&ppvar_bigcpu_pwm>;
- ctrl-voltage-range = <800107 1302232>;
- regulator-settling-time-up-us = <322>;
- };
- ppvar_litcpu_pwm: ppvar-litcpu-pwm {
- compatible = "pwm-regulator";
- regulator-name = "ppvar_litcpu_pwm";
- pwms = <&pwm2 0 3337 0>;
- pwm-supply = <&ppvar_sys>;
- pwm-dutycycle-range = <100 0>;
- pwm-dutycycle-unit = <100>;
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <797743>;
- regulator-max-microvolt = <1307837>;
- };
- ppvar_litcpu: ppvar-litcpu {
- compatible = "vctrl-regulator";
- regulator-name = "ppvar_litcpu";
- regulator-min-microvolt = <797743>;
- regulator-max-microvolt = <1307837>;
- ctrl-supply = <&ppvar_litcpu_pwm>;
- ctrl-voltage-range = <797743 1307837>;
- regulator-settling-time-up-us = <384>;
- };
- ppvar_gpu_pwm: ppvar-gpu-pwm {
- compatible = "pwm-regulator";
- regulator-name = "ppvar_gpu_pwm";
- pwms = <&pwm0 0 3337 0>;
- pwm-supply = <&ppvar_sys>;
- pwm-dutycycle-range = <100 0>;
- pwm-dutycycle-unit = <100>;
-
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <786384>;
- regulator-max-microvolt = <1217747>;
- };
- ppvar_gpu: ppvar-gpu {
- compatible = "vctrl-regulator";
- regulator-name = "ppvar_gpu";
- regulator-min-microvolt = <786384>;
- regulator-max-microvolt = <1217747>;
- ctrl-supply = <&ppvar_gpu_pwm>;
- ctrl-voltage-range = <786384 1217747>;
- regulator-settling-time-up-us = <390>;
- };
-
- pp900_ddrpll: pp900-ap {
- };
-
- pp900_pll: pp900-ap {
- };
-
- pp900_pmu: pp900-ap {
- };
-
- pp1800_ap_io: pp1800_emmc: pp1800_nfc: pp1800_s0: pp1800 {
- };
-
- pp1800_avdd: pp1800 {
- };
-
- pp1800_lid: pp1800_mic: pp1800 {
- };
-
- pp1800_lpddr: pp1800 {
- };
-
- pp1800_pmu: pp1800 {
- };
-
- pp1800_usb: pp1800 {
- };
- pp3000_sd_slot: pp3000-sd-slot {
- compatible = "regulator-fixed";
- regulator-name = "pp3000_sd_slot";
- pinctrl-names = "default";
- pinctrl-0 = <&sd_slot_pwr_en>;
- enable-active-high;
- gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
- vin-supply = <&pp3000>;
- };
-
- ppvar_sd_card_io: ppvar-sd-card-io {
- compatible = "regulator-gpio";
- regulator-name = "ppvar_sd_card_io";
- pinctrl-names = "default";
- pinctrl-0 = <&sd_io_pwr_en &sd_pwr_1800_sel>;
- enable-active-high;
- enable-gpio = <&gpio2 2 GPIO_ACTIVE_HIGH>;
- gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
- states = <1800000 0x1>,
- <3000000 0x0>;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <3000000>;
- };
-
- pp3300_trackpad: pp3300-trackpad {
- };
-
- pp5000_usb_a_vbus: pp5000 {
- };
- ap_rtc_clk: ap-rtc-clk {
- compatible = "fixed-clock";
- clock-frequency = <32768>;
- clock-output-names = "xin32k";
- #clock-cells = <0>;
- };
- max98357a: max98357a {
- compatible = "maxim,max98357a";
- pinctrl-names = "default";
- pinctrl-0 = <&sdmode_en>;
- sdmode-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
- sdmode-delay = <2>;
- #sound-dai-cells = <0>;
- status = "okay";
- };
- sound: sound {
- compatible = "rockchip,rk3399-gru-sound";
- rockchip,cpu = <&i2s0 &spdif>;
- };
- };
- &cdn_dp {
- status = "okay";
- };
- &cluster0_opp {
- opp05 {
- opp-suspend;
- };
- };
- &cluster1_opp {
- opp06 {
- opp-suspend;
- };
- };
- &cpu_l0 {
- cpu-supply = <&ppvar_litcpu>;
- };
- &cpu_l1 {
- cpu-supply = <&ppvar_litcpu>;
- };
- &cpu_l2 {
- cpu-supply = <&ppvar_litcpu>;
- };
- &cpu_l3 {
- cpu-supply = <&ppvar_litcpu>;
- };
- &cpu_b0 {
- cpu-supply = <&ppvar_bigcpu>;
- };
- &cpu_b1 {
- cpu-supply = <&ppvar_bigcpu>;
- };
- &cru {
- assigned-clocks =
- <&cru PLL_GPLL>, <&cru PLL_CPLL>,
- <&cru PLL_NPLL>,
- <&cru ACLK_PERIHP>, <&cru HCLK_PERIHP>,
- <&cru PCLK_PERIHP>,
- <&cru ACLK_PERILP0>, <&cru HCLK_PERILP0>,
- <&cru PCLK_PERILP0>, <&cru ACLK_CCI>,
- <&cru HCLK_PERILP1>, <&cru PCLK_PERILP1>,
- <&cru ACLK_VIO>, <&cru ACLK_HDCP>,
- <&cru ACLK_GIC_PRE>,
- <&cru PCLK_DDR>;
- assigned-clock-rates =
- <600000000>, <800000000>,
- <1000000000>,
- <150000000>, <75000000>,
- <37500000>,
- <100000000>, <100000000>,
- <50000000>, <800000000>,
- <100000000>, <50000000>,
- <400000000>, <400000000>,
- <200000000>,
- <200000000>;
- };
- &dfi {
- status = "okay";
- };
- &dmc {
- status = "okay";
- rockchip,pd-idle-ns = <160>;
- rockchip,sr-idle-ns = <10240>;
- rockchip,sr-mc-gate-idle-ns = <40960>;
- rockchip,srpd-lite-idle-ns = <61440>;
- rockchip,standby-idle-ns = <81920>;
- rockchip,ddr3_odt_dis_freq = <666000000>;
- rockchip,lpddr3_odt_dis_freq = <666000000>;
- rockchip,lpddr4_odt_dis_freq = <666000000>;
- rockchip,sr-mc-gate-idle-dis-freq-hz = <1000000000>;
- rockchip,srpd-lite-idle-dis-freq-hz = <0>;
- rockchip,standby-idle-dis-freq-hz = <928000000>;
- };
- &dmc_opp_table {
- opp03 {
- opp-suspend;
- };
- };
- &emmc_phy {
- status = "okay";
- };
- &gpu {
- mali-supply = <&ppvar_gpu>;
- status = "okay";
- };
- ap_i2c_ts: &i2c3 {
- status = "okay";
- clock-frequency = <400000>;
-
- i2c-scl-falling-time-ns = <50>;
- i2c-scl-rising-time-ns = <300>;
- };
- ap_i2c_audio: &i2c8 {
- status = "okay";
- clock-frequency = <400000>;
-
- i2c-scl-falling-time-ns = <50>;
- i2c-scl-rising-time-ns = <300>;
- codec: da7219@1a {
- compatible = "dlg,da7219";
- reg = <0x1a>;
- interrupt-parent = <&gpio1>;
- interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&cru SCLK_I2S_8CH_OUT>;
- clock-names = "mclk";
- dlg,micbias-lvl = <2600>;
- dlg,mic-amp-in-sel = "diff";
- pinctrl-names = "default";
- pinctrl-0 = <&headset_int_l>;
- VDD-supply = <&pp1800>;
- VDDMIC-supply = <&pp3300>;
- VDDIO-supply = <&pp1800>;
- da7219_aad {
- dlg,adc-1bit-rpt = <1>;
- dlg,btn-avg = <4>;
- dlg,btn-cfg = <50>;
- dlg,mic-det-thr = <500>;
- dlg,jack-ins-deb = <20>;
- dlg,jack-det-rate = "32ms_64ms";
- dlg,jack-rem-deb = <1>;
- dlg,a-d-btn-thr = <0xa>;
- dlg,d-b-btn-thr = <0x16>;
- dlg,b-c-btn-thr = <0x21>;
- dlg,c-mic-btn-thr = <0x3E>;
- };
- };
- };
- &i2s0 {
- status = "okay";
- };
- &io_domains {
- status = "okay";
- audio-supply = <&pp1800_audio>;
- bt656-supply = <&pp1800_ap_io>;
- gpio1830-supply = <&pp3000_ap>;
- sdmmc-supply = <&ppvar_sd_card_io>;
- };
- &pcie0 {
- status = "okay";
- ep-gpios = <&gpio2 27 GPIO_ACTIVE_HIGH>;
- pinctrl-names = "default";
- pinctrl-0 = <&pcie_clkreqn_cpm>, <&wifi_perst_l>;
- vpcie3v3-supply = <&pp3300_wifi_bt>;
- vpcie1v8-supply = <&wlan_pd_n>;
- vpcie0v9-supply = <&pp900_pcie>;
- pci_rootport: pcie@0,0 {
- reg = <0x0000 0 0 0 0>;
- #address-cells = <3>;
- #size-cells = <2>;
- ranges;
- };
- };
- &pcie_phy {
- status = "okay";
- };
- &pmu_io_domains {
- status = "okay";
- pmu1830-supply = <&pp1800_pmu>;
- };
- &pwm0 {
- status = "okay";
- };
- &pwm1 {
- status = "okay";
- };
- &pwm2 {
- status = "okay";
- };
- &pwm3 {
- status = "okay";
- };
- &sdhci {
-
- assigned-clock-rates = <150000000>;
- bus-width = <8>;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
- non-removable;
- status = "okay";
- };
- &sdmmc {
- status = "okay";
-
- pinctrl-names = "default";
- pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_cd_pin
- &sdmmc_bus4>;
- bus-width = <4>;
- cap-mmc-highspeed;
- cap-sd-highspeed;
- cd-gpios = <&gpio4 24 GPIO_ACTIVE_LOW>;
- disable-wp;
- sd-uhs-sdr12;
- sd-uhs-sdr25;
- sd-uhs-sdr50;
- sd-uhs-sdr104;
- vmmc-supply = <&pp3000_sd_slot>;
- vqmmc-supply = <&ppvar_sd_card_io>;
- };
- &spdif {
- status = "okay";
-
- /delete-property/ pinctrl-0;
- /delete-property/ pinctrl-names;
- };
- &spi1 {
- status = "okay";
- pinctrl-names = "default", "sleep";
- pinctrl-1 = <&spi1_sleep>;
- flash@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
-
- spi-max-frequency = <10000000>;
- };
- };
- &spi2 {
- status = "okay";
- };
- &spi5 {
- status = "okay";
- cros_ec: ec@0 {
- compatible = "google,cros-ec-spi";
- reg = <0>;
- interrupt-parent = <&gpio0>;
- interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&ec_ap_int_l>;
- spi-max-frequency = <3000000>;
- i2c_tunnel: i2c-tunnel {
- compatible = "google,cros-ec-i2c-tunnel";
- google,remote-bus = <4>;
- #address-cells = <1>;
- #size-cells = <0>;
- };
- usbc_extcon0: extcon0 {
- compatible = "google,extcon-usbc-cros-ec";
- google,usb-port-id = <0>;
- };
- };
- };
- &tsadc {
- status = "okay";
- rockchip,hw-tshut-mode = <1>;
- rockchip,hw-tshut-polarity = <1>;
- };
- &tcphy0 {
- status = "okay";
- extcon = <&usbc_extcon0>;
- };
- &u2phy0 {
- status = "okay";
- };
- &u2phy0_host {
- status = "okay";
- };
- &u2phy1_host {
- status = "okay";
- };
- &u2phy0_otg {
- status = "okay";
- };
- &u2phy1_otg {
- status = "okay";
- };
- &uart2 {
- status = "okay";
- };
- &usb_host0_ohci {
- status = "okay";
- };
- &usbdrd3_0 {
- status = "okay";
- extcon = <&usbc_extcon0>;
- };
- &usbdrd_dwc3_0 {
- status = "okay";
- dr_mode = "host";
- };
- &vopb {
- status = "okay";
- };
- &vopb_mmu {
- status = "okay";
- };
- &vopl {
- status = "okay";
- };
- &vopl_mmu {
- status = "okay";
- };
- #include <arm/cros-ec-keyboard.dtsi>
- #include <arm/cros-ec-sbs.dtsi>
- &pinctrl {
-
- pinctrl-names = "default";
- pinctrl-0 = <
- &ap_pwroff /* AP will auto-assert this when in S3 */
- &clk_32k /* This pin is always 32k on gru boards */
- >;
- pcfg_output_low: pcfg-output-low {
- output-low;
- };
- pcfg_output_high: pcfg-output-high {
- output-high;
- };
- pcfg_pull_none_8ma: pcfg-pull-none-8ma {
- bias-disable;
- drive-strength = <8>;
- };
- backlight-enable {
- bl_en: bl-en {
- rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- cros-ec {
- ec_ap_int_l: ec-ap-int-l {
- rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
- discrete-regulators {
- sd_io_pwr_en: sd-io-pwr-en {
- rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO
- &pcfg_pull_none>;
- };
- sd_pwr_1800_sel: sd-pwr-1800-sel {
- rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO
- &pcfg_pull_none>;
- };
- sd_slot_pwr_en: sd-slot-pwr-en {
- rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO
- &pcfg_pull_none>;
- };
- };
- codec {
-
- headset_int_l: headset-int-l {
- rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- mic_int: mic-int {
- rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
- };
- };
- max98357a {
- sdmode_en: sdmode-en {
- rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_down>;
- };
- };
- pcie {
- pcie_clkreqn_cpm: pci-clkreqn-cpm {
-
- rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- sdmmc {
-
- sdmmc_bus4: sdmmc-bus4 {
- rockchip,pins =
- <4 RK_PB0 1 &pcfg_pull_none_8ma>,
- <4 RK_PB1 1 &pcfg_pull_none_8ma>,
- <4 RK_PB2 1 &pcfg_pull_none_8ma>,
- <4 RK_PB3 1 &pcfg_pull_none_8ma>;
- };
- sdmmc_clk: sdmmc-clk {
- rockchip,pins =
- <4 RK_PB4 1 &pcfg_pull_none_8ma>;
- };
- sdmmc_cmd: sdmmc-cmd {
- rockchip,pins =
- <4 RK_PB5 1 &pcfg_pull_none_8ma>;
- };
-
- sdmmc_cd: sdmmc-cd {
- rockchip,pins =
- <0 RK_PA7 1 &pcfg_pull_none>;
- };
-
- sdmmc_cd_pin: sdmmc-cd-pin {
- rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- spi1 {
- spi1_sleep: spi1-sleep {
-
- rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_down>,
- <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>,
- <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>,
- <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
- };
- };
- touchscreen {
- touch_int_l: touch-int-l {
- rockchip,pins = <3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- touch_reset_l: touch-reset-l {
- rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- trackpad {
- ap_i2c_tp_pu_en: ap-i2c-tp-pu-en {
- rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_output_high>;
- };
- trackpad_int_l: trackpad-int-l {
- rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
- wifi: wifi {
- wlan_module_reset_l: wlan-module-reset-l {
- rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- bt_host_wake_l: bt-host-wake-l {
-
- rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
- write-protect {
- ap_fw_wp: ap-fw-wp {
- rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
- };
- };
- };
|