Skip to content

piSmasher Tips

t-kuha edited this page Nov 6, 2022 · 21 revisions

Power State

  • Check if LED 3, 4, 6 & 9 are turned on
Part POWER EN POWER GOOD
Zynq PS MIO 20 MIO 21
Conn. J/P3-11 J/P3-13
  • Device tree

    Add the following entry:
    / {
        power_en_reg: fixed-regulator-powen {
            compatible = "regulator-fixed";
            regulator-name = "power-en-regulator";
            gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            startup-delay-us = <70000>;
            regulator-always-on;
            enable-active-high;
        };
    };
    

I2C

  • Vivado block design

    • Enable "I2C1" in corresponding MIO24 & 25 in Zynq Processing System
  • Connections:

Part I2C SDA I2C SCL
Zynq PS MIO 24 MIO 25
Conn. J/P3-17 J/P3-19
PCA9306 Pin 3 Pin 4
TDA19988 Pin 51 Pin 52
TDA19971 Pin 27 Pin 26

HDMI TX

  • I2C address of TDA19988 (HDMI transmitter): 0x36

  • Control lines:

Part EN HS VS DE INT LLC (CLK)
Zynq PS MIO52 - - - MIO22 -
Zynq PL - Y19 Y18 P19 - N18
Conn. J/P3-2 JB/PB2-30 JB/PB2-32 JB/PB2-36 J/P3-14 JB/PB2-38
TDA19988 - Pin 20 Pin 22 Pin 21 Pin 50 Pin 4
TPS22954 Pin 4 - - - - -

HDMI RX

  • I2C address of TDA19971 (HDMI receiver)

    • HDMI Receiver Registers: 0x48
    • Asynchronous Module Registers: 0x34
  • Control lines:

Part EN HS VS DE INT LLC (CLK)
Zynq PS MIO53 - - - MIO23 -
Zynq PL - G17 G18 H17 - H16
Conn. J/P3-4 JA/PA1-32 JA/PA1-30 JA/PA1-36 J/P3-12 JA/PA1-38
TXS0108 Pin 10 - - - - -
TDA19971 - Pin 28 Pin 29 Pin 30 PIN 25 Pin 31
  • Audio
Part SCLK LRCLK S0 S1 S2 S3
Zynq PS - - - - - -
Zynq PL K14 J14 H18 F17 E17 D18
Conn. JA/PA2-20 JA/PA2-18 JA/PA1-37 JC/PC1-13 JC/PC1-17 JC/PC1-19
TXS0108 Pin A/B6 Pin A/B5 Pin A/B4 Pin A/B3 Pin A/B2 Pin A/B1
TDA19971 Pin 66 Pin 67 Pin 68 Pin 69 PIN 70 Pin 71

USB

  • Vivado block design

    • 1: Enable "USB 0" of Zynq Processing System
    • 2: Check GPIO 16 in "USB PHY Reset" (this is used to reset USB3315 (USB2.0 transceiver) & USB2514 (Hub IC))
  • Linux Kernel configuration

    • Enable USB_HUB_USB251XB
    • Optional: Enable FUSE_FS to support exFAT file system
  • Device tree

    Add the following entry:
    #include <dt-bindings/gpio/gpio.h>
    / {
        /* USB */
        usb_phy0: phy0 {
            compatible = "usb-nop-xceiv";
            /*compatible = "ulpi-phy";*/
            #phy-cells = <0>;
            view-port = <0x170>;
            drv-vbus;
        };
    };
    
    &i2c1 {
        status = "okay";
        clock-frequency = <100000>;
        #address-cells = <1>;
        #size-cells = <0>;
    
        usb2514b@2c {
            compatible = "microchip,usb2514b";
            reg = <0x2c>;
            reset-gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
        };
    };
    
    &usb0 {
        status = "okay";
        dr_mode = "host";
        usb-phy = <&usb_phy0>;
    };
    
  • Plug a USB device (ex. Thumb drive) to one of USB ports & check if LED7 is turned on (orange)

Ethernet

  • Ethernet 0 (ETH1)
    • PHY address: 0x0
Part NRST CLK MDIO MDC INTN PTP
Zynq PS MIO19 L16 J15 L17 MIO26 J20
Conn. J/P3-6 JA/PA2-35 JA/PA2-4 JA/PA2-37 J/P3-20 JA/PA1-29
88E15 12 6 5 4 8 9
Part RXCLK RXDV RXDO RXD1 RXD2 RXD3
Zynq PS U18 U19 V15 W15 Y16 Y17
Conn. JB/PB1-38 JB/PB1-36 JB/PB1-32 JB/PB1-30 JB/PB1-26 JB/PB1-24
88E15 40 37 38 39 41 42
Part TXCLK TXEN TXDO TXD1 TXD2 TXD3
Zynq PS U13 T15 V12 W13 T12 U12
Conn. JB/PB1-17 JB/PB1-18 JB/PB1-14 JB/PB1-12 JB/PB1-8 JB/PB1-6
88E15 47 2 44 45 48 1
  • Ethernet 1 (ETH2)
    • PHY address: 0x0
Part NRST CLK MDIO MDC INTN PTP
Zynq PS MIO17 K17 T19 J18 MIO27 H20
Conn. J/P3-7 JA/PA2-38 JB/PB1-4 JA/PA1-35 J/P3-18 JA/PA1-31
88E15 12 6 5 4 8 9
Part RXCLK RXDV RXDO RXD1 RXD2 RXD3
Zynq PS U14 U15 Y14 W14 U17 T16
Conn. JB/PB1-35 JB/PB1-37 JB/PB1-31 JB/PB1-29 JB/PB1-25 JB/PB1-23
88E15 40 37 38 39 41 42
Part TXCLK TXEN TXDO TXD1 TXD2 TXD3
Zynq PS V13 T14 R14 P14 T10 T11
Conn. JB/PB1-19 JB/PB1-20 JB/PB1-13 JB/PB1-11 JB/PB1-7 JB/PB1-5
88E15 47 2 44 45 48 1
  • Device tree: TODO

Audio

  • Audio Codec: TLV320AIC3104 (Texas Instruments)

  • I2C address: 0x18

Part NRST SCL SDA DIN DOUT BCLK WCLK MCLK
Zynq PS MIO18 MIO24 MIO25 - - - - -
Zynq PL - - - V20 W20 P20 G14 N20
Conn. J/P3-8 J/P3-17 J/P3-19 JB/PB2-29 JB/PB2-31 JB/PB2-37 JA/PA1-4 JB/PB2-35
TLV320 31 8 9 4 5 2 3 1
  • Device tree

    Add the following entry:
    &i2c1 {
        status = "okay";
        clock-frequency = <100000>;
        #address-cells = <1>;
        #size-cells = <0>;
    
      tlv320aic310x: tlv320aic310x@18 {
          compatible = "ti,tlv320aic3104";
          reg = <0x18>;
          reset-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
          ai3x-micbias-vg = <MICBIAS_2_0V>; // MicBias Voltage required.
          ai3x-ocmv = <0>; // Output Common-Mode Voltage selection:
          AVDD-supply = <&codec_reg_3v3>; // 3.3V
          IOVDD-supply = <&codec_reg_1v8>; // 1.8V
          DRVDD-supply = <&codec_reg_1v8>; // 3.3V
          DVDD-supply = <&codec_reg_3v3>; // 1.8V
      };
    };
    
Clone this wiki locally