Merge branch 'openwrt:master' into master
This commit is contained in:
commit
dbd71d8d1c
446 changed files with 63747 additions and 3616 deletions
2
.github/workflows/Dockerfile.tools
vendored
2
.github/workflows/Dockerfile.tools
vendored
|
@ -1,4 +1,4 @@
|
||||||
FROM ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v2
|
FROM ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v6
|
||||||
|
|
||||||
COPY --chown=buildbot staging_dir/host /prebuilt_tools/staging_dir/host
|
COPY --chown=buildbot staging_dir/host /prebuilt_tools/staging_dir/host
|
||||||
COPY --chown=buildbot build_dir/host /prebuilt_tools/build_dir/host
|
COPY --chown=buildbot build_dir/host /prebuilt_tools/build_dir/host
|
||||||
|
|
2
.github/workflows/build-tools.yml
vendored
2
.github/workflows/build-tools.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: Build tools
|
name: Build tools
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v2
|
container: ghcr.io/openwrt/buildbot/buildworker-v3.8.0:v6
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
112
.github/workflows/build.yml
vendored
112
.github/workflows/build.yml
vendored
|
@ -54,6 +54,14 @@ on:
|
||||||
type: boolean
|
type: boolean
|
||||||
upload_external_toolchain:
|
upload_external_toolchain:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
use_ccache_cache:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
ccache_type:
|
||||||
|
type: string
|
||||||
|
default: kernel
|
||||||
|
upload_ccache_cache:
|
||||||
|
type: boolean
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -64,7 +72,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
|
||||||
ccache_hash: ${{ steps.ccache_hash.outputs.ccache_hash }}
|
|
||||||
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
|
||||||
container_name: ${{ steps.determine_tools_container.outputs.container_name }}
|
container_name: ${{ steps.determine_tools_container.outputs.container_name }}
|
||||||
|
|
||||||
|
@ -84,13 +91,6 @@ jobs:
|
||||||
|
|
||||||
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Generate ccache hash
|
|
||||||
id: ccache_hash
|
|
||||||
run: |
|
|
||||||
CCACHE_HASH=$(md5sum include/kernel-* | awk '{ print $1 }' \
|
|
||||||
| md5sum | awk '{ print $1 }')
|
|
||||||
echo "ccache_hash=$CCACHE_HASH" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# Per branch tools container tag
|
# Per branch tools container tag
|
||||||
# By default stick to latest
|
# By default stick to latest
|
||||||
# For official test targetting openwrt stable branch
|
# For official test targetting openwrt stable branch
|
||||||
|
@ -144,6 +144,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout master directory
|
- name: Checkout master directory
|
||||||
|
@ -233,6 +234,20 @@ jobs:
|
||||||
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV"
|
echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV"
|
||||||
echo "TOOLCHAIN_PATH=$TOOLCHAIN_PATH" >> "$GITHUB_ENV"
|
echo "TOOLCHAIN_PATH=$TOOLCHAIN_PATH" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Download and extract ccache cache from s3
|
||||||
|
id: restore-ccache-cache-s3
|
||||||
|
if: inputs.use_ccache_cache == true
|
||||||
|
working-directory: openwrt
|
||||||
|
run: |
|
||||||
|
ENDPOINT=https://storage.googleapis.com
|
||||||
|
BUCKET=openwrt-ci-cache
|
||||||
|
CCACHE_TAR=ccache-${{ inputs.ccache_type }}-${{ inputs.target }}-${{ inputs.subtarget }}.tar
|
||||||
|
|
||||||
|
if curl -o /dev/null -s --head --fail $ENDPOINT/$BUCKET/$CCACHE_TAR; then
|
||||||
|
wget -O - $ENDPOINT/$BUCKET/$CCACHE_TAR | tar -xf -
|
||||||
|
echo "cache-hit=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Fix permission
|
- name: Fix permission
|
||||||
run: |
|
run: |
|
||||||
chown -R buildbot:buildbot openwrt
|
chown -R buildbot:buildbot openwrt
|
||||||
|
@ -255,21 +270,33 @@ jobs:
|
||||||
./scripts/feeds update -a
|
./scripts/feeds update -a
|
||||||
./scripts/feeds install -a
|
./scripts/feeds install -a
|
||||||
|
|
||||||
- name: Cache ccache
|
- name: Restore ccache cache
|
||||||
uses: actions/cache@v3
|
id: restore-ccache-cache
|
||||||
|
if: inputs.use_ccache_cache == true && steps.restore-ccache-cache-s3.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/restore@v3
|
||||||
with:
|
with:
|
||||||
path: openwrt/.ccache
|
path: openwrt/.ccache
|
||||||
key: ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-${{ needs.setup_build.outputs.ccache_hash }}
|
key: ccache-${{ inputs.ccache_type }}-${{ inputs.target }}/${{ inputs.subtarget }}-${{ hashFiles('openwrt/include/kernel-**') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
|
ccache-${{ inputs.ccache_type }}-${{ inputs.target }}/${{ inputs.subtarget }}-
|
||||||
|
|
||||||
|
- name: Import GPG keys
|
||||||
|
shell: su buildbot -c "sh -e {0}"
|
||||||
|
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container'
|
||||||
|
run: gpg --receive-keys 0xCD84BCED626471F1 0x1D53D1877742E911 0xCD54E82DADB3684D
|
||||||
|
|
||||||
- name: Download external toolchain/sdk
|
- name: Download external toolchain/sdk
|
||||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container'
|
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container'
|
||||||
shell: su buildbot -c "sh -e {0}"
|
shell: su buildbot -c "sh -e {0}"
|
||||||
working-directory: openwrt
|
working-directory: openwrt
|
||||||
run: |
|
run: |
|
||||||
wget -O - https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ inputs.target }}/${{ inputs.subtarget }}/${{ env.TOOLCHAIN_FILE }}.tar.xz \
|
wget https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ inputs.target }}/${{ inputs.subtarget }}/${{ env.TOOLCHAIN_FILE }}.tar.xz
|
||||||
| tar --xz -xf -
|
wget https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ inputs.target }}/${{ inputs.subtarget }}/sha256sums.asc
|
||||||
|
wget https://downloads.cdn.openwrt.org/${{ env.TOOLCHAIN_PATH }}/targets/${{ inputs.target }}/${{ inputs.subtarget }}/sha256sums
|
||||||
|
gpg --with-fingerprint --verify sha256sums.asc
|
||||||
|
sha256sum --check --ignore-missing sha256sums
|
||||||
|
tar --xz -xf ${{ env.TOOLCHAIN_FILE }}.tar.xz
|
||||||
|
rm ${{ env.TOOLCHAIN_FILE }}.tar.xz sha256sums
|
||||||
|
|
||||||
- name: Configure testing kernel
|
- name: Configure testing kernel
|
||||||
if: inputs.testing == true
|
if: inputs.testing == true
|
||||||
|
@ -301,6 +328,24 @@ jobs:
|
||||||
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
echo CONFIG_TARGET_PER_DEVICE_ROOTFS=y >> .config
|
||||||
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
|
echo CONFIG_TARGET_ALL_PROFILES=y >> .config
|
||||||
|
|
||||||
|
# ccache for some reason have problem detecting compiler type
|
||||||
|
# with external toolchain. This cause the complete malfunction
|
||||||
|
# of ccache with the result of tons of unsupported compiler
|
||||||
|
# option error.
|
||||||
|
# To fix this force compiler type to gcc.
|
||||||
|
- name: Configure ccache and apply fixes
|
||||||
|
if: inputs.use_ccache_cache == true
|
||||||
|
shell: su buildbot -c "sh -e {0}"
|
||||||
|
working-directory: openwrt
|
||||||
|
env:
|
||||||
|
SYSTEM_CCACHE_CONF: staging_dir/host/etc/ccache.conf
|
||||||
|
run: |
|
||||||
|
touch $SYSTEM_CCACHE_CONF
|
||||||
|
|
||||||
|
echo compiler_type=gcc >> $SYSTEM_CCACHE_CONF
|
||||||
|
|
||||||
|
echo CONFIG_CCACHE=y >> .config
|
||||||
|
|
||||||
- name: Configure external toolchain in container
|
- name: Configure external toolchain in container
|
||||||
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_container'
|
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type == 'external_container'
|
||||||
shell: su buildbot -c "sh -e {0}"
|
shell: su buildbot -c "sh -e {0}"
|
||||||
|
@ -308,7 +353,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo CONFIG_DEVEL=y >> .config
|
echo CONFIG_DEVEL=y >> .config
|
||||||
echo CONFIG_AUTOREMOVE=y >> .config
|
echo CONFIG_AUTOREMOVE=y >> .config
|
||||||
echo CONFIG_CCACHE=y >> .config
|
|
||||||
|
|
||||||
./scripts/ext-toolchain.sh \
|
./scripts/ext-toolchain.sh \
|
||||||
--toolchain /external-toolchain/$(ls /external-toolchain/ | grep openwrt-toolchain)/toolchain-* \
|
--toolchain /external-toolchain/$(ls /external-toolchain/ | grep openwrt-toolchain)/toolchain-* \
|
||||||
|
@ -322,7 +366,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo CONFIG_DEVEL=y >> .config
|
echo CONFIG_DEVEL=y >> .config
|
||||||
echo CONFIG_AUTOREMOVE=y >> .config
|
echo CONFIG_AUTOREMOVE=y >> .config
|
||||||
echo CONFIG_CCACHE=y >> .config
|
|
||||||
|
|
||||||
./scripts/ext-toolchain.sh \
|
./scripts/ext-toolchain.sh \
|
||||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
|
--toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \
|
||||||
|
@ -364,7 +407,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo CONFIG_DEVEL=y >> .config
|
echo CONFIG_DEVEL=y >> .config
|
||||||
echo CONFIG_AUTOREMOVE=y >> .config
|
echo CONFIG_AUTOREMOVE=y >> .config
|
||||||
echo CONFIG_CCACHE=y >> .config
|
|
||||||
|
|
||||||
./scripts/ext-toolchain.sh \
|
./scripts/ext-toolchain.sh \
|
||||||
--toolchain ${{ env.TOOLCHAIN_FILE }}/staging_dir/toolchain-* \
|
--toolchain ${{ env.TOOLCHAIN_FILE }}/staging_dir/toolchain-* \
|
||||||
|
@ -378,7 +420,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo CONFIG_DEVEL=y >> .config
|
echo CONFIG_DEVEL=y >> .config
|
||||||
echo CONFIG_AUTOREMOVE=y >> .config
|
echo CONFIG_AUTOREMOVE=y >> .config
|
||||||
echo CONFIG_CCACHE=y >> .config
|
|
||||||
|
|
||||||
echo "CONFIG_TARGET_${{ inputs.target }}=y" >> .config
|
echo "CONFIG_TARGET_${{ inputs.target }}=y" >> .config
|
||||||
echo "CONFIG_TARGET_${{ inputs.target }}_${{ inputs.subtarget }}=y" >> .config
|
echo "CONFIG_TARGET_${{ inputs.target }}_${{ inputs.subtarget }}=y" >> .config
|
||||||
|
@ -482,6 +523,41 @@ jobs:
|
||||||
name: ${{ inputs.target }}-${{ inputs.subtarget }}-logs
|
name: ${{ inputs.target }}-${{ inputs.subtarget }}-logs
|
||||||
path: "openwrt/logs"
|
path: "openwrt/logs"
|
||||||
|
|
||||||
|
- name: Delete already present ccache cache
|
||||||
|
if: steps.restore-ccache-cache.outputs.cache-hit == 'true' && inputs.use_ccache_cache == true &&
|
||||||
|
github.event_name == 'push' && steps.restore-ccache-cache-s3.outputs.cache-hit != 'true'
|
||||||
|
uses: octokit/request-action@v2.x
|
||||||
|
with:
|
||||||
|
route: DELETE /repos/{repository}/actions/caches?key={key}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
INPUT_REPOSITORY: ${{ github.repository }}
|
||||||
|
INPUT_KEY: ${{ steps.restore-ccache-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
|
- name: Save ccache cache
|
||||||
|
if: inputs.use_ccache_cache == true && github.event_name == 'push' &&
|
||||||
|
steps.restore-ccache-cache-s3.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v3
|
||||||
|
with:
|
||||||
|
path: openwrt/.ccache
|
||||||
|
key: ${{ steps.restore-ccache-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
|
- name: Archive ccache
|
||||||
|
if: inputs.use_ccache_cache == true && github.event_name == 'push' &&
|
||||||
|
inputs.upload_ccache_cache == true
|
||||||
|
shell: su buildbot -c "sh -e {0}"
|
||||||
|
working-directory: openwrt
|
||||||
|
run: tar -cf ccache-${{ inputs.ccache_type }}-${{ inputs.target }}-${{ inputs.subtarget }}.tar .ccache
|
||||||
|
|
||||||
|
- name: Upload ccache cache
|
||||||
|
if: inputs.use_ccache_cache == true && github.event_name == 'push' &&
|
||||||
|
inputs.upload_ccache_cache == true
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.target }}-${{ inputs.subtarget }}-ccache-cache
|
||||||
|
path: openwrt/ccache-${{ inputs.ccache_type }}-${{ inputs.target }}-${{ inputs.subtarget }}.tar
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
- name: Find external toolchain name
|
- name: Find external toolchain name
|
||||||
id: get-toolchain-name
|
id: get-toolchain-name
|
||||||
if: inputs.upload_external_toolchain == true
|
if: inputs.upload_external_toolchain == true
|
||||||
|
|
2
.github/workflows/coverity.yml
vendored
2
.github/workflows/coverity.yml
vendored
|
@ -15,6 +15,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
container_name: toolchain
|
container_name: toolchain
|
||||||
|
@ -22,6 +23,7 @@ jobs:
|
||||||
subtarget: 64
|
subtarget: 64
|
||||||
build_full: true
|
build_full: true
|
||||||
include_feeds: true
|
include_feeds: true
|
||||||
|
use_ccache_cache: false
|
||||||
coverity_compiler_template_list: >-
|
coverity_compiler_template_list: >-
|
||||||
x86_64-openwrt-linux-gcc
|
x86_64-openwrt-linux-gcc
|
||||||
x86_64-openwrt-linux-musl-gcc
|
x86_64-openwrt-linux-musl-gcc
|
||||||
|
|
29
.github/workflows/kernel.yml
vendored
29
.github/workflows/kernel.yml
vendored
|
@ -54,10 +54,12 @@ jobs:
|
||||||
TARGETS_SUBTARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1 | awk '{ print $1 }')"
|
TARGETS_SUBTARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1 | awk '{ print $1 }')"
|
||||||
TARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1,1 | awk '{ print $1 }')"
|
TARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1,1 | awk '{ print $1 }')"
|
||||||
|
|
||||||
# On testing non-specific target, skip testing each subtarget
|
# On testing non-specific target, skip testing each subtarget if we are testing pr
|
||||||
if echo "$CHANGED_FILES" | grep -v -q target/linux ||
|
if [ ${{ github.event_name }} != 'push' ]; then
|
||||||
echo "$CHANGED_FILES" | grep -q target/linux/generic; then
|
if echo "$CHANGED_FILES" | grep -v -q target/linux ||
|
||||||
TARGETS_SUBTARGETS=$TARGETS
|
echo "$CHANGED_FILES" | grep -q target/linux/generic; then
|
||||||
|
TARGETS_SUBTARGETS=$TARGETS
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
JSON_TARGETS_SUBTARGETS='['
|
JSON_TARGETS_SUBTARGETS='['
|
||||||
|
@ -105,6 +107,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: False
|
fail-fast: False
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -116,6 +119,7 @@ jobs:
|
||||||
subtarget: ${{ matrix.subtarget }}
|
subtarget: ${{ matrix.subtarget }}
|
||||||
build_kernel: true
|
build_kernel: true
|
||||||
build_all_kmods: true
|
build_all_kmods: true
|
||||||
|
upload_ccache_cache: ${{ github.repository_owner == 'openwrt' }}
|
||||||
|
|
||||||
check-kernel-patches:
|
check-kernel-patches:
|
||||||
name: Check Kernel patches
|
name: Check Kernel patches
|
||||||
|
@ -132,3 +136,20 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
subtarget: ${{ matrix.subtarget }}
|
subtarget: ${{ matrix.subtarget }}
|
||||||
|
|
||||||
|
upload-ccache-cache-in-s3:
|
||||||
|
if: github.event_name == 'push' && github.repository_owner == 'openwrt'
|
||||||
|
name: Upload ccache cache to s3
|
||||||
|
needs: [determine_targets, build]
|
||||||
|
strategy:
|
||||||
|
fail-fast: False
|
||||||
|
matrix:
|
||||||
|
include: ${{fromJson(needs.determine_targets.outputs.targets_subtargets)}}
|
||||||
|
secrets:
|
||||||
|
s3_access_key: ${{ secrets.GCS_S3_ACCESS_KEY }}
|
||||||
|
s3_secret_key: ${{ secrets.GCS_S3_SECRET_KEY }}
|
||||||
|
uses: ./.github/workflows/upload-file-s3.yml
|
||||||
|
with:
|
||||||
|
endpoint: https://storage.googleapis.com
|
||||||
|
bucket: openwrt-ci-cache
|
||||||
|
download_id: ${{ matrix.target }}-${{ matrix.subtarget }}-ccache-cache
|
||||||
|
filename: ccache-kernel-${{ matrix.target }}-${{ matrix.subtarget }}.tar
|
||||||
|
|
100
.github/workflows/label-kernel.yml
vendored
100
.github/workflows/label-kernel.yml
vendored
|
@ -12,17 +12,84 @@ jobs:
|
||||||
name: Set target
|
name: Set target
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
target: ${{ steps.set_target.outputs.target }}
|
targets_subtargets: ${{ steps.set_target.outputs.targets_subtargets }}
|
||||||
subtarget: ${{ steps.set_target.outputs.subtarget }}
|
targets: ${{ steps.set_target.outputs.targets }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set target
|
- name: Checkout
|
||||||
id: set_target
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Parse label
|
||||||
|
id: parse_label
|
||||||
env:
|
env:
|
||||||
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
||||||
run: |
|
run: |
|
||||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target="\1"/p' | tee --append $GITHUB_OUTPUT
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/ci:kernel:\([^:]*\):\([^:]*\):*\([^:]*\)$/target=\1/p' | tee --append $GITHUB_OUTPUT
|
||||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget="\2"/p' | tee --append $GITHUB_OUTPUT
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/ci:kernel:\([^:]*\):\([^:]*\):*\([^:]*\)$/subtarget=\2/p' | tee --append $GITHUB_OUTPUT
|
||||||
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/ci:kernel:\([^:]*\):\([^:]*\):*\([^:]*\)$/testing=\3/p' | tee --append $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Set targets
|
||||||
|
id: set_target
|
||||||
|
run: |
|
||||||
|
ALL_TARGETS="$(perl ./scripts/dump-target-info.pl kernels 2>/dev/null)"
|
||||||
|
|
||||||
|
TARGETS_SUBTARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1)"
|
||||||
|
TARGETS="$(echo "$ALL_TARGETS" | sort -u -t '/' -k1,1)"
|
||||||
|
|
||||||
|
[ "${{ steps.parse_label.outputs.subtarget }}" = "first" ] && TARGETS_SUBTARGETS=$TARGETS
|
||||||
|
|
||||||
|
JSON_TARGETS_SUBTARGETS='['
|
||||||
|
FIRST=1
|
||||||
|
while IFS= read -r line; do
|
||||||
|
TARGET_SUBTARGET=$(echo $line | cut -d " " -f 1)
|
||||||
|
TARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 1)
|
||||||
|
SUBTARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 2)
|
||||||
|
|
||||||
|
[ "${{ steps.parse_label.outputs.target }}" != "all" ] && [ "${{ steps.parse_label.outputs.target }}" != "$TARGET" ] && continue
|
||||||
|
[ "${{ steps.parse_label.outputs.subtarget }}" != "all" ] && [ "${{ steps.parse_label.outputs.subtarget }}" != "first" ] &&
|
||||||
|
[ "${{ steps.parse_label.outputs.subtarget }}" != $SUBTARGET ] && continue
|
||||||
|
if [ "${{ steps.parse_label.outputs.testing }}" = "testing" ]; then
|
||||||
|
TESTING_KERNEL_VER=$(echo $line | cut -d " " -f 3)
|
||||||
|
[ -z "$TESTING_KERNEL_VER" ] && continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
TUPLE='{"target":"'"$TARGET"'","subtarget":"'"$SUBTARGET"'","testing":"'"$TESTING_KERNEL_VER"'"}'
|
||||||
|
[[ $FIRST -ne 1 ]] && JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"','
|
||||||
|
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS""$TUPLE"
|
||||||
|
FIRST=0
|
||||||
|
done <<< "$TARGETS_SUBTARGETS"
|
||||||
|
JSON_TARGETS_SUBTARGETS="$JSON_TARGETS_SUBTARGETS"']'
|
||||||
|
|
||||||
|
JSON_TARGETS='['
|
||||||
|
FIRST=1
|
||||||
|
while IFS= read -r line; do
|
||||||
|
TARGET_SUBTARGET=$(echo $line | cut -d " " -f 1)
|
||||||
|
TARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 1)
|
||||||
|
SUBTARGET=$(echo $TARGET_SUBTARGET | cut -d "/" -f 2)
|
||||||
|
|
||||||
|
[ "${{ steps.parse_label.outputs.target }}" != "all" ] && [ "${{ steps.parse_label.outputs.target }}" != $TARGET ] && continue
|
||||||
|
if [ "${{ steps.parse_label.outputs.testing }}" = "testing" ]; then
|
||||||
|
TESTING_KERNEL_VER=$(echo $line | cut -d " " -f 3)
|
||||||
|
[ -z "$TESTING_KERNEL_VER" ] && continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
TUPLE='{"target":"'"$TARGET"'","subtarget":"'"$SUBTARGET"'","testing":"'"$TESTING_KERNEL_VER"'"}'
|
||||||
|
[[ $FIRST -ne 1 ]] && JSON_TARGETS="$JSON_TARGETS"','
|
||||||
|
JSON_TARGETS="$JSON_TARGETS""$TUPLE"
|
||||||
|
FIRST=0
|
||||||
|
done <<< "$TARGETS"
|
||||||
|
JSON_TARGETS="$JSON_TARGETS"']'
|
||||||
|
|
||||||
|
echo -e "\n---- targets to build ----\n"
|
||||||
|
echo "$JSON_TARGETS_SUBTARGETS"
|
||||||
|
echo -e "\n---- targets to build ----\n"
|
||||||
|
|
||||||
|
echo -e "\n---- targets to check patch ----\n"
|
||||||
|
echo "$JSON_TARGETS"
|
||||||
|
echo -e "\n---- targets to check patch ----\n"
|
||||||
|
|
||||||
|
echo "targets_subtargets=$JSON_TARGETS_SUBTARGETS" >> $GITHUB_OUTPUT
|
||||||
|
echo "targets=$JSON_TARGETS" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_kernel:
|
build_kernel:
|
||||||
name: Build Kernel with external toolchain
|
name: Build Kernel with external toolchain
|
||||||
|
@ -30,10 +97,17 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
|
strategy:
|
||||||
|
fail-fast: False
|
||||||
|
matrix:
|
||||||
|
include: ${{fromJson(needs.set_target.outputs.targets_subtargets)}}
|
||||||
with:
|
with:
|
||||||
target: ${{ needs.set_target.outputs.target }}
|
container_name: toolchain
|
||||||
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
target: ${{ matrix.target }}
|
||||||
|
subtarget: ${{ matrix.subtarget }}
|
||||||
|
testing: ${{ matrix.testing != '' && true }}
|
||||||
build_kernel: true
|
build_kernel: true
|
||||||
build_all_kmods: true
|
build_all_kmods: true
|
||||||
|
|
||||||
|
@ -43,7 +117,13 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: False
|
||||||
|
matrix:
|
||||||
|
include: ${{fromJson(needs.set_target.outputs.targets)}}
|
||||||
uses: ./.github/workflows/check-kernel-patches.yml
|
uses: ./.github/workflows/check-kernel-patches.yml
|
||||||
with:
|
with:
|
||||||
target: ${{ needs.set_target.outputs.target }}
|
target: ${{ matrix.target }}
|
||||||
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
subtarget: ${{ matrix.subtarget }}
|
||||||
|
testing: ${{ matrix.testing != '' && true }}
|
||||||
|
|
6
.github/workflows/label-target.yml
vendored
6
.github/workflows/label-target.yml
vendored
|
@ -21,8 +21,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
CI_EVENT_LABEL_NAME: ${{ github.event.label.name }}
|
||||||
run: |
|
run: |
|
||||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target="\1"/p' | tee --append $GITHUB_OUTPUT
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/target=\1/p' | tee --append $GITHUB_OUTPUT
|
||||||
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget="\2"/p' | tee --append $GITHUB_OUTPUT
|
echo "$CI_EVENT_LABEL_NAME" | sed -n 's/.*:\(.*\):\(.*\)$/subtarget=\2/p' | tee --append $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_target:
|
build_target:
|
||||||
name: Build target
|
name: Build target
|
||||||
|
@ -30,8 +30,10 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
|
container_name: toolchain
|
||||||
target: ${{ needs.set_target.outputs.target }}
|
target: ${{ needs.set_target.outputs.target }}
|
||||||
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
subtarget: ${{ needs.set_target.outputs.subtarget }}
|
||||||
build_full: true
|
build_full: true
|
||||||
|
|
25
.github/workflows/packages.yml
vendored
25
.github/workflows/packages.yml
vendored
|
@ -35,6 +35,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: False
|
fail-fast: False
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -52,4 +53,28 @@ jobs:
|
||||||
build_all_kmods: true
|
build_all_kmods: true
|
||||||
build_all_modules: true
|
build_all_modules: true
|
||||||
build_full: true
|
build_full: true
|
||||||
|
ccache_type: packages
|
||||||
|
upload_ccache_cache: ${{ github.repository_owner == 'openwrt' }}
|
||||||
|
|
||||||
|
upload-ccache-cache-in-s3:
|
||||||
|
if: github.event_name == 'push' && github.repository_owner == 'openwrt'
|
||||||
|
name: Upload ccache cache to s3
|
||||||
|
needs: build
|
||||||
|
strategy:
|
||||||
|
fail-fast: False
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: malta
|
||||||
|
subtarget: be
|
||||||
|
- target: x86
|
||||||
|
subtarget: 64
|
||||||
|
secrets:
|
||||||
|
s3_access_key: ${{ secrets.GCS_S3_ACCESS_KEY }}
|
||||||
|
s3_secret_key: ${{ secrets.GCS_S3_SECRET_KEY }}
|
||||||
|
uses: ./.github/workflows/upload-file-s3.yml
|
||||||
|
with:
|
||||||
|
endpoint: https://storage.googleapis.com
|
||||||
|
bucket: openwrt-ci-cache
|
||||||
|
download_id: ${{ matrix.target }}-${{ matrix.subtarget }}-ccache-cache
|
||||||
|
filename: ccache-packages-${{ matrix.target }}-${{ matrix.subtarget }}.tar
|
||||||
|
|
||||||
|
|
1
.github/workflows/push-containers.yml
vendored
1
.github/workflows/push-containers.yml
vendored
|
@ -153,6 +153,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: False
|
fail-fast: False
|
||||||
matrix:
|
matrix:
|
||||||
|
|
1
.github/workflows/toolchain.yml
vendored
1
.github/workflows/toolchain.yml
vendored
|
@ -61,6 +61,7 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
packages: read
|
packages: read
|
||||||
|
actions: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: False
|
fail-fast: False
|
||||||
matrix:
|
matrix:
|
||||||
|
|
46
.github/workflows/upload-file-s3.yml
vendored
Normal file
46
.github/workflows/upload-file-s3.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: Upload File to S3
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
s3_access_key:
|
||||||
|
s3_secret_key:
|
||||||
|
inputs:
|
||||||
|
endpoint:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
bucket:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
download_id:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
filename:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload-file-in-s3:
|
||||||
|
name: Upload file in S3
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install minio
|
||||||
|
run: |
|
||||||
|
curl https://dl.min.io/client/mc/release/linux-amd64/mc \
|
||||||
|
--create-dirs \
|
||||||
|
-o $GITHUB_WORKSPACE/minio-binaries/mc
|
||||||
|
|
||||||
|
chmod +x $GITHUB_WORKSPACE/minio-binaries/mc
|
||||||
|
echo $GITHUB_WORKSPACE/minio-binaries/ >> $GITHUB_PATH
|
||||||
|
|
||||||
|
- name: Setup minio
|
||||||
|
run: mc alias set s3 ${{ inputs.endpoint }} ${{ secrets.s3_access_key }} ${{ secrets.s3_secret_key }}
|
||||||
|
|
||||||
|
- name: Download file
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.download_id }}
|
||||||
|
|
||||||
|
- name: Upload file to s3
|
||||||
|
run: mc cp ${{ inputs.filename }} s3/${{ inputs.bucket }}/
|
|
@ -204,11 +204,12 @@ menu "Target Images"
|
||||||
|
|
||||||
config GRUB_EFI_IMAGES
|
config GRUB_EFI_IMAGES
|
||||||
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
|
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
|
||||||
depends on TARGET_x86
|
depends on TARGET_x86 || TARGET_armvirt
|
||||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||||
select PACKAGE_grub2
|
select PACKAGE_grub2 if TARGET_x86
|
||||||
select PACKAGE_grub2-efi
|
select PACKAGE_grub2-efi if TARGET_x86
|
||||||
select PACKAGE_grub2-bios-setup
|
select PACKAGE_grub2-bios-setup if TARGET_x86
|
||||||
|
select PACKAGE_grub2-efi-arm if TARGET_armvirt
|
||||||
select PACKAGE_kmod-fs-vfat
|
select PACKAGE_kmod-fs-vfat
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
@ -266,7 +267,7 @@ menu "Target Images"
|
||||||
|
|
||||||
config VMDK_IMAGES
|
config VMDK_IMAGES
|
||||||
bool "Build VMware image files (VMDK)"
|
bool "Build VMware image files (VMDK)"
|
||||||
depends on TARGET_x86
|
depends on TARGET_x86 || TARGET_armvirt
|
||||||
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
|
||||||
select PACKAGE_kmod-e1000
|
select PACKAGE_kmod-e1000
|
||||||
|
|
||||||
|
@ -291,6 +292,7 @@ menu "Target Images"
|
||||||
depends on USES_BOOT_PART
|
depends on USES_BOOT_PART
|
||||||
default 8 if TARGET_apm821xx_sata
|
default 8 if TARGET_apm821xx_sata
|
||||||
default 64 if TARGET_bcm27xx
|
default 64 if TARGET_bcm27xx
|
||||||
|
default 128 if TARGET_armvirt
|
||||||
default 16
|
default 16
|
||||||
|
|
||||||
config TARGET_ROOTFS_PARTSIZE
|
config TARGET_ROOTFS_PARTSIZE
|
||||||
|
|
|
@ -397,6 +397,17 @@ config KERNEL_DEBUG_INFO_REDUCED
|
||||||
DEBUG_INFO build and compile times are reduced too.
|
DEBUG_INFO build and compile times are reduced too.
|
||||||
Only works with newer gcc versions.
|
Only works with newer gcc versions.
|
||||||
|
|
||||||
|
config KERNEL_FRAME_WARN
|
||||||
|
int
|
||||||
|
range 0 8192
|
||||||
|
default 1280 if KERNEL_KASAN && !ARCH_64BIT
|
||||||
|
default 1024 if !ARCH_64BIT
|
||||||
|
default 2048 if ARCH_64BIT
|
||||||
|
help
|
||||||
|
Tell the compiler to warn at build time for stack frames larger than this.
|
||||||
|
Setting this too low will cause a lot of warnings.
|
||||||
|
Setting it to 0 disables the warning.
|
||||||
|
|
||||||
# KERNEL_DEBUG_LL symbols must have the default value set as otherwise
|
# KERNEL_DEBUG_LL symbols must have the default value set as otherwise
|
||||||
# KConfig wont evaluate them unless KERNEL_EARLY_PRINTK is selected
|
# KConfig wont evaluate them unless KERNEL_EARLY_PRINTK is selected
|
||||||
# which means that buildroot wont override the DEBUG_LL symbols in target
|
# which means that buildroot wont override the DEBUG_LL symbols in target
|
||||||
|
|
|
@ -131,6 +131,7 @@ define Host/Exports/Default
|
||||||
$(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
|
$(1) : export STAGING_PREFIX=$$(HOST_BUILD_PREFIX)
|
||||||
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
$(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig:$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
||||||
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
$(1) : export PKG_CONFIG_LIBDIR=$$(HOST_BUILD_PREFIX)/lib/pkgconfig
|
||||||
|
$(1) : export GIT_CEILING_DIRECTORIES=$$(BUILD_DIR_HOST)
|
||||||
$(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
|
$(if $(HOST_CONFIG_SITE),$(1) : export CONFIG_SITE:=$(HOST_CONFIG_SITE))
|
||||||
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
|
$(if $(IS_PACKAGE_BUILD),$(1) : export PATH=$$(TARGET_PATH_PKG))
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-5.15 = .112
|
LINUX_VERSION-5.15 = .114
|
||||||
LINUX_KERNEL_HASH-5.15.112 = b0e8ebdba38e0c369f64ec4dc2a69ec59ffe87a64b82f940dbdf8e752b6ad651
|
LINUX_KERNEL_HASH-5.15.114 = e981ea5d219f77735bf5a3f7e84a8af578df8ac3e1c4ff1b0649e2b0795277d2
|
||||||
|
|
|
@ -13,6 +13,15 @@ endif
|
||||||
|
|
||||||
include $(KERNEL_DETAILS_FILE)
|
include $(KERNEL_DETAILS_FILE)
|
||||||
|
|
||||||
|
ifdef KERNEL_TESTING_PATCHVER
|
||||||
|
KERNEL_TESTING_DETAILS_FILE=$(INCLUDE_DIR)/kernel-$(KERNEL_TESTING_PATCHVER)
|
||||||
|
ifeq ($(wildcard $(KERNEL_TESTING_DETAILS_FILE)),)
|
||||||
|
$(error Missing kernel version/hash file for $(KERNEL_TESTING_PATCHVER). Please create $(KERNEL_TESTING_DETAILS_FILE))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(KERNEL_TESTING_DETAILS_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
|
||||||
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,8 @@ else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
|
||||||
LINUX_KARCH := mips
|
LINUX_KARCH := mips
|
||||||
else ifneq (,$(findstring $(ARCH) , powerpc64 ))
|
else ifneq (,$(findstring $(ARCH) , powerpc64 ))
|
||||||
LINUX_KARCH := powerpc
|
LINUX_KARCH := powerpc
|
||||||
|
else ifneq (,$(findstring $(ARCH) , riscv64 ))
|
||||||
|
LINUX_KARCH := riscv
|
||||||
else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 ))
|
else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 ))
|
||||||
LINUX_KARCH := sh
|
LINUX_KARCH := sh
|
||||||
else ifneq (,$(findstring $(ARCH) , i386 x86_64 ))
|
else ifneq (,$(findstring $(ARCH) , i386 x86_64 ))
|
||||||
|
|
|
@ -194,6 +194,7 @@ define Build/Exports/Default
|
||||||
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
|
$(1) : export CONFIG_SITE:=$$(CONFIG_SITE)
|
||||||
$(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH)
|
$(1) : export PKG_CONFIG_PATH:=$$(PKG_CONFIG_PATH)
|
||||||
$(1) : export PKG_CONFIG_LIBDIR:=$$(PKG_CONFIG_PATH)
|
$(1) : export PKG_CONFIG_LIBDIR:=$$(PKG_CONFIG_PATH)
|
||||||
|
$(1) : export GIT_CEILING_DIRECTORIES:=$$(BUILD_DIR)
|
||||||
endef
|
endef
|
||||||
Build/Exports=$(Build/Exports/Default)
|
Build/Exports=$(Build/Exports/Default)
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,10 @@ $(eval $(call TestHostCommand,perl-thread-queue, \
|
||||||
Please install the Perl Thread::Queue module, \
|
Please install the Perl Thread::Queue module, \
|
||||||
perl -MThread::Queue -e 1))
|
perl -MThread::Queue -e 1))
|
||||||
|
|
||||||
|
$(eval $(call TestHostCommand,perl-ipc-cmd, \
|
||||||
|
Please install the Perl IPC:Cmd module, \
|
||||||
|
perl -MIPC::Cmd -e 1))
|
||||||
|
|
||||||
$(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
|
$(eval $(call SetupHostCommand,tar,Please install GNU 'tar', \
|
||||||
gtar --version 2>&1 | grep GNU, \
|
gtar --version 2>&1 | grep GNU, \
|
||||||
gnutar --version 2>&1 | grep GNU, \
|
gnutar --version 2>&1 | grep GNU, \
|
||||||
|
|
30
include/site/riscv64
Normal file
30
include/site/riscv64
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. $TOPDIR/include/site/linux
|
||||||
|
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
|
||||||
|
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
|
||||||
|
|
||||||
|
ac_cv_sizeof___int64=8
|
||||||
|
ac_cv_sizeof_char=1
|
||||||
|
ac_cv_sizeof_int=4
|
||||||
|
ac_cv_sizeof_int16_t=2
|
||||||
|
ac_cv_sizeof_int32_t=4
|
||||||
|
ac_cv_sizeof_int64_t=8
|
||||||
|
ac_cv_sizeof_long_int=8
|
||||||
|
ac_cv_sizeof_long_long=8
|
||||||
|
ac_cv_sizeof_long=8
|
||||||
|
ac_cv_sizeof_off_t=8
|
||||||
|
ac_cv_sizeof_short_int=2
|
||||||
|
ac_cv_sizeof_short=2
|
||||||
|
ac_cv_sizeof_size_t=8
|
||||||
|
ac_cv_sizeof_ssize_t=8
|
||||||
|
ac_cv_sizeof_u_int16_t=2
|
||||||
|
ac_cv_sizeof_u_int32_t=4
|
||||||
|
ac_cv_sizeof_u_int64_t=8
|
||||||
|
ac_cv_sizeof_uint16_t=2
|
||||||
|
ac_cv_sizeof_uint32_t=4
|
||||||
|
ac_cv_sizeof_uint64_t=8
|
||||||
|
ac_cv_sizeof_unsigned_int=4
|
||||||
|
ac_cv_sizeof_unsigned_long=8
|
||||||
|
ac_cv_sizeof_unsigned_long_long=8
|
||||||
|
ac_cv_sizeof_unsigned_short=2
|
||||||
|
ac_cv_sizeof_void_p=8
|
|
@ -260,6 +260,10 @@ ifeq ($(DUMP),1)
|
||||||
CPU_CFLAGS_arc700 = -mcpu=arc700
|
CPU_CFLAGS_arc700 = -mcpu=arc700
|
||||||
CPU_CFLAGS_archs = -mcpu=archs
|
CPU_CFLAGS_archs = -mcpu=archs
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ARCH),riscv64)
|
||||||
|
CPU_TYPE ?= riscv64
|
||||||
|
CPU_CFLAGS_riscv64:=-mabi=lp64d -march=rv64imafdc
|
||||||
|
endif
|
||||||
ifneq ($(CPU_TYPE),)
|
ifneq ($(CPU_TYPE),)
|
||||||
ifndef CPU_CFLAGS_$(CPU_TYPE)
|
ifndef CPU_CFLAGS_$(CPU_TYPE)
|
||||||
$(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
|
$(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
|
||||||
|
|
|
@ -30,6 +30,7 @@ define Trusted-Firmware-A/Default
|
||||||
DDR3_FLYBY:=
|
DDR3_FLYBY:=
|
||||||
DDR_TYPE:=
|
DDR_TYPE:=
|
||||||
NAND_TYPE:=
|
NAND_TYPE:=
|
||||||
|
BOARD_QFN:=
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Trusted-Firmware-A/mt7622-nor-1ddr
|
define Trusted-Firmware-A/mt7622-nor-1ddr
|
||||||
|
@ -92,6 +93,46 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
|
||||||
DDR3_FLYBY:=1
|
DDR3_FLYBY:=1
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Trusted-Firmware-A/mt7981-nor-ddr3
|
||||||
|
NAME:=MediaTek MT7981 (SPI-NOR, DDR3)
|
||||||
|
BOOT_DEVICE:=nor
|
||||||
|
BUILD_SUBTARGET:=filogic
|
||||||
|
PLAT:=mt7981
|
||||||
|
DDR_TYPE:=ddr3
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Trusted-Firmware-A/mt7981-emmc-ddr3
|
||||||
|
NAME:=MediaTek MT7981 (eMMC, DDR3)
|
||||||
|
BOOT_DEVICE:=emmc
|
||||||
|
BUILD_SUBTARGET:=filogic
|
||||||
|
PLAT:=mt7981
|
||||||
|
DDR_TYPE:=ddr3
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Trusted-Firmware-A/mt7981-sdmmc-ddr3
|
||||||
|
NAME:=MediaTek MT7981 (SD card, DDR3)
|
||||||
|
BOOT_DEVICE:=sdmmc
|
||||||
|
BUILD_SUBTARGET:=filogic
|
||||||
|
PLAT:=mt7981
|
||||||
|
DDR_TYPE:=ddr3
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Trusted-Firmware-A/mt7986-snand-ddr3
|
||||||
|
NAME:=MediaTek MT7981 (SPI-NAND via SNFI, DDR3)
|
||||||
|
BOOT_DEVICE:=snand
|
||||||
|
BUILD_SUBTARGET:=filogic
|
||||||
|
PLAT:=mt7981
|
||||||
|
DDR_TYPE:=ddr3
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Trusted-Firmware-A/mt7981-spim-nand-ddr3
|
||||||
|
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR3)
|
||||||
|
BOOT_DEVICE:=spim-nand
|
||||||
|
BUILD_SUBTARGET:=filogic
|
||||||
|
PLAT:=mt7981
|
||||||
|
DDR_TYPE:=ddr3
|
||||||
|
endef
|
||||||
|
|
||||||
define Trusted-Firmware-A/mt7986-nor-ddr4
|
define Trusted-Firmware-A/mt7986-nor-ddr4
|
||||||
NAME:=MediaTek MT7986 (SPI-NOR, DDR4)
|
NAME:=MediaTek MT7986 (SPI-NOR, DDR4)
|
||||||
BOOT_DEVICE:=nor
|
BOOT_DEVICE:=nor
|
||||||
|
@ -182,6 +223,11 @@ TFA_TARGETS:= \
|
||||||
mt7622-emmc-2ddr \
|
mt7622-emmc-2ddr \
|
||||||
mt7622-sdmmc-1ddr \
|
mt7622-sdmmc-1ddr \
|
||||||
mt7622-sdmmc-2ddr \
|
mt7622-sdmmc-2ddr \
|
||||||
|
mt7981-emmc-ddr3 \
|
||||||
|
mt7981-nor-ddr3 \
|
||||||
|
mt7981-sdmmc-ddr3 \
|
||||||
|
mt7986-snand-ddr3 \
|
||||||
|
mt7981-spim-nand-ddr3 \
|
||||||
mt7986-emmc-ddr3 \
|
mt7986-emmc-ddr3 \
|
||||||
mt7986-nor-ddr3 \
|
mt7986-nor-ddr3 \
|
||||||
mt7986-sdmmc-ddr3 \
|
mt7986-sdmmc-ddr3 \
|
||||||
|
@ -197,6 +243,7 @@ TFA_MAKE_FLAGS += \
|
||||||
BOOT_DEVICE=$(BOOT_DEVICE) \
|
BOOT_DEVICE=$(BOOT_DEVICE) \
|
||||||
USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \
|
USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \
|
||||||
$(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \
|
$(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \
|
||||||
|
$(if $(BOARD_QFN),BOARD_QFN=1,BOARD_BGA=1) \
|
||||||
$(if $(NAND_TYPE),NAND_TYPE=$(NAND_TYPE)) \
|
$(if $(NAND_TYPE),NAND_TYPE=$(NAND_TYPE)) \
|
||||||
HAVE_DRAM_OBJ_FILE=yes \
|
HAVE_DRAM_OBJ_FILE=yes \
|
||||||
$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
|
$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
|
||||||
|
|
|
@ -33,14 +33,15 @@ include $(INCLUDE_DIR)/package.mk
|
||||||
define Package/grub2/Default
|
define Package/grub2/Default
|
||||||
CATEGORY:=Boot Loaders
|
CATEGORY:=Boot Loaders
|
||||||
SECTION:=boot
|
SECTION:=boot
|
||||||
TITLE:=GRand Unified Bootloader ($(1))
|
TITLE:=GRand Unified Bootloader ($(2))
|
||||||
URL:=http://www.gnu.org/software/grub/
|
URL:=http://www.gnu.org/software/grub/
|
||||||
DEPENDS:=@TARGET_x86
|
DEPENDS:=@TARGET_$(1)
|
||||||
VARIANT:=$(1)
|
VARIANT:=$(2)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
Package/grub2=$(call Package/grub2/Default,pc)
|
Package/grub2=$(call Package/grub2/Default,x86,pc)
|
||||||
Package/grub2-efi=$(call Package/grub2/Default,efi)
|
Package/grub2-efi=$(call Package/grub2/Default,x86,efi)
|
||||||
|
Package/grub2-efi-arm=$(call Package/grub2/Default,armvirt,efi)
|
||||||
|
|
||||||
define Package/grub2-editenv
|
define Package/grub2-editenv
|
||||||
CATEGORY:=Utilities
|
CATEGORY:=Utilities
|
||||||
|
@ -107,6 +108,10 @@ ifneq ($(BUILD_VARIANT),none)
|
||||||
MAKE_PATH := grub-core
|
MAKE_PATH := grub-core
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_arm),y)
|
||||||
|
TARGET_CFLAGS := $(filter-out -mfloat-abi=hard,$(TARGET_CFLAGS))
|
||||||
|
endif
|
||||||
|
|
||||||
define Host/Configure
|
define Host/Configure
|
||||||
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
|
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
|
||||||
$(Host/Configure/Default)
|
$(Host/Configure/Default)
|
||||||
|
@ -162,9 +167,31 @@ define Package/grub2-efi/install
|
||||||
-O $(CONFIG_ARCH)-efi \
|
-O $(CONFIG_ARCH)-efi \
|
||||||
-c ./files/grub-early.cfg \
|
-c ./files/grub-early.cfg \
|
||||||
-o $(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \
|
-o $(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \
|
||||||
at_keyboard boot chain configfile fat iso9660 linux ls part_msdos part_gpt reboot serial test efi_gop efi_uga
|
boot chain configfile fat iso9660 linux ls part_msdos part_gpt reboot serial test efi_gop efi_uga
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/grub2-efi-arm/install
|
||||||
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
|
||||||
|
cp ./files/grub-early-gpt.cfg $(PKG_BUILD_DIR)/grub-early.cfg
|
||||||
|
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||||
|
-d $(PKG_BUILD_DIR)/grub-core \
|
||||||
|
-p /boot/grub \
|
||||||
|
-O arm$(if $(CONFIG_aarch64),64,)-efi \
|
||||||
|
-c $(PKG_BUILD_DIR)/grub-early.cfg \
|
||||||
|
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_aarch64),aa64,arm).efi \
|
||||||
|
boot chain configfile fat linux ls part_gpt part_msdos reboot search \
|
||||||
|
search_fs_uuid search_label serial efi_gop lsefi minicmd ext2
|
||||||
|
$(STAGING_DIR_HOST)/bin/grub-mkimage \
|
||||||
|
-d $(PKG_BUILD_DIR)/grub-core \
|
||||||
|
-p /boot/grub \
|
||||||
|
-O arm$(if $(CONFIG_aarch64),64,)-efi \
|
||||||
|
-c ./files/grub-early.cfg \
|
||||||
|
-o $(STAGING_DIR_IMAGE)/grub2/iso-bootaa$(if $(CONFIG_aarch64),aa64,arm).efi \
|
||||||
|
boot chain configfile fat iso9660 linux ls lsefi minicmd part_msdos part_gpt \
|
||||||
|
reboot serial test efi_gop
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
define Package/grub2-editenv/install
|
define Package/grub2-editenv/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
||||||
|
@ -178,5 +205,6 @@ endef
|
||||||
$(eval $(call HostBuild))
|
$(eval $(call HostBuild))
|
||||||
$(eval $(call BuildPackage,grub2))
|
$(eval $(call BuildPackage,grub2))
|
||||||
$(eval $(call BuildPackage,grub2-efi))
|
$(eval $(call BuildPackage,grub2-efi))
|
||||||
|
$(eval $(call BuildPackage,grub2-efi-arm))
|
||||||
$(eval $(call BuildPackage,grub2-editenv))
|
$(eval $(call BuildPackage,grub2-editenv))
|
||||||
$(eval $(call BuildPackage,grub2-bios-setup))
|
$(eval $(call BuildPackage,grub2-bios-setup))
|
||||||
|
|
2
package/boot/grub2/files/grub-early-gpt.cfg
Normal file
2
package/boot/grub2/files/grub-early-gpt.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
search --set=root --label kernel
|
||||||
|
configfile ($root)/efi/openwrt/grub.cfg
|
63
package/boot/opensbi/Makefile
Normal file
63
package/boot/opensbi/Makefile
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
#
|
||||||
|
# Copyright (C) 2022 OpenWrt.org
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=opensbi
|
||||||
|
PKG_RELEASE:=1.2
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL=https://github.com/riscv/opensbi
|
||||||
|
PKG_SOURCE_DATE:=2022-12-24
|
||||||
|
PKG_SOURCE_VERSION:=6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8
|
||||||
|
PKG_MIRROR_HASH:=edcdd99da6c62975171981c0aa2b73a27091067da11ccd49816b5ad27d000858
|
||||||
|
|
||||||
|
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_TARGETS:=bin
|
||||||
|
PKG_FLAGS:=nonshared
|
||||||
|
PKG_LICENSE:=BSD-2-Clause
|
||||||
|
PKG_LICENSE_FILES:=COPYING.BSD
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/opensbi
|
||||||
|
SECTION:=boot
|
||||||
|
CATEGORY:=Boot Loaders
|
||||||
|
DEPENDS:=@TARGET_sifiveu
|
||||||
|
URL:=https://github.com/riscv/opensbi/blob/master/README.md
|
||||||
|
VARIANT:=$(subst _,/,$(subst opensbi_,,$(1)))
|
||||||
|
TITLE:=OpenSBI generic
|
||||||
|
OPENSBI_IMAGE:=
|
||||||
|
PLAT:=
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/opensbi_generic
|
||||||
|
$(Package/opensbi)
|
||||||
|
TITLE:=OpenSBI generic
|
||||||
|
OPENSBI_IMAGE:=fw_dynamic.bin
|
||||||
|
PLAT:=generic
|
||||||
|
endef
|
||||||
|
|
||||||
|
export GCC_HONOUR_COPTS=s
|
||||||
|
|
||||||
|
MAKE_VARS = \
|
||||||
|
CROSS_COMPILE="$(TARGET_CROSS)"
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(eval $(Package/opensbi_$(BUILD_VARIANT))) \
|
||||||
|
+$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
PLATFORM=$(PLAT)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/build/platform/$(PLAT)/firmware/fw_dynamic.bin $(STAGING_DIR_IMAGE)/fw_dynamic-${BUILD_VARIANT}.bin
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,opensbi_generic))
|
|
@ -14,6 +14,7 @@ netgear,wax218)
|
||||||
[ -n "$idx" ] && \
|
[ -n "$idx" ] && \
|
||||||
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
|
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
|
||||||
;;
|
;;
|
||||||
|
compex,wpq873|\
|
||||||
edgecore,eap102|\
|
edgecore,eap102|\
|
||||||
zyxel,nbg7815)
|
zyxel,nbg7815)
|
||||||
idx="$(find_mtd_index 0:appsblenv)"
|
idx="$(find_mtd_index 0:appsblenv)"
|
||||||
|
|
|
@ -41,6 +41,7 @@ xiaomi,redmi-router-ax6000-stock)
|
||||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
|
||||||
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"
|
||||||
;;
|
;;
|
||||||
|
qihoo,360t7|\
|
||||||
tplink,tl-xdr4288|\
|
tplink,tl-xdr4288|\
|
||||||
tplink,tl-xdr6086|\
|
tplink,tl-xdr6086|\
|
||||||
tplink,tl-xdr6088|\
|
tplink,tl-xdr6088|\
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0x8fffffff
|
fdt_high=0x8fffffff
|
||||||
initrd_high=0xffffffffffffffff
|
initrd_high=0xffffffffffffffff
|
||||||
sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr
|
sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||||
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
|
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.spi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0x8fffffff
|
fdt_high=0x8fffffff
|
||||||
initrd_high=0xffffffff
|
initrd_high=0xffffffff
|
||||||
sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr}
|
sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0x8fffffff
|
fdt_high=0x8fffffff
|
||||||
initrd_high=0xffffffff
|
initrd_high=0xffffffff
|
||||||
sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr
|
sd_boot=ext4load mmc 0:1 $loadaddr fitImage;bootm $loadaddr
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||||
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000
|
bootargs=root=/dev/mtdblock6 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),11m(reserved-1),1m(dtb),16m(kernel),32m(rootfs),49m@0xf00000(firmware) cma=64M@0x0-0xb0000000
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0x8fffffff
|
fdt_high=0x8fffffff
|
||||||
initrd_high=0xffffffffffffffff
|
initrd_high=0xffffffffffffffff
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr}
|
sd_boot=ext4load mmc 0:1 ${loadaddr} fitImage;bootm ${loadaddr}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0x8fffffff
|
fdt_high=0x8fffffff
|
||||||
initrd_high=0xffffffffffffffff
|
initrd_high=0xffffffffffffffff
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0xa0000000
|
fdt_high=0xa0000000
|
||||||
initrd_high=0xffffffffffffffff
|
initrd_high=0xffffffffffffffff
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0xa0000000
|
fdt_high=0xa0000000
|
||||||
initrd_high=0xffffffffffffffff
|
initrd_high=0xffffffffffffffff
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
fdt_high=0xa0000000
|
fdt_high=0xa0000000
|
||||||
initrd_high=0xffffffffffffffff
|
initrd_high=0xffffffffffffffff
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
mc_init=mmc read 80000000 5000 1800;mmc read 80300000 7000 800;fsl_mc start mc 80000000 80300000;mmc read 80400000 6800 800;fsl_mc apply dpl 80400000
|
mc_init=mmc read 80000000 5000 1800;mmc read 80300000 7000 800;fsl_mc start mc 80000000 80300000;mmc read 80400000 6800 800;fsl_mc apply dpl 80400000
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
fdtaddr=0x8f000000
|
fdtaddr=0x8f000000
|
||||||
loadaddr=0x81000000
|
loadaddr=0x88000000
|
||||||
bootm_size=0x10000000
|
bootm_size=0x10000000
|
||||||
hwconfig=fsl_ddr:bank_intlv=auto
|
hwconfig=fsl_ddr:bank_intlv=auto
|
||||||
mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000
|
mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000
|
||||||
|
|
|
@ -176,6 +176,18 @@ define U-Boot/mt7629_rfb
|
||||||
UBOOT_CONFIG:=mt7629_rfb
|
UBOOT_CONFIG:=mt7629_rfb
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define U-Boot/mt7981_qihoo_360t7
|
||||||
|
NAME:=Qihoo 360T7
|
||||||
|
BUILD_SUBTARGET:=filogic
|
||||||
|
BUILD_DEVICES:=qihoo_360t7
|
||||||
|
UBOOT_CONFIG:=mt7981_qihoo-360t7
|
||||||
|
UBOOT_IMAGE:=u-boot.fip
|
||||||
|
BL2_BOOTDEV:=spim-nand
|
||||||
|
BL2_SOC:=mt7981
|
||||||
|
BL2_DDRTYPE:=ddr3
|
||||||
|
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
|
||||||
|
endef
|
||||||
|
|
||||||
define U-Boot/mt7986_rfb
|
define U-Boot/mt7986_rfb
|
||||||
NAME:=MT7986 Reference Board
|
NAME:=MT7986 Reference Board
|
||||||
BUILD_SUBTARGET:=filogic
|
BUILD_SUBTARGET:=filogic
|
||||||
|
@ -301,6 +313,7 @@ UBOOT_TARGETS := \
|
||||||
mt7628_rfb \
|
mt7628_rfb \
|
||||||
ravpower_rp-wd009 \
|
ravpower_rp-wd009 \
|
||||||
mt7629_rfb \
|
mt7629_rfb \
|
||||||
|
mt7981_qihoo_360t7 \
|
||||||
mt7986_bananapi_bpi-r3-emmc \
|
mt7986_bananapi_bpi-r3-emmc \
|
||||||
mt7986_bananapi_bpi-r3-sdmmc \
|
mt7986_bananapi_bpi-r3-sdmmc \
|
||||||
mt7986_bananapi_bpi-r3-snand \
|
mt7986_bananapi_bpi-r3-snand \
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
--- a/arch/arm/dts/mt7981.dtsi
|
||||||
|
+++ b/arch/arm/dts/mt7981.dtsi
|
||||||
|
@@ -32,6 +32,35 @@
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
+ psci {
|
||||||
|
+ compatible = "arm,psci-0.2";
|
||||||
|
+ method = "smc";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ reserved-memory {
|
||||||
|
+ #address-cells = <2>;
|
||||||
|
+ #size-cells = <2>;
|
||||||
|
+ ranges;
|
||||||
|
+
|
||||||
|
+ /* 64 KiB reserved for ramoops/pstore */
|
||||||
|
+ ramoops@42ff0000 {
|
||||||
|
+ compatible = "ramoops";
|
||||||
|
+ reg = <0 0x42ff0000 0 0x10000>;
|
||||||
|
+ record-size = <0x1000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
|
||||||
|
+ secmon_reserved: secmon@43000000 {
|
||||||
|
+ reg = <0 0x43000000 0 0x30000>;
|
||||||
|
+ no-map;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wmcpu_emi: wmcpu-reserved@4fc00000 {
|
||||||
|
+ no-map;
|
||||||
|
+ reg = <0 0x4fc00000 0 0x00100000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
gpt_clk: gpt_dummy20m {
|
||||||
|
compatible = "fixed-clock";
|
||||||
|
clock-frequency = <13000000>;
|
|
@ -0,0 +1,43 @@
|
||||||
|
--- a/board/mediatek/mt7981/mt7981_rfb.c
|
||||||
|
+++ b/board/mediatek/mt7981/mt7981_rfb.c
|
||||||
|
@@ -6,9 +6,16 @@
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
#include <config.h>
|
||||||
|
+#include <dm.h>
|
||||||
|
+#include <button.h>
|
||||||
|
#include <env.h>
|
||||||
|
#include <init.h>
|
||||||
|
#include <asm/global_data.h>
|
||||||
|
+#include <linux/delay.h>
|
||||||
|
+
|
||||||
|
+#ifndef CONFIG_RESET_BUTTON_LABEL
|
||||||
|
+#define CONFIG_RESET_BUTTON_LABEL "reset"
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include <mtd.h>
|
||||||
|
#include <linux/mtd/mtd.h>
|
||||||
|
@@ -24,7 +31,22 @@ int board_init(void)
|
||||||
|
|
||||||
|
int board_late_init(void)
|
||||||
|
{
|
||||||
|
- gd->env_valid = 1; //to load environment variable from persistent store
|
||||||
|
+ struct udevice *dev;
|
||||||
|
+
|
||||||
|
+ gd->env_valid = ENV_VALID;
|
||||||
|
+ if (!button_get_by_label(CONFIG_RESET_BUTTON_LABEL, &dev)) {
|
||||||
|
+ puts("reset button found\n");
|
||||||
|
+#ifdef CONFIG_RESET_BUTTON_SETTLE_DELAY
|
||||||
|
+ if (CONFIG_RESET_BUTTON_SETTLE_DELAY > 0) {
|
||||||
|
+ button_get_state(dev);
|
||||||
|
+ mdelay(CONFIG_RESET_BUTTON_SETTLE_DELAY);
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+ if (button_get_state(dev) == BUTTON_ON) {
|
||||||
|
+ puts("button pushed, resetting environment\n");
|
||||||
|
+ gd->env_valid = ENV_INVALID;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
env_relocate();
|
||||||
|
return 0;
|
||||||
|
}
|
420
package/boot/uboot-mediatek/patches/433-add-qihoo_360t7.patch
Normal file
420
package/boot/uboot-mediatek/patches/433-add-qihoo_360t7.patch
Normal file
|
@ -0,0 +1,420 @@
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/mt7981_qihoo-360t7_defconfig
|
||||||
|
@@ -0,0 +1,175 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_POSITION_INDEPENDENT=y
|
||||||
|
+CONFIG_ARCH_MEDIATEK=y
|
||||||
|
+CONFIG_TARGET_MT7981=y
|
||||||
|
+CONFIG_TEXT_BASE=0x41e00000
|
||||||
|
+CONFIG_SYS_MALLOC_F_LEN=0x4000
|
||||||
|
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||||
|
+CONFIG_NR_DRAM_BANKS=1
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="mt7981_qihoo-360t7"
|
||||||
|
+CONFIG_DEFAULT_ENV_FILE="qihoo-360t7_env"
|
||||||
|
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981_qihoo-360t7.dtb"
|
||||||
|
+CONFIG_OF_LIBFDT_OVERLAY=y
|
||||||
|
+CONFIG_DEBUG_UART_BASE=0x11002000
|
||||||
|
+CONFIG_DEBUG_UART_CLOCK=40000000
|
||||||
|
+CONFIG_DEBUG_UART=y
|
||||||
|
+CONFIG_SYS_LOAD_ADDR=0x46000000
|
||||||
|
+CONFIG_SMBIOS_PRODUCT_NAME=""
|
||||||
|
+CONFIG_AUTOBOOT_KEYED=y
|
||||||
|
+CONFIG_BOOTDELAY=30
|
||||||
|
+CONFIG_AUTOBOOT_MENU_SHOW=y
|
||||||
|
+CONFIG_CFB_CONSOLE_ANSI=y
|
||||||
|
+CONFIG_BOARD_LATE_INIT=y
|
||||||
|
+CONFIG_BUTTON=y
|
||||||
|
+CONFIG_BUTTON_GPIO=y
|
||||||
|
+CONFIG_GPIO_HOG=y
|
||||||
|
+CONFIG_CMD_ENV_FLAGS=y
|
||||||
|
+CONFIG_FIT=y
|
||||||
|
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
|
||||||
|
+CONFIG_LED=y
|
||||||
|
+CONFIG_LED_BLINK=y
|
||||||
|
+CONFIG_LED_GPIO=y
|
||||||
|
+CONFIG_LOGLEVEL=7
|
||||||
|
+CONFIG_LOG=y
|
||||||
|
+CONFIG_SYS_PROMPT="MT7981> "
|
||||||
|
+CONFIG_CMD_BOOTMENU=y
|
||||||
|
+CONFIG_CMD_BOOTP=y
|
||||||
|
+CONFIG_CMD_BUTTON=y
|
||||||
|
+CONFIG_CMD_CACHE=y
|
||||||
|
+CONFIG_CMD_CDP=y
|
||||||
|
+CONFIG_CMD_CPU=y
|
||||||
|
+CONFIG_CMD_DHCP=y
|
||||||
|
+CONFIG_CMD_DM=y
|
||||||
|
+CONFIG_CMD_DNS=y
|
||||||
|
+CONFIG_CMD_ECHO=y
|
||||||
|
+CONFIG_CMD_ENV_READMEM=y
|
||||||
|
+CONFIG_CMD_ERASEENV=y
|
||||||
|
+CONFIG_CMD_EXT4=y
|
||||||
|
+CONFIG_CMD_FAT=y
|
||||||
|
+CONFIG_CMD_FDT=y
|
||||||
|
+CONFIG_CMD_FS_GENERIC=y
|
||||||
|
+CONFIG_CMD_FS_UUID=y
|
||||||
|
+CONFIG_CMD_GPIO=y
|
||||||
|
+CONFIG_CMD_GPT=y
|
||||||
|
+CONFIG_CMD_HASH=y
|
||||||
|
+CONFIG_CMD_ITEST=y
|
||||||
|
+CONFIG_CMD_LED=y
|
||||||
|
+CONFIG_CMD_LICENSE=y
|
||||||
|
+CONFIG_CMD_LINK_LOCAL=y
|
||||||
|
+# CONFIG_CMD_MBR is not set
|
||||||
|
+CONFIG_CMD_PCI=y
|
||||||
|
+CONFIG_CMD_PSTORE=y
|
||||||
|
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
|
||||||
|
+CONFIG_CMD_SF_TEST=y
|
||||||
|
+CONFIG_CMD_PING=y
|
||||||
|
+CONFIG_CMD_PXE=y
|
||||||
|
+CONFIG_CMD_PWM=y
|
||||||
|
+CONFIG_CMD_SMC=y
|
||||||
|
+CONFIG_CMD_TFTPBOOT=y
|
||||||
|
+CONFIG_CMD_TFTPSRV=y
|
||||||
|
+CONFIG_CMD_UBI=y
|
||||||
|
+CONFIG_CMD_UBI_RENAME=y
|
||||||
|
+CONFIG_CMD_UBIFS=y
|
||||||
|
+CONFIG_CMD_ASKENV=y
|
||||||
|
+CONFIG_CMD_PART=y
|
||||||
|
+CONFIG_CMD_RARP=y
|
||||||
|
+CONFIG_CMD_SETEXPR=y
|
||||||
|
+CONFIG_CMD_SLEEP=y
|
||||||
|
+CONFIG_CMD_SNTP=y
|
||||||
|
+CONFIG_CMD_SOURCE=y
|
||||||
|
+CONFIG_CMD_STRINGS=y
|
||||||
|
+CONFIG_CMD_UUID=y
|
||||||
|
+CONFIG_DISPLAY_CPUINFO=y
|
||||||
|
+CONFIG_DM_MTD=y
|
||||||
|
+CONFIG_DM_REGULATOR=y
|
||||||
|
+CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_DM_REGULATOR_GPIO=y
|
||||||
|
+CONFIG_DM_PWM=y
|
||||||
|
+CONFIG_PWM_MTK=y
|
||||||
|
+CONFIG_HUSH_PARSER=y
|
||||||
|
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
|
||||||
|
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||||
|
+CONFIG_VERSION_VARIABLE=y
|
||||||
|
+CONFIG_PARTITION_UUIDS=y
|
||||||
|
+CONFIG_NETCONSOLE=y
|
||||||
|
+CONFIG_REGMAP=y
|
||||||
|
+CONFIG_SYSCON=y
|
||||||
|
+CONFIG_CLK=y
|
||||||
|
+CONFIG_DM_GPIO=y
|
||||||
|
+CONFIG_DM_SCSI=y
|
||||||
|
+CONFIG_AHCI=y
|
||||||
|
+CONFIG_AHCI_PCI=y
|
||||||
|
+CONFIG_SCSI_AHCI=y
|
||||||
|
+CONFIG_SCSI=y
|
||||||
|
+CONFIG_CMD_SCSI=y
|
||||||
|
+CONFIG_PHY=y
|
||||||
|
+CONFIG_PHY_MTK_TPHY=y
|
||||||
|
+CONFIG_PHY_FIXED=y
|
||||||
|
+CONFIG_MTK_AHCI=y
|
||||||
|
+CONFIG_DM_ETH=y
|
||||||
|
+CONFIG_MEDIATEK_ETH=y
|
||||||
|
+CONFIG_PCI=y
|
||||||
|
+# CONFIG_MMC is not set
|
||||||
|
+# CONFIG_DM_MMC is not set
|
||||||
|
+CONFIG_MTD=y
|
||||||
|
+CONFIG_MTD_UBI_FASTMAP=y
|
||||||
|
+CONFIG_DM_PCI=y
|
||||||
|
+CONFIG_PCIE_MEDIATEK=y
|
||||||
|
+CONFIG_PINCTRL=y
|
||||||
|
+CONFIG_PINCONF=y
|
||||||
|
+CONFIG_PINCTRL_MT7622=y
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_PRE_CONSOLE_BUFFER=y
|
||||||
|
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
|
||||||
|
+CONFIG_MTK_POWER_DOMAIN=y
|
||||||
|
+CONFIG_RAM=y
|
||||||
|
+CONFIG_DM_SERIAL=y
|
||||||
|
+CONFIG_MTK_SERIAL=y
|
||||||
|
+CONFIG_SPI=y
|
||||||
|
+CONFIG_DM_SPI=y
|
||||||
|
+CONFIG_MTK_SPI_NAND=y
|
||||||
|
+CONFIG_MTK_SPI_NAND_MTD=y
|
||||||
|
+CONFIG_SYSRESET_WATCHDOG=y
|
||||||
|
+CONFIG_WDT_MTK=y
|
||||||
|
+CONFIG_LZO=y
|
||||||
|
+CONFIG_ZSTD=y
|
||||||
|
+CONFIG_HEXDUMP=y
|
||||||
|
+CONFIG_RANDOM_UUID=y
|
||||||
|
+CONFIG_REGEX=y
|
||||||
|
+CONFIG_OF_EMBED=y
|
||||||
|
+CONFIG_ENV_OVERWRITE=y
|
||||||
|
+CONFIG_ENV_IS_IN_UBI=y
|
||||||
|
+CONFIG_ENV_UBI_PART="ubi"
|
||||||
|
+CONFIG_ENV_SIZE=0x1f000
|
||||||
|
+CONFIG_ENV_SIZE_REDUND=0x1f000
|
||||||
|
+CONFIG_ENV_UBI_VOLUME="ubootenv"
|
||||||
|
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
|
||||||
|
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||||
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||||
|
+CONFIG_REGMAP=y
|
||||||
|
+CONFIG_SYSCON=y
|
||||||
|
+CONFIG_CLK=y
|
||||||
|
+CONFIG_PHY_FIXED=y
|
||||||
|
+CONFIG_DM_ETH=y
|
||||||
|
+CONFIG_MEDIATEK_ETH=y
|
||||||
|
+CONFIG_PINCTRL=y
|
||||||
|
+CONFIG_PINCONF=y
|
||||||
|
+CONFIG_PINCTRL_MT7981=y
|
||||||
|
+CONFIG_POWER_DOMAIN=y
|
||||||
|
+CONFIG_MTK_POWER_DOMAIN=y
|
||||||
|
+CONFIG_DM_REGULATOR=y
|
||||||
|
+CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_DM_SERIAL=y
|
||||||
|
+CONFIG_MTK_SERIAL=y
|
||||||
|
+CONFIG_HEXDUMP=y
|
||||||
|
+CONFIG_USE_DEFAULT_ENV_FILE=y
|
||||||
|
+CONFIG_MTD_SPI_NAND=y
|
||||||
|
+CONFIG_MTK_SPIM=y
|
||||||
|
+CONFIG_CMD_MTD=y
|
||||||
|
+CONFIG_CMD_NAND=y
|
||||||
|
+CONFIG_CMD_NAND_TRIMFFS=y
|
||||||
|
+CONFIG_LMB_MAX_REGIONS=64
|
||||||
|
+CONFIG_USE_IPADDR=y
|
||||||
|
+CONFIG_IPADDR="192.168.1.1"
|
||||||
|
+CONFIG_USE_SERVERIP=y
|
||||||
|
+CONFIG_SERVERIP="192.168.1.254"
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/mt7981_qihoo-360t7.dts
|
||||||
|
@@ -0,0 +1,180 @@
|
||||||
|
+// SPDX-License-Identifier: GPL-2.0
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2022 MediaTek Inc.
|
||||||
|
+ * Author: Sam Shih <sam.shih@mediatek.com>
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+#include "mt7981.dtsi"
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/input/linux-event-codes.h>
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+ model = "Qihoo 360T7";
|
||||||
|
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = &uart0;
|
||||||
|
+ tick-timer = &timer0;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ keys {
|
||||||
|
+ compatible = "gpio-keys";
|
||||||
|
+
|
||||||
|
+ factory {
|
||||||
|
+ label = "reset";
|
||||||
|
+ linux,code = <KEY_RESTART>;
|
||||||
|
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wps {
|
||||||
|
+ label = "wps";
|
||||||
|
+ linux,code = <KEY_WPS_BUTTON>;
|
||||||
|
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+
|
||||||
|
+ status_red {
|
||||||
|
+ label = "red:status";
|
||||||
|
+ gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ status_green {
|
||||||
|
+ label = "green:status";
|
||||||
|
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart0 {
|
||||||
|
+ mediatek,force-highspeed;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart1 {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&uart1_pins>;
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+ð {
|
||||||
|
+ status = "okay";
|
||||||
|
+ mediatek,gmac-id = <0>;
|
||||||
|
+ phy-mode = "sgmii";
|
||||||
|
+ mediatek,switch = "mt7531";
|
||||||
|
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
|
||||||
|
+
|
||||||
|
+ fixed-link {
|
||||||
|
+ speed = <1000>;
|
||||||
|
+ full-duplex;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pinctrl {
|
||||||
|
+ spi_flash_pins: spi0-pins-func-1 {
|
||||||
|
+ mux {
|
||||||
|
+ function = "flash";
|
||||||
|
+ groups = "spi0", "spi0_wp_hold";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ conf-pu {
|
||||||
|
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
|
||||||
|
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||||
|
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ conf-pd {
|
||||||
|
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
|
||||||
|
+ drive-strength = <MTK_DRIVE_8mA>;
|
||||||
|
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ spic_pins: spi1-pins-func-1 {
|
||||||
|
+ mux {
|
||||||
|
+ function = "spi";
|
||||||
|
+ groups = "spi1_1";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ uart1_pins: spi1-pins-func-3 {
|
||||||
|
+ mux {
|
||||||
|
+ function = "uart";
|
||||||
|
+ groups = "uart1_2";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pwm_pins: pwm0-pins-func-1 {
|
||||||
|
+ mux {
|
||||||
|
+ function = "pwm";
|
||||||
|
+ groups = "pwm0_1", "pwm1_0";
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pwm {
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&pwm_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi0 {
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ pinctrl-0 = <&spi_flash_pins>;
|
||||||
|
+ status = "okay";
|
||||||
|
+ must_tx;
|
||||||
|
+ enhance_timing;
|
||||||
|
+ dma_ext;
|
||||||
|
+ ipm_design;
|
||||||
|
+ support_quad;
|
||||||
|
+ tick_dly = <2>;
|
||||||
|
+ sample_sel = <0>;
|
||||||
|
+
|
||||||
|
+ spi_nand@0 {
|
||||||
|
+ compatible = "spi-nand";
|
||||||
|
+ reg = <0>;
|
||||||
|
+ spi-max-frequency = <52000000>;
|
||||||
|
+
|
||||||
|
+ partitions {
|
||||||
|
+ compatible = "fixed-partitions";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <1>;
|
||||||
|
+
|
||||||
|
+ partition@0 {
|
||||||
|
+ label = "bl2";
|
||||||
|
+ reg = <0x0 0x100000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@100000 {
|
||||||
|
+ label = "orig-env";
|
||||||
|
+ reg = <0x100000 0x80000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@160000 {
|
||||||
|
+ label = "factory";
|
||||||
|
+ reg = <0x180000 0x200000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@380000 {
|
||||||
|
+ label = "fip";
|
||||||
|
+ reg = <0x380000 0x200000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ partition@580000 {
|
||||||
|
+ label = "ubi";
|
||||||
|
+ reg = <0x580000 0x6c00000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&watchdog {
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/qihoo-360t7_env
|
||||||
|
@@ -0,0 +1,56 @@
|
||||||
|
+ipaddr=192.168.1.1
|
||||||
|
+serverip=192.168.1.254
|
||||||
|
+loadaddr=0x46000000
|
||||||
|
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
|
||||||
|
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
|
||||||
|
+bootconf=config-1
|
||||||
|
+bootdelay=0
|
||||||
|
+bootfile=openwrt-mediatek-filogic-qihoo_360t7-initramfs-recovery.itb
|
||||||
|
+bootfile_bl2=openwrt-mediatek-filogic-qihoo_360t7-preloader.bin
|
||||||
|
+bootfile_fip=openwrt-mediatek-filogic-qihoo_360t7-bl31-uboot.fip
|
||||||
|
+bootfile_upg=openwrt-mediatek-filogic-qihoo_360t7-squashfs-sysupgrade.itb
|
||||||
|
+bootled_pwr=green:status
|
||||||
|
+bootled_rec=red:status
|
||||||
|
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
|
||||||
|
+bootmenu_default=0
|
||||||
|
+bootmenu_delay=0
|
||||||
|
+bootmenu_title= [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
|
||||||
|
+bootmenu_0=Initialize environment.=run _firstboot
|
||||||
|
+bootmenu_0d=Run default boot command.=run boot_default
|
||||||
|
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
|
||||||
|
+bootmenu_8=Reboot.=reset
|
||||||
|
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
|
||||||
|
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
|
||||||
|
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
|
||||||
|
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
|
||||||
|
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
|
||||||
|
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
|
||||||
|
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
|
||||||
|
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||||
|
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
|
||||||
|
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
|
||||||
|
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
|
||||||
|
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
|
||||||
|
+part_default=production
|
||||||
|
+part_recovery=recovery
|
||||||
|
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
|
||||||
|
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
|
||||||
|
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
|
||||||
|
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
|
||||||
|
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
|
||||||
|
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
|
||||||
|
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
|
||||||
|
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
|
||||||
|
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
|
||||||
|
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
|
||||||
|
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
|
||||||
|
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
|
||||||
|
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
|
||||||
|
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
|
||||||
|
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title [33m$ver[0m"
|
|
@ -45,6 +45,20 @@ define U-Boot/nanopi-r2s-rk3328
|
||||||
friendlyarm_nanopi-r2s
|
friendlyarm_nanopi-r2s
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define U-Boot/orangepi-r1-plus-rk3328
|
||||||
|
$(U-Boot/rk3328/Default)
|
||||||
|
NAME:=Orange Pi R1 Plus
|
||||||
|
BUILD_DEVICES:= \
|
||||||
|
xunlong_orangepi-r1-plus
|
||||||
|
endef
|
||||||
|
|
||||||
|
define U-Boot/orangepi-r1-plus-lts-rk3328
|
||||||
|
$(U-Boot/rk3328/Default)
|
||||||
|
NAME:=Orange Pi R1 Plus LTS
|
||||||
|
BUILD_DEVICES:= \
|
||||||
|
xunlong_orangepi-r1-plus-lts
|
||||||
|
endef
|
||||||
|
|
||||||
define U-Boot/roc-cc-rk3328
|
define U-Boot/roc-cc-rk3328
|
||||||
$(U-Boot/rk3328/Default)
|
$(U-Boot/rk3328/Default)
|
||||||
NAME:=ROC-RK3328-CC
|
NAME:=ROC-RK3328-CC
|
||||||
|
@ -87,6 +101,8 @@ UBOOT_TARGETS := \
|
||||||
rockpro64-rk3399 \
|
rockpro64-rk3399 \
|
||||||
nanopi-r2c-rk3328 \
|
nanopi-r2c-rk3328 \
|
||||||
nanopi-r2s-rk3328 \
|
nanopi-r2s-rk3328 \
|
||||||
|
orangepi-r1-plus-rk3328 \
|
||||||
|
orangepi-r1-plus-lts-rk3328 \
|
||||||
roc-cc-rk3328
|
roc-cc-rk3328
|
||||||
|
|
||||||
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
|
||||||
|
|
|
@ -0,0 +1,564 @@
|
||||||
|
From ff312af37d5f263f181468639aab83f645d331f1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tianling Shen <cnsztl@gmail.com>
|
||||||
|
Date: Sat, 20 May 2023 18:50:38 +0800
|
||||||
|
Subject: [PATCH] rockchip: rk3328: Add support for Orange Pi R1 Plus
|
||||||
|
|
||||||
|
Orange Pi R1 Plus is a Rockchip RK3328 based SBC by Xunlong.
|
||||||
|
|
||||||
|
This device is similar to the NanoPi R2S, and has a 16MB
|
||||||
|
SPI NOR (mx25l12805d). The reset button is changed to
|
||||||
|
directly reset the power supply, another detail is that
|
||||||
|
both network ports have independent MAC addresses.
|
||||||
|
|
||||||
|
The device tree and description are taken from kernel v6.3-rc1.
|
||||||
|
|
||||||
|
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
|
||||||
|
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||||
|
---
|
||||||
|
arch/arm/dts/Makefile | 1 +
|
||||||
|
.../dts/rk3328-orangepi-r1-plus-u-boot.dtsi | 46 +++
|
||||||
|
arch/arm/dts/rk3328-orangepi-r1-plus.dts | 373 ++++++++++++++++++
|
||||||
|
board/rockchip/evb_rk3328/MAINTAINERS | 6 +
|
||||||
|
configs/orangepi-r1-plus-rk3328_defconfig | 114 ++++++
|
||||||
|
5 files changed, 540 insertions(+)
|
||||||
|
create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||||
|
create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus.dts
|
||||||
|
create mode 100644 configs/orangepi-r1-plus-rk3328_defconfig
|
||||||
|
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -110,6 +110,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||||||
|
rk3328-evb.dtb \
|
||||||
|
rk3328-nanopi-r2c.dtb \
|
||||||
|
rk3328-nanopi-r2s.dtb \
|
||||||
|
+ rk3328-orangepi-r1-plus.dtb \
|
||||||
|
rk3328-roc-cc.dtb \
|
||||||
|
rk3328-rock64.dtb \
|
||||||
|
rk3328-rock-pi-e.dtb
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||||
|
@@ -0,0 +1,46 @@
|
||||||
|
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
+/*
|
||||||
|
+ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
|
||||||
|
+ * (C) Copyright 2020 David Bauer
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "rk3328-u-boot.dtsi"
|
||||||
|
+#include "rk3328-sdram-ddr4-666.dtsi"
|
||||||
|
+/ {
|
||||||
|
+ chosen {
|
||||||
|
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gpio0 {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pinctrl {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&sdmmc0m1_gpio {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pcfg_pull_up_4ma {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* Need this and all the pinctrl/gpio stuff above to set pinmux */
|
||||||
|
+&vcc_sd {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gmac2io {
|
||||||
|
+ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||||
|
+ snps,reset-active-low;
|
||||||
|
+ snps,reset-delays-us = <0 10000 50000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi0 {
|
||||||
|
+ spi_flash: spiflash@0 {
|
||||||
|
+ u-boot,dm-pre-reloc;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus.dts
|
||||||
|
@@ -0,0 +1,359 @@
|
||||||
|
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||||
|
+/*
|
||||||
|
+ * Based on rk3328-nanopi-r2s.dts, which is:
|
||||||
|
+ * Copyright (c) 2020 David Bauer <mail@david-bauer.net>
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+
|
||||||
|
+#include <dt-bindings/gpio/gpio.h>
|
||||||
|
+#include <dt-bindings/leds/common.h>
|
||||||
|
+#include "rk3328.dtsi"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Xunlong Orange Pi R1 Plus";
|
||||||
|
+ compatible = "xunlong,orangepi-r1-plus", "rockchip,rk3328";
|
||||||
|
+
|
||||||
|
+ aliases {
|
||||||
|
+ mmc0 = &sdmmc;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ chosen {
|
||||||
|
+ stdout-path = "serial2:1500000n8";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ gmac_clk: gmac-clock {
|
||||||
|
+ compatible = "fixed-clock";
|
||||||
|
+ clock-frequency = <125000000>;
|
||||||
|
+ clock-output-names = "gmac_clkin";
|
||||||
|
+ #clock-cells = <0>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ compatible = "gpio-leds";
|
||||||
|
+ pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+
|
||||||
|
+ led-0 {
|
||||||
|
+ function = LED_FUNCTION_LAN;
|
||||||
|
+ color = <LED_COLOR_ID_GREEN>;
|
||||||
|
+ gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ led-1 {
|
||||||
|
+ function = LED_FUNCTION_STATUS;
|
||||||
|
+ color = <LED_COLOR_ID_RED>;
|
||||||
|
+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ linux,default-trigger = "heartbeat";
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ led-2 {
|
||||||
|
+ function = LED_FUNCTION_WAN;
|
||||||
|
+ color = <LED_COLOR_ID_GREEN>;
|
||||||
|
+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_sd: sdmmc-regulator {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>;
|
||||||
|
+ pinctrl-0 = <&sdmmc0m1_gpio>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ regulator-name = "vcc_sd";
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ vin-supply = <&vcc_io>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_sys: vcc-sys-regulator {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ regulator-name = "vcc_sys";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <5000000>;
|
||||||
|
+ regulator-max-microvolt = <5000000>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vdd_5v_lan: vdd-5v-lan-regulator {
|
||||||
|
+ compatible = "regulator-fixed";
|
||||||
|
+ enable-active-high;
|
||||||
|
+ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
|
||||||
|
+ pinctrl-0 = <&lan_vdd_pin>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ regulator-name = "vdd_5v_lan";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ vin-supply = <&vcc_sys>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu0 {
|
||||||
|
+ cpu-supply = <&vdd_arm>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu1 {
|
||||||
|
+ cpu-supply = <&vdd_arm>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu2 {
|
||||||
|
+ cpu-supply = <&vdd_arm>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&cpu3 {
|
||||||
|
+ cpu-supply = <&vdd_arm>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&display_subsystem {
|
||||||
|
+ status = "disabled";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gmac2io {
|
||||||
|
+ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>;
|
||||||
|
+ assigned-clock-parents = <&gmac_clk>, <&gmac_clk>;
|
||||||
|
+ clock_in_out = "input";
|
||||||
|
+ phy-handle = <&rtl8211e>;
|
||||||
|
+ phy-mode = "rgmii";
|
||||||
|
+ phy-supply = <&vcc_io>;
|
||||||
|
+ pinctrl-0 = <&rgmiim1_pins>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ snps,aal;
|
||||||
|
+ rx_delay = <0x18>;
|
||||||
|
+ tx_delay = <0x24>;
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ mdio {
|
||||||
|
+ compatible = "snps,dwmac-mdio";
|
||||||
|
+ #address-cells = <1>;
|
||||||
|
+ #size-cells = <0>;
|
||||||
|
+
|
||||||
|
+ rtl8211e: ethernet-phy@1 {
|
||||||
|
+ reg = <1>;
|
||||||
|
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ reset-assert-us = <10000>;
|
||||||
|
+ reset-deassert-us = <50000>;
|
||||||
|
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&i2c1 {
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ rk805: pmic@18 {
|
||||||
|
+ compatible = "rockchip,rk805";
|
||||||
|
+ reg = <0x18>;
|
||||||
|
+ interrupt-parent = <&gpio1>;
|
||||||
|
+ interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
+ #clock-cells = <1>;
|
||||||
|
+ clock-output-names = "xin32k", "rk805-clkout2";
|
||||||
|
+ gpio-controller;
|
||||||
|
+ #gpio-cells = <2>;
|
||||||
|
+ pinctrl-0 = <&pmic_int_l>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ rockchip,system-power-controller;
|
||||||
|
+ wakeup-source;
|
||||||
|
+
|
||||||
|
+ vcc1-supply = <&vcc_sys>;
|
||||||
|
+ vcc2-supply = <&vcc_sys>;
|
||||||
|
+ vcc3-supply = <&vcc_sys>;
|
||||||
|
+ vcc4-supply = <&vcc_sys>;
|
||||||
|
+ vcc5-supply = <&vcc_io>;
|
||||||
|
+ vcc6-supply = <&vcc_sys>;
|
||||||
|
+
|
||||||
|
+ regulators {
|
||||||
|
+ vdd_log: DCDC_REG1 {
|
||||||
|
+ regulator-name = "vdd_log";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <712500>;
|
||||||
|
+ regulator-max-microvolt = <1450000>;
|
||||||
|
+ regulator-ramp-delay = <12500>;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ regulator-suspend-microvolt = <1000000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vdd_arm: DCDC_REG2 {
|
||||||
|
+ regulator-name = "vdd_arm";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <712500>;
|
||||||
|
+ regulator-max-microvolt = <1450000>;
|
||||||
|
+ regulator-ramp-delay = <12500>;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ regulator-suspend-microvolt = <950000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_ddr: DCDC_REG3 {
|
||||||
|
+ regulator-name = "vcc_ddr";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_io: DCDC_REG4 {
|
||||||
|
+ regulator-name = "vcc_io";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <3300000>;
|
||||||
|
+ regulator-max-microvolt = <3300000>;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ regulator-suspend-microvolt = <3300000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc_18: LDO_REG1 {
|
||||||
|
+ regulator-name = "vcc_18";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ regulator-suspend-microvolt = <1800000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vcc18_emmc: LDO_REG2 {
|
||||||
|
+ regulator-name = "vcc18_emmc";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <1800000>;
|
||||||
|
+ regulator-max-microvolt = <1800000>;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ regulator-suspend-microvolt = <1800000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ vdd_10: LDO_REG3 {
|
||||||
|
+ regulator-name = "vdd_10";
|
||||||
|
+ regulator-always-on;
|
||||||
|
+ regulator-boot-on;
|
||||||
|
+ regulator-min-microvolt = <1000000>;
|
||||||
|
+ regulator-max-microvolt = <1000000>;
|
||||||
|
+
|
||||||
|
+ regulator-state-mem {
|
||||||
|
+ regulator-on-in-suspend;
|
||||||
|
+ regulator-suspend-microvolt = <1000000>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&io_domains {
|
||||||
|
+ pmuio-supply = <&vcc_io>;
|
||||||
|
+ vccio1-supply = <&vcc_io>;
|
||||||
|
+ vccio2-supply = <&vcc18_emmc>;
|
||||||
|
+ vccio3-supply = <&vcc_io>;
|
||||||
|
+ vccio4-supply = <&vcc_io>;
|
||||||
|
+ vccio5-supply = <&vcc_io>;
|
||||||
|
+ vccio6-supply = <&vcc_io>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pinctrl {
|
||||||
|
+ gmac2io {
|
||||||
|
+ eth_phy_reset_pin: eth-phy-reset-pin {
|
||||||
|
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ leds {
|
||||||
|
+ lan_led_pin: lan-led-pin {
|
||||||
|
+ rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ sys_led_pin: sys-led-pin {
|
||||||
|
+ rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ wan_led_pin: wan-led-pin {
|
||||||
|
+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ lan {
|
||||||
|
+ lan_vdd_pin: lan-vdd-pin {
|
||||||
|
+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ pmic {
|
||||||
|
+ pmic_int_l: pmic-int-l {
|
||||||
|
+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pwm2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&sdmmc {
|
||||||
|
+ bus-width = <4>;
|
||||||
|
+ cap-sd-highspeed;
|
||||||
|
+ disable-wp;
|
||||||
|
+ pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ vmmc-supply = <&vcc_sd>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi0 {
|
||||||
|
+ status = "okay";
|
||||||
|
+
|
||||||
|
+ flash@0 {
|
||||||
|
+ compatible = "jedec,spi-nor";
|
||||||
|
+ reg = <0>;
|
||||||
|
+ spi-max-frequency = <50000000>;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&tsadc {
|
||||||
|
+ rockchip,hw-tshut-mode = <0>;
|
||||||
|
+ rockchip,hw-tshut-polarity = <0>;
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&u2phy {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&u2phy_host {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&u2phy_otg {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&uart2 {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usb20_otg {
|
||||||
|
+ dr_mode = "host";
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usb_host0_ehci {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&usb_host0_ohci {
|
||||||
|
+ status = "okay";
|
||||||
|
+};
|
||||||
|
--- a/board/rockchip/evb_rk3328/MAINTAINERS
|
||||||
|
+++ b/board/rockchip/evb_rk3328/MAINTAINERS
|
||||||
|
@@ -18,6 +18,12 @@ F: configs/nanopi-r2s-rk3328_defcon
|
||||||
|
F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi
|
||||||
|
F: arch/arm/dts/rk3328-nanopi-r2s.dts
|
||||||
|
|
||||||
|
+ORANGEPI-R1-PLUS-RK3328
|
||||||
|
+M: Tianling Shen <cnsztl@gmail.com>
|
||||||
|
+S: Maintained
|
||||||
|
+F: configs/orangepi-r1-plus-rk3328_defconfig
|
||||||
|
+F: arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||||
|
+
|
||||||
|
ROC-RK3328-CC
|
||||||
|
M: Loic Devulder <ldevulder@suse.com>
|
||||||
|
M: Chen-Yu Tsai <wens@csie.org>
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/orangepi-r1-plus-rk3328_defconfig
|
||||||
|
@@ -0,0 +1,98 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_ROCKCHIP=y
|
||||||
|
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||||
|
+CONFIG_SPL_GPIO_SUPPORT=y
|
||||||
|
+CONFIG_ENV_OFFSET=0x3F8000
|
||||||
|
+CONFIG_ROCKCHIP_RK3328=y
|
||||||
|
+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
|
||||||
|
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
|
||||||
|
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
|
||||||
|
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||||
|
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||||
|
+CONFIG_NR_DRAM_BANKS=1
|
||||||
|
+CONFIG_DEBUG_UART_BASE=0xFF130000
|
||||||
|
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
|
+CONFIG_SYSINFO=y
|
||||||
|
+CONFIG_DEBUG_UART=y
|
||||||
|
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
|
||||||
|
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||||
|
+CONFIG_FIT=y
|
||||||
|
+CONFIG_FIT_VERBOSE=y
|
||||||
|
+CONFIG_SPL_LOAD_FIT=y
|
||||||
|
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus.dtb"
|
||||||
|
+CONFIG_MISC_INIT_R=y
|
||||||
|
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||||
|
+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
|
||||||
|
+CONFIG_SPL_STACK_R=y
|
||||||
|
+CONFIG_SPL_I2C_SUPPORT=y
|
||||||
|
+CONFIG_SPL_POWER_SUPPORT=y
|
||||||
|
+CONFIG_SPL_ATF=y
|
||||||
|
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||||
|
+CONFIG_CMD_BOOTZ=y
|
||||||
|
+CONFIG_CMD_GPT=y
|
||||||
|
+CONFIG_CMD_MMC=y
|
||||||
|
+CONFIG_CMD_USB=y
|
||||||
|
+# CONFIG_CMD_SETEXPR is not set
|
||||||
|
+CONFIG_CMD_TIME=y
|
||||||
|
+CONFIG_SPL_OF_CONTROL=y
|
||||||
|
+CONFIG_TPL_OF_CONTROL=y
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus"
|
||||||
|
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||||
|
+CONFIG_TPL_OF_PLATDATA=y
|
||||||
|
+CONFIG_ENV_IS_IN_MMC=y
|
||||||
|
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||||
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||||
|
+CONFIG_TPL_DM=y
|
||||||
|
+CONFIG_REGMAP=y
|
||||||
|
+CONFIG_SPL_REGMAP=y
|
||||||
|
+CONFIG_TPL_REGMAP=y
|
||||||
|
+CONFIG_SYSCON=y
|
||||||
|
+CONFIG_SPL_SYSCON=y
|
||||||
|
+CONFIG_TPL_SYSCON=y
|
||||||
|
+CONFIG_CLK=y
|
||||||
|
+CONFIG_SPL_CLK=y
|
||||||
|
+CONFIG_FASTBOOT_BUF_ADDR=0x800800
|
||||||
|
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||||
|
+CONFIG_ROCKCHIP_GPIO=y
|
||||||
|
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||||
|
+CONFIG_MMC_DW=y
|
||||||
|
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||||
|
+CONFIG_SF_DEFAULT_SPEED=20000000
|
||||||
|
+CONFIG_DM_ETH=y
|
||||||
|
+CONFIG_ETH_DESIGNWARE=y
|
||||||
|
+CONFIG_GMAC_ROCKCHIP=y
|
||||||
|
+CONFIG_PINCTRL=y
|
||||||
|
+CONFIG_SPL_PINCTRL=y
|
||||||
|
+CONFIG_DM_PMIC=y
|
||||||
|
+CONFIG_PMIC_RK8XX=y
|
||||||
|
+CONFIG_SPL_DM_REGULATOR=y
|
||||||
|
+CONFIG_REGULATOR_PWM=y
|
||||||
|
+CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_REGULATOR_RK8XX=y
|
||||||
|
+CONFIG_PWM_ROCKCHIP=y
|
||||||
|
+CONFIG_RAM=y
|
||||||
|
+CONFIG_SPL_RAM=y
|
||||||
|
+CONFIG_TPL_RAM=y
|
||||||
|
+CONFIG_DM_RESET=y
|
||||||
|
+CONFIG_BAUDRATE=1500000
|
||||||
|
+CONFIG_DEBUG_UART_SHIFT=2
|
||||||
|
+CONFIG_SYSRESET=y
|
||||||
|
+# CONFIG_TPL_SYSRESET is not set
|
||||||
|
+CONFIG_USB=y
|
||||||
|
+CONFIG_USB_XHCI_HCD=y
|
||||||
|
+CONFIG_USB_XHCI_DWC3=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_USB_EHCI_GENERIC=y
|
||||||
|
+CONFIG_USB_OHCI_HCD=y
|
||||||
|
+CONFIG_USB_OHCI_GENERIC=y
|
||||||
|
+CONFIG_USB_DWC2=y
|
||||||
|
+CONFIG_USB_DWC3=y
|
||||||
|
+# CONFIG_USB_DWC3_GADGET is not set
|
||||||
|
+CONFIG_USB_GADGET=y
|
||||||
|
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||||
|
+CONFIG_SPL_TINY_MEMSET=y
|
||||||
|
+CONFIG_TPL_TINY_MEMSET=y
|
||||||
|
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,242 @@
|
||||||
|
From 7a9326a96098bc63d2b60538f657c3a533415276 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tianling Shen <cnsztl@gmail.com>
|
||||||
|
Date: Sat, 20 May 2023 18:52:14 +0800
|
||||||
|
Subject: [PATCH] rockchip: rk3328: Add support for Orange Pi R1 Plus LTS
|
||||||
|
|
||||||
|
The OrangePi R1 Plus LTS is a minor variant of OrangePi R1 Plus with
|
||||||
|
the on-board NIC chip changed from rtl8211e to yt8531c, and RAM type
|
||||||
|
changed from DDR4 to LPDDR3.
|
||||||
|
|
||||||
|
The device tree is taken from kernel v6.4-rc1.
|
||||||
|
|
||||||
|
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
arch/arm/dts/Makefile | 1 +
|
||||||
|
.../rk3328-orangepi-r1-plus-lts-u-boot.dtsi | 46 +++++++
|
||||||
|
arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts | 40 ++++++
|
||||||
|
board/rockchip/evb_rk3328/MAINTAINERS | 6 +
|
||||||
|
configs/orangepi-r1-plus-lts-rk3328_defconfig | 114 ++++++++++++++++++
|
||||||
|
5 files changed, 207 insertions(+)
|
||||||
|
create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
|
||||||
|
create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts
|
||||||
|
create mode 100644 configs/orangepi-r1-plus-lts-rk3328_defconfig
|
||||||
|
|
||||||
|
--- a/arch/arm/dts/Makefile
|
||||||
|
+++ b/arch/arm/dts/Makefile
|
||||||
|
@@ -111,6 +111,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3328) += \
|
||||||
|
rk3328-nanopi-r2c.dtb \
|
||||||
|
rk3328-nanopi-r2s.dtb \
|
||||||
|
rk3328-orangepi-r1-plus.dtb \
|
||||||
|
+ rk3328-orangepi-r1-plus-lts.dtb \
|
||||||
|
rk3328-roc-cc.dtb \
|
||||||
|
rk3328-rock64.dtb \
|
||||||
|
rk3328-rock-pi-e.dtb
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
|
||||||
|
@@ -0,0 +1,46 @@
|
||||||
|
+// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
+/*
|
||||||
|
+ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd
|
||||||
|
+ * (C) Copyright 2020 David Bauer
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "rk3328-u-boot.dtsi"
|
||||||
|
+#include "rk3328-sdram-lpddr3-666.dtsi"
|
||||||
|
+/ {
|
||||||
|
+ chosen {
|
||||||
|
+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gpio0 {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pinctrl {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&sdmmc0m1_gpio {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&pcfg_pull_up_4ma {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* Need this and all the pinctrl/gpio stuff above to set pinmux */
|
||||||
|
+&vcc_sd {
|
||||||
|
+ u-boot,dm-spl;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gmac2io {
|
||||||
|
+ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||||
|
+ snps,reset-active-low;
|
||||||
|
+ snps,reset-delays-us = <0 10000 50000>;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&spi0 {
|
||||||
|
+ spi_flash: spiflash@0 {
|
||||||
|
+ u-boot,dm-pre-reloc;
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts
|
||||||
|
@@ -0,0 +1,40 @@
|
||||||
|
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2016 Xunlong Software. Co., Ltd.
|
||||||
|
+ * (http://www.orangepi.org)
|
||||||
|
+ *
|
||||||
|
+ * Copyright (c) 2021-2023 Tianling Shen <cnsztl@gmail.com>
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/dts-v1/;
|
||||||
|
+#include "rk3328-orangepi-r1-plus.dts"
|
||||||
|
+
|
||||||
|
+/ {
|
||||||
|
+ model = "Xunlong Orange Pi R1 Plus LTS";
|
||||||
|
+ compatible = "xunlong,orangepi-r1-plus-lts", "rockchip,rk3328";
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+&gmac2io {
|
||||||
|
+ phy-handle = <&yt8531c>;
|
||||||
|
+ tx_delay = <0x19>;
|
||||||
|
+ rx_delay = <0x05>;
|
||||||
|
+
|
||||||
|
+ mdio {
|
||||||
|
+ /delete-node/ ethernet-phy@1;
|
||||||
|
+
|
||||||
|
+ yt8531c: ethernet-phy@0 {
|
||||||
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
|
+ reg = <0>;
|
||||||
|
+
|
||||||
|
+ motorcomm,clk-out-frequency-hz = <125000000>;
|
||||||
|
+ motorcomm,keep-pll-enabled;
|
||||||
|
+ motorcomm,auto-sleep-disabled;
|
||||||
|
+
|
||||||
|
+ pinctrl-0 = <ð_phy_reset_pin>;
|
||||||
|
+ pinctrl-names = "default";
|
||||||
|
+ reset-assert-us = <15000>;
|
||||||
|
+ reset-deassert-us = <50000>;
|
||||||
|
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
|
||||||
|
+ };
|
||||||
|
+ };
|
||||||
|
+};
|
||||||
|
--- a/board/rockchip/evb_rk3328/MAINTAINERS
|
||||||
|
+++ b/board/rockchip/evb_rk3328/MAINTAINERS
|
||||||
|
@@ -24,6 +24,12 @@ S: Maintained
|
||||||
|
F: configs/orangepi-r1-plus-rk3328_defconfig
|
||||||
|
F: arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi
|
||||||
|
|
||||||
|
+ORANGEPI-R1-PLUS-LTS-RK3328
|
||||||
|
+M: Tianling Shen <cnsztl@gmail.com>
|
||||||
|
+S: Maintained
|
||||||
|
+F: configs/orangepi-r1-plus-lts-rk3328_defconfig
|
||||||
|
+F: arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi
|
||||||
|
+
|
||||||
|
ROC-RK3328-CC
|
||||||
|
M: Loic Devulder <ldevulder@suse.com>
|
||||||
|
M: Chen-Yu Tsai <wens@csie.org>
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/configs/orangepi-r1-plus-lts-rk3328_defconfig
|
||||||
|
@@ -0,0 +1,98 @@
|
||||||
|
+CONFIG_ARM=y
|
||||||
|
+CONFIG_ARCH_ROCKCHIP=y
|
||||||
|
+CONFIG_SYS_TEXT_BASE=0x00200000
|
||||||
|
+CONFIG_SPL_GPIO_SUPPORT=y
|
||||||
|
+CONFIG_ENV_OFFSET=0x3F8000
|
||||||
|
+CONFIG_ROCKCHIP_RK3328=y
|
||||||
|
+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
|
||||||
|
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
|
||||||
|
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
|
||||||
|
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
|
||||||
|
+CONFIG_SPL_STACK_R_ADDR=0x600000
|
||||||
|
+CONFIG_NR_DRAM_BANKS=1
|
||||||
|
+CONFIG_DEBUG_UART_BASE=0xFF130000
|
||||||
|
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
|
+CONFIG_SYSINFO=y
|
||||||
|
+CONFIG_DEBUG_UART=y
|
||||||
|
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
|
||||||
|
+# CONFIG_ANDROID_BOOT_IMAGE is not set
|
||||||
|
+CONFIG_FIT=y
|
||||||
|
+CONFIG_FIT_VERBOSE=y
|
||||||
|
+CONFIG_SPL_LOAD_FIT=y
|
||||||
|
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus-lts.dtb"
|
||||||
|
+CONFIG_MISC_INIT_R=y
|
||||||
|
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
|
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||||
|
+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
|
||||||
|
+CONFIG_SPL_STACK_R=y
|
||||||
|
+CONFIG_SPL_I2C_SUPPORT=y
|
||||||
|
+CONFIG_SPL_POWER_SUPPORT=y
|
||||||
|
+CONFIG_SPL_ATF=y
|
||||||
|
+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
|
||||||
|
+CONFIG_CMD_BOOTZ=y
|
||||||
|
+CONFIG_CMD_GPT=y
|
||||||
|
+CONFIG_CMD_MMC=y
|
||||||
|
+CONFIG_CMD_USB=y
|
||||||
|
+# CONFIG_CMD_SETEXPR is not set
|
||||||
|
+CONFIG_CMD_TIME=y
|
||||||
|
+CONFIG_SPL_OF_CONTROL=y
|
||||||
|
+CONFIG_TPL_OF_CONTROL=y
|
||||||
|
+CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus-lts"
|
||||||
|
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||||
|
+CONFIG_TPL_OF_PLATDATA=y
|
||||||
|
+CONFIG_ENV_IS_IN_MMC=y
|
||||||
|
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||||
|
+CONFIG_NET_RANDOM_ETHADDR=y
|
||||||
|
+CONFIG_TPL_DM=y
|
||||||
|
+CONFIG_REGMAP=y
|
||||||
|
+CONFIG_SPL_REGMAP=y
|
||||||
|
+CONFIG_TPL_REGMAP=y
|
||||||
|
+CONFIG_SYSCON=y
|
||||||
|
+CONFIG_SPL_SYSCON=y
|
||||||
|
+CONFIG_TPL_SYSCON=y
|
||||||
|
+CONFIG_CLK=y
|
||||||
|
+CONFIG_SPL_CLK=y
|
||||||
|
+CONFIG_FASTBOOT_BUF_ADDR=0x800800
|
||||||
|
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
|
||||||
|
+CONFIG_ROCKCHIP_GPIO=y
|
||||||
|
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||||
|
+CONFIG_MMC_DW=y
|
||||||
|
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||||
|
+CONFIG_SF_DEFAULT_SPEED=20000000
|
||||||
|
+CONFIG_DM_ETH=y
|
||||||
|
+CONFIG_ETH_DESIGNWARE=y
|
||||||
|
+CONFIG_GMAC_ROCKCHIP=y
|
||||||
|
+CONFIG_PINCTRL=y
|
||||||
|
+CONFIG_SPL_PINCTRL=y
|
||||||
|
+CONFIG_DM_PMIC=y
|
||||||
|
+CONFIG_PMIC_RK8XX=y
|
||||||
|
+CONFIG_SPL_DM_REGULATOR=y
|
||||||
|
+CONFIG_REGULATOR_PWM=y
|
||||||
|
+CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_SPL_DM_REGULATOR_FIXED=y
|
||||||
|
+CONFIG_REGULATOR_RK8XX=y
|
||||||
|
+CONFIG_PWM_ROCKCHIP=y
|
||||||
|
+CONFIG_RAM=y
|
||||||
|
+CONFIG_SPL_RAM=y
|
||||||
|
+CONFIG_TPL_RAM=y
|
||||||
|
+CONFIG_DM_RESET=y
|
||||||
|
+CONFIG_BAUDRATE=1500000
|
||||||
|
+CONFIG_DEBUG_UART_SHIFT=2
|
||||||
|
+CONFIG_SYSRESET=y
|
||||||
|
+# CONFIG_TPL_SYSRESET is not set
|
||||||
|
+CONFIG_USB=y
|
||||||
|
+CONFIG_USB_XHCI_HCD=y
|
||||||
|
+CONFIG_USB_XHCI_DWC3=y
|
||||||
|
+CONFIG_USB_EHCI_HCD=y
|
||||||
|
+CONFIG_USB_EHCI_GENERIC=y
|
||||||
|
+CONFIG_USB_OHCI_HCD=y
|
||||||
|
+CONFIG_USB_OHCI_GENERIC=y
|
||||||
|
+CONFIG_USB_DWC2=y
|
||||||
|
+CONFIG_USB_DWC3=y
|
||||||
|
+# CONFIG_USB_DWC3_GADGET is not set
|
||||||
|
+CONFIG_USB_GADGET=y
|
||||||
|
+CONFIG_USB_GADGET_DWC2_OTG=y
|
||||||
|
+CONFIG_SPL_TINY_MEMSET=y
|
||||||
|
+CONFIG_TPL_TINY_MEMSET=y
|
||||||
|
+CONFIG_ERRNO_STR=y
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* DO NOT MODIFY
|
||||||
|
*
|
||||||
|
* Declares externs for all device/uclass instances.
|
||||||
|
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dm/device-internal.h>
|
||||||
|
#include <dm/uclass-internal.h>
|
||||||
|
|
||||||
|
/* driver declarations - these allow DM_DRIVER_GET() to be used */
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_cru);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_dmc);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc);
|
||||||
|
extern U_BOOT_DRIVER(ns16550_serial);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_spi);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_grf);
|
||||||
|
|
||||||
|
/* uclass driver declarations - needed for DM_UCLASS_DRIVER_REF() */
|
||||||
|
extern UCLASS_DRIVER(clk);
|
||||||
|
extern UCLASS_DRIVER(mmc);
|
||||||
|
extern UCLASS_DRIVER(ram);
|
||||||
|
extern UCLASS_DRIVER(serial);
|
||||||
|
extern UCLASS_DRIVER(syscon);
|
|
@ -0,0 +1,170 @@
|
||||||
|
/*
|
||||||
|
* DO NOT MODIFY
|
||||||
|
*
|
||||||
|
* Declares the U_BOOT_DRIVER() records and platform data.
|
||||||
|
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Allow use of U_BOOT_DRVINFO() in this file */
|
||||||
|
#define DT_PLAT_C
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
#include <dm.h>
|
||||||
|
#include <dt-structs.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* driver_info declarations, ordered by 'struct driver_info' linker_list idx:
|
||||||
|
*
|
||||||
|
* idx driver_info driver
|
||||||
|
* --- -------------------- --------------------
|
||||||
|
* 0: clock_controller_at_ff440000 rockchip_rk3328_cru
|
||||||
|
* 1: dmc rockchip_rk3328_dmc
|
||||||
|
* 2: mmc_at_ff500000 rockchip_rk3288_dw_mshc
|
||||||
|
* 3: serial_at_ff130000 ns16550_serial
|
||||||
|
* 4: spi_at_ff190000 rockchip_rk3328_spi
|
||||||
|
* 5: syscon_at_ff100000 rockchip_rk3328_grf
|
||||||
|
* --- -------------------- --------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /clock-controller@ff440000 index 0
|
||||||
|
* driver rockchip_rk3328_cru parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = {
|
||||||
|
.reg = {0xff440000, 0x1000},
|
||||||
|
.rockchip_grf = 0x38,
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(clock_controller_at_ff440000) = {
|
||||||
|
.name = "rockchip_rk3328_cru",
|
||||||
|
.plat = &dtv_clock_controller_at_ff440000,
|
||||||
|
.plat_size = sizeof(dtv_clock_controller_at_ff440000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /dmc index 1
|
||||||
|
* driver rockchip_rk3328_dmc parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3328_dmc dtv_dmc = {
|
||||||
|
.reg = {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000,
|
||||||
|
0xff720000, 0x1000, 0xff798000, 0x1000},
|
||||||
|
.rockchip_sdram_params = {0x1, 0xc, 0x3, 0x1, 0x0, 0x0, 0x10, 0x10,
|
||||||
|
0x10, 0x10, 0x0, 0x8c48a18a, 0x0, 0x21, 0x482, 0x15,
|
||||||
|
0x21a, 0xff, 0x14d, 0x6, 0x1, 0x0, 0x0, 0x0,
|
||||||
|
0x43041008, 0x64, 0x140023, 0xd0, 0x220002, 0xd4, 0x10000, 0xd8,
|
||||||
|
0x703, 0xdc, 0x830004, 0xe0, 0x10000, 0xe4, 0x70003, 0xf4,
|
||||||
|
0xf011f, 0x100, 0x6090b07, 0x104, 0x2020b, 0x108, 0x2030506, 0x10c,
|
||||||
|
0x505000, 0x110, 0x3020204, 0x114, 0x1010303, 0x118, 0x2020003, 0x120,
|
||||||
|
0x303, 0x138, 0x25, 0x180, 0x3c000f, 0x184, 0x900000, 0x190,
|
||||||
|
0x7020000, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240, 0x900090c, 0x244,
|
||||||
|
0x101, 0x250, 0xf00, 0x490, 0x1, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||||
|
0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xb, 0x28, 0x6, 0x2c,
|
||||||
|
0x0, 0x30, 0x3, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79,
|
||||||
|
0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87,
|
||||||
|
0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78,
|
||||||
|
0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77,
|
||||||
|
0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||||
|
0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||||
|
0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77,
|
||||||
|
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9,
|
||||||
|
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||||
|
0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||||
|
0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78,
|
||||||
|
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69,
|
||||||
|
0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77,
|
||||||
|
0x77, 0x77, 0x79, 0x9},
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(dmc) = {
|
||||||
|
.name = "rockchip_rk3328_dmc",
|
||||||
|
.plat = &dtv_dmc,
|
||||||
|
.plat_size = sizeof(dtv_dmc),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /mmc@ff500000 index 2
|
||||||
|
* driver rockchip_rk3288_dw_mshc parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff500000 = {
|
||||||
|
.bus_width = 0x4,
|
||||||
|
.cap_sd_highspeed = true,
|
||||||
|
.clocks = {
|
||||||
|
{0, {317}},
|
||||||
|
{0, {33}},
|
||||||
|
{0, {74}},
|
||||||
|
{0, {78}},},
|
||||||
|
.disable_wp = true,
|
||||||
|
.fifo_depth = 0x100,
|
||||||
|
.interrupts = {0x0, 0xc, 0x4},
|
||||||
|
.max_frequency = 0x8f0d180,
|
||||||
|
.pinctrl_0 = {0x45, 0x46, 0x47, 0x48},
|
||||||
|
.pinctrl_names = "default",
|
||||||
|
.reg = {0xff500000, 0x4000},
|
||||||
|
.u_boot_spl_fifo_mode = true,
|
||||||
|
.vmmc_supply = 0x49,
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(mmc_at_ff500000) = {
|
||||||
|
.name = "rockchip_rk3288_dw_mshc",
|
||||||
|
.plat = &dtv_mmc_at_ff500000,
|
||||||
|
.plat_size = sizeof(dtv_mmc_at_ff500000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /serial@ff130000 index 3
|
||||||
|
* driver ns16550_serial parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_ns16550_serial dtv_serial_at_ff130000 = {
|
||||||
|
.clock_frequency = 0x16e3600,
|
||||||
|
.clocks = {
|
||||||
|
{0, {40}},
|
||||||
|
{0, {212}},},
|
||||||
|
.dma_names = {"tx", "rx"},
|
||||||
|
.dmas = {0x10, 0x6, 0x10, 0x7},
|
||||||
|
.interrupts = {0x0, 0x39, 0x4},
|
||||||
|
.pinctrl_0 = 0x24,
|
||||||
|
.pinctrl_names = "default",
|
||||||
|
.reg = {0xff130000, 0x100},
|
||||||
|
.reg_io_width = 0x4,
|
||||||
|
.reg_shift = 0x2,
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(serial_at_ff130000) = {
|
||||||
|
.name = "ns16550_serial",
|
||||||
|
.plat = &dtv_serial_at_ff130000,
|
||||||
|
.plat_size = sizeof(dtv_serial_at_ff130000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Node /spi@ff190000 index 4 */
|
||||||
|
static struct dtd_rockchip_rk3328_spi dtv_spi_at_ff190000 = {
|
||||||
|
.clocks = {
|
||||||
|
{0, {32}},
|
||||||
|
{0, {209}},},
|
||||||
|
.dma_names = {"tx", "rx"},
|
||||||
|
.dmas = {0x10, 0x8, 0x10, 0x9},
|
||||||
|
.interrupts = {0x0, 0x31, 0x4},
|
||||||
|
.pinctrl_0 = {0x2c, 0x2d, 0x2e, 0x2f},
|
||||||
|
.pinctrl_names = "default",
|
||||||
|
.reg = {0xff190000, 0x1000},
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(spi_at_ff190000) = {
|
||||||
|
.name = "rockchip_rk3328_spi",
|
||||||
|
.plat = &dtv_spi_at_ff190000,
|
||||||
|
.plat_size = sizeof(dtv_spi_at_ff190000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /syscon@ff100000 index 5
|
||||||
|
* driver rockchip_rk3328_grf parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = {
|
||||||
|
.reg = {0xff100000, 0x1000},
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(syscon_at_ff100000) = {
|
||||||
|
.name = "rockchip_rk3328_grf",
|
||||||
|
.plat = &dtv_syscon_at_ff100000,
|
||||||
|
.plat_size = sizeof(dtv_syscon_at_ff100000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* DO NOT MODIFY
|
||||||
|
*
|
||||||
|
* Defines the structs used to hold devicetree data.
|
||||||
|
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <linux/libfdt.h>
|
||||||
|
struct dtd_ns16550_serial {
|
||||||
|
fdt32_t clock_frequency;
|
||||||
|
struct phandle_1_arg clocks[2];
|
||||||
|
const char * dma_names[2];
|
||||||
|
fdt32_t dmas[4];
|
||||||
|
fdt32_t interrupts[3];
|
||||||
|
fdt32_t pinctrl_0;
|
||||||
|
const char * pinctrl_names;
|
||||||
|
fdt64_t reg[2];
|
||||||
|
fdt32_t reg_io_width;
|
||||||
|
fdt32_t reg_shift;
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3288_dw_mshc {
|
||||||
|
fdt32_t bus_width;
|
||||||
|
bool cap_sd_highspeed;
|
||||||
|
struct phandle_1_arg clocks[4];
|
||||||
|
bool disable_wp;
|
||||||
|
fdt32_t fifo_depth;
|
||||||
|
fdt32_t interrupts[3];
|
||||||
|
fdt32_t max_frequency;
|
||||||
|
fdt32_t pinctrl_0[4];
|
||||||
|
const char * pinctrl_names;
|
||||||
|
fdt64_t reg[2];
|
||||||
|
bool u_boot_spl_fifo_mode;
|
||||||
|
fdt32_t vmmc_supply;
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_cru {
|
||||||
|
fdt64_t reg[2];
|
||||||
|
fdt32_t rockchip_grf;
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_dmc {
|
||||||
|
fdt64_t reg[12];
|
||||||
|
fdt32_t rockchip_sdram_params[196];
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_grf {
|
||||||
|
fdt64_t reg[2];
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_spi {
|
||||||
|
struct phandle_1_arg clocks[2];
|
||||||
|
const char * dma_names[2];
|
||||||
|
fdt32_t dmas[4];
|
||||||
|
fdt32_t interrupts[3];
|
||||||
|
fdt32_t pinctrl_0[4];
|
||||||
|
const char * pinctrl_names;
|
||||||
|
fdt64_t reg[2];
|
||||||
|
};
|
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* DO NOT MODIFY
|
||||||
|
*
|
||||||
|
* Declares externs for all device/uclass instances.
|
||||||
|
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dm/device-internal.h>
|
||||||
|
#include <dm/uclass-internal.h>
|
||||||
|
|
||||||
|
/* driver declarations - these allow DM_DRIVER_GET() to be used */
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_cru);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_dmc);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3288_dw_mshc);
|
||||||
|
extern U_BOOT_DRIVER(ns16550_serial);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_spi);
|
||||||
|
extern U_BOOT_DRIVER(rockchip_rk3328_grf);
|
||||||
|
|
||||||
|
/* uclass driver declarations - needed for DM_UCLASS_DRIVER_REF() */
|
||||||
|
extern UCLASS_DRIVER(clk);
|
||||||
|
extern UCLASS_DRIVER(mmc);
|
||||||
|
extern UCLASS_DRIVER(ram);
|
||||||
|
extern UCLASS_DRIVER(serial);
|
||||||
|
extern UCLASS_DRIVER(syscon);
|
|
@ -0,0 +1,170 @@
|
||||||
|
/*
|
||||||
|
* DO NOT MODIFY
|
||||||
|
*
|
||||||
|
* Declares the U_BOOT_DRIVER() records and platform data.
|
||||||
|
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Allow use of U_BOOT_DRVINFO() in this file */
|
||||||
|
#define DT_PLAT_C
|
||||||
|
|
||||||
|
#include <common.h>
|
||||||
|
#include <dm.h>
|
||||||
|
#include <dt-structs.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* driver_info declarations, ordered by 'struct driver_info' linker_list idx:
|
||||||
|
*
|
||||||
|
* idx driver_info driver
|
||||||
|
* --- -------------------- --------------------
|
||||||
|
* 0: clock_controller_at_ff440000 rockchip_rk3328_cru
|
||||||
|
* 1: dmc rockchip_rk3328_dmc
|
||||||
|
* 2: mmc_at_ff500000 rockchip_rk3288_dw_mshc
|
||||||
|
* 3: serial_at_ff130000 ns16550_serial
|
||||||
|
* 4: spi_at_ff190000 rockchip_rk3328_spi
|
||||||
|
* 5: syscon_at_ff100000 rockchip_rk3328_grf
|
||||||
|
* --- -------------------- --------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /clock-controller@ff440000 index 0
|
||||||
|
* driver rockchip_rk3328_cru parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3328_cru dtv_clock_controller_at_ff440000 = {
|
||||||
|
.reg = {0xff440000, 0x1000},
|
||||||
|
.rockchip_grf = 0x38,
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(clock_controller_at_ff440000) = {
|
||||||
|
.name = "rockchip_rk3328_cru",
|
||||||
|
.plat = &dtv_clock_controller_at_ff440000,
|
||||||
|
.plat_size = sizeof(dtv_clock_controller_at_ff440000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /dmc index 1
|
||||||
|
* driver rockchip_rk3328_dmc parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3328_dmc dtv_dmc = {
|
||||||
|
.reg = {0xff400000, 0x1000, 0xff780000, 0x3000, 0xff100000, 0x1000, 0xff440000, 0x1000,
|
||||||
|
0xff720000, 0x1000, 0xff798000, 0x1000},
|
||||||
|
.rockchip_sdram_params = {0x1, 0xa, 0x2, 0x1, 0x0, 0x0, 0x11, 0x0,
|
||||||
|
0x11, 0x0, 0x0, 0x94291288, 0x0, 0x27, 0x462, 0x15,
|
||||||
|
0x242, 0xff, 0x14d, 0x0, 0x1, 0x0, 0x0, 0x0,
|
||||||
|
0x43049010, 0x64, 0x28003b, 0xd0, 0x20053, 0xd4, 0x220000, 0xd8,
|
||||||
|
0x100, 0xdc, 0x40000, 0xe0, 0x0, 0xe4, 0x110000, 0xe8,
|
||||||
|
0x420, 0xec, 0x400, 0xf4, 0xf011f, 0x100, 0x9060b06, 0x104,
|
||||||
|
0x20209, 0x108, 0x505040a, 0x10c, 0x40400c, 0x110, 0x5030206, 0x114,
|
||||||
|
0x3030202, 0x120, 0x3030b03, 0x124, 0x20208, 0x180, 0x1000040, 0x184,
|
||||||
|
0x0, 0x190, 0x7030003, 0x198, 0x5001100, 0x1a0, 0xc0400003, 0x240,
|
||||||
|
0x6000604, 0x244, 0x201, 0x250, 0xf00, 0x490, 0x1, 0xffffffff,
|
||||||
|
0xffffffff, 0xffffffff, 0xffffffff, 0x4, 0xc, 0x28, 0xa, 0x2c,
|
||||||
|
0x0, 0x30, 0x9, 0xffffffff, 0xffffffff, 0x77, 0x88, 0x79,
|
||||||
|
0x79, 0x87, 0x97, 0x87, 0x78, 0x77, 0x78, 0x87,
|
||||||
|
0x88, 0x87, 0x87, 0x77, 0x78, 0x78, 0x78, 0x78,
|
||||||
|
0x78, 0x78, 0x78, 0x78, 0x78, 0x69, 0x9, 0x77,
|
||||||
|
0x78, 0x77, 0x78, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||||
|
0x79, 0x9, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||||
|
0x78, 0x78, 0x78, 0x69, 0x9, 0x77, 0x78, 0x77,
|
||||||
|
0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x79, 0x9,
|
||||||
|
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
|
||||||
|
0x78, 0x69, 0x9, 0x77, 0x78, 0x77, 0x78, 0x77,
|
||||||
|
0x78, 0x77, 0x78, 0x77, 0x79, 0x9, 0x78, 0x78,
|
||||||
|
0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x69,
|
||||||
|
0x9, 0x77, 0x78, 0x77, 0x77, 0x77, 0x77, 0x77,
|
||||||
|
0x77, 0x77, 0x79, 0x9},
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(dmc) = {
|
||||||
|
.name = "rockchip_rk3328_dmc",
|
||||||
|
.plat = &dtv_dmc,
|
||||||
|
.plat_size = sizeof(dtv_dmc),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /mmc@ff500000 index 2
|
||||||
|
* driver rockchip_rk3288_dw_mshc parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3288_dw_mshc dtv_mmc_at_ff500000 = {
|
||||||
|
.bus_width = 0x4,
|
||||||
|
.cap_sd_highspeed = true,
|
||||||
|
.clocks = {
|
||||||
|
{0, {317}},
|
||||||
|
{0, {33}},
|
||||||
|
{0, {74}},
|
||||||
|
{0, {78}},},
|
||||||
|
.disable_wp = true,
|
||||||
|
.fifo_depth = 0x100,
|
||||||
|
.interrupts = {0x0, 0xc, 0x4},
|
||||||
|
.max_frequency = 0x8f0d180,
|
||||||
|
.pinctrl_0 = {0x45, 0x46, 0x47, 0x48},
|
||||||
|
.pinctrl_names = "default",
|
||||||
|
.reg = {0xff500000, 0x4000},
|
||||||
|
.u_boot_spl_fifo_mode = true,
|
||||||
|
.vmmc_supply = 0x49,
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(mmc_at_ff500000) = {
|
||||||
|
.name = "rockchip_rk3288_dw_mshc",
|
||||||
|
.plat = &dtv_mmc_at_ff500000,
|
||||||
|
.plat_size = sizeof(dtv_mmc_at_ff500000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /serial@ff130000 index 3
|
||||||
|
* driver ns16550_serial parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_ns16550_serial dtv_serial_at_ff130000 = {
|
||||||
|
.clock_frequency = 0x16e3600,
|
||||||
|
.clocks = {
|
||||||
|
{0, {40}},
|
||||||
|
{0, {212}},},
|
||||||
|
.dma_names = {"tx", "rx"},
|
||||||
|
.dmas = {0x10, 0x6, 0x10, 0x7},
|
||||||
|
.interrupts = {0x0, 0x39, 0x4},
|
||||||
|
.pinctrl_0 = 0x24,
|
||||||
|
.pinctrl_names = "default",
|
||||||
|
.reg = {0xff130000, 0x100},
|
||||||
|
.reg_io_width = 0x4,
|
||||||
|
.reg_shift = 0x2,
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(serial_at_ff130000) = {
|
||||||
|
.name = "ns16550_serial",
|
||||||
|
.plat = &dtv_serial_at_ff130000,
|
||||||
|
.plat_size = sizeof(dtv_serial_at_ff130000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Node /spi@ff190000 index 4 */
|
||||||
|
static struct dtd_rockchip_rk3328_spi dtv_spi_at_ff190000 = {
|
||||||
|
.clocks = {
|
||||||
|
{0, {32}},
|
||||||
|
{0, {209}},},
|
||||||
|
.dma_names = {"tx", "rx"},
|
||||||
|
.dmas = {0x10, 0x8, 0x10, 0x9},
|
||||||
|
.interrupts = {0x0, 0x31, 0x4},
|
||||||
|
.pinctrl_0 = {0x2c, 0x2d, 0x2e, 0x2f},
|
||||||
|
.pinctrl_names = "default",
|
||||||
|
.reg = {0xff190000, 0x1000},
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(spi_at_ff190000) = {
|
||||||
|
.name = "rockchip_rk3328_spi",
|
||||||
|
.plat = &dtv_spi_at_ff190000,
|
||||||
|
.plat_size = sizeof(dtv_spi_at_ff190000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Node /syscon@ff100000 index 5
|
||||||
|
* driver rockchip_rk3328_grf parent None
|
||||||
|
*/
|
||||||
|
static struct dtd_rockchip_rk3328_grf dtv_syscon_at_ff100000 = {
|
||||||
|
.reg = {0xff100000, 0x1000},
|
||||||
|
};
|
||||||
|
U_BOOT_DRVINFO(syscon_at_ff100000) = {
|
||||||
|
.name = "rockchip_rk3328_grf",
|
||||||
|
.plat = &dtv_syscon_at_ff100000,
|
||||||
|
.plat_size = sizeof(dtv_syscon_at_ff100000),
|
||||||
|
.parent_idx = -1,
|
||||||
|
};
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* DO NOT MODIFY
|
||||||
|
*
|
||||||
|
* Defines the structs used to hold devicetree data.
|
||||||
|
* This was generated by dtoc from a .dtb (device tree binary) file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <linux/libfdt.h>
|
||||||
|
struct dtd_ns16550_serial {
|
||||||
|
fdt32_t clock_frequency;
|
||||||
|
struct phandle_1_arg clocks[2];
|
||||||
|
const char * dma_names[2];
|
||||||
|
fdt32_t dmas[4];
|
||||||
|
fdt32_t interrupts[3];
|
||||||
|
fdt32_t pinctrl_0;
|
||||||
|
const char * pinctrl_names;
|
||||||
|
fdt64_t reg[2];
|
||||||
|
fdt32_t reg_io_width;
|
||||||
|
fdt32_t reg_shift;
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3288_dw_mshc {
|
||||||
|
fdt32_t bus_width;
|
||||||
|
bool cap_sd_highspeed;
|
||||||
|
struct phandle_1_arg clocks[4];
|
||||||
|
bool disable_wp;
|
||||||
|
fdt32_t fifo_depth;
|
||||||
|
fdt32_t interrupts[3];
|
||||||
|
fdt32_t max_frequency;
|
||||||
|
fdt32_t pinctrl_0[4];
|
||||||
|
const char * pinctrl_names;
|
||||||
|
fdt64_t reg[2];
|
||||||
|
bool u_boot_spl_fifo_mode;
|
||||||
|
fdt32_t vmmc_supply;
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_cru {
|
||||||
|
fdt64_t reg[2];
|
||||||
|
fdt32_t rockchip_grf;
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_dmc {
|
||||||
|
fdt64_t reg[12];
|
||||||
|
fdt32_t rockchip_sdram_params[196];
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_grf {
|
||||||
|
fdt64_t reg[2];
|
||||||
|
};
|
||||||
|
struct dtd_rockchip_rk3328_spi {
|
||||||
|
struct phandle_1_arg clocks[2];
|
||||||
|
const char * dma_names[2];
|
||||||
|
fdt32_t dmas[4];
|
||||||
|
fdt32_t interrupts[3];
|
||||||
|
fdt32_t pinctrl_0[4];
|
||||||
|
const char * pinctrl_names;
|
||||||
|
fdt64_t reg[2];
|
||||||
|
};
|
63
package/boot/uboot-sifiveu/Makefile
Normal file
63
package/boot/uboot-sifiveu/Makefile
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
#
|
||||||
|
# Copyright (C) 2022 OpenWrt.org
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_VERSION:=2022.10
|
||||||
|
PKG_HASH:=50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/u-boot.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define U-Boot/Default
|
||||||
|
BUILD_TARGET:=sifiveu
|
||||||
|
BUILD_DEVICES=$(1)
|
||||||
|
UBOOT_IMAGE:=u-boot.itb
|
||||||
|
DTS_DIR:=arch/riscv/dts
|
||||||
|
UENV:=default
|
||||||
|
DEFAULT:=y
|
||||||
|
endef
|
||||||
|
|
||||||
|
define U-Boot/sifive_unleashed
|
||||||
|
NAME:=SiFive Unleashed
|
||||||
|
OPENSBI:=generic
|
||||||
|
DEPENDS:=+opensbi_generic
|
||||||
|
UBOOT_DTS:=hifive-unleashed-a00.dtb
|
||||||
|
BUILD_DEVICES:=sifive_unleashed
|
||||||
|
endef
|
||||||
|
|
||||||
|
define U-Boot/sifive_unmatched
|
||||||
|
NAME:=SiFive Unmatched
|
||||||
|
OPENSBI:=generic
|
||||||
|
DEPENDS:=+opensbi_generic
|
||||||
|
UBOOT_DTS:=hifive-unmatched-a00.dtb
|
||||||
|
BUILD_DEVICES:=sifive_unmatched
|
||||||
|
endef
|
||||||
|
|
||||||
|
UBOOT_TARGETS := \
|
||||||
|
sifive_unleashed \
|
||||||
|
sifive_unmatched
|
||||||
|
|
||||||
|
UBOOT_MAKE_FLAGS += \
|
||||||
|
OPENSBI=$(STAGING_DIR_IMAGE)/fw_dynamic-${OPENSBI}.bin
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
$(call Build/Configure/U-Boot)
|
||||||
|
sed -i 's/CONFIG_TOOLS_LIBCRYPTO=y/# CONFIG_TOOLS_LIBCRYPTO is not set/' $(PKG_BUILD_DIR)/.config
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/spl/u-boot-spl.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)-spl
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(DTS_DIR)/$(UBOOT_DTS) $(STAGING_DIR_IMAGE)/$(UBOOT_DTS)
|
||||||
|
|
||||||
|
mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
|
||||||
|
$(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage/U-Boot))
|
|
@ -0,0 +1,104 @@
|
||||||
|
From 725595e667cc4423347c255da8ca4c5b3aa0980a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vincent Chen <vincent.chen@sifive.com>
|
||||||
|
Date: Mon, 15 Nov 2021 03:31:04 -0800
|
||||||
|
Subject: [PATCH 2/8] board: sifive: spl: Initialized the PWM setting in the
|
||||||
|
SPL stage
|
||||||
|
|
||||||
|
LEDs and multiple fans can be controlled by SPL. This patch ensures
|
||||||
|
that all fans have been enabled in the SPL stage. In addition, the
|
||||||
|
LED's color will be set to yellow.
|
||||||
|
---
|
||||||
|
board/sifive/unmatched/Makefile | 1 +
|
||||||
|
board/sifive/unmatched/pwm.c | 57 +++++++++++++++++++++++++++++++++
|
||||||
|
board/sifive/unmatched/spl.c | 2 ++
|
||||||
|
3 files changed, 60 insertions(+)
|
||||||
|
create mode 100644 board/sifive/unmatched/pwm.c
|
||||||
|
|
||||||
|
diff --git a/board/sifive/unmatched/Makefile b/board/sifive/unmatched/Makefile
|
||||||
|
index 1345330089..5df01982e9 100644
|
||||||
|
--- a/board/sifive/unmatched/Makefile
|
||||||
|
+++ b/board/sifive/unmatched/Makefile
|
||||||
|
@@ -9,3 +9,4 @@ obj-y += spl.o
|
||||||
|
else
|
||||||
|
obj-y += unmatched.o
|
||||||
|
endif
|
||||||
|
+obj-y += pwm.o
|
||||||
|
diff --git a/board/sifive/unmatched/pwm.c b/board/sifive/unmatched/pwm.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..e1cc02310a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/board/sifive/unmatched/pwm.c
|
||||||
|
@@ -0,0 +1,57 @@
|
||||||
|
+// SPDX-License-Identifier: GPL-2.0+
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) 2021, SiFive Inc
|
||||||
|
+ *
|
||||||
|
+ * Authors:
|
||||||
|
+ * Vincent Chen <vincent.chen@sifive.com>
|
||||||
|
+ * David Abdurachmanov <david.abdurachmanov@sifive.com>
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include <linux/io.h>
|
||||||
|
+#include <asm/arch/eeprom.h>
|
||||||
|
+
|
||||||
|
+struct pwm_sifive_regs {
|
||||||
|
+ unsigned int cfg; /* PWM configuration register */
|
||||||
|
+ unsigned int pad0; /* Reserved */
|
||||||
|
+ unsigned int cnt; /* PWM count register */
|
||||||
|
+ unsigned int pad1; /* Reserved */
|
||||||
|
+ unsigned int pwms; /* Scaled PWM count register */
|
||||||
|
+ unsigned int pad2; /* Reserved */
|
||||||
|
+ unsigned int pad3; /* Reserved */
|
||||||
|
+ unsigned int pad4; /* Reserved */
|
||||||
|
+ unsigned int cmp0; /* PWM 0 compare register */
|
||||||
|
+ unsigned int cmp1; /* PWM 1 compare register */
|
||||||
|
+ unsigned int cmp2; /* PWM 2 compare register */
|
||||||
|
+ unsigned int cmp3; /* PWM 3 compare register */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+#define PWM0_BASE 0x10020000
|
||||||
|
+#define PWM1_BASE 0x10021000
|
||||||
|
+#define PWM_CFG_INIT 0x1000
|
||||||
|
+#define PWM_CMP_ENABLE_VAL 0x0
|
||||||
|
+#define PWM_CMP_DISABLE_VAL 0xffff
|
||||||
|
+
|
||||||
|
+void pwm_device_init(void)
|
||||||
|
+{
|
||||||
|
+ struct pwm_sifive_regs *pwm0, *pwm1;
|
||||||
|
+ pwm0 = (struct pwm_sifive_regs *)PWM0_BASE;
|
||||||
|
+ pwm1 = (struct pwm_sifive_regs *)PWM1_BASE;
|
||||||
|
+ writel(PWM_CMP_DISABLE_VAL, (void *)&pwm0->cmp0);
|
||||||
|
+ /* Set the 3-color PWM LEDs to yellow in SPL */
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm0->cmp1);
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm0->cmp2);
|
||||||
|
+ writel(PWM_CMP_DISABLE_VAL, (void *)&pwm0->cmp3);
|
||||||
|
+ writel(PWM_CFG_INIT, (void *)&pwm0->cfg);
|
||||||
|
+
|
||||||
|
+ writel(PWM_CMP_DISABLE_VAL, (void *)&pwm0->cmp3);
|
||||||
|
+ /* Turn on all the fans, (J21), (J23) and (J24), on the unmatched board */
|
||||||
|
+ /* The SoC fan(J21) on the rev3 board cannot be controled by PWM_COMP0,
|
||||||
|
+ so here sets the initial value of PWM_COMP0 as DISABLE */
|
||||||
|
+ if (get_pcb_revision_from_eeprom() == PCB_REVISION_REV3)
|
||||||
|
+ writel(PWM_CMP_DISABLE_VAL, (void *)&pwm1->cmp1);
|
||||||
|
+ else
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm1->cmp1);
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm1->cmp2);
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm1->cmp3);
|
||||||
|
+ writel(PWM_CFG_INIT, (void *)&pwm1->cfg);
|
||||||
|
+}
|
||||||
|
diff --git a/board/sifive/unmatched/spl.c b/board/sifive/unmatched/spl.c
|
||||||
|
index 7c0beedc08..f3a661a81e 100644
|
||||||
|
--- a/board/sifive/unmatched/spl.c
|
||||||
|
+++ b/board/sifive/unmatched/spl.c
|
||||||
|
@@ -90,6 +90,8 @@ int spl_board_init_f(void)
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ pwm_device_init();
|
||||||
|
+
|
||||||
|
ret = spl_gemgxl_init();
|
||||||
|
if (ret) {
|
||||||
|
debug("Gigabit ethernet PHY (VSC8541) init failed: %d\n", ret);
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
From 7ead6d662a2f9d8498af6650ea38418c64b52048 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vincent Chen <vincent.chen@sifive.com>
|
||||||
|
Date: Mon, 24 Jan 2022 02:42:02 -0800
|
||||||
|
Subject: [PATCH 3/8] board: sifive: Set LED's color to purple in the U-boot
|
||||||
|
stage
|
||||||
|
|
||||||
|
Set LED's color to purple in the U-boot stage. Because there are still
|
||||||
|
some functions to be executed before board_early_init_f(), it means
|
||||||
|
the LED's is not changed to purple instantly when entering the U-boot
|
||||||
|
stage.
|
||||||
|
---
|
||||||
|
board/sifive/unmatched/pwm.c | 7 +++++++
|
||||||
|
board/sifive/unmatched/unmatched.c | 6 ++++++
|
||||||
|
configs/sifive_unmatched_defconfig | 1 +
|
||||||
|
3 files changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/board/sifive/unmatched/pwm.c b/board/sifive/unmatched/pwm.c
|
||||||
|
index e1cc02310a..bd67672c22 100644
|
||||||
|
--- a/board/sifive/unmatched/pwm.c
|
||||||
|
+++ b/board/sifive/unmatched/pwm.c
|
||||||
|
@@ -36,6 +36,7 @@ void pwm_device_init(void)
|
||||||
|
struct pwm_sifive_regs *pwm0, *pwm1;
|
||||||
|
pwm0 = (struct pwm_sifive_regs *)PWM0_BASE;
|
||||||
|
pwm1 = (struct pwm_sifive_regs *)PWM1_BASE;
|
||||||
|
+#ifdef CONFIG_SPL_BUILD
|
||||||
|
writel(PWM_CMP_DISABLE_VAL, (void *)&pwm0->cmp0);
|
||||||
|
/* Set the 3-color PWM LEDs to yellow in SPL */
|
||||||
|
writel(PWM_CMP_ENABLE_VAL, (void *)&pwm0->cmp1);
|
||||||
|
@@ -54,4 +55,10 @@ void pwm_device_init(void)
|
||||||
|
writel(PWM_CMP_ENABLE_VAL, (void *)&pwm1->cmp2);
|
||||||
|
writel(PWM_CMP_ENABLE_VAL, (void *)&pwm1->cmp3);
|
||||||
|
writel(PWM_CFG_INIT, (void *)&pwm1->cfg);
|
||||||
|
+#else
|
||||||
|
+ /* Set the 3-color PWM LEDs to purple in U-boot */
|
||||||
|
+ writel(PWM_CMP_DISABLE_VAL, (void *)&pwm0->cmp1);
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm0->cmp2);
|
||||||
|
+ writel(PWM_CMP_ENABLE_VAL, (void *)&pwm0->cmp3);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c
|
||||||
|
index 6295deeae2..30c082d001 100644
|
||||||
|
--- a/board/sifive/unmatched/unmatched.c
|
||||||
|
+++ b/board/sifive/unmatched/unmatched.c
|
||||||
|
@@ -22,6 +22,12 @@ void *board_fdt_blob_setup(int *err)
|
||||||
|
return (ulong *)&_end;
|
||||||
|
}
|
||||||
|
|
||||||
|
+int board_early_init_f(void)
|
||||||
|
+{
|
||||||
|
+ pwm_device_init();
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int board_init(void)
|
||||||
|
{
|
||||||
|
/* enable all cache ways */
|
||||||
|
diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
|
||||||
|
index d400ed0b23..0758f8e90f 100644
|
||||||
|
--- a/configs/sifive_unmatched_defconfig
|
||||||
|
+++ b/configs/sifive_unmatched_defconfig
|
||||||
|
@@ -51,3 +51,4 @@ CONFIG_DM_SCSI=y
|
||||||
|
CONFIG_USB=y
|
||||||
|
CONFIG_USB_XHCI_HCD=y
|
||||||
|
CONFIG_USB_XHCI_PCI=y
|
||||||
|
+CONFIG_BOARD_EARLY_INIT_F=y
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
From 6ef7023c0dcfde320015ab19e0e0d423921be77d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vincent Chen <vincent.chen@sifive.com>
|
||||||
|
Date: Mon, 15 Nov 2021 03:39:07 -0800
|
||||||
|
Subject: [PATCH 1/2] board: sifive: Set LED's color to blue before jumping to
|
||||||
|
Linux
|
||||||
|
|
||||||
|
The LED's color wil be changed from purple to blue before executing
|
||||||
|
the sysboot command. Because the sysboot command includes the image loading
|
||||||
|
from the boot partition, It means the LED's color is blue when executing
|
||||||
|
"Retrieving file: /Image.gz".
|
||||||
|
---
|
||||||
|
include/configs/sifive-unmatched.h | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/include/configs/sifive-unmatched.h
|
||||||
|
+++ b/include/configs/sifive-unmatched.h
|
||||||
|
@@ -49,7 +49,12 @@
|
||||||
|
"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
|
||||||
|
"partitions=" PARTS_DEFAULT "\0" \
|
||||||
|
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
|
||||||
|
- BOOTENV
|
||||||
|
+ "setled_blue=mw.l 0x10020024 0x0000ffff; mw.l 0x10020028 0x0000ffff; mw.l 0x1002002c 0x0\0" \
|
||||||
|
+ BOOTENV \
|
||||||
|
+ "boot_extlinux=" \
|
||||||
|
+ "run setled_blue; " \
|
||||||
|
+ "sysboot ${devtype} ${devnum}:${distro_bootpart} any " \
|
||||||
|
+ "${scriptaddr} ${prefix}${boot_syslinux_conf};\0"
|
||||||
|
|
||||||
|
#define CONFIG_SYS_EEPROM_BUS_NUM 0
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
From 07f84ed283b913cbdf87181ae2ed65467d923df5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vincent Chen <vincent.chen@sifive.com>
|
||||||
|
Date: Mon, 24 Jan 2022 02:57:40 -0800
|
||||||
|
Subject: [PATCH 2/2] board: sifive: spl: Set remote thermal of TMP451 to 85
|
||||||
|
deg C for the unmatched board
|
||||||
|
|
||||||
|
For TMP451 on the unmatched board, the default value of the remote
|
||||||
|
thermal threshold is 108 deg C. This commit initilizes it to 85 deg C at SPL.
|
||||||
|
---
|
||||||
|
board/sifive/unmatched/spl.c | 29 +++++++++++++++++++++++++++++
|
||||||
|
drivers/misc/Kconfig | 10 ++++++++++
|
||||||
|
include/configs/sifive-unmatched.h | 4 ++++
|
||||||
|
scripts/config_whitelist.txt | 1 +
|
||||||
|
4 files changed, 44 insertions(+)
|
||||||
|
|
||||||
|
--- a/board/sifive/unmatched/spl.c
|
||||||
|
+++ b/board/sifive/unmatched/spl.c
|
||||||
|
@@ -10,6 +10,8 @@
|
||||||
|
#include <spl.h>
|
||||||
|
#include <misc.h>
|
||||||
|
#include <log.h>
|
||||||
|
+#include <config.h>
|
||||||
|
+#include <i2c.h>
|
||||||
|
#include <linux/delay.h>
|
||||||
|
#include <linux/io.h>
|
||||||
|
#include <asm/gpio.h>
|
||||||
|
@@ -26,6 +28,27 @@
|
||||||
|
#define MODE_SELECT_SD 0xb
|
||||||
|
#define MODE_SELECT_MASK GENMASK(3, 0)
|
||||||
|
|
||||||
|
+#define TMP451_REMOTE_THERM_LIMIT_REG_OFFSET 0x19
|
||||||
|
+#define TMP451_REMOTE_THERM_LIMIT_INIT_VALUE 0x55
|
||||||
|
+
|
||||||
|
+static inline int init_tmp451_remote_therm_limit(void)
|
||||||
|
+{
|
||||||
|
+ struct udevice *dev;
|
||||||
|
+ unsigned char r_therm_limit = TMP451_REMOTE_THERM_LIMIT_INIT_VALUE;
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ ret = i2c_get_chip_for_busnum(CONFIG_SYS_TMP451_BUS_NUM,
|
||||||
|
+ CONFIG_SYS_I2C_TMP451_ADDR,
|
||||||
|
+ CONFIG_SYS_I2C_TMP451_ADDR_LEN,
|
||||||
|
+ &dev);
|
||||||
|
+
|
||||||
|
+ if (!ret)
|
||||||
|
+ ret = dm_i2c_write(dev, TMP451_REMOTE_THERM_LIMIT_REG_OFFSET,
|
||||||
|
+ &r_therm_limit,
|
||||||
|
+ sizeof(unsigned char));
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static inline int spl_reset_device_by_gpio(const char *label, int pin, int low_width)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
@@ -92,6 +115,12 @@ int spl_board_init_f(void)
|
||||||
|
|
||||||
|
pwm_device_init();
|
||||||
|
|
||||||
|
+ ret = init_tmp451_remote_therm_limit();
|
||||||
|
+ if (ret) {
|
||||||
|
+ debug("TMP451 remote THERM limit init failed: %d\n", ret);
|
||||||
|
+ goto end;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
ret = spl_gemgxl_init();
|
||||||
|
if (ret) {
|
||||||
|
debug("Gigabit ethernet PHY (VSC8541) init failed: %d\n", ret);
|
||||||
|
--- a/drivers/misc/Kconfig
|
||||||
|
+++ b/drivers/misc/Kconfig
|
||||||
|
@@ -536,8 +536,18 @@ config SYS_I2C_EEPROM_ADDR
|
||||||
|
depends on ID_EEPROM || I2C_EEPROM || SPL_I2C_EEPROM || CMD_EEPROM || ENV_IS_IN_EEPROM
|
||||||
|
default 0
|
||||||
|
|
||||||
|
+config SYS_I2C_TMP451_ADDR
|
||||||
|
+ hex "Chip address of the TMP451 device"
|
||||||
|
+ default 0
|
||||||
|
+
|
||||||
|
if I2C_EEPROM
|
||||||
|
|
||||||
|
+config SYS_I2C_TMP451_ADDR_LEN
|
||||||
|
+ int "Length in bytes of the TMP451 memory array address"
|
||||||
|
+ default 1
|
||||||
|
+ help
|
||||||
|
+ Note: This is NOT the chip address length!
|
||||||
|
+
|
||||||
|
config SYS_I2C_EEPROM_ADDR_OVERFLOW
|
||||||
|
hex "EEPROM Address Overflow"
|
||||||
|
default 0x0
|
||||||
|
--- a/include/configs/sifive-unmatched.h
|
||||||
|
+++ b/include/configs/sifive-unmatched.h
|
||||||
|
@@ -15,6 +15,10 @@
|
||||||
|
|
||||||
|
#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000
|
||||||
|
|
||||||
|
+#define CONFIG_SYS_TMP451_BUS_NUM 0
|
||||||
|
+#define CONFIG_SYS_I2C_TMP451_ADDR 0x4c
|
||||||
|
+#define CONFIG_SYS_I2C_TMP451_ADDR_LEN 0x1
|
||||||
|
+
|
||||||
|
/* Environment options */
|
||||||
|
|
||||||
|
#define BOOT_TARGET_DEVICES(func) \
|
||||||
|
--- a/scripts/config_whitelist.txt
|
||||||
|
+++ b/scripts/config_whitelist.txt
|
||||||
|
@@ -1268,6 +1268,7 @@ CONFIG_SYS_TIMER_BASE
|
||||||
|
CONFIG_SYS_TIMER_COUNTER
|
||||||
|
CONFIG_SYS_TIMER_COUNTS_DOWN
|
||||||
|
CONFIG_SYS_TIMER_RATE
|
||||||
|
+CONFIG_SYS_TMP451_BUS_NUM
|
||||||
|
CONFIG_SYS_TMPVIRT
|
||||||
|
CONFIG_SYS_TSEC1_OFFSET
|
||||||
|
CONFIG_SYS_TX_ETH_BUFFER
|
|
@ -0,0 +1,36 @@
|
||||||
|
From c29e4d84cfa17ab96eff2a9044f486ba3c8b5c43 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Atish Patra <atish.patra@wdc.com>
|
||||||
|
Date: Mon, 25 Oct 2021 11:35:41 -0700
|
||||||
|
Subject: [PATCH] riscv: dts: Add few PMU events
|
||||||
|
|
||||||
|
fu740 has 2 HPM counters and many HPM events defined in the fu740 manual[1].
|
||||||
|
This patch adds some of these events and their mapping as per the
|
||||||
|
OpenSBI PMU DT binding for now.
|
||||||
|
|
||||||
|
[1]https://sifive.cdn.prismic.io/sifive/de1491e5-077c-461d-9605-e8a0ce57337d_fu740-c000-manual-v1p3.pdf
|
||||||
|
|
||||||
|
Signed-off-by: Atish Patra <atish.patra@wdc.com>
|
||||||
|
---
|
||||||
|
arch/riscv/dts/fu740-c000.dtsi | 11 +++++++++++
|
||||||
|
1 file changed, 11 insertions(+)
|
||||||
|
|
||||||
|
--- a/arch/riscv/dts/fu740-c000.dtsi
|
||||||
|
+++ b/arch/riscv/dts/fu740-c000.dtsi
|
||||||
|
@@ -140,6 +140,17 @@
|
||||||
|
#size-cells = <2>;
|
||||||
|
compatible = "simple-bus";
|
||||||
|
ranges;
|
||||||
|
+ pmu {
|
||||||
|
+ compatible = "riscv,pmu";
|
||||||
|
+ riscv,raw-event-to-mhpmcounters = <0x00000000 0x200 0x18
|
||||||
|
+ 0x00000000 0x400 0x18
|
||||||
|
+ 0x00000000 0x800 0x18>;
|
||||||
|
+ riscv,event-to-mhpmcounters = <0x05 0x06 0x18
|
||||||
|
+ 0x10009 0x10009 0x18>;
|
||||||
|
+ riscv,event-to-mhpmevent = <0x05 0x00000000 0x4000
|
||||||
|
+ 0x06 0x00000000 0x4001
|
||||||
|
+ 0x10008 0x00000000 0x102>;
|
||||||
|
+ };
|
||||||
|
plic0: interrupt-controller@c000000 {
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
#address-cells = <0>;
|
|
@ -0,0 +1,50 @@
|
||||||
|
commit 1dde977518f13824b847e23275001191139bc384
|
||||||
|
Author: Alexandre Ghiti <alexandre.ghiti@canonical.com>
|
||||||
|
Date: Mon Oct 3 18:07:54 2022 +0200
|
||||||
|
|
||||||
|
riscv: Fix build against binutils 2.38
|
||||||
|
|
||||||
|
The following description is copied from the equivalent patch for the
|
||||||
|
Linux Kernel proposed by Aurelien Jarno:
|
||||||
|
|
||||||
|
>From version 2.38, binutils default to ISA spec version 20191213. This
|
||||||
|
means that the csr read/write (csrr*/csrw*) instructions and fence.i
|
||||||
|
instruction has separated from the `I` extension, become two standalone
|
||||||
|
extensions: Zicsr and Zifencei. As the kernel uses those instruction,
|
||||||
|
this causes the following build failure:
|
||||||
|
|
||||||
|
arch/riscv/cpu/mtrap.S: Assembler messages:
|
||||||
|
arch/riscv/cpu/mtrap.S:65: Error: unrecognized opcode `csrr a0,scause'
|
||||||
|
arch/riscv/cpu/mtrap.S:66: Error: unrecognized opcode `csrr a1,sepc'
|
||||||
|
arch/riscv/cpu/mtrap.S:67: Error: unrecognized opcode `csrr a2,stval'
|
||||||
|
arch/riscv/cpu/mtrap.S:70: Error: unrecognized opcode `csrw sepc,a0'
|
||||||
|
|
||||||
|
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
|
||||||
|
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|
||||||
|
Tested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
||||||
|
Tested-by: Heiko Stuebner <heiko@sntech.de>
|
||||||
|
Tested-by: Christian Stewart <christian@paral.in>
|
||||||
|
Reviewed-by: Rick Chen <rick@andestech.com>
|
||||||
|
|
||||||
|
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
|
||||||
|
index 0b80eb8d86..53d1194ffb 100644
|
||||||
|
--- a/arch/riscv/Makefile
|
||||||
|
+++ b/arch/riscv/Makefile
|
||||||
|
@@ -24,7 +24,16 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y)
|
||||||
|
CMODEL = medany
|
||||||
|
endif
|
||||||
|
|
||||||
|
-ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) \
|
||||||
|
+RISCV_MARCH = $(ARCH_BASE)$(ARCH_A)$(ARCH_C)
|
||||||
|
+
|
||||||
|
+# Newer binutils versions default to ISA spec version 20191213 which moves some
|
||||||
|
+# instructions from the I extension to the Zicsr and Zifencei extensions.
|
||||||
|
+toolchain-need-zicsr-zifencei := $(call cc-option-yn, -mabi=$(ABI) -march=$(RISCV_MARCH)_zicsr_zifencei)
|
||||||
|
+ifeq ($(toolchain-need-zicsr-zifencei),y)
|
||||||
|
+ RISCV_MARCH := $(RISCV_MARCH)_zicsr_zifencei
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+ARCH_FLAGS = -march=$(RISCV_MARCH) -mabi=$(ABI) \
|
||||||
|
-mcmodel=$(CMODEL)
|
||||||
|
|
||||||
|
PLATFORM_CPPFLAGS += $(ARCH_FLAGS)
|
|
@ -0,0 +1,35 @@
|
||||||
|
From 637800493945ffed2f454756300437a4ec86e3b1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
|
Date: Wed, 19 Jul 2017 22:23:15 +0200
|
||||||
|
Subject: mkimage: check environment for dtc binary location
|
||||||
|
|
||||||
|
Currently mkimage assumes the dtc binary is in the path and fails
|
||||||
|
otherwise. This patch makes it check the DTC environment variable first
|
||||||
|
for the dtc binary and then fall back to the default path. This makes
|
||||||
|
it possible to call the u-boot build with make DTC=... and build a fit
|
||||||
|
image with the dtc binary not being the the default path.
|
||||||
|
|
||||||
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
|
Cc: Simon Glass <sjg@chromium.org>
|
||||||
|
---
|
||||||
|
tools/fit_image.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/tools/fit_image.c
|
||||||
|
+++ b/tools/fit_image.c
|
||||||
|
@@ -726,9 +726,14 @@ static int fit_handle_file(struct image_
|
||||||
|
}
|
||||||
|
*cmd = '\0';
|
||||||
|
} else if (params->datafile) {
|
||||||
|
+ const char* dtc = getenv("DTC");
|
||||||
|
+
|
||||||
|
+ if (!dtc)
|
||||||
|
+ dtc = MKIMAGE_DTC;
|
||||||
|
+
|
||||||
|
/* dtc -I dts -O dtb -p 500 -o tmpfile datafile */
|
||||||
|
snprintf(cmd, sizeof(cmd), "%s %s -o \"%s\" \"%s\"",
|
||||||
|
- MKIMAGE_DTC, params->dtc, tmpfile, params->datafile);
|
||||||
|
+ dtc, params->dtc, tmpfile, params->datafile);
|
||||||
|
debug("Trying to execute \"%s\"\n", cmd);
|
||||||
|
} else {
|
||||||
|
snprintf(cmd, sizeof(cmd), "cp \"%s\" \"%s\"",
|
10
package/boot/uboot-sifiveu/patches/110-no-kwbimage.patch
Normal file
10
package/boot/uboot-sifiveu/patches/110-no-kwbimage.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/tools/Makefile
|
||||||
|
+++ b/tools/Makefile
|
||||||
|
@@ -119,7 +119,6 @@ dumpimage-mkimage-objs := aisimage.o \
|
||||||
|
imximage.o \
|
||||||
|
imx8image.o \
|
||||||
|
imx8mimage.o \
|
||||||
|
- kwbimage.o \
|
||||||
|
lib/md5.o \
|
||||||
|
lpc32xximage.o \
|
||||||
|
mxsimage.o \
|
|
@ -0,0 +1,24 @@
|
||||||
|
--- a/tools/image-host.c
|
||||||
|
+++ b/tools/image-host.c
|
||||||
|
@@ -1125,6 +1125,7 @@ static int fit_config_add_verification_d
|
||||||
|
* 2) get public key (X509_get_pubkey)
|
||||||
|
* 3) provide der format (d2i_RSAPublicKey)
|
||||||
|
*/
|
||||||
|
+#ifdef CONFIG_TOOLS_LIBCRYPTO
|
||||||
|
static int read_pub_key(const char *keydir, const void *name,
|
||||||
|
unsigned char **pubkey, int *pubkey_len)
|
||||||
|
{
|
||||||
|
@@ -1178,6 +1179,13 @@ err_cert:
|
||||||
|
fclose(f);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
+#else
|
||||||
|
+static int read_pub_key(const char *keydir, const void *name,
|
||||||
|
+ unsigned char **pubkey, int *pubkey_len)
|
||||||
|
+{
|
||||||
|
+ return -ENOSYS;
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
int fit_pre_load_data(const char *keydir, void *keydest, void *fit)
|
||||||
|
{
|
|
@ -0,0 +1,30 @@
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -2028,26 +2028,7 @@ endif
|
||||||
|
# Check dtc and pylibfdt, if DTC is provided, else build them
|
||||||
|
PHONY += scripts_dtc
|
||||||
|
scripts_dtc: scripts_basic
|
||||||
|
- $(Q)if test "$(DTC)" = "$(DTC_INTREE)"; then \
|
||||||
|
- $(MAKE) $(build)=scripts/dtc; \
|
||||||
|
- else \
|
||||||
|
- if ! $(DTC) -v >/dev/null; then \
|
||||||
|
- echo '*** Failed to check dtc version: $(DTC)'; \
|
||||||
|
- false; \
|
||||||
|
- else \
|
||||||
|
- if test "$(call dtc-version)" -lt $(DTC_MIN_VERSION); then \
|
||||||
|
- echo '*** Your dtc is too old, please upgrade to dtc $(DTC_MIN_VERSION) or newer'; \
|
||||||
|
- false; \
|
||||||
|
- else \
|
||||||
|
- if [ -n "$(CONFIG_PYLIBFDT)" ]; then \
|
||||||
|
- if ! echo "import libfdt" | $(PYTHON3) 2>/dev/null; then \
|
||||||
|
- echo '*** pylibfdt does not seem to be available with $(PYTHON3)'; \
|
||||||
|
- false; \
|
||||||
|
- fi; \
|
||||||
|
- fi; \
|
||||||
|
- fi; \
|
||||||
|
- fi; \
|
||||||
|
- fi
|
||||||
|
+ $(MAKE) $(build)=scripts/dtc
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------------
|
||||||
|
quiet_cmd_cpp_lds = LDS $@
|
5
package/boot/uboot-sifiveu/uEnv-default.txt
Normal file
5
package/boot/uboot-sifiveu/uEnv-default.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
setenv loadkernel fatload mmc 0:3 \$kernel_addr_r Image
|
||||||
|
setenv loaddtb fatload mmc 0:3 \$fdt_addr_r dtb
|
||||||
|
setenv bootargs console=ttySIF0,115200 earlycon=sbi root=/dev/mmcblk0p4 rootwait
|
||||||
|
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r
|
||||||
|
run uenvcmd
|
|
@ -6,9 +6,9 @@ PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
|
||||||
PKG_SOURCE_DATE:=2023-04-12
|
PKG_SOURCE_DATE:=2023-05-22
|
||||||
PKG_SOURCE_VERSION:=b22487d729362feaff7d06354353d005a3a9d6b7
|
PKG_SOURCE_VERSION:=0f73d32e641c4f17e64597da0e6c40ed3cbebe69
|
||||||
PKG_MIRROR_HASH:=94eea9db636b2cbf6782ec17d8b8fe36770c61ff283702ec418df1a1b09f54ef
|
PKG_MIRROR_HASH:=70bd8ecda004528ec74de078d00df792f92322c58c4ec4b0630d1da097a8bc89
|
||||||
|
|
||||||
PKG_FLAGS:=nonshared
|
PKG_FLAGS:=nonshared
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ endef
|
||||||
|
|
||||||
ALLWIFIBOARDS:= \
|
ALLWIFIBOARDS:= \
|
||||||
buffalo_wxr-5950ax12 \
|
buffalo_wxr-5950ax12 \
|
||||||
|
compex_wpq873 \
|
||||||
dynalink_dl-wrx36 \
|
dynalink_dl-wrx36 \
|
||||||
edgecore_eap102 \
|
edgecore_eap102 \
|
||||||
edimax_cax1800 \
|
edimax_cax1800 \
|
||||||
|
@ -113,6 +114,7 @@ endef
|
||||||
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
|
# Add $(eval $(call generate-ipq-wifi-package,<devicename>,<display name>))
|
||||||
|
|
||||||
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
|
$(eval $(call generate-ipq-wifi-package,buffalo_wxr-5950ax12,Buffalo WXR-5950AX12))
|
||||||
|
$(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
|
||||||
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
|
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
|
||||||
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
|
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
|
||||||
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
|
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=ath10k-ct
|
PKG_NAME:=ath10k-ct
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_LICENSE:=GPLv2
|
PKG_LICENSE:=GPLv2
|
||||||
PKG_LICENSE_FILES:=
|
PKG_LICENSE_FILES:=
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
|
PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2022-05-13
|
PKG_SOURCE_DATE:=2023-05-26
|
||||||
PKG_SOURCE_VERSION:=f808496fcc6b1f68942914117aebf8b3f8d52bb3
|
PKG_SOURCE_VERSION:=af342b6171a457e067932615deb203b68b1d076a
|
||||||
PKG_MIRROR_HASH:=39527b3408696594eda5579521a9fb798417be4dda73fa08e8b3a8c7b0d3f3d9
|
PKG_MIRROR_HASH:=90e145fbe6057da65b637e3a194317c1e4f529b078c7e4a245a286c37e3d1b76
|
||||||
|
|
||||||
# Build the 5.15 ath10k-ct driver version.
|
# Build the 6.2 ath10k-ct driver version.
|
||||||
# Probably this should match as closely as
|
# Probably this should match as closely as
|
||||||
# possible to whatever mac80211 backports version is being used.
|
# possible to whatever mac80211 backports version is being used.
|
||||||
CT_KVER="-5.15"
|
CT_KVER="-6.2"
|
||||||
|
|
||||||
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
PKG_MAINTAINER:=Ben Greear <greearb@candelatech.com>
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
|
@ -1,618 +0,0 @@
|
||||||
--- a/ath10k-5.15/mac.c
|
|
||||||
+++ b/ath10k-5.15/mac.c
|
|
||||||
@@ -788,7 +788,7 @@ int ath10k_mac_vif_chan(struct ieee80211
|
|
||||||
struct ieee80211_chanctx_conf *conf;
|
|
||||||
|
|
||||||
rcu_read_lock();
|
|
||||||
- conf = rcu_dereference(vif->chanctx_conf);
|
|
||||||
+ conf = rcu_dereference(vif->bss_conf.chanctx_conf);
|
|
||||||
if (!conf) {
|
|
||||||
rcu_read_unlock();
|
|
||||||
return -ENOENT;
|
|
||||||
@@ -1764,8 +1764,8 @@ static int ath10k_vdev_start_restart(str
|
|
||||||
arg.channel.chan_radar =
|
|
||||||
!!(chandef->chan->flags & IEEE80211_CHAN_RADAR);
|
|
||||||
} else if (arvif->vdev_type == WMI_VDEV_TYPE_IBSS) {
|
|
||||||
- arg.ssid = arvif->vif->bss_conf.ssid;
|
|
||||||
- arg.ssid_len = arvif->vif->bss_conf.ssid_len;
|
|
||||||
+ arg.ssid = arvif->vif->cfg.ssid;
|
|
||||||
+ arg.ssid_len = arvif->vif->cfg.ssid_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC,
|
|
||||||
@@ -1890,7 +1890,7 @@ static int ath10k_mac_setup_bcn_tmpl(str
|
|
||||||
arvif->vdev_type != WMI_VDEV_TYPE_IBSS)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
- bcn = ieee80211_beacon_get_template(hw, vif, &offs);
|
|
||||||
+ bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
|
|
||||||
if (!bcn) {
|
|
||||||
ath10k_warn(ar, "failed to get beacon template from mac80211\n");
|
|
||||||
return -EPERM;
|
|
||||||
@@ -2083,8 +2083,7 @@ static void ath10k_control_beaconing(str
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ath10k_control_ibss(struct ath10k_vif *arvif,
|
|
||||||
- struct ieee80211_bss_conf *info,
|
|
||||||
- const u8 self_peer[ETH_ALEN])
|
|
||||||
+ struct ieee80211_vif *vif)
|
|
||||||
{
|
|
||||||
struct ath10k *ar = arvif->ar;
|
|
||||||
u32 vdev_param;
|
|
||||||
@@ -2092,7 +2091,7 @@ static void ath10k_control_ibss(struct a
|
|
||||||
|
|
||||||
lockdep_assert_held(&arvif->ar->conf_mutex);
|
|
||||||
|
|
||||||
- if (!info->ibss_joined) {
|
|
||||||
+ if (!vif->cfg.ibss_joined) {
|
|
||||||
if (is_zero_ether_addr(arvif->bssid))
|
|
||||||
return;
|
|
||||||
|
|
||||||
@@ -2298,7 +2297,7 @@ static void ath10k_mac_vif_ap_csa_count_
|
|
||||||
if (arvif->vdev_type != WMI_VDEV_TYPE_AP)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (!vif->csa_active)
|
|
||||||
+ if (!vif->bss_conf.csa_active)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!arvif->is_up)
|
|
||||||
@@ -2433,7 +2432,7 @@ static void ath10k_peer_assoc_h_basic(st
|
|
||||||
lockdep_assert_held(&ar->conf_mutex);
|
|
||||||
|
|
||||||
if (vif->type == NL80211_IFTYPE_STATION)
|
|
||||||
- aid = vif->bss_conf.aid;
|
|
||||||
+ aid = vif->cfg.aid;
|
|
||||||
else
|
|
||||||
aid = sta->aid;
|
|
||||||
|
|
||||||
@@ -2463,7 +2462,8 @@ static void ath10k_peer_assoc_h_crypto(s
|
|
||||||
return;
|
|
||||||
|
|
||||||
bss = cfg80211_get_bss(ar->hw->wiphy, def.chan, info->bssid,
|
|
||||||
- info->ssid_len ? info->ssid : NULL, info->ssid_len,
|
|
||||||
+ vif->cfg.ssid_len ? vif->cfg.ssid : NULL,
|
|
||||||
+ vif->cfg.ssid_len,
|
|
||||||
IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY);
|
|
||||||
if (bss) {
|
|
||||||
const struct cfg80211_bss_ies *ies;
|
|
||||||
@@ -2521,7 +2521,7 @@ static void ath10k_peer_assoc_h_rates(st
|
|
||||||
|
|
||||||
band = def.chan->band;
|
|
||||||
sband = ar->hw->wiphy->bands[band];
|
|
||||||
- ratemask = sta->supp_rates[band];
|
|
||||||
+ ratemask = sta->deflink.supp_rates[band];
|
|
||||||
ratemask &= arvif->bitrate_mask.control[band].legacy;
|
|
||||||
rates = sband->bitrates;
|
|
||||||
|
|
||||||
@@ -2770,7 +2770,7 @@ static void ath10k_peer_assoc_h_ht(struc
|
|
||||||
struct ieee80211_sta *sta,
|
|
||||||
struct wmi_peer_assoc_complete_arg *arg)
|
|
||||||
{
|
|
||||||
- const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
|
|
||||||
+ const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
|
|
||||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
|
||||||
struct cfg80211_chan_def def;
|
|
||||||
enum nl80211_band band;
|
|
||||||
@@ -2814,7 +2814,7 @@ static void ath10k_peer_assoc_h_ht(struc
|
|
||||||
if (ht_cap->cap & IEEE80211_HT_CAP_LDPC_CODING)
|
|
||||||
arg->peer_flags |= ar->wmi.peer_flags->ldbc;
|
|
||||||
|
|
||||||
- if (sta->bandwidth >= IEEE80211_STA_RX_BW_40) {
|
|
||||||
+ if (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40) {
|
|
||||||
arg->peer_flags |= ar->wmi.peer_flags->bw40;
|
|
||||||
arg->peer_rate_caps |= WMI_RC_CW40_FLAG;
|
|
||||||
}
|
|
||||||
@@ -2883,7 +2883,7 @@ static void ath10k_peer_assoc_h_ht(struc
|
|
||||||
arg->peer_ht_rates.rates[i] = i;
|
|
||||||
} else {
|
|
||||||
arg->peer_ht_rates.num_rates = n;
|
|
||||||
- arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss);
|
|
||||||
+ arg->peer_num_spatial_streams = min(sta->deflink.rx_nss, max_nss);
|
|
||||||
}
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ht peer %pM mcs cnt %d nss %d\n",
|
|
||||||
@@ -3045,7 +3045,7 @@ static void ath10k_peer_assoc_h_vht(stru
|
|
||||||
struct ieee80211_sta *sta,
|
|
||||||
struct wmi_peer_assoc_complete_arg *arg)
|
|
||||||
{
|
|
||||||
- const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
|
|
||||||
+ const struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
|
|
||||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
|
||||||
struct ath10k_hw_params *hw = &ar->hw_params;
|
|
||||||
struct cfg80211_chan_def def;
|
|
||||||
@@ -3087,10 +3087,10 @@ static void ath10k_peer_assoc_h_vht(stru
|
|
||||||
(1U << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
|
||||||
ampdu_factor)) - 1);
|
|
||||||
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
|
|
||||||
arg->peer_flags |= ar->wmi.peer_flags->bw80;
|
|
||||||
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_160)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
|
|
||||||
arg->peer_flags |= ar->wmi.peer_flags->bw160;
|
|
||||||
|
|
||||||
/* Calculate peer NSS capability from VHT capabilities if STA
|
|
||||||
@@ -3104,7 +3104,7 @@ static void ath10k_peer_assoc_h_vht(stru
|
|
||||||
vht_mcs_mask[i])
|
|
||||||
max_nss = i + 1;
|
|
||||||
}
|
|
||||||
- arg->peer_num_spatial_streams = min(sta->rx_nss, max_nss);
|
|
||||||
+ arg->peer_num_spatial_streams = min(sta->deflink.rx_nss, max_nss);
|
|
||||||
arg->peer_vht_rates.rx_max_rate =
|
|
||||||
__le16_to_cpu(vht_cap->vht_mcs.rx_highest);
|
|
||||||
arg->peer_vht_rates.rx_mcs_set =
|
|
||||||
@@ -3266,7 +3266,7 @@ static bool ath10k_mac_sta_has_ofdm_only
|
|
||||||
{
|
|
||||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
|
||||||
u32 msk = arvif->bitrate_mask.control[NL80211_BAND_2GHZ].legacy &
|
|
||||||
- sta->supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
+ sta->deflink.supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
/* We have 12 bits of legacy rates, first 4 are /b (CCK) rates. */
|
|
||||||
return (msk & 0xff0) && !(msk & 0xf);
|
|
||||||
}
|
|
||||||
@@ -3276,7 +3276,7 @@ static bool ath10k_mac_sta_has_ofdm_and_
|
|
||||||
{
|
|
||||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
|
||||||
u32 msk = arvif->bitrate_mask.control[NL80211_BAND_2GHZ].legacy &
|
|
||||||
- sta->supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
+ sta->deflink.supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
/* We have 12 bits of legacy rates, first 4 are /b (CCK) rates. */
|
|
||||||
return ((msk & 0xf) && (msk & 0xff0));
|
|
||||||
}
|
|
||||||
@@ -3284,8 +3284,10 @@ static bool ath10k_mac_sta_has_ofdm_and_
|
|
||||||
static enum wmi_phy_mode ath10k_mac_get_phymode_vht(struct ath10k *ar,
|
|
||||||
struct ieee80211_sta *sta)
|
|
||||||
{
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_160) {
|
|
||||||
- switch (sta->vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
|
|
||||||
+ struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
|
|
||||||
+
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) {
|
|
||||||
+ switch (vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) {
|
|
||||||
case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
|
|
||||||
return MODE_11AC_VHT160;
|
|
||||||
case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ:
|
|
||||||
@@ -3296,13 +3298,13 @@ static enum wmi_phy_mode ath10k_mac_get_
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_80)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
|
|
||||||
return MODE_11AC_VHT80;
|
|
||||||
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
return MODE_11AC_VHT40;
|
|
||||||
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_20)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_20)
|
|
||||||
return MODE_11AC_VHT20;
|
|
||||||
|
|
||||||
return MODE_UNKNOWN;
|
|
||||||
@@ -3329,15 +3331,15 @@ static void ath10k_peer_assoc_h_phymode(
|
|
||||||
|
|
||||||
switch (band) {
|
|
||||||
case NL80211_BAND_2GHZ:
|
|
||||||
- if (sta->vht_cap.vht_supported &&
|
|
||||||
+ if (sta->deflink.vht_cap.vht_supported &&
|
|
||||||
!ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
phymode = MODE_11AC_VHT40;
|
|
||||||
else
|
|
||||||
phymode = MODE_11AC_VHT20;
|
|
||||||
- } else if (sta->ht_cap.ht_supported &&
|
|
||||||
+ } else if (sta->deflink.ht_cap.ht_supported &&
|
|
||||||
!ath10k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
|
|
||||||
- if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
+ if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
|
|
||||||
phymode = MODE_11NG_HT40;
|
|
||||||
else
|
|
||||||
phymode = MODE_11NG_HT20;
|
|
||||||
@@ -3354,12 +3356,12 @@ static void ath10k_peer_assoc_h_phymode(
|
|
||||||
/*
|
|
||||||
* Check VHT first.
|
|
||||||
*/
|
|
||||||
- if (sta->vht_cap.vht_supported &&
|
|
||||||
+ if (sta->deflink.vht_cap.vht_supported &&
|
|
||||||
!ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
|
||||||
phymode = ath10k_mac_get_phymode_vht(ar, sta);
|
|
||||||
- } else if (sta->ht_cap.ht_supported &&
|
|
||||||
+ } else if (sta->deflink.ht_cap.ht_supported &&
|
|
||||||
!ath10k_peer_assoc_h_ht_masked(ht_mcs_mask)) {
|
|
||||||
- if (sta->bandwidth >= IEEE80211_STA_RX_BW_40)
|
|
||||||
+ if (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40)
|
|
||||||
phymode = MODE_11NA_HT40;
|
|
||||||
else
|
|
||||||
phymode = MODE_11NA_HT20;
|
|
||||||
@@ -3373,8 +3375,8 @@ static void ath10k_peer_assoc_h_phymode(
|
|
||||||
}
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac peer %pM phymode %s legacy-supp-rates: 0x%x arvif-legacy-rates: 0x%x vht-supp: %d\n",
|
|
||||||
- sta->addr, ath10k_wmi_phymode_str(phymode), sta->supp_rates[band],
|
|
||||||
- arvif->bitrate_mask.control[band].legacy, sta->vht_cap.vht_supported);
|
|
||||||
+ sta->addr, ath10k_wmi_phymode_str(phymode), sta->deflink.supp_rates[band],
|
|
||||||
+ arvif->bitrate_mask.control[band].legacy, sta->deflink.vht_cap.vht_supported);
|
|
||||||
|
|
||||||
arg->peer_phymode = phymode;
|
|
||||||
WARN_ON(phymode == MODE_UNKNOWN);
|
|
||||||
@@ -3677,8 +3679,8 @@ static void ath10k_bss_assoc(struct ieee
|
|
||||||
/* ap_sta must be accessed only within rcu section which must be left
|
|
||||||
* before calling ath10k_setup_peer_smps() which might sleep.
|
|
||||||
*/
|
|
||||||
- ht_cap = ap_sta->ht_cap;
|
|
||||||
- vht_cap = ap_sta->vht_cap;
|
|
||||||
+ ht_cap = ap_sta->deflink.ht_cap;
|
|
||||||
+ vht_cap = ap_sta->deflink.vht_cap;
|
|
||||||
|
|
||||||
ret = ath10k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg);
|
|
||||||
if (ret) {
|
|
||||||
@@ -3713,11 +3715,11 @@ static void ath10k_bss_assoc(struct ieee
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_MAC,
|
|
||||||
"mac vdev %d up (associated) bssid %pM aid %d bandwidth %d\n",
|
|
||||||
- arvif->vdev_id, bss_conf->bssid, bss_conf->aid, ap_sta->bandwidth);
|
|
||||||
+ arvif->vdev_id, bss_conf->bssid, vif->cfg.aid, ap_sta->deflink.bandwidth);
|
|
||||||
|
|
||||||
WARN_ON(arvif->is_up);
|
|
||||||
|
|
||||||
- arvif->aid = bss_conf->aid;
|
|
||||||
+ arvif->aid = vif->cfg.aid;
|
|
||||||
ether_addr_copy(arvif->bssid, bss_conf->bssid);
|
|
||||||
|
|
||||||
ret = ath10k_wmi_pdev_set_param(ar,
|
|
||||||
@@ -4022,7 +4024,7 @@ static int ath10k_station_assoc(struct a
|
|
||||||
*/
|
|
||||||
if (!reassoc) {
|
|
||||||
ret = ath10k_setup_peer_smps(ar, arvif, sta->addr,
|
|
||||||
- &sta->ht_cap);
|
|
||||||
+ &sta->deflink.ht_cap);
|
|
||||||
if (ret) {
|
|
||||||
ath10k_warn(ar, "failed to setup peer SMPS for vdev %d: %d\n",
|
|
||||||
arvif->vdev_id, ret);
|
|
||||||
@@ -6916,7 +6918,7 @@ static void ath10k_recalculate_mgmt_rate
|
|
||||||
static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
struct ieee80211_bss_conf *info,
|
|
||||||
- u32 changed)
|
|
||||||
+ u64 changed)
|
|
||||||
{
|
|
||||||
struct ath10k *ar = hw->priv;
|
|
||||||
struct ath10k_vif *arvif = (void *)vif->drv_priv;
|
|
||||||
@@ -6930,7 +6932,7 @@ static void ath10k_bss_info_changed(stru
|
|
||||||
mutex_lock(&ar->conf_mutex);
|
|
||||||
|
|
||||||
if (changed & BSS_CHANGED_IBSS)
|
|
||||||
- ath10k_control_ibss(arvif, info, vif->addr);
|
|
||||||
+ ath10k_control_ibss(arvif, vif);
|
|
||||||
|
|
||||||
if (changed & BSS_CHANGED_BEACON_INT) {
|
|
||||||
arvif->beacon_interval = info->beacon_int;
|
|
||||||
@@ -6995,9 +6997,9 @@ static void ath10k_bss_info_changed(stru
|
|
||||||
|
|
||||||
if (changed & BSS_CHANGED_SSID &&
|
|
||||||
vif->type == NL80211_IFTYPE_AP) {
|
|
||||||
- arvif->u.ap.ssid_len = info->ssid_len;
|
|
||||||
- if (info->ssid_len)
|
|
||||||
- memcpy(arvif->u.ap.ssid, info->ssid, info->ssid_len);
|
|
||||||
+ arvif->u.ap.ssid_len = vif->cfg.ssid_len;
|
|
||||||
+ if (vif->cfg.ssid_len)
|
|
||||||
+ memcpy(arvif->u.ap.ssid, vif->cfg.ssid, vif->cfg.ssid_len);
|
|
||||||
arvif->u.ap.hidden_ssid = info->hidden_ssid;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -7074,7 +7076,7 @@ static void ath10k_bss_info_changed(stru
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changed & BSS_CHANGED_ASSOC) {
|
|
||||||
- if (info->assoc) {
|
|
||||||
+ if (vif->cfg.assoc) {
|
|
||||||
/* Workaround: Make sure monitor vdev is not running
|
|
||||||
* when associating to prevent some firmware revisions
|
|
||||||
* (e.g. 10.1 and 10.2) from crashing.
|
|
||||||
@@ -7099,7 +7101,7 @@ static void ath10k_bss_info_changed(stru
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changed & BSS_CHANGED_PS) {
|
|
||||||
- arvif->ps = vif->bss_conf.ps;
|
|
||||||
+ arvif->ps = vif->cfg.ps;
|
|
||||||
|
|
||||||
ret = ath10k_config_ps(ar);
|
|
||||||
if (ret)
|
|
||||||
@@ -7699,7 +7701,7 @@ static void ath10k_sta_rc_update_wk(stru
|
|
||||||
|
|
||||||
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM supp rates, bandwidth: %d\n",
|
|
||||||
- sta->addr, sta->bandwidth);
|
|
||||||
+ sta->addr, sta->deflink.bandwidth);
|
|
||||||
|
|
||||||
err = ath10k_station_assoc(ar, arvif->vif, sta, true);
|
|
||||||
if (err)
|
|
||||||
@@ -7751,10 +7753,10 @@ static int ath10k_sta_set_txpwr(struct i
|
|
||||||
int ret = 0;
|
|
||||||
s16 txpwr;
|
|
||||||
|
|
||||||
- if (sta->txpwr.type == NL80211_TX_POWER_AUTOMATIC) {
|
|
||||||
+ if (sta->deflink.txpwr.type == NL80211_TX_POWER_AUTOMATIC) {
|
|
||||||
txpwr = 0;
|
|
||||||
} else {
|
|
||||||
- txpwr = sta->txpwr.power;
|
|
||||||
+ txpwr = sta->deflink.txpwr.power;
|
|
||||||
if (!txpwr)
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
@@ -7874,26 +7876,29 @@ static int ath10k_mac_validate_rate_mask
|
|
||||||
struct ieee80211_sta *sta,
|
|
||||||
u32 rate_ctrl_flag, u8 nss)
|
|
||||||
{
|
|
||||||
- if (nss > sta->rx_nss) {
|
|
||||||
+ struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
|
|
||||||
+ struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
|
|
||||||
+
|
|
||||||
+ if (nss > sta->deflink.rx_nss) {
|
|
||||||
ath10k_warn(ar, "Invalid nss field, configured %u limit %u\n",
|
|
||||||
- nss, sta->rx_nss);
|
|
||||||
+ nss, sta->deflink.rx_nss);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ATH10K_HW_PREAMBLE(rate_ctrl_flag) == WMI_RATE_PREAMBLE_VHT) {
|
|
||||||
- if (!sta->vht_cap.vht_supported) {
|
|
||||||
+ if (!vht_cap->vht_supported) {
|
|
||||||
ath10k_warn(ar, "Invalid VHT rate for sta %pM\n",
|
|
||||||
sta->addr);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
} else if (ATH10K_HW_PREAMBLE(rate_ctrl_flag) == WMI_RATE_PREAMBLE_HT) {
|
|
||||||
- if (!sta->ht_cap.ht_supported || sta->vht_cap.vht_supported) {
|
|
||||||
+ if (!ht_cap->ht_supported || vht_cap->vht_supported) {
|
|
||||||
ath10k_warn(ar, "Invalid HT rate for sta %pM\n",
|
|
||||||
sta->addr);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- if (sta->ht_cap.ht_supported || sta->vht_cap.vht_supported)
|
|
||||||
+ if (ht_cap->ht_supported || vht_cap->vht_supported)
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -8567,7 +8572,7 @@ static int ath10k_sta_state(struct ieee8
|
|
||||||
* New association.
|
|
||||||
*/
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_STA, "mac sta %pM associated, bandwidth: %d\n",
|
|
||||||
- sta->addr, sta->bandwidth);
|
|
||||||
+ sta->addr, sta->deflink.bandwidth);
|
|
||||||
|
|
||||||
ret = ath10k_station_assoc(ar, vif, sta, false);
|
|
||||||
if (ret)
|
|
||||||
@@ -8580,7 +8585,7 @@ static int ath10k_sta_state(struct ieee8
|
|
||||||
* Tdls station authorized.
|
|
||||||
*/
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_STA, "mac tdls sta %pM authorized, bandwidth: %d\n",
|
|
||||||
- sta->addr, sta->bandwidth);
|
|
||||||
+ sta->addr, sta->deflink.bandwidth);
|
|
||||||
|
|
||||||
ret = ath10k_station_assoc(ar, vif, sta, false);
|
|
||||||
if (ret) {
|
|
||||||
@@ -8721,8 +8726,8 @@ exit:
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int ath10k_conf_tx(struct ieee80211_hw *hw,
|
|
||||||
- struct ieee80211_vif *vif, u16 ac,
|
|
||||||
+static int ath10k_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|
||||||
+ unsigned int link_id, u16 ac,
|
|
||||||
const struct ieee80211_tx_queue_params *params)
|
|
||||||
{
|
|
||||||
struct ath10k *ar = hw->priv;
|
|
||||||
@@ -9308,7 +9313,7 @@ static bool ath10k_mac_set_vht_bitrate_m
|
|
||||||
u8 rate = arvif->vht_pfr;
|
|
||||||
|
|
||||||
/* skip non vht and multiple rate peers */
|
|
||||||
- if (!sta->vht_cap.vht_supported || arvif->vht_num_rates != 1)
|
|
||||||
+ if (!sta->deflink.vht_cap.vht_supported || arvif->vht_num_rates != 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
|
|
||||||
@@ -9349,7 +9354,7 @@ static void ath10k_mac_clr_bitrate_mask_
|
|
||||||
int err;
|
|
||||||
|
|
||||||
/* clear vht peers only */
|
|
||||||
- if (arsta->arvif != arvif || !sta->vht_cap.vht_supported)
|
|
||||||
+ if (arsta->arvif != arvif || !sta->deflink.vht_cap.vht_supported)
|
|
||||||
return;
|
|
||||||
|
|
||||||
err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
|
|
||||||
@@ -9534,13 +9539,13 @@ static void ath10k_sta_rc_update(struct
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_STA,
|
|
||||||
"mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n",
|
|
||||||
- sta->addr, changed, sta->bandwidth, sta->rx_nss,
|
|
||||||
- sta->smps_mode);
|
|
||||||
+ sta->addr, changed, sta->deflink.bandwidth, sta->deflink.rx_nss,
|
|
||||||
+ sta->deflink.smps_mode);
|
|
||||||
|
|
||||||
if (changed & IEEE80211_RC_BW_CHANGED) {
|
|
||||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
|
||||||
|
|
||||||
- switch (sta->bandwidth) {
|
|
||||||
+ switch (sta->deflink.bandwidth) {
|
|
||||||
case IEEE80211_STA_RX_BW_20:
|
|
||||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
|
||||||
break;
|
|
||||||
@@ -9555,7 +9560,7 @@ static void ath10k_sta_rc_update(struct
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ath10k_warn(ar, "Invalid bandwidth %d in rc update for %pM\n",
|
|
||||||
- sta->bandwidth, sta->addr);
|
|
||||||
+ sta->deflink.bandwidth, sta->addr);
|
|
||||||
bw = WMI_PEER_CHWIDTH_20MHZ;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -9564,12 +9569,12 @@ static void ath10k_sta_rc_update(struct
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changed & IEEE80211_RC_NSS_CHANGED)
|
|
||||||
- arsta->nss = sta->rx_nss;
|
|
||||||
+ arsta->nss = sta->deflink.rx_nss;
|
|
||||||
|
|
||||||
if (changed & IEEE80211_RC_SMPS_CHANGED) {
|
|
||||||
smps = WMI_PEER_SMPS_PS_NONE;
|
|
||||||
|
|
||||||
- switch (sta->smps_mode) {
|
|
||||||
+ switch (sta->deflink.smps_mode) {
|
|
||||||
case IEEE80211_SMPS_AUTOMATIC:
|
|
||||||
case IEEE80211_SMPS_OFF:
|
|
||||||
smps = WMI_PEER_SMPS_PS_NONE;
|
|
||||||
@@ -9582,7 +9587,7 @@ static void ath10k_sta_rc_update(struct
|
|
||||||
break;
|
|
||||||
case IEEE80211_SMPS_NUM_MODES:
|
|
||||||
ath10k_warn(ar, "Invalid smps %d in sta rc update for %pM\n",
|
|
||||||
- sta->smps_mode, sta->addr);
|
|
||||||
+ sta->deflink.smps_mode, sta->addr);
|
|
||||||
smps = WMI_PEER_SMPS_PS_NONE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -9896,7 +9901,7 @@ ath10k_mac_change_chanctx_cnt_iter(void
|
|
||||||
{
|
|
||||||
struct ath10k_mac_change_chanctx_arg *arg = data;
|
|
||||||
|
|
||||||
- if (rcu_access_pointer(vif->chanctx_conf) != arg->ctx)
|
|
||||||
+ if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
|
|
||||||
return;
|
|
||||||
|
|
||||||
arg->n_vifs++;
|
|
||||||
@@ -9909,7 +9914,7 @@ ath10k_mac_change_chanctx_fill_iter(void
|
|
||||||
struct ath10k_mac_change_chanctx_arg *arg = data;
|
|
||||||
struct ieee80211_chanctx_conf *ctx;
|
|
||||||
|
|
||||||
- ctx = rcu_access_pointer(vif->chanctx_conf);
|
|
||||||
+ ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
|
|
||||||
if (ctx != arg->ctx)
|
|
||||||
return;
|
|
||||||
|
|
||||||
@@ -9982,6 +9987,7 @@ unlock:
|
|
||||||
static int
|
|
||||||
ath10k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
+ struct ieee80211_bss_conf *link_conf,
|
|
||||||
struct ieee80211_chanctx_conf *ctx)
|
|
||||||
{
|
|
||||||
struct ath10k *ar = hw->priv;
|
|
||||||
@@ -10061,6 +10067,7 @@ err:
|
|
||||||
static void
|
|
||||||
ath10k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
+ struct ieee80211_bss_conf *link_conf,
|
|
||||||
struct ieee80211_chanctx_conf *ctx)
|
|
||||||
{
|
|
||||||
struct ath10k *ar = hw->priv;
|
|
||||||
--- a/ath10k-5.15/txrx.c
|
|
||||||
+++ b/ath10k-5.15/txrx.c
|
|
||||||
@@ -260,7 +260,7 @@ int ath10k_txrx_tx_unref(struct ath10k_h
|
|
||||||
nf = ar->debug.nf_sum[0];
|
|
||||||
#endif
|
|
||||||
info->status.ack_signal = nf + tx_done->ack_rssi;
|
|
||||||
- info->status.is_valid_ack_signal = true;
|
|
||||||
+ info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tx_done->tx_rate_code || tx_done->tx_rate_flags || ar->ok_tx_rate_status) {
|
|
||||||
--- a/ath10k-5.15/wmi.c
|
|
||||||
+++ b/ath10k-5.15/wmi.c
|
|
||||||
@@ -2587,7 +2587,7 @@ wmi_process_mgmt_tx_comp(struct ath10k *
|
|
||||||
info->flags |= IEEE80211_TX_STAT_ACK;
|
|
||||||
info->status.ack_signal = ath10k_get_noisefloor(0, ar) +
|
|
||||||
param->ack_rssi;
|
|
||||||
- info->status.is_valid_ack_signal = true;
|
|
||||||
+ info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID;
|
|
||||||
}
|
|
||||||
|
|
||||||
ieee80211_tx_status_irqsafe(ar->hw, msdu);
|
|
||||||
@@ -4258,13 +4258,13 @@ void ath10k_wmi_event_host_swba(struct a
|
|
||||||
* Once CSA counter is completed stop sending beacons until
|
|
||||||
* actual channel switch is done
|
|
||||||
*/
|
|
||||||
- if (arvif->vif->csa_active &&
|
|
||||||
+ if (arvif->vif->bss_conf.csa_active &&
|
|
||||||
ieee80211_beacon_cntdwn_is_complete(arvif->vif)) {
|
|
||||||
ieee80211_csa_finish(arvif->vif);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
- bcn = ieee80211_beacon_get(ar->hw, arvif->vif);
|
|
||||||
+ bcn = ieee80211_beacon_get(ar->hw, arvif->vif, 0);
|
|
||||||
if (!bcn) {
|
|
||||||
ath10k_warn(ar, "could not get mac80211 beacon, vdev_id: %i addr: %pM\n",
|
|
||||||
arvif->vdev_id, arvif->vif->addr);
|
|
||||||
--- a/ath10k-5.15/htt_rx.c
|
|
||||||
+++ b/ath10k-5.15/htt_rx.c
|
|
||||||
@@ -4017,7 +4017,7 @@ ath10k_update_per_peer_tx_stats(struct a
|
|
||||||
switch (txrate.flags) {
|
|
||||||
case WMI_RATE_PREAMBLE_OFDM:
|
|
||||||
if (arsta->arvif && arsta->arvif->vif)
|
|
||||||
- conf = rcu_dereference(arsta->arvif->vif->chanctx_conf);
|
|
||||||
+ conf = rcu_dereference(arsta->arvif->vif->bss_conf.chanctx_conf);
|
|
||||||
if (conf && conf->def.chan->band == NL80211_BAND_5GHZ)
|
|
||||||
arsta->tx_info.status.rates[0].idx = rate_idx - 4;
|
|
||||||
break;
|
|
||||||
--- a/ath10k-5.15/wmi-tlv.c
|
|
||||||
+++ b/ath10k-5.15/wmi-tlv.c
|
|
||||||
@@ -205,7 +205,7 @@ static int ath10k_wmi_tlv_event_bcn_tx_s
|
|
||||||
}
|
|
||||||
|
|
||||||
arvif = ath10k_get_arvif(ar, vdev_id);
|
|
||||||
- if (arvif && arvif->is_up && arvif->vif->csa_active)
|
|
||||||
+ if (arvif && arvif->is_up && arvif->vif->bss_conf.csa_active)
|
|
||||||
ieee80211_queue_work(ar->hw, &arvif->ap_csa_work);
|
|
||||||
|
|
||||||
kfree(tb);
|
|
||||||
--- a/ath10k-5.15/core.c
|
|
||||||
+++ b/ath10k-5.15/core.c
|
|
||||||
@@ -4081,7 +4081,7 @@ static int ath10k_core_probe_fw(struct a
|
|
||||||
ath10k_debug_print_board_info(ar);
|
|
||||||
}
|
|
||||||
|
|
||||||
- device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
|
|
||||||
+ device_get_mac_address(ar->dev, ar->mac_addr);
|
|
||||||
|
|
||||||
/* Try to get mac address from device node (from nvmem cell) */
|
|
||||||
of_get_mac_address(ar->dev->of_node, ar->mac_addr);
|
|
||||||
--- a/ath10k-5.15/pci.c
|
|
||||||
+++ b/ath10k-5.15/pci.c
|
|
||||||
@@ -3547,8 +3547,7 @@ static void ath10k_pci_free_irq(struct a
|
|
||||||
|
|
||||||
void ath10k_pci_init_napi(struct ath10k *ar)
|
|
||||||
{
|
|
||||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll,
|
|
||||||
- ATH10K_NAPI_BUDGET);
|
|
||||||
+ netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_pci_napi_poll);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ath10k_pci_init_irq(struct ath10k *ar)
|
|
||||||
--- a/ath10k-5.15/sdio.c
|
|
||||||
+++ b/ath10k-5.15/sdio.c
|
|
||||||
@@ -2531,8 +2531,7 @@ static int ath10k_sdio_probe(struct sdio
|
|
||||||
return -ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll,
|
|
||||||
- ATH10K_NAPI_BUDGET);
|
|
||||||
+ netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_sdio_napi_poll);
|
|
||||||
|
|
||||||
ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
|
||||||
"sdio new func %d vendor 0x%x device 0x%x block 0x%x/0x%x\n",
|
|
||||||
--- a/ath10k-5.15/snoc.c
|
|
||||||
+++ b/ath10k-5.15/snoc.c
|
|
||||||
@@ -1242,8 +1242,7 @@ static int ath10k_snoc_napi_poll(struct
|
|
||||||
|
|
||||||
static void ath10k_snoc_init_napi(struct ath10k *ar)
|
|
||||||
{
|
|
||||||
- netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_snoc_napi_poll,
|
|
||||||
- ATH10K_NAPI_BUDGET);
|
|
||||||
+ netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_snoc_napi_poll);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ath10k_snoc_request_irq(struct ath10k *ar)
|
|
|
@ -1,162 +0,0 @@
|
||||||
From e2333703373e8b81294da5d1c73c30154f75b082 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Lamparter <chunkeey@gmail.com>
|
|
||||||
Date: Fri, 15 Oct 2021 18:56:33 +0200
|
|
||||||
Subject: [PATCH] ath10k: fetch (pre-)calibration data via nvmem subsystem
|
|
||||||
|
|
||||||
On most embedded ath10k devices (like range extenders,
|
|
||||||
routers, accesspoints, ...) the calibration data is
|
|
||||||
stored in a easily accessible MTD partitions named
|
|
||||||
"ART", "caldata", "calibration", etc...
|
|
||||||
|
|
||||||
Since commit 4b361cfa8624 ("mtd: core: add OTP nvmem provider support"):
|
|
||||||
MTD partitions and portions of them can be specified
|
|
||||||
as potential nvmem-cells which are accessible through
|
|
||||||
the nvmem subsystem.
|
|
||||||
|
|
||||||
This feature - together with an nvmem cell definition either
|
|
||||||
in the platform data or via device-tree allows drivers to get
|
|
||||||
the (pre-)calibration data which is required for initializing
|
|
||||||
the WIFI.
|
|
||||||
|
|
||||||
Tested with Netgear EX6150v2 (IPQ4018)
|
|
||||||
|
|
||||||
Cc: Robert Marko <robimarko@gmail.com>
|
|
||||||
Cc: Thibaut Varene <hacks@slashdirt.org>
|
|
||||||
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
|
|
||||||
---
|
|
||||||
--- a/ath10k-5.15/core.c
|
|
||||||
+++ b/ath10k-5.15/core.c
|
|
||||||
@@ -13,6 +13,7 @@
|
|
||||||
#include <linux/dmi.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
#include <linux/pm_qos.h>
|
|
||||||
+#include <linux/nvmem-consumer.h>
|
|
||||||
#include <asm/byteorder.h>
|
|
||||||
#include <linux/ctype.h>
|
|
||||||
|
|
||||||
@@ -1005,7 +1006,8 @@ static int ath10k_core_get_board_id_from
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
|
||||||
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
|
||||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
|
||||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
|
||||||
bmi_board_id_param = BMI_PARAM_GET_FLASH_BOARD_ID;
|
|
||||||
else
|
|
||||||
bmi_board_id_param = BMI_PARAM_GET_EEPROM_BOARD_ID;
|
|
||||||
@@ -2115,7 +2117,8 @@ static int ath10k_download_and_run_otp(s
|
|
||||||
|
|
||||||
/* As of now pre-cal is valid for 10_4 variants */
|
|
||||||
if (ar->cal_mode == ATH10K_PRE_CAL_MODE_DT ||
|
|
||||||
- ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE)
|
|
||||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_FILE ||
|
|
||||||
+ ar->cal_mode == ATH10K_PRE_CAL_MODE_NVMEM)
|
|
||||||
bmi_otp_exe_param = BMI_PARAM_FLASH_SECTION_ALL;
|
|
||||||
|
|
||||||
ret = ath10k_bmi_execute(ar, address, bmi_otp_exe_param, &result);
|
|
||||||
@@ -2249,6 +2252,39 @@ struct ath10k_bss_rom_ie {
|
|
||||||
__le32 rom_len;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
+static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name)
|
|
||||||
+{
|
|
||||||
+ struct nvmem_cell *cell;
|
|
||||||
+ void *buf;
|
|
||||||
+ size_t len;
|
|
||||||
+ int ret;
|
|
||||||
+
|
|
||||||
+ cell = devm_nvmem_cell_get(ar->dev, cell_name);
|
|
||||||
+ if (IS_ERR(cell)) {
|
|
||||||
+ ret = PTR_ERR(cell);
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ buf = nvmem_cell_read(cell, &len);
|
|
||||||
+ if (IS_ERR(buf))
|
|
||||||
+ return PTR_ERR(buf);
|
|
||||||
+
|
|
||||||
+ if (ar->hw_params.cal_data_len != len) {
|
|
||||||
+ kfree(buf);
|
|
||||||
+ ath10k_warn(ar, "invalid calibration data length in nvmem-cell '%s': %zu != %u\n",
|
|
||||||
+ cell_name, len, ar->hw_params.cal_data_len);
|
|
||||||
+ return -EMSGSIZE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = ath10k_download_board_data(ar, buf, len);
|
|
||||||
+ kfree(buf);
|
|
||||||
+ if (ret)
|
|
||||||
+ ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n",
|
|
||||||
+ cell_name, ret);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
|
|
||||||
struct ath10k_fw_file *fw_file)
|
|
||||||
{
|
|
||||||
@@ -2625,6 +2661,18 @@ static int ath10k_core_pre_cal_download(
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
+ ret = ath10k_download_cal_nvmem(ar, "pre-calibration");
|
|
||||||
+ if (ret == 0) {
|
|
||||||
+ ar->cal_mode = ATH10K_PRE_CAL_MODE_NVMEM;
|
|
||||||
+ goto success;
|
|
||||||
+ } else if (ret == -EPROBE_DEFER) {
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
|
||||||
+ "boot did not find a pre-calibration nvmem-cell, try file next: %d\n",
|
|
||||||
+ ret);
|
|
||||||
+
|
|
||||||
ret = ath10k_download_cal_file(ar, ar->pre_cal_file);
|
|
||||||
if (ret == 0) {
|
|
||||||
ar->cal_mode = ATH10K_PRE_CAL_MODE_FILE;
|
|
||||||
@@ -2691,6 +2739,18 @@ static int ath10k_download_cal_data(stru
|
|
||||||
"pre cal download procedure failed, try cal file: %d\n",
|
|
||||||
ret);
|
|
||||||
|
|
||||||
+ ret = ath10k_download_cal_nvmem(ar, "calibration");
|
|
||||||
+ if (ret == 0) {
|
|
||||||
+ ar->cal_mode = ATH10K_CAL_MODE_NVMEM;
|
|
||||||
+ goto done;
|
|
||||||
+ } else if (ret == -EPROBE_DEFER) {
|
|
||||||
+ return ret;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
|
||||||
+ "boot did not find a calibration nvmem-cell, try file next: %d\n",
|
|
||||||
+ ret);
|
|
||||||
+
|
|
||||||
ret = ath10k_download_cal_file(ar, ar->cal_file);
|
|
||||||
if (ret == 0) {
|
|
||||||
ar->cal_mode = ATH10K_CAL_MODE_FILE;
|
|
||||||
--- a/ath10k-5.15/core.h
|
|
||||||
+++ b/ath10k-5.15/core.h
|
|
||||||
@@ -1109,8 +1109,10 @@ enum ath10k_cal_mode {
|
|
||||||
ATH10K_CAL_MODE_FILE,
|
|
||||||
ATH10K_CAL_MODE_OTP,
|
|
||||||
ATH10K_CAL_MODE_DT,
|
|
||||||
+ ATH10K_CAL_MODE_NVMEM,
|
|
||||||
ATH10K_PRE_CAL_MODE_FILE,
|
|
||||||
ATH10K_PRE_CAL_MODE_DT,
|
|
||||||
+ ATH10K_PRE_CAL_MODE_NVMEM,
|
|
||||||
ATH10K_CAL_MODE_EEPROM,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1130,10 +1132,14 @@ static inline const char *ath10k_cal_mod
|
|
||||||
return "otp";
|
|
||||||
case ATH10K_CAL_MODE_DT:
|
|
||||||
return "dt";
|
|
||||||
+ case ATH10K_CAL_MODE_NVMEM:
|
|
||||||
+ return "nvmem";
|
|
||||||
case ATH10K_PRE_CAL_MODE_FILE:
|
|
||||||
return "pre-cal-file";
|
|
||||||
case ATH10K_PRE_CAL_MODE_DT:
|
|
||||||
return "pre-cal-dt";
|
|
||||||
+ case ATH10K_PRE_CAL_MODE_NVMEM:
|
|
||||||
+ return "pre-cal-nvmem";
|
|
||||||
case ATH10K_CAL_MODE_EEPROM:
|
|
||||||
return "eeprom";
|
|
||||||
}
|
|
|
@ -39,9 +39,9 @@ that the feature is properly initialized:
|
||||||
|
|
||||||
Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
|
Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
|
||||||
|
|
||||||
--- a/ath10k-5.15/core.c
|
--- a/ath10k-6.2/core.c
|
||||||
+++ b/ath10k-5.15/core.c
|
+++ b/ath10k-6.2/core.c
|
||||||
@@ -2798,14 +2798,14 @@ done:
|
@@ -2869,14 +2869,14 @@ done:
|
||||||
static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
|
static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
|
||||||
{
|
{
|
||||||
struct device_node *node;
|
struct device_node *node;
|
||||||
|
|
|
@ -66,25 +66,25 @@ v13:
|
||||||
|
|
||||||
* cleanup includes
|
* cleanup includes
|
||||||
|
|
||||||
ath10k-5.15/Kconfig | 10 +++
|
ath10k-6.2/Kconfig | 10 +++
|
||||||
ath10k-5.15/Makefile | 1 +
|
ath10k-6.2/Makefile | 1 +
|
||||||
ath10k-5.15/core.c | 22 +++++++
|
ath10k-6.2/core.c | 22 +++++++
|
||||||
ath10k-5.15/core.h | 9 ++-
|
ath10k-6.2/core.h | 9 ++-
|
||||||
ath10k-5.15/hw.h | 1 +
|
ath10k-6.2/hw.h | 1 +
|
||||||
ath10k-5.15/leds.c | 103 ++++++++++++++++++++++++++++++
|
ath10k-6.2/leds.c | 103 ++++++++++++++++++++++++++++++
|
||||||
ath10k-5.15/leds.h | 45 +++++++++++++
|
ath10k-6.2/leds.h | 45 +++++++++++++
|
||||||
ath10k-5.15/mac.c | 1 +
|
ath10k-6.2/mac.c | 1 +
|
||||||
ath10k-5.15/wmi-ops.h | 32 ++++++++++
|
ath10k-6.2/wmi-ops.h | 32 ++++++++++
|
||||||
ath10k-5.15/wmi-tlv.c | 2 +
|
ath10k-6.2/wmi-tlv.c | 2 +
|
||||||
ath10k-5.15/wmi.c | 54 ++++++++++++++++
|
ath10k-6.2/wmi.c | 54 ++++++++++++++++
|
||||||
ath10k-5.15/wmi.h | 35 ++++++++++
|
ath10k-6.2/wmi.h | 35 ++++++++++
|
||||||
12 files changed, 314 insertions(+), 1 deletion(-)
|
12 files changed, 314 insertions(+), 1 deletion(-)
|
||||||
create mode 100644 ath10k-5.15/leds.c
|
create mode 100644 ath10k-6.2/leds.c
|
||||||
create mode 100644 ath10k-5.15/leds.h
|
create mode 100644 ath10k-6.2/leds.h
|
||||||
|
|
||||||
--- a/ath10k-5.15/Kconfig
|
--- a/ath10k-6.2/Kconfig
|
||||||
+++ b/ath10k-5.15/Kconfig
|
+++ b/ath10k-6.2/Kconfig
|
||||||
@@ -66,6 +66,16 @@ config ATH10K_DEBUGFS
|
@@ -67,6 +67,16 @@ config ATH10K_DEBUGFS
|
||||||
|
|
||||||
If unsure, say Y to make it easier to debug problems.
|
If unsure, say Y to make it easier to debug problems.
|
||||||
|
|
||||||
|
@ -101,8 +101,8 @@ v13:
|
||||||
config ATH10K_SPECTRAL
|
config ATH10K_SPECTRAL
|
||||||
bool "Atheros ath10k spectral scan support"
|
bool "Atheros ath10k spectral scan support"
|
||||||
depends on ATH10K_DEBUGFS
|
depends on ATH10K_DEBUGFS
|
||||||
--- a/ath10k-5.15/Makefile
|
--- a/ath10k-6.2/Makefile
|
||||||
+++ b/ath10k-5.15/Makefile
|
+++ b/ath10k-6.2/Makefile
|
||||||
@@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
|
@@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) +=
|
||||||
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
|
||||||
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
|
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
|
||||||
|
@ -111,8 +111,8 @@ v13:
|
||||||
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
|
ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o
|
||||||
ath10k_core-$(CONFIG_PM) += wow.o
|
ath10k_core-$(CONFIG_PM) += wow.o
|
||||||
ath10k_core-$(CONFIG_ATH10K_CE) += ce.o
|
ath10k_core-$(CONFIG_ATH10K_CE) += ce.o
|
||||||
--- a/ath10k-5.15/core.c
|
--- a/ath10k-6.2/core.c
|
||||||
+++ b/ath10k-5.15/core.c
|
+++ b/ath10k-6.2/core.c
|
||||||
@@ -28,6 +28,7 @@
|
@@ -28,6 +28,7 @@
|
||||||
#include "testmode.h"
|
#include "testmode.h"
|
||||||
#include "wmi-ops.h"
|
#include "wmi-ops.h"
|
||||||
|
@ -121,7 +121,7 @@ v13:
|
||||||
|
|
||||||
/* Disable ath10k-ct DBGLOG output by default */
|
/* Disable ath10k-ct DBGLOG output by default */
|
||||||
unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
|
unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG;
|
||||||
@@ -70,6 +71,7 @@ static const struct ath10k_hw_params ath
|
@@ -78,6 +79,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca988x hw2.0",
|
.name = "qca988x hw2.0",
|
||||||
|
@ -129,7 +129,7 @@ v13:
|
||||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||||
@@ -143,6 +145,7 @@ static const struct ath10k_hw_params ath
|
@@ -159,6 +161,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9887 hw1.0",
|
.name = "qca9887 hw1.0",
|
||||||
|
@ -137,7 +137,7 @@ v13:
|
||||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
|
||||||
@@ -360,6 +363,7 @@ static const struct ath10k_hw_params ath
|
@@ -400,6 +403,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca99x0 hw2.0",
|
.name = "qca99x0 hw2.0",
|
||||||
|
@ -145,7 +145,7 @@ v13:
|
||||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.otp_exe_param = 0x00000700,
|
.otp_exe_param = 0x00000700,
|
||||||
@@ -402,6 +406,7 @@ static const struct ath10k_hw_params ath
|
@@ -446,6 +450,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9984/qca9994 hw1.0",
|
.name = "qca9984/qca9994 hw1.0",
|
||||||
|
@ -153,7 +153,7 @@ v13:
|
||||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||||
@@ -451,6 +456,7 @@ static const struct ath10k_hw_params ath
|
@@ -499,6 +504,7 @@ static const struct ath10k_hw_params ath
|
||||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||||
.bus = ATH10K_BUS_PCI,
|
.bus = ATH10K_BUS_PCI,
|
||||||
.name = "qca9888 hw2.0",
|
.name = "qca9888 hw2.0",
|
||||||
|
@ -161,7 +161,7 @@ v13:
|
||||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||||
.uart_pin = 7,
|
.uart_pin = 7,
|
||||||
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
|
||||||
@@ -3977,6 +3983,10 @@ int ath10k_core_start(struct ath10k *ar,
|
@@ -4080,6 +4086,10 @@ int ath10k_core_start(struct ath10k *ar,
|
||||||
ath10k_wmi_check_apply_board_power_ctl_table(ar);
|
ath10k_wmi_check_apply_board_power_ctl_table(ar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ v13:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_hif_stop:
|
err_hif_stop:
|
||||||
@@ -4238,9 +4248,18 @@ static void ath10k_core_register_work(st
|
@@ -4341,9 +4351,18 @@ static void ath10k_core_register_work(st
|
||||||
goto err_spectral_destroy;
|
goto err_spectral_destroy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ v13:
|
||||||
err_spectral_destroy:
|
err_spectral_destroy:
|
||||||
ath10k_spectral_destroy(ar);
|
ath10k_spectral_destroy(ar);
|
||||||
err_debug_destroy:
|
err_debug_destroy:
|
||||||
@@ -4300,6 +4319,8 @@ void ath10k_core_unregister(struct ath10
|
@@ -4403,6 +4422,8 @@ void ath10k_core_unregister(struct ath10
|
||||||
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -200,8 +200,8 @@ v13:
|
||||||
ath10k_thermal_unregister(ar);
|
ath10k_thermal_unregister(ar);
|
||||||
/* Stop spectral before unregistering from mac80211 to remove the
|
/* Stop spectral before unregistering from mac80211 to remove the
|
||||||
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
* relayfs debugfs file cleanly. Otherwise the parent debugfs tree
|
||||||
--- a/ath10k-5.15/core.h
|
--- a/ath10k-6.2/core.h
|
||||||
+++ b/ath10k-5.15/core.h
|
+++ b/ath10k-6.2/core.h
|
||||||
@@ -14,6 +14,7 @@
|
@@ -14,6 +14,7 @@
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/uuid.h>
|
#include <linux/uuid.h>
|
||||||
|
@ -210,7 +210,7 @@ v13:
|
||||||
|
|
||||||
#include "htt.h"
|
#include "htt.h"
|
||||||
#include "htc.h"
|
#include "htc.h"
|
||||||
@@ -1577,6 +1578,13 @@ struct ath10k {
|
@@ -1586,6 +1587,13 @@ struct ath10k {
|
||||||
} testmode;
|
} testmode;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
@ -224,9 +224,9 @@ v13:
|
||||||
/* protected by data_lock */
|
/* protected by data_lock */
|
||||||
u32 rx_crc_err_drop;
|
u32 rx_crc_err_drop;
|
||||||
u32 fw_crash_counter;
|
u32 fw_crash_counter;
|
||||||
--- a/ath10k-5.15/hw.h
|
--- a/ath10k-6.2/hw.h
|
||||||
+++ b/ath10k-5.15/hw.h
|
+++ b/ath10k-6.2/hw.h
|
||||||
@@ -521,6 +521,7 @@ struct ath10k_hw_params {
|
@@ -523,6 +523,7 @@ struct ath10k_hw_params {
|
||||||
const char *name;
|
const char *name;
|
||||||
u32 patch_load_addr;
|
u32 patch_load_addr;
|
||||||
int uart_pin;
|
int uart_pin;
|
||||||
|
@ -235,7 +235,7 @@ v13:
|
||||||
|
|
||||||
/* Type of hw cycle counter wraparound logic, for more info
|
/* Type of hw cycle counter wraparound logic, for more info
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/ath10k-5.15/leds.c
|
+++ b/ath10k-6.2/leds.c
|
||||||
@@ -0,0 +1,103 @@
|
@@ -0,0 +1,103 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
|
+ * Copyright (c) 2005-2011 Atheros Communications Inc.
|
||||||
|
@ -341,7 +341,7 @@ v13:
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/ath10k-5.15/leds.h
|
+++ b/ath10k-6.2/leds.h
|
||||||
@@ -0,0 +1,41 @@
|
@@ -0,0 +1,41 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
|
||||||
|
@ -384,8 +384,8 @@ v13:
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
+#endif /* _LEDS_H_ */
|
+#endif /* _LEDS_H_ */
|
||||||
--- a/ath10k-5.15/mac.c
|
--- a/ath10k-6.2/mac.c
|
||||||
+++ b/ath10k-5.15/mac.c
|
+++ b/ath10k-6.2/mac.c
|
||||||
@@ -25,6 +25,7 @@
|
@@ -25,6 +25,7 @@
|
||||||
#include "wmi-tlv.h"
|
#include "wmi-tlv.h"
|
||||||
#include "wmi-ops.h"
|
#include "wmi-ops.h"
|
||||||
|
@ -394,8 +394,8 @@ v13:
|
||||||
|
|
||||||
/*********/
|
/*********/
|
||||||
/* Rates */
|
/* Rates */
|
||||||
--- a/ath10k-5.15/wmi-ops.h
|
--- a/ath10k-6.2/wmi-ops.h
|
||||||
+++ b/ath10k-5.15/wmi-ops.h
|
+++ b/ath10k-6.2/wmi-ops.h
|
||||||
@@ -228,7 +228,10 @@ struct wmi_ops {
|
@@ -228,7 +228,10 @@ struct wmi_ops {
|
||||||
const struct wmi_bb_timing_cfg_arg *arg);
|
const struct wmi_bb_timing_cfg_arg *arg);
|
||||||
struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar,
|
struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar,
|
||||||
|
@ -443,9 +443,9 @@ v13:
|
||||||
static inline int
|
static inline int
|
||||||
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level)
|
||||||
{
|
{
|
||||||
--- a/ath10k-5.15/wmi-tlv.c
|
--- a/ath10k-6.2/wmi-tlv.c
|
||||||
+++ b/ath10k-5.15/wmi-tlv.c
|
+++ b/ath10k-6.2/wmi-tlv.c
|
||||||
@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
|
@@ -4601,6 +4601,8 @@ static const struct wmi_ops wmi_tlv_ops
|
||||||
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
|
||||||
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
|
||||||
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
|
||||||
|
@ -454,9 +454,9 @@ v13:
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
|
||||||
--- a/ath10k-5.15/wmi.c
|
--- a/ath10k-6.2/wmi.c
|
||||||
+++ b/ath10k-5.15/wmi.c
|
+++ b/ath10k-6.2/wmi.c
|
||||||
@@ -8413,6 +8413,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
@@ -8438,6 +8438,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ v13:
|
||||||
static struct sk_buff *
|
static struct sk_buff *
|
||||||
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
|
||||||
enum wmi_sta_ps_mode psmode)
|
enum wmi_sta_ps_mode psmode)
|
||||||
@@ -10244,6 +10287,9 @@ static const struct wmi_ops wmi_ops = {
|
@@ -10269,6 +10312,9 @@ static const struct wmi_ops wmi_ops = {
|
||||||
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
|
@ -516,7 +516,7 @@ v13:
|
||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -10314,6 +10360,8 @@ static const struct wmi_ops wmi_10_1_ops
|
@@ -10339,6 +10385,8 @@ static const struct wmi_ops wmi_10_1_ops
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
|
@ -525,7 +525,7 @@ v13:
|
||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -10393,6 +10441,8 @@ static const struct wmi_ops wmi_10_2_ops
|
@@ -10418,6 +10466,8 @@ static const struct wmi_ops wmi_10_2_ops
|
||||||
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
|
||||||
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
|
||||||
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
|
||||||
|
@ -534,7 +534,7 @@ v13:
|
||||||
/* .gen_pdev_enable_adaptive_cca not implemented */
|
/* .gen_pdev_enable_adaptive_cca not implemented */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -10464,6 +10514,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
@@ -10489,6 +10539,8 @@ static const struct wmi_ops wmi_10_2_4_o
|
||||||
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
|
||||||
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
|
||||||
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
|
||||||
|
@ -543,7 +543,7 @@ v13:
|
||||||
/* .gen_bcn_tmpl not implemented */
|
/* .gen_bcn_tmpl not implemented */
|
||||||
/* .gen_prb_tmpl not implemented */
|
/* .gen_prb_tmpl not implemented */
|
||||||
/* .gen_p2p_go_bcn_ie not implemented */
|
/* .gen_p2p_go_bcn_ie not implemented */
|
||||||
@@ -10546,6 +10598,8 @@ static const struct wmi_ops wmi_10_4_ops
|
@@ -10571,6 +10623,8 @@ static const struct wmi_ops wmi_10_4_ops
|
||||||
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
|
||||||
.gen_echo = ath10k_wmi_op_gen_echo,
|
.gen_echo = ath10k_wmi_op_gen_echo,
|
||||||
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
|
||||||
|
@ -552,8 +552,8 @@ v13:
|
||||||
};
|
};
|
||||||
|
|
||||||
int ath10k_wmi_attach(struct ath10k *ar)
|
int ath10k_wmi_attach(struct ath10k *ar)
|
||||||
--- a/ath10k-5.15/wmi.h
|
--- a/ath10k-6.2/wmi.h
|
||||||
+++ b/ath10k-5.15/wmi.h
|
+++ b/ath10k-6.2/wmi.h
|
||||||
@@ -3133,6 +3133,41 @@ enum wmi_10_4_feature_mask {
|
@@ -3133,6 +3133,41 @@ enum wmi_10_4_feature_mask {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,14 +9,14 @@ traffic.
|
||||||
|
|
||||||
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||||
---
|
---
|
||||||
ath10k-5.15/core.h | 4 ++++
|
ath10k-6.2/core.h | 4 ++++
|
||||||
ath10k-5.15/leds.c | 4 +---
|
ath10k-6.2/leds.c | 4 +---
|
||||||
ath10k-5.15/mac.c | 2 +-
|
ath10k-6.2/mac.c | 2 +-
|
||||||
3 files changed, 6 insertions(+), 4 deletions(-)
|
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- a/ath10k-5.15/core.h
|
--- a/ath10k-6.2/core.h
|
||||||
+++ b/ath10k-5.15/core.h
|
+++ b/ath10k-6.2/core.h
|
||||||
@@ -1692,6 +1692,10 @@ struct ath10k {
|
@@ -1701,6 +1701,10 @@ struct ath10k {
|
||||||
u8 csi_data[4096];
|
u8 csi_data[4096];
|
||||||
u16 csi_data_len;
|
u16 csi_data_len;
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||||
/* must be last */
|
/* must be last */
|
||||||
u8 drv_priv[] __aligned(sizeof(void *));
|
u8 drv_priv[] __aligned(sizeof(void *));
|
||||||
};
|
};
|
||||||
--- a/ath10k-5.15/leds.c
|
--- a/ath10k-6.2/leds.c
|
||||||
+++ b/ath10k-5.15/leds.c
|
+++ b/ath10k-6.2/leds.c
|
||||||
@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
|
@@ -81,9 +81,7 @@ int ath10k_leds_register(struct ath10k *
|
||||||
|
|
||||||
ar->leds.cdev.name = ar->leds.label;
|
ar->leds.cdev.name = ar->leds.label;
|
||||||
|
@ -40,9 +40,9 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||||
|
|
||||||
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
--- a/ath10k-5.15/mac.c
|
--- a/ath10k-6.2/mac.c
|
||||||
+++ b/ath10k-5.15/mac.c
|
+++ b/ath10k-6.2/mac.c
|
||||||
@@ -11551,7 +11551,7 @@ int ath10k_mac_register(struct ath10k *a
|
@@ -11617,7 +11617,7 @@ int ath10k_mac_register(struct ath10k *a
|
||||||
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
|
||||||
|
|
||||||
#ifdef CPTCFG_MAC80211_LEDS
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
|
|
|
@ -1,222 +0,0 @@
|
||||||
From 3b07c3a6e4adebd0466f5e539f318224db8cfc37 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
||||||
Date: Sat, 6 May 2023 15:29:52 +0200
|
|
||||||
Subject: [PATCH] ath10k-ct: fix compilation warning for debug level
|
|
||||||
|
|
||||||
Rework read_debug_level function as it does exceed the stack limit for
|
|
||||||
some arch.
|
|
||||||
Fix compilation error:
|
|
||||||
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/ath10k-ct-regular/ath10k-ct-2022-05-13-f808496f/ath10k-5.15/debug.c: In function 'ath10k_read_debug_level':
|
|
||||||
/__w/openwrt/openwrt/openwrt/build_dir/target-mips-openwrt-linux-musl_musl/linux-malta_be/ath10k-ct-regular/ath10k-ct-2022-05-13-f808496f/ath10k-5.15/debug.c:1388:1: error: the frame size of 1440 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
|
|
||||||
1388 | }
|
|
||||||
| ^
|
|
||||||
|
|
||||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
||||||
---
|
|
||||||
ath10k-5.15/debug.c | 85 +++++++++++++++++++++++++--------------------
|
|
||||||
ath10k-5.17/debug.c | 85 +++++++++++++++++++++++++--------------------
|
|
||||||
2 files changed, 96 insertions(+), 74 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ath10k-5.15/debug.c b/ath10k-5.15/debug.c
|
|
||||||
index af84012..d0fa911 100644
|
|
||||||
--- a/ath10k-5.15/debug.c
|
|
||||||
+++ b/ath10k-5.15/debug.c
|
|
||||||
@@ -1344,47 +1344,58 @@ static const struct file_operations fops_simulate_fw_crash = {
|
|
||||||
.llseek = default_llseek,
|
|
||||||
};
|
|
||||||
|
|
||||||
+static const char debug_level_buf[] =
|
|
||||||
+ "To change debug level, set value adding up desired flags:\n"
|
|
||||||
+ "PCI: 0x1\n"
|
|
||||||
+ "WMI: 0x2\n"
|
|
||||||
+ "HTC: 0x4\n"
|
|
||||||
+ "HTT: 0x8\n"
|
|
||||||
+ "MAC: 0x10\n"
|
|
||||||
+ "BOOT: 0x20\n"
|
|
||||||
+ "PCI-DUMP: 0x40\n"
|
|
||||||
+ "HTT-DUMP: 0x80\n"
|
|
||||||
+ "MGMT: 0x100\n"
|
|
||||||
+ "DATA: 0x200\n"
|
|
||||||
+ "BMI: 0x400\n"
|
|
||||||
+ "REGULATORY: 0x800\n"
|
|
||||||
+ "TESTMODE: 0x1000\n"
|
|
||||||
+ "WMI-PRINT: 0x2000\n"
|
|
||||||
+ "PCI-PS: 0x4000\n"
|
|
||||||
+ "AHB: 0x8000\n"
|
|
||||||
+ "SDIO: 0x10000\n"
|
|
||||||
+ "SDIO_DUMP: 0x20000\n"
|
|
||||||
+ "USB: 0x40000\n"
|
|
||||||
+ "USB_BULK: 0x80000\n"
|
|
||||||
+ "SNOC: 0x100000\n"
|
|
||||||
+ "QMI: 0x200000\n"
|
|
||||||
+ "BEACONS: 0x8000000\n"
|
|
||||||
+ "NO-FW-DBGLOG:0x10000000\n"
|
|
||||||
+ "MAC2: 0x20000000\n"
|
|
||||||
+ "INFO-AS-DBG: 0x40000000\n"
|
|
||||||
+ "FW: 0x80000000\n"
|
|
||||||
+ "ALL: 0xEFFFFFFF\n";
|
|
||||||
+
|
|
||||||
+#define READ_DEBUG_LEVEL_SIZE sizeof(debug_level_buf) + 60
|
|
||||||
+
|
|
||||||
static ssize_t ath10k_read_debug_level(struct file *file,
|
|
||||||
char __user *user_buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
- int sz;
|
|
||||||
- const char buf[] =
|
|
||||||
- "To change debug level, set value adding up desired flags:\n"
|
|
||||||
- "PCI: 0x1\n"
|
|
||||||
- "WMI: 0x2\n"
|
|
||||||
- "HTC: 0x4\n"
|
|
||||||
- "HTT: 0x8\n"
|
|
||||||
- "MAC: 0x10\n"
|
|
||||||
- "BOOT: 0x20\n"
|
|
||||||
- "PCI-DUMP: 0x40\n"
|
|
||||||
- "HTT-DUMP: 0x80\n"
|
|
||||||
- "MGMT: 0x100\n"
|
|
||||||
- "DATA: 0x200\n"
|
|
||||||
- "BMI: 0x400\n"
|
|
||||||
- "REGULATORY: 0x800\n"
|
|
||||||
- "TESTMODE: 0x1000\n"
|
|
||||||
- "WMI-PRINT: 0x2000\n"
|
|
||||||
- "PCI-PS: 0x4000\n"
|
|
||||||
- "AHB: 0x8000\n"
|
|
||||||
- "SDIO: 0x10000\n"
|
|
||||||
- "SDIO_DUMP: 0x20000\n"
|
|
||||||
- "USB: 0x40000\n"
|
|
||||||
- "USB_BULK: 0x80000\n"
|
|
||||||
- "SNOC: 0x100000\n"
|
|
||||||
- "QMI: 0x200000\n"
|
|
||||||
- "BEACONS: 0x8000000\n"
|
|
||||||
- "NO-FW-DBGLOG:0x10000000\n"
|
|
||||||
- "MAC2: 0x20000000\n"
|
|
||||||
- "INFO-AS-DBG: 0x40000000\n"
|
|
||||||
- "FW: 0x80000000\n"
|
|
||||||
- "ALL: 0xEFFFFFFF\n";
|
|
||||||
- char wbuf[sizeof(buf) + 60];
|
|
||||||
- sz = snprintf(wbuf, sizeof(wbuf), "Current debug level: 0x%x\n\n%s",
|
|
||||||
- ath10k_debug_mask, buf);
|
|
||||||
- wbuf[sizeof(wbuf) - 1] = 0;
|
|
||||||
-
|
|
||||||
- return simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
|
||||||
+ int sz, ret;
|
|
||||||
+ char *wbuf;
|
|
||||||
+
|
|
||||||
+ wbuf = kcalloc(READ_DEBUG_LEVEL_SIZE, sizeof(char), GFP_KERNEL);
|
|
||||||
+ if (!wbuf)
|
|
||||||
+ return -ENOMEM;
|
|
||||||
+
|
|
||||||
+ sz = snprintf(wbuf, READ_DEBUG_LEVEL_SIZE,
|
|
||||||
+ "Current debug level: 0x%x\n\n%s",
|
|
||||||
+ ath10k_debug_mask, debug_level_buf);
|
|
||||||
+
|
|
||||||
+ ret = simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
|
||||||
+ kfree(wbuf);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set logging level.
|
|
||||||
diff --git a/ath10k-5.17/debug.c b/ath10k-5.17/debug.c
|
|
||||||
index af84012..d0fa911 100644
|
|
||||||
--- a/ath10k-5.17/debug.c
|
|
||||||
+++ b/ath10k-5.17/debug.c
|
|
||||||
@@ -1344,47 +1344,58 @@ static const struct file_operations fops_simulate_fw_crash = {
|
|
||||||
.llseek = default_llseek,
|
|
||||||
};
|
|
||||||
|
|
||||||
+static const char debug_level_buf[] =
|
|
||||||
+ "To change debug level, set value adding up desired flags:\n"
|
|
||||||
+ "PCI: 0x1\n"
|
|
||||||
+ "WMI: 0x2\n"
|
|
||||||
+ "HTC: 0x4\n"
|
|
||||||
+ "HTT: 0x8\n"
|
|
||||||
+ "MAC: 0x10\n"
|
|
||||||
+ "BOOT: 0x20\n"
|
|
||||||
+ "PCI-DUMP: 0x40\n"
|
|
||||||
+ "HTT-DUMP: 0x80\n"
|
|
||||||
+ "MGMT: 0x100\n"
|
|
||||||
+ "DATA: 0x200\n"
|
|
||||||
+ "BMI: 0x400\n"
|
|
||||||
+ "REGULATORY: 0x800\n"
|
|
||||||
+ "TESTMODE: 0x1000\n"
|
|
||||||
+ "WMI-PRINT: 0x2000\n"
|
|
||||||
+ "PCI-PS: 0x4000\n"
|
|
||||||
+ "AHB: 0x8000\n"
|
|
||||||
+ "SDIO: 0x10000\n"
|
|
||||||
+ "SDIO_DUMP: 0x20000\n"
|
|
||||||
+ "USB: 0x40000\n"
|
|
||||||
+ "USB_BULK: 0x80000\n"
|
|
||||||
+ "SNOC: 0x100000\n"
|
|
||||||
+ "QMI: 0x200000\n"
|
|
||||||
+ "BEACONS: 0x8000000\n"
|
|
||||||
+ "NO-FW-DBGLOG:0x10000000\n"
|
|
||||||
+ "MAC2: 0x20000000\n"
|
|
||||||
+ "INFO-AS-DBG: 0x40000000\n"
|
|
||||||
+ "FW: 0x80000000\n"
|
|
||||||
+ "ALL: 0xEFFFFFFF\n";
|
|
||||||
+
|
|
||||||
+#define READ_DEBUG_LEVEL_SIZE sizeof(debug_level_buf) + 60
|
|
||||||
+
|
|
||||||
static ssize_t ath10k_read_debug_level(struct file *file,
|
|
||||||
char __user *user_buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
- int sz;
|
|
||||||
- const char buf[] =
|
|
||||||
- "To change debug level, set value adding up desired flags:\n"
|
|
||||||
- "PCI: 0x1\n"
|
|
||||||
- "WMI: 0x2\n"
|
|
||||||
- "HTC: 0x4\n"
|
|
||||||
- "HTT: 0x8\n"
|
|
||||||
- "MAC: 0x10\n"
|
|
||||||
- "BOOT: 0x20\n"
|
|
||||||
- "PCI-DUMP: 0x40\n"
|
|
||||||
- "HTT-DUMP: 0x80\n"
|
|
||||||
- "MGMT: 0x100\n"
|
|
||||||
- "DATA: 0x200\n"
|
|
||||||
- "BMI: 0x400\n"
|
|
||||||
- "REGULATORY: 0x800\n"
|
|
||||||
- "TESTMODE: 0x1000\n"
|
|
||||||
- "WMI-PRINT: 0x2000\n"
|
|
||||||
- "PCI-PS: 0x4000\n"
|
|
||||||
- "AHB: 0x8000\n"
|
|
||||||
- "SDIO: 0x10000\n"
|
|
||||||
- "SDIO_DUMP: 0x20000\n"
|
|
||||||
- "USB: 0x40000\n"
|
|
||||||
- "USB_BULK: 0x80000\n"
|
|
||||||
- "SNOC: 0x100000\n"
|
|
||||||
- "QMI: 0x200000\n"
|
|
||||||
- "BEACONS: 0x8000000\n"
|
|
||||||
- "NO-FW-DBGLOG:0x10000000\n"
|
|
||||||
- "MAC2: 0x20000000\n"
|
|
||||||
- "INFO-AS-DBG: 0x40000000\n"
|
|
||||||
- "FW: 0x80000000\n"
|
|
||||||
- "ALL: 0xEFFFFFFF\n";
|
|
||||||
- char wbuf[sizeof(buf) + 60];
|
|
||||||
- sz = snprintf(wbuf, sizeof(wbuf), "Current debug level: 0x%x\n\n%s",
|
|
||||||
- ath10k_debug_mask, buf);
|
|
||||||
- wbuf[sizeof(wbuf) - 1] = 0;
|
|
||||||
-
|
|
||||||
- return simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
|
||||||
+ int sz, ret;
|
|
||||||
+ char *wbuf;
|
|
||||||
+
|
|
||||||
+ wbuf = kcalloc(READ_DEBUG_LEVEL_SIZE, sizeof(char), GFP_KERNEL);
|
|
||||||
+ if (!wbuf)
|
|
||||||
+ return -ENOMEM;
|
|
||||||
+
|
|
||||||
+ sz = snprintf(wbuf, READ_DEBUG_LEVEL_SIZE,
|
|
||||||
+ "Current debug level: 0x%x\n\n%s",
|
|
||||||
+ ath10k_debug_mask, debug_level_buf);
|
|
||||||
+
|
|
||||||
+ ret = simple_read_from_buffer(user_buf, count, ppos, wbuf, sz);
|
|
||||||
+ kfree(wbuf);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set logging level.
|
|
||||||
--
|
|
||||||
2.39.2
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
From 0d2e335d780bda1432a9ba719c8200f796d27854 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Robert Marko <robimarko@gmail.com>
|
|
||||||
Date: Mon, 29 Nov 2021 12:27:12 +0100
|
|
||||||
Subject: [PATCH] ath10k-ct: Fix spectral scan NULL pointer
|
|
||||||
|
|
||||||
If spectral scan support is enabled then ath10k-ct will cause a NULL
|
|
||||||
pointer due to relay_open() being called with a const callback struct
|
|
||||||
which is only supported in kernel 5.11 and later.
|
|
||||||
|
|
||||||
So, simply check the kernel version and if 5.11 and newer use the const
|
|
||||||
callback struct, otherwise use the regular struct.
|
|
||||||
|
|
||||||
Fixes: 553a3ac ("ath10k-ct: use 5.15 version")
|
|
||||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
||||||
---
|
|
||||||
ath10k-5.15/spectral.c | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
--- a/ath10k-5.15/spectral.c
|
|
||||||
+++ b/ath10k-5.15/spectral.c
|
|
||||||
@@ -497,7 +497,11 @@ static int remove_buf_file_handler(struc
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_IS_GEQ(5,11,0)
|
|
||||||
static const struct rchan_callbacks rfs_spec_scan_cb = {
|
|
||||||
+#else
|
|
||||||
+static struct rchan_callbacks rfs_spec_scan_cb = {
|
|
||||||
+#endif
|
|
||||||
.create_buf_file = create_buf_file_handler,
|
|
||||||
.remove_buf_file = remove_buf_file_handler,
|
|
||||||
};
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- a/ath10k-5.15/htt.h
|
--- a/ath10k-6.2/htt.h
|
||||||
+++ b/ath10k-5.15/htt.h
|
+++ b/ath10k-6.2/htt.h
|
||||||
@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
|
@@ -237,7 +237,11 @@ enum htt_rx_ring_flags {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--- a/ath10k-5.15/pci.c
|
--- a/ath10k-6.2/pci.c
|
||||||
+++ b/ath10k-5.15/pci.c
|
+++ b/ath10k-6.2/pci.c
|
||||||
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_
|
@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_
|
||||||
.flags = CE_ATTR_FLAGS,
|
.flags = CE_ATTR_FLAGS,
|
||||||
.src_nentries = 0,
|
.src_nentries = 0,
|
||||||
|
|
|
@ -111,6 +111,7 @@ $(eval $(call KernelPackage,libphy))
|
||||||
define KernelPackage/phylink
|
define KernelPackage/phylink
|
||||||
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||||
TITLE:=Model for MAC to optional PHY connection
|
TITLE:=Model for MAC to optional PHY connection
|
||||||
|
DEPENDS:=+kmod-libphy
|
||||||
KCONFIG:=CONFIG_PHYLINK
|
KCONFIG:=CONFIG_PHYLINK
|
||||||
FILES:=$(LINUX_DIR)/drivers/net/phy/phylink.ko
|
FILES:=$(LINUX_DIR)/drivers/net/phy/phylink.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,15,phylink,1)
|
AUTOLOAD:=$(call AutoLoad,15,phylink,1)
|
||||||
|
@ -1540,3 +1541,18 @@ endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,lan743x))
|
$(eval $(call KernelPackage,lan743x))
|
||||||
|
|
||||||
|
define KernelPackage/amazon-ena
|
||||||
|
SUBMENU:=$(NETWORK_DEVICES_MENU)
|
||||||
|
TITLE:=Elastic Network Adapter (for Amazon AWS)
|
||||||
|
DEPENDS:=@TARGET_x86_64||TARGET_armvirt_64
|
||||||
|
KCONFIG:=CONFIG_ENA_ETHERNET
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/net/ethernet/amazon/ena/ena.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,12,ena)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/amazon-ena/description
|
||||||
|
This driver supports Elastic Network Adapter (ENA)
|
||||||
|
used by Amazon AWS T3 (2018) and later instances.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,amazon-ena))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2010 OpenWrt.org
|
# Copyright (C) 2006-2023 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
|
@ -1147,6 +1147,26 @@ endef
|
||||||
$(eval $(call KernelPackage,nft-bridge))
|
$(eval $(call KernelPackage,nft-bridge))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/nft-dup-inet
|
||||||
|
SUBMENU:=$(NF_MENU)
|
||||||
|
TITLE:=Netfilter nf_tables dup in ip/ip6/inet familly support
|
||||||
|
DEPENDS:=+kmod-nft-core +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_NF_DUP_IPV4 \
|
||||||
|
CONFIG_NF_DUP_IPV6 \
|
||||||
|
CONFIG_NFT_DUP_IPV4 \
|
||||||
|
CONFIG_NFT_DUP_IPV6
|
||||||
|
FILES:= \
|
||||||
|
$(LINUX_DIR)/net/ipv4/netfilter/nf_dup_ipv4.ko \
|
||||||
|
$(LINUX_DIR)/net/ipv6/netfilter/nf_dup_ipv6.ko \
|
||||||
|
$(LINUX_DIR)/net/ipv4/netfilter/nft_dup_ipv4.ko \
|
||||||
|
$(LINUX_DIR)/net/ipv6/netfilter/nft_dup_ipv6.ko
|
||||||
|
AUTOLOAD:=$(call AutoProbe,nf_dup_ipv4 nf_dup_ipv6 nft_dup_ipv4 nft_dup_ipv6)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,nft-dup-inet))
|
||||||
|
|
||||||
|
|
||||||
define KernelPackage/nft-nat
|
define KernelPackage/nft-nat
|
||||||
SUBMENU:=$(NF_MENU)
|
SUBMENU:=$(NF_MENU)
|
||||||
TITLE:=Netfilter nf_tables NAT support
|
TITLE:=Netfilter nf_tables NAT support
|
||||||
|
|
|
@ -1275,7 +1275,8 @@ define KernelPackage/rxrpc
|
||||||
FILES:= \
|
FILES:= \
|
||||||
$(LINUX_DIR)/net/rxrpc/rxrpc.ko
|
$(LINUX_DIR)/net/rxrpc/rxrpc.ko
|
||||||
AUTOLOAD:=$(call AutoLoad,30,rxrpc.ko)
|
AUTOLOAD:=$(call AutoLoad,30,rxrpc.ko)
|
||||||
DEPENDS:= +kmod-crypto-manager +kmod-crypto-pcbc +kmod-crypto-fcrypt
|
DEPENDS:= +kmod-crypto-manager +kmod-crypto-pcbc +kmod-crypto-fcrypt \
|
||||||
|
+kmod-udptunnel4 +kmod-udptunnel6
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KernelPackage/rxrpc/description
|
define KernelPackage/rxrpc/description
|
||||||
|
@ -1362,6 +1363,21 @@ endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,mdio))
|
$(eval $(call KernelPackage,mdio))
|
||||||
|
|
||||||
|
define KernelPackage/mdio-bus-mux
|
||||||
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
|
TITLE:=MDIO bus multiplexers
|
||||||
|
KCONFIG:=CONFIG_MDIO_BUS_MUX
|
||||||
|
HIDDEN:=1
|
||||||
|
FILES:=$(LINUX_DIR)/drivers/net/mdio/mdio-mux.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,32,mdio-mux)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/mdio/description
|
||||||
|
Kernel framework for MDIO bus multiplexers.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,mdio-bus-mux))
|
||||||
|
|
||||||
define KernelPackage/macsec
|
define KernelPackage/macsec
|
||||||
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
SUBMENU:=$(NETWORK_SUPPORT_MENU)
|
||||||
TITLE:=IEEE 802.1AE MAC-level encryption (MAC)
|
TITLE:=IEEE 802.1AE MAC-level encryption (MAC)
|
||||||
|
|
|
@ -331,17 +331,6 @@ define KernelPackage/usb-bcma
|
||||||
endef
|
endef
|
||||||
$(eval $(call KernelPackage,usb-bcma))
|
$(eval $(call KernelPackage,usb-bcma))
|
||||||
|
|
||||||
define KernelPackage/usb-fotg210
|
|
||||||
TITLE:=Support for FOTG210 USB host controllers
|
|
||||||
DEPENDS:=@USB_SUPPORT @TARGET_gemini
|
|
||||||
KCONFIG:=CONFIG_USB_FOTG210_HCD
|
|
||||||
FILES:= \
|
|
||||||
$(if $(CONFIG_USB_FOTG210_HCD),$(LINUX_DIR)/drivers/usb/host/fotg210-hcd.ko)
|
|
||||||
AUTOLOAD:=$(call AutoLoad,50,fotg210-hcd,1)
|
|
||||||
$(call AddDepends/usb)
|
|
||||||
endef
|
|
||||||
$(eval $(call KernelPackage,usb-fotg210))
|
|
||||||
|
|
||||||
define KernelPackage/usb-ssb
|
define KernelPackage/usb-ssb
|
||||||
TITLE:=Support for SSB USB controllers
|
TITLE:=Support for SSB USB controllers
|
||||||
DEPENDS:=@USB_SUPPORT @TARGET_bcm47xx
|
DEPENDS:=@USB_SUPPORT @TARGET_bcm47xx
|
||||||
|
@ -1285,7 +1274,7 @@ $(eval $(call KernelPackage,usb-net-smsc75xx))
|
||||||
|
|
||||||
define KernelPackage/usb-net-smsc95xx
|
define KernelPackage/usb-net-smsc95xx
|
||||||
TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices
|
TITLE:=SMSC LAN95XX based USB 2.0 10/100 ethernet devices
|
||||||
DEPENDS:=+kmod-libphy +kmod-phy-smsc
|
DEPENDS:=+kmod-libphy +kmod-phy-smsc +LINUX_6_1:kmod-net-selftests
|
||||||
KCONFIG:=CONFIG_USB_NET_SMSC95XX
|
KCONFIG:=CONFIG_USB_NET_SMSC95XX
|
||||||
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko
|
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/smsc95xx.ko
|
||||||
AUTOLOAD:=$(call AutoProbe,smsc95xx)
|
AUTOLOAD:=$(call AutoProbe,smsc95xx)
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
--- a/net/wireless/Kconfig
|
|
||||||
+++ b/net/wireless/Kconfig
|
|
||||||
@@ -188,7 +188,7 @@ config CFG80211_WEXT_EXPORT
|
|
||||||
endif # CFG80211
|
|
||||||
|
|
||||||
config LIB80211
|
|
||||||
- tristate
|
|
||||||
+ tristate "lib80211"
|
|
||||||
depends on m
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
@@ -198,19 +198,19 @@ config LIB80211
|
|
||||||
Drivers should select this themselves if needed.
|
|
||||||
|
|
||||||
config LIB80211_CRYPT_WEP
|
|
||||||
- tristate
|
|
||||||
+ tristate "lib80211 WEP support"
|
|
||||||
depends on m
|
|
||||||
select BPAUTO_CRYPTO_LIB_ARC4
|
|
||||||
|
|
||||||
config LIB80211_CRYPT_CCMP
|
|
||||||
- tristate
|
|
||||||
+ tristate "lib80211 CCMP support"
|
|
||||||
depends on m
|
|
||||||
depends on CRYPTO
|
|
||||||
depends on CRYPTO_AES
|
|
||||||
depends on CRYPTO_CCM
|
|
||||||
|
|
||||||
config LIB80211_CRYPT_TKIP
|
|
||||||
- tristate
|
|
||||||
+ tristate "lib80211 TKIP support"
|
|
||||||
depends on m
|
|
||||||
select BPAUTO_CRYPTO_LIB_ARC4
|
|
||||||
|
|
|
@ -18,8 +18,6 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c | 8 ++++++--
|
hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c | 8 ++++++--
|
||||||
2 files changed, 12 insertions(+), 6 deletions(-)
|
2 files changed, 12 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
diff --git a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
|
||||||
index 1d748db..e81c461 100644
|
|
||||||
--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
||||||
+++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
+++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
||||||
@@ -589,10 +589,12 @@ drop:
|
@@ -589,10 +589,12 @@ drop:
|
||||||
|
@ -39,11 +37,9 @@ index 1d748db..e81c461 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO - check if this is needed */
|
/* TODO - check if this is needed */
|
||||||
diff --git a/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c b/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c
|
|
||||||
index 5780a30..a002a79 100644
|
|
||||||
--- a/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c
|
--- a/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c
|
||||||
+++ b/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c
|
+++ b/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c
|
||||||
@@ -410,8 +410,12 @@ static uint32_t edma_clean_rx(struct edma_hw *ehw,
|
@@ -410,8 +410,12 @@ static uint32_t edma_clean_rx(struct edm
|
||||||
if (unlikely(EDMA_RXPH_SERVICE_CODE_GET(rxph) ==
|
if (unlikely(EDMA_RXPH_SERVICE_CODE_GET(rxph) ==
|
||||||
NSS_PTP_EVENT_SERVICE_CODE))
|
NSS_PTP_EVENT_SERVICE_CODE))
|
||||||
nss_phy_tstamp_rx_buf(ndev, skb);
|
nss_phy_tstamp_rx_buf(ndev, skb);
|
||||||
|
@ -58,6 +54,3 @@ index 5780a30..a002a79 100644
|
||||||
|
|
||||||
next_rx_desc:
|
next_rx_desc:
|
||||||
/*
|
/*
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,9 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
nss_dp_main.c | 17 ++++++++++++++---
|
nss_dp_main.c | 17 ++++++++++++++---
|
||||||
1 file changed, 14 insertions(+), 3 deletions(-)
|
1 file changed, 14 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
diff --git a/nss_dp_main.c b/nss_dp_main.c
|
|
||||||
index 18e1088..19e14fb 100644
|
|
||||||
--- a/nss_dp_main.c
|
--- a/nss_dp_main.c
|
||||||
+++ b/nss_dp_main.c
|
+++ b/nss_dp_main.c
|
||||||
@@ -685,18 +685,29 @@ static int32_t nss_dp_probe(struct platform_device *pdev)
|
@@ -685,18 +685,29 @@ static int32_t nss_dp_probe(struct platf
|
||||||
struct nss_dp_dev *dp_priv;
|
struct nss_dp_dev *dp_priv;
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
struct nss_gmac_hal_platform_data gmac_hal_pdata;
|
struct nss_gmac_hal_platform_data gmac_hal_pdata;
|
||||||
|
@ -50,6 +48,3 @@ index 18e1088..19e14fb 100644
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
From ff9284e3a59982c78a0132e6f2c5e3f04ba11472 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Thu, 29 Sep 2022 20:37:46 +0200
|
||||||
|
Subject: [PATCH 15/16] nss-dp: netdev mac_addr is const
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
exports/nss_dp_api_if.h | 2 +-
|
||||||
|
hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 2 +-
|
||||||
|
hal/dp_ops/edma_dp/edma_v2/edma_dp.c | 2 +-
|
||||||
|
hal/dp_ops/syn_gmac_dp/syn_dp.c | 2 +-
|
||||||
|
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/exports/nss_dp_api_if.h
|
||||||
|
+++ b/exports/nss_dp_api_if.h
|
||||||
|
@@ -83,7 +83,7 @@ struct nss_dp_data_plane_ops {
|
||||||
|
int (*close)(struct nss_dp_data_plane_ctx *dpc);
|
||||||
|
int (*link_state)(struct nss_dp_data_plane_ctx *dpc,
|
||||||
|
uint32_t link_state);
|
||||||
|
- int (*mac_addr)(struct nss_dp_data_plane_ctx *dpc, uint8_t *addr);
|
||||||
|
+ int (*mac_addr)(struct nss_dp_data_plane_ctx *dpc, const uint8_t *addr);
|
||||||
|
int (*change_mtu)(struct nss_dp_data_plane_ctx *dpc, uint32_t mtu);
|
||||||
|
netdev_tx_t (*xmit)(struct nss_dp_data_plane_ctx *dpc, struct sk_buff *os_buf);
|
||||||
|
void (*set_features)(struct nss_dp_data_plane_ctx *dpc);
|
||||||
|
--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
||||||
|
+++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
||||||
|
@@ -494,7 +494,7 @@ static int edma_if_link_state(struct nss
|
||||||
|
/*
|
||||||
|
* edma_if_mac_addr()
|
||||||
|
*/
|
||||||
|
-static int edma_if_mac_addr(struct nss_dp_data_plane_ctx *dpc, uint8_t *addr)
|
||||||
|
+static int edma_if_mac_addr(struct nss_dp_data_plane_ctx *dpc, const uint8_t *addr)
|
||||||
|
{
|
||||||
|
return NSS_DP_SUCCESS;
|
||||||
|
}
|
||||||
|
--- a/hal/dp_ops/edma_dp/edma_v2/edma_dp.c
|
||||||
|
+++ b/hal/dp_ops/edma_dp/edma_v2/edma_dp.c
|
||||||
|
@@ -99,7 +99,7 @@ static int edma_dp_link_state(struct nss
|
||||||
|
* edma_dp_mac_addr()
|
||||||
|
* EDMA data plane MAC address change API
|
||||||
|
*/
|
||||||
|
-static int edma_dp_mac_addr(struct nss_dp_data_plane_ctx *dpc, uint8_t *addr)
|
||||||
|
+static int edma_dp_mac_addr(struct nss_dp_data_plane_ctx *dpc, const uint8_t *addr)
|
||||||
|
{
|
||||||
|
return NSS_DP_SUCCESS;
|
||||||
|
}
|
||||||
|
--- a/hal/dp_ops/syn_gmac_dp/syn_dp.c
|
||||||
|
+++ b/hal/dp_ops/syn_gmac_dp/syn_dp.c
|
||||||
|
@@ -289,7 +289,7 @@ static int syn_dp_if_link_state(struct n
|
||||||
|
/*
|
||||||
|
* syn_dp_if_mac_addr()
|
||||||
|
*/
|
||||||
|
-static int syn_dp_if_mac_addr(struct nss_dp_data_plane_ctx *dpc, uint8_t *addr)
|
||||||
|
+static int syn_dp_if_mac_addr(struct nss_dp_data_plane_ctx *dpc, const uint8_t *addr)
|
||||||
|
{
|
||||||
|
return NSS_DP_SUCCESS;
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 704706969301076961c15423dedce9e2e6f1026e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Thu, 29 Sep 2022 20:39:07 +0200
|
||||||
|
Subject: [PATCH 16/16] nss-dp: use proper netdev MAC helpers
|
||||||
|
|
||||||
|
mac_addr is const, so utilize proper helpers for setting random and
|
||||||
|
desired MAC addres as old ones were dropped in newer kernels.
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
nss_dp_main.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/nss_dp_main.c
|
||||||
|
+++ b/nss_dp_main.c
|
||||||
|
@@ -599,9 +599,9 @@ static int32_t nss_dp_of_get_pdata(struc
|
||||||
|
|
||||||
|
ret = of_get_mac_address(np, maddr);
|
||||||
|
if (!ret && is_valid_ether_addr(maddr)) {
|
||||||
|
- ether_addr_copy(netdev->dev_addr, maddr);
|
||||||
|
+ eth_hw_addr_set(netdev, maddr);
|
||||||
|
} else {
|
||||||
|
- random_ether_addr(netdev->dev_addr);
|
||||||
|
+ eth_hw_addr_random(netdev);
|
||||||
|
pr_info("GMAC%d(%px) Invalid MAC@ - using %pM\n", dp_priv->macid,
|
||||||
|
dp_priv, netdev->dev_addr);
|
||||||
|
}
|
|
@ -0,0 +1,84 @@
|
||||||
|
From ba748ab91a62db57f9bdf69dd306e6557315db85 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Mon, 3 Oct 2022 23:05:14 +0200
|
||||||
|
Subject: [PATCH] nss-dp: adapt to netif_napi_add() changes
|
||||||
|
|
||||||
|
netif_napi_add() removed the weight argument and just uses the default
|
||||||
|
NAPI_POLL_WEIGHT in background, so for those requiring custom weight use
|
||||||
|
netif_napi_add_weight() instead.
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 6 +++++-
|
||||||
|
hal/dp_ops/edma_dp/edma_v2/edma_cfg_rx.c | 8 +++++++-
|
||||||
|
hal/dp_ops/edma_dp/edma_v2/edma_cfg_tx.c | 7 ++++++-
|
||||||
|
hal/dp_ops/syn_gmac_dp/syn_dp.c | 5 +++++
|
||||||
|
4 files changed, 23 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
||||||
|
+++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
|
||||||
|
@@ -838,8 +838,12 @@ static int edma_register_netdevice(struc
|
||||||
|
* NAPI add
|
||||||
|
*/
|
||||||
|
if (!edma_hw.napi_added) {
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
|
||||||
|
netif_napi_add(netdev, &edma_hw.napi, edma_napi,
|
||||||
|
- NAPI_POLL_WEIGHT);
|
||||||
|
+ NAPI_POLL_WEIGHT);
|
||||||
|
+#else
|
||||||
|
+ netif_napi_add(netdev, &edma_hw.napi, edma_napi);
|
||||||
|
+#endif
|
||||||
|
/*
|
||||||
|
* Register the interrupt handlers and enable interrupts
|
||||||
|
*/
|
||||||
|
--- a/hal/dp_ops/edma_dp/edma_v2/edma_cfg_rx.c
|
||||||
|
+++ b/hal/dp_ops/edma_dp/edma_v2/edma_cfg_rx.c
|
||||||
|
@@ -1097,8 +1097,14 @@ void edma_cfg_rx_napi_add(struct edma_gb
|
||||||
|
|
||||||
|
for (i = 0; i < egc->num_rxdesc_rings; i++) {
|
||||||
|
struct edma_rxdesc_ring *rxdesc_ring = &egc->rxdesc_rings[i];
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
|
||||||
|
netif_napi_add(netdev, &rxdesc_ring->napi,
|
||||||
|
- edma_rx_napi_poll, nss_dp_rx_napi_budget);
|
||||||
|
+ edma_rx_napi_poll, nss_dp_rx_napi_budget);
|
||||||
|
+
|
||||||
|
+#else
|
||||||
|
+ netif_napi_add_weight(netdev, &rxdesc_ring->napi,
|
||||||
|
+ edma_rx_napi_poll, nss_dp_rx_napi_budget);
|
||||||
|
+#endif
|
||||||
|
rxdesc_ring->napi_added = true;
|
||||||
|
}
|
||||||
|
edma_info("%s: Rx NAPI budget: %d\n", netdev->name, nss_dp_rx_napi_budget);
|
||||||
|
--- a/hal/dp_ops/edma_dp/edma_v2/edma_cfg_tx.c
|
||||||
|
+++ b/hal/dp_ops/edma_dp/edma_v2/edma_cfg_tx.c
|
||||||
|
@@ -672,8 +672,13 @@ void edma_cfg_tx_napi_add(struct edma_gb
|
||||||
|
for (i = 0; i < egc->num_txcmpl_rings; i++) {
|
||||||
|
struct edma_txcmpl_ring *txcmpl_ring = &egc->txcmpl_rings[i];
|
||||||
|
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
|
||||||
|
netif_napi_add(netdev, &txcmpl_ring->napi,
|
||||||
|
- edma_tx_napi_poll, nss_dp_tx_napi_budget);
|
||||||
|
+ edma_tx_napi_poll, nss_dp_tx_napi_budget);
|
||||||
|
+#else
|
||||||
|
+ netif_napi_add_weight(netdev, &txcmpl_ring->napi,
|
||||||
|
+ edma_tx_napi_poll, nss_dp_tx_napi_budget);
|
||||||
|
+#endif
|
||||||
|
txcmpl_ring->napi_added = true;
|
||||||
|
}
|
||||||
|
edma_info("Tx NAPI budget: %d\n", nss_dp_tx_napi_budget);
|
||||||
|
--- a/hal/dp_ops/syn_gmac_dp/syn_dp.c
|
||||||
|
+++ b/hal/dp_ops/syn_gmac_dp/syn_dp.c
|
||||||
|
@@ -189,8 +189,13 @@ static int syn_dp_if_init(struct nss_dp_
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dev_info->napi_added) {
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
|
||||||
|
netif_napi_add(netdev, &rx_info->napi_rx, syn_dp_napi_poll_rx, SYN_DP_NAPI_BUDGET_RX);
|
||||||
|
netif_napi_add(netdev, &tx_info->napi_tx, syn_dp_napi_poll_tx, SYN_DP_NAPI_BUDGET_TX);
|
||||||
|
+#else
|
||||||
|
+ netif_napi_add_weight(netdev, &rx_info->napi_rx, syn_dp_napi_poll_rx, SYN_DP_NAPI_BUDGET_RX);
|
||||||
|
+ netif_napi_add_weight(netdev, &tx_info->napi_tx, syn_dp_napi_poll_tx, SYN_DP_NAPI_BUDGET_TX);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Requesting irq. Set IRQ_DISABLE_UNLAZY flag, this flag
|
|
@ -0,0 +1,55 @@
|
||||||
|
From 1f9eb43f118b86c0b68e9d82bfae77471d6c3921 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Thu, 29 Sep 2022 09:59:20 +0200
|
||||||
|
Subject: [PATCH] SSDK: config: add kernel 6.1
|
||||||
|
|
||||||
|
Allow kernel 6.1 to be recognized and compiled under it.
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
config | 6 +++++-
|
||||||
|
make/linux_opt.mk | 4 ++--
|
||||||
|
2 files changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/config
|
||||||
|
+++ b/config
|
||||||
|
@@ -28,6 +28,10 @@ ifeq ($(KVER),$(filter 5.15%,$(KVER)))
|
||||||
|
OS_VER=5_15
|
||||||
|
endif
|
||||||
|
|
||||||
|
+ifeq ($(KVER),$(filter 6.1%,$(KVER)))
|
||||||
|
+OS_VER=6_1
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
ifeq ($(KVER), 3.4.0)
|
||||||
|
OS_VER=3_4
|
||||||
|
endif
|
||||||
|
@@ -136,7 +140,7 @@ ifeq ($(ARCH), arm)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ARCH), arm64)
|
||||||
|
- ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.15%,$(KVER)))
|
||||||
|
+ ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.15% 6.1%,$(KVER)))
|
||||||
|
CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
--- a/make/linux_opt.mk
|
||||||
|
+++ b/make/linux_opt.mk
|
||||||
|
@@ -437,7 +437,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||||
|
KASAN_SHADOW_SCALE_SHIFT := 3
|
||||||
|
endif
|
||||||
|
|
||||||
|
- ifeq (5_4 5_15, $(OS_VER))
|
||||||
|
+ ifeq (5_4 5_15 6_1, $(OS_VER))
|
||||||
|
ifeq ($(ARCH), arm64)
|
||||||
|
KASAN_OPTION += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
|
||||||
|
endif
|
||||||
|
@@ -468,7 +468,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
- ifeq ($(OS_VER),$(filter 4_4 5_4 5_15, $(OS_VER)))
|
||||||
|
+ ifeq ($(OS_VER),$(filter 4_4 5_4 5_15 6_1, $(OS_VER)))
|
||||||
|
MODULE_CFLAG += -DKVER34
|
||||||
|
MODULE_CFLAG += -DKVER32
|
||||||
|
MODULE_CFLAG += -DLNX26_22
|
|
@ -0,0 +1,27 @@
|
||||||
|
From 55ea8c9b278aafe3211f7250986b1f9d9a06cd21 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robert Marko <robimarko@gmail.com>
|
||||||
|
Date: Fri, 21 Oct 2022 13:40:15 +0200
|
||||||
|
Subject: [PATCH] SSDK: qca808x: use get_random_u32
|
||||||
|
|
||||||
|
prandom has been removed from the kernel in 6.1-rc1, so use get_random_u32
|
||||||
|
instead as its the drop-in replacement.
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
src/hsl/phy/qca808x_phy.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
--- a/src/hsl/phy/qca808x_phy.c
|
||||||
|
+++ b/src/hsl/phy/qca808x_phy.c
|
||||||
|
@@ -299,7 +299,11 @@ qca808x_phy_ms_random_seed_set(a_uint32_
|
||||||
|
phy_data = qca808x_phy_debug_read(dev_id, phy_id,
|
||||||
|
QCA808X_DEBUG_LOCAL_SEED);
|
||||||
|
phy_data &= ~(QCA808X_MASTER_SLAVE_SEED_CFG);
|
||||||
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
|
||||||
|
phy_data |= (prandom_u32()%QCA808X_MASTER_SLAVE_SEED_RANGE) << 2;
|
||||||
|
+#else
|
||||||
|
+ phy_data |= (get_random_u32()%QCA808X_MASTER_SLAVE_SEED_RANGE) << 2;
|
||||||
|
+#endif
|
||||||
|
SSDK_DEBUG("QCA808X_DEBUG_LOCAL_SEED:%x\n", phy_data);
|
||||||
|
rv = qca808x_phy_debug_write(dev_id, phy_id,
|
||||||
|
QCA808X_DEBUG_LOCAL_SEED, phy_data);
|
|
@ -103,7 +103,7 @@ endef
|
||||||
$(foreach a,$(LIBSELINUX_UTILS),$(eval $(call GenUtilPkg,libselinux-$(a),$(a))))
|
$(foreach a,$(LIBSELINUX_UTILS),$(eval $(call GenUtilPkg,libselinux-$(a),$(a))))
|
||||||
|
|
||||||
# Needed to link libselinux utilities, which link against
|
# Needed to link libselinux utilities, which link against
|
||||||
# libselinux.so, which indirectly depends on libpcre.so, installed in
|
# libselinux.so, which indirectly depends on libpcre2.so, installed in
|
||||||
# $(STAGING_DIR_HOSTPKG).
|
# $(STAGING_DIR_HOSTPKG).
|
||||||
HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
|
HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||||
|
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/Configurations/25-openwrt.conf
|
+++ b/Configurations/25-openwrt.conf
|
||||||
@@ -0,0 +1,52 @@
|
@@ -0,0 +1,56 @@
|
||||||
+## Openwrt "CONFIG_ARCH" matching targets.
|
+## Openwrt "CONFIG_ARCH" matching targets.
|
||||||
+
|
+
|
||||||
+# The targets need to end in '-openwrt' for the AFALG patch to work
|
+# The targets need to end in '-openwrt' for the AFALG patch to work
|
||||||
|
@ -53,6 +53,10 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||||
+ inherit_from => [ "linux-ppc64", "openwrt" ],
|
+ inherit_from => [ "linux-ppc64", "openwrt" ],
|
||||||
+ perlasm_scheme => "linux64v2",
|
+ perlasm_scheme => "linux64v2",
|
||||||
+ },
|
+ },
|
||||||
|
+ "linux-riscv64-openwrt" => {
|
||||||
|
+ inherit_from => [ "linux-generic64", "openwrt" ],
|
||||||
|
+ perlasm_scheme => "linux64",
|
||||||
|
+ },
|
||||||
+ "linux-x86_64-openwrt" => {
|
+ "linux-x86_64-openwrt" => {
|
||||||
+ inherit_from => [ "linux-x86_64", "openwrt" ],
|
+ inherit_from => [ "linux-x86_64", "openwrt" ],
|
||||||
+ },
|
+ },
|
||||||
|
|
|
@ -66,7 +66,8 @@ CMAKE_HOST_OPTIONS += \
|
||||||
-DPCRE2_SUPPORT_JIT=OFF \
|
-DPCRE2_SUPPORT_JIT=OFF \
|
||||||
-DPCRE2_SHOW_REPORT=OFF \
|
-DPCRE2_SHOW_REPORT=OFF \
|
||||||
-DPCRE2_BUILD_PCRE2GREP=OFF \
|
-DPCRE2_BUILD_PCRE2GREP=OFF \
|
||||||
-DPCRE2_BUILD_TESTS=OFF
|
-DPCRE2_BUILD_TESTS=OFF \
|
||||||
|
-DPCRE2_STATIC_PIC=ON
|
||||||
|
|
||||||
CMAKE_OPTIONS += \
|
CMAKE_OPTIONS += \
|
||||||
-DBUILD_SHARED_LIBS=ON \
|
-DBUILD_SHARED_LIBS=ON \
|
||||||
|
|
|
@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||||
PKG_SOURCE_DATE:=2023-04-17
|
PKG_SOURCE_DATE:=2023-05-31
|
||||||
PKG_SOURCE_VERSION:=7de5440a520f9c6687358c7ef88ac4aad0ff98a5
|
PKG_SOURCE_VERSION:=38cbdc1c8cbbe2e30d62227d74565bd3fa21a36b
|
||||||
PKG_MIRROR_HASH:=aaf6aef1c991c67b6ef43b4c7f102ba94319bf522f620e93293d031b8333bd8f
|
PKG_MIRROR_HASH:=c275ef1f550726b045b3dd7bcee1d660bba9d56c4d53bf32f1eeb6f68bc4116c
|
||||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
|
|
@ -73,11 +73,6 @@ config WPA_WOLFSSL
|
||||||
select WOLFSSL_HAS_SESSION_TICKET
|
select WOLFSSL_HAS_SESSION_TICKET
|
||||||
select WOLFSSL_HAS_WPAS
|
select WOLFSSL_HAS_WPAS
|
||||||
|
|
||||||
config DRIVER_WEXT_SUPPORT
|
|
||||||
bool
|
|
||||||
select KERNEL_WIRELESS_EXT
|
|
||||||
default n
|
|
||||||
|
|
||||||
config DRIVER_11AC_SUPPORT
|
config DRIVER_11AC_SUPPORT
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -27,7 +27,6 @@ PKG_CONFIG_DEPENDS:= \
|
||||||
CONFIG_PACKAGE_hostapd-basic \
|
CONFIG_PACKAGE_hostapd-basic \
|
||||||
CONFIG_PACKAGE_hostapd-mini \
|
CONFIG_PACKAGE_hostapd-mini \
|
||||||
CONFIG_WPA_RFKILL_SUPPORT \
|
CONFIG_WPA_RFKILL_SUPPORT \
|
||||||
CONFIG_DRIVER_WEXT_SUPPORT \
|
|
||||||
CONFIG_DRIVER_11AC_SUPPORT \
|
CONFIG_DRIVER_11AC_SUPPORT \
|
||||||
CONFIG_DRIVER_11AX_SUPPORT \
|
CONFIG_DRIVER_11AX_SUPPORT \
|
||||||
CONFIG_WPA_ENABLE_WEP
|
CONFIG_WPA_ENABLE_WEP
|
||||||
|
@ -87,7 +86,6 @@ DRIVER_MAKEOPTS= \
|
||||||
CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
|
CONFIG_DRIVER_NL80211=$(CONFIG_PACKAGE_kmod-cfg80211) \
|
||||||
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
|
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
|
||||||
CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
|
CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \
|
||||||
CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
|
|
||||||
CONFIG_MBO=$(CONFIG_WPA_MBO_SUPPORT)
|
CONFIG_MBO=$(CONFIG_WPA_MBO_SUPPORT)
|
||||||
|
|
||||||
ifeq ($(SSL_VARIANT),openssl)
|
ifeq ($(SSL_VARIANT),openssl)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
# replacement for WEXT and its use allows wpa_supplicant to properly control
|
# replacement for WEXT and its use allows wpa_supplicant to properly control
|
||||||
# the driver to improve existing functionality like roaming and to support new
|
# the driver to improve existing functionality like roaming and to support new
|
||||||
# functionality.
|
# functionality.
|
||||||
CONFIG_DRIVER_WEXT=y
|
#CONFIG_DRIVER_WEXT=y
|
||||||
|
|
||||||
# Driver interface for Linux drivers using the nl80211 kernel interface
|
# Driver interface for Linux drivers using the nl80211 kernel interface
|
||||||
CONFIG_DRIVER_NL80211=y
|
CONFIG_DRIVER_NL80211=y
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
# replacement for WEXT and its use allows wpa_supplicant to properly control
|
# replacement for WEXT and its use allows wpa_supplicant to properly control
|
||||||
# the driver to improve existing functionality like roaming and to support new
|
# the driver to improve existing functionality like roaming and to support new
|
||||||
# functionality.
|
# functionality.
|
||||||
CONFIG_DRIVER_WEXT=y
|
#CONFIG_DRIVER_WEXT=y
|
||||||
|
|
||||||
# Driver interface for Linux drivers using the nl80211 kernel interface
|
# Driver interface for Linux drivers using the nl80211 kernel interface
|
||||||
CONFIG_DRIVER_NL80211=y
|
CONFIG_DRIVER_NL80211=y
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
# replacement for WEXT and its use allows wpa_supplicant to properly control
|
# replacement for WEXT and its use allows wpa_supplicant to properly control
|
||||||
# the driver to improve existing functionality like roaming and to support new
|
# the driver to improve existing functionality like roaming and to support new
|
||||||
# functionality.
|
# functionality.
|
||||||
CONFIG_DRIVER_WEXT=y
|
#CONFIG_DRIVER_WEXT=y
|
||||||
|
|
||||||
# Driver interface for Linux drivers using the nl80211 kernel interface
|
# Driver interface for Linux drivers using the nl80211 kernel interface
|
||||||
CONFIG_DRIVER_NL80211=y
|
CONFIG_DRIVER_NL80211=y
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue