1. 20 Jun, 2019 3 commits
    • Martin Blumenstingl's avatar
      arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings · f29cabf2
      Martin Blumenstingl authored
      The snps,reset-gpio bindings are deprecated in favour of the generic
      "Ethernet PHY reset" bindings.
      
      Replace snps,reset-gpio from the &ethmac node with reset-gpios in the
      ethernet-phy node. The old snps,reset-active-low property is now encoded
      directly as GPIO flag inside the reset-gpios property.
      
      snps,reset-delays-us is converted to reset-assert-us and
      reset-deassert-us. reset-assert-us is the second cell from
      snps,reset-delays-us while reset-deassert-us was the third cell.
      
      Instead of blindly copying the old values (which seems strange since
      they gave the PHY one second to come out of reset) over this also
      updates the delays based on the datasheets:
      - the Realtek RTL8211F PHY needs a 10ms assert delay (the datasheet
        mentions: "For a complete PHY reset, this pin must be asserted low
        for at least 10ms") and a 30ms deassert delay (the datasheet
        mentions: "Wait for a further 30ms (for internal circuits settling
        time) before accessing the PHY register". This applies to the
        following boards: GXBB NanoPi K2, GXBB Odroid-C2, GXBB Vega S95
        variants, GXBB Wetek variants, GXL P230, GXM Khadas VIM2, GXM Nexbox
        A1, GXM Q200, GXM RBox Pro boards.
      - the ICPlus IP101GR PHY needs a 10ms assert delay (the datasheet
        mentions: "Trst | Reset period | 10ms") and a deassert delay of 10ms
        as well (the datasheet mentions: "Tclk_MII_rdy | MII/RMII clock
        output ready after reset released | 10ms"). This applies to the GXBB
        Nexbox A95X board.
      - the Micrel KSZ9031 seems to require a 100us delay but use the same
        (seemingly safe) values from RTL8211F due to lack of a board to verify
        this. This applies to the GXBB P200 board.
      
      The GXBB P201 board is left out from this conversion because it doesn't
      have a dedicated PHY node (because it's not clear which PHY is used on
      that board).
      Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      f29cabf2
    • Martin Blumenstingl's avatar
      arm64: dts: meson: g12a: x96-max: fix the Ethernet PHY reset line · ed5e8f68
      Martin Blumenstingl authored
      The Odroid-N2 schematics show that the following pins are used for the
      reset and interrupt lines:
      - GPIOZ_14 is the PHY interrupt line
      - GPIOZ_15 is the PHY reset line
      
      The GPIOZ_14 and GPIOZ_15 pins are special. The datasheet describes that
      they are "3.3V input tolerant open drain (OD) output pins". This means
      the GPIO controller can drive the output LOW to reset the PHY. To
      release the reset it can only switch the pin to input mode. The output
      cannot be driven HIGH for these pins.
      This requires configuring the reset line as GPIO_OPEN_DRAIN because
      otherwise the PHY will be stuck in "reset" state (because driving the
      pin HIGH seems to result in the same signal as driving it LOW).
      
      The reset line works together with a pull-up resistor (R143 in the
      Odroid-N2 schematics). The SoC can drive GPIOZ_14 LOW to assert the PHY
      reset. However, since the SoC can't drive the pin HIGH (to release the
      reset) we switch the mode to INPUT and let the pull-up resistor take
      care of driving the reset line HIGH.
      
      Switch to GPIOZ_15 for the PHY reset line instead of using GPIOZ_14
      (which actually is the interrupt line).
      Move from the "snps" specific resets to the MDIO framework's
      reset-gpios because only the latter honors the GPIO flags.
      Use the GPIO flags (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN) to match with
      the pull-up resistor because this will:
      - drive the output LOW to reset the PHY (= active low)
      - switch the pin to INPUT mode so the pull-up will take the PHY out of
        reset
      
      Fixes: 51d116557b2044 ("arm64: dts: meson-g12a-x96-max: Add Gigabit Ethernet Support")
      Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      ed5e8f68
    • Jerome Brunet's avatar
      arm64: dts: meson: g12a: sort sdio nodes correctly · 9a3f3714
      Jerome Brunet authored
      Fix sdio node order in the soc device tree
      
      Fixes: a1737347250e ("arm64: dts: meson: g12a: add SDIO controller")
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      9a3f3714
  2. 14 Jun, 2019 6 commits
    • Neil Armstrong's avatar
      arm64: dts: meson-g12a-x96-max: add sound card · cd0727aa
      Neil Armstrong authored
      Enable the sound card on the X96 Max, enabling HDMI output using the
      TDM interface B, being aligned on other boards sound cards.
      SPDI/F support is also enabled to the physical toslink port and to HDMI.
      
      The internal DAC connected to the audio jack will be added later on, when
      driver support is added.
      
      Tested by running:
      tinymix set "FRDDR_A SRC 1 EN Switch" 1
      tinymix set "FRDDR_A SINK 1 SEL" "OUT 1"
      tinymix set "FRDDR_B SRC 1 EN Switch" 1
      tinymix set "FRDDR_B SINK 1 SEL" "OUT 1"
      tinymix set "FRDDR_C SRC 1 EN Switch" 1
      tinymix set "FRDDR_C SINK 1 SEL" "OUT 1"
      tinymix set "TOHDMITX I2S SRC" "I2S B"
      tinymix set "TOHDMITX Switch" 1
      
      then:
      tinymix set "TDMOUT_B SRC SEL" "IN 0"
      speaker-test -Dhw:0,0 -c2
      
      then:
      tinymix set "TDMOUT_B SRC SEL" "IN 1"
      speaker-test -Dhw:0,1 -c2
      
      then:
      tinymix set "TDMOUT_B SRC SEL" "IN 2"
      speaker-test -Dhw:0,2 -c2
      
      testing HDMI audio output from the all 3 ASoC playback interfaces.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      cd0727aa
    • Neil Armstrong's avatar
      arm64: dts: meson-g12b-odroid-n2: add sound card · aa7d5873
      Neil Armstrong authored
      Enable the sound card on the Hardkernel Odroid-N2, enabling HDMI output
      using the TDM interface B, being aligned on other boards sound cards.
      
      The internal DAC connected to the audio jack will be added later on, when
      driver support is added.
      
      Tested by running:
      tinymix set "FRDDR_A SRC 1 EN Switch" 1
      tinymix set "FRDDR_A SINK 1 SEL" "OUT 1"
      tinymix set "FRDDR_B SRC 1 EN Switch" 1
      tinymix set "FRDDR_B SINK 1 SEL" "OUT 1"
      tinymix set "FRDDR_C SRC 1 EN Switch" 1
      tinymix set "FRDDR_C SINK 1 SEL" "OUT 1"
      tinymix set "TOHDMITX I2S SRC" "I2S B"
      tinymix set "TOHDMITX Switch" 1
      
      then:
      tinymix set "TDMOUT_B SRC SEL" "IN 0"
      speaker-test -Dhw:0,0 -c2
      
      then:
      tinymix set "TDMOUT_B SRC SEL" "IN 1"
      speaker-test -Dhw:0,1 -c2
      
      then:
      tinymix set "TDMOUT_B SRC SEL" "IN 2"
      speaker-test -Dhw:0,2 -c2
      
      testing HDMI audio output from the all 3 ASoC playback interfaces.
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      aa7d5873
    • Jerome Brunet's avatar
      arm64: dts: meson: sei510: add sound card · 64c10554
      Jerome Brunet authored
      Enable the sound card on the sei510:
      * TDM interface A is connected to an external DAC and a speaker installed
        on the device.
      * HDMI is expected to use TDM B. It can also use TDM A but will be
        limited to 2 channels, as accepted by the external DAC.
      * 2 Built in PDM mics through the PDM interface.
      * Both TDM outputs may use HW loopback.
      
      The internal DAC connected to audio jack will be added later on, when
      driver support is added.
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      64c10554
    • Maxime Jourdan's avatar
      arm64: dts: meson: sei510: add max98357a DAC · b06c8c6e
      Maxime Jourdan authored
      The SEI510 board features a max98357a audio codec for built-in
      speaker
      Signed-off-by: default avatarMaxime Jourdan <mjourdan@baylibre.com>
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
      b06c8c6e
    • Kevin Hilman's avatar
      Merge tag 'asoc-tohdmitx' of... · b3997808
      Kevin Hilman authored
      Merge tag 'asoc-tohdmitx' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into HEAD
      
      ASoC: tohdmitx bindings
      
      The patch on this branch adds bindings for tohdmitx, including a header
      to be used in DT bindings which needs to be shared with the arm-soc tree
      in order to allow system DTs to be merged.
      
      # gpg: Signature made Fri 14 Jun 2019 11:43:33 AM PDT
      # gpg:                using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0
      # gpg:                issuer "broonie@kernel.org"
      # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [full]
      # gpg:                 aka "Mark Brown <broonie@debian.org>" [full]
      # gpg:                 aka "Mark Brown <broonie@kernel.org>" [full]
      # gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>" [full]
      # gpg:                 aka "Mark Brown <broonie@linaro.org>" [unknown]
      # gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>" [unknown]
      
      * tag 'asoc-tohdmitx' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound:
        ASoC: meson: add tohdmitx DT bindings
      b3997808
    • Jerome Brunet's avatar
      ASoC: meson: add tohdmitx DT bindings · abdcfc25
      Jerome Brunet authored
      Add the bindings and the related documentation for the audio hdmitx
      control glue of the Amlogic g12a SoC family
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Tested-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Tested-by: default avatarKevin Hilman <khilman@baylibre.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      abdcfc25
  3. 11 Jun, 2019 31 commits