recipes-bsp/device-tree/files/ac7020c-user.dtsi

/*
 * ALINX AC7020C — custom device-tree additions.
 * Ported from the PetaLinux meta-user system-user.dtsi for the AMD EDF (SDT) flow.
 *
 * The SDT-generated Linux domain DTS provides the labels used here:
 *   &spi1, &qspi, &gpio0 (PS), &timing_controller_0 (PL).
 */

/* timing_controller_0 (PL AXI peripheral @ 0x43C00000) → generic UIO */
&timing_controller_0 {
    status = "okay";
    compatible = "generic-uio", "uio";
};

/* --- SPI1: 4× MCP42010 digital potentiometers via EMIO GPIO chip-selects --- */
&spi1 {
    status = "okay";
    num-cs = <4>;

    /*
     * 4 chip-select lines via PS EMIO GPIO (emio-gpio-width = 4):
     *   gpio 54 -> xvlt_cs[0] (U17,  channel 1)
     *   gpio 55 -> xvlt_cs[1] (P19,  channel 2)
     *   gpio 56 -> xvlt_cs[2] (V15,  channel 3)
     *   gpio 57 -> xvlt_cs[3] (W14,  channel 4)
     * third cell 1 = GPIO_ACTIVE_LOW
     */
    cs-gpios = <&gpio0 54 1>,
               <&gpio0 55 1>,
               <&gpio0 56 1>,
               <&gpio0 57 1>;

    pot0: spidev@0 {
        compatible = "rohm,dh2228fv";
        reg = <0>;
        spi-max-frequency = <10000000>;
    };

    pot1: spidev@1 {
        compatible = "rohm,dh2228fv";
        reg = <1>;
        spi-max-frequency = <10000000>;
    };

    pot2: spidev@2 {
        compatible = "rohm,dh2228fv";
        reg = <2>;
        spi-max-frequency = <10000000>;
    };

    pot3: spidev@3 {
        compatible = "rohm,dh2228fv";
        reg = <3>;
        spi-max-frequency = <10000000>;
    };
};

/* --- QSPI: Winbond W25Q256BV (32 MB) partitions --- */
&qspi {
    compatible = "xlnx,zynq-qspi-1.0";
    status = "okay";
    #address-cells = <1>;
    #size-cells = <0>;

    flash@0 {
        compatible = "jedec,spi-nor";
        reg = <0>;
        spi-max-frequency = <50000000>;
        #address-cells = <1>;
        #size-cells = <1>;

        partition@0 {
            label = "qspi-boot";
            reg = <0x0 0x500000>;
        };
        partition@1 {
            label = "qspi-bootenv";
            reg = <0x500000 0x20000>;
        };
        partition@2 {
            label = "qspi-kernel";
            reg = <0x520000 0x1A80000>;
        };
    };
};