// SPDX-License-Identifier: (GPL-2.0 OR MIT) /* Copyright (c) 2021 StarFive Technology Co., Ltd. */ /dts-v1/; #include "jh7100.dtsi" #include #include #include #include / { model = "BeagleV Starlight Beta"; compatible = "beagle,beaglev-starlight-jh7100", "starfive,jh7100"; aliases { mshc0 = &sdio0; mshc1 = &sdio1; serial0 = &uart3; serial1 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; cpus { timebase-frequency = <6250000>; }; memory@80000000 { device_type = "memory"; reg = <0x0 0x80000000 0x2 0x0>; }; leds { compatible = "gpio-leds"; led-ack { gpios = <&gpio 43 GPIO_ACTIVE_HIGH>; color = ; function = LED_FUNCTION_HEARTBEAT; linux,default-trigger = "heartbeat"; label = "ack"; }; }; reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; linux,cma { compatible = "shared-dma-pool"; reusable; size = <0x0 0x28000000>; alignment = <0x0 0x1000>; alloc-ranges = <0x0 0xa0000000 0x0 0x28000000>; linux,cma-default; }; jpu_reserved: framebuffer@c9000000 { reg = <0x0 0xc9000000 0x0 0x4000000>; }; nvdla_reserved: framebuffer@d0000000 { no-map; reg = <0x0 0xd0000000 0x0 0x28000000>; }; vin_reserved: framebuffer@f9000000 { compatible = "shared-dma-pool"; no-map; reg = <0x0 0xf9000000 0x0 0x1000000>; }; sffb_reserved: framebuffer@fb000000 { compatible = "shared-dma-pool"; no-map; reg = <0x0 0xfb000000 0x0 0x2000000>; }; }; wifi_pwrseq: wifi-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpio 37 GPIO_ACTIVE_LOW>; }; }; &gmac { snps,reset-gpios = <&gpio 63 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&gmac_pins>; }; &gpio { /* don't reset gpio mux for serial console on uart3 */ starfive,keep-gpiomux = <13 14>; gmac_pins: gmac-0 { gtxclk-pins { pins = ; bias-pull-up; drive-strength = <35>; input-enable; input-schmitt-enable; slew-rate = <0>; }; miitxclk-pins { pins = ; bias-pull-up; drive-strength = <14>; input-enable; input-schmitt-disable; slew-rate = <0>; }; tx-pins { pins = , , , , , , , , ; bias-pull-up; drive-strength = <35>; input-disable; input-schmitt-disable; slew-rate = <0>; }; rxclk-pins { pins = ; bias-pull-up; drive-strength = <14>; input-enable; input-schmitt-disable; slew-rate = <6>; }; rxer-pins { pins = ; bias-pull-up; drive-strength = <14>; input-enable; input-schmitt-disable; slew-rate = <0>; }; rx-pins { pins = , , , , , , , , , , , , ; bias-pull-up; drive-strength = <14>; input-enable; input-schmitt-enable; slew-rate = <0>; }; }; i2c0_pins: i2c0-0 { i2c-pins { pinmux = , ; bias-disable; /* external pull-up */ input-enable; input-schmitt-enable; }; }; i2c1_pins: i2c1-0 { i2c-pins { pinmux = , ; bias-pull-up; input-enable; input-schmitt-enable; }; }; i2c2_pins: i2c2-0 { i2c-pins { pinmux = , ; bias-disable; /* external pull-up */ input-enable; input-schmitt-enable; }; }; pwm_pins: pwm-0 { pwm-pins { pinmux = , , ; bias-disable; drive-strength = <35>; input-disable; input-schmitt-disable; slew-rate = <0>; }; }; sdio0_pins: sdio0-0 { clk-pins { pinmux = ; bias-disable; input-disable; input-schmitt-disable; }; sdio-pins { pinmux = , , , , , ; bias-pull-up; input-enable; input-schmitt-enable; }; }; sdio1_pins: sdio1-0 { clk-pins { pinmux = ; bias-disable; input-disable; input-schmitt-disable; }; sdio-pins { pinmux = , , , , ; bias-pull-up; input-enable; input-schmitt-enable; }; }; spi2_pins: spi2-0 { mosi-pin { pinmux = ; bias-disable; input-disable; input-schmitt-disable; }; miso-pin { pinmux = ; bias-pull-up; input-enable; input-schmitt-enable; }; sck-pin { pinmux = ; bias-disable; input-disable; input-schmitt-disable; }; ss-pins { pinmux = , ; bias-disable; input-disable; input-schmitt-disable; }; }; uart0_pins: uart0-0 { rx-pins { pinmux = , ; bias-pull-up; input-enable; input-schmitt-enable; }; tx-pins { pinmux = , ; bias-disable; input-disable; input-schmitt-disable; }; }; uart3_pins: uart3-0 { rx-pins { pinmux = ; bias-pull-up; drive-strength = <14>; input-enable; input-schmitt-enable; slew-rate = <0>; }; tx-pins { pinmux = ; bias-disable; drive-strength = <35>; input-disable; input-schmitt-disable; slew-rate = <0>; }; }; }; &i2c0 { clock-frequency = <100000>; i2c-sda-hold-time-ns = <300>; i2c-sda-falling-time-ns = <500>; i2c-scl-falling-time-ns = <500>; pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; imx219@10 { compatible = "imx219"; reg = <0x10>; clocks = <&clk_ext_camera>; clock-names = "xclk"; // powerdown-gpio = <&gpio 21 GPIO_ACTIVE_HIGH>; reset-gpio = <&gpio 58 GPIO_ACTIVE_HIGH>; //DOVDD-supply = <&v2v8>; rotation = <0>; port { /* CSI2 bus endpoint */ imx219_to_csi2rx0: endpoint { remote-endpoint = <&csi2rx0_from_imx219>; bus-type = <4>; /* MIPI CSI-2 D-PHY */ clock-lanes = <0>; data-lanes = <1 2>; link-frequencies = /bits/ 64 <456000000>; }; }; }; pmic@5e { compatible = "ti,tps65086"; reg = <0x5e>; gpio-controller; #gpio-cells = <2>; regulators { }; }; tda998x@70 { compatible = "nxp,tda998x"; reg = <0x70>; port { tda998x_0_input: endpoint { remote-endpoint = <&hdmi_out>; }; }; }; }; &i2c1 { clock-frequency = <400000>; i2c-sda-hold-time-ns = <300>; i2c-sda-falling-time-ns = <100>; i2c-scl-falling-time-ns = <100>; pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; status = "okay"; ac108_a: ac108@3b { compatible = "x-power,ac108_0"; reg = <0x3b>; #sound-dai-cells = <0>; data-protocol = <0>; }; wm8960: codec@1a { compatible = "wlf,wm8960"; reg = <0x1a>; #sound-dai-cells = <0>; wlf,shared-lrclk; }; seeed_plane_i2c@45 { compatible = "seeed_panel"; reg = <0x45>; }; /* TODO: ov5640 and sc2235 used on EVB board, not support on starlight board, remove it here?*/ ov5640: ov5640@3c { compatible = "ovti,ov5640"; reg = <0x3c>; clocks = <&clk_ext_camera>; clock-names = "xclk"; powerdown-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; //DOVDD-supply = <&v2v8>; rotation = <180>; port { // Parallel bus endpoint ov5640_to_parallel: endpoint { remote-endpoint = <¶llel_from_ov5640>; bus-type = <5>; // Parallel bus-width = <8>; data-shift = <2>; // lines 9:2 are used hsync-active = <0>; vsync-active = <1>; pclk-sample = <1>; }; }; }; sc2235@30 { compatible = "sc2235"; reg = <0x30>; clocks = <&clk_ext_camera>; clock-names = "xclk"; powerdown-gpios = <&gpio 27 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; //DOVDD-supply = <&v2v8>; port { // Parallel bus endpoint sc2235_to_parallel: endpoint { remote-endpoint = <¶llel_from_sc2235>; bus-type = <5>; // Parallel bus-width = <8>; data-shift = <2>; // lines 13:6 are used hsync-active = <1>; vsync-active = <1>; pclk-sample = <1>; }; }; }; }; &i2c2 { clock-frequency = <100000>; i2c-sda-hold-time-ns = <300>; i2c-sda-falling-time-ns = <500>; i2c-scl-falling-time-ns = <500>; pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins>; status = "okay"; seeed_plane_i2c@45 { compatible = "seeed_panel"; reg = <0x45>; port { panel_dsi_port: endpoint { remote-endpoint = <&dsi_out_port>; }; }; }; imx219sub@10 { compatible = "imx219"; reg = <0x10>; clocks = <&clk_ext_camera>; clock-names = "xclk"; // powerdown-gpio = <&gpio 21 GPIO_ACTIVE_HIGH>; reset-gpio = <&gpio 57 GPIO_ACTIVE_HIGH>; //DOVDD-supply = <&v2v8>; rotation = <0>; port { /* CSI2 bus endpoint */ imx219_to_csi2rx1: endpoint { remote-endpoint = <&csi2rx1_from_imx219>; bus-type = <4>; /* MIPI CSI-2 D-PHY */ clock-lanes = <0>; data-lanes = <1 2>; link-frequencies = /bits/ 64 <456000000>; }; }; }; }; &osc_sys { clock-frequency = <25000000>; }; &osc_aud { clock-frequency = <27000000>; }; &ptc { pinctrl-names = "default"; pinctrl-0 = <&pwm_pins>; status = "okay"; }; &qspi { nor_flash: nor-flash@0 { compatible = "spi-flash"; reg = <0>; spi-max-frequency = <31250000>; page-size = <256>; block-size = <16>; cdns,read-delay = <4>; cdns,tshsl-ns = <1>; cdns,tsd2d-ns = <1>; cdns,tchsh-ns = <1>; cdns,tslch-ns = <1>; spi-tx-bus-width = <1>; spi-rx-bus-width = <1>; }; nand_flash: nand-flash@1 { compatible = "spi-flash-nand"; reg = <1>; spi-max-frequency = <31250000>; page-size = <2048>; block-size = <17>; cdns,read-delay = <4>; cdns,tshsl-ns = <1>; cdns,tsd2d-ns = <1>; cdns,tchsh-ns = <1>; cdns,tslch-ns = <1>; spi-tx-bus-width = <1>; spi-rx-bus-width = <1>; }; }; &sdio0 { broken-cd; bus-width = <4>; cap-sd-highspeed; pinctrl-names = "default"; pinctrl-0 = <&sdio0_pins>; status = "okay"; }; &sdio1 { #address-cells = <1>; #size-cells = <0>; bus-width = <4>; cap-sd-highspeed; cap-sdio-irq; cap-power-off-card; max-frequency = <10000000>; mmc-pwrseq = <&wifi_pwrseq>; non-removable; pinctrl-names = "default"; pinctrl-0 = <&sdio1_pins>; status = "okay"; wifi@1 { compatible = "brcm,bcm4329-fmac"; reg = <1>; }; }; &sfivefb { status = "okay"; pp1 { pp-id = <1>; fifo-out; src-format = ; src-width = <1920>; src-height = <1080>; dst-format = ; dst-width = <1920>; dst-height = <1080>; }; tda_998x_1080p { compatible = "starfive,display-dev"; panel_name = "tda_998x_1080p"; panel_lcd_id = <22>; /* 1080p */ interface_info = "rgb_interface"; refresh_en = <1>; bits-per-pixel = <16>; physical-width = <62>; physical-height = <114>; panel-width = <1920>; panel-height = <1080>; pixel-clock = <78000000>; /*dyn_fps;*/ /*dynamic frame rate support*/ /*.flags = PREFER_CMD_SEND_MONOLITHIC | CE_CMD_SEND_MONOLITHIC | RESUME_WITH_PREFER | RESUME_WITH_CE*/ /*gamma-command-monolithic;*/ /*ce-command-monolithic;*/ /*resume-with-gamma;*/ /*resume-with-ce;*/ /*mipi info*/ mipi-byte-clock = <78000>; mipi-escape-clock = <13000>; lane-no = <4>; display_mode = "video_mode"; /*video_mode, command_mode*/ /* auto_stop_clklane_en; im_pin_val;*/ color_bits = ; /*is_18bit_loosely;*/ /*video mode info*/ h-pulse-width = <44>; h-back-porch = <148>; h-front-porch = <88>; v-pulse-width = <5>; v-back-porch = <36>; v-front-porch = <4>; status = "okay"; sync_pol = "vsync_high_act"; /*vsync_high_act, hsync_high_act*/ lp_cmd_en; /*lp_hfp_en;*/ /*lp_hbp_en;*/ /*lp_vact_en;*/ lp_vfp_en; lp_vbp_en; lp_vsa_en; traffic-mode = "burst_with_sync_pulses"; /*non_burst_with_sync_pulses, non_burst_with_sync_events*/ /*phy info*/ data_tprepare = /bits/ 8 <0>; data_hs_zero = /bits/ 8 <0>; data_hs_exit = /bits/ 8 <0>; data_hs_trail = /bits/ 8 <0>; /*te info*/ te_source = "external_pin"; /*external_pin, dsi_te_trigger*/ te_trigger_mode = "rising_edge"; /*rising_edge, high_1000us*/ te_enable = <0>; cm_te_effect_sync_enable = <0>; /*used in command mode*/ te_count_per_sec = <64>; /*used in esd*/ /*ext info*/ /* crc_rx_en; ecc_rx_en; eotp_rx_en; */ eotp_tx_en; dev_read_time = <0x7fff>; /*type cmd return_count return_code*/ /*id_read_cmd_info = [];*/ /*pre_id_cmd = [];*/ /*esd_read_cmd_info = [DCS_CMD 0A 01 9C];*/ /*pre_esd_cmd = [];*/ /*panel-on-command = [];*/ /*panel-off-command = [];*/ /*reset-sequence = <1 5>, <0 10>, <1 30>;*/ /* panel-gamma-warm-command = [ ]; panel-gamma-nature-command = [ ]; panel-gamma-cool-command = [ ]; panel-ce-std-command = [ ]; panel-ce-vivid-command = [ ]; */ }; seeed_5_inch { compatible = "starfive,display-dev"; panel_name = "seeed_5_inch"; panel_lcd_id = <22>; /* 480p */ interface_info = "mipi_interface"; refresh_en = <1>; bits-per-pixel = <24>; physical-width = <62>; physical-height = <114>; panel-width = <800>; panel-height = <480>; pixel-clock = <27500000>; /*dyn_fps;*/ /*dynamic frame rate support*/ fps = <50>; /*.flags = PREFER_CMD_SEND_MONOLITHIC | CE_CMD_SEND_MONOLITHIC | RESUME_WITH_PREFER | RESUME_WITH_CE*/ /*gamma-command-monolithic;*/ /*ce-command-monolithic;*/ /*resume-with-gamma;*/ /*resume-with-ce;*/ /*mipi info*/ mipi-byte-clock = <78000>; mipi-escape-clock = <13000>; lane-no = <1>; display_mode = "video_mode"; /*video_mode, command_mode*/ /* auto_stop_clklane_en; im_pin_val; */ color_bits = ; /*is_18bit_loosely;*/ /*video mode info*/ h-pulse-width = <10>; h-back-porch = <20>; h-front-porch = <50>; v-pulse-width = <5>; v-back-porch = <5>; v-front-porch = <135>; /*seeed panel mode info*/ dphy_bps = <700000000>; dsi_burst_mode = <0>; dsi_sync_pulse = <1>; // bytes dsi_hsa = <30>; dsi_hbp = <211>; dsi_hfp = <159>; // lines dsi_vsa = <5>; dsi_vbp = <5>; dsi_vfp = <134>; status = "okay"; sync_pol = "vsync_high_act"; /*vsync_high_act, hsync_high_act*/ lp_cmd_en; /*lp_hfp_en;*/ /*lp_hbp_en;*/ /*lp_vact_en;*/ lp_vfp_en; lp_vbp_en; lp_vsa_en; traffic-mode = "burst_with_sync_pulses"; /*non_burst_with_sync_pulses, non_burst_with_sync_events*/ /*phy info*/ data_tprepare = /bits/ 8 <0>; data_hs_zero = /bits/ 8 <0>; data_hs_exit = /bits/ 8 <0>; data_hs_trail = /bits/ 8 <0>; /*te info*/ te_source = "external_pin"; /*external_pin, dsi_te_trigger*/ te_trigger_mode = "rising_edge"; /*rising_edge, high_1000us*/ te_enable = <0>; cm_te_effect_sync_enable = <0>; /*used in command mode*/ te_count_per_sec = <64>; /*used in esd*/ /*ext info*/ /* crc_rx_en; ecc_rx_en; eotp_rx_en; */ eotp_tx_en; dev_read_time = <0x7fff>; /*type cmd return_count return_code*/ /*id_read_cmd_info = [];*/ /*pre_id_cmd = [];*/ /*esd_read_cmd_info = [DCS_CMD 0A 01 9C];*/ /*pre_esd_cmd = [];*/ /*panel-on-command = [];*/ /*panel-off-command = [];*/ /*reset-sequence = <1 5>, <0 10>, <1 30>;*/ /* panel-gamma-warm-command = [ ]; panel-gamma-nature-command = [ ]; panel-gamma-cool-command = [ ]; panel-ce-std-command = [ ]; panel-ce-vivid-command = [ ]; */ }; }; &spi2 { pinctrl-names = "default"; pinctrl-0 = <&spi2_pins>; status = "okay"; spi_dev0: spi@0 { compatible = "rohm,dh2228fv"; spi-max-frequency = <10000000>; reg = <0>; }; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins>; status = "okay"; }; &uart3 { pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>; status = "okay"; }; &usb3 { dr_mode = "host"; status = "okay"; }; /* #include "codecs/sf_pdm.dtsi" */ /* #include "codecs/sf_spdif.dtsi" */ /* #include "codecs/sf_ac108.dtsi" */ /* #include "codecs/sf_wm8960.dtsi" */ /* #include "codecs/sf_vad.dtsi" */