/dts-v1/; /* * Decompiled, and cleaned up device tree file for the X6200. * Thanks from #linux-sunxi @ OFTC (https://oftc.net/) */ #include "sun8i-a33.dtsi" #include #include / { model = "XIEGU Tech X6200 Transceiver"; compatible = "xiegu,x6200", "allwinner,sun8i-r16"; aliases { serial0 = "/soc/serial@1c28000"; mmc0 = &mmc0; mmc2 = &mmc2; }; chosen { stdout-path = "serial0:115200n8"; }; reserved-memory { #address-cells = <1>; #size-cells = <1>; ranges; mali_cma: cma@4a000000 { compatible = "shared-dma-pool"; size = <0x8000000>; alloc-ranges = <0x4a000000 0x8000000>; reusable; linux,cma-default; }; }; mmc1_pwrseq: mmc1-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&pio 2 0 GPIO_ACTIVE_LOW>; /* PC0 (?) */ }; mmc2_pwrseq: mmc2-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&pio 2 0x10 GPIO_ACTIVE_LOW>; }; reg_usb0_vbus: usb0_vbus { compatible = "regulator-fixed"; regulator-name = "usb0_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; status = "okay"; }; reg_usb1_vbus: usb1_vbus { compatible = "regulator-fixed"; regulator-name = "usb1_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-boot-on; enable-active-high; gpio = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; status = "okay"; }; reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; reg_vcc5v0: vcc5v0 { compatible = "regulator-fixed"; regulator-name = "vcc5v0"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; backlight: backlight { compatible = "pwm-backlight"; power-supply = <®_vcc5v0>; // perhaps - replace with original 50000 pwms = <&pwm 0 10000000 0>; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; default-brightness-level = <5>; enable-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ }; spi { compatible = "spi-gpio"; #address-cells = <1>; #size-cells = <0>; sck-gpios = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */ mosi-gpios = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ cs-gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ num-chipselects = <1>; status = "okay"; panel@0 { compatible = "jinglitai,jlt4013a"; reg = <0>; power-supply = <®_vcc3v3>; reset-gpios = <&r_pio 0 11 GPIO_ACTIVE_LOW>; /* PL11 */ dcx-gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ backlight = <&backlight>; spi-max-frequency = <100000>; port { panel_input: endpoint { remote-endpoint = <&tcon0_out_panel>; }; }; }; }; matrix_keypad { compatible = "gpio-matrix-keypad"; row-gpios = <&pio 6 10 0x17>, <&pio 6 7 0x17>, /* PG6-PG10 */ <&pio 6 6 0x17>, <&pio 6 8 0x17>, <&pio 6 9 0x17>; col-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>, /* PE11-PE17 */ <&pio 4 17 GPIO_ACTIVE_LOW>, <&pio 4 11 GPIO_ACTIVE_LOW>, <&pio 4 14 GPIO_ACTIVE_LOW>, <&pio 4 12 GPIO_ACTIVE_LOW>, <&pio 4 13 GPIO_ACTIVE_LOW>; linux,keymap = ; gpio-activelow; wakeup-source; linux,no-autorepeat; debounce-delay-ms = <25>; col-scan-delay-us = <1>; drive-inactive-cols; }; rotary0 { // Main compatible = "rotary-encoder"; gpios = <&pio 1 2 GPIO_ACTIVE_LOW>, /* PB2 */ <&pio 1 3 GPIO_ACTIVE_LOW>; /* PB3 */ linux,axis = <0>; rotary-encoder,encoding = "gray"; rotary-encoder,relative-axis; pinctrl-names = "default"; pinctrl-0 = <&rotary_1_pins>; }; rotary1 { // VOL compatible = "rotary-encoder"; gpios = <&pio 1 6 GPIO_ACTIVE_LOW>, <&pio 1 4 GPIO_ACTIVE_LOW>; linux,axis = <1>; rotary-encoder,encoding = "gray"; rotary-encoder,relative-axis; pinctrl-names = "default"; pinctrl-0 = <&rotary_2_pins>; }; rotary2 { // MFK outer compatible = "rotary-encoder"; gpios = <&pio 1 5 GPIO_ACTIVE_LOW>, <&pio 1 7 GPIO_ACTIVE_LOW>; linux,axis = <2>; rotary-encoder,encoding = "gray"; rotary-encoder,relative-axis; rotary-encoder,steps-per-period = <2>; pinctrl-names = "default"; pinctrl-0 = <&rotary_3_pins>; }; rotary3 { // MFK inner compatible = "rotary-encoder"; gpios = <&pio 6 0 GPIO_ACTIVE_LOW>, <&pio 6 1 GPIO_ACTIVE_LOW>; linux,axis = <3>; rotary-encoder,encoding = "gray"; rotary-encoder,relative-axis; rotary-encoder,steps-per-period = <2>; pinctrl-names = "default"; pinctrl-0 = <&rotary_4_pins>; }; }; &de { status = "okay"; }; &codec { status = "okay"; }; &dai { status = "okay"; }; &ehci0 { status = "okay"; }; &i2c0 { status = "okay"; compatible = "allwinner,sun6i-a31-i2c"; reg = <0x1c2ac00 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C0>; // clock-frequency = <100000>; resets = <&ccu RST_BUS_I2C0>; }; &i2c0_pins { function = "i2c0"; }; &i2c1 { status = "okay"; compatible = "allwinner,sun6i-a31-i2c"; reg = <0x1c2b000 0x400>; interrupts = ; clocks = <&ccu CLK_BUS_I2C1>; // clock-frequency = <100000>; resets = <&ccu RST_BUS_I2C1>; rtc@51 { compatible = "nxp,pcf8563"; reg = <0x51>; interrupt-parent = <&pio>; interrupts = <6 13 IRQ_TYPE_EDGE_FALLING>; /* PG13 */ interrupt-names = "irq"; irq-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; }; }; &i2c1_pins { function = "i2c1"; }; &mmc0 { status = "okay"; vmmc-supply = <®_dcdc1>; cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ bus-width = <4>; }; &mmc1 { status = "disabled"; }; &mmc2 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&mmc2_8bit_pins>; vmmc-supply = <®_dcdc1>; mmc-pwrseq = <&mmc2_pwrseq>; bus-width = <8>; non-removable; cap-mmc-hw-reset; }; &ohci0 { status = "okay"; }; &pio { vcc-pb-supply = <®_vcc3v3>; vcc-pc-supply = <®_vcc3v3>; vcc-pd-supply = <®_vcc3v3>; vcc-pe-supply = <®_vcc3v3>; vcc-pf-supply = <®_vcc3v3>; vcc-pg-supply = <®_vcc3v3>; vcc-ph-supply = <®_vcc3v3>; vcc-pl-supply = <®_vcc3v3>; uart3_pins: uart3-pins { pins = "PH6", "PH7"; function = "uart3"; }; usb0_id_detect_pin0: usb0_id_detect_pin@0 { pins = "PH8"; function = "gpio_in"; bias-pull-up; }; usb0_vbus_detect_pin0: usb0_vbus_detect_pin@0 { pins = "PH9"; function = "gpio_in"; bias-pull-down; }; rotary_1_pins: rotary-1-pins { pins = "PB2", "PB3"; function = "gpio_in"; bias-pull-up; }; rotary_2_pins: rotary-2-pins { pins = "PB4", "PB6"; function = "gpio_in"; bias-pull-up; }; rotary_3_pins: rotary-3-pins { pins = "PB5", "PB7"; function = "gpio_in"; bias-pull-up; }; rotary_4_pins: rotary-4-pins { pins = "PG0", "PG1"; function = "gpio_in"; bias-pull-up; }; }; &pwm { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pwm0_pin>; }; &r_rsb { status = "okay"; axp22x: pmic@3a3 { compatible = "x-powers,axp223"; reg = <0x3a3>; interrupt-parent = <&r_intc>; interrupts = ; eldoin-supply = <®_dcdc1>; interrupt-controller; #interrupt-cells = <1>; }; }; #include "axp223.dtsi" &ac_power_supply { status = "okay"; }; &battery_power_supply { status = "okay"; }; ®_dcdc1 { regulator-name = "vcc-3v0"; regulator-always-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; ®_dcdc2 { regulator-name = "vdd-sys"; regulator-always-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1400000>; }; ®_dcdc3 { regulator-name = "vdd-cpu"; regulator-always-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1400000>; }; ®_dcdc4 { regulator-name = "vdd-gpu"; regulator-min-microvolt = <700000>; regulator-max-microvolt = <1100000>; }; ®_dcdc5 { regulator-name = "vcc-dram"; regulator-always-on; regulator-min-microvolt = <1500000>; regulator-max-microvolt = <1500000>; }; ®_dc1sw { regulator-name = "vcc-lcd"; regulator-always-on; }; ®_dc5ldo { regulator-name = "vdd-cpus"; regulator-always-on; regulator-min-microvolt = <900000>; regulator-max-microvolt = <1400000>; }; ®_aldo1 { regulator-name = "vcc-io"; regulator-always-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; ®_aldo2 { regulator-name = "vdd-dll"; regulator-always-on; regulator-min-microvolt = <2350000>; regulator-max-microvolt = <2650000>; }; ®_aldo3 { regulator-name = "vcc-pll-avcc"; regulator-always-on; regulator-min-microvolt = <2700000>; regulator-max-microvolt = <3300000>; }; ®_dldo1 { regulator-name = "vcc-wifi0"; regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; ®_dldo2 { regulator-name = "vcc-wifi1"; regulator-always-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; ®_dldo3 { regulator-name = "vcc-3v0-csi"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; ®_eldo1 { regulator-name = "vcc-1v2-hsic"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; }; ®_eldo2 { regulator-name = "vcc-dsp"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; ®_eldo3 { regulator-name = "eldo3"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; }; ®_rtc_ldo { regulator-always-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-name = "rtc_ldo"; }; ®_drivevbus { regulator-name = "usb0-vbus"; status = "okay"; }; &r_uart { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&r_uart_pins_a>; }; &sound { simple-audio-card,routing = "Left DAC", "AIF1 Slot 0 Left", "Right DAC", "AIF1 Slot 0 Right", "AIF1 Slot 0 Left ADC", "Left ADC", "AIF1 Slot 0 Right ADC", "Right ADC"; status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; status = "okay"; }; &tcon0_out { tcon0_out_panel: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; }; &uart0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>; }; &uart3 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>; }; &usb_otg { dr_mode = "host"; status = "okay"; }; &usbphy { status = "okay"; usb0_id_det-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ usb0_vbus_power-supply = <&usb_power_supply>; usb0_vbus-supply = <®_usb0_vbus>; usb1_vbus-supply = <®_usb1_vbus>; pinctrl-names = "default"; pinctrl-0 = <&usb0_id_detect_pin0>; }; &usb_power_supply { status = "okay"; }; &dphy { status = "okay"; };