Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- #include "ipq5018.dtsi"
- #include "ipq5018-ess.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- #include <dt-bindings/leds/common.h>
- / {
- model = "Unifi Express UX/UXG Lite";
- compatible = "unifi,express-ux", "qcom,ipq5018";
- aliases {
- ethernet0 = &dp1;
- ethernet1 = &dp2;
- led-boot = &led_system_blue;
- led-failsafe = &led_system_red;
- led-running = &led_system_blue;
- led-upgrade = &led_system_red;
- serial0 = &blsp1_uart1;
- };
- chosen {
- bootargs-append = " root=/dev/ubiblock0_0 coherent_pool=2M";
- stdout-path = "serial0:115200n8";
- };
- keys {
- compatible = "gpio-keys";
- pinctrl-0 = <&button_pins>;
- pinctrl-names = "default";
- wps-button {
- label = "wps";
- gpios = <&tlmm 27 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_WPS_BUTTON>;
- };
- reset-button {
- label = "reset";
- gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
- leds {
- compatible = "pwm-leds";
- led_system_red: red {
- color = <LED_COLOR_ID_RED>;
- function = LED_FUNCTION_POWER;
- pwms = <&pwm 3 1250000>;
- max-brightness = <255>;
- };
- green {
- color = <LED_COLOR_ID_GREEN>;
- function = LED_FUNCTION_POWER;
- pwms = <&pwm 0 1250000>;
- max-brightness = <255>;
- };
- led_system_blue: blue {
- color = <LED_COLOR_ID_BLUE>;
- function = LED_FUNCTION_POWER;
- pwms = <&pwm 1 1250000>;
- max-brightness = <255>;
- };
- };
- reserved-memory {
- q6_mem_regions: q6_mem_regions@4b000000 {
- no-map;
- reg = <0x0 0x4b000000 0x0 0x3000000>;
- };
- };
- };
- &sleep_clk {
- clock-frequency = <32000>;
- };
- &xo_board_clk {
- clock-frequency = <24000000>;
- };
- &blsp1_uart1 {
- status = "okay";
- pinctrl-0 = <&serial_0_pins>;
- pinctrl-names = "default";
- };
- &crypto {
- status = "okay";
- };
- &cryptobam {
- status = "okay";
- };
- &prng {
- status = "okay";
- };
- &pwm {
- status = "okay";
- #pwm-cells = <2>;
- pinctrl-0 = <&pwm_pins>;
- pinctrl-names = "default";
- };
- &qfprom {
- status = "okay";
- };
- &qpic_bam {
- status = "okay";
- };
- &qpic_nand {
- pinctrl-0 = <&qpic_pins>;
- pinctrl-names = "default";
- status = "okay";
- partitions {
- status = "disabled";
- };
- nand@0 {
- compatible = "spi-nand";
- reg = <0>;
- #address-cells = <1>;
- #size-cells = <1>;
- nand-ecc-engine = <&qpic_nand>;
- nand-ecc-strength = <8>;
- nand-ecc-step-size = <512>;
- nand-bus-width = <8>;
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- partition-sbl1@0 {
- label = "SBL1";
- reg = <0x00000000 0x30000>;
- read-only;
- };
- partition-mibib@30000 {
- label = "MIBIB";
- reg = <0x00030000 0x10000>;
- read-only;
- };
- partition-bootconfig@40000 {
- label = "BOOTCONFIG";
- reg = <0x00040000 0x100000>;
- read-only;
- };
- partition-qsee@50000 {
- label = "QSEE";
- reg = <0x00050000 0xa0000>;
- read-only;
- };
- partition-devcfg@f0000 {
- label = "DEVCFG";
- reg = <0x000f0000 0x10000>;
- read-only;
- };
- partition-cdt@100000 {
- label = "CDT";
- reg = <0x00100000 0x10000>;
- read-only;
- };
- partition-appsblenv@110000 {
- label = "APPSBLENV";
- reg = <0x00110000 0x10000>;
- read-only;
- };
- partition-appsbl@120000 {
- label = "APPSBL";
- reg = <0x00120000 0xa0000>;
- read-only;
- };
- partition-art@1c0000 {
- label = "ART";
- reg = <0x001c0000 0x70000>;
- read-only;
- nvmem-layout {
- compatible = "fixed-layout";
- #address-cells = <1>;
- #size-cells = <1>;
- mac_base: mac-address@33000 {
- reg = <0x0 0x6>;
- };
- };
- };
- partition-eeprom@230000 {
- label = "EEPROM";
- reg = <0x00230000 0x10000>;
- read-only;
- };
- partition-config@240000 {
- label = "config";
- reg = <0x00240000 0x5c0000>;
- };
- };
- };
- };
- /*
- * =================================================================
- * _______________________ _______________________
- * | IPQ5018 | | |
- * | +------+ +--------+ | | +------+ |
- * | | MAC0 |---| GE Phy |-+--- MDI ---+ | MAC | |
- * | +------+ +--------+ | | +------+ |
- * | | |_______________________|
- * | | _______________________
- * | | | QCA8081 |
- * | +------+ +--------+ | | +--------+ +------+ |
- * | | MAC1 |---| Uniphy |-+-- SGMII+--+ | Phy |---| MAC | |
- * | +------+ +--------+ | | +--------+ +------+ |
- * |_______________________| |_______________________|
- *
- * =================================================================
- */
- &switch {
- status = "okay";
- switch_mac_mode = <MAC_MODE_SGMII_CHANNEL0>;
- qcom,port_phyinfo {
- // MAC0 -> GE Phy
- port@0 {
- port_id = <1>;
- mdiobus = <&mdio0>;
- phy_address = <7>;
- };
- // MAC1 -> Uniphy --- SGMII --- QCA8081
- port@1 {
- port_id = <2>;
- mdiobus = <&mdio1>;
- phy_address = <28>;
- port_mac_sel = "QGMAC_PORT";
- };
- };
- };
- // MAC0 -> GE Phy
- &dp1 {
- status = "okay";
- nvmem-cells = <&mac_addr>;
- nvmem-cell-names = "mac-address";
- };
- // MAC1 ---SGMII---> QCA8081
- &dp2 {
- status = "okay";
- label = "wan";
- phy-handle = <&qca8081>;
- nvmem-cells = <&mac_base>;
- nvmem-cell-names = "mac-address";
- };
- &mdio0 {
- status = "okay";
- };
- &mdio1 {
- status = "okay";
- pinctrl-0 = <&mdio1_pins>;
- pinctrl-names = "default";
- // QCA8081 Phy -> WAN
- qca8081: ethernet-phy@28 {
- compatible = "ethernet-phy-id004d.d101";
- reg = <28>;
- reset-deassert-us = <10000>;
- reset-gpios = <&tlmm 24 GPIO_ACTIVE_LOW>;
- };
- };
- &tlmm {
- button_pins: button-state {
- pins = "gpio27", "gpio28";
- function = "gpio";
- drive-strength = <8>;
- bias-pull-up;
- };
- mdio1_pins: mdio-state {
- mdc-pins {
- pins = "gpio36";
- function = "mdc";
- drive-strength = <8>;
- bias-pull-up;
- };
- mdio-pins {
- pins = "gpio37";
- function = "mdio";
- drive-strength = <8>;
- bias-pull-up;
- };
- };
- pwm_pins: pwm-state {
- mux_1 {
- pins = "gpio1";
- function = "pwm1";
- drive-strength = <8>;
- };
- mux_2 {
- pins = "gpio30";
- function = "pwm3";
- drive-strength = <8>;
- };
- mux_3 {
- pins = "gpio46";
- function = "pwm0";
- drive-strength = <8>;
- };
- };
- qpic_pins: qpic-state {
- clock-pins {
- pins = "gpio9";
- function = "qspi_clk";
- drive-strength = <8>;
- bias-disable;
- };
- cs-pins {
- pins = "gpio8";
- function = "qspi_cs";
- drive-strength = <8>;
- bias-disable;
- };
- data-pins {
- pins = "gpio4", "gpio5", "gpio6", "gpio7";
- function = "qspi_data";
- drive-strength = <8>;
- bias-disable;
- };
- };
- serial_0_pins: uart0-state {
- pins = "gpio20", "gpio21";
- function = "blsp0_uart0";
- bias-disable;
- };
- };
- &tsens {
- status = "okay";
- };
- &pcie0_phy {
- status = "okay";
- };
- &pcie0 {
- status = "okay";
- perst-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;
- bridge@0,0 {
- reg = <0x00000000 0 0 0 0>;
- #address-cells = <3>;
- #size-cells = <2>;
- ranges;
- wifi@1,0 {
- status = "okay";
- /* QCN9074: ath11k lacks DT compatible for PCI cards */
- compatible = "pci17cb,1104";
- reg = <0x00010000 0 0 0 0>;
- qcom,ath11k-calibration-variant = "Unifi-Express-UX";
- };
- };
- };
- &q6v5_wcss {
- status = "okay";
- memory-region = <&q6_mem_regions>;
- firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
- "ath11k/IPQ5018/hw1.0/m3_fw.mdt";
- // IPQ5018
- q6_wcss_pd1: pd-1 {
- firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt";
- resets =
- <&gcc GCC_WCSSAON_RESET>,
- <&gcc GCC_WCSS_BCR>,
- <&gcc GCC_CE_BCR>;
- reset-names =
- "wcss_aon_reset",
- "wcss_reset",
- "ce_reset";
- clocks =
- <&gcc GCC_WCSS_AHB_S_CLK>,
- <&gcc GCC_WCSS_ACMT_CLK>,
- <&gcc GCC_WCSS_AXI_M_CLK>;
- clock-names =
- "gcc_wcss_ahb_s_clk",
- "gcc_wcss_acmt_clk",
- "gcc_wcss_axi_m_clk";
- interrupts-extended =
- <&wcss_smp2p_in 8 0>,
- <&wcss_smp2p_in 9 0>,
- <&wcss_smp2p_in 12 0>,
- <&wcss_smp2p_in 11 0>;
- interrupt-names =
- "fatal",
- "ready",
- "spawn-ack",
- "stop-ack";
- qcom,smem-states =
- <&wcss_smp2p_out 8>,
- <&wcss_smp2p_out 9>,
- <&wcss_smp2p_out 10>;
- qcom,smem-state-names =
- "shutdown",
- "stop",
- "spawn";
- };
- };
- &wifi0 {
- // IPQ5018
- qcom,rproc = <&q6_wcss_pd1>;
- qcom,ath11k-calibration-variant = "Unifi-Express-UX";
- qcom,ath11k-fw-memory-mode = <2>;
- qcom,bdf-addr = <0x4c400000>;
- status = "okay";
- };
Advertisement
Add Comment
Please, Sign In to add comment