mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #5920 from chewitt/amlogic-upstream
amlogic: bump to Linux 5.15.y and other misc. changes
This commit is contained in:
commit
4182b26952
@ -27,138 +27,138 @@ else
|
|||||||
card=`echo $1 | sed 's/[^0-9]*//g'`
|
card=`echo $1 | sed 's/[^0-9]*//g'`
|
||||||
|
|
||||||
# set common mixer params
|
# set common mixer params
|
||||||
mixer $card Master 0db
|
mixer "$card" Master 0db
|
||||||
mixer $card Front 100%
|
mixer "$card" Front 100%
|
||||||
mixer $card PCM 0db
|
mixer "$card" PCM 0db
|
||||||
mixer $card Synth 100%
|
mixer "$card" Synth 100%
|
||||||
|
|
||||||
# mute CD, since using digital audio instead
|
# mute CD, since using digital audio instead
|
||||||
mixer $card CD 0% mute
|
mixer "$card" CD 0% mute
|
||||||
|
|
||||||
# Only unmute Line and Aux if they are possibly used.
|
# Only unmute Line and Aux if they are possibly used.
|
||||||
# mixer $card Line 100%
|
# mixer "$card" Line 100%
|
||||||
# mixer $card Aux 100%
|
# mixer "$card" Aux 100%
|
||||||
|
|
||||||
# mute mic
|
# mute mic
|
||||||
mixer $card Mic 0% mute
|
mixer "$card" Mic 0% mute
|
||||||
|
|
||||||
# ESS 1969 chipset has 2 PCM channels
|
# ESS 1969 chipset has 2 PCM channels
|
||||||
mixer $card PCM,1 100%
|
mixer "$card" PCM,1 100%
|
||||||
|
|
||||||
# Trident/YMFPCI/emu10k1
|
# Trident/YMFPCI/emu10k1
|
||||||
mixer $card Wave 100%
|
mixer "$card" Wave 100%
|
||||||
mixer $card Music 100%
|
mixer "$card" Music 100%
|
||||||
mixer $card AC97 100%
|
mixer "$card" AC97 100%
|
||||||
mixer $card Surround 90%
|
mixer "$card" Surround 90%
|
||||||
mixer $card 'Surround Digital' 90%
|
mixer "$card" 'Surround Digital' 90%
|
||||||
mixer $card 'Wave Surround' 90%
|
mixer "$card" 'Wave Surround' 90%
|
||||||
mixer $card 'Duplicate Front' 90%
|
mixer "$card" 'Duplicate Front' 90%
|
||||||
mixer $card 'Sigmatel 4-Speaker Stereo' 90%
|
mixer "$card" 'Sigmatel 4-Speaker Stereo' 90%
|
||||||
|
|
||||||
# CS4237B chipset:
|
# CS4237B chipset:
|
||||||
mixer $card 'Master Digital' 100%
|
mixer "$card" 'Master Digital' 100%
|
||||||
|
|
||||||
# DRC
|
# DRC
|
||||||
mixer $card 'Dynamic Range Compression' 90%
|
mixer "$card" 'Dynamic Range Compression' 90%
|
||||||
|
|
||||||
# Envy24 chips with analog outs
|
# Envy24 chips with analog outs
|
||||||
mixer $card DAC 100%
|
mixer "$card" DAC 100%
|
||||||
mixer $card DAC,0 100%
|
mixer "$card" DAC,0 100%
|
||||||
mixer $card DAC,1 100%
|
mixer "$card" DAC,1 100%
|
||||||
|
|
||||||
# some notebooks use headphone instead of master
|
# some notebooks use headphone instead of master
|
||||||
mixer $card Headphone 100%
|
mixer "$card" Headphone 100%
|
||||||
mixer $card Speaker 100%
|
mixer "$card" Speaker 100%
|
||||||
mixer $card 'Internal Speaker' 0% mute
|
mixer "$card" 'Internal Speaker' 0% mute
|
||||||
mixer $card Playback 100%
|
mixer "$card" Playback 100%
|
||||||
mixer $card Headphone 100%
|
mixer "$card" Headphone 100%
|
||||||
mixer $card Speaker 100%
|
mixer "$card" Speaker 100%
|
||||||
mixer $card Center 100%
|
mixer "$card" Center 100%
|
||||||
mixer $card LFE 100%
|
mixer "$card" LFE 100%
|
||||||
mixer $card Center/LFE 100%
|
mixer "$card" Center/LFE 100%
|
||||||
|
|
||||||
# Intel P4P800-MX (Ubuntu bug #5813)
|
# Intel P4P800-MX (Ubuntu bug #5813)
|
||||||
mixer $card 'Master Playback Switch' on
|
mixer "$card" 'Master Playback Switch' on
|
||||||
|
|
||||||
# set digital output mixer params
|
# set digital output mixer params
|
||||||
mixer $card 'IEC958' 100% on
|
mixer "$card" 'IEC958' 100% on
|
||||||
mixer $card 'IEC958 Output' 100%
|
mixer "$card" 'IEC958 Output' 100%
|
||||||
mixer $card 'IEC958 Coaxial' 100%
|
mixer "$card" 'IEC958 Coaxial' 100%
|
||||||
mixer $card 'IEC958 LiveDrive' 100%
|
mixer "$card" 'IEC958 LiveDrive' 100%
|
||||||
mixer $card 'IEC958 Optical Raw' 100%
|
mixer "$card" 'IEC958 Optical Raw' 100%
|
||||||
mixer $card 'SPDIF Out' 100%
|
mixer "$card" 'SPDIF Out' 100%
|
||||||
mixer $card 'SPDIF Front' 100%
|
mixer "$card" 'SPDIF Front' 100%
|
||||||
mixer $card 'SPDIF Rear' 100%
|
mixer "$card" 'SPDIF Rear' 100%
|
||||||
mixer $card 'SPDIF Center/LFE' 100%
|
mixer "$card" 'SPDIF Center/LFE' 100%
|
||||||
mixer $card 'Master Digital' 100%
|
mixer "$card" 'Master Digital' 100%
|
||||||
|
|
||||||
mixer $card 'Analog Front' 100%
|
mixer "$card" 'Analog Front' 100%
|
||||||
mixer $card 'Analog Rear' 100%
|
mixer "$card" 'Analog Rear' 100%
|
||||||
mixer $card 'Analog Center/LFE' 100%
|
mixer "$card" 'Analog Center/LFE' 100%
|
||||||
|
|
||||||
# ASRock ION 330 (and perhaps others) has 2 IEC958 channels
|
# ASRock ION 330 (and perhaps others) has 2 IEC958 channels
|
||||||
mixer $card IEC958,0 on
|
mixer "$card" IEC958,0 on
|
||||||
mixer $card IEC958,1 on
|
mixer "$card" IEC958,1 on
|
||||||
|
|
||||||
# some ION2 has much more IEC958 channels ...
|
# some ION2 has much more IEC958 channels ...
|
||||||
mixer $card IEC958,2 on
|
mixer "$card" IEC958,2 on
|
||||||
mixer $card IEC958,3 on
|
mixer "$card" IEC958,3 on
|
||||||
|
|
||||||
# ASRock ION 330 has Master Front set to 0
|
# ASRock ION 330 has Master Front set to 0
|
||||||
mixer $card 'Master Front' 100%
|
mixer "$card" 'Master Front' 100%
|
||||||
|
|
||||||
# Shuttle XS35GT needs this too
|
# Shuttle XS35GT needs this too
|
||||||
mixer $card 'Master',0 100% on
|
mixer "$card" 'Master',0 100% on
|
||||||
|
|
||||||
# and this for various Fusion devices like Zotac ZBOX
|
# and this for various Fusion devices like Zotac ZBOX
|
||||||
mixer $card 'Front',0 100% on
|
mixer "$card" 'Front',0 100% on
|
||||||
|
|
||||||
# NVidia CK804 sound devices
|
# NVidia CK804 sound devices
|
||||||
mixer $card 'IEC958 Playback AC97-SPSA' 100%
|
mixer "$card" 'IEC958 Playback AC97-SPSA' 100%
|
||||||
|
|
||||||
# Allwinner H3 Analog
|
# Allwinner H3 Analog
|
||||||
mixer $card 'Line Out' 0db on
|
mixer "$card" 'Line Out' 0db on
|
||||||
|
|
||||||
# Allwinner A20 Analog
|
# Allwinner A20 Analog
|
||||||
mixer $card 'Power Amplifier' 0db
|
mixer "$card" 'Power Amplifier' 0db
|
||||||
mixer $card 'Power Amplifier DAC' on
|
mixer "$card" 'Power Amplifier DAC' on
|
||||||
mixer $card 'Power Amplifier Mute' on
|
mixer "$card" 'Power Amplifier Mute' on
|
||||||
|
|
||||||
# Allwinner A64 Analog
|
# Allwinner A64 Analog
|
||||||
mixer $card Headphone 0db on
|
mixer "$card" Headphone 0db on
|
||||||
mixer $card 'AIF1 Slot 0 Digital DAC' on
|
mixer "$card" 'AIF1 Slot 0 Digital DAC' on
|
||||||
|
|
||||||
# Amlogic G12A/G12B/SM1 HDMI
|
# Amlogic G12A/G12B/SM1 HDMI
|
||||||
case $(dtname) in
|
case $(dtname) in
|
||||||
azw,gsking-x|khadas,vim3*) #TDM_A
|
azw,gsking-x|khadas,vim3*) #TDM_A
|
||||||
mixer $card 'FRDDR_A SINK 1 SEL' 'OUT 0'
|
mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 0'
|
||||||
mixer $card 'FRDDR_A SRC 1 EN' on
|
mixer "$card" 'FRDDR_A SRC 1 EN' on
|
||||||
mixer $card 'TDMOUT_A SRC SEL' 'IN 0'
|
mixer "$card" 'TDMOUT_A SRC SEL' 'IN 0'
|
||||||
mixer $card 'TOHDMITX' on
|
mixer "$card" 'TOHDMITX' on
|
||||||
mixer $card 'TOHDMITX I2S SRC' 'I2S A'
|
mixer "$card" 'TOHDMITX I2S SRC' 'I2S A'
|
||||||
;;
|
;;
|
||||||
*) #TDM_B
|
*) #TDM_B
|
||||||
mixer $card 'FRDDR_A SINK 1 SEL' 'OUT 1'
|
mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 1'
|
||||||
mixer $card 'FRDDR_A SRC 1 EN' on
|
mixer "$card" 'FRDDR_A SRC 1 EN' on
|
||||||
mixer $card 'TDMOUT_B SRC SEL' 'IN 0'
|
mixer "$card" 'TDMOUT_B SRC SEL' 'IN 0'
|
||||||
mixer $card 'TOHDMITX' on
|
mixer "$card" 'TOHDMITX' on
|
||||||
mixer $card 'TOHDMITX I2S SRC' 'I2S B'
|
mixer "$card" 'TOHDMITX I2S SRC' 'I2S B'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Amlogic G12A/G12B/SM1 S/PDIF
|
# Amlogic G12A/G12B/SM1 S/PDIF
|
||||||
mixer $card 'FRDDR_B SINK 1 SEL' 'OUT 3'
|
mixer "$card" 'FRDDR_B SINK 1 SEL' 'OUT 3'
|
||||||
mixer $card 'FRDDR_B SRC 1 EN' on
|
mixer "$card" 'FRDDR_B SRC 1 EN' on
|
||||||
mixer $card 'SPDIFOUT SRC SEL' 'IN 1'
|
mixer "$card" 'SPDIFOUT SRC SEL' 'IN 1'
|
||||||
mixer $card 'SPDIFOUT Playback' on
|
mixer "$card" 'SPDIFOUT Playback' on
|
||||||
|
|
||||||
# Amlogic GX HDMI and S/PDIF
|
# Amlogic GX HDMI and S/PDIF
|
||||||
mixer $card 'AIU HDMI CTRL SRC' 'I2S'
|
mixer "$card" 'AIU HDMI CTRL SRC' 'I2S'
|
||||||
mixer $card 'AIU SPDIF SRC SEL' 'SPDIF'
|
mixer "$card" 'AIU SPDIF SRC SEL' 'SPDIF'
|
||||||
|
|
||||||
# ES8316 headphone jack
|
# ES8316 headphone jack
|
||||||
mixer $card 'Right Headphone Mixer Right DAC' on
|
mixer "$card" 'Right Headphone Mixer Right DAC' on
|
||||||
mixer $card 'Left Headphone Mixer Left DAC' on
|
mixer "$card" 'Left Headphone Mixer Left DAC' on
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -16,8 +16,8 @@ PKG_PATCH_DIRS="${LINUX}"
|
|||||||
|
|
||||||
case "${LINUX}" in
|
case "${LINUX}" in
|
||||||
amlogic)
|
amlogic)
|
||||||
PKG_VERSION="6cc049b8e0d05e1519d71afcf2d40d3aa5a48366" # 5.11.10
|
PKG_VERSION="f00712e27083550be3031099b7697925533a6e01" # 5.15.5
|
||||||
PKG_SHA256="d5f4a33af53ef0b22049366b2ae2c30a9bf5741dce7d1d2ed6e499c1d9d31c20"
|
PKG_SHA256="d1d06b7d0b2b23099f17b18559680821f39275e245d6be3d48a4867e0a7076c7"
|
||||||
PKG_URL="https://github.com/torvalds/linux/archive/${PKG_VERSION}.tar.gz"
|
PKG_URL="https://github.com/torvalds/linux/archive/${PKG_VERSION}.tar.gz"
|
||||||
PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz"
|
PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz"
|
||||||
;;
|
;;
|
||||||
|
@ -3,31 +3,39 @@
|
|||||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
PKG_NAME="ffmpeg"
|
PKG_NAME="ffmpeg"
|
||||||
PKG_VERSION="4.4-N-Alpha1"
|
|
||||||
PKG_SHA256="eb396f46ef7c5ac01b67818d0f2c0516fd4ab32aa9065a9ffa71eebede67ff20"
|
|
||||||
PKG_LICENSE="LGPLv2.1+"
|
PKG_LICENSE="LGPLv2.1+"
|
||||||
PKG_SITE="https://ffmpeg.org"
|
PKG_SITE="https://ffmpeg.org"
|
||||||
PKG_URL="https://github.com/xbmc/FFmpeg/archive/${PKG_VERSION}.tar.gz"
|
|
||||||
PKG_DEPENDS_TARGET="toolchain zlib bzip2 gnutls speex"
|
PKG_DEPENDS_TARGET="toolchain zlib bzip2 gnutls speex"
|
||||||
PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video."
|
PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video."
|
||||||
PKG_BUILD_FLAGS="-gold"
|
PKG_BUILD_FLAGS="-gold"
|
||||||
|
|
||||||
|
case "$PROJECT" in
|
||||||
|
Amlogic)
|
||||||
|
PKG_VERSION="9f237dd0247797f89860302dac60c32cda48a9f9" # dev/4.4/rpi_import_1 @ working video
|
||||||
|
PKG_SHA256="3d407a426387679a607d60cdad2f559c4ad49a87f2a179b4f98983fa86ce3121"
|
||||||
|
PKG_URL="https://github.com/jc-kynesim/rpi-ffmpeg/archive/${PKG_VERSION}.tar.gz"
|
||||||
|
PKG_PATCH_DIRS="libreelec"
|
||||||
|
;;
|
||||||
|
RPi)
|
||||||
|
PKG_VERSION="4.4-N-Alpha1"
|
||||||
|
PKG_SHA256="eb396f46ef7c5ac01b67818d0f2c0516fd4ab32aa9065a9ffa71eebede67ff20"
|
||||||
|
PKG_URL="https://github.com/xbmc/FFmpeg/archive/${PKG_VERSION}.tar.gz"
|
||||||
|
PKG_FFMPEG_RPI="--disable-mmal --disable-rpi --enable-sand"
|
||||||
|
PKG_PATCH_DIRS="libreelec rpi"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
PKG_VERSION="4.4-N-Alpha1"
|
||||||
|
PKG_SHA256="eb396f46ef7c5ac01b67818d0f2c0516fd4ab32aa9065a9ffa71eebede67ff20"
|
||||||
|
PKG_URL="https://github.com/xbmc/FFmpeg/archive/${PKG_VERSION}.tar.gz"
|
||||||
|
PKG_PATCH_DIRS="libreelec v4l2-request v4l2-drmprime"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
get_graphicdrivers
|
get_graphicdrivers
|
||||||
|
|
||||||
PKG_FFMPEG_HWACCEL="--enable-hwaccels"
|
PKG_FFMPEG_HWACCEL="--enable-hwaccels"
|
||||||
|
|
||||||
PKG_FFMPEG_RPI="--disable-mmal"
|
|
||||||
|
|
||||||
if [ "${PROJECT}" = "RPi" ]; then
|
|
||||||
PKG_PATCH_DIRS="rpi"
|
|
||||||
PKG_FFMPEG_RPI+=" --disable-rpi --enable-sand"
|
|
||||||
else
|
|
||||||
PKG_PATCH_DIRS="v4l2-request v4l2-drmprime"
|
|
||||||
fi
|
|
||||||
|
|
||||||
PKG_PATCH_DIRS+=" libreelec"
|
|
||||||
|
|
||||||
if [ "${V4L2_SUPPORT}" = "yes" ]; then
|
if [ "${V4L2_SUPPORT}" = "yes" ]; then
|
||||||
PKG_DEPENDS_TARGET+=" libdrm"
|
PKG_DEPENDS_TARGET+=" libdrm"
|
||||||
PKG_NEED_UNPACK+=" $(get_pkg_directory libdrm)"
|
PKG_NEED_UNPACK+=" $(get_pkg_directory libdrm)"
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
COMPATIBLE=$(cat /proc/device-tree/compatible 2>/dev/null | tr -d '\000' | sed -n -e 's/.*\(allwinner\|amlogic\|fsl\|nxp\|qcom\|raspberrypi\|rockchip\|samsung\).*/\1/p')
|
COMPATIBLE=$(cat /proc/device-tree/compatible 2>/dev/null | tr -d '\000' | sed -n -e 's/.*\(allwinner\|amlogic\|fsl\|nxp\|qcom\|raspberrypi\|rockchip\|samsung\).*/\1/p')
|
||||||
|
|
||||||
do_dtfile(){
|
do_dtfile(){
|
||||||
if [ -e /flash/extlinux/extlinux.conf ]; then
|
if [[ -n $(find /flash -name extlinux.conf) ]]; then
|
||||||
DTFILE=$(grep FDT /flash/extlinux/extlinux.conf | sed 's,^ *FDT /,,g')
|
EXTLINUX=$(find /flash -name extlinux.conf)
|
||||||
|
DTFILE=$(grep FDT "${EXTLINUX}" | sed 's,^ *FDT /,,g')
|
||||||
elif [ -e /flash/boot.ini ]; then
|
elif [ -e /flash/boot.ini ]; then
|
||||||
DTFILE=$(grep -m 1 dtb_name /flash/boot.ini | cut -d \" -f2 | sed 's,/dtb/,,g')
|
DTFILE=$(grep -m 1 dtb_name /flash/boot.ini | cut -d \" -f2 | sed 's,/dtb/,,g')
|
||||||
elif [ -e /flash/uEnv.ini ]; then
|
elif [ -e /flash/uEnv.ini ]; then
|
||||||
|
@ -3,6 +3,13 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
case $DTNAME in
|
||||||
|
radxa,zero)
|
||||||
|
echo "Skipping configuration, eth0 not detected"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
COMPATIBLE=$(/usr/bin/dtsoc)
|
COMPATIBLE=$(/usr/bin/dtsoc)
|
||||||
MAC_STEP=""
|
MAC_STEP=""
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Configure eth0 MAC address
|
Description=Configure eth0 MAC address
|
||||||
BindsTo=sys-subsystem-net-devices-eth0.device
|
Requisite=sys-subsystem-net-devices-eth0.device
|
||||||
After=sys-subsystem-net-devices-eth0.device
|
|
||||||
Before=connman.service
|
Before=connman.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
PKG_NAME="amlogic-boot-fip"
|
PKG_NAME="amlogic-boot-fip"
|
||||||
PKG_LICENSE="nonfree"
|
PKG_LICENSE="nonfree"
|
||||||
PKG_VERSION="ac20772f44b2b74c8f55331b5c91a277d0bfbc37"
|
PKG_VERSION="7ff0004e0e4d261ba81334a2f46302bd06704aca"
|
||||||
PKG_SHA256="4bc92f046e960b5760ace3d93536eb26422484225b34238631de9b8d819a92aa"
|
PKG_SHA256="bd8012388cca6a01e819c3fcce2522ca6a32f7287ac2b901efbbe90978dfe74d"
|
||||||
PKG_SITE="https://github.com/LibreELEC/amlogic-boot-fip"
|
PKG_SITE="https://github.com/LibreELEC/amlogic-boot-fip"
|
||||||
PKG_URL="https://github.com/LibreELEC/amlogic-boot-fip/archive/${PKG_VERSION}.tar.gz"
|
PKG_URL="https://github.com/LibreELEC/amlogic-boot-fip/archive/${PKG_VERSION}.tar.gz"
|
||||||
PKG_LONGDESC="Firmware Image Package (FIP) sources used to sign Amlogic u-boot binaries in LibreELEC images"
|
PKG_LONGDESC="Firmware Image Package (FIP) sources used to sign Amlogic u-boot binaries in LibreELEC images"
|
||||||
|
13
packages/tools/emmctool/package.mk
Normal file
13
packages/tools/emmctool/package.mk
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
PKG_NAME="emmctool"
|
||||||
|
PKG_VERSION="1.0"
|
||||||
|
PKG_LICENSE="GPLv2"
|
||||||
|
PKG_LONGDESC="emmctool: simple tool for writing LibreELEC images to emmc on supported box/board devices"
|
||||||
|
PKG_TOOLCHAIN="manual"
|
||||||
|
|
||||||
|
makeinstall_target() {
|
||||||
|
mkdir -p ${INSTALL}/usr/bin
|
||||||
|
cp ${PKG_DIR}/scripts/emmctool ${INSTALL}/usr/bin
|
||||||
|
}
|
@ -18,7 +18,7 @@ do_backup(){
|
|||||||
do_detect(){
|
do_detect(){
|
||||||
# used on LibreComputer LePotato/LaFrite where pre-formatted modules
|
# used on LibreComputer LePotato/LaFrite where pre-formatted modules
|
||||||
# must be attached after boot (LibreComputer supports this) else the
|
# must be attached after boot (LibreComputer supports this) else the
|
||||||
# device always boots to the pre-formatted OS on the module.
|
# device always boots to the pre-installed OS on the module.
|
||||||
echo "info: rebinding d0074000.mmc"
|
echo "info: rebinding d0074000.mmc"
|
||||||
echo -n d0074000.mmc > /sys/bus/platform/drivers/meson-gx-mmc/unbind
|
echo -n d0074000.mmc > /sys/bus/platform/drivers/meson-gx-mmc/unbind
|
||||||
echo -n d0074000.mmc > /sys/bus/platform/drivers/meson-gx-mmc/bind
|
echo -n d0074000.mmc > /sys/bus/platform/drivers/meson-gx-mmc/bind
|
||||||
@ -50,8 +50,8 @@ do_labels(){
|
|||||||
BOOTLABEL=$(echo "${2}" | awk 'BEGIN { getline; print toupper($0) }')
|
BOOTLABEL=$(echo "${2}" | awk 'BEGIN { getline; print toupper($0) }')
|
||||||
DISKLABEL=$(echo "${3}" | awk 'BEGIN { getline; print toupper($0) }')
|
DISKLABEL=$(echo "${3}" | awk 'BEGIN { getline; print toupper($0) }')
|
||||||
else
|
else
|
||||||
BOOTLABEL="EMMC_BOOT"
|
BOOTLABEL="BOOT"
|
||||||
DISKLABEL="EMMC_DISK"
|
DISKLABEL="DISK"
|
||||||
fi
|
fi
|
||||||
echo "info: using boot=LABEL=${BOOTLABEL} and disk=LABEL=${DISKLABEL}"
|
echo "info: using boot=LABEL=${BOOTLABEL} and disk=LABEL=${DISKLABEL}"
|
||||||
do_umount
|
do_umount
|
||||||
@ -107,7 +107,7 @@ do_storage(){
|
|||||||
if [ -n "${2}" ]; then
|
if [ -n "${2}" ]; then
|
||||||
DISKLABEL=$(echo "${2}" | awk 'BEGIN { getline; print toupper($0) }')
|
DISKLABEL=$(echo "${2}" | awk 'BEGIN { getline; print toupper($0) }')
|
||||||
else
|
else
|
||||||
DISKLABEL="EMMC_DISK"
|
DISKLABEL="DISK"
|
||||||
fi
|
fi
|
||||||
do_umount
|
do_umount
|
||||||
echo "info: converting emmc for /storage use"
|
echo "info: converting emmc for /storage use"
|
||||||
@ -134,12 +134,25 @@ do_umount(){
|
|||||||
for mount in $(grep "${EMMC}" /proc/mounts | awk '{print $1}'); do
|
for mount in $(grep "${EMMC}" /proc/mounts | awk '{print $1}'); do
|
||||||
echo "info: unmounting $mount"
|
echo "info: unmounting $mount"
|
||||||
umount -f "$mount"
|
umount -f "$mount"
|
||||||
sleep 1
|
sleep 2
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_writeprotect(){
|
||||||
|
echo "info: disabling emmc write protection"
|
||||||
|
echo 0 > "/sys/block/${EMMC}boot0/force_ro"
|
||||||
|
echo 0 > "/sys/block/${EMMC}boot1/force_ro"
|
||||||
|
}
|
||||||
|
|
||||||
do_write(){
|
do_write(){
|
||||||
do_umount
|
do_umount
|
||||||
|
|
||||||
|
case $(dtname) in
|
||||||
|
radxa,zero)
|
||||||
|
do_writeprotect
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ "${2: -7}" == ".img.gz" ]; then
|
if [ "${2: -7}" == ".img.gz" ]; then
|
||||||
echo "info: writing ${2} to ${EMMC}"
|
echo "info: writing ${2} to ${EMMC}"
|
||||||
gunzip -c "${2}" | dd of="${EMMC}" bs=1M
|
gunzip -c "${2}" | dd of="${EMMC}" bs=1M
|
||||||
@ -161,15 +174,15 @@ do_zero(){
|
|||||||
|
|
||||||
do_help(){
|
do_help(){
|
||||||
echo ""
|
echo ""
|
||||||
echo "usage: emmctool (w)rite <filename> : write <filename>.img/.img.gz to the eMMC module"
|
echo "usage: emmctool (w)rite <filename> : write <filename>.img/.img.gz to the eMMC module"
|
||||||
echo " (b)backup <filename> : dump the emmc partition to an .img.gz file"
|
echo " (b)backup <filename> : dump the emmc partition to <filename>.img.gz file"
|
||||||
echo " (d)etect : detect an eMMC module attached after boot"
|
echo " (d)etect : detect an eMMC module attached after boot"
|
||||||
echo " (i)nfo : show info about the eMMC module"
|
echo " (i)nfo : show info about the eMMC module"
|
||||||
echo " (l)abels : change eMMC disk labels to ${BOOTLABEL}/${DISKLABEL}"
|
echo " (l)abel <boot> <disk> : change eMMC disk labels to <bootlabel> <disklabel>"
|
||||||
echo " (r)esize : resize the storage partition to 100%"
|
echo " (r)esize : resize the storage partition to 100%"
|
||||||
echo " (s)storage : convert emmc for use as /storage (boot from sdcard)"
|
echo " (s)storage : convert emmc for use as /storage (boot from sdcard)"
|
||||||
echo " (z)ero : zero (erase/wipe) the eMMC module"
|
echo " (z)ero : zero (erase/wipe) the eMMC module"
|
||||||
echo " (h)elp : displays this help message"
|
echo " (h)elp : displays this help message"
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +195,7 @@ if [ -z "${EMMC}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case $(dtname) in
|
case $(dtname) in
|
||||||
friendlyarm*|hardkernel*|khadas*|libretech*|wetek*)
|
azw*|bananapi*|friendlyarm*|hardkernel*|khadas*|libretech*|radxa*|wetek*)
|
||||||
if [ "${BOOT}" = "${EMMC}" ]; then
|
if [ "${BOOT}" = "${EMMC}" ]; then
|
||||||
do_info
|
do_info
|
||||||
echo "Your device is booted from the eMMC module!"
|
echo "Your device is booted from the eMMC module!"
|
@ -22,12 +22,6 @@ PKG_NEED_UNPACK="${PROJECT_DIR}/${PROJECT}/bootloader"
|
|||||||
[ -n "${DEVICE}" ] && PKG_NEED_UNPACK+=" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader"
|
[ -n "${DEVICE}" ] && PKG_NEED_UNPACK+=" ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/bootloader"
|
||||||
|
|
||||||
case "${PROJECT}" in
|
case "${PROJECT}" in
|
||||||
Amlogic)
|
|
||||||
PKG_VERSION="807482107a6d426dbcd6457d9ccf8b3ce6ca887b" # 2021.04-rc2 custodians/u-boot-amlogic-test
|
|
||||||
PKG_SHA256="a10430d2c1a1d9e83e66bed342433ddfe4f3d6f16d9fa8b4d4c034b600baffd3"
|
|
||||||
PKG_URL="https://github.com/chewitt/u-boot/archive/${PKG_VERSION}.tar.gz"
|
|
||||||
PKG_PATCH_DIRS="amlogic"
|
|
||||||
;;
|
|
||||||
Rockchip)
|
Rockchip)
|
||||||
PKG_VERSION="8659d08d2b589693d121c1298484e861b7dafc4f"
|
PKG_VERSION="8659d08d2b589693d121c1298484e861b7dafc4f"
|
||||||
PKG_SHA256="3f9f2bbd0c28be6d7d6eb909823fee5728da023aca0ce37aef3c8f67d1179ec1"
|
PKG_SHA256="3f9f2bbd0c28be6d7d6eb909823fee5728da023aca0ce37aef3c8f67d1179ec1"
|
||||||
|
@ -1,256 +1,44 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
echo "$BOOTLOADER: creating u-boot.bin"
|
echo "${BOOTLOADER}: creating u-boot.bin"
|
||||||
|
|
||||||
DESTDIR="$PKG_BUILD/fip"
|
DESTDIR="${PKG_BUILD}/fip"
|
||||||
mkdir -p $DESTDIR
|
mkdir -p "${DESTDIR}"
|
||||||
|
|
||||||
FIPDIR="$(get_build_dir amlogic-boot-fip)/$UBOOT_SYSTEM"
|
FIPDIR="$(get_build_dir amlogic-boot-fip)"
|
||||||
|
|
||||||
case "${UBOOT_SYSTEM}" in
|
case "${UBOOT_SYSTEM}" in
|
||||||
box|"")
|
box|"")
|
||||||
# no-op, use vendor booloader
|
# no-op, use vendor booloader
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
khadas-vim3*|odroid-c4|odroid-hc4)
|
mkdir "${DESTDIR}/tmp"
|
||||||
if [ "$UBOOT_SYSTEM" = "khadas-vim3" ]; then
|
(cd "${FIPDIR}" || exit; ./build-fip.sh "${UBOOT_SYSTEM}" "$(get_build_dir "${BOOTLOADER}")/u-boot.bin" "${DESTDIR}" "${DESTDIR}/tmp")
|
||||||
AML_ENCRYPT_BIN="aml_encrypt_g12b"
|
rm -fr "${DESTDIR}/tmp"
|
||||||
else
|
|
||||||
AML_ENCRYPT_BIN="aml_encrypt_g12a"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp $FIPDIR/bl301.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/acs.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/aml_ddr.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/bl2.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl30.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl31.img $DESTDIR/
|
|
||||||
cp $FIPDIR/blx_fix.sh $DESTDIR/
|
|
||||||
cp $FIPDIR/ddr3_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/ddr4_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/ddr4_2d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/diag_lpddr4.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/lpddr3_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/lpddr4_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/lpddr4_2d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/piei.fw $DESTDIR/
|
|
||||||
cp $(get_build_dir $BOOTLOADER)/u-boot.bin $DESTDIR/bl33.bin
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl30.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl30_zero.bin \
|
|
||||||
$DESTDIR/bl301.bin \
|
|
||||||
$DESTDIR/bl301_zero.bin \
|
|
||||||
$DESTDIR/bl30_new.bin bl30
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl2.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl2_zero.bin \
|
|
||||||
$DESTDIR/acs.bin \
|
|
||||||
$DESTDIR/bl21_zero.bin \
|
|
||||||
$DESTDIR/bl2_new.bin bl2
|
|
||||||
|
|
||||||
$FIPDIR/$AML_ENCRYPT_BIN --bl30sig --input $DESTDIR/bl30_new.bin \
|
|
||||||
--output $DESTDIR/bl30_new.bin.g12a.enc \
|
|
||||||
--level v3
|
|
||||||
$FIPDIR/$AML_ENCRYPT_BIN --bl3sig --input $DESTDIR/bl30_new.bin.g12a.enc \
|
|
||||||
--output $DESTDIR/bl30_new.bin.enc \
|
|
||||||
--level v3 --type bl30
|
|
||||||
$FIPDIR/$AML_ENCRYPT_BIN --bl3sig --input $DESTDIR/bl31.img \
|
|
||||||
--output $DESTDIR/bl31.img.enc \
|
|
||||||
--level v3 --type bl31
|
|
||||||
$FIPDIR/$AML_ENCRYPT_BIN --bl3sig --input $DESTDIR/bl33.bin --compress lz4 \
|
|
||||||
--output $DESTDIR/bl33.bin.enc \
|
|
||||||
--level v3 --type bl33 --compress lz4
|
|
||||||
$FIPDIR/$AML_ENCRYPT_BIN --bl2sig --input $DESTDIR/bl2_new.bin \
|
|
||||||
--output $DESTDIR/bl2.n.bin.sig
|
|
||||||
$FIPDIR/$AML_ENCRYPT_BIN --bootmk \
|
|
||||||
--output $DESTDIR/u-boot.bin \
|
|
||||||
--bl2 $DESTDIR/bl2.n.bin.sig \
|
|
||||||
--bl30 $DESTDIR/bl30_new.bin.enc \
|
|
||||||
--bl31 $DESTDIR/bl31.img.enc \
|
|
||||||
--bl33 $DESTDIR/bl33.bin.enc \
|
|
||||||
--ddrfw1 $DESTDIR/ddr4_1d.fw \
|
|
||||||
--ddrfw2 $DESTDIR/ddr4_2d.fw \
|
|
||||||
--ddrfw3 $DESTDIR/ddr3_1d.fw \
|
|
||||||
--ddrfw4 $DESTDIR/piei.fw \
|
|
||||||
--ddrfw5 $DESTDIR/lpddr4_1d.fw \
|
|
||||||
--ddrfw6 $DESTDIR/lpddr4_2d.fw \
|
|
||||||
--ddrfw7 $DESTDIR/diag_lpddr4.fw \
|
|
||||||
--ddrfw8 $DESTDIR/aml_ddr.fw \
|
|
||||||
--ddrfw9 $DESTDIR/lpddr3_1d.fw \
|
|
||||||
--level v3
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
odroid-c2)
|
|
||||||
$FIPDIR/fip_create --bl30 $FIPDIR/bl30.bin \
|
|
||||||
--bl301 $FIPDIR/bl301.bin \
|
|
||||||
--bl31 $FIPDIR/bl31.bin \
|
|
||||||
--bl33 $(get_build_dir $BOOTLOADER)/u-boot.bin $DESTDIR/fip.bin
|
|
||||||
|
|
||||||
$FIPDIR/fip_create --dump $DESTDIR/fip.bin
|
|
||||||
|
|
||||||
cat $FIPDIR/bl2.package $DESTDIR/fip.bin > $DESTDIR/boot_new.bin
|
|
||||||
|
|
||||||
$FIPDIR/aml_encrypt_gxb --bootsig --input $DESTDIR/boot_new.bin --output $DESTDIR/u-boot.img
|
|
||||||
dd if=$DESTDIR/u-boot.img of=$DESTDIR/u-boot.gxbb bs=512 skip=96
|
|
||||||
dd if=$FIPDIR/bl1.bin.hardkernel of=$DESTDIR/u-boot.bin.sd.bin conv=fsync,notrunc bs=1 count=442
|
|
||||||
dd if=$FIPDIR/bl1.bin.hardkernel of=$DESTDIR/u-boot.bin.sd.bin conv=fsync,notrunc bs=512 skip=1 seek=1
|
|
||||||
dd if=$DESTDIR/u-boot.gxbb of=$DESTDIR/u-boot.bin.sd.bin conv=fsync,notrunc bs=512 seek=97
|
|
||||||
;;
|
|
||||||
|
|
||||||
odroid-n2)
|
|
||||||
cp $FIPDIR/bl301.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/acs.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/aml_ddr.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/bl2.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl30.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl31.img $DESTDIR/
|
|
||||||
cp $FIPDIR/blx_fix.sh $DESTDIR/
|
|
||||||
cp $FIPDIR/ddr3_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/ddr4_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/ddr4_2d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/diag_lpddr4.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/lpddr4_1d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/lpddr4_2d.fw $DESTDIR/
|
|
||||||
cp $FIPDIR/piei.fw $DESTDIR/
|
|
||||||
cp $(get_build_dir $BOOTLOADER)/u-boot.bin $DESTDIR/bl33.bin
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl30.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl30_zero.bin \
|
|
||||||
$DESTDIR/bl301.bin \
|
|
||||||
$DESTDIR/bl301_zero.bin \
|
|
||||||
$DESTDIR/bl30_new.bin bl30
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl2.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl2_zero.bin \
|
|
||||||
$DESTDIR/acs.bin \
|
|
||||||
$DESTDIR/bl21_zero.bin \
|
|
||||||
$DESTDIR/bl2_new.bin bl2
|
|
||||||
|
|
||||||
$FIPDIR/aml_encrypt_g12b --bl30sig --input $DESTDIR/bl30_new.bin \
|
|
||||||
--output $DESTDIR/bl30_new.bin.g12a.enc \
|
|
||||||
--level v3
|
|
||||||
$FIPDIR/aml_encrypt_g12b --bl3sig --input $DESTDIR/bl30_new.bin.g12a.enc \
|
|
||||||
--output $DESTDIR/bl30_new.bin.enc \
|
|
||||||
--level v3 --type bl30
|
|
||||||
$FIPDIR/aml_encrypt_g12b --bl3sig --input $DESTDIR/bl31.img \
|
|
||||||
--output $DESTDIR/bl31.img.enc \
|
|
||||||
--level v3 --type bl31
|
|
||||||
$FIPDIR/aml_encrypt_g12b --bl3sig --input $DESTDIR/bl33.bin --compress lz4 \
|
|
||||||
--output $DESTDIR/bl33.bin.enc \
|
|
||||||
--level v3 --type bl33 --compress lz4
|
|
||||||
$FIPDIR/aml_encrypt_g12b --bl2sig --input $DESTDIR/bl2_new.bin \
|
|
||||||
--output $DESTDIR/bl2.n.bin.sig
|
|
||||||
$FIPDIR/aml_encrypt_g12b --bootmk \
|
|
||||||
--output $DESTDIR/u-boot.bin \
|
|
||||||
--bl2 $DESTDIR/bl2.n.bin.sig \
|
|
||||||
--bl30 $DESTDIR/bl30_new.bin.enc \
|
|
||||||
--bl31 $DESTDIR/bl31.img.enc \
|
|
||||||
--bl33 $DESTDIR/bl33.bin.enc \
|
|
||||||
--ddrfw1 $DESTDIR/ddr4_1d.fw \
|
|
||||||
--ddrfw2 $DESTDIR/ddr4_2d.fw \
|
|
||||||
--ddrfw3 $DESTDIR/ddr3_1d.fw \
|
|
||||||
--ddrfw4 $DESTDIR/piei.fw \
|
|
||||||
--ddrfw5 $DESTDIR/lpddr4_1d.fw \
|
|
||||||
--ddrfw6 $DESTDIR/lpddr4_2d.fw \
|
|
||||||
--ddrfw7 $DESTDIR/diag_lpddr4.fw \
|
|
||||||
--ddrfw8 $DESTDIR/aml_ddr.fw \
|
|
||||||
--level v3
|
|
||||||
;;
|
|
||||||
|
|
||||||
nanopi-k2)
|
|
||||||
cp $FIPDIR/bl2.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/acs.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl21.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl30.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl301.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl31.img $DESTDIR/
|
|
||||||
cp $(get_build_dir $BOOTLOADER)/u-boot.bin $DESTDIR/bl33.bin
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl30.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl30_zero.bin \
|
|
||||||
$DESTDIR/bl301.bin \
|
|
||||||
$DESTDIR/bl301_zero.bin \
|
|
||||||
$DESTDIR/bl30_new.bin bl30
|
|
||||||
|
|
||||||
$FIPDIR/fip_create --bl30 $DESTDIR/bl30_new.bin \
|
|
||||||
--bl31 $DESTDIR/bl31.img \
|
|
||||||
--bl33 $DESTDIR/bl33.bin \
|
|
||||||
$DESTDIR/fip.bin
|
|
||||||
|
|
||||||
$FIPDIR/fip_create --dump $DESTDIR/fip.bin
|
|
||||||
|
|
||||||
python3 $FIPDIR/acs_tool.py $DESTDIR/bl2.bin \
|
|
||||||
$DESTDIR/bl2_acs.bin \
|
|
||||||
$DESTDIR/acs.bin 0
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl2_acs.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl2_zero.bin \
|
|
||||||
$DESTDIR/bl21.bin \
|
|
||||||
$DESTDIR/bl21_zero.bin \
|
|
||||||
$DESTDIR/bl2_new.bin bl2
|
|
||||||
|
|
||||||
cat $DESTDIR/bl2_new.bin $DESTDIR/fip.bin > $DESTDIR/boot_new.bin
|
|
||||||
|
|
||||||
$FIPDIR/aml_encrypt_gxb --bootsig --input $DESTDIR/boot_new.bin --output $DESTDIR/u-boot.bin
|
|
||||||
;;
|
|
||||||
|
|
||||||
*) # GXL/GXM
|
|
||||||
cp $FIPDIR/bl2.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/acs.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl21.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl30.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl301.bin $DESTDIR/
|
|
||||||
cp $FIPDIR/bl31.img $DESTDIR/
|
|
||||||
cp $(get_build_dir $BOOTLOADER)/u-boot.bin $DESTDIR/bl33.bin
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl30.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl30_zero.bin \
|
|
||||||
$DESTDIR/bl301.bin \
|
|
||||||
$DESTDIR/bl301_zero.bin \
|
|
||||||
$DESTDIR/bl30_new.bin bl30
|
|
||||||
|
|
||||||
python3 $FIPDIR/acs_tool.py $DESTDIR/bl2.bin $DESTDIR/bl2_acs.bin $DESTDIR/acs.bin 0
|
|
||||||
|
|
||||||
$FIPDIR/blx_fix.sh $DESTDIR/bl2_acs.bin \
|
|
||||||
$DESTDIR/zero_tmp \
|
|
||||||
$DESTDIR/bl2_zero.bin \
|
|
||||||
$DESTDIR/bl21.bin \
|
|
||||||
$DESTDIR/bl21_zero.bin \
|
|
||||||
$DESTDIR/bl2_new.bin bl2
|
|
||||||
|
|
||||||
$FIPDIR/aml_encrypt_gxl --bl3enc --input $DESTDIR/bl30_new.bin
|
|
||||||
$FIPDIR/aml_encrypt_gxl --bl3enc --input $DESTDIR/bl31.img
|
|
||||||
$FIPDIR/aml_encrypt_gxl --bl3enc --input $DESTDIR/bl33.bin
|
|
||||||
$FIPDIR/aml_encrypt_gxl --bl2sig --input $DESTDIR/bl2_new.bin --output $DESTDIR/bl2.n.bin.sig
|
|
||||||
$FIPDIR/aml_encrypt_gxl --bootmk --output $DESTDIR/u-boot.bin --bl2 $DESTDIR/bl2.n.bin.sig --bl30 $DESTDIR/bl30_new.bin.enc --bl31 $DESTDIR/bl31.img.enc --bl33 $DESTDIR/bl33.bin.enc
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Clean up after previous build
|
# Clean up after previous build
|
||||||
rm -rf $INSTALL/usr/share/bootloader/boot.ini
|
rm -rf "${INSTALL}"/usr/share/bootloader/boot.ini
|
||||||
rm -rf $INSTALL/usr/share/bootloader/u-boot*
|
rm -rf "${INSTALL}"/usr/share/bootloader/u-boot*
|
||||||
|
|
||||||
# Install u-boot
|
# Install u-boot
|
||||||
mkdir -p $INSTALL/usr/share/bootloader
|
mkdir -p "${INSTALL}/usr/share/bootloader"
|
||||||
if [ $UBOOT_SYSTEM != "box" ]; then
|
if [ "${UBOOT_SYSTEM}" != "box" ]; then
|
||||||
if [ -f $DESTDIR/u-boot.bin.sd.bin ]; then
|
if [ -f "${DESTDIR}/u-boot.bin.sd.bin" ]; then
|
||||||
cp -av $DESTDIR/u-boot.bin.sd.bin $INSTALL/usr/share/bootloader
|
cp -av "${DESTDIR}/u-boot.bin.sd.bin" "${INSTALL}/usr/share/bootloader"
|
||||||
|
# If target/u-boot exists, cache the signed bin
|
||||||
|
[ -d "${ROOT}/target/u-boot" ] && cp -av "${DESTDIR}/u-boot.bin.sd.bin" "${ROOT}/target/u-boot/u-boot.bin.sd.bin-${UBOOT_SYSTEM}"
|
||||||
fi
|
fi
|
||||||
if [ -f $DESTDIR/u-boot.bin ]; then
|
if [ -f "${DESTDIR}/u-boot.bin" ]; then
|
||||||
cp -av $DESTDIR/u-boot.bin $INSTALL/usr/share/bootloader
|
cp -av "${DESTDIR}/u-boot.bin" "${INSTALL}/usr/share/bootloader"
|
||||||
|
# If target/u-boot exists, cache the signed bin
|
||||||
|
[ -d "${ROOT}/target/u-boot" ] && cp -av "${DESTDIR}/u-boot.bin" "${ROOT}/target/u-boot/u-boot.bin-${UBOOT_SYSTEM}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install boot.ini if it exists
|
# Install boot.ini if it exists
|
||||||
if find_file_path bootloader/${UBOOT_SYSTEM}.ini; then
|
if find_file_path bootloader/"${UBOOT_SYSTEM}".ini; then
|
||||||
cp -av ${FOUND_PATH} $INSTALL/usr/share/bootloader/boot.ini
|
cp -av "${FOUND_PATH}" "${INSTALL}/usr/share/bootloader/boot.ini"
|
||||||
fi
|
fi
|
||||||
|
@ -44,12 +44,31 @@ EOF
|
|||||||
mcopy -s -o "${LE_TMP}/extlinux" ::
|
mcopy -s -o "${LE_TMP}/extlinux" ::
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mkimage_extlinux_fdtdir(){
|
||||||
|
echo "image: copying exlinux.conf"
|
||||||
|
mkdir -p "${LE_TMP}/extlinux"
|
||||||
|
cat << EOF > "${LE_TMP}/extlinux/extlinux.conf"
|
||||||
|
LABEL ${DISTRO}
|
||||||
|
LINUX /${KERNEL_NAME}
|
||||||
|
FDTDIR /
|
||||||
|
APPEND boot=LABEL=${DISTRO_BOOTLABEL} disk=LABEL=${DISTRO_DISKLABEL} quiet ${EXTRA_CMDLINE}
|
||||||
|
EOF
|
||||||
|
mcopy -s -o "${LE_TMP}/extlinux" ::
|
||||||
|
}
|
||||||
|
|
||||||
mkimage_dtb(){
|
mkimage_dtb(){
|
||||||
if [ "$DTB" != "@@DTB_NAME@@" ]; then
|
if [ "$DTB" != "@@DTB_NAME@@" ]; then
|
||||||
echo "image: copying device tree"
|
echo "image: copying device tree"
|
||||||
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/$DTB" ::
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/$DTB" ::
|
||||||
if [ "$DTB" = "meson-g12b-odroid-n2.dtb" ]; then
|
if [ "$DTB" = "meson-g12b-odroid-n2.dtb" ]; then
|
||||||
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-odroid-n2-plus.dtb" ::
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-odroid-n2-plus.dtb" ::
|
||||||
|
elif [ "$DTB" = "meson-g12b-gtking.dtb" ]; then
|
||||||
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-gtking-pro.dtb" ::
|
||||||
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-g12b-gsking-x.dtb" ::
|
||||||
|
elif [ "$DTB" = "meson-gxl-s905x-libretech-cc.dtb" ]; then
|
||||||
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-gxl-s905x-libretech-cc-v2.dtb" ::
|
||||||
|
elif [ "$DTB" = "meson-sm1-odroid-c4.dtb" ]; then
|
||||||
|
mcopy -s -o "${RELEASE_DIR}/3rdparty/bootloader/dtb/meson-sm1-odroid-hc4.dtb" ::
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "image: copying device trees"
|
echo "image: copying device trees"
|
||||||
@ -65,7 +84,12 @@ case "${UBOOT_SYSTEM}" in
|
|||||||
mkimage_bootini
|
mkimage_bootini
|
||||||
mkimage_dtb
|
mkimage_dtb
|
||||||
;;
|
;;
|
||||||
khadas*|lafrite|lepotato|nanopi-k2|odroid*)
|
odroid-n2|odroid-c4)
|
||||||
|
mkimage_uboot
|
||||||
|
mkimage_extlinux_fdtdir
|
||||||
|
mkimage_dtb
|
||||||
|
;;
|
||||||
|
bananapi*|khadas*|lafrite|lepotato|nanopi-k2|odroid*|radxa*|wetek*)
|
||||||
mkimage_uboot
|
mkimage_uboot
|
||||||
mkimage_extlinux
|
mkimage_extlinux
|
||||||
mkimage_dtb
|
mkimage_dtb
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
if fatload mmc 0 0x1000000 u-boot.ext; then go 0x1000000; fi;
|
|
||||||
if fatload usb 0 0x1000000 u-boot.ext; then go 0x1000000; fi;
|
|
||||||
setenv env_addr 0x1040000
|
setenv env_addr 0x1040000
|
||||||
setenv boot_start 'bootm ${loadaddr} - ${dtb_mem_addr}'
|
setenv boot_start 'bootm ${loadaddr} - ${dtb_mem_addr}'
|
||||||
setenv addmac 'if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; fi'
|
setenv addmac 'if printenv mac; then setenv bootargs ${bootargs} mac=${mac}; elif printenv eth_mac; then setenv bootargs ${bootargs} mac=${eth_mac}; fi'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
From 30c07b172a2ecc6f97ba2a781568806ecd8c10f7 Mon Sep 17 00:00:00 2001
|
From 6441a37be7b5f73b21f575afc9414066e7c5dbf2 Mon Sep 17 00:00:00 2001
|
||||||
From: chewitt <github@chrishewitt.net>
|
From: chewitt <github@chrishewitt.net>
|
||||||
Date: Sat, 13 Apr 2019 05:41:51 +0000
|
Date: Sat, 13 Apr 2019 05:41:51 +0000
|
||||||
Subject: [PATCH 01/88] HACK: set meson-gx cma pool to 896MB
|
Subject: [PATCH 01/60] HACK: set meson-gx cma pool to 896MB
|
||||||
|
|
||||||
This change sets the CMA pool to a larger 896MB! value for vdec use
|
This change sets the CMA pool to a larger 896MB! value for vdec use
|
||||||
|
|
||||||
@ -11,10 +11,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
index 0edd137151f8..797e193af8e3 100644
|
index 6b457b2c30a4..b87be6505a0d 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
@@ -46,7 +46,7 @@
|
@@ -52,7 +52,7 @@
|
||||||
linux,cma {
|
linux,cma {
|
||||||
compatible = "shared-dma-pool";
|
compatible = "shared-dma-pool";
|
||||||
reusable;
|
reusable;
|
@ -1,7 +1,7 @@
|
|||||||
From 931e76338cb9030643c0228166258a7448bee56d Mon Sep 17 00:00:00 2001
|
From 92cf54f0adfc83fb83e9f7564027b84f32ddd401 Mon Sep 17 00:00:00 2001
|
||||||
From: chewitt <github@chrishewitt.net>
|
From: chewitt <github@chrishewitt.net>
|
||||||
Date: Wed, 14 Aug 2019 19:58:14 +0000
|
Date: Wed, 14 Aug 2019 19:58:14 +0000
|
||||||
Subject: [PATCH 02/88] HACK: set meson-g12 cma pool to 896MB
|
Subject: [PATCH 02/60] HACK: set meson-g12 cma pool to 896MB
|
||||||
|
|
||||||
This change sets the CMA pool to a larger 896MB! value for vdec use
|
This change sets the CMA pool to a larger 896MB! value for vdec use
|
||||||
|
|
||||||
@ -11,10 +11,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||||
index b858c5e43cc8..3a4f20506a61 100644
|
index 00c6f53290d4..93022e53c0db 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||||
@@ -104,7 +104,7 @@
|
@@ -110,7 +110,7 @@
|
||||||
linux,cma {
|
linux,cma {
|
||||||
compatible = "shared-dma-pool";
|
compatible = "shared-dma-pool";
|
||||||
reusable;
|
reusable;
|
@ -1,7 +1,7 @@
|
|||||||
From 0b3ddc882dfbb2b05b2bee78525d692824efb765 Mon Sep 17 00:00:00 2001
|
From 3d98fa9b2f696f13eaa1baf1d6fa7f6f2ea31287 Mon Sep 17 00:00:00 2001
|
||||||
From: chewitt <github@chrishewitt.net>
|
From: chewitt <github@chrishewitt.net>
|
||||||
Date: Sat, 13 Apr 2019 05:45:18 +0000
|
Date: Sat, 13 Apr 2019 05:45:18 +0000
|
||||||
Subject: [PATCH 03/88] HACK: arm64: fix Kodi sysinfo CPU information
|
Subject: [PATCH 03/60] HACK: arm64: fix Kodi sysinfo CPU information
|
||||||
|
|
||||||
This allows the CPU information to show in the Kodi sysinfo screen, e.g.
|
This allows the CPU information to show in the Kodi sysinfo screen, e.g.
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
|
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
|
||||||
index 77605aec25fe..d69b4e486098 100644
|
index 87731fea5e41..322fec5320e3 100644
|
||||||
--- a/arch/arm64/kernel/cpuinfo.c
|
--- a/arch/arm64/kernel/cpuinfo.c
|
||||||
+++ b/arch/arm64/kernel/cpuinfo.c
|
+++ b/arch/arm64/kernel/cpuinfo.c
|
||||||
@@ -148,8 +148,7 @@ static int c_show(struct seq_file *m, void *v)
|
@@ -148,8 +148,7 @@ static int c_show(struct seq_file *m, void *v)
|
@ -1,7 +1,7 @@
|
|||||||
From 75325878062f46b0236ccdb6140cde7b2f490794 Mon Sep 17 00:00:00 2001
|
From 796ed17addc9f7c7ab713b0d33fa7429ead84589 Mon Sep 17 00:00:00 2001
|
||||||
From: kszaq <kszaquitto@gmail.com>
|
From: kszaq <kszaquitto@gmail.com>
|
||||||
Date: Sat, 6 Jul 2019 07:54:44 +0000
|
Date: Sat, 6 Jul 2019 07:54:44 +0000
|
||||||
Subject: [PATCH 04/88] HACK: arm64: dts: meson-gx: add ATF BL32 reserved
|
Subject: [PATCH 04/60] HACK: arm64: dts: meson-gx: add ATF BL32 reserved
|
||||||
memory region
|
memory region
|
||||||
|
|
||||||
Vendor firmware/uboot has an additional reserved region for BL32 trusted
|
Vendor firmware/uboot has an additional reserved region for BL32 trusted
|
||||||
@ -16,10 +16,10 @@ Signed-off-by: kszaq <kszaquitto@gmail.com>
|
|||||||
1 file changed, 6 insertions(+)
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
index 797e193af8e3..cf9eb7c8a6f0 100644
|
index b87be6505a0d..99b8916e0c5d 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
@@ -43,6 +43,12 @@
|
@@ -49,6 +49,12 @@
|
||||||
no-map;
|
no-map;
|
||||||
};
|
};
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 7d2c3c596ee8b4703a2d4ba2f9f513d38e032541 Mon Sep 17 00:00:00 2001
|
From 8cb8fc73cc2f53b73300037edfe81c9f9f6d5f4e Mon Sep 17 00:00:00 2001
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
Date: Thu, 3 Nov 2016 15:29:23 +0100
|
Date: Thu, 3 Nov 2016 15:29:23 +0100
|
||||||
Subject: [PATCH 46/88] WIP: arm64: meson: add Amlogic Meson GX PM Suspend
|
Subject: [PATCH 05/60] HACK: arm64: meson: add Amlogic Meson GX PM Suspend
|
||||||
|
|
||||||
The Amlogic Meson GX SoCs uses a non-standard argument to the
|
The Amlogic Meson GX SoCs uses a non-standard argument to the
|
||||||
PSCI CPU_SUSPEND call to enter system suspend.
|
PSCI CPU_SUSPEND call to enter system suspend.
|
@ -1,7 +1,7 @@
|
|||||||
From 97f099f7b4e954a67d4c2612211520c6778559da Mon Sep 17 00:00:00 2001
|
From f84b9abfe184af1bedf58c7492430b68cc6a0ac2 Mon Sep 17 00:00:00 2001
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
Date: Thu, 3 Nov 2016 15:29:25 +0100
|
Date: Thu, 3 Nov 2016 15:29:25 +0100
|
||||||
Subject: [PATCH 49/88] WIP: arm64: dts: meson: add support for GX PM and
|
Subject: [PATCH 06/60] HACK: arm64: dts: meson: add support for GX PM and
|
||||||
Virtual RTC
|
Virtual RTC
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
@ -10,7 +10,7 @@ Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|||||||
1 file changed, 9 insertions(+)
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
index e58ebe3ba65c..a717e93eea94 100644
|
index 99b8916e0c5d..d6dc407127cd 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
|
||||||
@@ -221,6 +221,10 @@
|
@@ -221,6 +221,10 @@
|
@ -1,7 +1,7 @@
|
|||||||
From 0036ea5b743d40190574fbd1d65ac19d37913050 Mon Sep 17 00:00:00 2001
|
From 16e0395a999865b4450e46f3d53df3ed3ea7c023 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Thu, 21 Jan 2021 01:35:36 +0000
|
Date: Thu, 21 Jan 2021 01:35:36 +0000
|
||||||
Subject: [PATCH 50/88] WIP: arm64: dts: meson: add rtc/vrtc aliases to Khadas
|
Subject: [PATCH 07/60] HACK: arm64: dts: meson: add rtc/vrtc aliases to Khadas
|
||||||
VIM
|
VIM
|
||||||
|
|
||||||
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
|
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
|
||||||
@ -13,7 +13,7 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
||||||
index 60feac0179c0..df287b12975b 100644
|
index 6ab1cc125b96..24af15e18026 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
||||||
@@ -29,6 +29,8 @@
|
@@ -29,6 +29,8 @@
|
@ -0,0 +1,30 @@
|
|||||||
|
From c8d74b62cbf8c0f7c1cd331607540660a0e4d830 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Sat, 6 Nov 2021 13:01:08 +0000
|
||||||
|
Subject: [PATCH 08/60] HACK: arm64: dts: meson: add rtc/vrtc aliases to Khadas
|
||||||
|
VIM2
|
||||||
|
|
||||||
|
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
|
||||||
|
while the onboard rtc chip claims /dev/rtc0.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||||
|
index 86bdc0baf032..9c26d7489d2a 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||||
|
@@ -18,6 +18,8 @@
|
||||||
|
aliases {
|
||||||
|
serial0 = &uart_AO;
|
||||||
|
serial2 = &uart_AO_B;
|
||||||
|
+ rtc0 = &rtc;
|
||||||
|
+ rtc1 = &vrtc;
|
||||||
|
};
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 9a81dd203d2707526822ccdb79e58e5a13db5ac5 Mon Sep 17 00:00:00 2001
|
From e2a996cefcd8feaa1ebd986b3f811571c7649293 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Mon, 1 Feb 2021 19:27:40 +0000
|
Date: Mon, 1 Feb 2021 19:27:40 +0000
|
||||||
Subject: [PATCH 51/88] WIP: arm64: dts: meson: add rtc/vrtc aliases to Minix
|
Subject: [PATCH 09/60] HACK: arm64: dts: meson: add rtc/vrtc aliases to Minix
|
||||||
NEO U9-H
|
NEO U9-H
|
||||||
|
|
||||||
Add node aliases to prevent meson-vrtc from claiming /dev/rtc0
|
Add node aliases to prevent meson-vrtc from claiming /dev/rtc0
|
||||||
@ -12,7 +12,7 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 5 insertions(+)
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
||||||
index a414cd39c2b1..443cea738e53 100644
|
index ea9f234d1fc7..3a0955ce3c39 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
||||||
@@ -14,6 +14,11 @@
|
@@ -14,6 +14,11 @@
|
@ -0,0 +1,36 @@
|
|||||||
|
From aaab5272187b1650776371c4381ea1373d818d1a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stefan Agner <stefan@agner.ch>
|
||||||
|
Date: Wed, 15 Sep 2021 05:00:45 +0000
|
||||||
|
Subject: [PATCH 10/60] HACK: of: partial revert of fdt.c changes
|
||||||
|
|
||||||
|
This resolves reports similar to the below which are present in dmesg
|
||||||
|
since Linux 5.10; which are also causing crashes in some distros:
|
||||||
|
|
||||||
|
[ 0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'secmon@5000000': base 0x0000000005000000, size 3 MiB
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/of/fdt.c | 7 -------
|
||||||
|
1 file changed, 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
|
||||||
|
index 4546572af24b..cf5c100cc5d4 100644
|
||||||
|
--- a/drivers/of/fdt.c
|
||||||
|
+++ b/drivers/of/fdt.c
|
||||||
|
@@ -480,13 +480,6 @@ static int __init early_init_dt_reserve_memory_arch(phys_addr_t base,
|
||||||
|
phys_addr_t size, bool nomap)
|
||||||
|
{
|
||||||
|
if (nomap) {
|
||||||
|
- /*
|
||||||
|
- * If the memory is already reserved (by another region), we
|
||||||
|
- * should not allow it to be marked nomap.
|
||||||
|
- */
|
||||||
|
- if (memblock_is_region_reserved(base, size))
|
||||||
|
- return -EBUSY;
|
||||||
|
-
|
||||||
|
return memblock_mark_nomap(base, size);
|
||||||
|
}
|
||||||
|
return memblock_reserve(base, size);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 92f35a36faa4dbcf0e562566a1f4a4a2deb615ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Sat, 16 May 2020 07:04:58 +0000
|
||||||
|
Subject: [PATCH 11/60] FROMGIT: dt-bindings: arm: amlogic: add support for
|
||||||
|
Radxa Zero
|
||||||
|
|
||||||
|
Radxa Zero is a small form-factor SBC with an Amlogic S905Y2 chip.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Acked-by: Rob Herring <robh@kernel.org>
|
||||||
|
---
|
||||||
|
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
index 6423377710ee..67dccdd9a5a4 100644
|
||||||
|
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
@@ -141,6 +141,7 @@ properties:
|
||||||
|
- enum:
|
||||||
|
- amediatech,x96-max
|
||||||
|
- amlogic,u200
|
||||||
|
+ - radxa,zero
|
||||||
|
- seirobotics,sei510
|
||||||
|
- const: amlogic,g12a
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,453 @@
|
|||||||
|
From be960f16c8f919f083ebf6a1727d23da2b4690d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Fri, 6 Aug 2021 12:16:10 +0000
|
||||||
|
Subject: [PATCH 12/60] FROMGIT: arm64: dts: amlogic: add support for Radxa
|
||||||
|
Zero
|
||||||
|
|
||||||
|
Radxa Zero is a small form factor SBC based on the Amlogic S905Y2
|
||||||
|
chipset that ships in a number of RAM/eMMC configurations:
|
||||||
|
|
||||||
|
Boards with 512MB/1GB LPDDR4 RAM have no eMMC storage and BCM43436
|
||||||
|
wireless (2.4GHz b/g/n) while 2GB/4GB boards have 8/16/32/64/128GB
|
||||||
|
eMMC storage and BCM4345 wireless (2.4/5GHz a/b/g/n/ac).
|
||||||
|
|
||||||
|
- Amlogic S905Y2 quad-core Cortex-A53
|
||||||
|
- Mali G31-MP2 GPU
|
||||||
|
- HDMI 2.1 output (micro)
|
||||||
|
- 1x USB 2.0 port - Type C (OTG)
|
||||||
|
- 1x USB 3.0 port - Type C (Host)
|
||||||
|
- 1x micro SD Card slot
|
||||||
|
- 40 Pin GPIO header
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||||
|
.../dts/amlogic/meson-g12a-radxa-zero.dts | 405 ++++++++++++++++++
|
||||||
|
2 files changed, 406 insertions(+)
|
||||||
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
|
index faa0a79a34f5..be308361e2f1 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
|
||||||
|
+dtb-$(CONFIG_ARCH_MESON) += meson-g12a-radxa-zero.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..e3bb6df42ff3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||||
|
@@ -0,0 +1,405 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2018 BayLibre SAS. All rights reserved.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "meson-g12a.dtsi"
|
||||||
|
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||||
|
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "radxa,zero", "amlogic,g12a";
|
||||||
|
+ model = "Radxa Zero";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ serial0 = &uart_AO;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial0:115200n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ memory@0 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x0 0x0 0x0 0x40000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ cvbs-connector {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ compatible = "composite-video-connector";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ cvbs_connector_in: endpoint {
|
||||||
|
+ remote-endpoint = <&cvbs_vdac_out>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi-connector {
|
||||||
|
+ compatible = "hdmi-connector";
|
||||||
|
+ type = "a";
|
||||||
|
+
|
||||||
|
+ port {
|
||||||
|
+ hdmi_connector_in: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ emmc_pwrseq: emmc-pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-emmc";
|
||||||
|
+ reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ sdio_pwrseq: sdio-pwrseq {
|
||||||
|
+ compatible = "mmc-pwrseq-simple";
|
||||||
|
+ reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
||||||
|
+ clocks = <&wifi32k>;
|
||||||
|
+ clock-names = "ext_clock";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ ao_5v: regulator-ao_5v {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "AO_5V";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_1v8: regulator-vcc_1v8 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "VCC_1V8";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ vin-supply = <&vcc_3v3>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_3v3: regulator-vcc_3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "VCC_3V3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ vin-supply = <&vddao_3v3>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ hdmi_pw: regulator-hdmi_pw {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "HDMI_PW";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ vin-supply = <&ao_5v>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vddao_1v8: regulator-vddao_1v8 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "VDDAO_1V8";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ vin-supply = <&vddao_3v3>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vddao_3v3: regulator-vddao_3v3 {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "VDDAO_3V3";
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+ vin-supply = <&ao_5v>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vddcpu: regulator-vddcpu {
|
||||||
|
+ compatible = "pwm-regulator";
|
||||||
|
+
|
||||||
|
+ regulator-name = "VDDCPU";
|
||||||
|
+ regulator-min-microvolt = <721000>;
|
||||||
|
+ regulator-max-microvolt = <1022000>;
|
||||||
|
+
|
||||||
|
+ vin-supply = <&ao_5v>;
|
||||||
|
+
|
||||||
|
+ pwms = <&pwm_AO_cd 1 1250 0>;
|
||||||
|
+ pwm-dutycycle-range = <100 0>;
|
||||||
|
+
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ sound {
|
||||||
|
+ compatible = "amlogic,axg-sound-card";
|
||||||
|
+ model = "RADXA-ZERO";
|
||||||
|
+ audio-aux-devs = <&tdmout_b>;
|
||||||
|
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||||
|
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||||
|
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||||
|
+ "TDM_B Playback", "TDMOUT_B OUT";
|
||||||
|
+
|
||||||
|
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||||
|
+ <&clkc CLKID_MPLL0>,
|
||||||
|
+ <&clkc CLKID_MPLL1>;
|
||||||
|
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||||
|
+ assigned-clock-rates = <294912000>,
|
||||||
|
+ <270950400>,
|
||||||
|
+ <393216000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ dai-link-0 {
|
||||||
|
+ sound-dai = <&frddr_a>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-1 {
|
||||||
|
+ sound-dai = <&frddr_b>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-2 {
|
||||||
|
+ sound-dai = <&frddr_c>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /* 8ch hdmi interface */
|
||||||
|
+ dai-link-3 {
|
||||||
|
+ sound-dai = <&tdmif_b>;
|
||||||
|
+ dai-format = "i2s";
|
||||||
|
+ dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||||
|
+ dai-tdm-slot-tx-mask-1 = <1 1>;
|
||||||
|
+ dai-tdm-slot-tx-mask-2 = <1 1>;
|
||||||
|
+ dai-tdm-slot-tx-mask-3 = <1 1>;
|
||||||
|
+ mclk-fs = <256>;
|
||||||
|
+
|
||||||
|
+ codec {
|
||||||
|
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-4 {
|
||||||
|
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||||
|
+
|
||||||
|
+ codec {
|
||||||
|
+ sound-dai = <&hdmi_tx>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wifi32k: wifi32k {
|
||||||
|
+ compatible = "pwm-clock";
|
||||||
|
+ #clock-cells = <0>;
|
||||||
|
+ clock-frequency = <32768>;
|
||||||
|
+ pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&arb {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cec_AO {
|
||||||
|
+ pinctrl-0 = <&cec_ao_a_h_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ hdmi-phandle = <&hdmi_tx>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cecb_AO {
|
||||||
|
+ pinctrl-0 = <&cec_ao_b_h_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ status = "okay";
|
||||||
|
+ hdmi-phandle = <&hdmi_tx>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&clkc_audio {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ cpu-supply = <&vddcpu>;
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+ clocks = <&clkc CLKID_CPU_CLK>;
|
||||||
|
+ clock-latency = <50000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu1 {
|
||||||
|
+ cpu-supply = <&vddcpu>;
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+ clocks = <&clkc CLKID_CPU_CLK>;
|
||||||
|
+ clock-latency = <50000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu2 {
|
||||||
|
+ cpu-supply = <&vddcpu>;
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+ clocks = <&clkc CLKID_CPU_CLK>;
|
||||||
|
+ clock-latency = <50000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu3 {
|
||||||
|
+ cpu-supply = <&vddcpu>;
|
||||||
|
+ operating-points-v2 = <&cpu_opp_table>;
|
||||||
|
+ clocks = <&clkc CLKID_CPU_CLK>;
|
||||||
|
+ clock-latency = <50000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cvbs_vdac_port {
|
||||||
|
+ cvbs_vdac_out: endpoint {
|
||||||
|
+ remote-endpoint = <&cvbs_connector_in>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&frddr_a {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&frddr_b {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&frddr_c {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi_tx {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ hdmi-supply = <&hdmi_pw>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&hdmi_tx_tmds_port {
|
||||||
|
+ hdmi_tx_tmds_out: endpoint {
|
||||||
|
+ remote-endpoint = <&hdmi_connector_in>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ir {
|
||||||
|
+ status = "disabled";
|
||||||
|
+ pinctrl-0 = <&remote_input_ao_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pwm_AO_cd {
|
||||||
|
+ pinctrl-0 = <&pwm_ao_d_e_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ clocks = <&xtal>;
|
||||||
|
+ clock-names = "clkin1";
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pwm_ef {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&pwm_e_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ clocks = <&xtal>;
|
||||||
|
+ clock-names = "clkin0";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&saradc {
|
||||||
|
+ status = "okay";
|
||||||
|
+ vref-supply = <&vddao_1v8>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* SDIO */
|
||||||
|
+&sd_emmc_a {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&sdio_pins>;
|
||||||
|
+ pinctrl-1 = <&sdio_clk_gate_pins>;
|
||||||
|
+ pinctrl-names = "default", "clk-gate";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cap-sd-highspeed;
|
||||||
|
+ sd-uhs-sdr50;
|
||||||
|
+ max-frequency = <100000000>;
|
||||||
|
+
|
||||||
|
+ non-removable;
|
||||||
|
+ disable-wp;
|
||||||
|
+
|
||||||
|
+ /* WiFi firmware requires power to be kept while in suspend */
|
||||||
|
+ keep-power-in-suspend;
|
||||||
|
+
|
||||||
|
+ mmc-pwrseq = <&sdio_pwrseq>;
|
||||||
|
+
|
||||||
|
+ vmmc-supply = <&vddao_3v3>;
|
||||||
|
+ vqmmc-supply = <&vddao_1v8>;
|
||||||
|
+
|
||||||
|
+ brcmf: wifi@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ compatible = "brcm,bcm4329-fmac";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* SD card */
|
||||||
|
+&sd_emmc_b {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&sdcard_c_pins>;
|
||||||
|
+ pinctrl-1 = <&sdcard_clk_gate_c_pins>;
|
||||||
|
+ pinctrl-names = "default", "clk-gate";
|
||||||
|
+
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cap-sd-highspeed;
|
||||||
|
+ max-frequency = <100000000>;
|
||||||
|
+ disable-wp;
|
||||||
|
+
|
||||||
|
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
||||||
|
+ vmmc-supply = <&vddao_3v3>;
|
||||||
|
+ vqmmc-supply = <&vddao_3v3>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* eMMC */
|
||||||
|
+&sd_emmc_c {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
|
||||||
|
+ pinctrl-1 = <&emmc_clk_gate_pins>;
|
||||||
|
+ pinctrl-names = "default", "clk-gate";
|
||||||
|
+
|
||||||
|
+ bus-width = <8>;
|
||||||
|
+ cap-mmc-highspeed;
|
||||||
|
+ mmc-ddr-1_8v;
|
||||||
|
+ mmc-hs200-1_8v;
|
||||||
|
+ max-frequency = <200000000>;
|
||||||
|
+ disable-wp;
|
||||||
|
+
|
||||||
|
+ mmc-pwrseq = <&emmc_pwrseq>;
|
||||||
|
+ vmmc-supply = <&vcc_3v3>;
|
||||||
|
+ vqmmc-supply = <&vcc_1v8>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&tdmif_b {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&tdmout_b {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&tohdmitx {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart_A {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ uart-has-rtscts;
|
||||||
|
+
|
||||||
|
+ bluetooth {
|
||||||
|
+ compatible = "brcm,bcm43438-bt";
|
||||||
|
+ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ max-speed = <2000000>;
|
||||||
|
+ clocks = <&wifi32k>;
|
||||||
|
+ clock-names = "lpo";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart_AO {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&uart_ao_a_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usb {
|
||||||
|
+ status = "okay";
|
||||||
|
+ dr_mode = "host";
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,17 +1,18 @@
|
|||||||
From 2a59ec1861a0dae5694969e14cb42fe6f7991519 Mon Sep 17 00:00:00 2001
|
From 1fcbeb841274082a23ce1bccd597167a56132662 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Fri, 15 May 2020 08:13:00 +0000
|
Date: Fri, 15 May 2020 08:13:00 +0000
|
||||||
Subject: [PATCH 57/88] WIP: arm64: dts: meson: add audio playback to rbox-pro
|
Subject: [PATCH 13/60] FROMGIT: arm64: dts: meson: add audio playback to
|
||||||
|
rbox-pro
|
||||||
|
|
||||||
Add initial support limited to HDMI i2s and SPDIF (LPCM).
|
Add initial support limited to HDMI i2s and SPDIF (LPCM).
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
---
|
---
|
||||||
.../boot/dts/amlogic/meson-gxm-rbox-pro.dts | 80 +++++++++++++++++++
|
.../boot/dts/amlogic/meson-gxm-rbox-pro.dts | 61 +++++++++++++++++++
|
||||||
1 file changed, 80 insertions(+)
|
1 file changed, 61 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
||||||
index dde7cfe12cff..0208c95e92cf 100644
|
index dde7cfe12cff..50137aafab10 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
|
||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
@ -36,33 +37,7 @@ index dde7cfe12cff..0208c95e92cf 100644
|
|||||||
leds {
|
leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
@@ -51,6 +59,25 @@
|
@@ -90,6 +98,59 @@
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
+ vddio_ao18: regulator-vddio_ao18 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VDDIO_AO18";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <1800000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ hdmi_5v: regulator-hdmi-5v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+
|
|
||||||
+ regulator-name = "HDMI_5V";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+
|
|
||||||
+ gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
vddio_boot: regulator-vddio-boot {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "VDDIO_BOOT";
|
|
||||||
@@ -90,6 +117,59 @@
|
|
||||||
clocks = <&wifi32k>;
|
clocks = <&wifi32k>;
|
||||||
clock-names = "ext_clock";
|
clock-names = "ext_clock";
|
||||||
};
|
};
|
@ -0,0 +1,40 @@
|
|||||||
|
From c59abdc476c8dd424ce2731ef5602a2d5dde6ee7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dmitry Shmidt <dimitrysh@google.com>
|
||||||
|
Date: Fri, 8 Oct 2021 03:54:31 +0000
|
||||||
|
Subject: [PATCH 14/60] FROMGIT: arm64: dts: meson-sm1-odroid: add cec nodes
|
||||||
|
|
||||||
|
Enable CEC in same way it is done for other meson odroid devices
|
||||||
|
|
||||||
|
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 14 ++++++++++++++
|
||||||
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||||
|
index 5779e70caccd..0bd1e98a0eef 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
||||||
|
@@ -225,6 +225,20 @@
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&cec_AO {
|
||||||
|
+ pinctrl-0 = <&cec_ao_a_h_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ status = "disabled";
|
||||||
|
+ hdmi-phandle = <&hdmi_tx>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cecb_AO {
|
||||||
|
+ pinctrl-0 = <&cec_ao_b_h_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ status = "okay";
|
||||||
|
+ hdmi-phandle = <&hdmi_tx>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&clkc_audio {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From 6065e3208d647aebec8a3fb7b1986b1b8d8fdd83 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Tue, 12 Oct 2021 04:47:14 +0000
|
||||||
|
Subject: [PATCH 15/60] FROMGIT: arm64: dts: meson-gxbb-wetek: fix HDMI in
|
||||||
|
early boot
|
||||||
|
|
||||||
|
Mark the VDDIO_AO18 regulator always-on and set hdmi-supply for the hdmi_tx
|
||||||
|
node to ensure HDMI is powered in the early stages of boot.
|
||||||
|
|
||||||
|
Fixes: fb72c03e0e32 ("ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2")
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
index a350fee1264d..8e2af986ceba 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
@@ -64,6 +64,7 @@
|
||||||
|
regulator-name = "VDDIO_AO18";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
+ regulator-always-on;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_3v3: regulator-vcc_3v3 {
|
||||||
|
@@ -161,6 +162,7 @@
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
+ hdmi-supply = <&vddio_ao18>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&hdmi_tx_tmds_port {
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From aaa7ab225b8b3f5a58baecf1d4522d893e9f8db5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Tue, 12 Oct 2021 05:13:06 +0000
|
||||||
|
Subject: [PATCH 16/60] FROMGIT: arm64: dts: meson-gxbb-wetek: fix missing GPIO
|
||||||
|
binding
|
||||||
|
|
||||||
|
The absence of this binding appears to be harmless in Linux but it breaks
|
||||||
|
Ethernet support in mainline u-boot. So add the binding (which is present
|
||||||
|
in all other u-boot supported GXBB device-trees).
|
||||||
|
|
||||||
|
Fixes: fb72c03e0e32 ("ARM64: dts: meson-gxbb-wetek: add a wetek specific dtsi to cleanup hub and play2")
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
index 8e2af986ceba..a4d34398da35 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "meson-gxbb.dtsi"
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
From 8e92a8d45aecb19c6bcfe569cf238f0f476b293f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Tue, 12 Oct 2021 04:58:38 +0000
|
||||||
|
Subject: [PATCH 17/60] FROMGIT: arm64: dts: meson-gxbb-wetek: use updated LED
|
||||||
|
bindings
|
||||||
|
|
||||||
|
Update the dts to use the newer style of LED bindings.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
index a4d34398da35..94dafb955301 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
#include "meson-gxbb.dtsi"
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/leds/common.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
@@ -26,8 +27,10 @@
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
|
- led-system {
|
||||||
|
- label = "wetek-play:system-status";
|
||||||
|
+ led-power {
|
||||||
|
+ /* red in suspend or power-off */
|
||||||
|
+ color = <LED_COLOR_ID_BLUE>;
|
||||||
|
+ function = LED_FUNCTION_POWER;
|
||||||
|
gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
|
||||||
|
default-state = "on";
|
||||||
|
panic-indicator;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 4b278c3214195ee59c936ff082a66a6593d1004b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Fri, 20 Aug 2021 01:17:54 +0000
|
||||||
|
Subject: [PATCH 18/60] FROMGIT: soc: amlogic: meson-gx-socinfo: Add S905Y2 ID
|
||||||
|
for Radxa Zero
|
||||||
|
|
||||||
|
Add the SOC ID for the S905Y2 used in the Radxa Zero. Before/After:
|
||||||
|
|
||||||
|
[ 0.321650] soc soc0: Amlogic Meson G12A (Unknown) Revision 28:b (30:2) Detected
|
||||||
|
[ 0.318533] soc soc0: Amlogic Meson G12A (S905Y2) Revision 28:b (30:2) Detected
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/soc/amlogic/meson-gx-socinfo.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/soc/amlogic/meson-gx-socinfo.c b/drivers/soc/amlogic/meson-gx-socinfo.c
|
||||||
|
index 6f54bd832c8b..165f7548401b 100644
|
||||||
|
--- a/drivers/soc/amlogic/meson-gx-socinfo.c
|
||||||
|
+++ b/drivers/soc/amlogic/meson-gx-socinfo.c
|
||||||
|
@@ -65,6 +65,7 @@ static const struct meson_gx_package_id {
|
||||||
|
{ "A113X", 0x25, 0x37, 0xff },
|
||||||
|
{ "A113D", 0x25, 0x22, 0xff },
|
||||||
|
{ "S905D2", 0x28, 0x10, 0xf0 },
|
||||||
|
+ { "S905Y2", 0x28, 0x30, 0xf0 },
|
||||||
|
{ "S905X2", 0x28, 0x40, 0xf0 },
|
||||||
|
{ "A311D", 0x29, 0x10, 0xf0 },
|
||||||
|
{ "S922X", 0x29, 0x40, 0xf0 },
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
From 3ca769d11ba14c46f2bc52fe633dc878c8d6f288 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cai Huoqing <caihuoqing@baidu.com>
|
||||||
|
Date: Tue, 14 Sep 2021 15:10:02 +0000
|
||||||
|
Subject: [PATCH 19/60] FROMGIT: soc: amlogic: canvas: Make use of the helper
|
||||||
|
function devm_platform_ioremap_resource()
|
||||||
|
|
||||||
|
Use the devm_platform_ioremap_resource() helper instead of
|
||||||
|
calling platform_get_resource() and devm_ioremap_resource()
|
||||||
|
separately
|
||||||
|
|
||||||
|
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
|
||||||
|
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Link: https://lore.kernel.org/r/20210908071544.603-1-caihuoqing@baidu.com
|
||||||
|
---
|
||||||
|
drivers/soc/amlogic/meson-canvas.c | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c
|
||||||
|
index d0329ad170d1..383b0cfc584e 100644
|
||||||
|
--- a/drivers/soc/amlogic/meson-canvas.c
|
||||||
|
+++ b/drivers/soc/amlogic/meson-canvas.c
|
||||||
|
@@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free);
|
||||||
|
|
||||||
|
static int meson_canvas_probe(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
- struct resource *res;
|
||||||
|
struct meson_canvas *canvas;
|
||||||
|
struct device *dev = &pdev->dev;
|
||||||
|
|
||||||
|
@@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev)
|
||||||
|
if (!canvas)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
|
- canvas->reg_base = devm_ioremap_resource(dev, res);
|
||||||
|
+ canvas->reg_base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
|
if (IS_ERR(canvas->reg_base))
|
||||||
|
return PTR_ERR(canvas->reg_base);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
From 14f405c0277266c8f09203813c93f2eb2d8be1b5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cai Huoqing <caihuoqing@baidu.com>
|
||||||
|
Date: Tue, 14 Sep 2021 15:10:45 +0000
|
||||||
|
Subject: [PATCH 20/60] FROMGIT: soc: amlogic: meson-clk-measure: Make use of
|
||||||
|
the helper function devm_platform_ioremap_resource()
|
||||||
|
|
||||||
|
Use the devm_platform_ioremap_resource() helper instead of
|
||||||
|
calling platform_get_resource() and devm_ioremap_resource()
|
||||||
|
separately
|
||||||
|
|
||||||
|
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
|
||||||
|
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Link: https://lore.kernel.org/r/20210908071544.603-2-caihuoqing@baidu.com
|
||||||
|
---
|
||||||
|
drivers/soc/amlogic/meson-clk-measure.c | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/soc/amlogic/meson-clk-measure.c b/drivers/soc/amlogic/meson-clk-measure.c
|
||||||
|
index 6dd190270123..3f3039600357 100644
|
||||||
|
--- a/drivers/soc/amlogic/meson-clk-measure.c
|
||||||
|
+++ b/drivers/soc/amlogic/meson-clk-measure.c
|
||||||
|
@@ -606,7 +606,6 @@ static int meson_msr_probe(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
const struct meson_msr_id *match_data;
|
||||||
|
struct meson_msr *priv;
|
||||||
|
- struct resource *res;
|
||||||
|
struct dentry *root, *clks;
|
||||||
|
void __iomem *base;
|
||||||
|
int i;
|
||||||
|
@@ -624,8 +623,7 @@ static int meson_msr_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
|
memcpy(priv->msr_table, match_data, sizeof(priv->msr_table));
|
||||||
|
|
||||||
|
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
|
- base = devm_ioremap_resource(&pdev->dev, res);
|
||||||
|
+ base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
|
if (IS_ERR(base))
|
||||||
|
return PTR_ERR(base);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From d74a4ec6a83b29c7706fe072b933b30b76c38b57 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Tue, 12 Oct 2021 11:19:54 +0000
|
||||||
|
Subject: [PATCH 21/60] FROMGIT: ASoC: meson: implement driver_name for
|
||||||
|
snd_soc_card in meson-card-utils
|
||||||
|
|
||||||
|
Implement driver_name to provide an alternative to card_name for userspace
|
||||||
|
configuration of Amlogic audio cards.
|
||||||
|
|
||||||
|
Suggested-by: Matthias Reichl <hias@horus.com>
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
sound/soc/meson/meson-card-utils.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
|
||||||
|
index 415cc0046e4b..29b0174f4b5c 100644
|
||||||
|
--- a/sound/soc/meson/meson-card-utils.c
|
||||||
|
+++ b/sound/soc/meson/meson-card-utils.c
|
||||||
|
@@ -302,6 +302,7 @@ int meson_card_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
|
priv->card.owner = THIS_MODULE;
|
||||||
|
priv->card.dev = dev;
|
||||||
|
+ priv->card.driver_name = dev->driver->name;
|
||||||
|
priv->match_data = data;
|
||||||
|
|
||||||
|
ret = snd_soc_of_parse_card_name(&priv->card, "model");
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,133 @@
|
|||||||
|
From e25b25780778b016152db20e138f1944ab55fe19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Arnd Bergmann <arnd@arndb.de>
|
||||||
|
Date: Sun, 21 Nov 2021 19:53:25 +0000
|
||||||
|
Subject: [PATCH 22/60] FROMGIT: media: v4l2-core: fix VIDIOC_DQEVENT handling
|
||||||
|
on non-x86
|
||||||
|
|
||||||
|
My previous bugfix addressed an API inconsistency found by syzbot,
|
||||||
|
and it correctly fixed the issue on x86-64 machines, which now behave
|
||||||
|
correctly for both native and compat tasks.
|
||||||
|
|
||||||
|
Unfortunately, John found that the patch broke compat mode on all other
|
||||||
|
architectures, as they can no longer rely on the VIDIOC_DQEVENT_TIME32
|
||||||
|
code from the native handler as a fallback in the compat code.
|
||||||
|
|
||||||
|
The best way I can see for addressing this is to generalize the
|
||||||
|
VIDIOC_DQEVENT32_TIME32 code from x86 and use that for all architectures,
|
||||||
|
leaving only the VIDIOC_DQEVENT32 variant as x86 specific. The original
|
||||||
|
code was trying to be clever and use the same conversion helper for native
|
||||||
|
32-bit code and compat mode, but that turned out to be too obscure so
|
||||||
|
even I missed that bit I had introduced myself when I made the fix.
|
||||||
|
|
||||||
|
Fixes: c344f07aa1b4 ("media: v4l2-core: ignore native time32 ioctls on 64-bit")
|
||||||
|
Reported-by: John Stultz <john.stultz@linaro.org>
|
||||||
|
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||||
|
---
|
||||||
|
drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 41 ++++++++-----------
|
||||||
|
1 file changed, 17 insertions(+), 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
|
||||||
|
index 47aff3b19742..80aaf07b16f2 100644
|
||||||
|
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
|
||||||
|
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
|
||||||
|
@@ -744,10 +744,6 @@ static int put_v4l2_ext_controls32(struct v4l2_ext_controls *p64,
|
||||||
|
/*
|
||||||
|
* x86 is the only compat architecture with different struct alignment
|
||||||
|
* between 32-bit and 64-bit tasks.
|
||||||
|
- *
|
||||||
|
- * On all other architectures, v4l2_event32 and v4l2_event32_time32 are
|
||||||
|
- * the same as v4l2_event and v4l2_event_time32, so we can use the native
|
||||||
|
- * handlers, converting v4l2_event to v4l2_event_time32 if necessary.
|
||||||
|
*/
|
||||||
|
struct v4l2_event32 {
|
||||||
|
__u32 type;
|
||||||
|
@@ -765,21 +761,6 @@ struct v4l2_event32 {
|
||||||
|
__u32 reserved[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
-#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||||
|
-struct v4l2_event32_time32 {
|
||||||
|
- __u32 type;
|
||||||
|
- union {
|
||||||
|
- compat_s64 value64;
|
||||||
|
- __u8 data[64];
|
||||||
|
- } u;
|
||||||
|
- __u32 pending;
|
||||||
|
- __u32 sequence;
|
||||||
|
- struct old_timespec32 timestamp;
|
||||||
|
- __u32 id;
|
||||||
|
- __u32 reserved[8];
|
||||||
|
-};
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
static int put_v4l2_event32(struct v4l2_event *p64,
|
||||||
|
struct v4l2_event32 __user *p32)
|
||||||
|
{
|
||||||
|
@@ -795,7 +776,22 @@ static int put_v4l2_event32(struct v4l2_event *p64,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||||
|
+struct v4l2_event32_time32 {
|
||||||
|
+ __u32 type;
|
||||||
|
+ union {
|
||||||
|
+ compat_s64 value64;
|
||||||
|
+ __u8 data[64];
|
||||||
|
+ } u;
|
||||||
|
+ __u32 pending;
|
||||||
|
+ __u32 sequence;
|
||||||
|
+ struct old_timespec32 timestamp;
|
||||||
|
+ __u32 id;
|
||||||
|
+ __u32 reserved[8];
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static int put_v4l2_event32_time32(struct v4l2_event *p64,
|
||||||
|
struct v4l2_event32_time32 __user *p32)
|
||||||
|
{
|
||||||
|
@@ -811,7 +807,6 @@ static int put_v4l2_event32_time32(struct v4l2_event *p64,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
struct v4l2_edid32 {
|
||||||
|
__u32 pad;
|
||||||
|
@@ -873,9 +868,7 @@ static int put_v4l2_edid32(struct v4l2_edid *p64,
|
||||||
|
#define VIDIOC_QUERYBUF32_TIME32 _IOWR('V', 9, struct v4l2_buffer32_time32)
|
||||||
|
#define VIDIOC_QBUF32_TIME32 _IOWR('V', 15, struct v4l2_buffer32_time32)
|
||||||
|
#define VIDIOC_DQBUF32_TIME32 _IOWR('V', 17, struct v4l2_buffer32_time32)
|
||||||
|
-#ifdef CONFIG_X86_64
|
||||||
|
#define VIDIOC_DQEVENT32_TIME32 _IOR ('V', 89, struct v4l2_event32_time32)
|
||||||
|
-#endif
|
||||||
|
#define VIDIOC_PREPARE_BUF32_TIME32 _IOWR('V', 93, struct v4l2_buffer32_time32)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -929,10 +922,10 @@ unsigned int v4l2_compat_translate_cmd(unsigned int cmd)
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
|
case VIDIOC_DQEVENT32:
|
||||||
|
return VIDIOC_DQEVENT;
|
||||||
|
+#endif
|
||||||
|
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||||
|
case VIDIOC_DQEVENT32_TIME32:
|
||||||
|
return VIDIOC_DQEVENT;
|
||||||
|
-#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return cmd;
|
||||||
|
@@ -1025,10 +1018,10 @@ int v4l2_compat_put_user(void __user *arg, void *parg, unsigned int cmd)
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
|
case VIDIOC_DQEVENT32:
|
||||||
|
return put_v4l2_event32(parg, arg);
|
||||||
|
+#endif
|
||||||
|
#ifdef CONFIG_COMPAT_32BIT_TIME
|
||||||
|
case VIDIOC_DQEVENT32_TIME32:
|
||||||
|
return put_v4l2_event32_time32(parg, arg);
|
||||||
|
-#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
From 8625017fb7c5f6e6547f075272574125e66e2259 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Anand Moon <linux.amoon@gmail.com>
|
||||||
|
Date: Wed, 22 Sep 2021 05:55:57 +0000
|
||||||
|
Subject: [PATCH 23/60] FROMLIST(v1): arm64: dts: meson-g12b-odroid-n2: add 5v
|
||||||
|
regulator gpio
|
||||||
|
|
||||||
|
As described in the Odroid-n2 & Odroid-n2-plus schematics,
|
||||||
|
the 5V regulator is controlled by GPIOH_8 and in Open Drain
|
||||||
|
since this GPIO doesn't support Push-Pull.
|
||||||
|
|
||||||
|
Fixes: c35f6dc5c377 ("arm64: dts: meson: Add minimal support for Odroid-N2")
|
||||||
|
Fixes: ef599f5f3e10 ("arm64: dts: meson: convert ODROID-N2 to dtsi")
|
||||||
|
|
||||||
|
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
|
||||||
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Link: https://lore.kernel.org/r/20210920204739.950-1-linux.amoon@gmail.com
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||||
|
index 4f33820aba1f..e8a00a2f8812 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||||
|
@@ -99,6 +99,8 @@
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-always-on;
|
||||||
|
vin-supply = <&main_12v>;
|
||||||
|
+ gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
|
||||||
|
+ enable-active-high;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc_1v8: regulator-vcc_1v8 {
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 557ca56ff23234e2cd8fce4d3aa1c752bedded9e Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
|
||||||
|
Date: Mon, 20 Sep 2021 09:44:05 +0200
|
||||||
|
Subject: [PATCH 24/60] FROMLIST(v1): hwrng: meson - Improve error handling for
|
||||||
|
core clock
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
-ENOENT (ie. "there is no clock") is fine to ignore for an optional
|
||||||
|
clock, other values are not supposed to be ignored and should be
|
||||||
|
escalated to the caller (e.g. -EPROBE_DEFER). Ignore -ENOENT by using
|
||||||
|
devm_clk_get_optional().
|
||||||
|
|
||||||
|
While touching this code also add an error message for the fatal errors.
|
||||||
|
|
||||||
|
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
||||||
|
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
---
|
||||||
|
drivers/char/hw_random/meson-rng.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/char/hw_random/meson-rng.c b/drivers/char/hw_random/meson-rng.c
|
||||||
|
index e446236e81f2..8bb30282ca46 100644
|
||||||
|
--- a/drivers/char/hw_random/meson-rng.c
|
||||||
|
+++ b/drivers/char/hw_random/meson-rng.c
|
||||||
|
@@ -54,9 +54,10 @@ static int meson_rng_probe(struct platform_device *pdev)
|
||||||
|
if (IS_ERR(data->base))
|
||||||
|
return PTR_ERR(data->base);
|
||||||
|
|
||||||
|
- data->core_clk = devm_clk_get(dev, "core");
|
||||||
|
+ data->core_clk = devm_clk_get_optional(dev, "core");
|
||||||
|
if (IS_ERR(data->core_clk))
|
||||||
|
- data->core_clk = NULL;
|
||||||
|
+ return dev_err_probe(dev, PTR_ERR(data->core_clk),
|
||||||
|
+ "Failed to get core clock\n");
|
||||||
|
|
||||||
|
if (data->core_clk) {
|
||||||
|
ret = clk_prepare_enable(data->core_clk);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,141 @@
|
|||||||
|
From 1918f1f5e7e8ddefa517d945b7dac6cdc73ef17d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
|
Date: Sat, 16 Oct 2021 13:45:35 +0000
|
||||||
|
Subject: [PATCH 25/60] FROMLIST(v2): clk: meson: gxbb: Fix the SDM_EN bit for
|
||||||
|
MPLL0 on GXBB
|
||||||
|
|
||||||
|
There are reports that 48kHz audio does not work on his WeTek Play 2
|
||||||
|
(which uses a GXBB SoC), while 44.1kHz audio works fine on the same
|
||||||
|
board. There are also reports of 48kHz audio working fine on GXL and
|
||||||
|
GXM SoCs, which are using an (almost) identical AIU (audio controller).
|
||||||
|
|
||||||
|
Experimenting has shown that MPLL0 is causing this problem. In the .dts
|
||||||
|
we have by default:
|
||||||
|
|
||||||
|
assigned-clocks = <&clkc CLKID_MPLL0>,
|
||||||
|
<&clkc CLKID_MPLL1>,
|
||||||
|
<&clkc CLKID_MPLL2>;
|
||||||
|
assigned-clock-rates = <294912000>,
|
||||||
|
<270950400>,
|
||||||
|
<393216000>;
|
||||||
|
|
||||||
|
The MPLL0 rate is divisible by 48kHz without remainder and the MPLL1
|
||||||
|
rate is divisible by 44.1kHz without remainder. Swapping these two clock
|
||||||
|
rates "fixes" 48kHz audio but breaks 44.1kHz audio.
|
||||||
|
|
||||||
|
Everything looks normal when looking at the info provided by the common
|
||||||
|
clock framework while playing 48kHz audio (via I2S with mclk-fs = 256):
|
||||||
|
mpll_prediv 1 1 0 2000000000
|
||||||
|
mpll0_div 1 1 0 294909641
|
||||||
|
mpll0 1 1 0 294909641
|
||||||
|
cts_amclk_sel 1 1 0 294909641
|
||||||
|
cts_amclk_div 1 1 0 12287902
|
||||||
|
cts_amclk 1 1 0 12287902
|
||||||
|
|
||||||
|
meson-clk-msr however shows that the actual MPLL0 clock is off by more
|
||||||
|
than 38MHz:
|
||||||
|
mp0_out 333322917 +/-10416Hz
|
||||||
|
|
||||||
|
The rate seen by meson-clk-msr is very close to what we would get when
|
||||||
|
SDM (the fractional part) was ignored:
|
||||||
|
|
||||||
|
(2000000000Hz * 16384) / ((16384 * 6) = 333.33MHz
|
||||||
|
If SDM was considered the we should get close to:
|
||||||
|
(2000000000Hz * 16384) / ((16384 * 6) + 12808) = 294.9MHz
|
||||||
|
|
||||||
|
Further experimenting shows that HHI_MPLL_CNTL7[15] does not have any
|
||||||
|
effect on the rate of MPLL0 as seen my meson-clk-msr (regardless of
|
||||||
|
whether that bit is zero or one the rate is always the same according to
|
||||||
|
meson-clk-msr). Using HHI_MPLL_CNTL[25] on the other hand as SDM_EN
|
||||||
|
results in SDM being considered for the rate output by the hardware. The
|
||||||
|
rate - as seen by meson-clk-msr - matches with what we expect when
|
||||||
|
SDM_EN is enabled (fractional part is being considered, resulting in a
|
||||||
|
294.9MHz output) or disable (fractional part being ignored, resulting in
|
||||||
|
a 333.33MHz output).
|
||||||
|
|
||||||
|
Reported-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||||
|
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
|
---
|
||||||
|
drivers/clk/meson/gxbb.c | 44 +++++++++++++++++++++++++++++++++++++---
|
||||||
|
1 file changed, 41 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
|
||||||
|
index d6eed760327d..608e0e8ca49a 100644
|
||||||
|
--- a/drivers/clk/meson/gxbb.c
|
||||||
|
+++ b/drivers/clk/meson/gxbb.c
|
||||||
|
@@ -713,6 +713,35 @@ static struct clk_regmap gxbb_mpll_prediv = {
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct clk_regmap gxbb_mpll0_div = {
|
||||||
|
+ .data = &(struct meson_clk_mpll_data){
|
||||||
|
+ .sdm = {
|
||||||
|
+ .reg_off = HHI_MPLL_CNTL7,
|
||||||
|
+ .shift = 0,
|
||||||
|
+ .width = 14,
|
||||||
|
+ },
|
||||||
|
+ .sdm_en = {
|
||||||
|
+ .reg_off = HHI_MPLL_CNTL,
|
||||||
|
+ .shift = 25,
|
||||||
|
+ .width = 1,
|
||||||
|
+ },
|
||||||
|
+ .n2 = {
|
||||||
|
+ .reg_off = HHI_MPLL_CNTL7,
|
||||||
|
+ .shift = 16,
|
||||||
|
+ .width = 9,
|
||||||
|
+ },
|
||||||
|
+ .lock = &meson_clk_lock,
|
||||||
|
+ },
|
||||||
|
+ .hw.init = &(struct clk_init_data){
|
||||||
|
+ .name = "mpll0_div",
|
||||||
|
+ .ops = &meson_clk_mpll_ops,
|
||||||
|
+ .parent_hws = (const struct clk_hw *[]) {
|
||||||
|
+ &gxbb_mpll_prediv.hw
|
||||||
|
+ },
|
||||||
|
+ .num_parents = 1,
|
||||||
|
+ },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static struct clk_regmap gxl_mpll0_div = {
|
||||||
|
.data = &(struct meson_clk_mpll_data){
|
||||||
|
.sdm = {
|
||||||
|
.reg_off = HHI_MPLL_CNTL7,
|
||||||
|
@@ -749,7 +778,16 @@ static struct clk_regmap gxbb_mpll0 = {
|
||||||
|
.hw.init = &(struct clk_init_data){
|
||||||
|
.name = "mpll0",
|
||||||
|
.ops = &clk_regmap_gate_ops,
|
||||||
|
- .parent_hws = (const struct clk_hw *[]) { &gxbb_mpll0_div.hw },
|
||||||
|
+ .parent_data = &(const struct clk_parent_data) {
|
||||||
|
+ /*
|
||||||
|
+ * Note:
|
||||||
|
+ * GXL and GXBB have different SDM_EN registers. We
|
||||||
|
+ * fallback to the global naming string mechanism so
|
||||||
|
+ * mpll0_div picks up the appropriate one.
|
||||||
|
+ */
|
||||||
|
+ .name = "mpll0_div",
|
||||||
|
+ .index = -1,
|
||||||
|
+ },
|
||||||
|
.num_parents = 1,
|
||||||
|
.flags = CLK_SET_RATE_PARENT,
|
||||||
|
},
|
||||||
|
@@ -3044,7 +3082,7 @@ static struct clk_hw_onecell_data gxl_hw_onecell_data = {
|
||||||
|
[CLKID_VAPB_1] = &gxbb_vapb_1.hw,
|
||||||
|
[CLKID_VAPB_SEL] = &gxbb_vapb_sel.hw,
|
||||||
|
[CLKID_VAPB] = &gxbb_vapb.hw,
|
||||||
|
- [CLKID_MPLL0_DIV] = &gxbb_mpll0_div.hw,
|
||||||
|
+ [CLKID_MPLL0_DIV] = &gxl_mpll0_div.hw,
|
||||||
|
[CLKID_MPLL1_DIV] = &gxbb_mpll1_div.hw,
|
||||||
|
[CLKID_MPLL2_DIV] = &gxbb_mpll2_div.hw,
|
||||||
|
[CLKID_MPLL_PREDIV] = &gxbb_mpll_prediv.hw,
|
||||||
|
@@ -3439,7 +3477,7 @@ static struct clk_regmap *const gxl_clk_regmaps[] = {
|
||||||
|
&gxbb_mpll0,
|
||||||
|
&gxbb_mpll1,
|
||||||
|
&gxbb_mpll2,
|
||||||
|
- &gxbb_mpll0_div,
|
||||||
|
+ &gxl_mpll0_div,
|
||||||
|
&gxbb_mpll1_div,
|
||||||
|
&gxbb_mpll2_div,
|
||||||
|
&gxbb_cts_amclk_div,
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,233 @@
|
|||||||
|
From 672fdfb31b8d41b0bc70ef8a42b917d566141fb4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
|
Date: Sun, 3 Oct 2021 05:35:48 +0000
|
||||||
|
Subject: [PATCH 26/60] FROMLIST(RFCv1): ASoC: meson: aiu: Fix HDMI codec
|
||||||
|
control selection
|
||||||
|
|
||||||
|
The HDMI controllers on Amlogic Meson SoCs which use the AIU
|
||||||
|
audio-controller have two different audio format inputs:
|
||||||
|
- I2S which is also the only configuration supported on GXBB, GXL and
|
||||||
|
GXM SoCs since there's no SPDIF support in the DesignWare HDMI
|
||||||
|
controller driver (at the time of writing this)
|
||||||
|
- SPDIF can be used optionally, including pass-through formats
|
||||||
|
|
||||||
|
Switching between these requires us to set different registers:
|
||||||
|
AIU_HDMI_CLK_DATA_CTRL[1:0] "HDMI_DATA_CLK_SEL":
|
||||||
|
- 0x0 disables the HDMI output clock
|
||||||
|
- 0x1 selects the PCM clock
|
||||||
|
- 0x2 selects the AIU clock
|
||||||
|
- 0x3 is reserved
|
||||||
|
|
||||||
|
AIU_HDMI_CLK_DATA_CTRL[5:4] "HDMI_DATA_SEL":
|
||||||
|
- 0x0 outputs constant zero, disables HDMI data
|
||||||
|
- 0x1 selects PCM data
|
||||||
|
- 0x2 selects AIU I2S data
|
||||||
|
- 0x3 is reserved
|
||||||
|
|
||||||
|
AIU_CLK_CTRL_MORE[6] "HDMITX_SEL_AOCLKX2":
|
||||||
|
- 0x0 selects cts_i958 as AIU clk to hdmi_tx_audio_master_clk
|
||||||
|
- 0x1 selects cts_aoclkx2_int as AIU clk to hdmi_tx_audio_master_clk
|
||||||
|
|
||||||
|
The Meson8/8b/8m2 vendor driver uses the following settings:
|
||||||
|
SPDIF output to the HDMI controller:
|
||||||
|
- 0x2 (AIU clock) in AIU_HDMI_CLK_DATA_CTRL[1:0]
|
||||||
|
- 0x0 (no HDMI data) in AIU_HDMI_CLK_DATA_CTRL[5:4]
|
||||||
|
- 0x0 (using cts_i958 as AIU clk) in AIU_CLK_CTRL_MORE[6]
|
||||||
|
I2S output to the HDMI controller:
|
||||||
|
- 0x2 (AIU clock) in AIU_HDMI_CLK_DATA_CTRL[1:0]
|
||||||
|
- 0x2 (I2S data) in AIU_HDMI_CLK_DATA_CTRL[5:4]
|
||||||
|
- 0x0 (using cts_aoclkx2_int as AIU clk) in AIU_CLK_CTRL_MORE[6]
|
||||||
|
|
||||||
|
The GXBB/GXL/GXM vendor driver uses the following settings:
|
||||||
|
SPDIF output to the HDMI controller:
|
||||||
|
- not setting AIU_HDMI_CLK_DATA_CTRL at all
|
||||||
|
- 0x0 (using cts_i958 as AIU clk) in AIU_CLK_CTRL_MORE[6]
|
||||||
|
I2S output to the HDMI controller:
|
||||||
|
- 0x2 (AIU clock) in AIU_HDMI_CLK_DATA_CTRL[1:0]
|
||||||
|
- 0x2 (I2S data) in AIU_HDMI_CLK_DATA_CTRL[5:4]
|
||||||
|
- 0x0 (using cts_aoclkx2_int as AIU clk) in AIU_CLK_CTRL_MORE[6]
|
||||||
|
|
||||||
|
Set the three registers at the same time following what the vendor
|
||||||
|
driver does on Meson8/8b/8m2 SoCs. This makes the SPDIF output to the
|
||||||
|
HDMI controller work. The entries and order of the entries in the enum
|
||||||
|
is not changed on purpose to not break old configurations.
|
||||||
|
|
||||||
|
Fixes: b82b734c0e9a7 ("ASoC: meson: aiu: add hdmi codec control support")
|
||||||
|
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
|
---
|
||||||
|
sound/soc/meson/aiu-codec-ctrl.c | 108 ++++++++++++++++++++++--------
|
||||||
|
sound/soc/meson/aiu-encoder-i2s.c | 6 --
|
||||||
|
2 files changed, 80 insertions(+), 34 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/meson/aiu-codec-ctrl.c b/sound/soc/meson/aiu-codec-ctrl.c
|
||||||
|
index c3ea733fce91..2b8575491aeb 100644
|
||||||
|
--- a/sound/soc/meson/aiu-codec-ctrl.c
|
||||||
|
+++ b/sound/soc/meson/aiu-codec-ctrl.c
|
||||||
|
@@ -12,14 +12,60 @@
|
||||||
|
#include "aiu.h"
|
||||||
|
#include "meson-codec-glue.h"
|
||||||
|
|
||||||
|
-#define CTRL_CLK_SEL GENMASK(1, 0)
|
||||||
|
-#define CTRL_DATA_SEL_SHIFT 4
|
||||||
|
-#define CTRL_DATA_SEL (0x3 << CTRL_DATA_SEL_SHIFT)
|
||||||
|
-
|
||||||
|
-static const char * const aiu_codec_ctrl_mux_texts[] = {
|
||||||
|
- "DISABLED", "PCM", "I2S",
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_SEL GENMASK(1, 0)
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_DISABLE 0x0
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_PCM 0x1
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_AIU 0x2
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_SEL GENMASK(5, 4)
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_OUTPUT_ZERO 0x0
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_PCM_DATA 0x1
|
||||||
|
+#define AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_I2S_DATA 0x2
|
||||||
|
+
|
||||||
|
+#define AIU_CLK_CTRL_MORE_AMCLK BIT(6)
|
||||||
|
+
|
||||||
|
+#define AIU_HDMI_CTRL_MUX_DISABLED 0
|
||||||
|
+#define AIU_HDMI_CTRL_MUX_PCM 1
|
||||||
|
+#define AIU_HDMI_CTRL_MUX_I2S 2
|
||||||
|
+
|
||||||
|
+static const char * const aiu_codec_hdmi_ctrl_mux_texts[] = {
|
||||||
|
+ [AIU_HDMI_CTRL_MUX_DISABLED] = "DISABLED",
|
||||||
|
+ [AIU_HDMI_CTRL_MUX_PCM] = "PCM",
|
||||||
|
+ [AIU_HDMI_CTRL_MUX_I2S] = "I2S",
|
||||||
|
};
|
||||||
|
|
||||||
|
+static int aiu_codec_ctrl_mux_get_enum(struct snd_kcontrol *kcontrol,
|
||||||
|
+ struct snd_ctl_elem_value *ucontrol)
|
||||||
|
+{
|
||||||
|
+ struct snd_soc_component *component =
|
||||||
|
+ snd_soc_dapm_kcontrol_component(kcontrol);
|
||||||
|
+ unsigned int ctrl, more, mux = AIU_HDMI_CTRL_MUX_DISABLED;
|
||||||
|
+
|
||||||
|
+ ctrl = snd_soc_component_read(component, AIU_HDMI_CLK_DATA_CTRL);
|
||||||
|
+ if (FIELD_GET(AIU_HDMI_CLK_DATA_CTRL_CLK_SEL, ctrl) !=
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_AIU) {
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ more = snd_soc_component_read(component, AIU_CLK_CTRL_MORE);
|
||||||
|
+ if (FIELD_GET(AIU_HDMI_CLK_DATA_CTRL_DATA_SEL, ctrl) ==
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_I2S_DATA &&
|
||||||
|
+ !!(more & AIU_CLK_CTRL_MORE_AMCLK)) {
|
||||||
|
+ mux = AIU_HDMI_CTRL_MUX_I2S;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (FIELD_GET(AIU_HDMI_CLK_DATA_CTRL_DATA_SEL, ctrl) ==
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_OUTPUT_ZERO &&
|
||||||
|
+ !(more & AIU_CLK_CTRL_MORE_AMCLK)) {
|
||||||
|
+ mux = AIU_HDMI_CTRL_MUX_PCM;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+out:
|
||||||
|
+ ucontrol->value.enumerated.item[0] = mux;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int aiu_codec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
|
||||||
|
struct snd_ctl_elem_value *ucontrol)
|
||||||
|
{
|
||||||
|
@@ -28,45 +74,51 @@ static int aiu_codec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
|
||||||
|
struct snd_soc_dapm_context *dapm =
|
||||||
|
snd_soc_dapm_kcontrol_dapm(kcontrol);
|
||||||
|
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
|
||||||
|
- unsigned int mux, changed;
|
||||||
|
+ unsigned int mux, ctrl, more;
|
||||||
|
|
||||||
|
mux = snd_soc_enum_item_to_val(e, ucontrol->value.enumerated.item[0]);
|
||||||
|
- changed = snd_soc_component_test_bits(component, e->reg,
|
||||||
|
- CTRL_DATA_SEL,
|
||||||
|
- FIELD_PREP(CTRL_DATA_SEL, mux));
|
||||||
|
|
||||||
|
- if (!changed)
|
||||||
|
- return 0;
|
||||||
|
+ if (mux == AIU_HDMI_CTRL_MUX_I2S) {
|
||||||
|
+ ctrl = FIELD_PREP(AIU_HDMI_CLK_DATA_CTRL_DATA_SEL,
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_I2S_DATA);
|
||||||
|
+ more = AIU_CLK_CTRL_MORE_AMCLK;
|
||||||
|
+ } else {
|
||||||
|
+ ctrl = FIELD_PREP(AIU_HDMI_CLK_DATA_CTRL_DATA_SEL,
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_DATA_SEL_OUTPUT_ZERO);
|
||||||
|
+ more = 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (mux == AIU_HDMI_CTRL_MUX_DISABLED) {
|
||||||
|
+ ctrl |= FIELD_PREP(AIU_HDMI_CLK_DATA_CTRL_CLK_SEL,
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_DISABLE);
|
||||||
|
+ } else {
|
||||||
|
+ ctrl |= FIELD_PREP(AIU_HDMI_CLK_DATA_CTRL_CLK_SEL,
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_CLK_SEL_AIU);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* Force disconnect of the mux while updating */
|
||||||
|
snd_soc_dapm_mux_update_power(dapm, kcontrol, 0, NULL, NULL);
|
||||||
|
|
||||||
|
- /* Reset the source first */
|
||||||
|
- snd_soc_component_update_bits(component, e->reg,
|
||||||
|
- CTRL_CLK_SEL |
|
||||||
|
- CTRL_DATA_SEL,
|
||||||
|
- FIELD_PREP(CTRL_CLK_SEL, 0) |
|
||||||
|
- FIELD_PREP(CTRL_DATA_SEL, 0));
|
||||||
|
+ snd_soc_component_update_bits(component, AIU_HDMI_CLK_DATA_CTRL,
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_CLK_SEL |
|
||||||
|
+ AIU_HDMI_CLK_DATA_CTRL_DATA_SEL,
|
||||||
|
+ ctrl);
|
||||||
|
|
||||||
|
- /* Set the appropriate source */
|
||||||
|
- snd_soc_component_update_bits(component, e->reg,
|
||||||
|
- CTRL_CLK_SEL |
|
||||||
|
- CTRL_DATA_SEL,
|
||||||
|
- FIELD_PREP(CTRL_CLK_SEL, mux) |
|
||||||
|
- FIELD_PREP(CTRL_DATA_SEL, mux));
|
||||||
|
+ snd_soc_component_update_bits(component, AIU_CLK_CTRL_MORE,
|
||||||
|
+ AIU_CLK_CTRL_MORE_AMCLK,
|
||||||
|
+ more);
|
||||||
|
|
||||||
|
snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static SOC_ENUM_SINGLE_DECL(aiu_hdmi_ctrl_mux_enum, AIU_HDMI_CLK_DATA_CTRL,
|
||||||
|
- CTRL_DATA_SEL_SHIFT,
|
||||||
|
- aiu_codec_ctrl_mux_texts);
|
||||||
|
+static SOC_ENUM_SINGLE_VIRT_DECL(aiu_hdmi_ctrl_mux_enum,
|
||||||
|
+ aiu_codec_hdmi_ctrl_mux_texts);
|
||||||
|
|
||||||
|
static const struct snd_kcontrol_new aiu_hdmi_ctrl_mux =
|
||||||
|
SOC_DAPM_ENUM_EXT("HDMI Source", aiu_hdmi_ctrl_mux_enum,
|
||||||
|
- snd_soc_dapm_get_enum_double,
|
||||||
|
+ aiu_codec_ctrl_mux_get_enum,
|
||||||
|
aiu_codec_ctrl_mux_put_enum);
|
||||||
|
|
||||||
|
static const struct snd_soc_dapm_widget aiu_hdmi_ctrl_widgets[] = {
|
||||||
|
diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
|
index 932224552146..f8378066d448 100644
|
||||||
|
--- a/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
|
+++ b/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
|
@@ -24,7 +24,6 @@
|
||||||
|
#define AIU_CLK_CTRL_AOCLK_INVERT BIT(6)
|
||||||
|
#define AIU_CLK_CTRL_LRCLK_INVERT BIT(7)
|
||||||
|
#define AIU_CLK_CTRL_LRCLK_SKEW GENMASK(9, 8)
|
||||||
|
-#define AIU_CLK_CTRL_MORE_HDMI_AMCLK BIT(6)
|
||||||
|
#define AIU_CLK_CTRL_MORE_I2S_DIV GENMASK(5, 0)
|
||||||
|
#define AIU_CODEC_DAC_LRCLK_CTRL_DIV GENMASK(11, 0)
|
||||||
|
|
||||||
|
@@ -208,11 +207,6 @@ static int aiu_encoder_i2s_set_clocks(struct snd_soc_component *component,
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
- /* Make sure amclk is used for HDMI i2s as well */
|
||||||
|
- snd_soc_component_update_bits(component, AIU_CLK_CTRL_MORE,
|
||||||
|
- AIU_CLK_CTRL_MORE_HDMI_AMCLK,
|
||||||
|
- AIU_CLK_CTRL_MORE_HDMI_AMCLK);
|
||||||
|
-
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 30c6fc86c9027949f04928cc5e7fb2b5bfcf721a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||||
|
Date: Wed, 20 Oct 2021 20:03:05 +0000
|
||||||
|
Subject: [PATCH 27/60] FROMLIST(v1): ASoC: meson: axg-card: make links
|
||||||
|
nonatomic
|
||||||
|
|
||||||
|
Non atomic operations need to be performed in the trigger callback
|
||||||
|
of the TDM interfaces. Those are BEs but what matters is the nonatomic
|
||||||
|
flag of the FE in the DPCM context. Just set nonatomic for everything so,
|
||||||
|
at least, it is clear.
|
||||||
|
|
||||||
|
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||||
|
---
|
||||||
|
sound/soc/meson/axg-card.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c
|
||||||
|
index 2b77010c2c5c..cbbaa55d92a6 100644
|
||||||
|
--- a/sound/soc/meson/axg-card.c
|
||||||
|
+++ b/sound/soc/meson/axg-card.c
|
||||||
|
@@ -320,6 +320,7 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
|
||||||
|
|
||||||
|
dai_link->cpus = cpu;
|
||||||
|
dai_link->num_cpus = 1;
|
||||||
|
+ dai_link->nonatomic = true;
|
||||||
|
|
||||||
|
ret = meson_card_parse_dai(card, np, &dai_link->cpus->of_node,
|
||||||
|
&dai_link->cpus->dai_name);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
From 17c65fae4e17678468e7eb0c6107914adad7852f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||||
|
Date: Wed, 20 Oct 2021 20:03:57 +0000
|
||||||
|
Subject: [PATCH 28/60] FROMLIST(v1): ASoC: meson: axg-tdm-interface: manage
|
||||||
|
formatters in trigger
|
||||||
|
|
||||||
|
So far, the formatters have been reset/enabled using the .prepare()
|
||||||
|
callback. This was done in this callback because walking the formatters use
|
||||||
|
a mutex so it could not be done in .trigger(), which is atomic by default.
|
||||||
|
|
||||||
|
It turns out there is a problem on capture path of the AXG series.
|
||||||
|
The FIFO may get out of sync with the TDM decoder if the IP are not enabled
|
||||||
|
in a specific order. The FIFO must be enabled before the formatter starts
|
||||||
|
producing data. IOW, we must deal with FE before the BE. The .prepare()
|
||||||
|
callback is called on the BEs before the FE so it is not OK for the AXG.
|
||||||
|
|
||||||
|
The .trigger() callback order can be configured, and it deals with the FE
|
||||||
|
before the BEs by default. To solve our problem, we just need to start and
|
||||||
|
stop the formatters from the .trigger() callback. It is OK do so now that
|
||||||
|
the links have been made 'nonatomic' in the card driver.
|
||||||
|
|
||||||
|
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||||
|
---
|
||||||
|
sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++++++-----
|
||||||
|
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c
|
||||||
|
index 87cac440b369..db077773af7a 100644
|
||||||
|
--- a/sound/soc/meson/axg-tdm-interface.c
|
||||||
|
+++ b/sound/soc/meson/axg-tdm-interface.c
|
||||||
|
@@ -351,13 +351,29 @@ static int axg_tdm_iface_hw_free(struct snd_pcm_substream *substream,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int axg_tdm_iface_prepare(struct snd_pcm_substream *substream,
|
||||||
|
+static int axg_tdm_iface_trigger(struct snd_pcm_substream *substream,
|
||||||
|
+ int cmd,
|
||||||
|
struct snd_soc_dai *dai)
|
||||||
|
{
|
||||||
|
- struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
|
||||||
|
+ struct axg_tdm_stream *ts =
|
||||||
|
+ snd_soc_dai_get_dma_data(dai, substream);
|
||||||
|
+
|
||||||
|
+ switch (cmd) {
|
||||||
|
+ case SNDRV_PCM_TRIGGER_START:
|
||||||
|
+ case SNDRV_PCM_TRIGGER_RESUME:
|
||||||
|
+ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||||
|
+ axg_tdm_stream_start(ts);
|
||||||
|
+ break;
|
||||||
|
+ case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
|
+ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||||
|
+ case SNDRV_PCM_TRIGGER_STOP:
|
||||||
|
+ axg_tdm_stream_stop(ts);
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ return -EINVAL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- /* Force all attached formatters to update */
|
||||||
|
- return axg_tdm_stream_reset(ts);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int axg_tdm_iface_remove_dai(struct snd_soc_dai *dai)
|
||||||
|
@@ -397,8 +413,8 @@ static const struct snd_soc_dai_ops axg_tdm_iface_ops = {
|
||||||
|
.set_fmt = axg_tdm_iface_set_fmt,
|
||||||
|
.startup = axg_tdm_iface_startup,
|
||||||
|
.hw_params = axg_tdm_iface_hw_params,
|
||||||
|
- .prepare = axg_tdm_iface_prepare,
|
||||||
|
.hw_free = axg_tdm_iface_hw_free,
|
||||||
|
+ .trigger = axg_tdm_iface_trigger,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TDM Backend DAIs */
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 54b8e155e8fdb914751f1d8ed53f9edd66470008 Mon Sep 17 00:00:00 2001
|
From 87f2074b73cf0d82a3cc77e0cba3761ea893b6b6 Mon Sep 17 00:00:00 2001
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
Date: Thu, 14 Jan 2021 17:43:02 +0100
|
Date: Thu, 14 Jan 2021 17:43:02 +0100
|
||||||
Subject: [PATCH 67/88] WIP: mmc: meson-gx-mmc: set core clock phase to 270
|
Subject: [PATCH 29/60] WIP: mmc: meson-gx-mmc: set core clock phase to 270
|
||||||
degres for AXG compatible controllers
|
degres for AXG compatible controllers
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
@ -10,7 +10,7 @@ Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|||||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
|
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
|
||||||
index 13f6a2c0ed04..073d5bf41aef 100644
|
index 8f36536cb1b6..a7cd96aefa8c 100644
|
||||||
--- a/drivers/mmc/host/meson-gx-mmc.c
|
--- a/drivers/mmc/host/meson-gx-mmc.c
|
||||||
+++ b/drivers/mmc/host/meson-gx-mmc.c
|
+++ b/drivers/mmc/host/meson-gx-mmc.c
|
||||||
@@ -38,6 +38,7 @@
|
@@ -38,6 +38,7 @@
|
||||||
@ -29,7 +29,7 @@ index 13f6a2c0ed04..073d5bf41aef 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct sd_emmc_desc {
|
struct sd_emmc_desc {
|
||||||
@@ -414,7 +416,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
|
@@ -426,7 +428,7 @@ static int meson_mmc_clk_init(struct meson_host *host)
|
||||||
/* init SD_EMMC_CLOCK to sane defaults w/min clock rate */
|
/* init SD_EMMC_CLOCK to sane defaults w/min clock rate */
|
||||||
clk_reg = CLK_ALWAYS_ON(host);
|
clk_reg = CLK_ALWAYS_ON(host);
|
||||||
clk_reg |= CLK_DIV_MASK;
|
clk_reg |= CLK_DIV_MASK;
|
||||||
@ -38,7 +38,7 @@ index 13f6a2c0ed04..073d5bf41aef 100644
|
|||||||
clk_reg |= FIELD_PREP(CLK_TX_PHASE_MASK, CLK_PHASE_0);
|
clk_reg |= FIELD_PREP(CLK_TX_PHASE_MASK, CLK_PHASE_0);
|
||||||
clk_reg |= FIELD_PREP(CLK_RX_PHASE_MASK, CLK_PHASE_0);
|
clk_reg |= FIELD_PREP(CLK_RX_PHASE_MASK, CLK_PHASE_0);
|
||||||
writel(clk_reg, host->regs + SD_EMMC_CLOCK);
|
writel(clk_reg, host->regs + SD_EMMC_CLOCK);
|
||||||
@@ -1240,6 +1242,7 @@ static const struct meson_mmc_data meson_gx_data = {
|
@@ -1336,6 +1338,7 @@ static const struct meson_mmc_data meson_gx_data = {
|
||||||
.rx_delay_mask = CLK_V2_RX_DELAY_MASK,
|
.rx_delay_mask = CLK_V2_RX_DELAY_MASK,
|
||||||
.always_on = CLK_V2_ALWAYS_ON,
|
.always_on = CLK_V2_ALWAYS_ON,
|
||||||
.adjust = SD_EMMC_ADJUST,
|
.adjust = SD_EMMC_ADJUST,
|
||||||
@ -46,7 +46,7 @@ index 13f6a2c0ed04..073d5bf41aef 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct meson_mmc_data meson_axg_data = {
|
static const struct meson_mmc_data meson_axg_data = {
|
||||||
@@ -1247,6 +1250,7 @@ static const struct meson_mmc_data meson_axg_data = {
|
@@ -1343,6 +1346,7 @@ static const struct meson_mmc_data meson_axg_data = {
|
||||||
.rx_delay_mask = CLK_V3_RX_DELAY_MASK,
|
.rx_delay_mask = CLK_V3_RX_DELAY_MASK,
|
||||||
.always_on = CLK_V3_ALWAYS_ON,
|
.always_on = CLK_V3_ALWAYS_ON,
|
||||||
.adjust = SD_EMMC_V3_ADJUST,
|
.adjust = SD_EMMC_V3_ADJUST,
|
@ -0,0 +1,29 @@
|
|||||||
|
From 8009e7c2cdf4f88da111c80c84b7d71f37527c6c Mon Sep 17 00:00:00 2001
|
||||||
|
From: benjamin545 <benjamin545@gmail.com>
|
||||||
|
Date: Thu, 15 Jul 2021 14:32:33 -0400
|
||||||
|
Subject: [PATCH 30/60] WIP: drivers: meson: vdec: remove redundant if
|
||||||
|
statement
|
||||||
|
|
||||||
|
checking if sess->fmt_out->pixfmt is V4L2_PIX_FMT_VP9 was already done
|
||||||
|
as a condition to enter the if statement where this additional check is performed
|
||||||
|
---
|
||||||
|
drivers/staging/media/meson/vdec/esparser.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
index db7022707ff8..e18334e57fc0 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
@@ -314,8 +314,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)
|
||||||
|
num_dst_bufs = codec_ops->num_pending_bufs(sess);
|
||||||
|
|
||||||
|
num_dst_bufs += v4l2_m2m_num_dst_bufs_ready(sess->m2m_ctx);
|
||||||
|
- if (sess->fmt_out->pixfmt == V4L2_PIX_FMT_VP9)
|
||||||
|
- num_dst_bufs -= 3;
|
||||||
|
+ num_dst_bufs -= 3;
|
||||||
|
|
||||||
|
if (esparser_vififo_get_free_space(sess) < payload_size ||
|
||||||
|
atomic_read(&sess->esparser_queued_bufs) >= num_dst_bufs)
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,586 @@
|
|||||||
|
From 1de7b27fc9e3a46e2e2566c0b5435e1acd050d32 Mon Sep 17 00:00:00 2001
|
||||||
|
From: benjamin545 <benjamin545@gmail.com>
|
||||||
|
Date: Thu, 15 Jul 2021 16:32:39 -0400
|
||||||
|
Subject: [PATCH 31/60] WIP: drivers: meson: vdec: improve mmu and fbc handling
|
||||||
|
and add 10 bit handling
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/staging/media/meson/vdec/codec_h264.c | 3 +-
|
||||||
|
.../media/meson/vdec/codec_hevc_common.c | 164 +++++++++++-------
|
||||||
|
.../media/meson/vdec/codec_hevc_common.h | 3 +-
|
||||||
|
drivers/staging/media/meson/vdec/codec_vp9.c | 36 ++--
|
||||||
|
drivers/staging/media/meson/vdec/esparser.c | 1 +
|
||||||
|
drivers/staging/media/meson/vdec/vdec.h | 1 +
|
||||||
|
.../staging/media/meson/vdec/vdec_helpers.c | 46 +++--
|
||||||
|
.../staging/media/meson/vdec/vdec_helpers.h | 10 +-
|
||||||
|
8 files changed, 163 insertions(+), 101 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/codec_h264.c b/drivers/staging/media/meson/vdec/codec_h264.c
|
||||||
|
index c61128fc4bb9..d53c9a464bde 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/codec_h264.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/codec_h264.c
|
||||||
|
@@ -353,7 +353,8 @@ static void codec_h264_src_change(struct amvdec_session *sess)
|
||||||
|
frame_width, frame_height, crop_right, crop_bottom);
|
||||||
|
|
||||||
|
codec_h264_set_par(sess);
|
||||||
|
- amvdec_src_change(sess, frame_width, frame_height, h264->max_refs + 5);
|
||||||
|
+ amvdec_src_change(sess, frame_width, frame_height,
|
||||||
|
+ h264->max_refs + 5, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.c b/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||||
|
index 0315cc0911cd..d6ed82dc93ca 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.c
|
||||||
|
@@ -30,8 +30,11 @@ const u16 vdec_hevc_parser_cmd[] = {
|
||||||
|
void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)
|
||||||
|
{
|
||||||
|
struct amvdec_core *core = sess->core;
|
||||||
|
- u32 body_size = amvdec_am21c_body_size(sess->width, sess->height);
|
||||||
|
- u32 head_size = amvdec_am21c_head_size(sess->width, sess->height);
|
||||||
|
+ u32 use_mmu = codec_hevc_use_mmu(core->platform->revision,
|
||||||
|
+ sess->pixfmt_cap, is_10bit);
|
||||||
|
+ u32 body_size = amvdec_amfbc_body_size(sess->width, sess->height,
|
||||||
|
+ is_10bit, use_mmu);
|
||||||
|
+ u32 head_size = amvdec_amfbc_head_size(sess->width, sess->height);
|
||||||
|
|
||||||
|
if (!codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit)) {
|
||||||
|
/* Enable 2-plane reference read mode */
|
||||||
|
@@ -39,9 +42,17 @@ void codec_hevc_setup_decode_head(struct amvdec_session *sess, int is_10bit)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* enable mem saving mode for 8-bit */
|
||||||
|
+ if (!is_10bit)
|
||||||
|
+ amvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(9));
|
||||||
|
+ else
|
||||||
|
+ amvdec_clear_dos_bits(core, HEVC_SAO_CTRL5, BIT(9));
|
||||||
|
+
|
||||||
|
if (codec_hevc_use_mmu(core->platform->revision,
|
||||||
|
sess->pixfmt_cap, is_10bit))
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(4));
|
||||||
|
+ else if (!is_10bit)
|
||||||
|
+ amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, BIT(3));
|
||||||
|
else
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_DECOMP_CTL1, 0);
|
||||||
|
|
||||||
|
@@ -73,7 +84,7 @@ static void codec_hevc_setup_buffers_gxbb(struct amvdec_session *sess,
|
||||||
|
|
||||||
|
idx = vb->index;
|
||||||
|
|
||||||
|
- if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit))
|
||||||
|
+ if (codec_hevc_use_fbc(sess->pixfmt_cap, is_10bit))
|
||||||
|
buf_y_paddr = comm->fbc_buffer_paddr[idx];
|
||||||
|
else
|
||||||
|
buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||||
|
@@ -114,8 +125,8 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,
|
||||||
|
{
|
||||||
|
struct amvdec_core *core = sess->core;
|
||||||
|
struct v4l2_m2m_buffer *buf;
|
||||||
|
- u32 revision = core->platform->revision;
|
||||||
|
u32 pixfmt_cap = sess->pixfmt_cap;
|
||||||
|
+ const u32 revision = core->platform->revision;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_CONF_ADDR,
|
||||||
|
@@ -127,12 +138,14 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,
|
||||||
|
dma_addr_t buf_uv_paddr = 0;
|
||||||
|
u32 idx = vb->index;
|
||||||
|
|
||||||
|
- if (codec_hevc_use_mmu(revision, pixfmt_cap, is_10bit))
|
||||||
|
- buf_y_paddr = comm->mmu_header_paddr[idx];
|
||||||
|
- else if (codec_hevc_use_downsample(pixfmt_cap, is_10bit))
|
||||||
|
- buf_y_paddr = comm->fbc_buffer_paddr[idx];
|
||||||
|
- else
|
||||||
|
- buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||||
|
+ if (codec_hevc_use_downsample(pixfmt_cap, is_10bit)) {
|
||||||
|
+ if (codec_hevc_use_mmu(revision, pixfmt_cap, is_10bit))
|
||||||
|
+ buf_y_paddr = comm->mmu_header_paddr[idx];
|
||||||
|
+ else
|
||||||
|
+ buf_y_paddr = comm->fbc_buffer_paddr[idx];
|
||||||
|
+ } else {
|
||||||
|
+ buf_y_paddr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_ANC2AXI_TBL_DATA,
|
||||||
|
buf_y_paddr >> 5);
|
||||||
|
@@ -150,60 +163,67 @@ static void codec_hevc_setup_buffers_gxl(struct amvdec_session *sess,
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_DATA_ADDR, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
-void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,
|
||||||
|
+void codec_hevc_free_mmu_headers(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc_common *comm)
|
||||||
|
{
|
||||||
|
struct device *dev = sess->core->dev;
|
||||||
|
- u32 am21_size = amvdec_am21c_size(sess->width, sess->height);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_REF_PIC_NUM; ++i) {
|
||||||
|
- if (comm->fbc_buffer_vaddr[i]) {
|
||||||
|
- dma_free_coherent(dev, am21_size,
|
||||||
|
- comm->fbc_buffer_vaddr[i],
|
||||||
|
- comm->fbc_buffer_paddr[i]);
|
||||||
|
- comm->fbc_buffer_vaddr[i] = NULL;
|
||||||
|
+ if (comm->mmu_header_vaddr[i]) {
|
||||||
|
+ dma_free_coherent(dev, MMU_COMPRESS_HEADER_SIZE,
|
||||||
|
+ comm->mmu_header_vaddr[i],
|
||||||
|
+ comm->mmu_header_paddr[i]);
|
||||||
|
+ comm->mmu_header_vaddr[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-EXPORT_SYMBOL_GPL(codec_hevc_free_fbc_buffers);
|
||||||
|
+EXPORT_SYMBOL_GPL(codec_hevc_free_mmu_headers);
|
||||||
|
|
||||||
|
-static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess,
|
||||||
|
+static int codec_hevc_alloc_mmu_headers(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc_common *comm)
|
||||||
|
{
|
||||||
|
struct device *dev = sess->core->dev;
|
||||||
|
struct v4l2_m2m_buffer *buf;
|
||||||
|
- u32 am21_size = amvdec_am21c_size(sess->width, sess->height);
|
||||||
|
|
||||||
|
v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {
|
||||||
|
u32 idx = buf->vb.vb2_buf.index;
|
||||||
|
dma_addr_t paddr;
|
||||||
|
- void *vaddr = dma_alloc_coherent(dev, am21_size, &paddr,
|
||||||
|
- GFP_KERNEL);
|
||||||
|
+ void *vaddr = dma_alloc_coherent(dev, MMU_COMPRESS_HEADER_SIZE,
|
||||||
|
+ &paddr, GFP_KERNEL);
|
||||||
|
if (!vaddr) {
|
||||||
|
- codec_hevc_free_fbc_buffers(sess, comm);
|
||||||
|
+ codec_hevc_free_mmu_headers(sess, comm);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
- comm->fbc_buffer_vaddr[idx] = vaddr;
|
||||||
|
- comm->fbc_buffer_paddr[idx] = paddr;
|
||||||
|
+ comm->mmu_header_vaddr[idx] = vaddr;
|
||||||
|
+ comm->mmu_header_paddr[idx] = paddr;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-void codec_hevc_free_mmu_headers(struct amvdec_session *sess,
|
||||||
|
+void codec_hevc_free_fbc_buffers(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc_common *comm)
|
||||||
|
{
|
||||||
|
struct device *dev = sess->core->dev;
|
||||||
|
+ u32 use_mmu;
|
||||||
|
+ u32 am21_size;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
+ use_mmu = codec_hevc_use_mmu(sess->core->platform->revision,
|
||||||
|
+ sess->pixfmt_cap,
|
||||||
|
+ sess->bitdepth == 10 ? 1 : 0);
|
||||||
|
+
|
||||||
|
+ am21_size = amvdec_amfbc_size(sess->width, sess->height,
|
||||||
|
+ sess->bitdepth == 10 ? 1 : 0, use_mmu);
|
||||||
|
+
|
||||||
|
for (i = 0; i < MAX_REF_PIC_NUM; ++i) {
|
||||||
|
- if (comm->mmu_header_vaddr[i]) {
|
||||||
|
- dma_free_coherent(dev, MMU_COMPRESS_HEADER_SIZE,
|
||||||
|
- comm->mmu_header_vaddr[i],
|
||||||
|
- comm->mmu_header_paddr[i]);
|
||||||
|
- comm->mmu_header_vaddr[i] = NULL;
|
||||||
|
+ if (comm->fbc_buffer_vaddr[i]) {
|
||||||
|
+ dma_free_coherent(dev, am21_size,
|
||||||
|
+ comm->fbc_buffer_vaddr[i],
|
||||||
|
+ comm->fbc_buffer_paddr[i]);
|
||||||
|
+ comm->fbc_buffer_vaddr[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -213,33 +233,49 @@ void codec_hevc_free_mmu_headers(struct amvdec_session *sess,
|
||||||
|
comm->mmu_map_paddr);
|
||||||
|
comm->mmu_map_vaddr = NULL;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ codec_hevc_free_mmu_headers(sess, comm);
|
||||||
|
}
|
||||||
|
-EXPORT_SYMBOL_GPL(codec_hevc_free_mmu_headers);
|
||||||
|
+EXPORT_SYMBOL_GPL(codec_hevc_free_fbc_buffers);
|
||||||
|
|
||||||
|
-static int codec_hevc_alloc_mmu_headers(struct amvdec_session *sess,
|
||||||
|
+static int codec_hevc_alloc_fbc_buffers(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc_common *comm)
|
||||||
|
{
|
||||||
|
struct device *dev = sess->core->dev;
|
||||||
|
struct v4l2_m2m_buffer *buf;
|
||||||
|
+ u32 use_mmu;
|
||||||
|
+ u32 am21_size;
|
||||||
|
+ const u32 revision = sess->core->platform->revision;
|
||||||
|
+ const u32 is_10bit = sess->bitdepth == 10 ? 1 : 0;
|
||||||
|
+ int ret;
|
||||||
|
|
||||||
|
- comm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE,
|
||||||
|
- &comm->mmu_map_paddr,
|
||||||
|
- GFP_KERNEL);
|
||||||
|
- if (!comm->mmu_map_vaddr)
|
||||||
|
- return -ENOMEM;
|
||||||
|
+ use_mmu = codec_hevc_use_mmu(revision, sess->pixfmt_cap,
|
||||||
|
+ is_10bit);
|
||||||
|
+
|
||||||
|
+ am21_size = amvdec_amfbc_size(sess->width, sess->height,
|
||||||
|
+ is_10bit, use_mmu);
|
||||||
|
|
||||||
|
v4l2_m2m_for_each_dst_buf(sess->m2m_ctx, buf) {
|
||||||
|
u32 idx = buf->vb.vb2_buf.index;
|
||||||
|
dma_addr_t paddr;
|
||||||
|
- void *vaddr = dma_alloc_coherent(dev, MMU_COMPRESS_HEADER_SIZE,
|
||||||
|
- &paddr, GFP_KERNEL);
|
||||||
|
+ void *vaddr = dma_alloc_coherent(dev, am21_size, &paddr,
|
||||||
|
+ GFP_KERNEL);
|
||||||
|
if (!vaddr) {
|
||||||
|
- codec_hevc_free_mmu_headers(sess, comm);
|
||||||
|
+ codec_hevc_free_fbc_buffers(sess, comm);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
- comm->mmu_header_vaddr[idx] = vaddr;
|
||||||
|
- comm->mmu_header_paddr[idx] = paddr;
|
||||||
|
+ comm->fbc_buffer_vaddr[idx] = vaddr;
|
||||||
|
+ comm->fbc_buffer_paddr[idx] = paddr;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (codec_hevc_use_mmu(revision, sess->pixfmt_cap, is_10bit) &&
|
||||||
|
+ codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {
|
||||||
|
+ ret = codec_hevc_alloc_mmu_headers(sess, comm);
|
||||||
|
+ if (ret) {
|
||||||
|
+ codec_hevc_free_fbc_buffers(sess, comm);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
@@ -250,21 +286,24 @@ int codec_hevc_setup_buffers(struct amvdec_session *sess,
|
||||||
|
int is_10bit)
|
||||||
|
{
|
||||||
|
struct amvdec_core *core = sess->core;
|
||||||
|
+ struct device *dev = core->dev;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
- if (codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {
|
||||||
|
- ret = codec_hevc_alloc_fbc_buffers(sess, comm);
|
||||||
|
- if (ret)
|
||||||
|
- return ret;
|
||||||
|
+ if (codec_hevc_use_mmu(core->platform->revision,
|
||||||
|
+ sess->pixfmt_cap, is_10bit)) {
|
||||||
|
+ comm->mmu_map_vaddr = dma_alloc_coherent(dev, MMU_MAP_SIZE,
|
||||||
|
+ &comm->mmu_map_paddr,
|
||||||
|
+ GFP_KERNEL);
|
||||||
|
+ if (!comm->mmu_map_vaddr)
|
||||||
|
+ return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (codec_hevc_use_mmu(core->platform->revision,
|
||||||
|
- sess->pixfmt_cap, is_10bit)) {
|
||||||
|
- ret = codec_hevc_alloc_mmu_headers(sess, comm);
|
||||||
|
- if (ret) {
|
||||||
|
- codec_hevc_free_fbc_buffers(sess, comm);
|
||||||
|
- return ret;
|
||||||
|
- }
|
||||||
|
+ sess->pixfmt_cap, is_10bit) ||
|
||||||
|
+ codec_hevc_use_downsample(sess->pixfmt_cap, is_10bit)) {
|
||||||
|
+ ret = codec_hevc_alloc_fbc_buffers(sess, comm);
|
||||||
|
+ if (ret)
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (core->platform->revision == VDEC_REVISION_GXBB)
|
||||||
|
@@ -278,19 +317,24 @@ EXPORT_SYMBOL_GPL(codec_hevc_setup_buffers);
|
||||||
|
|
||||||
|
void codec_hevc_fill_mmu_map(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc_common *comm,
|
||||||
|
- struct vb2_buffer *vb)
|
||||||
|
+ struct vb2_buffer *vb,
|
||||||
|
+ u32 is_10bit)
|
||||||
|
{
|
||||||
|
- u32 size = amvdec_am21c_size(sess->width, sess->height);
|
||||||
|
- u32 nb_pages = size / PAGE_SIZE;
|
||||||
|
+ u32 use_mmu;
|
||||||
|
+ u32 size;
|
||||||
|
+ u32 nb_pages;
|
||||||
|
u32 *mmu_map = comm->mmu_map_vaddr;
|
||||||
|
u32 first_page;
|
||||||
|
u32 i;
|
||||||
|
|
||||||
|
- if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M)
|
||||||
|
- first_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT;
|
||||||
|
- else
|
||||||
|
- first_page = vb2_dma_contig_plane_dma_addr(vb, 0) >> PAGE_SHIFT;
|
||||||
|
+ use_mmu = codec_hevc_use_mmu(sess->core->platform->revision,
|
||||||
|
+ sess->pixfmt_cap, is_10bit);
|
||||||
|
+
|
||||||
|
+ size = amvdec_amfbc_size(sess->width, sess->height, is_10bit,
|
||||||
|
+ use_mmu);
|
||||||
|
|
||||||
|
+ nb_pages = size / PAGE_SIZE;
|
||||||
|
+ first_page = comm->fbc_buffer_paddr[vb->index] >> PAGE_SHIFT;
|
||||||
|
for (i = 0; i < nb_pages; ++i)
|
||||||
|
mmu_map[i] = first_page + i;
|
||||||
|
}
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/codec_hevc_common.h b/drivers/staging/media/meson/vdec/codec_hevc_common.h
|
||||||
|
index cf072b8a9da2..13f9f1d90a94 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/codec_hevc_common.h
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/codec_hevc_common.h
|
||||||
|
@@ -64,6 +64,7 @@ int codec_hevc_setup_buffers(struct amvdec_session *sess,
|
||||||
|
|
||||||
|
void codec_hevc_fill_mmu_map(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc_common *comm,
|
||||||
|
- struct vb2_buffer *vb);
|
||||||
|
+ struct vb2_buffer *vb,
|
||||||
|
+ u32 is_10bit);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/codec_vp9.c b/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||||
|
index 897f5d7a6aad..bfc312ec2a56 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/codec_vp9.c
|
||||||
|
@@ -458,12 +458,6 @@ struct codec_vp9 {
|
||||||
|
struct list_head ref_frames_list;
|
||||||
|
u32 frames_num;
|
||||||
|
|
||||||
|
- /* In case of downsampling (decoding with FBC but outputting in NV12M),
|
||||||
|
- * we need to allocate additional buffers for FBC.
|
||||||
|
- */
|
||||||
|
- void *fbc_buffer_vaddr[MAX_REF_PIC_NUM];
|
||||||
|
- dma_addr_t fbc_buffer_paddr[MAX_REF_PIC_NUM];
|
||||||
|
-
|
||||||
|
int ref_frame_map[REF_FRAMES];
|
||||||
|
int next_ref_frame_map[REF_FRAMES];
|
||||||
|
struct vp9_frame *frame_refs[REFS_PER_FRAME];
|
||||||
|
@@ -901,11 +895,8 @@ static void codec_vp9_set_sao(struct amvdec_session *sess,
|
||||||
|
buf_y_paddr =
|
||||||
|
vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||||
|
|
||||||
|
- if (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit)) {
|
||||||
|
- val = amvdec_read_dos(core, HEVC_SAO_CTRL5) & ~0xff0200;
|
||||||
|
- amvdec_write_dos(core, HEVC_SAO_CTRL5, val);
|
||||||
|
- amvdec_write_dos(core, HEVC_CM_BODY_START_ADDR, buf_y_paddr);
|
||||||
|
- }
|
||||||
|
+ if (codec_hevc_use_fbc(sess->pixfmt_cap, vp9->is_10bit))
|
||||||
|
+ amvdec_write_dos(core, HEVC_CM_BODY_START_ADDR, buf_y_paddr);
|
||||||
|
|
||||||
|
if (sess->pixfmt_cap == V4L2_PIX_FMT_NV12M) {
|
||||||
|
buf_y_paddr =
|
||||||
|
@@ -920,8 +911,12 @@ static void codec_vp9_set_sao(struct amvdec_session *sess,
|
||||||
|
|
||||||
|
if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,
|
||||||
|
vp9->is_10bit)) {
|
||||||
|
- amvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR,
|
||||||
|
- vp9->common.mmu_header_paddr[vb->index]);
|
||||||
|
+ dma_addr_t header_adr;
|
||||||
|
+ if (codec_hevc_use_downsample(sess->pixfmt_cap, vp9->is_10bit))
|
||||||
|
+ header_adr = vp9->common.mmu_header_paddr[vb->index];
|
||||||
|
+ else
|
||||||
|
+ header_adr = vb2_dma_contig_plane_dma_addr(vb, 0);
|
||||||
|
+ amvdec_write_dos(core, HEVC_CM_HEADER_START_ADDR, header_adr);
|
||||||
|
/* use HEVC_CM_HEADER_START_ADDR */
|
||||||
|
amvdec_write_dos_bits(core, HEVC_SAO_CTRL5, BIT(10));
|
||||||
|
}
|
||||||
|
@@ -1148,9 +1143,13 @@ static void codec_vp9_set_mc(struct amvdec_session *sess,
|
||||||
|
{
|
||||||
|
struct amvdec_core *core = sess->core;
|
||||||
|
u32 scale = 0;
|
||||||
|
+ u32 use_mmu;
|
||||||
|
u32 sz;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
+ use_mmu = codec_hevc_use_mmu(core->platform->revision,
|
||||||
|
+ sess->pixfmt_cap, vp9->is_10bit);
|
||||||
|
+
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR, 1);
|
||||||
|
codec_vp9_set_refs(sess, vp9);
|
||||||
|
amvdec_write_dos(core, HEVCD_MPP_ANC_CANVAS_ACCCONFIG_ADDR,
|
||||||
|
@@ -1166,8 +1165,9 @@ static void codec_vp9_set_mc(struct amvdec_session *sess,
|
||||||
|
vp9->frame_refs[i]->height != vp9->height)
|
||||||
|
scale = 1;
|
||||||
|
|
||||||
|
- sz = amvdec_am21c_body_size(vp9->frame_refs[i]->width,
|
||||||
|
- vp9->frame_refs[i]->height);
|
||||||
|
+ sz = amvdec_amfbc_body_size(vp9->frame_refs[i]->width,
|
||||||
|
+ vp9->frame_refs[i]->height,
|
||||||
|
+ vp9->is_10bit, use_mmu);
|
||||||
|
|
||||||
|
amvdec_write_dos(core, VP9D_MPP_REFINFO_DATA,
|
||||||
|
vp9->frame_refs[i]->width);
|
||||||
|
@@ -1283,7 +1283,8 @@ static void codec_vp9_process_frame(struct amvdec_session *sess)
|
||||||
|
if (codec_hevc_use_mmu(core->platform->revision, sess->pixfmt_cap,
|
||||||
|
vp9->is_10bit))
|
||||||
|
codec_hevc_fill_mmu_map(sess, &vp9->common,
|
||||||
|
- &vp9->cur_frame->vbuf->vb2_buf);
|
||||||
|
+ &vp9->cur_frame->vbuf->vb2_buf,
|
||||||
|
+ vp9->is_10bit);
|
||||||
|
|
||||||
|
intra_only = param->p.show_frame ? 0 : param->p.intra_only;
|
||||||
|
|
||||||
|
@@ -2132,7 +2133,8 @@ static irqreturn_t codec_vp9_threaded_isr(struct amvdec_session *sess)
|
||||||
|
|
||||||
|
codec_vp9_fetch_rpm(sess);
|
||||||
|
if (codec_vp9_process_rpm(vp9)) {
|
||||||
|
- amvdec_src_change(sess, vp9->width, vp9->height, 16);
|
||||||
|
+ amvdec_src_change(sess, vp9->width, vp9->height, 16,
|
||||||
|
+ vp9->is_10bit ? 10 : 8);
|
||||||
|
|
||||||
|
/* No frame is actually processed */
|
||||||
|
vp9->cur_frame = NULL;
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
index e18334e57fc0..610a92b9f6f2 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
@@ -319,6 +319,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)
|
||||||
|
if (esparser_vififo_get_free_space(sess) < payload_size ||
|
||||||
|
atomic_read(&sess->esparser_queued_bufs) >= num_dst_bufs)
|
||||||
|
return -EAGAIN;
|
||||||
|
+
|
||||||
|
} else if (esparser_vififo_get_free_space(sess) < payload_size) {
|
||||||
|
return -EAGAIN;
|
||||||
|
}
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h
|
||||||
|
index f95445ac0658..e3e4af73447a 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/vdec.h
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/vdec.h
|
||||||
|
@@ -234,6 +234,7 @@ struct amvdec_session {
|
||||||
|
u32 width;
|
||||||
|
u32 height;
|
||||||
|
u32 colorspace;
|
||||||
|
+ u32 bitdepth;
|
||||||
|
u8 ycbcr_enc;
|
||||||
|
u8 quantization;
|
||||||
|
u8 xfer_func;
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||||
|
index b9125c295d1d..bae69b55baf3 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||||
|
@@ -50,32 +50,40 @@ void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val)
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(amvdec_write_parser);
|
||||||
|
|
||||||
|
-/* 4 KiB per 64x32 block */
|
||||||
|
-u32 amvdec_am21c_body_size(u32 width, u32 height)
|
||||||
|
+/* AMFBC body is made out of 64x32 blocks with varying block size */
|
||||||
|
+u32 amvdec_amfbc_body_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu)
|
||||||
|
{
|
||||||
|
u32 width_64 = ALIGN(width, 64) / 64;
|
||||||
|
u32 height_32 = ALIGN(height, 32) / 32;
|
||||||
|
+ u32 blk_size = 4096;
|
||||||
|
|
||||||
|
- return SZ_4K * width_64 * height_32;
|
||||||
|
+ if (!is_10bit) {
|
||||||
|
+ if (use_mmu)
|
||||||
|
+ blk_size = 3200;
|
||||||
|
+ else
|
||||||
|
+ blk_size = 3072;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return blk_size * width_64 * height_32;
|
||||||
|
}
|
||||||
|
-EXPORT_SYMBOL_GPL(amvdec_am21c_body_size);
|
||||||
|
+EXPORT_SYMBOL_GPL(amvdec_amfbc_body_size);
|
||||||
|
|
||||||
|
/* 32 bytes per 128x64 block */
|
||||||
|
-u32 amvdec_am21c_head_size(u32 width, u32 height)
|
||||||
|
+u32 amvdec_amfbc_head_size(u32 width, u32 height)
|
||||||
|
{
|
||||||
|
u32 width_128 = ALIGN(width, 128) / 128;
|
||||||
|
u32 height_64 = ALIGN(height, 64) / 64;
|
||||||
|
|
||||||
|
return 32 * width_128 * height_64;
|
||||||
|
}
|
||||||
|
-EXPORT_SYMBOL_GPL(amvdec_am21c_head_size);
|
||||||
|
+EXPORT_SYMBOL_GPL(amvdec_amfbc_head_size);
|
||||||
|
|
||||||
|
-u32 amvdec_am21c_size(u32 width, u32 height)
|
||||||
|
+u32 amvdec_amfbc_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu)
|
||||||
|
{
|
||||||
|
- return ALIGN(amvdec_am21c_body_size(width, height) +
|
||||||
|
- amvdec_am21c_head_size(width, height), SZ_64K);
|
||||||
|
+ return ALIGN(amvdec_amfbc_body_size(width, height, is_10bit, use_mmu) +
|
||||||
|
+ amvdec_amfbc_head_size(width, height), SZ_64K);
|
||||||
|
}
|
||||||
|
-EXPORT_SYMBOL_GPL(amvdec_am21c_size);
|
||||||
|
+EXPORT_SYMBOL_GPL(amvdec_amfbc_size);
|
||||||
|
|
||||||
|
static int canvas_alloc(struct amvdec_session *sess, u8 *canvas_id)
|
||||||
|
{
|
||||||
|
@@ -436,7 +444,7 @@ void amvdec_set_par_from_dar(struct amvdec_session *sess,
|
||||||
|
EXPORT_SYMBOL_GPL(amvdec_set_par_from_dar);
|
||||||
|
|
||||||
|
void amvdec_src_change(struct amvdec_session *sess, u32 width,
|
||||||
|
- u32 height, u32 dpb_size)
|
||||||
|
+ u32 height, u32 dpb_size, u32 bitdepth)
|
||||||
|
{
|
||||||
|
static const struct v4l2_event ev = {
|
||||||
|
.type = V4L2_EVENT_SOURCE_CHANGE,
|
||||||
|
@@ -444,25 +452,27 @@ void amvdec_src_change(struct amvdec_session *sess, u32 width,
|
||||||
|
|
||||||
|
v4l2_ctrl_s_ctrl(sess->ctrl_min_buf_capture, dpb_size);
|
||||||
|
|
||||||
|
+ sess->bitdepth = bitdepth;
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Check if the capture queue is already configured well for our
|
||||||
|
- * usecase. If so, keep decoding with it and do not send the event
|
||||||
|
+ * usecase. If so, keep decoding with it.
|
||||||
|
*/
|
||||||
|
if (sess->streamon_cap &&
|
||||||
|
sess->width == width &&
|
||||||
|
sess->height == height &&
|
||||||
|
dpb_size <= sess->num_dst_bufs) {
|
||||||
|
sess->fmt_out->codec_ops->resume(sess);
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
+ } else {
|
||||||
|
+ sess->status = STATUS_NEEDS_RESUME;
|
||||||
|
+ sess->changed_format = 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- sess->changed_format = 0;
|
||||||
|
sess->width = width;
|
||||||
|
sess->height = height;
|
||||||
|
- sess->status = STATUS_NEEDS_RESUME;
|
||||||
|
|
||||||
|
- dev_dbg(sess->core->dev, "Res. changed (%ux%u), DPB size %u\n",
|
||||||
|
- width, height, dpb_size);
|
||||||
|
+ dev_dbg(sess->core->dev, "Res. changed (%ux%u), DPB %u, bitdepth %u\n",
|
||||||
|
+ width, height, dpb_size, bitdepth);
|
||||||
|
v4l2_event_queue_fh(&sess->fh, &ev);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(amvdec_src_change);
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.h b/drivers/staging/media/meson/vdec/vdec_helpers.h
|
||||||
|
index cfaed52ab526..e574c4349759 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/vdec_helpers.h
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.h
|
||||||
|
@@ -27,9 +27,10 @@ void amvdec_clear_dos_bits(struct amvdec_core *core, u32 reg, u32 val);
|
||||||
|
u32 amvdec_read_parser(struct amvdec_core *core, u32 reg);
|
||||||
|
void amvdec_write_parser(struct amvdec_core *core, u32 reg, u32 val);
|
||||||
|
|
||||||
|
-u32 amvdec_am21c_body_size(u32 width, u32 height);
|
||||||
|
-u32 amvdec_am21c_head_size(u32 width, u32 height);
|
||||||
|
-u32 amvdec_am21c_size(u32 width, u32 height);
|
||||||
|
+/* Helpers for the Amlogic compressed framebuffer format */
|
||||||
|
+u32 amvdec_amfbc_body_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu);
|
||||||
|
+u32 amvdec_amfbc_head_size(u32 width, u32 height);
|
||||||
|
+u32 amvdec_amfbc_size(u32 width, u32 height, u32 is_10bit, u32 use_mmu);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* amvdec_dst_buf_done_idx() - Signal that a buffer is done decoding
|
||||||
|
@@ -76,9 +77,10 @@ void amvdec_set_par_from_dar(struct amvdec_session *sess,
|
||||||
|
* @width: picture width detected by the hardware
|
||||||
|
* @height: picture height detected by the hardware
|
||||||
|
* @dpb_size: Decoded Picture Buffer size (= amount of buffers for decoding)
|
||||||
|
+ * @bitdepth: Bit depth (usually 10 or 8) of the coded content
|
||||||
|
*/
|
||||||
|
void amvdec_src_change(struct amvdec_session *sess, u32 width,
|
||||||
|
- u32 height, u32 dpb_size);
|
||||||
|
+ u32 height, u32 dpb_size, u32 bitdepth);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* amvdec_abort() - Abort the current decoding session
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,157 @@
|
|||||||
|
From afb9610594bffe6728a10c63c6d4999a1ab1529b Mon Sep 17 00:00:00 2001
|
||||||
|
From: benjamin545 <benjamin545@gmail.com>
|
||||||
|
Date: Mon, 2 Aug 2021 15:18:40 -0400
|
||||||
|
Subject: [PATCH 33/60] WIP: drivers: meson: vdec: add handling to HEVC decoder
|
||||||
|
to show frames when ready
|
||||||
|
|
||||||
|
..rather than when no longer referenced
|
||||||
|
|
||||||
|
the HEVC decode driver would not show the next frame until it was no longer referenced,
|
||||||
|
this would cause a backup of frames that were ready to render but held up by one or more
|
||||||
|
frames that were still referenced. The decoded picture buffer would fill up and stall
|
||||||
|
playback as no new frames could be placed in the decoded picture buffer.
|
||||||
|
---
|
||||||
|
drivers/staging/media/meson/vdec/codec_hevc.c | 52 ++++++++++++-------
|
||||||
|
1 file changed, 34 insertions(+), 18 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/codec_hevc.c b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||||
|
index 3a6fd04a2d33..01218efde99b 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/codec_hevc.c
|
||||||
|
@@ -223,6 +223,7 @@ struct hevc_frame {
|
||||||
|
u32 poc;
|
||||||
|
|
||||||
|
int referenced;
|
||||||
|
+ int show;
|
||||||
|
u32 num_reorder_pic;
|
||||||
|
|
||||||
|
u32 cur_slice_idx;
|
||||||
|
@@ -448,9 +449,11 @@ static void codec_hevc_update_referenced(struct codec_hevc *hevc)
|
||||||
|
((1 << (RPS_USED_BIT - 1)) - 1);
|
||||||
|
if (param->p.CUR_RPS[i] & (1 << (RPS_USED_BIT - 1))) {
|
||||||
|
poc_tmp = curr_poc -
|
||||||
|
- ((1 << (RPS_USED_BIT - 1)) - delt);
|
||||||
|
- } else
|
||||||
|
+ ((1 << (RPS_USED_BIT - 1)) - delt);
|
||||||
|
+ } else {
|
||||||
|
poc_tmp = curr_poc + delt;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (poc_tmp == frame->poc) {
|
||||||
|
is_referenced = 1;
|
||||||
|
break;
|
||||||
|
@@ -462,13 +465,13 @@ static void codec_hevc_update_referenced(struct codec_hevc *hevc)
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct hevc_frame *
|
||||||
|
-codec_hevc_get_lowest_poc_frame(struct codec_hevc *hevc)
|
||||||
|
+codec_hevc_get_next_ready_frame(struct codec_hevc *hevc)
|
||||||
|
{
|
||||||
|
struct hevc_frame *tmp, *ret = NULL;
|
||||||
|
u32 poc = INT_MAX;
|
||||||
|
|
||||||
|
list_for_each_entry(tmp, &hevc->ref_frames_list, list) {
|
||||||
|
- if (tmp->poc < poc) {
|
||||||
|
+ if ((tmp->poc < poc) && tmp->show) {
|
||||||
|
ret = tmp;
|
||||||
|
poc = tmp->poc;
|
||||||
|
}
|
||||||
|
@@ -478,28 +481,35 @@ codec_hevc_get_lowest_poc_frame(struct codec_hevc *hevc)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Try to output as many frames as possible */
|
||||||
|
-static void codec_hevc_output_frames(struct amvdec_session *sess)
|
||||||
|
+static void codec_hevc_show_frames(struct amvdec_session *sess)
|
||||||
|
{
|
||||||
|
- struct hevc_frame *tmp;
|
||||||
|
+ struct hevc_frame *tmp, *n;
|
||||||
|
struct codec_hevc *hevc = sess->priv;
|
||||||
|
|
||||||
|
- while ((tmp = codec_hevc_get_lowest_poc_frame(hevc))) {
|
||||||
|
+ while ((tmp = codec_hevc_get_next_ready_frame(hevc))) {
|
||||||
|
if (hevc->curr_poc &&
|
||||||
|
- (tmp->referenced ||
|
||||||
|
- tmp->num_reorder_pic >= hevc->frames_num))
|
||||||
|
+ (hevc->frames_num <= tmp->num_reorder_pic))
|
||||||
|
break;
|
||||||
|
|
||||||
|
dev_dbg(sess->core->dev, "DONE frame poc %u; vbuf %u\n",
|
||||||
|
tmp->poc, tmp->vbuf->vb2_buf.index);
|
||||||
|
amvdec_dst_buf_done_offset(sess, tmp->vbuf, tmp->offset,
|
||||||
|
V4L2_FIELD_NONE, false);
|
||||||
|
+
|
||||||
|
+ tmp->show = 0;
|
||||||
|
+ hevc->frames_num--;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* clean output frame buffer */
|
||||||
|
+ list_for_each_entry_safe(tmp, n, &hevc->ref_frames_list, list) {
|
||||||
|
+ if (tmp->referenced || tmp->show)
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
list_del(&tmp->list);
|
||||||
|
kfree(tmp);
|
||||||
|
- hevc->frames_num--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
static int
|
||||||
|
codec_hevc_setup_workspace(struct amvdec_session *sess,
|
||||||
|
struct codec_hevc *hevc)
|
||||||
|
@@ -650,14 +660,17 @@ static int codec_hevc_start(struct amvdec_session *sess)
|
||||||
|
static void codec_hevc_flush_output(struct amvdec_session *sess)
|
||||||
|
{
|
||||||
|
struct codec_hevc *hevc = sess->priv;
|
||||||
|
- struct hevc_frame *tmp;
|
||||||
|
+ struct hevc_frame *tmp, *n;
|
||||||
|
|
||||||
|
- while (!list_empty(&hevc->ref_frames_list)) {
|
||||||
|
- tmp = codec_hevc_get_lowest_poc_frame(hevc);
|
||||||
|
+ while ((tmp = codec_hevc_get_next_ready_frame(hevc))) {
|
||||||
|
amvdec_dst_buf_done(sess, tmp->vbuf, V4L2_FIELD_NONE);
|
||||||
|
+ tmp->show = 0;
|
||||||
|
+ hevc->frames_num--;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ list_for_each_entry_safe(tmp, n, &hevc->ref_frames_list, list) {
|
||||||
|
list_del(&tmp->list);
|
||||||
|
kfree(tmp);
|
||||||
|
- hevc->frames_num--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -719,6 +732,7 @@ codec_hevc_prepare_new_frame(struct amvdec_session *sess)
|
||||||
|
|
||||||
|
new_frame->vbuf = vbuf;
|
||||||
|
new_frame->referenced = 1;
|
||||||
|
+ new_frame->show = 1;
|
||||||
|
new_frame->poc = hevc->curr_poc;
|
||||||
|
new_frame->cur_slice_type = params->p.slice_type;
|
||||||
|
new_frame->num_reorder_pic = params->p.sps_num_reorder_pics_0;
|
||||||
|
@@ -1267,7 +1281,7 @@ static int codec_hevc_process_segment(struct amvdec_session *sess)
|
||||||
|
/* First slice: new frame */
|
||||||
|
if (slice_segment_address == 0) {
|
||||||
|
codec_hevc_update_referenced(hevc);
|
||||||
|
- codec_hevc_output_frames(sess);
|
||||||
|
+ codec_hevc_show_frames(sess);
|
||||||
|
|
||||||
|
hevc->cur_frame = codec_hevc_prepare_new_frame(sess);
|
||||||
|
if (!hevc->cur_frame)
|
||||||
|
@@ -1370,9 +1384,11 @@ static void codec_hevc_fetch_rpm(struct amvdec_session *sess)
|
||||||
|
u16 *rpm_vaddr = hevc->workspace_vaddr + RPM_OFFSET;
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
- for (i = 0; i < RPM_SIZE; i += 4)
|
||||||
|
+ for (i = 0; i < RPM_SIZE; i += 4) {
|
||||||
|
for (j = 0; j < 4; j++)
|
||||||
|
- hevc->rpm_param.l.data[i + j] = rpm_vaddr[i + 3 - j];
|
||||||
|
+ hevc->rpm_param.l.data[i + j] =
|
||||||
|
+ rpm_vaddr[i + 3 - j];
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static void codec_hevc_resume(struct amvdec_session *sess)
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
From e4ac25d2996360ae77fcd685f0f5bbbb17635c18 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Sun, 21 Nov 2021 19:12:07 +0000
|
||||||
|
Subject: [PATCH 34/60] WIP: drivers: meson: vdec: add HEVC support to GXBB
|
||||||
|
|
||||||
|
It's not clear whether the GXL firmware is the same one used with GXBB
|
||||||
|
but let's try it and see!
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
drivers/staging/media/meson/vdec/vdec_platform.c | 12 ++++++++++++
|
||||||
|
1 file changed, 12 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||||
|
index 3f463e0538fd..b03527705cc8 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||||
|
@@ -16,6 +16,18 @@
|
||||||
|
|
||||||
|
static const struct amvdec_format vdec_formats_gxbb[] = {
|
||||||
|
{
|
||||||
|
+ .pixfmt = V4L2_PIX_FMT_HEVC,
|
||||||
|
+ .min_buffers = 4,
|
||||||
|
+ .max_buffers = 24,
|
||||||
|
+ .max_width = 3840,
|
||||||
|
+ .max_height = 2160,
|
||||||
|
+ .vdec_ops = &vdec_hevc_ops,
|
||||||
|
+ .codec_ops = &codec_hevc_ops,
|
||||||
|
+ .firmware_path = "meson/vdec/gxl_hevc.bin",
|
||||||
|
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||||
|
+ .flags = V4L2_FMT_FLAG_COMPRESSED |
|
||||||
|
+ V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||||
|
+ }, {
|
||||||
|
.pixfmt = V4L2_PIX_FMT_H264,
|
||||||
|
.min_buffers = 2,
|
||||||
|
.max_buffers = 24,
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,51 @@
|
|||||||
|
From 04190a885f16165acba6c1de28f50ac8d8d4d616 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Date: Mon, 22 Nov 2021 09:15:21 +0000
|
||||||
|
Subject: [PATCH 35/60] WIP: drivers: meson: vdec: check if parser has really
|
||||||
|
parser before marking input buffer as error
|
||||||
|
|
||||||
|
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
---
|
||||||
|
drivers/staging/media/meson/vdec/esparser.c | 14 ++++++++++----
|
||||||
|
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/staging/media/meson/vdec/esparser.c b/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
index 9b6034936d32..bb9480f0a70c 100644
|
||||||
|
--- a/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
+++ b/drivers/staging/media/meson/vdec/esparser.c
|
||||||
|
@@ -300,6 +300,7 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)
|
||||||
|
u32 num_dst_bufs = 0;
|
||||||
|
u32 offset;
|
||||||
|
u32 pad_size;
|
||||||
|
+ u32 wp, wp2;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When max ref frame is held by VP9, this should be -= 3 to prevent a
|
||||||
|
@@ -349,15 +350,20 @@ esparser_queue(struct amvdec_session *sess, struct vb2_v4l2_buffer *vbuf)
|
||||||
|
}
|
||||||
|
|
||||||
|
pad_size = esparser_pad_start_code(core, vb, payload_size);
|
||||||
|
+ wp = amvdec_read_parser(core, PARSER_VIDEO_WP);
|
||||||
|
ret = esparser_write_data(core, phy, payload_size + pad_size);
|
||||||
|
+ wp2 = amvdec_read_parser(core, PARSER_VIDEO_WP);
|
||||||
|
|
||||||
|
if (ret <= 0) {
|
||||||
|
- dev_warn(core->dev, "esparser: input parsing error\n");
|
||||||
|
- amvdec_remove_ts(sess, vb->timestamp);
|
||||||
|
- v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
|
||||||
|
amvdec_write_parser(core, PARSER_FETCH_CMD, 0);
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ if (ret < 0 || wp2 == wp) {
|
||||||
|
+ dev_err(core->dev, "esparser: input parsing error ret %d (%x <=> %x)\n", ret, wp, wp2);
|
||||||
|
+ amvdec_remove_ts(sess, vb->timestamp);
|
||||||
|
+ v4l2_m2m_buf_done(vbuf, VB2_BUF_STATE_ERROR);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
atomic_inc(&sess->esparser_queued_bufs);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,97 @@
|
|||||||
|
From 6dcf2f9273f30e6f9e6222d3e01087908b84caad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Tue, 17 Aug 2021 16:16:43 +0000
|
||||||
|
Subject: [PATCH 36/60] WIP: arm64: dts: amlogic: radxa-zero: add support for
|
||||||
|
the usb type-c controller
|
||||||
|
|
||||||
|
Radxa Zero uses an FUSB302 type-c controller, so lets enable it.
|
||||||
|
|
||||||
|
NB: Polarity swapping via GPIO is not implemented in the current driver
|
||||||
|
(see drivers/usb/typec/tcpm/fusb302.c) so it is not possible to handle
|
||||||
|
GPIOAO_6 for USB3 polarity control.
|
||||||
|
|
||||||
|
Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
.../dts/amlogic/meson-g12a-radxa-zero.dts | 47 +++++++++++++++++++
|
||||||
|
1 file changed, 47 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||||
|
index e3bb6df42ff3..30d799b44559 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts
|
||||||
|
@@ -60,6 +60,17 @@
|
||||||
|
clock-names = "ext_clock";
|
||||||
|
};
|
||||||
|
|
||||||
|
+ typec2_vbus: regulator-typec2_vbus {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "TYPEC2_VBUS";
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ vin-supply = <&ao_5v>;
|
||||||
|
+
|
||||||
|
+ gpio = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ enable-active-high;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
ao_5v: regulator-ao_5v {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "AO_5V";
|
||||||
|
@@ -191,6 +202,18 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+&ao_pinctrl {
|
||||||
|
+ /* Ensure the TYPE C controller irq pin is not driven by the SoC */
|
||||||
|
+ fusb302_irq_pins: fusb302_irq {
|
||||||
|
+ mux {
|
||||||
|
+ groups = "GPIOAO_5";
|
||||||
|
+ function = "gpio_aobus";
|
||||||
|
+ bias-pull-up;
|
||||||
|
+ output-disable;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&arb {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
@@ -278,6 +301,22 @@
|
||||||
|
pinctrl-names = "default";
|
||||||
|
};
|
||||||
|
|
||||||
|
+&i2c_AO {
|
||||||
|
+ fusb302@22 {
|
||||||
|
+ compatible = "fcs,fusb302";
|
||||||
|
+ reg = <0x22>;
|
||||||
|
+
|
||||||
|
+ pinctrl-0 = <&fusb302_irq_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ interrupt-parent = <&gpio_intc>;
|
||||||
|
+ interrupts = <59 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
+
|
||||||
|
+ vbus-supply = <&typec2_vbus>;
|
||||||
|
+
|
||||||
|
+ status = "okay";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
&pwm_AO_cd {
|
||||||
|
pinctrl-0 = <&pwm_ao_d_e_pins>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
@@ -403,3 +442,11 @@
|
||||||
|
status = "okay";
|
||||||
|
dr_mode = "host";
|
||||||
|
};
|
||||||
|
+
|
||||||
|
+&usb2_phy0 {
|
||||||
|
+ phy-supply = <&typec2_vbus>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usb3_pcie_phy {
|
||||||
|
+ phy-supply = <&typec2_vbus>;
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From ff0ee624fc64933c03a9132da00f450ae3558e22 Mon Sep 17 00:00:00 2001
|
From dc121392d96a65e226ba87e7105c462c90f3232d Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Fri, 15 May 2020 07:52:47 +0000
|
Date: Fri, 15 May 2020 07:52:47 +0000
|
||||||
Subject: [PATCH 54/88] WIP: arm64: dts: meson: add audio playback to p201
|
Subject: [PATCH 37/60] WIP: arm64: dts: meson: add audio playback to p201
|
||||||
|
|
||||||
Add initial audio support limited to HDMI i2s.
|
Add initial audio support limited to HDMI i2s.
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From a4d6030f56b249cdd7a6234e157e6f731c89f2f7 Mon Sep 17 00:00:00 2001
|
From 09c0826a05c34391894102abf3dbe925daa9e97a Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Fri, 15 May 2020 07:56:15 +0000
|
Date: Fri, 15 May 2020 07:56:15 +0000
|
||||||
Subject: [PATCH 55/88] WIP: arm64: dts: meson: add audio playback to p200
|
Subject: [PATCH 38/60] WIP: arm64: dts: meson: add audio playback to p200
|
||||||
|
|
||||||
Add initial support limited to HDMI i2s and SPDIF (LPCM).
|
Add initial support limited to HDMI i2s and SPDIF (LPCM).
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 84482c9385e9eeb3420d308908eb78be7a3794c4 Mon Sep 17 00:00:00 2001
|
From a6edde22c0cd4c04635b13b253a72194078653c9 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Fri, 15 May 2020 08:02:54 +0000
|
Date: Fri, 15 May 2020 08:02:54 +0000
|
||||||
Subject: [PATCH 56/88] WIP: arm64: dts: meson: add audio playback to
|
Subject: [PATCH 39/60] WIP: arm64: dts: meson: add audio playback to
|
||||||
p212-s905x dtsi
|
p212-s905x dtsi
|
||||||
|
|
||||||
Add initial audio support limited to HDMI i2s.
|
Add initial audio support limited to HDMI i2s.
|
@ -1,17 +1,17 @@
|
|||||||
From 67e838ec7820b19e5a359280fea47b016cb64d30 Mon Sep 17 00:00:00 2001
|
From 17cf7d25e74c64ad18a85aa8f55d0b7f5f8b795f Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Sun, 17 May 2020 05:00:55 +0000
|
Date: Sun, 17 May 2020 05:00:55 +0000
|
||||||
Subject: [PATCH 58/88] WIP: arm64: dts: meson: add audio playback to u200
|
Subject: [PATCH 40/60] WIP: arm64: dts: meson: add audio playback to u200
|
||||||
|
|
||||||
Add initial support limited to HDMI i2s and SPDIF (LPCM).
|
Add initial support limited to HDMI i2s and SPDIF (LPCM).
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
---
|
---
|
||||||
.../boot/dts/amlogic/meson-g12a-u200.dts | 131 ++++++++++++++++++
|
.../boot/dts/amlogic/meson-g12a-u200.dts | 130 ++++++++++++++++++
|
||||||
1 file changed, 131 insertions(+)
|
1 file changed, 130 insertions(+)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
|
||||||
index a26bfe72550f..280f8159ebb1 100644
|
index 4b5d11e56364..61a85c27a463 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
|
||||||
@@ -8,6 +8,7 @@
|
@@ -8,6 +8,7 @@
|
||||||
@ -36,12 +36,11 @@ index a26bfe72550f..280f8159ebb1 100644
|
|||||||
chosen {
|
chosen {
|
||||||
stdout-path = "serial0:115200n8";
|
stdout-path = "serial0:115200n8";
|
||||||
};
|
};
|
||||||
@@ -147,6 +155,91 @@
|
@@ -147,6 +155,90 @@
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
+
|
+
|
||||||
+
|
|
||||||
+ sound {
|
+ sound {
|
||||||
+ compatible = "amlogic,axg-sound-card";
|
+ compatible = "amlogic,axg-sound-card";
|
||||||
+ model = "U200";
|
+ model = "U200";
|
||||||
@ -128,7 +127,7 @@ index a26bfe72550f..280f8159ebb1 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
&cec_AO {
|
&cec_AO {
|
||||||
@@ -163,6 +256,10 @@
|
@@ -163,6 +255,10 @@
|
||||||
hdmi-phandle = <&hdmi_tx>;
|
hdmi-phandle = <&hdmi_tx>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -139,7 +138,7 @@ index a26bfe72550f..280f8159ebb1 100644
|
|||||||
&cpu0 {
|
&cpu0 {
|
||||||
cpu-supply = <&vddcpu>;
|
cpu-supply = <&vddcpu>;
|
||||||
operating-points-v2 = <&cpu_opp_table>;
|
operating-points-v2 = <&cpu_opp_table>;
|
||||||
@@ -203,6 +300,18 @@
|
@@ -203,6 +299,18 @@
|
||||||
phy-mode = "rmii";
|
phy-mode = "rmii";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -158,7 +157,7 @@ index a26bfe72550f..280f8159ebb1 100644
|
|||||||
&hdmi_tx {
|
&hdmi_tx {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
|
pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
|
||||||
@@ -288,6 +397,28 @@
|
@@ -288,6 +396,28 @@
|
||||||
vqmmc-supply = <&flash_1v8>;
|
vqmmc-supply = <&flash_1v8>;
|
||||||
};
|
};
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 04c165c9794f2ad3b3d18fe3999fb305292cb1e6 Mon Sep 17 00:00:00 2001
|
From 6624d186fdaedc4c3795b741b202987d63e81691 Mon Sep 17 00:00:00 2001
|
||||||
From: Jonas Karlman <jonas@kwiboo.se>
|
From: Jonas Karlman <jonas@kwiboo.se>
|
||||||
Date: Sun, 23 Dec 2018 02:24:38 +0100
|
Date: Sun, 23 Dec 2018 02:24:38 +0100
|
||||||
Subject: [PATCH 62/88] WIP: ASoC: hdmi-codec: reorder channel allocation list
|
Subject: [PATCH 41/60] WIP: ASoC: hdmi-codec: reorder channel allocation list
|
||||||
|
|
||||||
Wrong channel allocation is selected by hdmi_codec_get_ch_alloc_table_idx().
|
Wrong channel allocation is selected by hdmi_codec_get_ch_alloc_table_idx().
|
||||||
|
|
||||||
@ -24,10 +24,10 @@ Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
|||||||
1 file changed, 77 insertions(+), 63 deletions(-)
|
1 file changed, 77 insertions(+), 63 deletions(-)
|
||||||
|
|
||||||
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
|
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
|
||||||
index 0f3ac22f2cf8..9f7573cbfaf4 100644
|
index b61f980cabdc..74e58cd2a021 100644
|
||||||
--- a/sound/soc/codecs/hdmi-codec.c
|
--- a/sound/soc/codecs/hdmi-codec.c
|
||||||
+++ b/sound/soc/codecs/hdmi-codec.c
|
+++ b/sound/soc/codecs/hdmi-codec.c
|
||||||
@@ -189,84 +189,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
|
@@ -188,84 +188,97 @@ static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
|
||||||
/*
|
/*
|
||||||
* hdmi_codec_channel_alloc: speaker configuration available for CEA
|
* hdmi_codec_channel_alloc: speaker configuration available for CEA
|
||||||
*
|
*
|
@ -1,7 +1,7 @@
|
|||||||
From ecfecfa8d87e6ffc0958076467e82b4a26dcab98 Mon Sep 17 00:00:00 2001
|
From a4af329ff09bb610bb7206f629589a2b98d04f29 Mon Sep 17 00:00:00 2001
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
Date: Wed, 23 Dec 2020 02:45:27 +0100
|
Date: Wed, 23 Dec 2020 02:45:27 +0100
|
||||||
Subject: [PATCH 63/88] WIP: ASoC: meson: aiu: encoder-spdif: implement the
|
Subject: [PATCH 42/60] WIP: ASoC: meson: aiu: encoder-spdif: implement the
|
||||||
.mute_stream callback
|
.mute_stream callback
|
||||||
|
|
||||||
Implement the .mute_stream callback based on code from the vendor
|
Implement the .mute_stream callback based on code from the vendor
|
@ -1,7 +1,7 @@
|
|||||||
From 27a0b699cf76c8fc3e2ad354af85bfe3cb04bfc0 Mon Sep 17 00:00:00 2001
|
From b3ddc4fc78ab0ff9e01958408c8c1b2a40633ebf Mon Sep 17 00:00:00 2001
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||||
Date: Wed, 23 Dec 2020 02:46:54 +0100
|
Date: Wed, 23 Dec 2020 02:46:54 +0100
|
||||||
Subject: [PATCH 64/88] WIP: ASoC: meson: aiu: encoder-i2s: implement the
|
Subject: [PATCH 43/60] WIP: ASoC: meson: aiu: encoder-i2s: implement the
|
||||||
.mute_stream callback
|
.mute_stream callback
|
||||||
|
|
||||||
Implement the .mute_stream callback based on the code from the vendor
|
Implement the .mute_stream callback based on the code from the vendor
|
||||||
@ -14,10 +14,10 @@ Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|||||||
2 files changed, 16 insertions(+)
|
2 files changed, 16 insertions(+)
|
||||||
|
|
||||||
diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c
|
diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
index 932224552146..d6aea7797641 100644
|
index f8378066d448..ba3dac987112 100644
|
||||||
--- a/sound/soc/meson/aiu-encoder-i2s.c
|
--- a/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
+++ b/sound/soc/meson/aiu-encoder-i2s.c
|
+++ b/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
@@ -28,6 +28,8 @@
|
@@ -27,6 +27,8 @@
|
||||||
#define AIU_CLK_CTRL_MORE_I2S_DIV GENMASK(5, 0)
|
#define AIU_CLK_CTRL_MORE_I2S_DIV GENMASK(5, 0)
|
||||||
#define AIU_CODEC_DAC_LRCLK_CTRL_DIV GENMASK(11, 0)
|
#define AIU_CODEC_DAC_LRCLK_CTRL_DIV GENMASK(11, 0)
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ index 932224552146..d6aea7797641 100644
|
|||||||
static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component,
|
static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component,
|
||||||
bool enable)
|
bool enable)
|
||||||
{
|
{
|
||||||
@@ -352,6 +354,18 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream,
|
@@ -346,6 +348,18 @@ static void aiu_encoder_i2s_shutdown(struct snd_pcm_substream *substream,
|
||||||
clk_bulk_disable_unprepare(aiu->i2s.clk_num, aiu->i2s.clks);
|
clk_bulk_disable_unprepare(aiu->i2s.clk_num, aiu->i2s.clks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ index 932224552146..d6aea7797641 100644
|
|||||||
const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = {
|
const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = {
|
||||||
.trigger = aiu_encoder_i2s_trigger,
|
.trigger = aiu_encoder_i2s_trigger,
|
||||||
.hw_params = aiu_encoder_i2s_hw_params,
|
.hw_params = aiu_encoder_i2s_hw_params,
|
||||||
@@ -360,5 +374,6 @@ const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = {
|
@@ -354,5 +368,6 @@ const struct snd_soc_dai_ops aiu_encoder_i2s_dai_ops = {
|
||||||
.set_sysclk = aiu_encoder_i2s_set_sysclk,
|
.set_sysclk = aiu_encoder_i2s_set_sysclk,
|
||||||
.startup = aiu_encoder_i2s_startup,
|
.startup = aiu_encoder_i2s_startup,
|
||||||
.shutdown = aiu_encoder_i2s_shutdown,
|
.shutdown = aiu_encoder_i2s_shutdown,
|
@ -1,7 +1,7 @@
|
|||||||
From 56f9f701c98ffbb339f51cbfbaf653ee6fa52111 Mon Sep 17 00:00:00 2001
|
From 2ddece0262c3fae2df9b3579b572936bc5491534 Mon Sep 17 00:00:00 2001
|
||||||
From: Matthias Reichl <hias@horus.com>
|
From: Matthias Reichl <hias@horus.com>
|
||||||
Date: Sat, 20 Mar 2021 08:32:12 +0000
|
Date: Fri, 19 Mar 2021 12:14:17 +0100
|
||||||
Subject: [PATCH 65/88] WIP: ALSA: pcm: fix ELD constraints for some compressed
|
Subject: [PATCH 44/60] WIP: ALSA: pcm: fix ELD constraints for some compressed
|
||||||
audio formats
|
audio formats
|
||||||
|
|
||||||
The SADs of compressed formats like AC3 and DTS contain the channel
|
The SADs of compressed formats like AC3 and DTS contain the channel
|
@ -1,7 +1,7 @@
|
|||||||
From 546929867bf75032dbfa1c94160c4eb417a5efe7 Mon Sep 17 00:00:00 2001
|
From f49ba4a1cbe32f949e68a91f0da55189acccf09e Mon Sep 17 00:00:00 2001
|
||||||
From: Matthias Reichl <hias@horus.com>
|
From: Matthias Reichl <hias@horus.com>
|
||||||
Date: Sat, 20 Mar 2021 10:48:54 +0100
|
Date: Sat, 20 Mar 2021 10:48:54 +0100
|
||||||
Subject: [PATCH 66/88] WIP: ALSA: pcm: ignore formats not supported by kodi in
|
Subject: [PATCH 45/60] WIP: ALSA: pcm: ignore formats not supported by kodi in
|
||||||
ELD constraints
|
ELD constraints
|
||||||
|
|
||||||
Only parse channel info and rates from the PCM SAD. All other SAD
|
Only parse channel info and rates from the PCM SAD. All other SAD
|
@ -1,7 +1,7 @@
|
|||||||
From a2e5abe104b6d593a1a0879b256a2c696acfac0e Mon Sep 17 00:00:00 2001
|
From 00c422fab52c36c4a76ba4f480d887960191db6a Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Wed, 24 Jun 2020 12:41:46 +0000
|
Date: Wed, 24 Jun 2020 12:41:46 +0000
|
||||||
Subject: [PATCH 73/88] arm64: dts: meson: add common SM1 ac2xx dtsi
|
Subject: [PATCH 46/60] arm64: dts: meson: add common SM1 ac2xx dtsi
|
||||||
|
|
||||||
Add a common dtsi for Android STB devices based on the Amlogic S905X3
|
Add a common dtsi for Android STB devices based on the Amlogic S905X3
|
||||||
(AC213/AC214) and S905D3 (AC201/AC202) reference designs. The dtsi is
|
(AC213/AC214) and S905D3 (AC201/AC202) reference designs. The dtsi is
|
||||||
@ -9,16 +9,30 @@ loosely based on the existing SEI610 device-tree.
|
|||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
---
|
---
|
||||||
.../boot/dts/amlogic/meson-sm1-ac2xx.dtsi | 298 ++++++++++++++++++
|
.../devicetree/bindings/arm/amlogic.yaml | 2 +
|
||||||
1 file changed, 298 insertions(+)
|
.../boot/dts/amlogic/meson-sm1-ac2xx.dtsi | 300 ++++++++++++++++++
|
||||||
|
2 files changed, 302 insertions(+)
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
index 67dccdd9a5a4..61aebbb3090e 100644
|
||||||
|
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
@@ -168,6 +168,8 @@ properties:
|
||||||
|
- description: Boards with the Amlogic Meson SM1 S905X3/D3/Y3 SoC
|
||||||
|
items:
|
||||||
|
- enum:
|
||||||
|
+ - amediatech,x96-air-100
|
||||||
|
+ - amediatech,x96-air-1000
|
||||||
|
- bananapi,bpi-m5
|
||||||
|
- hardkernel,odroid-c4
|
||||||
|
- hardkernel,odroid-hc4
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..b3872983b5ce
|
index 000000000000..46a34731f7e2
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
|
||||||
@@ -0,0 +1,298 @@
|
@@ -0,0 +1,300 @@
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2019 BayLibre SAS. All rights reserved.
|
+ * Copyright (c) 2019 BayLibre SAS. All rights reserved.
|
||||||
@ -256,7 +270,8 @@ index 000000000000..b3872983b5ce
|
|||||||
+
|
+
|
||||||
+ bus-width = <4>;
|
+ bus-width = <4>;
|
||||||
+ cap-sd-highspeed;
|
+ cap-sd-highspeed;
|
||||||
+ max-frequency = <100000000>;
|
+ sd-uhs-sdr104;
|
||||||
|
+ max-frequency = <200000000>;
|
||||||
+
|
+
|
||||||
+ non-removable;
|
+ non-removable;
|
||||||
+ disable-wp;
|
+ disable-wp;
|
||||||
@ -270,7 +285,7 @@ index 000000000000..b3872983b5ce
|
|||||||
+ vqmmc-supply = <&vddio_ao1v8>;
|
+ vqmmc-supply = <&vddio_ao1v8>;
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+/* SD card */
|
+/* SD Card */
|
||||||
+&sd_emmc_b {
|
+&sd_emmc_b {
|
||||||
+ status = "okay";
|
+ status = "okay";
|
||||||
+ pinctrl-0 = <&sdcard_c_pins>;
|
+ pinctrl-0 = <&sdcard_c_pins>;
|
||||||
@ -279,7 +294,8 @@ index 000000000000..b3872983b5ce
|
|||||||
+
|
+
|
||||||
+ bus-width = <4>;
|
+ bus-width = <4>;
|
||||||
+ cap-sd-highspeed;
|
+ cap-sd-highspeed;
|
||||||
+ max-frequency = <50000000>;
|
+ /* CRC errors are observed at 50MHz */
|
||||||
|
+ max-frequency = <35000000>;
|
||||||
+ disable-wp;
|
+ disable-wp;
|
||||||
+
|
+
|
||||||
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
@ -1,7 +1,7 @@
|
|||||||
From 90fb7b38afcfc6d1e5b134525e988781cd56adc3 Mon Sep 17 00:00:00 2001
|
From 2efcc5d41cecfba052a80c8645e17bebd6bb849e Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Wed, 24 Jun 2020 15:04:10 +0000
|
Date: Wed, 24 Jun 2020 15:04:10 +0000
|
||||||
Subject: [PATCH 75/88] arm64: dts: meson: add initial device-trees for X96-AIR
|
Subject: [PATCH 47/60] arm64: dts: meson: add initial device-trees for X96-AIR
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
Content-Type: text/plain; charset=UTF-8
|
Content-Type: text/plain; charset=UTF-8
|
||||||
Content-Transfer-Encoding: 8bit
|
Content-Transfer-Encoding: 8bit
|
||||||
@ -29,18 +29,32 @@ and with -1000 suffix supports models with Gigabit Ethernet.
|
|||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
---
|
---
|
||||||
|
.../devicetree/bindings/arm/amlogic.yaml | 2 +
|
||||||
arch/arm64/boot/dts/amlogic/Makefile | 2 +
|
arch/arm64/boot/dts/amlogic/Makefile | 2 +
|
||||||
.../dts/amlogic/meson-sm1-x96-air-100.dts | 112 +++++++++++++++
|
.../dts/amlogic/meson-sm1-x96-air-100.dts | 112 +++++++++++++++
|
||||||
.../dts/amlogic/meson-sm1-x96-air-1000.dts | 133 ++++++++++++++++++
|
.../dts/amlogic/meson-sm1-x96-air-1000.dts | 133 ++++++++++++++++++
|
||||||
3 files changed, 247 insertions(+)
|
4 files changed, 249 insertions(+)
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
index 61aebbb3090e..172ed028e686 100644
|
||||||
|
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
@@ -171,6 +171,8 @@ properties:
|
||||||
|
- amediatech,x96-air-100
|
||||||
|
- amediatech,x96-air-1000
|
||||||
|
- bananapi,bpi-m5
|
||||||
|
+ - cyx,a95xf3-air-100
|
||||||
|
+ - cyx,a95xf3-air-1000
|
||||||
|
- hardkernel,odroid-c4
|
||||||
|
- hardkernel,odroid-hc4
|
||||||
|
- khadas,vim3l
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
index da11ef28a47b..5de47ce6d8a4 100644
|
index be308361e2f1..69f7d5fd29ea 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
@@ -51,4 +51,6 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
@@ -54,4 +54,6 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
@ -1,7 +1,7 @@
|
|||||||
From fcb882d32ac78cf1c121a7cce2242cef327bd67f Mon Sep 17 00:00:00 2001
|
From 3c5414373037e6ecdafe87fecb97e2b083517f63 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Wed, 3 Jun 2020 18:03:22 +0000
|
Date: Wed, 3 Jun 2020 18:03:22 +0000
|
||||||
Subject: [PATCH 77/88] arm64: dts: meson: add initial device-trees for
|
Subject: [PATCH 48/60] arm64: dts: meson: add initial device-trees for
|
||||||
A95XF3-AIR
|
A95XF3-AIR
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
Content-Type: text/plain; charset=UTF-8
|
Content-Type: text/plain; charset=UTF-8
|
||||||
@ -38,10 +38,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-1000.dts
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-1000.dts
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
index 5de47ce6d8a4..47a9d1f85596 100644
|
index 69f7d5fd29ea..111425d59da0 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
@@ -46,6 +46,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
|
@@ -49,6 +49,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
@ -1,7 +1,7 @@
|
|||||||
From 506523142679a04de69412e08765538b398fa7e2 Mon Sep 17 00:00:00 2001
|
From 97716a8c52bb002a8ec1e1e1814f6ad752a32940 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Tue, 12 Jan 2021 17:24:07 +0000
|
Date: Tue, 12 Jan 2021 17:24:07 +0000
|
||||||
Subject: [PATCH 78/88] dt-bindings: vendor-prefixes: add haochuangyi prefix
|
Subject: [PATCH 49/60] dt-bindings: vendor-prefixes: add haochuangyi prefix
|
||||||
|
|
||||||
Shenzhen Haochuangyi Technology Co.,Ltd are a manufcaturer of Android
|
Shenzhen Haochuangyi Technology Co.,Ltd are a manufcaturer of Android
|
||||||
Set-Top Box devices.
|
Set-Top Box devices.
|
||||||
@ -12,10 +12,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||||
index 041ae90b0d8f..bfceecbaf717 100644
|
index a867f7102c35..fc3e9205946f 100644
|
||||||
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||||
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||||
@@ -449,6 +449,8 @@ patternProperties:
|
@@ -471,6 +471,8 @@ patternProperties:
|
||||||
deprecated: true
|
deprecated: true
|
||||||
"^hannstar,.*":
|
"^hannstar,.*":
|
||||||
description: HannStar Display Corporation
|
description: HannStar Display Corporation
|
@ -1,7 +1,7 @@
|
|||||||
From 50d360d344ebf97f7453b3ec1fae4053879ab33f Mon Sep 17 00:00:00 2001
|
From 242a6ff12de0a23a10cd96f20882b1717ee76b57 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Tue, 12 Jan 2021 17:25:33 +0000
|
Date: Tue, 12 Jan 2021 17:25:33 +0000
|
||||||
Subject: [PATCH 79/88] dt-bindings: arm: amlogic: add H96-Max bindings
|
Subject: [PATCH 50/60] dt-bindings: arm: amlogic: add H96-Max bindings
|
||||||
|
|
||||||
Add the board binding for the Haochuangyi H96-Max STB device.
|
Add the board binding for the Haochuangyi H96-Max STB device.
|
||||||
|
|
||||||
@ -11,17 +11,17 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
index 6a6eec15747b..455cdd951c6e 100644
|
index 172ed028e686..903ab1796c07 100644
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
@@ -171,6 +171,7 @@ properties:
|
@@ -175,6 +175,7 @@ properties:
|
||||||
- cyx,a95xf3-air-1000
|
- cyx,a95xf3-air-1000
|
||||||
- hardkernel,odroid-c4
|
- hardkernel,odroid-c4
|
||||||
- hardkernel,odroid-hc4
|
- hardkernel,odroid-hc4
|
||||||
+ - haochuangyi,h96-max
|
+ - haochuangyi,h96-max
|
||||||
- khadas,vim3l
|
- khadas,vim3l
|
||||||
- seirobotics,sei610
|
- seirobotics,sei610
|
||||||
- sinovoip,bananapi-m5
|
- const: amlogic,sm1
|
||||||
--
|
--
|
||||||
2.17.1
|
2.17.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From a3fcc16aac001adb400a8576e280d3c1dc9b10a6 Mon Sep 17 00:00:00 2001
|
From ba87086b3333005e2a1b1a6b1b9552b0f598d7eb Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Tue, 12 Jan 2021 17:26:42 +0000
|
Date: Tue, 12 Jan 2021 17:26:42 +0000
|
||||||
Subject: [PATCH 80/88] arm64: dts: meson: add initial device-tree for H96-Max
|
Subject: [PATCH 51/60] arm64: dts: meson: add initial device-tree for H96-Max
|
||||||
|
|
||||||
The Haochuangyi H96-Max is based on the Amlogic S905X3 reference
|
The Haochuangyi H96-Max is based on the Amlogic S905X3 reference
|
||||||
design with the following specs:
|
design with the following specs:
|
||||||
@ -29,10 +29,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
index 47a9d1f85596..7dd039173ef0 100644
|
index 111425d59da0..60a12b6d560a 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
@@ -49,6 +49,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
@@ -52,6 +52,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-100.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-100.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-1000.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-a95xf3-air-1000.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb
|
@ -1,7 +1,7 @@
|
|||||||
From 8af4f9a08f739fd9b832c13939b765211a166097 Mon Sep 17 00:00:00 2001
|
From addcdc01e7d6682d82ca1019f62b6dfcf6f1ac9d Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Sat, 29 Feb 2020 15:13:02 +0000
|
Date: Sat, 29 Feb 2020 15:13:02 +0000
|
||||||
Subject: [PATCH 81/88] dt-bindings: arm: amlogic: add support for the Tanix
|
Subject: [PATCH 52/60] dt-bindings: arm: amlogic: add support for the Tanix
|
||||||
TX5 Max
|
TX5 Max
|
||||||
|
|
||||||
The Oranth (Tanix) TX5 Max is based on the Amlogic U200 reference
|
The Oranth (Tanix) TX5 Max is based on the Amlogic U200 reference
|
||||||
@ -13,17 +13,17 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
index 455cdd951c6e..e8aec4b53553 100644
|
index 903ab1796c07..5554d23362f8 100644
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
@@ -140,6 +140,7 @@ properties:
|
@@ -141,6 +141,7 @@ properties:
|
||||||
|
- enum:
|
||||||
- amediatech,x96-max
|
- amediatech,x96-max
|
||||||
- amlogic,u200
|
- amlogic,u200
|
||||||
- seirobotics,sei510
|
|
||||||
+ - oranth,tx5-max
|
+ - oranth,tx5-max
|
||||||
|
- radxa,zero
|
||||||
|
- seirobotics,sei510
|
||||||
- const: amlogic,g12a
|
- const: amlogic,g12a
|
||||||
|
|
||||||
- description: Boards with the Amlogic Meson G12B A311D SoC
|
|
||||||
--
|
--
|
||||||
2.17.1
|
2.17.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From fc88070f5e6cb37b9b0e30c13065a56333a16f1d Mon Sep 17 00:00:00 2001
|
From e7614444f2c3b7b529d7fbf0528aafa3f0d3dc30 Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Sun, 20 Oct 2019 04:06:59 +0000
|
Date: Sun, 20 Oct 2019 04:06:59 +0000
|
||||||
Subject: [PATCH 82/88] arm64: dts: meson: add support for the Tanix TX5 Max
|
Subject: [PATCH 53/60] arm64: dts: meson: add support for the Tanix TX5 Max
|
||||||
|
|
||||||
The Tanix TX5 Max is based on the Amlogic U200 reference design
|
The Tanix TX5 Max is based on the Amlogic U200 reference design
|
||||||
using the S905X2 chipset. Hardware specification:
|
using the S905X2 chipset. Hardware specification:
|
||||||
@ -25,12 +25,12 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12a-tanix-tx5max.dts
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
index 7dd039173ef0..7d8586c718a1 100644
|
index 60a12b6d560a..9566cfdbb54b 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
@@ -1,6 +1,7 @@
|
@@ -2,6 +2,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-radxa-zero.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb
|
||||||
+dtb-$(CONFIG_ARCH_MESON) += meson-g12a-tanix-tx5max.dtb
|
+dtb-$(CONFIG_ARCH_MESON) += meson-g12a-tanix-tx5max.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
|
@ -1,7 +1,7 @@
|
|||||||
From 67b08c3ffacee708e8f2f08f8c42c7021c9cd6f3 Mon Sep 17 00:00:00 2001
|
From 59d403256f734cb20f89cb0c47f909df3d144e7b Mon Sep 17 00:00:00 2001
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Mon, 21 Oct 2019 03:58:06 +0000
|
Date: Mon, 21 Oct 2019 03:58:06 +0000
|
||||||
Subject: [PATCH 88/88] arm64: dts: meson: add multiple MeCool device trees
|
Subject: [PATCH 54/60] arm64: dts: meson: add multiple MeCool device trees
|
||||||
|
|
||||||
This adds initial device trees for a range of MeCool devices based on various
|
This adds initial device trees for a range of MeCool devices based on various
|
||||||
Amlogic GXBB, GXL and GXM reference designs. The current purpose is to allow
|
Amlogic GXBB, GXL and GXM reference designs. The current purpose is to allow
|
||||||
@ -24,10 +24,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-mecool-m8s-plus.dts
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
index 82265e80cbe2..3e72b2ad3a2d 100644
|
index 9566cfdbb54b..a8213077ed67 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
@@ -13,6 +13,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
|
@@ -14,6 +14,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
||||||
@ -36,7 +36,7 @@ index 82265e80cbe2..3e72b2ad3a2d 100644
|
|||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
|
||||||
@@ -30,7 +32,10 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb
|
@@ -31,7 +33,10 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
|
@ -0,0 +1,28 @@
|
|||||||
|
From 969f5a6bcf04e02bdfbf39d062d22ceee09957ce Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Sun, 11 Apr 2021 05:50:13 +0000
|
||||||
|
Subject: [PATCH 55/60] dt-bindings: arm: amlogic: add support for Minix NEO-U1
|
||||||
|
|
||||||
|
The Minix NEO-U1 is an Android STB based on the Amlogic P200 (GXBB)
|
||||||
|
reference design with an S905 chip.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
index 5554d23362f8..79b3f93a172d 100644
|
||||||
|
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||||
|
@@ -58,6 +58,7 @@ properties:
|
||||||
|
- amlogic,p201
|
||||||
|
- friendlyarm,nanopi-k2
|
||||||
|
- hardkernel,odroid-c2
|
||||||
|
+ - minix,neo-u1
|
||||||
|
- nexbox,a95x
|
||||||
|
- videostrong,kii-pro
|
||||||
|
- wetek,hub
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,241 @@
|
|||||||
|
From 5525e2ab1a8ac6bf6513bdd7cdf9113df5d18c31 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Sun, 11 Apr 2021 05:52:14 +0000
|
||||||
|
Subject: [PATCH 56/60] arm64: dts: meson: add initial device-tree for Minix
|
||||||
|
NEO-U1
|
||||||
|
|
||||||
|
The Minix NEO-U1 is an Android STB based on the Amlogic P200 (GXBB)
|
||||||
|
reference design with an S905-H chip and the following specs:
|
||||||
|
|
||||||
|
- 2GB DDR3 RAM
|
||||||
|
- 16GB eMMC
|
||||||
|
- 10/100/1000 Base-T Ethernet
|
||||||
|
- AP6356 Wireless (802.11 b/g/n/ac, BT 5.0)
|
||||||
|
- HDMI 2.1 video
|
||||||
|
- S/PDIF optical output
|
||||||
|
- ES8323 DAC
|
||||||
|
- 3x USB 2.0 port
|
||||||
|
- 1x USB micro OTG port
|
||||||
|
- RTC chip (hym8563)
|
||||||
|
- IR receiver
|
||||||
|
- 1x Power LED (white)
|
||||||
|
- 1x Update/Reset button (underside)
|
||||||
|
- 1x micro SD card slot
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||||
|
.../dts/amlogic/meson-gxbb-minix-neo-u1.dts | 189 ++++++++++++++++++
|
||||||
|
2 files changed, 190 insertions(+)
|
||||||
|
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
|
index a8213077ed67..5f59dc6a8a94 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||||
|
@@ -16,6 +16,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-ki-plus.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-mecool-kii-pro.dtb
|
||||||
|
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-minix-neo-u1.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nexbox-a95x.dtb
|
||||||
|
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2.dtb
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..5343e90f9f34
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-minix-neo-u1.dts
|
||||||
|
@@ -0,0 +1,189 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2021 Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include "meson-gxbb-p20x.dtsi"
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/input/input.h>
|
||||||
|
+#include <dt-bindings/leds/common.h>
|
||||||
|
+#include <dt-bindings/sound/meson-aiu.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ compatible = "minix,neo-u1", "amlogic,meson-gxbb";
|
||||||
|
+ model = "Minix NEO U1";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ rtc0 = &rtc;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ spdif_dit: audio-codec-0 {
|
||||||
|
+ #sound-dai-cells = <0>;
|
||||||
|
+ compatible = "linux,spdif-dit";
|
||||||
|
+ status = "okay";
|
||||||
|
+ sound-name-prefix = "DIT";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+
|
||||||
|
+ led-status {
|
||||||
|
+ color = <LED_COLOR_ID_WHITE>;
|
||||||
|
+ function = LED_FUNCTION_STATUS;
|
||||||
|
+ gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ default-state = "on";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ gpio-keys-polled {
|
||||||
|
+ compatible = "gpio-keys-polled";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ poll-interval = <20>;
|
||||||
|
+
|
||||||
|
+ button-reset {
|
||||||
|
+ label = "reset";
|
||||||
|
+ linux,code = <KEY_POWER>;
|
||||||
|
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ avdd18_usb_adc: regulator-avdd18_usb_adc {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "AVDD18_USB_ADC";
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ sound {
|
||||||
|
+ compatible = "amlogic,gx-sound-card";
|
||||||
|
+ model = "MINIX-NEO";
|
||||||
|
+ assigned-clocks = <&clkc CLKID_MPLL0>,
|
||||||
|
+ <&clkc CLKID_MPLL1>,
|
||||||
|
+ <&clkc CLKID_MPLL2>;
|
||||||
|
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||||
|
+ assigned-clock-rates = <294912000>,
|
||||||
|
+ <270950400>,
|
||||||
|
+ <393216000>;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ dai-link-0 {
|
||||||
|
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-1 {
|
||||||
|
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-2 {
|
||||||
|
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
|
||||||
|
+ dai-format = "i2s";
|
||||||
|
+ mclk-fs = <256>;
|
||||||
|
+
|
||||||
|
+ codec-0 {
|
||||||
|
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-3 {
|
||||||
|
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
|
||||||
|
+
|
||||||
|
+ codec-0 {
|
||||||
|
+ sound-dai = <&spdif_dit>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ dai-link-4 {
|
||||||
|
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
|
||||||
|
+
|
||||||
|
+ codec-0 {
|
||||||
|
+ sound-dai = <&hdmi_tx>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&aiu {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&spdif_out_y_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+ðmac {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <ð_rgmii_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+
|
||||||
|
+ phy-handle = <ð_phy0>;
|
||||||
|
+ phy-mode = "rgmii";
|
||||||
|
+
|
||||||
|
+ amlogic,tx-delay-ns = <2>;
|
||||||
|
+
|
||||||
|
+ mdio {
|
||||||
|
+ compatible = "snps,dwmac-mdio";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ eth_phy0: ethernet-phy@0 {
|
||||||
|
+ /* Realtek RTL8211F (0x001cc916) */
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ reset-assert-us = <10000>;
|
||||||
|
+ reset-deassert-us = <80000>;
|
||||||
|
+ reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||||
|
+
|
||||||
|
+ interrupt-parent = <&gpio_intc>;
|
||||||
|
+ /* MAC_INTR on GPIOZ_15 */
|
||||||
|
+ interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&ir {
|
||||||
|
+ linux,rc-map-name = "rc-minix-neo";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c_A {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&i2c_a_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c_B {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&i2c_b_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+
|
||||||
|
+ rtc: rtc@51 {
|
||||||
|
+ status = "okay";
|
||||||
|
+ compatible = "haoyu,hym8563";
|
||||||
|
+ reg = <0x51>;
|
||||||
|
+ #clock-cells = <0>;
|
||||||
|
+ clock-frequency = <32768>;
|
||||||
|
+ clock-output-names = "xin32k";
|
||||||
|
+ wakeup-source;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&saradc {
|
||||||
|
+ status = "okay";
|
||||||
|
+ vref-supply = <&avdd18_usb_adc>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* This is connected to the Bluetooth module: */
|
||||||
|
+&uart_A {
|
||||||
|
+ status = "okay";
|
||||||
|
+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ uart-has-rtscts;
|
||||||
|
+
|
||||||
|
+ bluetooth {
|
||||||
|
+ compatible = "bcm43438-bt";
|
||||||
|
+ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ max-speed = <2000000>;
|
||||||
|
+ clocks = <&wifi32k>;
|
||||||
|
+ clock-names = "lpo";
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From de35bb96122893c0d7eaea9de949cff3cb87ad24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Thu, 4 Nov 2021 02:08:38 +0000
|
||||||
|
Subject: [PATCH 57/60] TEST: new registers
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
sound/soc/meson/aiu-encoder-i2s.c | 12 ++++++++++--
|
||||||
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sound/soc/meson/aiu-encoder-i2s.c b/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
|
index ba3dac987112..eeff716c1b8d 100644
|
||||||
|
--- a/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
|
+++ b/sound/soc/meson/aiu-encoder-i2s.c
|
||||||
|
@@ -19,6 +19,7 @@
|
||||||
|
|
||||||
|
#define AIU_I2S_DAC_CFG_MSB_FIRST BIT(2)
|
||||||
|
#define AIU_I2S_MISC_HOLD_EN BIT(2)
|
||||||
|
+#define AIU_I2S_MISC_FORCE_LEFT_RIGHT BIT(4)
|
||||||
|
#define AIU_CLK_CTRL_I2S_DIV_EN BIT(0)
|
||||||
|
#define AIU_CLK_CTRL_I2S_DIV GENMASK(3, 2)
|
||||||
|
#define AIU_CLK_CTRL_AOCLK_INVERT BIT(6)
|
||||||
|
@@ -40,9 +41,16 @@ static void aiu_encoder_i2s_divider_enable(struct snd_soc_component *component,
|
||||||
|
static void aiu_encoder_i2s_hold(struct snd_soc_component *component,
|
||||||
|
bool enable)
|
||||||
|
{
|
||||||
|
+ unsigned int value;
|
||||||
|
+
|
||||||
|
+ if (enable)
|
||||||
|
+ value = AIU_I2S_MISC_HOLD_EN;
|
||||||
|
+ else
|
||||||
|
+ value = AIU_I2S_MISC_FORCE_LEFT_RIGHT;
|
||||||
|
+
|
||||||
|
snd_soc_component_update_bits(component, AIU_I2S_MISC,
|
||||||
|
- AIU_I2S_MISC_HOLD_EN,
|
||||||
|
- enable ? AIU_I2S_MISC_HOLD_EN : 0);
|
||||||
|
+ AIU_I2S_MISC_HOLD_EN |
|
||||||
|
+ AIU_I2S_MISC_FORCE_LEFT_RIGHT, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int aiu_encoder_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,80 @@
|
|||||||
|
From 783c76adcf53f7e47cd2a974fafbc2835d070579 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Fabio Estevam <festevam@denx.de>
|
||||||
|
Date: Wed, 24 Nov 2021 13:20:05 +0000
|
||||||
|
Subject: [PATCH 58/60] FROMLIST(v2): ath10k: Fix the MTU size on QCA9377 SDIO
|
||||||
|
|
||||||
|
On an imx6dl-pico-pi board with a QCA9377 SDIO chip, simply trying to
|
||||||
|
connect via ssh to another machine causes:
|
||||||
|
|
||||||
|
[ 55.824159] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12
|
||||||
|
[ 55.832169] ath10k_sdio mmc1:0001:1: failed to submit frame: -12
|
||||||
|
[ 55.838529] ath10k_sdio mmc1:0001:1: failed to push frame: -12
|
||||||
|
[ 55.905863] ath10k_sdio mmc1:0001:1: failed to transmit packet, dropping: -12
|
||||||
|
[ 55.913650] ath10k_sdio mmc1:0001:1: failed to submit frame: -12
|
||||||
|
[ 55.919887] ath10k_sdio mmc1:0001:1: failed to push frame: -12
|
||||||
|
|
||||||
|
, leading to an ssh connection failure.
|
||||||
|
|
||||||
|
One user inspected the size of frames on Wireshark and reported
|
||||||
|
the followig:
|
||||||
|
|
||||||
|
"I was able to narrow the issue down to the mtu. If I set the mtu for
|
||||||
|
the wlan0 device to 1486 instead of 1500, the issue does not happen.
|
||||||
|
|
||||||
|
The size of frames that I see on Wireshark is exactly 1500 after
|
||||||
|
setting it to 1486."
|
||||||
|
|
||||||
|
Clearing the HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE avoids the problem and
|
||||||
|
the ssh command works successfully after that.
|
||||||
|
|
||||||
|
Introduce a 'credit_size_workaround' field to ath10k_hw_params for
|
||||||
|
the QCA9377 SDIO, so that the HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE
|
||||||
|
is not set in this case.
|
||||||
|
|
||||||
|
Tested with QCA9377 SDIO with firmware WLAN.TF.1.1.1-00061-QCATFSWPZ-1.
|
||||||
|
|
||||||
|
Fixes: 2f918ea98606 ("ath10k: enable alt data of TX path for sdio")
|
||||||
|
Signed-off-by: Fabio Estevam <festevam@denx.de>
|
||||||
|
---
|
||||||
|
drivers/net/wireless/ath/ath10k/core.c | 3 ++-
|
||||||
|
drivers/net/wireless/ath/ath10k/hw.h | 3 +++
|
||||||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
index 64c7145b51a2..afae168159ea 100644
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/core.c
|
||||||
|
@@ -714,6 +714,7 @@ static void ath10k_send_suspend_complete(struct ath10k *ar)
|
||||||
|
|
||||||
|
static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
|
||||||
|
{
|
||||||
|
+ bool mtu_workaround = ar->hw_params.credit_size_workaround;
|
||||||
|
int ret;
|
||||||
|
u32 param = 0;
|
||||||
|
|
||||||
|
@@ -731,7 +732,7 @@ static int ath10k_init_sdio(struct ath10k *ar, enum ath10k_firmware_mode mode)
|
||||||
|
|
||||||
|
param |= HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET;
|
||||||
|
|
||||||
|
- if (mode == ATH10K_FIRMWARE_MODE_NORMAL)
|
||||||
|
+ if (mode == ATH10K_FIRMWARE_MODE_NORMAL && !mtu_workaround)
|
||||||
|
param |= HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
|
||||||
|
else
|
||||||
|
param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
|
||||||
|
diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h
|
||||||
|
index 6b03c7787e36..591ef7416b61 100644
|
||||||
|
--- a/drivers/net/wireless/ath/ath10k/hw.h
|
||||||
|
+++ b/drivers/net/wireless/ath/ath10k/hw.h
|
||||||
|
@@ -618,6 +618,9 @@ struct ath10k_hw_params {
|
||||||
|
*/
|
||||||
|
bool uart_pin_workaround;
|
||||||
|
|
||||||
|
+ /* Workaround for the credit size calculation */
|
||||||
|
+ bool credit_size_workaround;
|
||||||
|
+
|
||||||
|
/* tx stats support over pktlog */
|
||||||
|
bool tx_stats_over_pktlog;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,67 @@
|
|||||||
|
From 872551950d5a45f3163626e1c28b145a1100e1e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Thu, 25 Nov 2021 02:34:41 +0000
|
||||||
|
Subject: [PATCH 59/60] WIP: arm64: dts: amlogic: set 4GB ram size for Beelink
|
||||||
|
S922X devices
|
||||||
|
|
||||||
|
Set 4GB RAM size to see if this resolves the kernel panic issue
|
||||||
|
seen when boxes are booted from vendor u-boot.
|
||||||
|
|
||||||
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts | 5 +++++
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts | 5 +++++
|
||||||
|
arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts | 5 +++++
|
||||||
|
3 files changed, 15 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
|
||||||
|
index 6c7bfacbad78..93c7acccf5be 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
|
||||||
|
@@ -20,6 +20,11 @@
|
||||||
|
rtc1 = &vrtc;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ memory@0 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x0 0x0 0x0 0xf0800000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
gpio-keys-polled {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
|
||||||
|
index 707daf92787b..6e1e1a680df0 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
|
||||||
|
@@ -19,6 +19,11 @@
|
||||||
|
rtc1 = &vrtc;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ memory@0 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x0 0x0 0x0 0xf0800000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
gpio-keys-polled {
|
||||||
|
compatible = "gpio-keys-polled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
|
||||||
|
index 5d96c1449050..64039df7e0a4 100644
|
||||||
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
|
||||||
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
|
||||||
|
@@ -19,6 +19,11 @@
|
||||||
|
rtc1 = &vrtc;
|
||||||
|
};
|
||||||
|
|
||||||
|
+ memory@0 {
|
||||||
|
+ device_type = "memory";
|
||||||
|
+ reg = <0x0 0x0 0x0 0xf0800000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
spdif_dit: audio-codec-1 {
|
||||||
|
#sound-dai-cells = <0>;
|
||||||
|
compatible = "linux,spdif-dit";
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,33 +1,37 @@
|
|||||||
From c6a298534815027cbcafe0a2015c5e4ca6a1ea53 Mon Sep 17 00:00:00 2001
|
From 0dd3d24b886da5098bb8048a53d182dd086c6f30 Mon Sep 17 00:00:00 2001
|
||||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
Date: Fri, 4 Dec 2020 14:33:39 +0100
|
Date: Thu, 25 Nov 2021 11:31:43 +0000
|
||||||
Subject: [PATCH 48/88] WIP: arm64: dts: meson: g12/sm1: remove opps below 1GHz
|
Subject: [PATCH 60/60] HACK: arm64: dts: amlogic: remove opps below 1GHz for
|
||||||
|
g12/sm1
|
||||||
|
|
||||||
Various CPU stall and crash, often related to the CPU sys pll, have been
|
This seems to workaround or hide occurrences of CPU stalls and other
|
||||||
reported on the odroid-n2, n2+ and vim3/3l. It still not entirely clear
|
board wedges that are not seen when 'performance' is forced.
|
||||||
what the problem is. The problem only happens on some samples, not all,
|
|
||||||
often after more than 24h running fine.
|
|
||||||
|
|
||||||
Boards running fixed CPU frequency, like the one using the performance
|
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
governor, appear unaffected. Doing more tests seems to show that problem
|
|
||||||
appears only with the lower opps. Removing opps with a rate lower than 1GHz
|
|
||||||
seems to solve/hide the problem
|
|
||||||
|
|
||||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
---
|
---
|
||||||
.../boot/dts/amlogic/meson-g12b-a311d.dtsi | 20 -------------------
|
.../boot/dts/amlogic/meson-g12b-a311d.dtsi | 40 -------------------
|
||||||
.../boot/dts/amlogic/meson-g12b-s922x.dtsi | 20 -------------------
|
.../boot/dts/amlogic/meson-g12b-s922x.dtsi | 40 -------------------
|
||||||
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 20 -------------------
|
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 20 ----------
|
||||||
3 files changed, 60 deletions(-)
|
3 files changed, 100 deletions(-)
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
|
||||||
index 7d29756451a5..4a8acff92ba5 100644
|
index d61f43052a34..8e9ad1e51d66 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d.dtsi
|
||||||
@@ -11,16 +11,6 @@
|
@@ -11,26 +11,6 @@
|
||||||
compatible = "operating-points-v2";
|
compatible = "operating-points-v2";
|
||||||
opp-shared;
|
opp-shared;
|
||||||
|
|
||||||
|
- opp-100000000 {
|
||||||
|
- opp-hz = /bits/ 64 <100000000>;
|
||||||
|
- opp-microvolt = <731000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- opp-250000000 {
|
||||||
|
- opp-hz = /bits/ 64 <250000000>;
|
||||||
|
- opp-microvolt = <731000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
- opp-500000000 {
|
- opp-500000000 {
|
||||||
- opp-hz = /bits/ 64 <500000000>;
|
- opp-hz = /bits/ 64 <500000000>;
|
||||||
- opp-microvolt = <731000>;
|
- opp-microvolt = <731000>;
|
||||||
@ -41,10 +45,20 @@ index 7d29756451a5..4a8acff92ba5 100644
|
|||||||
opp-1000000000 {
|
opp-1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <761000>;
|
opp-microvolt = <761000>;
|
||||||
@@ -61,16 +51,6 @@
|
@@ -71,26 +51,6 @@
|
||||||
compatible = "operating-points-v2";
|
compatible = "operating-points-v2";
|
||||||
opp-shared;
|
opp-shared;
|
||||||
|
|
||||||
|
- opp-100000000 {
|
||||||
|
- opp-hz = /bits/ 64 <100000000>;
|
||||||
|
- opp-microvolt = <731000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- opp-250000000 {
|
||||||
|
- opp-hz = /bits/ 64 <250000000>;
|
||||||
|
- opp-microvolt = <731000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
- opp-500000000 {
|
- opp-500000000 {
|
||||||
- opp-hz = /bits/ 64 <500000000>;
|
- opp-hz = /bits/ 64 <500000000>;
|
||||||
- opp-microvolt = <731000>;
|
- opp-microvolt = <731000>;
|
||||||
@ -59,13 +73,23 @@ index 7d29756451a5..4a8acff92ba5 100644
|
|||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <731000>;
|
opp-microvolt = <731000>;
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
|
||||||
index ad4096be8db2..df7a2cd7265d 100644
|
index 1e5d0ee5d541..44c23c984034 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x.dtsi
|
||||||
@@ -11,16 +11,6 @@
|
@@ -11,26 +11,6 @@
|
||||||
compatible = "operating-points-v2";
|
compatible = "operating-points-v2";
|
||||||
opp-shared;
|
opp-shared;
|
||||||
|
|
||||||
|
- opp-100000000 {
|
||||||
|
- opp-hz = /bits/ 64 <100000000>;
|
||||||
|
- opp-microvolt = <731000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- opp-250000000 {
|
||||||
|
- opp-hz = /bits/ 64 <250000000>;
|
||||||
|
- opp-microvolt = <731000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
- opp-500000000 {
|
- opp-500000000 {
|
||||||
- opp-hz = /bits/ 64 <500000000>;
|
- opp-hz = /bits/ 64 <500000000>;
|
||||||
- opp-microvolt = <731000>;
|
- opp-microvolt = <731000>;
|
||||||
@ -79,10 +103,20 @@ index ad4096be8db2..df7a2cd7265d 100644
|
|||||||
opp-1000000000 {
|
opp-1000000000 {
|
||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <731000>;
|
opp-microvolt = <731000>;
|
||||||
@@ -61,16 +51,6 @@
|
@@ -76,26 +56,6 @@
|
||||||
compatible = "operating-points-v2";
|
compatible = "operating-points-v2";
|
||||||
opp-shared;
|
opp-shared;
|
||||||
|
|
||||||
|
- opp-100000000 {
|
||||||
|
- opp-hz = /bits/ 64 <100000000>;
|
||||||
|
- opp-microvolt = <751000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- opp-250000000 {
|
||||||
|
- opp-hz = /bits/ 64 <250000000>;
|
||||||
|
- opp-microvolt = <751000>;
|
||||||
|
- };
|
||||||
|
-
|
||||||
- opp-500000000 {
|
- opp-500000000 {
|
||||||
- opp-hz = /bits/ 64 <500000000>;
|
- opp-hz = /bits/ 64 <500000000>;
|
||||||
- opp-microvolt = <751000>;
|
- opp-microvolt = <751000>;
|
||||||
@ -97,7 +131,7 @@ index ad4096be8db2..df7a2cd7265d 100644
|
|||||||
opp-hz = /bits/ 64 <1000000000>;
|
opp-hz = /bits/ 64 <1000000000>;
|
||||||
opp-microvolt = <771000>;
|
opp-microvolt = <771000>;
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
|
||||||
index c309517abae3..defe0b8d4d27 100644
|
index 3d8b1f4f2001..78bdbd2ccc9d 100644
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
|
--- a/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
|
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1.dtsi
|
||||||
@@ -95,26 +95,6 @@
|
@@ -95,26 +95,6 @@
|
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@
|
|||||||
DRIVER_ADDONS="crazycat dvb-latest"
|
DRIVER_ADDONS="crazycat dvb-latest"
|
||||||
|
|
||||||
# additional packages to install:
|
# additional packages to install:
|
||||||
ADDITIONAL_PACKAGES="dtc ethmactool"
|
ADDITIONAL_PACKAGES="dtc ethmactool emmctool flashrom"
|
||||||
|
|
||||||
# use the kernel CEC framework for libcec (yes / no)
|
# use the kernel CEC framework for libcec (yes / no)
|
||||||
CEC_FRAMEWORK_SUPPORT="yes"
|
CEC_FRAMEWORK_SUPPORT="yes"
|
||||||
|
@ -1,371 +0,0 @@
|
|||||||
From 0d37174c3b629235867e288b4ab9f32cf8c2e80f Mon Sep 17 00:00:00 2001
|
|
||||||
From: chewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Thu, 14 May 2020 13:31:34 +0000
|
|
||||||
Subject: [PATCH 1/3] WIP: add AMLOGIC-HDMI and AMLOGIC-HDMI-SPDIF confs
|
|
||||||
|
|
||||||
---
|
|
||||||
src/conf/cards/AMLOGIC-HDMI-SPDIF.conf | 174 +++++++++++++++++++++++++
|
|
||||||
src/conf/cards/AMLOGIC-HDMI.conf | 170 ++++++++++++++++++++++++
|
|
||||||
2 files changed, 344 insertions(+)
|
|
||||||
create mode 100644 src/conf/cards/AMLOGIC-HDMI-SPDIF.conf
|
|
||||||
create mode 100644 src/conf/cards/AMLOGIC-HDMI.conf
|
|
||||||
|
|
||||||
diff --git a/src/conf/cards/AMLOGIC-HDMI-SPDIF.conf b/src/conf/cards/AMLOGIC-HDMI-SPDIF.conf
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..d2783edc
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/conf/cards/AMLOGIC-HDMI-SPDIF.conf
|
|
||||||
@@ -0,0 +1,174 @@
|
|
||||||
+# SPDX-License-Identifier: GPL-2.0
|
|
||||||
+# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# All PCM must be 24-bit for easy kernel conversion.
|
|
||||||
+# IEC958 formatted output can be sent directly.
|
|
||||||
+#
|
|
||||||
+# Direct-to-hardware converting to 24-bit output.
|
|
||||||
+#
|
|
||||||
+AMLOGIC-HDMI-SPDIF.pcm.hw-s24le {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type linear
|
|
||||||
+ slave.pcm {
|
|
||||||
+ type hw
|
|
||||||
+ card $CARD
|
|
||||||
+ }
|
|
||||||
+ slave.format S24_LE
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# Common output path for front and surround outputs
|
|
||||||
+#
|
|
||||||
+AMLOGIC-HDMI-SPDIF.pcm.common.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type asym
|
|
||||||
+ playback.pcm {
|
|
||||||
+ type softvol
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards."
|
|
||||||
+ { @func card_driver card $CARD }
|
|
||||||
+ ".pcm.hw-s24le:CARD=" $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ control {
|
|
||||||
+ name "PCM Playback Volume"
|
|
||||||
+ card $CARD
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+<confdir:pcm/front.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI-SPDIF.pcm.front.0 cards.AMLOGIC-HDMI-SPDIF.pcm.common.0
|
|
||||||
+
|
|
||||||
+# The mapping of ALSA channels to surround channels is very imprecise.
|
|
||||||
+# ALSA uses a different terminology and speaker placement to the CEA
|
|
||||||
+# surround positioning. CEA has the positioning of:
|
|
||||||
+#
|
|
||||||
+# LFE
|
|
||||||
+# FL FLC FC FRC FR
|
|
||||||
+#
|
|
||||||
+# RL RLC RC RRC RR
|
|
||||||
+#
|
|
||||||
+# ALSA's idea is:
|
|
||||||
+#
|
|
||||||
+# LFE
|
|
||||||
+# FL C FR
|
|
||||||
+#
|
|
||||||
+# SL SR
|
|
||||||
+#
|
|
||||||
+# RL RR
|
|
||||||
+#
|
|
||||||
+# We do our best to map between these representations.
|
|
||||||
+
|
|
||||||
+<confdir:pcm/surround40.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI-SPDIF.pcm.surround40.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type empty
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer
|
|
||||||
+ name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards.AMLOGIC-HDMI-SPDIF.pcm.common.0:CARD="
|
|
||||||
+ $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# surround 41 and surround50 are (annoyingly) mapped to surround51
|
|
||||||
+# We could do without stacking two 'route' plugins on top of each other
|
|
||||||
+
|
|
||||||
+<confdir:pcm/surround41.conf>
|
|
||||||
+<confdir:pcm/surround50.conf>
|
|
||||||
+<confdir:pcm/surround51.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI-SPDIF.pcm.surround51.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type route
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer
|
|
||||||
+ name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards.AMLOGIC-HDMI-SPDIF.pcm.common.0:CARD="
|
|
||||||
+ $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
|
||||||
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
|
||||||
+ ttable.2.4 1.0 # RL -> slave 4 -> hdmi 4 RL
|
|
||||||
+ ttable.3.5 1.0 # RR -> slave 5 -> hdmi 5 RR
|
|
||||||
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
|
||||||
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+<confdir:pcm/surround71.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI-SPDIF.pcm.surround71.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type route
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer
|
|
||||||
+ name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards.AMLOGIC-HDMI-SPDIF.pcm.common.0:CARD="
|
|
||||||
+ $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ slave.channels 8
|
|
||||||
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
|
||||||
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
|
||||||
+ ttable.2.6 1.0 # RL -> slave 6 -> hdmi 6 RLC/FLC
|
|
||||||
+ ttable.3.7 1.0 # RR -> slave 7 -> hdmi 7 RRC/FRC
|
|
||||||
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
|
||||||
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
|
||||||
+ ttable.6.4 1.0 # SL -> slave 4 -> hdmi 4 RL
|
|
||||||
+ ttable.7.5 1.0 # SR -> slave 5 -> hdmi 5 RR
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#<confdir:pcm/hdmi.conf>
|
|
||||||
+#
|
|
||||||
+#AMLOGIC-HDMI-SPDIF.pcm.hdmi.0 {
|
|
||||||
+# @args [ CARD AES0 AES1 AES2 AES3 ]
|
|
||||||
+# @args.CARD {
|
|
||||||
+# type string
|
|
||||||
+# }
|
|
||||||
+# @args.AES0 {
|
|
||||||
+# type integer
|
|
||||||
+# }
|
|
||||||
+# @args.AES1 {
|
|
||||||
+# type integer
|
|
||||||
+# }
|
|
||||||
+# @args.AES2 {
|
|
||||||
+# type integer
|
|
||||||
+# }
|
|
||||||
+# @args.AES3 {
|
|
||||||
+# type integer
|
|
||||||
+# default 0x01 # IEC958_AES3_CON_FS_NOTID
|
|
||||||
+# }
|
|
||||||
+# type iec958
|
|
||||||
+# slave.pcm {
|
|
||||||
+# type hw
|
|
||||||
+# card $CARD
|
|
||||||
+# }
|
|
||||||
+# slave.format IEC958_SUBFRAME_LE
|
|
||||||
+# # $AES3 must be correct for some AV receivers to accept the stream
|
|
||||||
+# status [ $AES0 $AES1 $AES2 $AES3 ]
|
|
||||||
+# hdmi_mode true
|
|
||||||
+#}
|
|
||||||
+#
|
|
||||||
+#<confdir:pcm/iec958.conf>
|
|
||||||
+#
|
|
||||||
+#AMLOGIC-HDMI-SPDIF.pcm.iec958.0 AMLOGIC-HDMI-SPDIF.pcm.hdmi.0
|
|
||||||
diff --git a/src/conf/cards/AMLOGIC-HDMI.conf b/src/conf/cards/AMLOGIC-HDMI.conf
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..8e410c4d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/conf/cards/AMLOGIC-HDMI.conf
|
|
||||||
@@ -0,0 +1,170 @@
|
|
||||||
+# SPDX-License-Identifier: GPL-2.0
|
|
||||||
+# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# All PCM must be 24-bit for easy kernel conversion.
|
|
||||||
+# IEC958 formatted output can be sent directly.
|
|
||||||
+#
|
|
||||||
+# Direct-to-hardware converting to 24-bit output.
|
|
||||||
+#
|
|
||||||
+AMLOGIC-HDMI.pcm.hw-s24le {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type linear
|
|
||||||
+ slave.pcm {
|
|
||||||
+ type hw
|
|
||||||
+ card $CARD
|
|
||||||
+ }
|
|
||||||
+ slave.format S24_LE
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# Common output path for front and surround outputs
|
|
||||||
+#
|
|
||||||
+AMLOGIC-HDMI.pcm.common.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type asym
|
|
||||||
+ playback.pcm {
|
|
||||||
+ type softvol
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards."
|
|
||||||
+ { @func card_driver card $CARD }
|
|
||||||
+ ".pcm.hw-s24le:CARD=" $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ control {
|
|
||||||
+ name "PCM Playback Volume"
|
|
||||||
+ card $CARD
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+<confdir:pcm/front.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI.pcm.front.0 cards.AMLOGIC-HDMI.pcm.common.0
|
|
||||||
+
|
|
||||||
+# The mapping of ALSA channels to surround channels is very imprecise.
|
|
||||||
+# ALSA uses a different terminology and speaker placement to the CEA
|
|
||||||
+# surround positioning. CEA has the positioning of:
|
|
||||||
+#
|
|
||||||
+# LFE
|
|
||||||
+# FL FLC FC FRC FR#
|
|
||||||
+#
|
|
||||||
+# RL RLC RC RRC RR
|
|
||||||
+#
|
|
||||||
+# ALSA's idea is:
|
|
||||||
+#
|
|
||||||
+# LFE
|
|
||||||
+# FL C FR
|
|
||||||
+#
|
|
||||||
+# SL SR
|
|
||||||
+#
|
|
||||||
+# RL RR
|
|
||||||
+#
|
|
||||||
+# We do our best to map between these representations.
|
|
||||||
+
|
|
||||||
+<confdir:pcm/surround40.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI.pcm.surround40.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type empty
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer
|
|
||||||
+ name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards.AMLOGIC-HDMI.pcm.common.0:CARD="
|
|
||||||
+ $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+# surround 41 and surround50 are (annoyingly) mapped to surround51
|
|
||||||
+# We could do without stacking two 'route' plugins on top of each other
|
|
||||||
+
|
|
||||||
+<confdir:pcm/surround41.conf>
|
|
||||||
+<confdir:pcm/surround50.conf>
|
|
||||||
+<confdir:pcm/surround51.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI.pcm.surround51.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type route
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer
|
|
||||||
+ name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards.AMLOGIC-HDMI.pcm.common.0:CARD="
|
|
||||||
+ $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
|
||||||
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
|
||||||
+ ttable.2.4 1.0 # RL -> slave 4 -> hdmi 4 RL
|
|
||||||
+ ttable.3.5 1.0 # RR -> slave 5 -> hdmi 5 RR
|
|
||||||
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
|
||||||
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+<confdir:pcm/surround71.conf>
|
|
||||||
+
|
|
||||||
+AMLOGIC-HDMI.pcm.surround71.0 {
|
|
||||||
+ @args [ CARD ]
|
|
||||||
+ @args.CARD { type string }
|
|
||||||
+ type route
|
|
||||||
+ slave.pcm {
|
|
||||||
+ @func refer
|
|
||||||
+ name {
|
|
||||||
+ @func concat strings [
|
|
||||||
+ "cards.AMLOGIC-HDMI.pcm.common.0:CARD="
|
|
||||||
+ $CARD
|
|
||||||
+ ]
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ slave.channels 8
|
|
||||||
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
|
||||||
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
|
||||||
+ ttable.2.6 1.0 # RL -> slave 6 -> hdmi 6 RLC/FLC
|
|
||||||
+ ttable.3.7 1.0 # RR -> slave 7 -> hdmi 7 RRC/FRC
|
|
||||||
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
|
||||||
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
|
||||||
+ ttable.6.4 1.0 # SL -> slave 4 -> hdmi 4 RL
|
|
||||||
+ ttable.7.5 1.0 # SR -> slave 5 -> hdmi 5 RR
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#<confdir:pcm/hdmi.conf>
|
|
||||||
+#
|
|
||||||
+#AMLOGIC-HDMI.pcm.hdmi.0 {
|
|
||||||
+# @args [ CARD AES0 AES1 AES2 AES3 ]
|
|
||||||
+# @args.CARD {
|
|
||||||
+# type string
|
|
||||||
+# }
|
|
||||||
+# @args.AES0 {
|
|
||||||
+# type integer
|
|
||||||
+# }
|
|
||||||
+# @args.AES1 {
|
|
||||||
+# type integer
|
|
||||||
+# }
|
|
||||||
+# @args.AES2 {
|
|
||||||
+# type integer
|
|
||||||
+# }
|
|
||||||
+# @args.AES3 {
|
|
||||||
+# type integer
|
|
||||||
+# default 0x01 # IEC958_AES3_CON_FS_NOTID
|
|
||||||
+# }
|
|
||||||
+# type iec958
|
|
||||||
+# slave.pcm {
|
|
||||||
+# type hw
|
|
||||||
+# card $CARD
|
|
||||||
+# }
|
|
||||||
+# slave.format IEC958_SUBFRAME_LE
|
|
||||||
+# # $AES3 must be correct for some AV receivers to accept the stream
|
|
||||||
+# status [ $AES0 $AES1 $AES2 $AES3 ]
|
|
||||||
+# hdmi_mode true
|
|
||||||
+#}
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -0,0 +1,201 @@
|
|||||||
|
From 34dbf4272c3036a7e8b208ad8dc35a035918af66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: chewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Thu, 14 May 2020 13:31:34 +0000
|
||||||
|
Subject: [PATCH 1/3] WIP: add confs for gx-sound-card and axg-sound-card
|
||||||
|
|
||||||
|
---
|
||||||
|
src/conf/cards/axg-sound-card.conf | 87 ++++++++++++++++++++++++++++++
|
||||||
|
src/conf/cards/gx-sound-card.conf | 87 ++++++++++++++++++++++++++++++
|
||||||
|
2 files changed, 174 insertions(+)
|
||||||
|
create mode 100644 src/conf/cards/axg-sound-card.conf
|
||||||
|
create mode 100644 src/conf/cards/gx-sound-card.conf
|
||||||
|
|
||||||
|
diff --git a/src/conf/cards/axg-sound-card.conf b/src/conf/cards/axg-sound-card.conf
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..f3caaed0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/conf/cards/axg-sound-card.conf
|
||||||
|
@@ -0,0 +1,87 @@
|
||||||
|
+# SPDX-License-Identifier: GPL-2.0
|
||||||
|
+# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Configuration for Amlogic AXG audio
|
||||||
|
+#
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.default {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type softvol
|
||||||
|
+ slave.pcm {
|
||||||
|
+ type plug
|
||||||
|
+ slave {
|
||||||
|
+ pcm {
|
||||||
|
+ type hw
|
||||||
|
+ card $CARD
|
||||||
|
+ device 0
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ control {
|
||||||
|
+ name "PCM Playback Volume"
|
||||||
|
+ card $CARD
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/hdmi.conf>
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.hdmi.0 {
|
||||||
|
+ @args [ CARD AES0 AES1 AES2 AES3 ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ @args.AES0 { type integer }
|
||||||
|
+ @args.AES1 { type integer }
|
||||||
|
+ @args.AES2 { type integer }
|
||||||
|
+ @args.AES3 { type integer }
|
||||||
|
+ type hooks
|
||||||
|
+ slave.pcm {
|
||||||
|
+ type hw
|
||||||
|
+ card $CARD
|
||||||
|
+ device 0
|
||||||
|
+ }
|
||||||
|
+ hooks.0 {
|
||||||
|
+ type ctl_elems
|
||||||
|
+ hook_args [
|
||||||
|
+ {
|
||||||
|
+ name "IEC958 Playback Default"
|
||||||
|
+ interface PCM
|
||||||
|
+ lock true
|
||||||
|
+ preserve true
|
||||||
|
+ optional true
|
||||||
|
+ value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||||
|
+ }
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/iec958.conf>
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.iec958.0 {
|
||||||
|
+ @args [ CARD AES0 AES1 AES2 AES3 ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ @args.AES0 { type integer }
|
||||||
|
+ @args.AES1 { type integer }
|
||||||
|
+ @args.AES2 { type integer }
|
||||||
|
+ @args.AES3 { type integer }
|
||||||
|
+ type hooks
|
||||||
|
+ slave.pcm {
|
||||||
|
+ type hw
|
||||||
|
+ card $CARD
|
||||||
|
+ device 1
|
||||||
|
+ }
|
||||||
|
+ hooks.0 {
|
||||||
|
+ type ctl_elems
|
||||||
|
+ hook_args [
|
||||||
|
+ {
|
||||||
|
+ name "IEC958 Playback Default"
|
||||||
|
+ interface PCM
|
||||||
|
+ lock true
|
||||||
|
+ preserve true
|
||||||
|
+ optional true
|
||||||
|
+ value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||||
|
+ }
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ hint.device 1
|
||||||
|
+}
|
||||||
|
diff --git a/src/conf/cards/gx-sound-card.conf b/src/conf/cards/gx-sound-card.conf
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..b669a260
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/conf/cards/gx-sound-card.conf
|
||||||
|
@@ -0,0 +1,87 @@
|
||||||
|
+# SPDX-License-Identifier: GPL-2.0
|
||||||
|
+# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
+
|
||||||
|
+#
|
||||||
|
+# Configuration for Amlogic AIU audio
|
||||||
|
+#
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.default {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type softvol
|
||||||
|
+ slave.pcm {
|
||||||
|
+ type plug
|
||||||
|
+ slave {
|
||||||
|
+ pcm {
|
||||||
|
+ type hw
|
||||||
|
+ card $CARD
|
||||||
|
+ device 0
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ control {
|
||||||
|
+ name "PCM Playback Volume"
|
||||||
|
+ card $CARD
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/hdmi.conf>
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.hdmi.0 {
|
||||||
|
+ @args [ CARD AES0 AES1 AES2 AES3 ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ @args.AES0 { type integer }
|
||||||
|
+ @args.AES1 { type integer }
|
||||||
|
+ @args.AES2 { type integer }
|
||||||
|
+ @args.AES3 { type integer }
|
||||||
|
+ type hooks
|
||||||
|
+ slave.pcm {
|
||||||
|
+ type hw
|
||||||
|
+ card $CARD
|
||||||
|
+ device 0
|
||||||
|
+ }
|
||||||
|
+ hooks.0 {
|
||||||
|
+ type ctl_elems
|
||||||
|
+ hook_args [
|
||||||
|
+ {
|
||||||
|
+ name "IEC958 Playback Default"
|
||||||
|
+ interface PCM
|
||||||
|
+ lock true
|
||||||
|
+ preserve true
|
||||||
|
+ optional true
|
||||||
|
+ value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||||
|
+ }
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/iec958.conf>
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.iec958.0 {
|
||||||
|
+ @args [ CARD AES0 AES1 AES2 AES3 ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ @args.AES0 { type integer }
|
||||||
|
+ @args.AES1 { type integer }
|
||||||
|
+ @args.AES2 { type integer }
|
||||||
|
+ @args.AES3 { type integer }
|
||||||
|
+ type hooks
|
||||||
|
+ slave.pcm {
|
||||||
|
+ type hw
|
||||||
|
+ card $CARD
|
||||||
|
+ device 1
|
||||||
|
+ }
|
||||||
|
+ hooks.0 {
|
||||||
|
+ type ctl_elems
|
||||||
|
+ hook_args [
|
||||||
|
+ {
|
||||||
|
+ name "IEC958 Playback Default"
|
||||||
|
+ interface PCM
|
||||||
|
+ lock true
|
||||||
|
+ preserve true
|
||||||
|
+ optional true
|
||||||
|
+ value [ $AES0 $AES1 $AES2 $AES3 ]
|
||||||
|
+ }
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ hint.device 1
|
||||||
|
+}
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From 515f49934ea4b552cda1661aa5ac03f1d5874777 Mon Sep 17 00:00:00 2001
|
From 2891f697cbfea4f0bf60bc476e78ab25947ac810 Mon Sep 17 00:00:00 2001
|
||||||
From: chewitt <christianshewitt@gmail.com>
|
From: chewitt <christianshewitt@gmail.com>
|
||||||
Date: Fri, 15 May 2020 06:12:43 +0000
|
Date: Fri, 15 May 2020 06:12:43 +0000
|
||||||
Subject: [PATCH 2/3] WIP: add Amlogic cards to Makefile.am
|
Subject: [PATCH 2/3] WIP: add Amlogic cards to Makefile.am
|
||||||
@ -8,18 +8,25 @@ Subject: [PATCH 2/3] WIP: add Amlogic cards to Makefile.am
|
|||||||
1 file changed, 2 insertions(+)
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
|
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
|
||||||
index 00999f01..80f7ba6b 100644
|
index 00999f01..dc2881d7 100644
|
||||||
--- a/src/conf/cards/Makefile.am
|
--- a/src/conf/cards/Makefile.am
|
||||||
+++ b/src/conf/cards/Makefile.am
|
+++ b/src/conf/cards/Makefile.am
|
||||||
@@ -2,6 +2,8 @@ alsaconfigdir = @ALSA_CONFIG_DIR@
|
@@ -12,6 +12,7 @@ cfg_files = aliases.conf \
|
||||||
alsadir = $(alsaconfigdir)/cards
|
Audigy2.conf \
|
||||||
cfg_files = aliases.conf \
|
Aureon51.conf \
|
||||||
AACI.conf \
|
Aureon71.conf \
|
||||||
+ AMLOGIC-HDMI.conf \
|
+ axg-sound-card.conf \
|
||||||
+ AMLOGIC-HDMI-SPDIF.conf \
|
CA0106.conf \
|
||||||
ATIIXP.conf \
|
CMI8338.conf \
|
||||||
ATIIXP-SPDMA.conf \
|
CMI8338-SWIEC.conf \
|
||||||
ATIIXP-MODEM.conf \
|
@@ -29,6 +30,7 @@ cfg_files = aliases.conf \
|
||||||
|
FWSpeakers.conf \
|
||||||
|
FireWave.conf \
|
||||||
|
GUS.conf \
|
||||||
|
+ gx-sound-card.conf \
|
||||||
|
HDA-Intel.conf \
|
||||||
|
HdmiLpeAudio.conf \
|
||||||
|
ICE1712.conf \
|
||||||
--
|
--
|
||||||
2.17.1
|
2.17.1
|
||||||
|
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
From b22476f67deae9b0daf69516e7b94f64e7acc895 Mon Sep 17 00:00:00 2001
|
|
||||||
From: chewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Thu, 14 May 2020 13:32:26 +0000
|
|
||||||
Subject: [PATCH 3/3] WIP: add Amlogic cards to aliases.conf
|
|
||||||
|
|
||||||
---
|
|
||||||
src/conf/cards/aliases.conf | 48 +++++++++++++++++++++++++++++++++++++
|
|
||||||
1 file changed, 48 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
|
|
||||||
index 18a920f4..14dedb63 100644
|
|
||||||
--- a/src/conf/cards/aliases.conf
|
|
||||||
+++ b/src/conf/cards/aliases.conf
|
|
||||||
@@ -58,6 +58,54 @@ CMI8787 cards.CMI8788
|
|
||||||
pistachio cards.pistachio-card
|
|
||||||
VC4-HDMI cards.vc4-hdmi
|
|
||||||
|
|
||||||
+# Amlogic HDMI
|
|
||||||
+A95XF3-AIR cards.AMLOGIC-HDMI
|
|
||||||
+GSKING-X cards.AMLOGIC-HDMI
|
|
||||||
+GTKING-PRO cards.AMLOGIC-HDMI
|
|
||||||
+H96-MAX cards.AMLOGIC-HDMI
|
|
||||||
+KHADAS-VIM cards.AMLOGIC-HDMI
|
|
||||||
+KHADAS-VIM2 cards.AMLOGIC-HDMI
|
|
||||||
+KHADAS-VIM3 cards.AMLOGIC-HDMI
|
|
||||||
+LIBRETECH-AC cards.AMLOGIC-HDMI
|
|
||||||
+LIBRETECH-CC cards.AMLOGIC-HDMI
|
|
||||||
+LIBRETECH-PC cards.AMLOGIC-HDMI
|
|
||||||
+NANOPI-K2 cards.AMLOGIC-HDMI
|
|
||||||
+NEXBOX-A95X cards.AMLOGIC-HDMI
|
|
||||||
+ODROID-C2 cards.AMLOGIC-HDMI
|
|
||||||
+ODROID-C4 cards.AMLOGIC-HDMI
|
|
||||||
+ODROID-HC4 cards.AMLOGIC-HDMI
|
|
||||||
+ODROID-N2 cards.AMLOGIC-HDMI
|
|
||||||
+SEI510 cards.AMLOGIC-HDMI
|
|
||||||
+SEI610 cards.AMLOGIC-HDMI
|
|
||||||
+WETEK-HUB cards.AMLOGIC-HDMI
|
|
||||||
+X96-AIR cards.AMLOGIC-HDMI
|
|
||||||
+
|
|
||||||
+# Amlogic HDMI-SPDIF
|
|
||||||
+GTKING cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+P230-Q200 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+UGOOS-AM6 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+WETEK-CORE2 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+WETEK-PLAY2 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+X96-MAX cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+
|
|
||||||
+# Not Upstream Cards
|
|
||||||
+P200 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+P201 cards.AMLOGIC-HDMI
|
|
||||||
+P212 cards.AMLOGIC-HDMI
|
|
||||||
+VEGA-S95 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+NEXBOX-A1 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+RBOX-PRO cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+U200 cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+TANIX-TX5MAX cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+KHADAS-VIM3L cards.AMLOGIC-HDMI
|
|
||||||
+
|
|
||||||
+# Meson 8 Cards
|
|
||||||
+EC100 cards.AMLOGIC-HDMI
|
|
||||||
+ODROID-C1 cards.AMLOGIC-HDMI
|
|
||||||
+M8S cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+MXIII cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+WETEK-CORE cards.AMLOGIC-HDMI-SPDIF
|
|
||||||
+
|
|
||||||
<confdir:pcm/default.conf>
|
|
||||||
<confdir:pcm/dmix.conf>
|
|
||||||
<confdir:pcm/dsnoop.conf>
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -0,0 +1,219 @@
|
|||||||
|
From de0491bc0c62422a9eb018bcfdefeae2eba5dbe8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||||
|
Date: Mon, 18 Oct 2021 03:33:58 +0000
|
||||||
|
Subject: [PATCH 3/3] WIP: add analogue surrounds to confs
|
||||||
|
|
||||||
|
---
|
||||||
|
src/conf/cards/axg-sound-card.conf | 92 ++++++++++++++++++++++++++++++
|
||||||
|
src/conf/cards/gx-sound-card.conf | 92 ++++++++++++++++++++++++++++++
|
||||||
|
2 files changed, 184 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/conf/cards/axg-sound-card.conf b/src/conf/cards/axg-sound-card.conf
|
||||||
|
index f3caaed0..eb7201e7 100644
|
||||||
|
--- a/src/conf/cards/axg-sound-card.conf
|
||||||
|
+++ b/src/conf/cards/axg-sound-card.conf
|
||||||
|
@@ -25,6 +25,98 @@ axg-sound-card.pcm.default {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+<confdir:pcm/front.conf>
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.front.0 cards.axg-sound-card.pcm.default
|
||||||
|
+
|
||||||
|
+# The mapping of ALSA channels to surround channels is very imprecise.
|
||||||
|
+# ALSA uses a different terminology and speaker placement to the CEA
|
||||||
|
+# surround positioning. CEA has the positioning of:
|
||||||
|
+#
|
||||||
|
+# LFE
|
||||||
|
+# FL FLC FC FRC FR
|
||||||
|
+#
|
||||||
|
+# RL RLC RC RRC RR
|
||||||
|
+#
|
||||||
|
+# ALSA's idea is:
|
||||||
|
+#
|
||||||
|
+# LFE
|
||||||
|
+# FL C FR
|
||||||
|
+#
|
||||||
|
+# SL SR
|
||||||
|
+#
|
||||||
|
+# RL RR
|
||||||
|
+#
|
||||||
|
+# We do our best to map between these representations.
|
||||||
|
+
|
||||||
|
+<confdir:pcm/surround40.conf>
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.surround40.0 {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type empty
|
||||||
|
+ slave.pcm {
|
||||||
|
+ @func refer
|
||||||
|
+ name {
|
||||||
|
+ @func concat strings [
|
||||||
|
+ "cards.axg-sound-card.pcm.default:CARD="
|
||||||
|
+ $CARD
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/surround41.conf>
|
||||||
|
+<confdir:pcm/surround50.conf>
|
||||||
|
+<confdir:pcm/surround51.conf>
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.surround51.0 {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type route
|
||||||
|
+ slave.pcm {
|
||||||
|
+ @func refer
|
||||||
|
+ name {
|
||||||
|
+ @func concat strings [
|
||||||
|
+ "cards.axg-sound-card.pcm.default:CARD="
|
||||||
|
+ $CARD
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
||||||
|
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
||||||
|
+ ttable.2.4 1.0 # RL -> slave 4 -> hdmi 4 RL
|
||||||
|
+ ttable.3.5 1.0 # RR -> slave 5 -> hdmi 5 RR
|
||||||
|
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
||||||
|
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/surround71.conf>
|
||||||
|
+
|
||||||
|
+axg-sound-card.pcm.surround71.0 {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type route
|
||||||
|
+ slave.pcm {
|
||||||
|
+ @func refer
|
||||||
|
+ name {
|
||||||
|
+ @func concat strings [
|
||||||
|
+ "cards.axg-sound-card.pcm.default:CARD="
|
||||||
|
+ $CARD
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ slave.channels 8
|
||||||
|
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
||||||
|
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
||||||
|
+ ttable.2.6 1.0 # RL -> slave 6 -> hdmi 6 RLC/FLC
|
||||||
|
+ ttable.3.7 1.0 # RR -> slave 7 -> hdmi 7 RRC/FRC
|
||||||
|
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
||||||
|
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
||||||
|
+ ttable.6.4 1.0 # SL -> slave 4 -> hdmi 4 RL
|
||||||
|
+ ttable.7.5 1.0 # SR -> slave 5 -> hdmi 5 RR
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
<confdir:pcm/hdmi.conf>
|
||||||
|
|
||||||
|
axg-sound-card.pcm.hdmi.0 {
|
||||||
|
diff --git a/src/conf/cards/gx-sound-card.conf b/src/conf/cards/gx-sound-card.conf
|
||||||
|
index b669a260..e0662054 100644
|
||||||
|
--- a/src/conf/cards/gx-sound-card.conf
|
||||||
|
+++ b/src/conf/cards/gx-sound-card.conf
|
||||||
|
@@ -25,6 +25,98 @@ gx-sound-card.pcm.default {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+<confdir:pcm/front.conf>
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.front.0 cards.gx-sound-card.pcm.default
|
||||||
|
+
|
||||||
|
+# The mapping of ALSA channels to surround channels is very imprecise.
|
||||||
|
+# ALSA uses a different terminology and speaker placement to the CEA
|
||||||
|
+# surround positioning. CEA has the positioning of:
|
||||||
|
+#
|
||||||
|
+# LFE
|
||||||
|
+# FL FLC FC FRC FR
|
||||||
|
+#
|
||||||
|
+# RL RLC RC RRC RR
|
||||||
|
+#
|
||||||
|
+# ALSA's idea is:
|
||||||
|
+#
|
||||||
|
+# LFE
|
||||||
|
+# FL C FR
|
||||||
|
+#
|
||||||
|
+# SL SR
|
||||||
|
+#
|
||||||
|
+# RL RR
|
||||||
|
+#
|
||||||
|
+# We do our best to map between these representations.
|
||||||
|
+
|
||||||
|
+<confdir:pcm/surround40.conf>
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.surround40.0 {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type empty
|
||||||
|
+ slave.pcm {
|
||||||
|
+ @func refer
|
||||||
|
+ name {
|
||||||
|
+ @func concat strings [
|
||||||
|
+ "cards.gx-sound-card.pcm.default:CARD="
|
||||||
|
+ $CARD
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/surround41.conf>
|
||||||
|
+<confdir:pcm/surround50.conf>
|
||||||
|
+<confdir:pcm/surround51.conf>
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.surround51.0 {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type route
|
||||||
|
+ slave.pcm {
|
||||||
|
+ @func refer
|
||||||
|
+ name {
|
||||||
|
+ @func concat strings [
|
||||||
|
+ "cards.gx-sound-card.pcm.default:CARD="
|
||||||
|
+ $CARD
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
||||||
|
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
||||||
|
+ ttable.2.4 1.0 # RL -> slave 4 -> hdmi 4 RL
|
||||||
|
+ ttable.3.5 1.0 # RR -> slave 5 -> hdmi 5 RR
|
||||||
|
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
||||||
|
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+<confdir:pcm/surround71.conf>
|
||||||
|
+
|
||||||
|
+gx-sound-card.pcm.surround71.0 {
|
||||||
|
+ @args [ CARD ]
|
||||||
|
+ @args.CARD { type string }
|
||||||
|
+ type route
|
||||||
|
+ slave.pcm {
|
||||||
|
+ @func refer
|
||||||
|
+ name {
|
||||||
|
+ @func concat strings [
|
||||||
|
+ "cards.gx-sound-card.pcm.default:CARD="
|
||||||
|
+ $CARD
|
||||||
|
+ ]
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ slave.channels 8
|
||||||
|
+ ttable.0.0 1.0 # FL -> slave 0 -> hdmi 0 FL
|
||||||
|
+ ttable.1.1 1.0 # FR -> slave 1 -> hdmi 1 FR
|
||||||
|
+ ttable.2.6 1.0 # RL -> slave 6 -> hdmi 6 RLC/FLC
|
||||||
|
+ ttable.3.7 1.0 # RR -> slave 7 -> hdmi 7 RRC/FRC
|
||||||
|
+ ttable.4.3 1.0 # C -> slave 3 -> hdmi 3 FC
|
||||||
|
+ ttable.5.2 1.0 # LFE -> slave 2 -> hdmi 2 LFE
|
||||||
|
+ ttable.6.4 1.0 # SL -> slave 4 -> hdmi 4 RL
|
||||||
|
+ ttable.7.5 1.0 # SR -> slave 5 -> hdmi 5 RR
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
<confdir:pcm/hdmi.conf>
|
||||||
|
|
||||||
|
gx-sound-card.pcm.hdmi.0 {
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,67 +0,0 @@
|
|||||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp 2019-06-14 04:29:43.569698373 +0000
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp 2019-06-14 04:33:21.357709602 +0000
|
|
||||||
@@ -26,7 +26,7 @@ extern "C" {
|
|
||||||
using namespace KODI::WINDOWING::GBM;
|
|
||||||
|
|
||||||
CDVDVideoCodecDRMPRIME::CDVDVideoCodecDRMPRIME(CProcessInfo& processInfo)
|
|
||||||
- : CDVDVideoCodec(processInfo)
|
|
||||||
+ : CDVDVideoCodec(processInfo), m_prevTime(0), m_seeking(false)
|
|
||||||
{
|
|
||||||
m_pFrame = av_frame_alloc();
|
|
||||||
m_videoBufferPool = std::make_shared<CVideoBufferPoolDRMPRIME>();
|
|
||||||
@@ -281,6 +281,20 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecD
|
|
||||||
return VC_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (m_prevTime && std::abs(m_prevTime - m_processInfo.GetTime()) >= 5000)
|
|
||||||
+ m_seeking = true;
|
|
||||||
+
|
|
||||||
+ m_prevTime = m_processInfo.GetTime();
|
|
||||||
+
|
|
||||||
+ // Drop frames too far away from the target time
|
|
||||||
+ if (m_seeking && std::abs(m_pFrame->pts/1000 - m_processInfo.GetTime()) >= 5000) {
|
|
||||||
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecDRMPRIME::%s - Dropping pts %llu time %lld", __FUNCTION__, m_pFrame->pts/1000, m_processInfo.GetTime());
|
|
||||||
+ av_frame_unref(m_pFrame);
|
|
||||||
+ return VC_BUFFER;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ m_seeking = false;
|
|
||||||
+
|
|
||||||
if (pVideoPicture->videoBuffer)
|
|
||||||
pVideoPicture->videoBuffer->Release();
|
|
||||||
pVideoPicture->videoBuffer = nullptr;
|
|
||||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h 2019-06-14 04:35:37.981723614 +0000
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h 2019-06-14 04:35:30.437722730 +0000
|
|
||||||
@@ -42,4 +42,6 @@ protected:
|
|
||||||
AVCodecContext* m_pCodecContext = nullptr;
|
|
||||||
AVFrame* m_pFrame = nullptr;
|
|
||||||
std::shared_ptr<IVideoBufferPool> m_videoBufferPool;
|
|
||||||
+ int64_t m_prevTime;
|
|
||||||
+ bool m_seeking;
|
|
||||||
};
|
|
||||||
--- a/xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp 2019-04-13 17:57:10.000000000 +0000
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/Process/ProcessInfo.cpp 2019-06-14 04:37:34.214037038 +0000
|
|
||||||
@@ -635,6 +635,13 @@ bool CProcessInfo::GetVideoRender()
|
|
||||||
return m_renderVideoLayer;
|
|
||||||
}
|
|
||||||
|
|
||||||
+int64_t CProcessInfo::GetTime()
|
|
||||||
+{
|
|
||||||
+ CSingleLock lock(m_stateSection);
|
|
||||||
+
|
|
||||||
+ return m_time;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void CProcessInfo::SetPlayTimes(time_t start, int64_t current, int64_t min, int64_t max)
|
|
||||||
{
|
|
||||||
CSingleLock lock(m_stateSection);
|
|
||||||
--- a/xbmc/cores/VideoPlayer/Process/ProcessInfo.h 2019-04-13 17:57:10.000000000 +0000
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/Process/ProcessInfo.h 2019-06-14 04:38:50.698426382 +0000
|
|
||||||
@@ -101,6 +101,7 @@ public:
|
|
||||||
bool GetGuiRender();
|
|
||||||
void SetVideoRender(bool video);
|
|
||||||
bool GetVideoRender();
|
|
||||||
+ int64_t GetTime();
|
|
||||||
|
|
||||||
void SetPlayTimes(time_t start, int64_t current, int64_t min, int64_t max);
|
|
||||||
int64_t GetMaxTime();
|
|
@ -1,49 +0,0 @@
|
|||||||
From 227da4272ca9ccecfbff90cd3e8678f0aee6e3ea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dongjin Kim <tobetter@gmail.com>
|
|
||||||
Date: Wed, 29 Jul 2020 04:05:03 +0900
|
|
||||||
Subject: [PATCH 05/88] HACK: drm/meson: add YUV422 output support
|
|
||||||
|
|
||||||
Support YUV422 output from the Amlogic Meson SoC VPU to the HDMI
|
|
||||||
controller. This incorrectly fixes the green-line on GX devices.
|
|
||||||
|
|
||||||
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
|
|
||||||
---
|
|
||||||
drivers/gpu/drm/meson/meson_dw_hdmi.c | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
|
||||||
index aad75a22dc33..97d670081824 100644
|
|
||||||
--- a/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
|
||||||
+++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c
|
|
||||||
@@ -703,6 +703,7 @@ dw_hdmi_mode_valid(struct dw_hdmi *hdmi, void *data,
|
|
||||||
|
|
||||||
static const u32 meson_dw_hdmi_out_bus_fmts[] = {
|
|
||||||
MEDIA_BUS_FMT_YUV8_1X24,
|
|
||||||
+ MEDIA_BUS_FMT_UYVY8_1X16,
|
|
||||||
MEDIA_BUS_FMT_UYYVYY8_0_5X24,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -802,7 +803,8 @@ static void meson_venc_hdmi_encoder_mode_set(struct drm_bridge *bridge,
|
|
||||||
if (dw_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYYVYY8_0_5X24) {
|
|
||||||
ycrcb_map = VPU_HDMI_OUTPUT_CRYCB;
|
|
||||||
yuv420_mode = true;
|
|
||||||
- }
|
|
||||||
+ } else if (dw_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYVY8_1X16)
|
|
||||||
+ ycrcb_map = VPU_HDMI_OUTPUT_CRYCB;
|
|
||||||
|
|
||||||
/* VENC + VENC-DVI Mode setup */
|
|
||||||
meson_venc_hdmi_mode_set(priv, vic, ycrcb_map, yuv420_mode, mode);
|
|
||||||
@@ -814,6 +816,10 @@ static void meson_venc_hdmi_encoder_mode_set(struct drm_bridge *bridge,
|
|
||||||
/* Setup YUV420 to HDMI-TX, no 10bit diphering */
|
|
||||||
writel_relaxed(2 | (2 << 2),
|
|
||||||
priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
|
|
||||||
+ else if (dw_hdmi->output_bus_fmt == MEDIA_BUS_FMT_UYVY8_1X16)
|
|
||||||
+ /* Setup YUV422 to HDMI-TX, no 10bit diphering */
|
|
||||||
+ writel_relaxed(1 | (2 << 2),
|
|
||||||
+ priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
|
|
||||||
else
|
|
||||||
/* Setup YUV444 to HDMI-TX, no 10bit diphering */
|
|
||||||
writel_relaxed(0, priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
|||||||
From 592630a4362674aaaa3791bf107e57dbe3d4f0cf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Date: Thu, 16 Apr 2020 08:31:55 +0000
|
|
||||||
Subject: [PATCH 06/88] HACK: mmc: core: always re-init sdcards to set default
|
|
||||||
3.3v regulator ios
|
|
||||||
|
|
||||||
sd-uhs-** in device-tree changes the voltage to 1.8v, so we need to ensure
|
|
||||||
the card is reset to 3.3v before rebooting else on reboot there is no card
|
|
||||||
to boot from.
|
|
||||||
|
|
||||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
drivers/mmc/core/sd.c | 22 +++++++++++++++++++++-
|
|
||||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
|
|
||||||
index 6f054c449d46..5eeccc8b1e00 100644
|
|
||||||
--- a/drivers/mmc/core/sd.c
|
|
||||||
+++ b/drivers/mmc/core/sd.c
|
|
||||||
@@ -1245,6 +1245,26 @@ static int mmc_sd_suspend(struct mmc_host *host)
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Callback for shutdown
|
|
||||||
+ */
|
|
||||||
+static int mmc_sd_shutdown(struct mmc_host *host)
|
|
||||||
+{
|
|
||||||
+ mmc_claim_host(host);
|
|
||||||
+
|
|
||||||
+ if (mmc_card_suspended(host->card))
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
+ mmc_power_off(host);
|
|
||||||
+ mmc_card_set_suspended(host->card);
|
|
||||||
+
|
|
||||||
+ pm_runtime_disable(&host->card->dev);
|
|
||||||
+ pm_runtime_set_suspended(&host->card->dev);
|
|
||||||
+
|
|
||||||
+out:
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* This function tries to determine if the same card is still present
|
|
||||||
* and, if so, restore all state to it.
|
|
||||||
@@ -1323,7 +1343,7 @@ static const struct mmc_bus_ops mmc_sd_ops = {
|
|
||||||
.suspend = mmc_sd_suspend,
|
|
||||||
.resume = mmc_sd_resume,
|
|
||||||
.alive = mmc_sd_alive,
|
|
||||||
- .shutdown = mmc_sd_suspend,
|
|
||||||
+ .shutdown = mmc_sd_shutdown,
|
|
||||||
.hw_reset = mmc_sd_hw_reset,
|
|
||||||
};
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
From 9f7e0e762eb7e98293dc7c8bd00b4881e82ea68a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Phil Elwell <phil@raspberrypi.com>
|
|
||||||
Date: Wed, 10 Mar 2021 10:57:20 +0000
|
|
||||||
Subject: [PATCH 07/88] HACK: Revert "Bluetooth: Always request for user
|
|
||||||
confirmation for Just Works"
|
|
||||||
|
|
||||||
This reverts commit 92516cd97fd4d8ad5b1421a0d51771044f453a5f.
|
|
||||||
|
|
||||||
The commit "Bluetooth: Always request for user confirmation for Just
|
|
||||||
Works" prevents BLE devices pairing in (at least) the Raspberry Pi OS
|
|
||||||
GUI. After reverting it, pairing works again.
|
|
||||||
|
|
||||||
If another solution to the problem is found then this reversion will
|
|
||||||
be removed.
|
|
||||||
|
|
||||||
See: https://github.com/raspberrypi/linux/issues/4139
|
|
||||||
|
|
||||||
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
||||||
Signed-off-by: Fang Yafen <yafen@iscas.ac.cn>
|
|
||||||
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
|
|
||||||
---
|
|
||||||
net/bluetooth/smp.c | 11 ++---------
|
|
||||||
1 file changed, 2 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
|
|
||||||
index c659c464f7ca..05696317f302 100644
|
|
||||||
--- a/net/bluetooth/smp.c
|
|
||||||
+++ b/net/bluetooth/smp.c
|
|
||||||
@@ -883,16 +883,9 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth,
|
|
||||||
hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT)
|
|
||||||
smp->method = JUST_WORKS;
|
|
||||||
|
|
||||||
- /* If Just Works, Continue with Zero TK and ask user-space for
|
|
||||||
- * confirmation */
|
|
||||||
+ /* If Just Works, Continue with Zero TK */
|
|
||||||
if (smp->method == JUST_WORKS) {
|
|
||||||
- ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst,
|
|
||||||
- hcon->type,
|
|
||||||
- hcon->dst_type,
|
|
||||||
- passkey, 1);
|
|
||||||
- if (ret)
|
|
||||||
- return ret;
|
|
||||||
- set_bit(SMP_FLAG_WAIT_USER, &smp->flags);
|
|
||||||
+ set_bit(SMP_FLAG_TK_VALID, &smp->flags);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
From 4a6c74f4230afce1b9ae525ce09ee8da3a222003 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexander Dahl <post@lespocky.de>
|
|
||||||
Date: Mon, 11 Jan 2021 14:47:38 +0000
|
|
||||||
Subject: [PATCH 08/88] FROMGIT: arm64: dts: meson: Fix schema warnings for
|
|
||||||
pwm-leds
|
|
||||||
|
|
||||||
The node names for devices using the pwm-leds driver follow a certain
|
|
||||||
naming scheme (now). Parent node name is not enforced, but recommended
|
|
||||||
by DT project.
|
|
||||||
|
|
||||||
Signed-off-by: Alexander Dahl <post@lespocky.de>
|
|
||||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
|
||||||
---
|
|
||||||
.../arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 4 ++--
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 ++--
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 8 ++++----
|
|
||||||
3 files changed, 8 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
index 6fe589cd2ba2..45adae480a3d 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
@@ -42,10 +42,10 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
- pwmleds {
|
|
||||||
+ led-controller {
|
|
||||||
compatible = "pwm-leds";
|
|
||||||
|
|
||||||
- power {
|
|
||||||
+ led-1 {
|
|
||||||
label = "vim:red:power";
|
|
||||||
pwms = <&pwm_AO_ab 1 7812500 0>;
|
|
||||||
max-brightness = <255>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
index bf9877d33427..25857e0c0831 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
@@ -81,10 +81,10 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
- pwmleds {
|
|
||||||
+ led-controller {
|
|
||||||
compatible = "pwm-leds";
|
|
||||||
|
|
||||||
- power {
|
|
||||||
+ led-1 {
|
|
||||||
label = "vim:red:power";
|
|
||||||
pwms = <&pwm_AO_ab 1 7812500 0>;
|
|
||||||
max-brightness = <255>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
|
|
||||||
index 5ab139a34c01..039a8d0d1e9b 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
|
|
||||||
@@ -101,20 +101,20 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
- leds {
|
|
||||||
+ led-controller-1 {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
|
|
||||||
- led-bluetooth {
|
|
||||||
+ led-1 {
|
|
||||||
label = "sei610:blue:bt";
|
|
||||||
gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
|
|
||||||
default-state = "off";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
- pwmleds {
|
|
||||||
+ led-controller-2 {
|
|
||||||
compatible = "pwm-leds";
|
|
||||||
|
|
||||||
- power {
|
|
||||||
+ led-2 {
|
|
||||||
label = "sei610:red:power";
|
|
||||||
pwms = <&pwm_AO_ab 0 30518 0>;
|
|
||||||
max-brightness = <255>;
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
|||||||
From 7e76e4b0d180e5fb56825c1763a219c88bd79f28 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
Date: Fri, 4 Dec 2020 14:48:41 +0100
|
|
||||||
Subject: [PATCH 09/88] FROMGIT: arm64: dts: meson: vim3: whitespace fixups
|
|
||||||
|
|
||||||
Spaces have been used to indent 2 nodes.
|
|
||||||
Replace those with tabs and remove one extra newline
|
|
||||||
|
|
||||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
---
|
|
||||||
.../boot/dts/amlogic/meson-khadas-vim3.dtsi | 19 +++++++++----------
|
|
||||||
1 file changed, 9 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
index 8f8656262ae7..d3b25163b421 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
@@ -283,12 +283,12 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
ðmac {
|
|
||||||
- pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
- status = "okay";
|
|
||||||
- phy-mode = "rgmii";
|
|
||||||
- phy-handle = <&external_phy>;
|
|
||||||
- amlogic,tx-delay-ns = <2>;
|
|
||||||
+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ status = "okay";
|
|
||||||
+ phy-mode = "rgmii";
|
|
||||||
+ phy-handle = <&external_phy>;
|
|
||||||
+ amlogic,tx-delay-ns = <2>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&frddr_a {
|
|
||||||
@@ -354,9 +354,9 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
&pwm_ef {
|
|
||||||
- status = "okay";
|
|
||||||
- pinctrl-0 = <&pwm_e_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&pwm_e_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
};
|
|
||||||
|
|
||||||
&saradc {
|
|
||||||
@@ -450,7 +450,6 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
-
|
|
||||||
&tdmif_a {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
|||||||
From 8a50ed513979ecde63a49d0aaa71c302ac537980 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
Date: Fri, 4 Dec 2020 16:23:55 +0100
|
|
||||||
Subject: [PATCH 10/88] FROMGIT: arm64: dts: meson: vim3: enable hdmi audio
|
|
||||||
loopback
|
|
||||||
|
|
||||||
Enable audio capture frontends and a tdm decoder.
|
|
||||||
This makes it possible to loopback the audio played on the hdmi codec,
|
|
||||||
which is the only output interface at the moment.
|
|
||||||
|
|
||||||
Of course, one TODDR device would be enough to do that but since
|
|
||||||
the 3 FRDDRs are enabled on the playback side, let's do the same on the
|
|
||||||
capture side.
|
|
||||||
|
|
||||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
|
||||||
---
|
|
||||||
.../boot/dts/amlogic/meson-khadas-vim3.dtsi | 41 +++++++++++++++++--
|
|
||||||
1 file changed, 37 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
index d3b25163b421..4e4c2f924486 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
@@ -171,11 +171,16 @@
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
model = "G12B-KHADAS-VIM3";
|
|
||||||
- audio-aux-devs = <&tdmout_a>;
|
|
||||||
+ audio-aux-devs = <&tdmin_a>, <&tdmout_a>;
|
|
||||||
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
|
|
||||||
"TDMOUT_A IN 1", "FRDDR_B OUT 0",
|
|
||||||
"TDMOUT_A IN 2", "FRDDR_C OUT 0",
|
|
||||||
- "TDM_A Playback", "TDMOUT_A OUT";
|
|
||||||
+ "TDM_A Playback", "TDMOUT_A OUT",
|
|
||||||
+ "TDMIN_A IN 1", "TDM_A Capture",
|
|
||||||
+ "TDMIN_A IN 3", "TDM_A Loopback",
|
|
||||||
+ "TODDR_A IN 0", "TDMIN_A OUT",
|
|
||||||
+ "TODDR_B IN 0", "TDMIN_A OUT",
|
|
||||||
+ "TODDR_C IN 0", "TDMIN_A OUT";
|
|
||||||
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL2>,
|
|
||||||
<&clkc CLKID_MPLL0>,
|
|
||||||
@@ -198,8 +203,20 @@
|
|
||||||
sound-dai = <&frddr_c>;
|
|
||||||
};
|
|
||||||
|
|
||||||
- /* 8ch hdmi interface */
|
|
||||||
dai-link-3 {
|
|
||||||
+ sound-dai = <&toddr_a>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-4 {
|
|
||||||
+ sound-dai = <&toddr_b>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-5 {
|
|
||||||
+ sound-dai = <&toddr_c>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ /* 8ch hdmi interface */
|
|
||||||
+ dai-link-6 {
|
|
||||||
sound-dai = <&tdmif_a>;
|
|
||||||
dai-format = "i2s";
|
|
||||||
dai-tdm-slot-tx-mask-0 = <1 1>;
|
|
||||||
@@ -214,7 +231,7 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
/* hdmi glue */
|
|
||||||
- dai-link-4 {
|
|
||||||
+ dai-link-7 {
|
|
||||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
|
||||||
|
|
||||||
codec {
|
|
||||||
@@ -454,10 +471,26 @@
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
+&tdmin_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
&tdmout_a {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
+&toddr_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&toddr_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&toddr_c {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
&tohdmitx {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 0ac730a8509d4ad8ad800c6fb904c743a4721063 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Mon, 21 Dec 2020 12:06:25 +0000
|
|
||||||
Subject: [PATCH 11/88] FROMGIT: arm64: dts: meson: add i2c3/rtc nodes and rtc
|
|
||||||
aliases to ODROID-N2 dtsi
|
|
||||||
|
|
||||||
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
|
|
||||||
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
---
|
|
||||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
|
||||||
1 file changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
||||||
index 39a09661c5f6..b78be3e6974d 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
||||||
@@ -13,6 +13,8 @@
|
|
||||||
aliases {
|
|
||||||
serial0 = &uart_AO;
|
|
||||||
ethernet0 = ðmac;
|
|
||||||
+ rtc0 = &rtc;
|
|
||||||
+ rtc1 = &vrtc;
|
|
||||||
};
|
|
||||||
|
|
||||||
dioo2133: audio-amplifier-0 {
|
|
||||||
@@ -478,6 +480,18 @@
|
|
||||||
linux,rc-map-name = "rc-odroid";
|
|
||||||
};
|
|
||||||
|
|
||||||
+&i2c3 {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ rtc: rtc@51 {
|
|
||||||
+ compatible = "nxp,pcf8563";
|
|
||||||
+ reg = <0x51>;
|
|
||||||
+ wakeup-source;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
&pwm_ab {
|
|
||||||
pinctrl-0 = <&pwm_a_e_pins>;
|
|
||||||
pinctrl-names = "default";
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,188 +0,0 @@
|
|||||||
From 63dd112ad3698275df592895cc46b4afc950186a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Fri, 12 Jun 2020 08:05:20 +0000
|
|
||||||
Subject: [PATCH 12/88] FROMGIT: arm64: dts: meson: add initial Beelink
|
|
||||||
GS-King-X device-tree
|
|
||||||
|
|
||||||
The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference
|
|
||||||
board with an S922X-H chip.
|
|
||||||
|
|
||||||
- 4GB LPDDR4 RAM
|
|
||||||
- 64GB eMMC storage
|
|
||||||
- 10/100/1000 Base-T Ethernet
|
|
||||||
- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1)
|
|
||||||
- HDMI 2.1 video
|
|
||||||
- S/PDIF optical output
|
|
||||||
- 2x ESS9018 audio DACs
|
|
||||||
- 4x Ricor RT6862 audio amps
|
|
||||||
- Analogue headphone output
|
|
||||||
- 1x USB 2.0 OTG port
|
|
||||||
- 3x USB 3.0 ports
|
|
||||||
- IR receiver
|
|
||||||
- 1x micro SD card slot (internal)
|
|
||||||
- USB SATA controller with 2x 3.5" drive bays
|
|
||||||
- 1x Power on/off button
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Tested-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
|
||||||
.../boot/dts/amlogic/meson-g12b-gsking-x.dts | 133 ++++++++++++++++++
|
|
||||||
2 files changed, 134 insertions(+)
|
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
index ced03946314f..dce41cd3f347 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
@@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
|
|
||||||
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..211191f66344
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
|
|
||||||
@@ -0,0 +1,133 @@
|
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2019 BayLibre, SAS
|
|
||||||
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
+ * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/dts-v1/;
|
|
||||||
+
|
|
||||||
+#include "meson-g12b-w400.dtsi"
|
|
||||||
+#include <dt-bindings/leds/common.h>
|
|
||||||
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ compatible = "azw,gsking-x", "amlogic,g12b";
|
|
||||||
+ model = "Beelink GS-King X";
|
|
||||||
+
|
|
||||||
+ aliases {
|
|
||||||
+ rtc0 = &rtc;
|
|
||||||
+ rtc1 = &vrtc;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ gpio-keys-polled {
|
|
||||||
+ compatible = "gpio-keys-polled";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ poll-interval = <100>;
|
|
||||||
+
|
|
||||||
+ power-button {
|
|
||||||
+ label = "power";
|
|
||||||
+ linux,code = <KEY_POWER>;
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ sound {
|
|
||||||
+ compatible = "amlogic,axg-sound-card";
|
|
||||||
+ model = "GSKING-X";
|
|
||||||
+ audio-aux-devs = <&tdmout_a>;
|
|
||||||
+ audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 1",
|
|
||||||
+ "TDMOUT_A IN 1", "FRDDR_B OUT 1",
|
|
||||||
+ "TDMOUT_A IN 2", "FRDDR_C OUT 1",
|
|
||||||
+ "TDM_A Playback", "TDMOUT_A OUT";
|
|
||||||
+
|
|
||||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
|
||||||
+ <&clkc CLKID_MPLL0>,
|
|
||||||
+ <&clkc CLKID_MPLL1>;
|
|
||||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
|
||||||
+ assigned-clock-rates = <294912000>,
|
|
||||||
+ <270950400>,
|
|
||||||
+ <393216000>;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ dai-link-0 {
|
|
||||||
+ sound-dai = <&frddr_a>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-1 {
|
|
||||||
+ sound-dai = <&frddr_b>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-2 {
|
|
||||||
+ sound-dai = <&frddr_c>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ /* 8ch hdmi interface */
|
|
||||||
+ dai-link-3 {
|
|
||||||
+ sound-dai = <&tdmif_a>;
|
|
||||||
+ dai-format = "i2s";
|
|
||||||
+ dai-tdm-slot-tx-mask-0 = <1 1>;
|
|
||||||
+ dai-tdm-slot-tx-mask-1 = <1 1>;
|
|
||||||
+ dai-tdm-slot-tx-mask-2 = <1 1>;
|
|
||||||
+ dai-tdm-slot-tx-mask-3 = <1 1>;
|
|
||||||
+ mclk-fs = <256>;
|
|
||||||
+
|
|
||||||
+ codec {
|
|
||||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-4 {
|
|
||||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
|
||||||
+
|
|
||||||
+ codec {
|
|
||||||
+ sound-dai = <&hdmi_tx>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&arb {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&clkc_audio {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&frddr_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&frddr_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&frddr_c {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c3 {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ rtc: rtc@51 {
|
|
||||||
+ compatible = "nxp,pcf8563";
|
|
||||||
+ reg = <0x51>;
|
|
||||||
+ wakeup-source;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&tdmif_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&tdmout_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&tohdmitx {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,313 +0,0 @@
|
|||||||
From a8a95cf3c9eb46bd3645e170500d18ecf4774eff Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Thu, 31 Dec 2020 15:54:34 +0000
|
|
||||||
Subject: [PATCH 13/88] FROMGIT: arm64: dts: meson: shorten audio card names
|
|
||||||
for alsa compatibility
|
|
||||||
|
|
||||||
This patch shortens all audio card model names by dropping the SoC prefix
|
|
||||||
(for conformity) and rewording those that are still longer than alsa's 15
|
|
||||||
character name limit [0] to avoid userspace config issues.
|
|
||||||
|
|
||||||
[0] https://github.com/torvalds/linux/blob/master/Documentation/sound/alsa-configuration.rst#common-parameters-for-top-sound-card-modules
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 2 +-
|
|
||||||
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 2 +-
|
|
||||||
21 files changed, 21 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
|
|
||||||
index b00d0468c753..81269ccc2496 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
|
|
||||||
@@ -181,7 +181,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12A-SEI510";
|
|
||||||
+ model = "SEI510";
|
|
||||||
audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
|
|
||||||
<&tdmin_a>, <&tdmin_b>;
|
|
||||||
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
|
|
||||||
index 463a72d6bb7c..579f3d02d613 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
|
|
||||||
@@ -150,7 +150,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12A-X96-MAX";
|
|
||||||
+ model = "X96-MAX";
|
|
||||||
audio-aux-devs = <&tdmout_b>;
|
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
|
|
||||||
index 0e5c500fb78f..0e331aa5a2d7 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
|
|
||||||
@@ -44,7 +44,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12B-GTKING-PRO";
|
|
||||||
+ model = "GTKING-PRO";
|
|
||||||
audio-aux-devs = <&tdmout_b>;
|
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
|
|
||||||
index 10b87eb97b14..a7db84a500bb 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
|
|
||||||
@@ -28,7 +28,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12B-GTKING";
|
|
||||||
+ model = "GTKING";
|
|
||||||
audio-aux-devs = <&tdmout_b>;
|
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
||||||
index b78be3e6974d..58ce569b2ace 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
||||||
@@ -213,7 +213,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12B-ODROID-N2";
|
|
||||||
+ model = "ODROID-N2";
|
|
||||||
audio-widgets = "Line", "Lineout";
|
|
||||||
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
|
|
||||||
<&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
|
|
||||||
index b57bb0befc69..0c7892600d56 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12B-UGOOS-AM6";
|
|
||||||
+ model = "UGOOS-AM6";
|
|
||||||
audio-aux-devs = <&tdmout_b>;
|
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi
|
|
||||||
index c2480bab8d33..2d7032f41e4b 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi
|
|
||||||
@@ -186,7 +186,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXL-LIBRETECH-S9XX-PC";
|
|
||||||
+ model = "LIBRETECH-PC";
|
|
||||||
audio-aux-devs = <&dio2133>;
|
|
||||||
audio-widgets = "Speaker", "7J4-14 LEFT",
|
|
||||||
"Speaker", "7J4-11 RIGHT";
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
index 6b57e15aade3..dafc841f7c16 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi
|
|
||||||
@@ -121,7 +121,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GX-P230-Q200";
|
|
||||||
+ model = "P230-Q200";
|
|
||||||
audio-aux-devs = <&dio2133>;
|
|
||||||
audio-widgets = "Line", "Lineout";
|
|
||||||
audio-routing = "AU2 INL", "ACODEC LOLP",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
|
||||||
index 089e0636ba8a..7273eed5292c 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
|
|
||||||
@@ -134,7 +134,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXBB-NANOPI-K2";
|
|
||||||
+ model = "NANOPI-K2";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
|
||||||
index b5b11cb9f393..f887bfb445fd 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts
|
|
||||||
@@ -143,7 +143,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXBB-NEXBOX-A95X";
|
|
||||||
+ model = "NEXBOX-A95X";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
|
||||||
index c04ef57f7b3b..bfaf7f41a2d6 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
|
|
||||||
@@ -176,7 +176,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXBB-ODROID-C2";
|
|
||||||
+ model = "ODROID-C2";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts
|
|
||||||
index 0c1570153842..58733017eda8 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-hub.dts
|
|
||||||
@@ -15,7 +15,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXBB-WETEK-HUB";
|
|
||||||
+ model = "WETEK-HUB";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts
|
|
||||||
index f2562c7de67c..6eae692792ec 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts
|
|
||||||
@@ -50,7 +50,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXBB-WETEK-PLAY2";
|
|
||||||
+ model = "WETEK-PLAY2";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts
|
|
||||||
index 9e43f4dca90d..2d769203f671 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts
|
|
||||||
@@ -118,7 +118,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXL-LIBRETECH-S805X-AC";
|
|
||||||
+ model = "LIBRETECH-AC";
|
|
||||||
audio-widgets = "Speaker", "9J5-3 LEFT",
|
|
||||||
"Speaker", "9J5-2 RIGHT";
|
|
||||||
audio-routing = "9J5-3 LEFT", "ACODEC LOLN",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
index 45adae480a3d..60feac0179c0 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
|
|
||||||
@@ -66,7 +66,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXL-KHADAS-VIM1";
|
|
||||||
+ model = "KHADAS-VIM";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
|
|
||||||
index 9a3c08e6e6cc..93d8f8aff70d 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
|
|
||||||
@@ -159,7 +159,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXL-LIBRETECH-S905X-CC-V2";
|
|
||||||
+ model = "LIBRETECH-CC-V2";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
index 5ae7bb6209cb..82bfabfbd39c 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
|
|
||||||
@@ -135,7 +135,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXL-LIBRETECH-S905X-CC";
|
|
||||||
+ model = "LIBRETECH-CC";
|
|
||||||
audio-aux-devs = <&dio2133>;
|
|
||||||
audio-widgets = "Line", "Lineout";
|
|
||||||
audio-routing = "AU2 INL", "ACODEC LOLN",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
index 25857e0c0831..18a4b7a6c5df 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
|
||||||
@@ -148,7 +148,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,gx-sound-card";
|
|
||||||
- model = "GXM-KHADAS-VIM2";
|
|
||||||
+ model = "KHADAS-VIM2";
|
|
||||||
assigned-clocks = <&clkc CLKID_MPLL0>,
|
|
||||||
<&clkc CLKID_MPLL1>,
|
|
||||||
<&clkc CLKID_MPLL2>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
index 4e4c2f924486..f1706873d7a8 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi
|
|
||||||
@@ -170,7 +170,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "G12B-KHADAS-VIM3";
|
|
||||||
+ model = "KHADAS-VIM3";
|
|
||||||
audio-aux-devs = <&tdmin_a>, <&tdmout_a>;
|
|
||||||
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
|
|
||||||
"TDMOUT_A IN 1", "FRDDR_B OUT 0",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
|
||||||
index a712273c905a..eadd75e6e067 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
|
||||||
@@ -190,7 +190,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "SM1-ODROID-C4";
|
|
||||||
+ model = "ODROID-C4";
|
|
||||||
audio-aux-devs = <&tdmout_b>;
|
|
||||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
|
|
||||||
index 039a8d0d1e9b..2194a778973f 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
|
|
||||||
@@ -220,7 +220,7 @@
|
|
||||||
|
|
||||||
sound {
|
|
||||||
compatible = "amlogic,axg-sound-card";
|
|
||||||
- model = "SM1-SEI610";
|
|
||||||
+ model = "SEI610";
|
|
||||||
audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
|
|
||||||
<&tdmin_a>, <&tdmin_b>;
|
|
||||||
audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From a3fd9e94d211ec9cda74584e5828e76d6496c279 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Tue, 19 Jan 2021 15:34:53 +0000
|
|
||||||
Subject: [PATCH 14/88] FROMGIT: arm64: dts: meson: sort Amlogic dtb Makefile
|
|
||||||
|
|
||||||
Sort the Makefile before adding new SM1 devices.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/Makefile | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
index dce41cd3f347..f3c8a85fe987 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
@@ -45,7 +45,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
|
||||||
-dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
|
|
||||||
+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,941 +0,0 @@
|
|||||||
From 8ae8a8444e462cca3927367af8ca36ab00dd5592 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Fri, 29 Jan 2021 02:10:14 +0000
|
|
||||||
Subject: [PATCH 15/88] FROMGIT: arm64: dts: meson: convert meson-sm1-odroid-c4
|
|
||||||
to dtsi
|
|
||||||
|
|
||||||
Convert the ODRIOD-C4 dts to meson-sm1-odroid.dtsi and C4 board dts in
|
|
||||||
preparation for adding additional C4 family boards.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
.../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 427 +----------------
|
|
||||||
.../boot/dts/amlogic/meson-sm1-odroid.dtsi | 441 ++++++++++++++++++
|
|
||||||
2 files changed, 442 insertions(+), 426 deletions(-)
|
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
|
||||||
index eadd75e6e067..b2a4e823c1d8 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
|
|
||||||
@@ -5,34 +5,12 @@
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
-#include "meson-sm1.dtsi"
|
|
||||||
-#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
|
||||||
-#include <dt-bindings/leds/common.h>
|
|
||||||
-#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
|
||||||
+#include "meson-sm1-odroid.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "hardkernel,odroid-c4", "amlogic,sm1";
|
|
||||||
model = "Hardkernel ODROID-C4";
|
|
||||||
|
|
||||||
- aliases {
|
|
||||||
- serial0 = &uart_AO;
|
|
||||||
- ethernet0 = ðmac;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- chosen {
|
|
||||||
- stdout-path = "serial0:115200n8";
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- memory@0 {
|
|
||||||
- device_type = "memory";
|
|
||||||
- reg = <0x0 0x0 0x0 0x40000000>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- emmc_pwrseq: emmc-pwrseq {
|
|
||||||
- compatible = "mmc-pwrseq-emmc";
|
|
||||||
- reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
|
|
||||||
@@ -45,96 +23,6 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
- tflash_vdd: regulator-tflash_vdd {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
-
|
|
||||||
- regulator-name = "TFLASH_VDD";
|
|
||||||
- regulator-min-microvolt = <3300000>;
|
|
||||||
- regulator-max-microvolt = <3300000>;
|
|
||||||
-
|
|
||||||
- gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
|
|
||||||
- enable-active-high;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- tf_io: gpio-regulator-tf_io {
|
|
||||||
- compatible = "regulator-gpio";
|
|
||||||
-
|
|
||||||
- regulator-name = "TF_IO";
|
|
||||||
- regulator-min-microvolt = <1800000>;
|
|
||||||
- regulator-max-microvolt = <3300000>;
|
|
||||||
-
|
|
||||||
- gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
|
|
||||||
- gpios-states = <0>;
|
|
||||||
-
|
|
||||||
- states = <3300000 0>,
|
|
||||||
- <1800000 1>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- flash_1v8: regulator-flash_1v8 {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "FLASH_1V8";
|
|
||||||
- regulator-min-microvolt = <1800000>;
|
|
||||||
- regulator-max-microvolt = <1800000>;
|
|
||||||
- vin-supply = <&vcc_3v3>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- main_12v: regulator-main_12v {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "12V";
|
|
||||||
- regulator-min-microvolt = <12000000>;
|
|
||||||
- regulator-max-microvolt = <12000000>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- vcc_5v: regulator-vcc_5v {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "5V";
|
|
||||||
- regulator-min-microvolt = <5000000>;
|
|
||||||
- regulator-max-microvolt = <5000000>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- vin-supply = <&main_12v>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- vcc_1v8: regulator-vcc_1v8 {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "VCC_1V8";
|
|
||||||
- regulator-min-microvolt = <1800000>;
|
|
||||||
- regulator-max-microvolt = <1800000>;
|
|
||||||
- vin-supply = <&vcc_3v3>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- vcc_3v3: regulator-vcc_3v3 {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "VCC_3V3";
|
|
||||||
- regulator-min-microvolt = <3300000>;
|
|
||||||
- regulator-max-microvolt = <3300000>;
|
|
||||||
- vin-supply = <&vddao_3v3>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- /* FIXME: actually controlled by VDDCPU_B_EN */
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- vddcpu: regulator-vddcpu {
|
|
||||||
- /*
|
|
||||||
- * MP8756GD Regulator.
|
|
||||||
- */
|
|
||||||
- compatible = "pwm-regulator";
|
|
||||||
-
|
|
||||||
- regulator-name = "VDDCPU";
|
|
||||||
- regulator-min-microvolt = <721000>;
|
|
||||||
- regulator-max-microvolt = <1022000>;
|
|
||||||
-
|
|
||||||
- vin-supply = <&main_12v>;
|
|
||||||
-
|
|
||||||
- pwms = <&pwm_AO_cd 1 1250 0>;
|
|
||||||
- pwm-dutycycle-range = <100 0>;
|
|
||||||
-
|
|
||||||
- regulator-boot-on;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
hub_5v: regulator-hub_5v {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "HUB_5V";
|
|
||||||
@@ -147,215 +35,12 @@
|
|
||||||
enable-active-high;
|
|
||||||
};
|
|
||||||
|
|
||||||
- usb_pwr_en: regulator-usb_pwr_en {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "USB_PWR_EN";
|
|
||||||
- regulator-min-microvolt = <5000000>;
|
|
||||||
- regulator-max-microvolt = <5000000>;
|
|
||||||
- vin-supply = <&vcc_5v>;
|
|
||||||
-
|
|
||||||
- /* Connected to the microUSB port power enable */
|
|
||||||
- gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
|
||||||
- enable-active-high;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- vddao_1v8: regulator-vddao_1v8 {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "VDDAO_1V8";
|
|
||||||
- regulator-min-microvolt = <1800000>;
|
|
||||||
- regulator-max-microvolt = <1800000>;
|
|
||||||
- vin-supply = <&vddao_3v3>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- vddao_3v3: regulator-vddao_3v3 {
|
|
||||||
- compatible = "regulator-fixed";
|
|
||||||
- regulator-name = "VDDAO_3V3";
|
|
||||||
- regulator-min-microvolt = <3300000>;
|
|
||||||
- regulator-max-microvolt = <3300000>;
|
|
||||||
- vin-supply = <&main_12v>;
|
|
||||||
- regulator-always-on;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- hdmi-connector {
|
|
||||||
- compatible = "hdmi-connector";
|
|
||||||
- type = "a";
|
|
||||||
-
|
|
||||||
- port {
|
|
||||||
- hdmi_connector_in: endpoint {
|
|
||||||
- remote-endpoint = <&hdmi_tx_tmds_out>;
|
|
||||||
- };
|
|
||||||
- };
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
sound {
|
|
||||||
- compatible = "amlogic,axg-sound-card";
|
|
||||||
model = "ODROID-C4";
|
|
||||||
- audio-aux-devs = <&tdmout_b>;
|
|
||||||
- audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
- "TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
- "TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
|
||||||
- "TDM_B Playback", "TDMOUT_B OUT";
|
|
||||||
-
|
|
||||||
- assigned-clocks = <&clkc CLKID_MPLL2>,
|
|
||||||
- <&clkc CLKID_MPLL0>,
|
|
||||||
- <&clkc CLKID_MPLL1>;
|
|
||||||
- assigned-clock-parents = <0>, <0>, <0>;
|
|
||||||
- assigned-clock-rates = <294912000>,
|
|
||||||
- <270950400>,
|
|
||||||
- <393216000>;
|
|
||||||
- status = "okay";
|
|
||||||
-
|
|
||||||
- dai-link-0 {
|
|
||||||
- sound-dai = <&frddr_a>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- dai-link-1 {
|
|
||||||
- sound-dai = <&frddr_b>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- dai-link-2 {
|
|
||||||
- sound-dai = <&frddr_c>;
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- /* 8ch hdmi interface */
|
|
||||||
- dai-link-3 {
|
|
||||||
- sound-dai = <&tdmif_b>;
|
|
||||||
- dai-format = "i2s";
|
|
||||||
- dai-tdm-slot-tx-mask-0 = <1 1>;
|
|
||||||
- dai-tdm-slot-tx-mask-1 = <1 1>;
|
|
||||||
- dai-tdm-slot-tx-mask-2 = <1 1>;
|
|
||||||
- dai-tdm-slot-tx-mask-3 = <1 1>;
|
|
||||||
- mclk-fs = <256>;
|
|
||||||
-
|
|
||||||
- codec {
|
|
||||||
- sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
|
|
||||||
- };
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- /* hdmi glue */
|
|
||||||
- dai-link-4 {
|
|
||||||
- sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
|
||||||
-
|
|
||||||
- codec {
|
|
||||||
- sound-dai = <&hdmi_tx>;
|
|
||||||
- };
|
|
||||||
- };
|
|
||||||
- };
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&arb {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&clkc_audio {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&cpu0 {
|
|
||||||
- cpu-supply = <&vddcpu>;
|
|
||||||
- operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
- clocks = <&clkc CLKID_CPU_CLK>;
|
|
||||||
- clock-latency = <50000>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&cpu1 {
|
|
||||||
- cpu-supply = <&vddcpu>;
|
|
||||||
- operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
- clocks = <&clkc CLKID_CPU1_CLK>;
|
|
||||||
- clock-latency = <50000>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&cpu2 {
|
|
||||||
- cpu-supply = <&vddcpu>;
|
|
||||||
- operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
- clocks = <&clkc CLKID_CPU2_CLK>;
|
|
||||||
- clock-latency = <50000>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&cpu3 {
|
|
||||||
- cpu-supply = <&vddcpu>;
|
|
||||||
- operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
- clocks = <&clkc CLKID_CPU3_CLK>;
|
|
||||||
- clock-latency = <50000>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&ext_mdio {
|
|
||||||
- external_phy: ethernet-phy@0 {
|
|
||||||
- /* Realtek RTL8211F (0x001cc916) */
|
|
||||||
- reg = <0>;
|
|
||||||
- max-speed = <1000>;
|
|
||||||
-
|
|
||||||
- interrupt-parent = <&gpio_intc>;
|
|
||||||
- /* MAC_INTR on GPIOZ_14 */
|
|
||||||
- interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
-ðmac {
|
|
||||||
- pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
- status = "okay";
|
|
||||||
- phy-mode = "rgmii";
|
|
||||||
- phy-handle = <&external_phy>;
|
|
||||||
- amlogic,tx-delay-ns = <2>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&frddr_a {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&frddr_b {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&frddr_c {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
&gpio {
|
|
||||||
- gpio-line-names =
|
|
||||||
- /* GPIOZ */
|
|
||||||
- "", "", "", "", "", "", "", "",
|
|
||||||
- "", "", "", "", "", "", "", "",
|
|
||||||
- /* GPIOH */
|
|
||||||
- "", "", "", "", "",
|
|
||||||
- "PIN_36", /* GPIOH_5 */
|
|
||||||
- "PIN_26", /* GPIOH_6 */
|
|
||||||
- "PIN_32", /* GPIOH_7 */
|
|
||||||
- "",
|
|
||||||
- /* BOOT */
|
|
||||||
- "", "", "", "", "", "", "", "",
|
|
||||||
- "", "", "", "", "", "", "", "",
|
|
||||||
- /* GPIOC */
|
|
||||||
- "", "", "", "", "", "", "", "",
|
|
||||||
- /* GPIOA */
|
|
||||||
- "", "", "", "", "", "", "", "",
|
|
||||||
- "", "", "", "", "", "",
|
|
||||||
- "PIN_27", /* GPIOA_14 */
|
|
||||||
- "PIN_28", /* GPIOA_15 */
|
|
||||||
- /* GPIOX */
|
|
||||||
- "PIN_16", /* GPIOX_0 */
|
|
||||||
- "PIN_18", /* GPIOX_1 */
|
|
||||||
- "PIN_22", /* GPIOX_2 */
|
|
||||||
- "PIN_11", /* GPIOX_3 */
|
|
||||||
- "PIN_13", /* GPIOX_4 */
|
|
||||||
- "PIN_7", /* GPIOX_5 */
|
|
||||||
- "PIN_33", /* GPIOX_6 */
|
|
||||||
- "PIN_15", /* GPIOX_7 */
|
|
||||||
- "PIN_19", /* GPIOX_8 */
|
|
||||||
- "PIN_21", /* GPIOX_9 */
|
|
||||||
- "PIN_24", /* GPIOX_10 */
|
|
||||||
- "PIN_23", /* GPIOX_11 */
|
|
||||||
- "PIN_8", /* GPIOX_12 */
|
|
||||||
- "PIN_10", /* GPIOX_13 */
|
|
||||||
- "PIN_29", /* GPIOX_14 */
|
|
||||||
- "PIN_31", /* GPIOX_15 */
|
|
||||||
- "PIN_12", /* GPIOX_16 */
|
|
||||||
- "PIN_3", /* GPIOX_17 */
|
|
||||||
- "PIN_5", /* GPIOX_18 */
|
|
||||||
- "PIN_35"; /* GPIOX_19 */
|
|
||||||
-
|
|
||||||
/*
|
|
||||||
* WARNING: The USB Hub on the Odroid-C4 needs a reset signal
|
|
||||||
* to be turned high in order to be detected by the USB Controller
|
|
||||||
@@ -370,120 +55,10 @@
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
-&gpio_ao {
|
|
||||||
- gpio-line-names =
|
|
||||||
- /* GPIOAO */
|
|
||||||
- "", "", "", "",
|
|
||||||
- "PIN_47", /* GPIOAO_4 */
|
|
||||||
- "", "",
|
|
||||||
- "PIN_45", /* GPIOAO_7 */
|
|
||||||
- "PIN_46", /* GPIOAO_8 */
|
|
||||||
- "PIN_44", /* GPIOAO_9 */
|
|
||||||
- "PIN_42", /* GPIOAO_10 */
|
|
||||||
- "",
|
|
||||||
- /* GPIOE */
|
|
||||||
- "", "", "";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&hdmi_tx {
|
|
||||||
- status = "okay";
|
|
||||||
- pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
- hdmi-supply = <&vcc_5v>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&hdmi_tx_tmds_port {
|
|
||||||
- hdmi_tx_tmds_out: endpoint {
|
|
||||||
- remote-endpoint = <&hdmi_connector_in>;
|
|
||||||
- };
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
&ir {
|
|
||||||
- status = "okay";
|
|
||||||
- pinctrl-0 = <&remote_input_ao_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
linux,rc-map-name = "rc-odroid";
|
|
||||||
};
|
|
||||||
|
|
||||||
-&pwm_AO_cd {
|
|
||||||
- pinctrl-0 = <&pwm_ao_d_e_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
- clocks = <&xtal>;
|
|
||||||
- clock-names = "clkin1";
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&saradc {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* SD card */
|
|
||||||
-&sd_emmc_b {
|
|
||||||
- status = "okay";
|
|
||||||
- pinctrl-0 = <&sdcard_c_pins>;
|
|
||||||
- pinctrl-1 = <&sdcard_clk_gate_c_pins>;
|
|
||||||
- pinctrl-names = "default", "clk-gate";
|
|
||||||
-
|
|
||||||
- bus-width = <4>;
|
|
||||||
- cap-sd-highspeed;
|
|
||||||
- max-frequency = <200000000>;
|
|
||||||
- sd-uhs-sdr12;
|
|
||||||
- sd-uhs-sdr25;
|
|
||||||
- sd-uhs-sdr50;
|
|
||||||
- sd-uhs-sdr104;
|
|
||||||
- disable-wp;
|
|
||||||
-
|
|
||||||
- cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
|
||||||
- vmmc-supply = <&tflash_vdd>;
|
|
||||||
- vqmmc-supply = <&tf_io>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-/* eMMC */
|
|
||||||
-&sd_emmc_c {
|
|
||||||
- status = "okay";
|
|
||||||
- pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
|
|
||||||
- pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
- pinctrl-names = "default", "clk-gate";
|
|
||||||
-
|
|
||||||
- bus-width = <8>;
|
|
||||||
- cap-mmc-highspeed;
|
|
||||||
- mmc-ddr-1_8v;
|
|
||||||
- mmc-hs200-1_8v;
|
|
||||||
- max-frequency = <200000000>;
|
|
||||||
- disable-wp;
|
|
||||||
-
|
|
||||||
- mmc-pwrseq = <&emmc_pwrseq>;
|
|
||||||
- vmmc-supply = <&vcc_3v3>;
|
|
||||||
- vqmmc-supply = <&flash_1v8>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&tdmif_b {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&tdmout_b {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&tohdmitx {
|
|
||||||
- status = "okay";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&uart_AO {
|
|
||||||
- status = "okay";
|
|
||||||
- pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
- pinctrl-names = "default";
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&usb {
|
|
||||||
- status = "okay";
|
|
||||||
- vbus-supply = <&usb_pwr_en>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-&usb2_phy0 {
|
|
||||||
- phy-supply = <&vcc_5v>;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
&usb2_phy1 {
|
|
||||||
/* Enable the hub which is connected to this port */
|
|
||||||
phy-supply = <&hub_5v>;
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..a66d55d93183
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
|
|
||||||
@@ -0,0 +1,441 @@
|
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2020 Dongjin Kim <tobetter@gmail.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include "meson-sm1.dtsi"
|
|
||||||
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
|
||||||
+#include <dt-bindings/leds/common.h>
|
|
||||||
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ aliases {
|
|
||||||
+ serial0 = &uart_AO;
|
|
||||||
+ ethernet0 = ðmac;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ chosen {
|
|
||||||
+ stdout-path = "serial0:115200n8";
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ memory@0 {
|
|
||||||
+ device_type = "memory";
|
|
||||||
+ reg = <0x0 0x0 0x0 0x40000000>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ emmc_pwrseq: emmc-pwrseq {
|
|
||||||
+ compatible = "mmc-pwrseq-emmc";
|
|
||||||
+ reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ tflash_vdd: regulator-tflash_vdd {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+
|
|
||||||
+ regulator-name = "TFLASH_VDD";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+
|
|
||||||
+ gpio = <&gpio_ao GPIOAO_3 GPIO_OPEN_DRAIN>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ tf_io: gpio-regulator-tf_io {
|
|
||||||
+ compatible = "regulator-gpio";
|
|
||||||
+
|
|
||||||
+ regulator-name = "TF_IO";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ gpios-states = <0>;
|
|
||||||
+
|
|
||||||
+ states = <3300000 0>,
|
|
||||||
+ <1800000 1>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ flash_1v8: regulator-flash_1v8 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "FLASH_1V8";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <1800000>;
|
|
||||||
+ vin-supply = <&vcc_3v3>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ main_12v: regulator-main_12v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "12V";
|
|
||||||
+ regulator-min-microvolt = <12000000>;
|
|
||||||
+ regulator-max-microvolt = <12000000>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vcc_5v: regulator-vcc_5v {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "5V";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ vin-supply = <&main_12v>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vcc_1v8: regulator-vcc_1v8 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VCC_1V8";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <1800000>;
|
|
||||||
+ vin-supply = <&vcc_3v3>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vcc_3v3: regulator-vcc_3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VCC_3V3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ vin-supply = <&vddao_3v3>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ /* FIXME: actually controlled by VDDCPU_B_EN */
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vddcpu: regulator-vddcpu {
|
|
||||||
+ /*
|
|
||||||
+ * MP8756GD Regulator.
|
|
||||||
+ */
|
|
||||||
+ compatible = "pwm-regulator";
|
|
||||||
+
|
|
||||||
+ regulator-name = "VDDCPU";
|
|
||||||
+ regulator-min-microvolt = <721000>;
|
|
||||||
+ regulator-max-microvolt = <1022000>;
|
|
||||||
+
|
|
||||||
+ vin-supply = <&main_12v>;
|
|
||||||
+
|
|
||||||
+ pwms = <&pwm_AO_cd 1 1250 0>;
|
|
||||||
+ pwm-dutycycle-range = <100 0>;
|
|
||||||
+
|
|
||||||
+ regulator-boot-on;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ usb_pwr_en: regulator-usb_pwr_en {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "USB_PWR_EN";
|
|
||||||
+ regulator-min-microvolt = <5000000>;
|
|
||||||
+ regulator-max-microvolt = <5000000>;
|
|
||||||
+ vin-supply = <&vcc_5v>;
|
|
||||||
+
|
|
||||||
+ /* Connected to the microUSB port power enable */
|
|
||||||
+ gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ enable-active-high;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vddao_1v8: regulator-vddao_1v8 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VDDAO_1V8";
|
|
||||||
+ regulator-min-microvolt = <1800000>;
|
|
||||||
+ regulator-max-microvolt = <1800000>;
|
|
||||||
+ vin-supply = <&vddao_3v3>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ vddao_3v3: regulator-vddao_3v3 {
|
|
||||||
+ compatible = "regulator-fixed";
|
|
||||||
+ regulator-name = "VDDAO_3V3";
|
|
||||||
+ regulator-min-microvolt = <3300000>;
|
|
||||||
+ regulator-max-microvolt = <3300000>;
|
|
||||||
+ vin-supply = <&main_12v>;
|
|
||||||
+ regulator-always-on;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ hdmi-connector {
|
|
||||||
+ compatible = "hdmi-connector";
|
|
||||||
+ type = "a";
|
|
||||||
+
|
|
||||||
+ port {
|
|
||||||
+ hdmi_connector_in: endpoint {
|
|
||||||
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ sound {
|
|
||||||
+ compatible = "amlogic,axg-sound-card";
|
|
||||||
+ audio-aux-devs = <&tdmout_b>;
|
|
||||||
+ audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
|
||||||
+ "TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
|
||||||
+ "TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
|
||||||
+ "TDM_B Playback", "TDMOUT_B OUT";
|
|
||||||
+
|
|
||||||
+ assigned-clocks = <&clkc CLKID_MPLL2>,
|
|
||||||
+ <&clkc CLKID_MPLL0>,
|
|
||||||
+ <&clkc CLKID_MPLL1>;
|
|
||||||
+
|
|
||||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
|
||||||
+ assigned-clock-rates = <294912000>,
|
|
||||||
+ <270950400>,
|
|
||||||
+ <393216000>;
|
|
||||||
+ status = "okay";
|
|
||||||
+
|
|
||||||
+ dai-link-0 {
|
|
||||||
+ sound-dai = <&frddr_a>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-1 {
|
|
||||||
+ sound-dai = <&frddr_b>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ dai-link-2 {
|
|
||||||
+ sound-dai = <&frddr_c>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ /* 8ch hdmi interface */
|
|
||||||
+ dai-link-3 {
|
|
||||||
+ sound-dai = <&tdmif_b>;
|
|
||||||
+ dai-format = "i2s";
|
|
||||||
+ dai-tdm-slot-tx-mask-0 = <1 1>;
|
|
||||||
+ dai-tdm-slot-tx-mask-1 = <1 1>;
|
|
||||||
+ dai-tdm-slot-tx-mask-2 = <1 1>;
|
|
||||||
+ dai-tdm-slot-tx-mask-3 = <1 1>;
|
|
||||||
+ mclk-fs = <256>;
|
|
||||||
+
|
|
||||||
+ codec {
|
|
||||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ /* hdmi glue */
|
|
||||||
+ dai-link-4 {
|
|
||||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
|
||||||
+ codec {
|
|
||||||
+ sound-dai = <&hdmi_tx>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&arb {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&clkc_audio {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu0 {
|
|
||||||
+ cpu-supply = <&vddcpu>;
|
|
||||||
+ operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
+ clocks = <&clkc CLKID_CPU_CLK>;
|
|
||||||
+ clock-latency = <50000>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu1 {
|
|
||||||
+ cpu-supply = <&vddcpu>;
|
|
||||||
+ operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
+ clocks = <&clkc CLKID_CPU1_CLK>;
|
|
||||||
+ clock-latency = <50000>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu2 {
|
|
||||||
+ cpu-supply = <&vddcpu>;
|
|
||||||
+ operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
+ clocks = <&clkc CLKID_CPU2_CLK>;
|
|
||||||
+ clock-latency = <50000>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu3 {
|
|
||||||
+ cpu-supply = <&vddcpu>;
|
|
||||||
+ operating-points-v2 = <&cpu_opp_table>;
|
|
||||||
+ clocks = <&clkc CLKID_CPU3_CLK>;
|
|
||||||
+ clock-latency = <50000>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ext_mdio {
|
|
||||||
+ external_phy: ethernet-phy@0 {
|
|
||||||
+ /* Realtek RTL8211F (0x001cc916) */
|
|
||||||
+ reg = <0>;
|
|
||||||
+ max-speed = <1000>;
|
|
||||||
+
|
|
||||||
+ interrupt-parent = <&gpio_intc>;
|
|
||||||
+ /* MAC_INTR on GPIOZ_14 */
|
|
||||||
+ interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+ðmac {
|
|
||||||
+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ status = "okay";
|
|
||||||
+ phy-mode = "rgmii";
|
|
||||||
+ phy-handle = <&external_phy>;
|
|
||||||
+ amlogic,tx-delay-ns = <2>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&frddr_a {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&frddr_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&frddr_c {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&gpio {
|
|
||||||
+ gpio-line-names =
|
|
||||||
+ /* GPIOZ */
|
|
||||||
+ "", "", "", "", "", "", "", "",
|
|
||||||
+ "", "", "", "", "", "", "", "",
|
|
||||||
+ /* GPIOH */
|
|
||||||
+ "", "", "", "", "",
|
|
||||||
+ "PIN_36", /* GPIOH_5 */
|
|
||||||
+ "PIN_26", /* GPIOH_6 */
|
|
||||||
+ "PIN_32", /* GPIOH_7 */
|
|
||||||
+ "",
|
|
||||||
+ /* BOOT */
|
|
||||||
+ "", "", "", "", "", "", "", "",
|
|
||||||
+ "", "", "", "", "", "", "", "",
|
|
||||||
+ /* GPIOC */
|
|
||||||
+ "", "", "", "", "", "", "", "",
|
|
||||||
+ /* GPIOA */
|
|
||||||
+ "", "", "", "", "", "", "", "",
|
|
||||||
+ "", "", "", "", "", "",
|
|
||||||
+ "PIN_27", /* GPIOA_14 */
|
|
||||||
+ "PIN_28", /* GPIOA_15 */
|
|
||||||
+ /* GPIOX */
|
|
||||||
+ "PIN_16", /* GPIOX_0 */
|
|
||||||
+ "PIN_18", /* GPIOX_1 */
|
|
||||||
+ "PIN_22", /* GPIOX_2 */
|
|
||||||
+ "PIN_11", /* GPIOX_3 */
|
|
||||||
+ "PIN_13", /* GPIOX_4 */
|
|
||||||
+ "PIN_7", /* GPIOX_5 */
|
|
||||||
+ "PIN_33", /* GPIOX_6 */
|
|
||||||
+ "PIN_15", /* GPIOX_7 */
|
|
||||||
+ "PIN_19", /* GPIOX_8 */
|
|
||||||
+ "PIN_21", /* GPIOX_9 */
|
|
||||||
+ "PIN_24", /* GPIOX_10 */
|
|
||||||
+ "PIN_23", /* GPIOX_11 */
|
|
||||||
+ "PIN_8", /* GPIOX_12 */
|
|
||||||
+ "PIN_10", /* GPIOX_13 */
|
|
||||||
+ "PIN_29", /* GPIOX_14 */
|
|
||||||
+ "PIN_31", /* GPIOX_15 */
|
|
||||||
+ "PIN_12", /* GPIOX_16 */
|
|
||||||
+ "PIN_3", /* GPIOX_17 */
|
|
||||||
+ "PIN_5", /* GPIOX_18 */
|
|
||||||
+ "PIN_35"; /* GPIOX_19 */
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&gpio_ao {
|
|
||||||
+ gpio-line-names =
|
|
||||||
+ /* GPIOAO */
|
|
||||||
+ "", "", "", "",
|
|
||||||
+ "PIN_47", /* GPIOAO_4 */
|
|
||||||
+ "", "",
|
|
||||||
+ "PIN_45", /* GPIOAO_7 */
|
|
||||||
+ "PIN_46", /* GPIOAO_8 */
|
|
||||||
+ "PIN_44", /* GPIOAO_9 */
|
|
||||||
+ "PIN_42", /* GPIOAO_10 */
|
|
||||||
+ "",
|
|
||||||
+ /* GPIOE */
|
|
||||||
+ "", "", "";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&hdmi_tx {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ hdmi-supply = <&vcc_5v>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&hdmi_tx_tmds_port {
|
|
||||||
+ hdmi_tx_tmds_out: endpoint {
|
|
||||||
+ remote-endpoint = <&hdmi_connector_in>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ir {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&remote_input_ao_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pwm_AO_cd {
|
|
||||||
+ pinctrl-0 = <&pwm_ao_d_e_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ clocks = <&xtal>;
|
|
||||||
+ clock-names = "clkin1";
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&saradc {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* SD card */
|
|
||||||
+&sd_emmc_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&sdcard_c_pins>;
|
|
||||||
+ pinctrl-1 = <&sdcard_clk_gate_c_pins>;
|
|
||||||
+ pinctrl-names = "default", "clk-gate";
|
|
||||||
+
|
|
||||||
+ bus-width = <4>;
|
|
||||||
+ cap-sd-highspeed;
|
|
||||||
+ max-frequency = <200000000>;
|
|
||||||
+ sd-uhs-sdr12;
|
|
||||||
+ sd-uhs-sdr25;
|
|
||||||
+ sd-uhs-sdr50;
|
|
||||||
+ sd-uhs-sdr104;
|
|
||||||
+ disable-wp;
|
|
||||||
+
|
|
||||||
+ cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
|
||||||
+ vmmc-supply = <&tflash_vdd>;
|
|
||||||
+ vqmmc-supply = <&tf_io>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/* eMMC */
|
|
||||||
+&sd_emmc_c {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
|
|
||||||
+ pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
||||||
+ pinctrl-names = "default", "clk-gate";
|
|
||||||
+
|
|
||||||
+ bus-width = <8>;
|
|
||||||
+ cap-mmc-highspeed;
|
|
||||||
+ mmc-ddr-1_8v;
|
|
||||||
+ mmc-hs200-1_8v;
|
|
||||||
+ max-frequency = <200000000>;
|
|
||||||
+ disable-wp;
|
|
||||||
+
|
|
||||||
+ mmc-pwrseq = <&emmc_pwrseq>;
|
|
||||||
+ vmmc-supply = <&vcc_3v3>;
|
|
||||||
+ vqmmc-supply = <&flash_1v8>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&tdmif_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&tdmout_b {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&tohdmitx {
|
|
||||||
+ status = "okay";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&uart_AO {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&uart_ao_a_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usb {
|
|
||||||
+ status = "okay";
|
|
||||||
+ vbus-supply = <&usb_pwr_en>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usb2_phy0 {
|
|
||||||
+ phy-supply = <&vcc_5v>;
|
|
||||||
+};
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,137 +0,0 @@
|
|||||||
From dfd0471eb3cb255d376c901574768213183e8765 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Fri, 29 Jan 2021 02:12:43 +0000
|
|
||||||
Subject: [PATCH 16/88] FROMGIT: arm64: dts: meson: add initial device-tree for
|
|
||||||
ODROID-HC4
|
|
||||||
|
|
||||||
ODROID-HC4 is a derivative of the C4 with minor differences:
|
|
||||||
|
|
||||||
- 16MB SPI-NOR flash
|
|
||||||
- 2x SATA ports via ASM1061 PCIe to SATA controller
|
|
||||||
- 7-pin header with SPI and I2C for 1-inch OLED display and RTC
|
|
||||||
- 1x USB 2.0 host port
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
|
||||||
.../boot/dts/amlogic/meson-sm1-odroid-hc4.dts | 96 +++++++++++++++++++
|
|
||||||
2 files changed, 97 insertions(+)
|
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
index f3c8a85fe987..78a569d7fa20 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
@@ -47,5 +47,6 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-wetek-core2.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb
|
|
||||||
+dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-a1-ad401.dtb
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..bf15700c4b15
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts
|
|
||||||
@@ -0,0 +1,96 @@
|
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) 2020 Dongjin Kim <tobetter@gmail.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/dts-v1/;
|
|
||||||
+
|
|
||||||
+#include "meson-sm1-odroid.dtsi"
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ compatible = "hardkernel,odroid-hc4", "amlogic,sm1";
|
|
||||||
+ model = "Hardkernel ODROID-HC4";
|
|
||||||
+
|
|
||||||
+ aliases {
|
|
||||||
+ rtc0 = &rtc;
|
|
||||||
+ rtc1 = &vrtc;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ fan0: pwm-fan {
|
|
||||||
+ compatible = "pwm-fan";
|
|
||||||
+ #cooling-cells = <2>;
|
|
||||||
+ cooling-min-state = <0>;
|
|
||||||
+ cooling-max-state = <3>;
|
|
||||||
+ cooling-levels = <0 120 170 220>;
|
|
||||||
+ pwms = <&pwm_cd 1 40000 0>;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ leds {
|
|
||||||
+ compatible = "gpio-leds";
|
|
||||||
+
|
|
||||||
+ led-blue {
|
|
||||||
+ color = <LED_COLOR_ID_BLUE>;
|
|
||||||
+ function = LED_FUNCTION_STATUS;
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ linux,default-trigger = "heartbeat";
|
|
||||||
+ panic-indicator;
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ led-red {
|
|
||||||
+ color = <LED_COLOR_ID_RED>;
|
|
||||||
+ function = LED_FUNCTION_POWER;
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ default-state = "on";
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ sound {
|
|
||||||
+ model = "ODROID-HC4";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&cpu_thermal {
|
|
||||||
+ cooling-maps {
|
|
||||||
+ map {
|
|
||||||
+ trip = <&cpu_passive>;
|
|
||||||
+ cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ir {
|
|
||||||
+ linux,rc-map-name = "rc-odroid";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c2 {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ rtc: rtc@51 {
|
|
||||||
+ status = "okay";
|
|
||||||
+ compatible = "nxp,pcf8563";
|
|
||||||
+ reg = <0x51>;
|
|
||||||
+ wakeup-source;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pcie {
|
|
||||||
+ status = "okay";
|
|
||||||
+ reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&pwm_cd {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ pinctrl-0 = <&pwm_d_x6_pins>;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&sd_emmc_c {
|
|
||||||
+ status = "disabled";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&usb {
|
|
||||||
+ phys = <&usb2_phy0>, <&usb2_phy1>;
|
|
||||||
+ phy-names = "usb2-phy0", "usb2-phy1";
|
|
||||||
+};
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,174 +0,0 @@
|
|||||||
From 08dba4427036ff0544670a4a2fd0127236a8abff Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Tue, 19 Jan 2021 12:57:11 +0000
|
|
||||||
Subject: [PATCH 17/88] FROMGIT: arm64: dts: meson: add initial device-tree for
|
|
||||||
Minix NEO U9-H
|
|
||||||
|
|
||||||
Minix NEO U9-H is based on the Amlogic Q200 reference board with an
|
|
||||||
S912-H chip and the following specs:
|
|
||||||
|
|
||||||
- 2GB DDR3 RAM
|
|
||||||
- 16GB eMMC
|
|
||||||
- 10/100/1000 Base-T Ethernet
|
|
||||||
- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1)
|
|
||||||
- RTC chip
|
|
||||||
- HDMI 2.1 video
|
|
||||||
- S/PDIF optical output
|
|
||||||
- ES8323 audio codec
|
|
||||||
- Analogue headphone output
|
|
||||||
- 3x USB 2.0 ports (1x OTG)
|
|
||||||
- IR receiver
|
|
||||||
- 1x Power LED (white)
|
|
||||||
- 1x Power button (rear)
|
|
||||||
- 1x Update/Reset button (underside)
|
|
||||||
- 1x micro SD card slot
|
|
||||||
|
|
||||||
Tested-by: Wes Bradley <komplex@live.ie>
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
---
|
|
||||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
|
||||||
.../dts/amlogic/meson-gxm-minix-neo-u9h.dts | 120 ++++++++++++++++++
|
|
||||||
2 files changed, 121 insertions(+)
|
|
||||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
|
||||||
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
index 78a569d7fa20..aebd49c88719 100644
|
|
||||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
|
||||||
@@ -38,6 +38,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-libretech-pc.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb
|
|
||||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-minix-neo-u9h.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb
|
|
||||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb
|
|
||||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..a414cd39c2b1
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dts
|
|
||||||
@@ -0,0 +1,120 @@
|
|
||||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
+/*
|
|
||||||
+ * Copyright (c) Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+/dts-v1/;
|
|
||||||
+
|
|
||||||
+#include "meson-gxm.dtsi"
|
|
||||||
+#include "meson-gx-p23x-q20x.dtsi"
|
|
||||||
+#include <dt-bindings/input/input.h>
|
|
||||||
+#include <dt-bindings/leds/common.h>
|
|
||||||
+
|
|
||||||
+/ {
|
|
||||||
+ compatible = "minix,neo-u9h", "amlogic,s912", "amlogic,meson-gxm";
|
|
||||||
+ model = "Minix Neo U9-H";
|
|
||||||
+
|
|
||||||
+ leds {
|
|
||||||
+ compatible = "gpio-leds";
|
|
||||||
+
|
|
||||||
+ white {
|
|
||||||
+ color = <LED_COLOR_ID_WHITE>;
|
|
||||||
+ function = LED_FUNCTION_POWER;
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ default-state = "on";
|
|
||||||
+ panic-indicator;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ adc-keys {
|
|
||||||
+ compatible = "adc-keys";
|
|
||||||
+ io-channels = <&saradc 0>;
|
|
||||||
+ io-channel-names = "buttons";
|
|
||||||
+ keyup-threshold-microvolt = <1710000>;
|
|
||||||
+
|
|
||||||
+ button-function {
|
|
||||||
+ label = "update";
|
|
||||||
+ linux,code = <KEY_VENDOR>;
|
|
||||||
+ press-threshold-microvolt = <10000>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ gpio-keys-polled {
|
|
||||||
+ compatible = "gpio-keys-polled";
|
|
||||||
+ #address-cells = <1>;
|
|
||||||
+ #size-cells = <0>;
|
|
||||||
+ poll-interval = <100>;
|
|
||||||
+
|
|
||||||
+ button@0 {
|
|
||||||
+ label = "power";
|
|
||||||
+ linux,code = <KEY_POWER>;
|
|
||||||
+ gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
|
|
||||||
+ };
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+ðmac {
|
|
||||||
+ pinctrl-0 = <ð_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ phy-handle = <&external_phy>;
|
|
||||||
+ amlogic,tx-delay-ns = <2>;
|
|
||||||
+ phy-mode = "rgmii";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&external_mdio {
|
|
||||||
+ external_phy: ethernet-phy@0 {
|
|
||||||
+ /* Realtek RTL8211F (0x001cc916) */
|
|
||||||
+ reg = <0>;
|
|
||||||
+ max-speed = <1000>;
|
|
||||||
+
|
|
||||||
+ reset-assert-us = <10000>;
|
|
||||||
+ reset-deassert-us = <80000>;
|
|
||||||
+ reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
|
||||||
+
|
|
||||||
+ interrupt-parent = <&gpio_intc>;
|
|
||||||
+ /* MAC_INTR on GPIOZ_15 */
|
|
||||||
+ interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&ir {
|
|
||||||
+ linux,rc-map-name = "rc-minix-neo";
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&i2c_B {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&i2c_b_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+
|
|
||||||
+ rtc: rtc@51 {
|
|
||||||
+ status = "okay";
|
|
||||||
+ compatible = "haoyu,hym8563";
|
|
||||||
+ reg = <0x51>;
|
|
||||||
+ #clock-cells = <0>;
|
|
||||||
+ clock-frequency = <32768>;
|
|
||||||
+ clock-output-names = "xin32k";
|
|
||||||
+ wakeup-source;
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&sd_emmc_a {
|
|
||||||
+ brcmf: wifi@1 {
|
|
||||||
+ reg = <1>;
|
|
||||||
+ compatible = "brcm,bcm4329-fmac";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+&uart_A {
|
|
||||||
+ status = "okay";
|
|
||||||
+ pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
|
|
||||||
+ pinctrl-names = "default";
|
|
||||||
+ uart-has-rtscts;
|
|
||||||
+
|
|
||||||
+ bluetooth {
|
|
||||||
+ compatible = "brcm,bcm43438-bt";
|
|
||||||
+ shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
|
|
||||||
+ max-speed = <2000000>;
|
|
||||||
+ clocks = <&wifi32k>;
|
|
||||||
+ clock-names = "lpo";
|
|
||||||
+ };
|
|
||||||
+};
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From 5735377a099b9eb5f9f0a36ebd43f0c429b8addf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Fri, 29 Jan 2021 04:46:21 +0000
|
|
||||||
Subject: [PATCH 18/88] FROMGIT: dt-bindings: arm: amlogic: add support for the
|
|
||||||
Minix NEO U9-H
|
|
||||||
|
|
||||||
The Minix NEO U9-H is a small form-factor Android STB based on the
|
|
||||||
Amlogic Q200 reference board with an S912-H chip.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
---
|
|
||||||
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
index 3341788d1096..860a456f7858 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
@@ -120,6 +120,7 @@ properties:
|
|
||||||
- khadas,vim2
|
|
||||||
- kingnovel,r-box-pro
|
|
||||||
- libretech,aml-s912-pc
|
|
||||||
+ - minix,neo-u9h
|
|
||||||
- nexbox,a1
|
|
||||||
- tronsmart,vega-s96
|
|
||||||
- wetek,core2
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
|||||||
From 3be6c1ed0ae21099b733ce16c709fad3061994ea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
Date: Sat, 14 Nov 2020 17:37:09 +0100
|
|
||||||
Subject: [PATCH 19/88] FROMGIT: dt-bindings: net: dwmac-meson: use picoseconds
|
|
||||||
for the RGMII RX delay
|
|
||||||
|
|
||||||
Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX
|
|
||||||
delay register which allows picoseconds precision. Deprecate the old
|
|
||||||
"amlogic,rx-delay-ns" in favour of the generic "rx-internal-delay-ps"
|
|
||||||
property.
|
|
||||||
|
|
||||||
For older SoCs the only known supported values were 0ns and 2ns. The new
|
|
||||||
SoCs have support for RGMII RX delays between 0ps and 3000ps in 200ps
|
|
||||||
steps.
|
|
||||||
|
|
||||||
Don't carry over the description for the "rx-internal-delay-ps" property
|
|
||||||
and inherit that from ethernet-controller.yaml instead.
|
|
||||||
|
|
||||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
---
|
|
||||||
.../bindings/net/amlogic,meson-dwmac.yaml | 55 +++++++++++++++++--
|
|
||||||
1 file changed, 49 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml
|
|
||||||
index 1f133f4a2924..0467441d7037 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml
|
|
||||||
+++ b/Documentation/devicetree/bindings/net/amlogic,meson-dwmac.yaml
|
|
||||||
@@ -74,17 +74,60 @@ allOf:
|
|
||||||
Any configuration is ignored when the phy-mode is set to "rmii".
|
|
||||||
|
|
||||||
amlogic,rx-delay-ns:
|
|
||||||
+ deprecated: true
|
|
||||||
enum:
|
|
||||||
- 0
|
|
||||||
- 2
|
|
||||||
default: 0
|
|
||||||
description:
|
|
||||||
- The internal RGMII RX clock delay (provided by this IP block) in
|
|
||||||
- nanoseconds. When phy-mode is set to "rgmii" then the RX delay
|
|
||||||
- should be explicitly configured. When the phy-mode is set to
|
|
||||||
- either "rgmii-id" or "rgmii-rxid" the RX clock delay is already
|
|
||||||
- provided by the PHY. Any configuration is ignored when the
|
|
||||||
- phy-mode is set to "rmii".
|
|
||||||
+ The internal RGMII RX clock delay in nanoseconds. Deprecated, use
|
|
||||||
+ rx-internal-delay-ps instead.
|
|
||||||
+
|
|
||||||
+ rx-internal-delay-ps:
|
|
||||||
+ default: 0
|
|
||||||
+
|
|
||||||
+ - if:
|
|
||||||
+ properties:
|
|
||||||
+ compatible:
|
|
||||||
+ contains:
|
|
||||||
+ enum:
|
|
||||||
+ - amlogic,meson8b-dwmac
|
|
||||||
+ - amlogic,meson8m2-dwmac
|
|
||||||
+ - amlogic,meson-gxbb-dwmac
|
|
||||||
+ - amlogic,meson-axg-dwmac
|
|
||||||
+ then:
|
|
||||||
+ properties:
|
|
||||||
+ rx-internal-delay-ps:
|
|
||||||
+ enum:
|
|
||||||
+ - 0
|
|
||||||
+ - 2000
|
|
||||||
+
|
|
||||||
+ - if:
|
|
||||||
+ properties:
|
|
||||||
+ compatible:
|
|
||||||
+ contains:
|
|
||||||
+ enum:
|
|
||||||
+ - amlogic,meson-g12a-dwmac
|
|
||||||
+ then:
|
|
||||||
+ properties:
|
|
||||||
+ rx-internal-delay-ps:
|
|
||||||
+ enum:
|
|
||||||
+ - 0
|
|
||||||
+ - 200
|
|
||||||
+ - 400
|
|
||||||
+ - 600
|
|
||||||
+ - 800
|
|
||||||
+ - 1000
|
|
||||||
+ - 1200
|
|
||||||
+ - 1400
|
|
||||||
+ - 1600
|
|
||||||
+ - 1800
|
|
||||||
+ - 2000
|
|
||||||
+ - 2200
|
|
||||||
+ - 2400
|
|
||||||
+ - 2600
|
|
||||||
+ - 2800
|
|
||||||
+ - 3000
|
|
||||||
|
|
||||||
properties:
|
|
||||||
compatible:
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
From cf2108617180aa24416089735fa49bfba7dca5c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Fri, 12 Jun 2020 08:04:00 +0000
|
|
||||||
Subject: [PATCH 20/88] FROMGIT: dt-bindings: arm: amlogic: add support for the
|
|
||||||
Beelink GS-King-X
|
|
||||||
|
|
||||||
The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference
|
|
||||||
board with an S922X-H chip.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Acked-by: Rob Herring <robh@kernel.org>
|
|
||||||
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
||||||
---
|
|
||||||
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
index 860a456f7858..dccfc048fb1c 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
@@ -152,6 +152,7 @@ properties:
|
|
||||||
- description: Boards with the Amlogic Meson G12B S922X SoC
|
|
||||||
items:
|
|
||||||
- enum:
|
|
||||||
+ - azw,gsking-x
|
|
||||||
- azw,gtking
|
|
||||||
- azw,gtking-pro
|
|
||||||
- hardkernel,odroid-n2
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 96bb0e73cb58befe53b8b3783d258f9db38cd70e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Tue, 19 Jan 2021 15:32:38 +0000
|
|
||||||
Subject: [PATCH 21/88] FROMGIT: dt-bindings: arm: amlogic: sort SM1 bindings
|
|
||||||
|
|
||||||
Sort the bindings before adding new SM1 devices.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
|
|
||||||
---
|
|
||||||
Documentation/devicetree/bindings/arm/amlogic.yaml | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
index dccfc048fb1c..35995a1f97db 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
@@ -165,9 +165,9 @@ properties:
|
|
||||||
- description: Boards with the Amlogic Meson SM1 S905X3/D3/Y3 SoC
|
|
||||||
items:
|
|
||||||
- enum:
|
|
||||||
- - seirobotics,sei610
|
|
||||||
- - khadas,vim3l
|
|
||||||
- hardkernel,odroid-c4
|
|
||||||
+ - khadas,vim3l
|
|
||||||
+ - seirobotics,sei610
|
|
||||||
- const: amlogic,sm1
|
|
||||||
|
|
||||||
- description: Boards with the Amlogic Meson A1 A113L SoC
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From 281f759bb1ad6bad61f045c3b2a6f6ed1db16ed1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
Date: Sat, 12 Dec 2020 05:44:14 +0000
|
|
||||||
Subject: [PATCH 22/88] FROMGIT: dt-bindings: arm: amlogic: add ODROID-HC4
|
|
||||||
bindings
|
|
||||||
|
|
||||||
Add the board bindings for the ODROID-HC4 device.
|
|
||||||
|
|
||||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
|
||||||
---
|
|
||||||
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
index 35995a1f97db..d24334e1e166 100644
|
|
||||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
|
||||||
@@ -166,6 +166,7 @@ properties:
|
|
||||||
items:
|
|
||||||
- enum:
|
|
||||||
- hardkernel,odroid-c4
|
|
||||||
+ - hardkernel,odroid-hc4
|
|
||||||
- khadas,vim3l
|
|
||||||
- seirobotics,sei610
|
|
||||||
- const: amlogic,sm1
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
|||||||
From e093d955d72107cc92008e0813e5e2cc7015fd9f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lukasz Luba <lukasz.luba@arm.com>
|
|
||||||
Date: Sun, 24 Jan 2021 03:57:47 +0000
|
|
||||||
Subject: [PATCH 23/88] FROMGIT: drm/panfrost: add governor data with
|
|
||||||
pre-defined thresholds
|
|
||||||
|
|
||||||
The simple_ondemand devfreq governor uses two thresholds to decide about
|
|
||||||
the frequency change: upthreshold, downdifferential. These two tunable
|
|
||||||
change the behavior of the governor decision, e.g. how fast to increase
|
|
||||||
the frequency or how rapidly limit the frequency. This patch adds needed
|
|
||||||
governor data with thresholds values gathered experimentally in different
|
|
||||||
workloads.
|
|
||||||
|
|
||||||
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
|
|
||||||
---
|
|
||||||
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 10 +++++++++-
|
|
||||||
drivers/gpu/drm/panfrost/panfrost_devfreq.h | 2 ++
|
|
||||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
|
|
||||||
index f44d28fad085..ffbf16506bb5 100644
|
|
||||||
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.c
|
|
||||||
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.c
|
|
||||||
@@ -129,8 +129,16 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
|
|
||||||
panfrost_devfreq_profile.initial_freq = cur_freq;
|
|
||||||
dev_pm_opp_put(opp);
|
|
||||||
|
|
||||||
+ /*
|
|
||||||
+ * Setup default thresholds for the simple_ondemand governor.
|
|
||||||
+ * The values are chosen based on experiments.
|
|
||||||
+ */
|
|
||||||
+ pfdevfreq->gov_data.upthreshold = 45;
|
|
||||||
+ pfdevfreq->gov_data.downdifferential = 5;
|
|
||||||
+
|
|
||||||
devfreq = devm_devfreq_add_device(dev, &panfrost_devfreq_profile,
|
|
||||||
- DEVFREQ_GOV_SIMPLE_ONDEMAND, NULL);
|
|
||||||
+ DEVFREQ_GOV_SIMPLE_ONDEMAND,
|
|
||||||
+ &pfdevfreq->gov_data);
|
|
||||||
if (IS_ERR(devfreq)) {
|
|
||||||
DRM_DEV_ERROR(dev, "Couldn't initialize GPU devfreq\n");
|
|
||||||
ret = PTR_ERR(devfreq);
|
|
||||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.h b/drivers/gpu/drm/panfrost/panfrost_devfreq.h
|
|
||||||
index db6ea48e21f9..1e2a4de941aa 100644
|
|
||||||
--- a/drivers/gpu/drm/panfrost/panfrost_devfreq.h
|
|
||||||
+++ b/drivers/gpu/drm/panfrost/panfrost_devfreq.h
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
#ifndef __PANFROST_DEVFREQ_H__
|
|
||||||
#define __PANFROST_DEVFREQ_H__
|
|
||||||
|
|
||||||
+#include <linux/devfreq.h>
|
|
||||||
#include <linux/spinlock.h>
|
|
||||||
#include <linux/ktime.h>
|
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ struct panfrost_devfreq {
|
|
||||||
struct devfreq *devfreq;
|
|
||||||
struct opp_table *regulators_opp_table;
|
|
||||||
struct thermal_cooling_device *cooling;
|
|
||||||
+ struct devfreq_simple_ondemand_data gov_data;
|
|
||||||
bool opp_of_table_added;
|
|
||||||
|
|
||||||
ktime_t busy_time;
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user