diff --git a/.github/workflows/actions/setup-nimbos-guest-image/action.yml b/.github/workflows/actions/setup-nimbos-guest-image/action.yml index 3eaf4433..dc27a868 100644 --- a/.github/workflows/actions/setup-nimbos-guest-image/action.yml +++ b/.github/workflows/actions/setup-nimbos-guest-image/action.yml @@ -34,7 +34,9 @@ runs: steps: - name: Make temporary directory shell: bash - run: mkdir -p temp + run: | + sudo rm -rf temp + mkdir -p temp - name: Download NimbOS uses: dsaltares/fetch-gh-release-asset@1.1.2 with: @@ -59,7 +61,7 @@ runs: - name: Create Image shell: bash run: | - make DISK_IMG=${{ inputs.disk-path }} disk_img + ./axvisor.sh disk_img --image ${{ inputs.disk-path }} sudo mkdir -p img sudo chown root:root temp/* sudo mount ${{ inputs.disk-path }} img diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d528ba35..b46187fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: Build, fmt, and clippy -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: clippy: @@ -8,8 +8,7 @@ jobs: strategy: fail-fast: false matrix: - arch: [x86_64, riscv64, aarch64] - rust-toolchain: [nightly-2024-12-25, nightly] + rust-toolchain: [nightly-2025-05-20, nightly] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} steps: @@ -18,19 +17,19 @@ jobs: with: toolchain: ${{ matrix.rust-toolchain }} components: rust-src, clippy, rustfmt - targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none, aarch64-unknown-none-softfloat + targets: x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat - name: Check rust version run: rustc --version --verbose - name: Clippy the repo continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} - run: make ARCH=${{ matrix.arch }} clippy + run: ./axvisor.sh clippy fmt: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - rust-toolchain: [nightly-2024-12-25, nightly] + rust-toolchain: [nightly-2025-05-20, nightly] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} steps: @@ -51,8 +50,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - arch: [x86_64, riscv64, aarch64] - rust-toolchain: [nightly-2024-12-25, nightly] + plat: [aarch64-generic, x86-qemu-q35] + rust-toolchain: [nightly-2025-05-20, nightly] env: RUSTUP_TOOLCHAIN: ${{ matrix.rust-toolchain }} steps: @@ -66,4 +65,5 @@ jobs: - run: cargo install cargo-binutils - name: Build the repo continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} - run: make ARCH=${{ matrix.arch }} build + run: | + ./axvisor.sh build --plat ${{ matrix.plat }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15af65c7..c2570100 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,20 +1,19 @@ name: Test CI -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] env: qemu-version: 8.2.0 arceos-apps: '68054e8' jobs: - test_local: - runs-on: ${{ matrix.os }} + aarch64-generic-qemu: + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - os: [ubuntu-latest] - arch: [riscv64, aarch64] - rust-toolchain: [nightly-2024-12-25, nightly] + plat: [aarch64-generic] + rust-toolchain: [nightly-2025-05-20, nightly] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -26,124 +25,114 @@ jobs: - uses: arceos-org/setup-qemu@v0.1 with: version: ${{ env.qemu-version }} - arch_list: ${{ matrix.arch }} + arch_list: aarch64 - uses: ./.github/workflows/actions/setup-nimbos-guest-image with: nimbos-version: 'tags/v0.7' - arch: ${{ matrix.arch }} - disk-path: ${{ github.workspace }}/disk-${{ matrix.arch }}.img - - name: Enable KVM group perms - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm + arch: aarch64 + disk-path: ${{ github.workspace }}/disk-aarch64.img - name: Update rust-toolchain.toml run: | sed -i "s/^channel = .*/channel = \"${{ matrix.rust-toolchain }}\"/" rust-toolchain.toml - name: Run guests continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} run: | + chmod +x axvisor.sh cargo version - export DISK_IMG="${{ github.workspace }}/disk-${{ matrix.arch }}.img" - export VM_CONFIGS="$(pwd)/configs/vms/nimbos-${{ matrix.arch }}.toml" - make ARCH=${{ matrix.arch }} defconfig - make ARCH=${{ matrix.arch }} DISK_IMG=${DISK_IMG} LOG=info BLK=y ACCEL=n VM_CONFIGS=${VM_CONFIGS} APP_FEATURES=fs run + export DISK_IMG="${{ github.workspace }}/disk-aarch64.img" + export VM_CONFIGS="$(pwd)/configs/vms/nimbos-aarch64-qemu-smp1.toml" + ./scripts/auto_interrupt.sh ./axvisor.sh run --plat ${{ matrix.plat }} --vmconfigs $VM_CONFIGS --features fs,ept-level-4 --arceos-args DISK_IMG=$DISK_IMG,BUS=mmio,BLK=y,MEM=8g,LOG=info - test_remote: - runs-on: ubuntu-latest + aarch64-generic-phytiumpi: + runs-on: [self-hosted, linux, phytiumpi] strategy: fail-fast: false matrix: - arch: [x86_64] - rust-toolchain: [nightly-2024-12-25, nightly] - remote: [remote_aarkegz, remote_x10dri] - include: - - remote: remote_aarkegz - host_key: HOST - username_key: USERNAME - password_key: PASSWORD - port_key: PORT - - remote: remote_x10dri - host_key: HOST2 - username_key: USERNAME2 - password_key: PASSWORD2 - port_key: PORT2 + plat: [aarch64-generic] + rust-toolchain: [nightly-2025-05-20] steps: - - uses: actions/checkout@v4 - - name: Update rust-toolchain.toml - run: | - sed -i "s/^channel = .*/channel = \"${{ matrix.rust-toolchain }}\"/" rust-toolchain.toml - - name: Compress source code - run: tar -czf ~/source.tar.gz -C ${{ github.workspace }} . - - name: Copy files to current directory - run: | - cp ~/source.tar.gz . - - uses: ./.github/workflows/actions/setup-nimbos-guest-image - with: - nimbos-version: 'tags/v0.7' - arch: ${{ matrix.arch }} - disk-path: ${{ github.workspace }}/disk-${{ matrix.arch }}.img - - name: Copy x86_64 files to remote runner - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets[matrix.host_key] }} - username: ${{ secrets[matrix.username_key] }} - password: ${{ secrets[matrix.password_key] }} - port: ${{ secrets[matrix.port_key] }} - source: './disk-x86_64.img,./source.tar.gz' - target: '~/runner/remote_test-${{ github.run_id }}-${{ matrix.arch }}-${{ matrix.rust-toolchain }}' - - name: Running on remote runner - uses: appleboy/ssh-action@v1.2.2 - continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} - with: - host: ${{ secrets[matrix.host_key] }} - username: ${{ secrets[matrix.username_key] }} - password: ${{ secrets[matrix.password_key] }} - port: ${{ secrets[matrix.port_key] }} - script: | - set -e # Exit quickly on error - set -o pipefail # Exit if any command in a pipeline fails - . ~/.profile # Load ~/.profile manually, as it turns out that sometimes it is not loaded automatically - - # Set the working directory - WORKDIR=~/runner/remote_test-${{ github.run_id }}-${{ matrix.arch }}-${{ matrix.rust-toolchain }} - - # Set up colors for output - COLOR_BOLD=$'\033[1m' - COLOR_RED=$'\033[91;1m' - COLOR_GREEN=$'\033[92;1m' - COLOR_YELLOW=$'\033[93;1m' - COLOR_CLEAR=$'\033[0m' - - # Echo the environment info - function echo_env_info() { - PREVIOUS_DIR=$(pwd) - cd $WORKDIR - echo "shell : ${COLOR_BOLD}${SHELL}${COLOR_CLEAR}" - echo "rust-toolchain : ${COLOR_BOLD}${{ matrix.rust-toolchain }}${COLOR_CLEAR}" - echo "cargo version : ${COLOR_BOLD}$(cargo --version)${COLOR_CLEAR}" - echo "workdir : ${COLOR_BOLD}${WORKDIR}${COLOR_CLEAR}" - cd $PREVIOUS_DIR - } - - # Print the environment info - echo_env_info + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust-toolchain }} + components: rust-src + # - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-binutils + - name: Update rust-toolchain.toml + run: | + sed -i "s/^channel = .*/channel = \"${{ matrix.rust-toolchain }}\"/" rust-toolchain.toml + - name: Run guests on phytiumpi + continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} + run: | + cargo install ostool --force + git clone https://github.com/arceos-hypervisor/axboard_test + cd axboard_test + ./run.sh phytiumpi-arceos + cd .. - tar -xzf $WORKDIR/source.tar.gz -C $WORKDIR - make -C $WORKDIR ARCH=x86_64 defconfig - make -C $WORKDIR ARCH=x86_64 DISK_IMG=$WORKDIR/disk-x86_64.img LOG=info BLK=y ACCEL=y VM_CONFIGS=$WORKDIR/configs/vms/nimbos-x86_64.toml APP_FEATURES=fs run | tee $WORKDIR/make_output.log - - # Re-echo the environment info - echo_env_info - - if grep -q "panic" $WORKDIR/make_output.log; then - echo "test result : ${COLOR_RED}FAIL${COLOR_CLEAR}" - echo " ${COLOR_RED}'panic' found in output msg${COLOR_CLEAR}" - echo " ${COLOR_YELLOW}Check the log file: $WORKDIR/make_output.log${COLOR_CLEAR}" - exit 1 - else - echo "test result : ${COLOR_GREEN}PASS${COLOR_CLEAR}" - fi + aarch64-generic-rk3568: + runs-on: [self-hosted, linux, roc-rk3568-pc] + strategy: + fail-fast: false + matrix: + plat: [aarch64-generic] + rust-toolchain: [nightly-2025-05-20] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust-toolchain }} + components: rust-src + # - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-binutils + - name: Update rust-toolchain.toml + run: | + sed -i "s/^channel = .*/channel = \"${{ matrix.rust-toolchain }}\"/" rust-toolchain.toml + - name: Run guests on rk3568 + continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} + run: | + cargo install ostool --force + git clone https://github.com/arceos-hypervisor/axboard_test + cd axboard_test + ./run.sh rk3568-arceos + cd .. - # Clean up - cd ~ && rm -rf $WORKDIR + x86-qemu-q35: + runs-on: [self-hosted, linux, intel] + strategy: + fail-fast: false + matrix: + plat: [x86-qemu-q35] + rust-toolchain: [nightly-2025-05-20, nightly] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.rust-toolchain }} + components: rust-src + # - uses: Swatinem/rust-cache@v2 + - run: cargo install cargo-binutils + # - uses: arceos-org/setup-qemu@v0.1 + # with: + # version: ${{ env.qemu-version }} + # arch_list: x86_64 + - uses: ./.github/workflows/actions/setup-nimbos-guest-image + with: + nimbos-version: 'tags/v0.7' + arch: x86_64 + disk-path: ${{ github.workspace }}/disk-x86_64.img + # - name: Enable KVM group perms + # run: | + # echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + # sudo udevadm control --reload-rules + # sudo udevadm trigger --name-match=kvm + - name: Update rust-toolchain.toml + run: | + sed -i "s/^channel = .*/channel = \"${{ matrix.rust-toolchain }}\"/" rust-toolchain.toml + - name: Run guests + continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }} + run: | + cargo version + export DISK_IMG="${{ github.workspace }}/disk-x86_64.img" + export VM_CONFIGS="$(pwd)/configs/vms/nimbos-x86_64-qemu-smp1.toml" + ./scripts/auto_interrupt.sh ./axvisor.sh run --plat ${{ matrix.plat }} --vmconfigs $VM_CONFIGS --features fs --arceos-args DISK_IMG=$DISK_IMG,BLK=y,LOG=info diff --git a/.gitignore b/.gitignore index ae6943b0..a229e4bc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ /target /.vscode /tmp +/.arceos +/.cargo .DS_Store *.asm *.img @@ -14,7 +16,16 @@ actual.out qemu.log rusty-tags.vi +# Python virtual environment +venv/ +__pycache__/ +*.pyc +*.pyo + /**/.axconfig.* +/**/.hvconfig.* +/**/.project.* +/**/.board.* # dev env /crates @@ -22,3 +33,29 @@ rusty-tags.vi # tools should be downloaded from github tools/* + +# initramfs +*.cpio.gz + +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 00000000..89ab2b7f --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1 @@ +force_explicit_abi = false \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 1eb589a4..25eb5669 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,20 +4,21 @@ version = 4 [[package]] name = "aarch64-cpu" -version = "9.4.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac42a04a61c19fc8196dd728022a784baecc5d63d7e256c01ad1b3fbfab26287" +checksum = "6a21cd0131c25c438e19cd6a774adf7e3f64f7f4d723022882facc2dee0f8bc9" dependencies = [ - "tock-registers 0.8.1", + "tock-registers 0.9.0", ] [[package]] -name = "aarch64-cpu" -version = "10.0.0" +name = "aarch64-cpu-ext" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a21cd0131c25c438e19cd6a774adf7e3f64f7f4d723022882facc2dee0f8bc9" +checksum = "52dad5cf7342926ce1c375ec680834e56dd3cdbe8b7adf8a6f99b2854cc52c17" dependencies = [ - "tock-registers 0.9.0", + "aarch64-cpu", + "tock-registers 0.10.0", ] [[package]] @@ -27,25 +28,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a2c929f5025d9b8a0f549b187c4d3a39671f44015ff6ccddd0b134c874b3c1a" [[package]] -name = "ahash" -version = "0.8.11" +name = "addr2line" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ - "cfg-if", - "const-random", - "once_cell", - "version_check", - "zerocopy", + "gimli", ] [[package]] -name = "aho-corasick" -version = "1.1.3" +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "ahash" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ - "memchr", + "cfg-if", + "once_cell", + "version_check", + "zerocopy 0.8.27", ] [[package]] @@ -66,9 +72,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -81,46 +87,65 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", - "once_cell", - "windows-sys", + "once_cell_polyfill", + "windows-sys 0.60.2", ] +[[package]] +name = "any-uart" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ce5f140efb4e707ea8f8e894d5f710500e373be1c4435d56b28d1fd1f843341" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "embedded-hal-nb", + "fdt-parser", + "x86_64", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + [[package]] name = "arceos_api" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "axalloc", - "axconfig", + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", "axdriver", "axerrno", "axfeat", @@ -135,66 +160,135 @@ dependencies = [ [[package]] name = "arm-gic-driver" -version = "0.10.2" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be20d5253a221975e41674d35169a6f67887b012490b9e1ab33d7369caa7332" +checksum = "f251a1a74133f802b55eaf5e340107b0024457aa9b2ac3c72074501bfa8509a5" dependencies = [ - "aarch64-cpu 10.0.0", - "bitflags 2.9.0", + "aarch64-cpu", + "bitflags 2.9.4", "enum_dispatch", "log", + "paste", "rdif-intc", "tock-registers 0.9.0", ] [[package]] -name = "arm_gicv2" +name = "arm_pl011" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arm_gicv2#eee14941d490719f6689e82f9a87caea6767bdc3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efcf6afca4502993a737ba1e00952d1321078689da92bf7aab27d4e5756c0bec" dependencies = [ "tock-registers 0.8.1", ] [[package]] -name = "arm_pl011" -version = "0.1.0" +name = "arm_pl031" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efcf6afca4502993a737ba1e00952d1321078689da92bf7aab27d4e5756c0bec" +checksum = "13696b1c2b59992f4223e0ae5bb173c81c63039367ca90eee845346ad2a13421" dependencies = [ - "tock-registers 0.8.1", + "chrono", ] [[package]] name = "arm_vcpu" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arm_vcpu.git#e537c7b5125130e85b12a57390a251a86227c2ec" +version = "0.1.1" +source = "git+https://github.com/arceos-hypervisor/arm_vcpu?branch=next#b24cc3635c049302ab8d58d3b54007bb5a053a96" dependencies = [ - "aarch64-cpu 9.4.0", - "aarch64_sysreg", + "aarch64-cpu", "axaddrspace", + "axdevice_base", "axerrno", "axvcpu", + "axvisor_api", "log", "numeric-enum-macro", "percpu", - "spin", - "tock-registers 0.8.1", + "spin 0.10.0", +] + +[[package]] +name = "arm_vgic" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80f576b11b486e2ca12373c8205c4a06473a85cf7a664845e5961c47948910c3" +dependencies = [ + "aarch64-cpu", + "aarch64_sysreg", + "axaddrspace", + "axdevice_base", + "axerrno", + "axvisor_api", + "bitmaps", + "log", + "memory_addr", + "spin 0.9.8", + "tock-registers 0.10.0", +] + +[[package]] +name = "arm_vgic" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/arm_vgic.git#81338d6dd8a9dab04b91c9c0da3d6d84e7768be6" +dependencies = [ + "aarch64-cpu", + "aarch64_sysreg", + "axaddrspace", + "axdevice_base", + "axerrno", + "axvisor_api", + "bitmaps", + "log", + "memory_addr", + "spin 0.9.8", + "tock-registers 0.10.0", +] + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "as-any" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axaddrspace" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axaddrspace.git#2ed4d076e01f966710bd6480131abd3a9ffb8930" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c4a11ed43c0138f48495f482ee2292f1bfdb270dbccdfa0fb5cf53dc74061cb" dependencies = [ "axerrno", "bit_field", - "bitflags 2.9.0", + "bitflags 2.9.4", "cfg-if", "lazyinit", "log", @@ -203,12 +297,13 @@ dependencies = [ "numeric-enum-macro", "page_table_entry", "page_table_multiarch", + "x86", ] [[package]] name = "axalloc" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "allocator", "axerrno", @@ -219,40 +314,106 @@ dependencies = [ ] [[package]] -name = "axconfig" +name = "axbsp-phytium-pi" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +source = "git+https://github.com/drivercraft/axbsp.git#5dce480c619b6435135808c764aff818c4e891a1" dependencies = [ - "axconfig-gen-macros", + "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?branch=hypervisor)", + "axplat-aarch64-dyn", + "log", + "phytium-mci", + "rdif-block", + "rdrive", + "serde", + "spin 0.10.0", + "toml 0.8.23", ] [[package]] -name = "axconfig-gen" +name = "axbsp-roc-rk3568-pc" version = "0.1.0" +source = "git+https://github.com/drivercraft/axbsp.git#5dce480c619b6435135808c764aff818c4e891a1" +dependencies = [ + "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?branch=hypervisor)", + "axplat-aarch64-dyn", + "log", + "rdif-block", + "rdif-clk", + "rdrive", + "rk3568_clk", + "sdmmc", + "serde", + "spin 0.10.0", + "toml 0.8.23", +] + +[[package]] +name = "axconfig" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "axconfig-macros", +] + +[[package]] +name = "axconfig" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm-dev#b49cecf3eff5bb2f3520ea8b17f07b12736c5ebc" +dependencies = [ + "axconfig-macros", +] + +[[package]] +name = "axconfig-gen" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ffa518605969ff8f4ebce2cdc3b6090345152c14987ec540601335effbf36d5" +checksum = "0bf14099a96dbb925e39a44c4f25555f1e24516194452a84a943aa7eda62383d" dependencies = [ "clap", - "toml_edit 0.22.24", + "toml_edit 0.22.27", ] [[package]] -name = "axconfig-gen-macros" -version = "0.1.0" +name = "axconfig-macros" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92110c7e7a5633d7fb8a402393c91c326ad6d19710bb9cfa5ab4095e63c25948" +checksum = "f86a6711b80fbd1dc4c1d8e2fb77a5de6fc8e2eb2b96bbd0420ca8af370eb74c" dependencies = [ "axconfig-gen", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", +] + +[[package]] +name = "axcpu" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e09bc1235e3da45e942b50f47812f8397ad84cb490264bf914c65ac44e6f8b1d" +dependencies = [ + "aarch64-cpu", + "cfg-if", + "lazyinit", + "linkme", + "log", + "loongArch64", + "memory_addr", + "page_table_entry", + "page_table_multiarch", + "percpu", + "riscv", + "static_assertions", + "tock-registers 0.9.0", + "x86", + "x86_64", ] [[package]] name = "axdevice" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice.git#8652ce80b2c53310fb7b0f8ac275f2dfcfbb1338" +source = "git+https://github.com/arceos-hypervisor/axdevice.git#c4a0965ca45a3b9a34845fa774b1bd90fc8f4573" dependencies = [ + "arm_vgic 0.1.0 (git+https://github.com/arceos-hypervisor/arm_vgic.git)", "axaddrspace", "axdevice_base", "axerrno", @@ -260,15 +421,19 @@ dependencies = [ "cfg-if", "log", "memory_addr", + "range-alloc", + "spin 0.9.8", ] [[package]] name = "axdevice_base" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axdevice_crates.git#28d49f147793997a9db1ebb75a34295cde2a107d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c43baf33ed4790ffd3365c4ca027a1e3d1c2b6058f4605b67bca04cadf48d5" dependencies = [ "axaddrspace", "axerrno", + "axvmconfig", "cfg-if", "memory_addr", "serde", @@ -276,19 +441,29 @@ dependencies = [ [[package]] name = "axdriver" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ + "arm-gic-driver", "axalloc", - "axconfig", + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", "axdriver_base", "axdriver_block", "axdriver_pci", "axdriver_virtio", + "axerrno", "axhal", + "axmm", "cfg-if", "crate_interface", + "dma-api 0.5.1", + "lazyinit", "log", + "memory_addr", + "rdif-block", + "rdif-intc", + "rdrive", + "spin 0.10.0", ] [[package]] @@ -334,23 +509,25 @@ dependencies = [ [[package]] name = "axfeat" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "axalloc", "axdriver", "axfs", "axhal", + "axklib-impl", "axlog", "axruntime", "axsync", "axtask", + "kspin", ] [[package]] name = "axfs" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "axdriver", "axdriver_block", @@ -370,75 +547,70 @@ dependencies = [ [[package]] name = "axfs_devfs" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d62eff0490e10cd2c2a74be2979820f0293fa5ebe00ee8bfd87b88ac7dd7d235" +checksum = "81b87ae981272ca8d5d8f106a4452c63f4b5ac36e17ee8f848ee1b250538b9f8" dependencies = [ "axfs_vfs", "log", - "spin", + "spin 0.9.8", ] [[package]] name = "axfs_ramfs" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db46c6dae25a123579d5fdcdcc502d0dc2a8af86646106004c8a9181433271b1" +checksum = "9f50c26614485d837a3fc09a92f24a226caddc25a30df7e6aaf4bd19b304c399" dependencies = [ "axfs_vfs", "log", - "spin", + "spin 0.9.8", ] [[package]] name = "axfs_vfs" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2314ebe07a2fef7b1c1a7d15ab817941cd306ace651bb50024b5a8b3e8485359" +checksum = "dcba2006898d7879d456a9c34b9c9460cb536f5bf69d1d5d7d0e0f19f073368d" dependencies = [ "axerrno", - "bitflags 2.9.0", + "bitflags 2.9.4", "log", ] [[package]] name = "axhal" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ - "aarch64-cpu 10.0.0", - "arm-gic-driver", - "arm_gicv2", - "arm_pl011", + "aarch64-cpu", "axalloc", - "axconfig", + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", + "axcpu", "axlog", - "bitflags 2.9.0", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat-aarch64-qemu-virt", + "axplat-loongarch64-qemu-virt", + "axplat-riscv64-qemu-virt", + "axplat-x86-pc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if", - "cortex-a", - "crate_interface", - "dw_apb_uart", - "handler_table", - "int_ratio", + "heapless 0.8.0", "kernel_guard", - "kspin", "lazyinit", "linkme", "log", - "loongArch64", "memory_addr", - "ns16550a", - "page_table_entry", "page_table_multiarch", "percpu", - "raw-cpuid 11.5.0", - "riscv 0.12.1", - "sbi-rt", - "static_assertions", - "tock-registers 0.9.0", - "x2apic", - "x86", - "x86_64 0.15.2", +] + +[[package]] +name = "axhvc" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axhvc.git#e4ca6f919b9900f35e42b9b30863550a50432220" +dependencies = [ + "axerrno", + "numeric-enum-macro", ] [[package]] @@ -450,10 +622,41 @@ dependencies = [ "axerrno", ] +[[package]] +name = "axklib" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "axerrno", + "memory_addr", + "trait-ffi", +] + +[[package]] +name = "axklib" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=hypervisor#6fad0ff0aed9be8c75223f69bbf127a6675e933d" +dependencies = [ + "axerrno", + "memory_addr", + "trait-ffi", +] + +[[package]] +name = "axklib-impl" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "axhal", + "axklib 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", + "axmm", + "trait-ffi", +] + [[package]] name = "axlog" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "cfg-if", "crate_interface", @@ -463,11 +666,11 @@ dependencies = [ [[package]] name = "axmm" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "axalloc", - "axconfig", + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", "axerrno", "axhal", "kspin", @@ -479,81 +682,318 @@ dependencies = [ [[package]] name = "axns" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" dependencies = [ "crate_interface", "lazyinit", ] [[package]] -name = "axruntime" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +name = "axplat" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4de04c54b63bf2ca1ff202733d2516da49d7779649cdb2f9c4ecf22909e6810" dependencies = [ - "axalloc", - "axconfig", - "axdriver", - "axfs", - "axhal", - "axlog", - "axmm", - "axtask", - "chrono", + "axplat-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 2.9.4", + "const-str", "crate_interface", - "ctor_bare", - "kernel_guard", - "percpu", -] - -[[package]] -name = "axstd" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" -dependencies = [ - "arceos_api", - "axerrno", - "axfeat", - "axio", + "handler_table", "kspin", + "memory_addr", ] [[package]] -name = "axsync" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +name = "axplat" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates.git?branch=vmm#c38bbc1d58733ca0c90256000f9a900917f255c8" dependencies = [ - "axtask", + "axplat-macros 0.1.0 (git+https://github.com/arceos-hypervisor/axplat_crates.git?branch=vmm)", + "bitflags 2.9.4", + "const-str", + "crate_interface", + "handler_table", "kspin", + "memory_addr", ] [[package]] -name = "axtask" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm#20d52d36d2eeb05edd7240c0e0b0cf17993c38bc" +name = "axplat-aarch64-dyn" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.2.0#bdde9eec2a91f8c64926a991cbf6a4b048446165" dependencies = [ - "axconfig", - "axhal", - "cfg-if", - "cpumask", - "crate_interface", + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "arm-gic-driver", + "axconfig-macros", + "axcpu", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fdt-parser", + "heapless 0.8.0", + "lazyinit", + "log", + "memory_addr", + "page_table_entry", + "paste", + "percpu", + "rdif-intc", + "rdrive", + "serde", + "somehal", + "spin 0.10.0", + "toml 0.8.23", +] + +[[package]] +name = "axplat-aarch64-generic" +version = "0.1.0" +dependencies = [ + "axplat-aarch64-dyn", + "serde", + "toml 0.8.23", +] + +[[package]] +name = "axplat-aarch64-peripherals" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9a6548290a150059eb2ae015dc58d9b3d652461760327b95a490666129974c" +dependencies = [ + "aarch64-cpu", + "arm-gic-driver", + "arm_pl011", + "arm_pl031", + "axcpu", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "int_ratio", + "kspin", + "lazyinit", + "log", + "page_table_entry", + "spin 0.10.0", +] + +[[package]] +name = "axplat-aarch64-phytium-pi" +version = "0.1.0" +dependencies = [ + "axbsp-phytium-pi", + "serde", + "toml 0.8.23", +] + +[[package]] +name = "axplat-aarch64-qemu-virt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f03bfe81ebc5b2f567eecadcab221107b90f394485dd0da39334411a676d81a" +dependencies = [ + "axconfig-macros", + "axcpu", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "axplat-aarch64-peripherals", + "log", + "page_table_entry", +] + +[[package]] +name = "axplat-aarch64-roc-rk3568-pc" +version = "0.1.0" +dependencies = [ + "axbsp-roc-rk3568-pc", + "serde", + "toml 0.8.23", +] + +[[package]] +name = "axplat-loongarch64-qemu-virt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c404064c74824b2c509e1d84f2ae0cbd9240a3274fb4053dc81b9ad120b5962" +dependencies = [ + "axconfig-macros", + "axcpu", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kspin", + "lazyinit", + "log", + "loongArch64", + "ns16550a", + "page_table_entry", +] + +[[package]] +name = "axplat-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90dfaee06a112fe4f810c60af1a86bc080af2172185b491cacc307b84dff748" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "axplat-macros" +version = "0.1.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates.git?branch=vmm#c38bbc1d58733ca0c90256000f9a900917f255c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "axplat-riscv64-qemu-virt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8d95d76dfa65d75d07380ac13692c3b0c5bd6ae5b68df7bbede1f2e7181027a" +dependencies = [ + "axconfig-macros", + "axcpu", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "riscv", + "sbi-rt", +] + +[[package]] +name = "axplat-x86-pc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aef32b01b5b7e87e9f69933b64b704bc5d731adda2cdd24fc0a29cf0c359211" +dependencies = [ + "axconfig-macros", + "axcpu", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 2.9.4", + "heapless 0.9.1", + "int_ratio", + "kspin", + "lazyinit", + "log", + "multiboot", + "percpu", + "raw-cpuid 11.6.0", + "uart_16550", + "x2apic", + "x86", + "x86_64", +] + +[[package]] +name = "axplat-x86-pc" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat_crates.git?branch=vmm#c38bbc1d58733ca0c90256000f9a900917f255c8" +dependencies = [ + "axconfig-macros", + "axcpu", + "axplat 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates.git?branch=vmm)", + "bitflags 2.9.4", + "heapless 0.9.1", + "int_ratio", + "kspin", + "lazyinit", + "log", + "multiboot", + "percpu", + "raw-cpuid 11.6.0", + "uart_16550", + "x2apic", + "x86", + "x86_64", +] + +[[package]] +name = "axplat-x86-qemu-q35" +version = "0.1.0" +dependencies = [ + "axplat-x86-pc 0.2.0 (git+https://github.com/arceos-hypervisor/axplat_crates.git?branch=vmm)", +] + +[[package]] +name = "axruntime" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "axalloc", + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", + "axdriver", + "axerrno", + "axfs", + "axhal", + "axlog", + "axmm", + "axplat 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "axtask", + "chrono", + "crate_interface", + "ctor_bare", + "percpu", +] + +[[package]] +name = "axsched" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44de469da35f912194e4104cc2f51bff63d6c184b65b6ebf8e90e2cd162b7f3c" +dependencies = [ + "linked_list_r4l", +] + +[[package]] +name = "axstd" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "arceos_api", + "axerrno", + "axfeat", + "axio", + "kspin", + "lock_api", +] + +[[package]] +name = "axsync" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "axtask", + "kspin", + "lock_api", +] + +[[package]] +name = "axtask" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1#0106ce9d36d225943acb93a86359a61346170ff2" +dependencies = [ + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?tag=hv-0.3.1)", + "axhal", + "axsched", + "cfg-if", + "cpumask", + "crate_interface", "kernel_guard", "kspin", "lazyinit", "log", "memory_addr", "percpu", - "scheduler", "timer_list", ] [[package]] name = "axvcpu" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvcpu.git#34fc1067c4e9dddf3e43e7d290bcb5cf4127382e" +version = "0.1.2" +source = "git+https://github.com/arceos-hypervisor/axvcpu.git?branch=next#343ec3ccf99a86fb9c67a7b0372e9b7a745f0640" dependencies = [ "axaddrspace", "axerrno", + "axvisor_api", "memory_addr", "percpu", ] @@ -562,16 +1002,31 @@ dependencies = [ name = "axvisor" version = "0.1.0" dependencies = [ + "aarch64-cpu-ext", + "arm-gic-driver", "axaddrspace", - "axconfig", + "axconfig 0.2.0 (git+https://github.com/arceos-hypervisor/arceos.git?branch=vmm-dev)", + "axdevice", + "axdevice_base", "axerrno", + "axhvc", + "axplat-aarch64-generic", + "axplat-aarch64-phytium-pi", + "axplat-aarch64-roc-rk3568-pc", + "axplat-x86-qemu-q35", "axstd", "axvcpu", + "axvisor_api", "axvm", - "bitflags 2.9.0", + "bitflags 2.9.4", + "byte-unit", "cfg-if", + "cpumask", "crate_interface", + "fdt-parser", + "kernel_guard", "kspin", + "lazy_static", "lazyinit", "log", "memory_addr", @@ -580,53 +1035,107 @@ dependencies = [ "percpu", "prettyplease", "quote", - "spin", - "syn 2.0.100", + "rdif-intc", + "rdrive", + "spin 0.9.8", + "syn 2.0.106", "timer_list", - "toml", + "toml 0.9.7", + "vm-fdt", +] + +[[package]] +name = "axvisor_api" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa7233b2a1338dc06a80e2779b572b4df02007ea128ef7b235b66fc3eeac0ca6" +dependencies = [ + "axaddrspace", + "axvisor_api_proc", + "crate_interface", + "memory_addr", +] + +[[package]] +name = "axvisor_api_proc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a64eb4410ae8357ac8c01c2fb201e57d7aeeb5436ed4d0f5774bfa11cc5902" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] name = "axvm" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvm.git#69b48a93cedb031a78f59d6219bd323d12e96a71" +source = "git+https://github.com/arceos-hypervisor/axvm.git?branch=next#62dc1461bc8dff5d22264962da4d2f86ded915f8" dependencies = [ "arm_vcpu", + "arm_vgic 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "axaddrspace", "axdevice", + "axdevice_base", "axerrno", "axvcpu", "axvmconfig", "cfg-if", + "cpumask", "log", "memory_addr", "page_table_entry", "page_table_multiarch", "percpu", "riscv_vcpu", - "spin", + "spin 0.9.8", "x86_vcpu", ] [[package]] name = "axvmconfig" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/axvmconfig.git#19e73fc71c48c0af49f6fda960c144b297e41435" +source = "git+https://github.com/arceos-hypervisor/axvmconfig.git?branch=next#34c0e6473b057a697c48cc37c5b25853c1ea2826" dependencies = [ "axerrno", + "enumerable", "log", "serde", "serde_repr", - "toml", + "toml 0.9.7", +] + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link 0.2.0", ] [[package]] name = "bare-metal" -version = "0.2.5" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fe8f5a8a398345e52358e18ff07cc17a568fbca5c6f73873d3a62056309603" + +[[package]] +name = "bare-test-macros" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5deb64efa5bd81e31fcd1938615a6d98c82eafcbcd787162b6f63b91d6bac5b3" +checksum = "e585a01076fee271c5aabcf36212acb349fb3e638561d842fffa8ca013f4fdd8" dependencies = [ - "rustc_version", + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] @@ -635,6 +1144,32 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bindeps-simple" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759b427caeff86cb964340e5fee96d7b26a58853941d3a8e051f46be7b1fada3" +dependencies = [ + "anyhow", + "cargo_metadata", + "flate2", + "rand", + "reqwest 0.12.23", + "tar", +] + [[package]] name = "bit" version = "0.1.1" @@ -643,9 +1178,9 @@ checksum = "2b645c5c09a7d4035949cfce1a915785aaad6f17800c35fda8a8c311c491f284" [[package]] name = "bit_field" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" [[package]] name = "bitflags" @@ -655,15 +1190,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bitmap-allocator" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5553d824a3564e1c242975cfc962d15e6299bfa4a90c44c14208673c16df51f3" +checksum = "e11e01b72b2a40aab84454fb6b71090c2a6873e1b5ba22a8e3d74e83086a2304" dependencies = [ "bit_field", ] @@ -674,964 +1209,3259 @@ version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "byte-unit" +version = "5.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cd29c3c585209b0cbc7309bfe3ed7efd8c84c21b7af29c8bfae908f8777174" +dependencies = [ + "rust_decimal", + "utf8-width", +] + +[[package]] +name = "bytemuck" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" + [[package]] name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "camino" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1de8bc0aa9e9385ceb3bf0c152e3a9b9544f6c4a912c8ae504e80c1f0368603" +dependencies = [ + "serde_core", +] + [[package]] name = "cap_access" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b24894fa5f73bbf9c72196e7f495a1f81d6218a548280a09ada4a937157692" +checksum = "c9b24894fa5f73bbf9c72196e7f495a1f81d6218a548280a09ada4a937157692" +dependencies = [ + "bitflags 2.9.4", +] + +[[package]] +name = "cargo-platform" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-util-schemas" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63d2780ac94487eb9f1fea7b0d56300abc9eb488800854ca217f102f5caccca" +dependencies = [ + "semver", + "serde", + "serde-untagged", + "serde-value", + "thiserror 1.0.69", + "toml 0.8.23", + "unicode-xid", + "url", +] + +[[package]] +name = "cargo_metadata" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f7835cfc6135093070e95eb2b53e5d9b5c403dc3a6be6040ee026270aa82502" +dependencies = [ + "camino", + "cargo-platform", + "cargo-util-schemas", + "semver", + "serde", + "serde_json", + "thiserror 2.0.17", +] + +[[package]] +name = "cc" +version = "1.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "chrono" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +dependencies = [ + "num-traits", +] + +[[package]] +name = "clap" +version = "4.5.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "const-default" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa" + +[[package]] +name = "const-str" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451d0640545a0553814b4c646eb549343561618838e9b42495f466131fe3ad49" + +[[package]] +name = "convert_case" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpumask" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe4266f1bd910c087ff8c7848882217b2b079742877b21d29614c11c16087d70" +dependencies = [ + "bitmaps", +] + +[[package]] +name = "crate_interface" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70272a03a2cef15589bac05d3d15c023752f5f8f2da8be977d983a9d9e6250fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "ctor_bare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e5ae3c454dc1efb0e5821dc17344539849391b2de18c89596ea563f1909f93" +dependencies = [ + "ctor_bare_macros", +] + +[[package]] +name = "ctor_bare_macros" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a49d5cd78b1c748184d41407b14a58af8403c13328ff2b9f49b0a418c24e3ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "dma-api" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624f4a84cc1031cfceb56780b82570a785f6cfdcee4f34c06c4e8f1fba25c970" + +[[package]] +name = "dma-api" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d51274fe946b4c27cdada87cc6de09a50c0d9192c0f30ba455b29dae09caa0b" +dependencies = [ + "aarch64-cpu-ext", +] + +[[package]] +name = "dma-api" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2303b0bbacb23e7e1990fb31bed5cb46bc67aa4f307c03117b81bdee4d9f" +dependencies = [ + "aarch64-cpu-ext", + "cfg-if", + "spin 0.10.0", + "thiserror 2.0.17", +] + +[[package]] +name = "embedded-hal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" + +[[package]] +name = "embedded-hal-nb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "enumerable" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05481ae0c653c7de79f2f62d515b09049fed59cbfc5755a4afe55c95181492b" +dependencies = [ + "enumerable_derive", +] + +[[package]] +name = "enumerable_derive" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef47b28174f7ef4ccb124c8766565006263114c1cc129cd119a66f1e15635125" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.1", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fatfs" +version = "0.4.0" +source = "git+https://github.com/rafalh/rust-fatfs?rev=4eccb50#4eccb50d011146fbed20e133d33b22f3c27292e7" +dependencies = [ + "bitflags 2.9.4", + "log", +] + +[[package]] +name = "fdt-parser" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ca123a5721e4a28ef60d6e1600cd0a33a9ab376c4b88de04c99bce757e458b" + +[[package]] +name = "filetime" +version = "0.2.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.60.2", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "handler_table" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702cb690200d6303c1e1992bc648f3f3bf9c1d6a27fcf50551c513d61f339c99" + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heapless" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1edcd5a338e64688fbdcb7531a846cfd3476a54784dcb918a0844682bc7ada5" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.1", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http 1.3.1", + "hyper 1.7.0", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.32", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.7.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "hyper 1.7.0", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2 0.6.0", + "system-configuration 0.6.1", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +dependencies = [ + "equivalent", + "hashbrown 0.16.0", +] + +[[package]] +name = "int_ratio" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6045ea39e8d2862506c0dff6c65d068da362335df698bb1634033492740d2170" + +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "kasm-aarch64" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791dc7a2b079d81b8e3615521fccbd75c0c9f068b53f7d891a2e300222c7cada" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "kdef-pgtable" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7166660a78a4488f5f3269206242d3b76cd6b42d870f004898487ce16dba3f69" +dependencies = [ + "bitflags 2.9.4", + "prettyplease", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "kernel_guard" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307e6be468f3d6b6d895e191f63c11602e4e76575ecca68325d8c8dbebe2870e" +dependencies = [ + "cfg-if", + "crate_interface", +] + +[[package]] +name = "kspin" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d841fd3aeaa9a55871068f5c3ce48497a6dbcf14e20ca7784a9f68bfdb4c825" +dependencies = [ + "cfg-if", + "kernel_guard", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin 0.9.8", +] + +[[package]] +name = "lazyinit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f03abfebdaaf0fad16790237a0348baf84886d3ade460db13bae59e614a180" + +[[package]] +name = "lenient_semver" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de8de3f4f3754c280ce1c8c42ed8dd26a9c8385c2e5ad4ec5a77e774cea9c1ec" +dependencies = [ + "lenient_semver_parser", + "semver", +] + +[[package]] +name = "lenient_semver_parser" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f650c1d024ddc26b4bb79c3076b30030f2cf2b18292af698c81f7337a64d7d6" +dependencies = [ + "lenient_semver_version_builder", + "semver", +] + +[[package]] +name = "lenient_semver_version_builder" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9049f8ff49f75b946f95557148e70230499c8a642bf2d6528246afc7d0282d17" +dependencies = [ + "semver", +] + +[[package]] +name = "libc" +version = "0.2.176" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags 2.9.4", + "libc", + "redox_syscall", +] + +[[package]] +name = "linked_list_r4l" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54c6e48d7df84e6414be8e53976ead35ba4d47a4ba561eaad5d1e2b1447b4c0a" + +[[package]] +name = "linkme" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e3283ed2d0e50c06dd8602e0ab319bb048b6325d0bba739db64ed8205179898" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5cec0ec4228b4853bb129c84dbf093a27e6c7a20526da046defc334a1b017f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "loongArch64" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9f0d275c70310e2a9d2fc23250c5ac826a73fa828a5f256401f85c5c554283" +dependencies = [ + "bit_field", + "bitflags 2.9.4", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memory_addr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d4054cba279515fa87761b101d857333ce06391dbe8f18a11347204a7111416" + +[[package]] +name = "memory_set" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7d47cbc25a4d00427f9070fd768eaf907f19c903fb72b547b19db2d56b9408e" +dependencies = [ + "memory_addr", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "multiboot" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87ad3b7b7bcf5da525c22221e3eb3a020cd68b2d55ae62f629c15e8bc3bd56e" +dependencies = [ + "paste", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nb" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" + +[[package]] +name = "ns16550a" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3cd8abe9e54bce27659507b94f355c9334378ab15da332b6986b3583ebf7228" + +[[package]] +name = "num-align" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4b86e8ef968de2261141fc760ee57cae8fabb3a0e756b3390a4c4871b16c3d1" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "numeric-enum-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e4bdb6b46b592948e700ea1ef24a4296491f6a0ee722b258040abd15a3714" + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "page-table-generic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a302d085e35d9edfa3ec531475ed95eae8a92e7e47ce7a15bd4e9c5e74f7526" +dependencies = [ + "bitflags 2.9.4", + "log", + "num-align", + "thiserror 2.0.17", +] + +[[package]] +name = "page_table_entry" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba811ef8ca8fb33d776e128624cb4fe25c9804cab96f83b822d4322431e6dd5a" +dependencies = [ + "aarch64-cpu", + "bitflags 2.9.4", + "memory_addr", + "x86_64", +] + +[[package]] +name = "page_table_multiarch" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cb76e21ce462270afd83b331599d5b83f876c2a98c0a70382b20d73e1da6be" +dependencies = [ + "bitmaps", + "log", + "memory_addr", + "page_table_entry", + "riscv", + "x86", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pci_types" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4325c6aa3cca3373503b1527e75756f9fbfe5fd76be4b4c8a143ee47430b8e0" +dependencies = [ + "bit_field", + "bitflags 2.9.4", +] + +[[package]] +name = "pcie" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225c81c0f672afbdd95e55abebe56541870e64e350eba9f7eabfb392112229ab" +dependencies = [ + "bare-test-macros", + "bit_field", + "bitflags 2.9.4", + "log", + "pci_types", + "rdif-pcie", + "thiserror 2.0.17", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "percpu" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e56c0c558952222967b592899f98765b48590e7bd7403bfd7075f73afc6ed6" +dependencies = [ + "cfg-if", + "percpu_macros", + "spin 0.9.8", + "x86", +] + +[[package]] +name = "percpu_macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9f4cc54a2e471ff72f1499461ba381ad4eae9cbd60d29c258545b995e406e0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "phytium-mci" +version = "0.1.0" +source = "git+https://github.com/YanQD/phytium-mci.git?rev=99c9ee5#99c9ee5f66490fbf41370be3b3d7a42cf4406b0c" +dependencies = [ + "bare-test-macros", + "bitflags 2.9.4", + "bytemuck", + "dma-api 0.2.2", + "lazy_static", + "log", + "nb", + "rlsf", + "spin 0.10.0", + "tock-registers 0.9.0", +] + +[[package]] +name = "pie-boot-if" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d979b0d1208dd8a57c5adb7d3c4e07bf15cbea3840123e864f6bfcb655c5e05" +dependencies = [ + "heapless 0.8.0", +] + +[[package]] +name = "pie-boot-loader-aarch64" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de8836eb8759cd65e70c73dc0f519345d8a734284e8e4cfc5889a6e445af9f09" +dependencies = [ + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "bitflags 2.9.4", + "fdt-parser", + "kasm-aarch64", + "kdef-pgtable", + "log", + "num-align", + "page-table-generic", + "pie-boot-if", + "prettyplease", + "quote", + "spin 0.10.0", + "syn 2.0.106", + "thiserror 2.0.17", +] + +[[package]] +name = "pie-boot-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513f5ca7603771d7524bfb7e6ba8dded83d2e8ac02d46f15815e0c1144bca566" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy 0.8.27", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.106", +] + +[[package]] +name = "proc-macro-crate" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +dependencies = [ + "toml_edit 0.23.6", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] + +[[package]] +name = "range-alloc" +version = "0.1.4" +source = "git+https://github.com/arceos-hypervisor/range-alloc.git#fc826e54dab9072be5358a1b0e7fc34503d6630d" + +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.9.4", +] + +[[package]] +name = "rdif-base" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8c32d8cbc18633a412130719b07d31135215d1715ac48fc3888ca835a811ba" +dependencies = [ + "as-any", + "async-trait", + "paste", + "rdif-def", + "thiserror 2.0.17", +] + +[[package]] +name = "rdif-block" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ae1ba6c121eef2653dd2e0c88a209bb1d4d21e75e15cca71f19770ef327f81" +dependencies = [ + "cfg-if", + "dma-api 0.5.1", + "futures", + "rdif-base", + "spin_on", + "thiserror 2.0.17", +] + +[[package]] +name = "rdif-clk" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9af012204e25d45735aa141b475c411b833b4f4bc580924905745d4afbbf606" +dependencies = [ + "rdif-base", +] + +[[package]] +name = "rdif-def" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c238eb44d86fabc99028adc973f896ce2202aeb6184cc8b89863f2d157d7ca06" +dependencies = [ + "thiserror 2.0.17", +] + +[[package]] +name = "rdif-intc" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170ec813e6cf4d1e5fa53fa8fed0fadc7aaab96683d4f1d44c602a6109931eb4" +dependencies = [ + "cfg-if", + "rdif-base", + "thiserror 2.0.17", +] + +[[package]] +name = "rdif-pcie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abf057b17ca5ead0ee41c485bf3c2781fd9bbf88cc678539fa361aa5db3ed8d" +dependencies = [ + "pci_types", + "rdif-base", + "thiserror 2.0.17", +] + +[[package]] +name = "rdrive" +version = "0.18.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31c8f4f35afa65218795cbd5d2cb52c6e44e1fade40900966b0ec8bbd2a10ff3" +dependencies = [ + "fdt-parser", + "log", + "paste", + "pcie", + "rdif-base", + "rdif-pcie", + "rdrive-macros", + "spin 0.10.0", + "thiserror 2.0.17", +] + +[[package]] +name = "rdrive-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab3105c9af32e901a2adc7d920b39ff8b6ee0f6f0b7dfdeaf18f306ec12606f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags 2.9.4", +] + +[[package]] +name = "release-dep" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d2060fec225361f815b40c6857b5722835318abdea0e20ee86b81cf1ac5c9a" +dependencies = [ + "anyhow", + "futures", + "reqwest 0.11.27", + "semver", + "serde", + "serde_json", + "tokio", + "tokio-util", +] + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-rustls", + "hyper-tls 0.6.0", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "riscv" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f1671c79a01a149fe000af2429ce9ccc8e58cdecda72672355d50e5536b363c" +dependencies = [ + "critical-section", + "embedded-hal", + "paste", + "riscv-macros", + "riscv-pac", +] + +[[package]] +name = "riscv-decode" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b59d645e392e041ad18f5e529ed13242d8405c66bb192f59703ea2137017d0" + +[[package]] +name = "riscv-h" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cffa652689d01c5f7033abe105e69f4d57ac85bf7e17da688bab10e4b9d3a2d8" +dependencies = [ + "bare-metal", + "bit_field", + "bitflags 2.9.4", + "log", + "riscv", +] + +[[package]] +name = "riscv-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c4aa1ea1af6dcc83a61be12e8189f9b293c3ba5a487778a4cd89fb060fdbbc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "riscv-pac" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" + +[[package]] +name = "riscv_vcpu" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13f38f28fe6c02bb3ced43087c9667b23d18adf729becdc5adf1253f7df83904" +dependencies = [ + "axaddrspace", + "axerrno", + "axvcpu", + "axvisor_api", + "bit_field", + "bitflags 2.9.4", + "cfg-if", + "crate_interface", + "log", + "memoffset", + "memory_addr", + "page_table_entry", + "riscv", + "riscv-decode", + "riscv-h", + "rustsbi", + "sbi-rt", + "sbi-spec", + "tock-registers 0.9.0", +] + +[[package]] +name = "rk3568_clk" +version = "0.1.0" +source = "git+https://github.com/drivercraft/rk3568-clk.git#2b63818f9f9f576d99988fafa70de41112524e00" +dependencies = [ + "aarch64-cpu", + "bare-test-macros", + "fdt-parser", + "kspin", + "log", +] + +[[package]] +name = "rlsf" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222fb240c3286247ecdee6fa5341e7cdad0ffdf8e7e401d9937f2d58482a20bf" +dependencies = [ + "cfg-if", + "const-default", + "libc", + "svgbobdoc", +] + +[[package]] +name = "rust_decimal" +version = "1.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8975fc98059f365204d635119cf9c5a60ae67b841ed49b5422a9a7e56cdfac0" +dependencies = [ + "arrayvec", + "num-traits", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.1", +] + +[[package]] +name = "rustls" +version = "0.23.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustsbi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c13763120794ed11d64bac885fb31d384ae385c3287b0697711b97affbf8ab" +dependencies = [ + "rustsbi-macros", + "sbi-rt", + "sbi-spec", +] + +[[package]] +name = "rustsbi-macros" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a71347da9582cc6b6f3652c7d2c06516c9555690b3738ecdff7e84297f4e17fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "sbi-rt" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbaa69be1eedc61c426e6d489b2260482e928b465360576900d52d496a58bd0" +dependencies = [ + "sbi-spec", +] + +[[package]] +name = "sbi-spec" +version = "0.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e36312fb5ddc10d08ecdc65187402baba4ac34585cb9d1b78522ae2358d890" + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.1", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sdmmc" +version = "0.1.0" +source = "git+https://github.com/drivercraft/sdmmc.git#7ba0222ada46fd5759af24f405780d73581e36fd" +dependencies = [ + "aarch64-cpu", + "arm_pl011", + "bare-test-macros", + "bitflags 2.9.4", + "cfg-if", + "dma-api 0.3.1", + "fdt-parser", + "kspin", + "log", + "paste", + "smccc", + "spin 0.10.0", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" dependencies = [ - "bitflags 2.9.0", + "serde", + "serde_core", ] [[package]] -name = "cfg-if" -version = "1.0.0" +name = "serde" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] [[package]] -name = "chrono" -version = "0.4.40" +name = "serde-untagged" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" dependencies = [ - "num-traits", + "erased-serde", + "serde", + "serde_core", + "typeid", ] [[package]] -name = "clap" -version = "4.5.34" +name = "serde-value" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" dependencies = [ - "clap_builder", - "clap_derive", + "ordered-float", + "serde", ] [[package]] -name = "clap_builder" -version = "4.5.34" +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", + "serde_derive", ] [[package]] -name = "clap_derive" -version = "4.5.32" +name = "serde_derive" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "heck", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] -name = "clap_lex" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" - -[[package]] -name = "colorchoice" -version = "1.0.3" +name = "serde_json" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] [[package]] -name = "const-default" -version = "1.0.0" +name = "serde_repr" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] [[package]] -name = "const-random" -version = "0.1.18" +name = "serde_spanned" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ - "const-random-macro", + "serde", ] [[package]] -name = "const-random-macro" -version = "0.1.16" +name = "serde_spanned" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" dependencies = [ - "getrandom", - "once_cell", - "tiny-keccak", + "serde_core", ] [[package]] -name = "cortex-a" -version = "8.1.1" +name = "serde_urlencoded" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8256fd5103e10027467cc7a97c9ff27fcc4547ea24864da0aff2e7aef6e18e28" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "tock-registers 0.8.1", + "form_urlencoded", + "itoa", + "ryu", + "serde", ] [[package]] -name = "cpumask" -version = "0.1.0" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4266f1bd910c087ff8c7848882217b2b079742877b21d29614c11c16087d70" -dependencies = [ - "bitmaps", -] +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] -name = "crate_interface" -version = "0.1.4" +name = "signal-hook-registry" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70272a03a2cef15589bac05d3d15c023752f5f8f2da8be977d983a9d9e6250fb" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "libc", ] [[package]] -name = "critical-section" -version = "1.2.0" +name = "slab" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] -name = "crunchy" -version = "0.2.3" +name = "smallvec" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] -name = "ctor_bare" -version = "0.2.1" +name = "smccc" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e5ae3c454dc1efb0e5821dc17344539849391b2de18c89596ea563f1909f93" +checksum = "7c73e0ca8c566478040487791c9f488f86c5aec846ca1ab18484be8a1d8c55cd" dependencies = [ - "ctor_bare_macros", + "thiserror 2.0.17", ] [[package]] -name = "ctor_bare_macros" -version = "0.2.1" +name = "socket2" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a49d5cd78b1c748184d41407b14a58af8403c13328ff2b9f49b0a418c24e3ff" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "dw_apb_uart" -version = "0.1.0" +name = "socket2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93d496c8faa9dc676ebfa225432e1e3b57645c9268ead889286546f6d39356d" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" dependencies = [ - "tock-registers 0.8.1", + "libc", + "windows-sys 0.59.0", ] [[package]] -name = "embedded-hal" -version = "1.0.0" +name = "somehal" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" +checksum = "5a9b180e1abae1127bd99ecee566c3906d8c0f854cb1c442b945afe911e6eb71" +dependencies = [ + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "bindeps-simple", + "fdt-parser", + "futures", + "heapless 0.8.0", + "kasm-aarch64", + "kdef-pgtable", + "log", + "num-align", + "page-table-generic", + "pie-boot-if", + "pie-boot-loader-aarch64", + "pie-boot-macros", + "release-dep", + "serde", + "smccc", + "spin 0.10.0", + "toml 0.9.7", + "url", +] [[package]] -name = "enum_dispatch" -version = "0.3.13" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.100", + "lock_api", ] [[package]] -name = "equivalent" -version = "1.0.2" +name = "spin" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "fatfs" -version = "0.4.0" -source = "git+https://github.com/rafalh/rust-fatfs?rev=85f06e0#85f06e08edbd3368e1b0562f2fc1b6d178bf7b8a" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" dependencies = [ - "bitflags 2.9.0", - "log", + "lock_api", ] [[package]] -name = "getrandom" -version = "0.2.15" +name = "spin_on" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "076e103ed41b9864aa838287efe5f4e3a7a0362dd00671ae62a212e5e4612da2" dependencies = [ - "cfg-if", - "libc", - "wasi", + "pin-utils", ] [[package]] -name = "handler_table" -version = "0.1.2" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702cb690200d6303c1e1992bc648f3f3bf9c1d6a27fcf50551c513d61f339c99" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "hashbrown" -version = "0.14.5" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] -name = "hashbrown" -version = "0.15.2" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] -name = "heck" -version = "0.5.0" +name = "subtle" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] -name = "indexmap" -version = "2.8.0" +name = "svgbobdoc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "f2c04b93fc15d79b39c63218f15e3fdffaa4c227830686e3b7c5f41244eb3e50" dependencies = [ - "equivalent", - "hashbrown 0.15.2", + "base64 0.13.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-width", ] [[package]] -name = "int_ratio" -version = "0.1.1" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd361c344145620f0c02e56200ca3e3a45203121447376519a9070e546b2916f" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] -name = "is_terminal_polyfill" -version = "1.70.1" +name = "syn" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] -name = "kernel_guard" +name = "sync_wrapper" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307e6be468f3d6b6d895e191f63c11602e4e76575ecca68325d8c8dbebe2870e" -dependencies = [ - "cfg-if", - "crate_interface", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "kspin" -version = "0.1.0" +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51954c939251c5899b6e953aa0ed8903c5c0d1140fc7ce3a8fd60c931d694f6e" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "cfg-if", - "kernel_guard", + "futures-core", ] [[package]] -name = "lazy_static" -version = "1.5.0" +name = "synstructure" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] [[package]] -name = "lazyinit" -version = "0.2.1" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3861aac8febbb038673bf945ee47ac67940ca741b94d1bb3ff6066af2a181338" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys 0.5.0", +] [[package]] -name = "libc" -version = "0.2.171" +name = "system-configuration" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "system-configuration-sys 0.6.0", +] [[package]] -name = "linked_list" -version = "0.1.0" -source = "git+https://github.com/arceos-org/linked_list.git?tag=v0.1.0#34c8db301882cecfeb56df0f7c89978dbc62f49a" +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] -name = "linkme" -version = "0.3.32" +name = "system-configuration-sys" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22d227772b5999ddc0690e733f734f95ca05387e329c4084fe65678c51198ffe" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ - "linkme-impl", + "core-foundation-sys", + "libc", ] [[package]] -name = "linkme-impl" -version = "0.3.32" +name = "tar" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71a98813fa0073a317ed6a8055dcd4722a49d9b862af828ee68449adb799b6be" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "filetime", + "libc", + "xattr", ] [[package]] -name = "lock_api" -version = "0.4.12" +name = "tempfile" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "autocfg", - "scopeguard", + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.61.1", ] [[package]] -name = "log" -version = "0.4.21" +name = "thiserror" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] [[package]] -name = "loongArch64" -version = "0.2.4" +name = "thiserror" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd48200d465466664e4e899b204b77b5447d60b1ababdad3a2c49ae85417b552" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "bit_field", - "bitflags 1.3.2", + "thiserror-impl 2.0.17", ] [[package]] -name = "memchr" -version = "2.7.4" +name = "thiserror-impl" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] [[package]] -name = "memoffset" -version = "0.9.1" +name = "thiserror-impl" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ - "autocfg", + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] -name = "memory_addr" -version = "0.3.2" +name = "timer_list" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5438b8df0f13e16e1f46140de247695a95952a5a4479e47197a8711bf1063373" +checksum = "158b52ace9609dd94f4af338f4828ff23b600d9160def8c001f2c73885521936" [[package]] -name = "memory_set" -version = "0.3.2" +name = "tinystr" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4552d02c866c57e8b06b919ea8c2f8f398cad245b8f6aac726657bc972d663d" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ - "memory_addr", + "displaydoc", + "zerovec", ] [[package]] -name = "ns16550a" -version = "0.4.0" +name = "tock-registers" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "696941a0aee7e276a165a978b37918fd5d22c55c3d6bda197813070ca9c0f21c" + +[[package]] +name = "tock-registers" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b9e2fdb3a1e862c0661768b7ed25390811df1947a8acbfbefe09b47078d93c4" + +[[package]] +name = "tock-registers" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "667fbdfccff4775918606516ff6ca51b898ac0842c4bc41c960a55a9832545a6" +checksum = "b0293f99756f16ff352cc78c99673766a305bdb5ed7652e78df649e9967c885a" [[package]] -name = "num-traits" -version = "0.2.19" +name = "tokio" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ - "autocfg", + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2 0.6.0", + "tokio-macros", + "windows-sys 0.59.0", ] [[package]] -name = "numeric-enum-macro" -version = "0.2.0" +name = "tokio-macros" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300e4bdb6b46b592948e700ea1ef24a4296491f6a0ee722b258040abd15a3714" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] [[package]] -name = "once_cell" -version = "1.21.3" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] [[package]] -name = "page_table_entry" -version = "0.5.3" +name = "tokio-rustls" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c097d641745a066856a26eed6e486d4430bb3e32c94f1203ea09c63239b360a0" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "aarch64-cpu 10.0.0", - "bitflags 2.9.0", - "memory_addr", - "x86_64 0.15.2", + "rustls", + "tokio", ] [[package]] -name = "page_table_multiarch" -version = "0.5.3" +name = "tokio-util" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4647889585d29762d747be0916d6d28db72967a697d142be86f187a6b496832a" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ - "log", - "memory_addr", - "page_table_entry", - "riscv 0.12.1", - "x86", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] -name = "paste" -version = "1.0.15" +name = "toml" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] [[package]] -name = "percpu" -version = "0.2.0" +name = "toml" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e56c0c558952222967b592899f98765b48590e7bd7403bfd7075f73afc6ed6" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" dependencies = [ - "cfg-if", - "percpu_macros", - "spin", - "x86", + "indexmap", + "serde_core", + "serde_spanned 1.0.2", + "toml_datetime 0.7.2", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] -name = "percpu_macros" -version = "0.2.0" +name = "toml_datetime" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9f4cc54a2e471ff72f1499461ba381ad4eae9cbd60d29c258545b995e406e0" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "serde", ] [[package]] -name = "prettyplease" -version = "0.2.31" +name = "toml_datetime" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" dependencies = [ - "proc-macro2", - "syn 2.0.100", + "serde_core", ] [[package]] -name = "proc-macro2" -version = "1.0.94" +name = "toml_edit" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "unicode-ident", + "indexmap", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_write", + "winnow", ] [[package]] -name = "quote" -version = "1.0.40" +name = "toml_edit" +version = "0.23.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "f3effe7c0e86fdff4f69cdd2ccc1b96f933e24811c5441d44904e8683e27184b" dependencies = [ - "proc-macro2", + "indexmap", + "toml_datetime 0.7.2", + "toml_parser", + "winnow", ] [[package]] -name = "raw-cpuid" -version = "10.7.0" +name = "toml_parser" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" dependencies = [ - "bitflags 1.3.2", + "winnow", ] [[package]] -name = "raw-cpuid" -version = "11.5.0" +name = "toml_write" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" -dependencies = [ - "bitflags 2.9.0", -] +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" [[package]] -name = "rdif-base" -version = "0.2.1" +name = "toml_writer" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "646f76de5c5a02b0cf2677f99d5216b9fc301d47dbac8d056f7e74f8c0e89008" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" [[package]] -name = "rdif-intc" -version = "0.6.4" +name = "tower" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4dce859ee52f984c78d41f647eb3266e58824e385583ae64a5467597c84fd5a" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ - "cfg-if", - "rdif-base", + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", ] [[package]] -name = "regex" -version = "1.11.1" +name = "tower-http" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "bitflags 2.9.4", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", ] [[package]] -name = "regex-automata" -version = "0.4.9" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] -name = "regex-syntax" -version = "0.8.5" +name = "tower-service" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] -name = "riscv" -version = "0.6.0" -source = "git+https://github.com/rcore-os/riscv#11d43cf7cccb3b62a3caaf3e07a1db7449588f9a" +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "bare-metal", - "bit_field", - "bitflags 1.3.2", - "log", - "riscv-target", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "riscv" -version = "0.12.1" +name = "tracing-core" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea8ff73d3720bdd0a97925f0bf79ad2744b6da8ff36be3840c48ac81191d7a7" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ - "critical-section", - "embedded-hal", - "paste", - "riscv-macros", - "riscv-pac", + "once_cell", ] [[package]] -name = "riscv-decode" -version = "0.2.1" -source = "git+https://github.com/KuangjuX/riscv-decode.git#0e346d0ad041987023caa6f7f832185ed568630b" - -[[package]] -name = "riscv-macros" -version = "0.1.0" +name = "trait-ffi" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f265be5d634272320a7de94cea15c22a3bfdd4eb42eb43edc528415f066a1f25" +checksum = "d87d49469ee333631b3130bec28965c47dcf0d4f3a792f8ed425dd036cf84be7" dependencies = [ + "convert_case", + "lenient_semver", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] -name = "riscv-pac" -version = "0.2.0" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "riscv-target" -version = "0.1.2" +name = "typeid" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88aa938cda42a0cf62a20cfe8d139ff1af20c2e681212b5b34adb5a58333f222" -dependencies = [ - "lazy_static", - "regex", -] +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] -name = "riscv_vcpu" -version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/riscv_vcpu.git#4000ae3cd546423c20785d7d93f81a80233cc35a" +name = "uart_16550" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d293f51425981fdb1b766beae254dbb711a17e8c4b549dc69b9b7ee0d478d5" dependencies = [ - "axaddrspace", - "axerrno", - "axvcpu", - "bit_field", - "bitflags 2.9.0", - "cfg-if", - "crate_interface", - "log", - "memoffset", - "memory_addr", - "page_table_entry", - "riscv 0.6.0", - "riscv-decode", - "rustsbi", - "sbi-rt", - "sbi-spec", - "tock-registers 0.8.1", + "bitflags 2.9.4", + "rustversion", + "x86", ] [[package]] -name = "rlsf" -version = "0.2.1" +name = "unicode-ident" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222fb240c3286247ecdee6fa5341e7cdad0ffdf8e7e401d9937f2d58482a20bf" -dependencies = [ - "cfg-if", - "const-default", - "libc", - "svgbobdoc", -] +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] -name = "rustc_version" -version = "0.2.3" +name = "unicode-segmentation" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] -name = "rustsbi" -version = "0.4.0" +name = "unicode-width" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c13763120794ed11d64bac885fb31d384ae385c3287b0697711b97affbf8ab" -dependencies = [ - "rustsbi-macros", - "sbi-rt", - "sbi-spec", -] +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] -name = "rustsbi-macros" -version = "0.0.2" +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a71347da9582cc6b6f3652c7d2c06516c9555690b3738ecdff7e84297f4e17fc" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] -name = "rustversion" -version = "1.0.20" +name = "untrusted" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "sbi-rt" -version = "0.0.3" +name = "url" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbaa69be1eedc61c426e6d489b2260482e928b465360576900d52d496a58bd0" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ - "sbi-spec", + "form_urlencoded", + "idna", + "percent-encoding", + "serde", ] [[package]] -name = "sbi-spec" -version = "0.0.7" +name = "utf8-width" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e36312fb5ddc10d08ecdc65187402baba4ac34585cb9d1b78522ae2358d890" - -[[package]] -name = "scheduler" -version = "0.1.0" -source = "git+https://github.com/arceos-org/scheduler.git?tag=v0.1.0#c8d25d9aed146dca28dc8987afd229b52c20361a" -dependencies = [ - "linked_list", -] +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" [[package]] -name = "scopeguard" -version = "1.2.0" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] -name = "semver" -version = "0.9.0" +name = "utf8parse" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "semver-parser" -version = "0.7.0" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "serde" -version = "1.0.219" +name = "version_check" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "serde_derive" -version = "1.0.219" +name = "virtio-drivers" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +checksum = "aa40e09453618c7a927c08c5a990497a2954da7c2aaa6c65e0d4f0fc975f6114" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "bitflags 2.9.4", + "log", + "zerocopy 0.7.35", ] [[package]] -name = "serde_repr" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" +name = "vm-fdt" +version = "0.3.0" +source = "git+https://github.com/bullhh/vm-fdt.git#f8caf77fadf4e925e91df5bd211c8a96dc1f6e07" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "hashbrown 0.14.5", ] [[package]] -name = "serde_spanned" -version = "0.6.6" -source = "git+https://github.com/arceos-hypervisor/toml.git?branch=no_std#fdb24a160d68ee9f8f42b34fffaa3640e94ed604" -dependencies = [ - "serde", -] +name = "volatile" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442887c63f2c839b346c192d047a7c87e73d0689c9157b00b53dcc27dd5ea793" [[package]] -name = "spin" -version = "0.9.8" +name = "want" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "lock_api", + "try-lock", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "strsim" -version = "0.11.1" +name = "wasi" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] [[package]] -name = "svgbobdoc" -version = "0.3.0" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c04b93fc15d79b39c63218f15e3fdffaa4c227830686e3b7c5f41244eb3e50" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "base64", - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-width", + "wit-bindgen", ] [[package]] -name = "syn" -version = "1.0.109" +name = "wasm-bindgen" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] -name = "syn" -version = "2.0.100" +name = "wasm-bindgen-backend" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ + "bumpalo", + "log", "proc-macro2", "quote", - "unicode-ident", + "syn 2.0.106", + "wasm-bindgen-shared", ] [[package]] -name = "timer_list" -version = "0.1.0" +name = "wasm-bindgen-futures" +version = "0.4.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158b52ace9609dd94f4af338f4828ff23b600d9160def8c001f2c73885521936" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] [[package]] -name = "tiny-keccak" -version = "2.0.2" +name = "wasm-bindgen-macro" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" dependencies = [ - "crunchy", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "tock-registers" -version = "0.8.1" +name = "wasm-bindgen-macro-support" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "696941a0aee7e276a165a978b37918fd5d22c55c3d6bda197813070ca9c0f21c" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] [[package]] -name = "tock-registers" -version = "0.9.0" +name = "wasm-bindgen-shared" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b9e2fdb3a1e862c0661768b7ed25390811df1947a8acbfbefe09b47078d93c4" - -[[package]] -name = "toml" -version = "0.8.14" -source = "git+https://github.com/arceos-hypervisor/toml.git?branch=no_std#fdb24a160d68ee9f8f42b34fffaa3640e94ed604" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" dependencies = [ - "hashbrown 0.14.5", - "serde", - "serde_spanned", - "toml_datetime 0.6.6", - "toml_edit 0.22.15", + "unicode-ident", ] [[package]] -name = "toml_datetime" -version = "0.6.6" -source = "git+https://github.com/arceos-hypervisor/toml.git?branch=no_std#fdb24a160d68ee9f8f42b34fffaa3640e94ed604" +name = "web-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" dependencies = [ - "serde", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "toml_datetime" -version = "0.6.8" +name = "windows-link" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] -name = "toml_edit" -version = "0.22.15" -source = "git+https://github.com/arceos-hypervisor/toml.git?branch=no_std#fdb24a160d68ee9f8f42b34fffaa3640e94ed604" -dependencies = [ - "ahash", - "hashbrown 0.14.5", - "indexmap", - "serde", - "serde_spanned", - "toml_datetime 0.6.6", - "winnow 0.6.26", -] +name = "windows-link" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] -name = "toml_edit" -version = "0.22.24" +name = "windows-registry" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "indexmap", - "toml_datetime 0.6.8", - "winnow 0.7.4", + "windows-link 0.1.3", + "windows-result", + "windows-strings", ] [[package]] -name = "unicode-ident" -version = "1.0.18" +name = "windows-result" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] [[package]] -name = "unicode-width" -version = "0.1.14" +name = "windows-strings" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] [[package]] -name = "utf8parse" -version = "0.2.2" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] [[package]] -name = "version_check" -version = "0.9.5" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] [[package]] -name = "virtio-drivers" -version = "0.7.4" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa40e09453618c7a927c08c5a990497a2954da7c2aaa6c65e0d4f0fc975f6114" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "bitflags 2.9.0", - "log", - "zerocopy", + "windows-targets 0.52.6", ] [[package]] -name = "volatile" -version = "0.4.6" +name = "windows-sys" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442887c63f2c839b346c192d047a7c87e73d0689c9157b00b53dcc27dd5ea793" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.4", +] [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "windows-sys" +version = "0.61.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link 0.2.0", +] [[package]] -name = "windows-sys" -version = "0.59.0" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows-targets", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -1640,58 +4470,159 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +dependencies = [ + "windows-link 0.2.0", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -1699,31 +4630,53 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winnow" -version = "0.6.26" +name = "windows_x86_64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" [[package]] name = "winnow" -version = "0.7.4" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + [[package]] name = "x2apic" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbcd582541cbb8ef1dfc24a3c849a64ff074b1b512af723ad90056558d424602" +checksum = "db5cbcb7faedfa15f90376004ffc0cb42e427623ab56629f0073d275ee8e7043" dependencies = [ "bit", "bitflags 1.3.2", "paste", "raw-cpuid 10.7.0", - "x86_64 0.14.13", + "x86_64", ] [[package]] @@ -1737,18 +4690,6 @@ dependencies = [ "raw-cpuid 10.7.0", ] -[[package]] -name = "x86_64" -version = "0.14.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c101112411baafbb4bf8d33e4c4a80ab5b02d74d2612331c61e8192fc9710491" -dependencies = [ - "bit_field", - "bitflags 2.9.0", - "rustversion", - "volatile", -] - [[package]] name = "x86_64" version = "0.15.2" @@ -1756,7 +4697,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f042214de98141e9c8706e8192b73f56494087cc55ebec28ce10f26c5c364ae" dependencies = [ "bit_field", - "bitflags 2.9.0", + "bitflags 2.9.4", "rustversion", "volatile", ] @@ -1764,22 +4705,79 @@ dependencies = [ [[package]] name = "x86_vcpu" version = "0.1.0" -source = "git+https://github.com/arceos-hypervisor/x86_vcpu.git#2cc42349f23c9a38723710a38d34b080255520e4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "873e097d52e94c31be3f0175a9f8d6f2edbc77d7e2f8e6995427df9c08b30a2b" dependencies = [ "axaddrspace", + "axdevice_base", "axerrno", "axvcpu", + "axvisor_api", "bit_field", - "bitflags 2.9.0", + "bitflags 2.9.4", "cfg-if", "crate_interface", "log", "memory_addr", "numeric-enum-macro", "page_table_entry", - "raw-cpuid 11.5.0", + "paste", + "raw-cpuid 11.6.0", + "spin 0.9.8", "x86", - "x86_64 0.15.2", + "x86_64", + "x86_vlapic", +] + +[[package]] +name = "x86_vlapic" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2556c62649a277ccf1c3c34c740be87bbde5f8dab0b20fcdcf4c2cd7bb6e7302" +dependencies = [ + "axaddrspace", + "axdevice_base", + "axerrno", + "axvisor_api", + "bit", + "log", + "memory_addr", + "paste", + "tock-registers 0.10.0", +] + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", ] [[package]] @@ -1789,7 +4787,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive 0.8.27", ] [[package]] @@ -1800,5 +4807,76 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] diff --git a/Cargo.toml b/Cargo.toml index d5a4b78b..bb6d8296 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,52 +2,93 @@ lto = true [package] -name = "axvisor" -version = "0.1.0" -edition = "2024" authors = ["Keyang Hu "] +edition = "2024" exclude = ["crates"] license = "GPL-3.0-or-later OR Apache-2.0 OR MulanPubL-2.0 OR MulanPSL2" +name = "axvisor" +version = "0.1.0" [features] +ept-level-4 = ["axaddrspace/4-level-ept"] fs = ["axstd/fs"] +plat-aarch64-generic = ["axplat-aarch64-generic", "axstd/driver-dyn"] +plat-aarch64-phytium-pi = ["axplat-aarch64-phytium-pi", "axstd/driver-dyn"] +plat-aarch64-roc-rk3568-pc = ["axplat-aarch64-roc-rk3568-pc", "axstd/driver-dyn"] +plat-x86-qemu-q35 = ["axplat-x86-qemu-q35"] + [dependencies] -log = "=0.4.21" bitflags = "2.2" cfg-if = "1.0" -spin = "0.9" +cpumask = "0.1.0" +kernel_guard = "0.1" kspin = "0.1" lazyinit = "0.2" +log = "=0.4.21" +spin = "0.9" timer_list = "0.1.0" +lazy_static = { version = "1.5", default-features = false, features = ["spin_no_std"] } # System dependent modules provided by ArceOS. -axstd = { git = "https://github.com/arceos-hypervisor/arceos.git", branch = "vmm", features = [ - "alloc", - "paging", - # "fs", - "irq", - "hv", - "multitask", - # "sched_rr" +axstd = {git = "https://github.com/arceos-hypervisor/arceos.git", tag = "hv-0.3.1", features = [ + "alloc-level-1", + "paging", + "irq", + "multitask", + "smp", # "page-alloc-64g", + "myplat", ]} # System dependent modules provided by ArceOS-Hypervisor. -axvm = { git = "https://github.com/arceos-hypervisor/axvm.git" } -axvcpu = { git = "https://github.com/arceos-hypervisor/axvcpu.git" } -axaddrspace = { git = "https://github.com/arceos-hypervisor/axaddrspace.git" } +axaddrspace = "0.1.1" +axhvc = {git = "https://github.com/arceos-hypervisor/axhvc.git"} +axvcpu = "0.1" +axvm = {git = "https://github.com/arceos-hypervisor/axvm.git", branch = "next"} # System independent crates provided by ArceOS, these crates could be imported by remote url. -crate_interface = "0.1" axerrno = "0.1.0" -memory_addr = "0.3" -page_table_entry = { version = "0.5", features = ["arm-el2"] } +byte-unit = {version = "5", default-features = false, features = ["byte"]} +crate_interface = "0.1" +fdt-parser = "0.4" +memory_addr = "0.4" +page_table_entry = {version = "0.5", features = ["arm-el2"]} page_table_multiarch = "0.5" -percpu = { version = "0.2.0", features = ["arm-el2"] } +percpu = {version = "0.2", features = ["arm-el2"]} +rdif-intc = "0.12" +rdrive = "0.18" + +vm-fdt = {git = "https://github.com/bullhh/vm-fdt.git", default-features = false, features = ["alloc"]} + +axdevice = {git = "https://github.com/arceos-hypervisor/axdevice.git"} +axdevice_base = "0.1" +axvisor_api = "0.1" + +# platform +axplat-aarch64-generic = {path = "platform/aarch64-generic", optional = true} +axplat-x86-qemu-q35 = {path = "platform/x86-qemu-q35", optional = true} +axplat-aarch64-phytium-pi = {path = "platform/aarch64-phytium-pi", optional = true} +axplat-aarch64-roc-rk3568-pc = {path = "platform/aarch64-roc-rk3568-pc", optional = true} + +[target.'cfg(target_arch = "aarch64")'.dependencies] +aarch64-cpu-ext = "0.1" +arm-gic-driver = {version = "0.15.5", features = ["rdif"]} [build-dependencies] -toml = { git = "https://github.com/arceos-hypervisor/toml.git", branch = "no_std" } -axconfig = { git = "https://github.com/arceos-hypervisor/arceos.git", branch = "vmm" } +axconfig = {git = "https://github.com/arceos-hypervisor/arceos.git", branch = "vmm-dev"} prettyplease = "0.2" quote = "1.0" syn = "2.0" +toml = {version = "0.9"} + +# [workspace] +# exclude = ["crates/arceos"] +# members = [ +# "platform/*", +# "crates/*", +# ] + +[patch.crates-io] +axvcpu = {git = "https://github.com/arceos-hypervisor/axvcpu.git", branch = "next"} +axvmconfig = { git = "https://github.com/arceos-hypervisor/axvmconfig.git", branch = "next" } + diff --git a/Makefile b/Makefile deleted file mode 100644 index daec2baa..00000000 --- a/Makefile +++ /dev/null @@ -1,246 +0,0 @@ -# Copied from the `ArceOS` project. - -# Available arguments: -# * General options: -# - `ARCH`: Target architecture: x86_64, riscv64, aarch64 -# - `PLATFORM`: Target platform in the `platforms` directory -# - `SMP`: Number of CPUs -# - `MODE`: Build mode: release, debug -# - `LOG:` Logging level: warn, error, info, debug, trace -# - `V`: Verbose level: (empty), 1, 2 -# - `GICV3`: Enable GICv3 (default is n) -# - `TARGET_DIR`: Artifact output directory (cargo target directory) -# - `EXTRA_CONFIG`: Extra config specification file -# - `OUT_CONFIG`: Final config file that takes effect -# * App options: -# - `A` or `APP`: Path to the application -# - `FEATURES`: Features os ArceOS modules to be enabled. -# - `APP_FEATURES`: Features of (rust) apps to be enabled. -# * QEMU options: -# - `BLK`: Enable storage devices (virtio-blk) -# - `NET`: Enable network devices (virtio-net) -# - `GRAPHIC`: Enable display devices and graphic output (virtio-gpu) -# - `BUS`: Device bus type: mmio, pci -# - `MEM`: Memory size (default is 128M) -# - `DISK_IMG`: Path to the virtual disk image -# - `ACCEL`: Enable hardware acceleration (KVM on linux) -# - `QEMU_LOG`: Enable QEMU logging (log file is "qemu.log") -# - `NET_DUMP`: Enable network packet dump (log file is "netdump.pcap") -# - `NET_DEV`: QEMU netdev backend types: user, tap, bridge -# - `VFIO_PCI`: PCI device address in the format "bus:dev.func" to passthrough -# - `VHOST`: Enable vhost-net for tap backend (only for `NET_DEV=tap`) -# * Network options: -# - `IP`: ArceOS IPv4 address (default is 10.0.2.15 for QEMU user netdev) -# - `GW`: Gateway IPv4 address (default is 10.0.2.2 for QEMU user netdev) - -# General options -ARCH ?= x86_64 -PLATFORM ?= -SMP ?= 1 -MODE ?= release -LOG ?= warn -GICV3 ?= n -V ?= -EXTRA_CONFIG ?= -OUT_CONFIG ?= $(PWD)/.axconfig.toml - -# App options -# A ?= apps/helloworld -A ?= $(CURDIR) -APP ?= $(A) -FEATURES ?= -APP_FEATURES ?= -# make `FEATURES=page-alloc-64g` as the default configuration -MEM_FEATURES ?= page-alloc-64g -override FEATURES := $(FEATURES),$(MEM_FEATURES) - -# QEMU options -BLK ?= y -NET ?= n -GRAPHIC ?= n -# To keep consistent with the latest `main` branch of ArceOS. -MEM ?= 4G -BUS ?= pci - -DISK_IMG ?= disk.img -QEMU_LOG ?= n -NET_DUMP ?= n -NET_DEV ?= user -VFIO_PCI ?= -VHOST ?= n - -# Network options -IP ?= 10.0.2.15 -GW ?= 10.0.2.2 - -# App type -ifeq ($(wildcard $(APP)),) - $(error Application path "$(APP)" is not valid) -endif - -ifneq ($(wildcard $(APP)/Cargo.toml),) - APP_TYPE := rust -else - APP_TYPE := c -endif - -# Feature parsing -include scripts/make/features.mk -# Platform resolving -include scripts/make/platform.mk - -# Target -ifeq ($(ARCH), x86_64) - TARGET := x86_64-unknown-none -else ifeq ($(ARCH), riscv64) - TARGET := riscv64gc-unknown-none-elf -else ifeq ($(ARCH), aarch64) - ifeq ($(findstring fp_simd,$(FEATURES)),) - TARGET := aarch64-unknown-none-softfloat - else - TARGET := aarch64-unknown-none - endif -endif - -export AX_ARCH=$(ARCH) -export AX_PLATFORM=$(PLAT_NAME) -export AX_SMP=$(SMP) -export AX_MODE=$(MODE) -export AX_LOG=$(LOG) -export AX_TARGET=$(TARGET) -export AX_IP=$(IP) -export AX_GW=$(GW) -export AX_GICV3=$(GICV3) - -ifneq ($(filter $(MAKECMDGOALS),unittest unittest_no_fail_fast),) - # When running unit tests, set `AX_CONFIG_PATH` to empty for dummy config - unexport AX_CONFIG_PATH -else - export AX_CONFIG_PATH=$(OUT_CONFIG) -endif - -# The pathes of the VM configurations -ifneq ($(VM_CONFIGS),) - export AXVISOR_VM_CONFIGS=$(VM_CONFIGS) -endif - -# Binutils -CROSS_COMPILE ?= $(ARCH)-linux-musl- -CC := $(CROSS_COMPILE)gcc -AR := $(CROSS_COMPILE)ar -RANLIB := $(CROSS_COMPILE)ranlib -LD := rust-lld -flavor gnu - -OBJDUMP ?= rust-objdump -d --print-imm-hex --x86-asm-syntax=intel -OBJCOPY ?= rust-objcopy --binary-architecture=$(ARCH) -GDB ?= gdb-multiarch - -# Paths -OUT_DIR ?= $(APP) - -APP_NAME := $(shell basename $(APP)) -LD_SCRIPT := $(OUT_DIR)/target/$(TARGET)/$(MODE)/linker_$(PLAT_NAME).lds -OUT_ELF := $(OUT_DIR)/$(APP_NAME)_$(PLAT_NAME).elf -OUT_BIN := $(OUT_DIR)/$(APP_NAME)_$(PLAT_NAME).bin -OUT_ASM := $(OUT_DIR)/$(APP_NAME)_$(PLAT_NAME).asm - -all: build - -include scripts/make/utils.mk -include scripts/make/config.mk -include scripts/make/build.mk -include scripts/make/qemu.mk -include scripts/make/test.mk -ifeq ($(PLAT_NAME), aarch64-raspi4) - include scripts/make/raspi4.mk -else ifeq ($(PLAT_NAME), aarch64-bsta1000b-virt-hv) - include scripts/make/bsta1000b-fada.mk -else ifeq ($(PLAT_NAME), aarch64-rk3588j-hv) - include scripts/make/rk3588.mk -endif - -defconfig: _axconfig-gen - $(call defconfig) - -oldconfig: _axconfig-gen - $(call oldconfig) - -build: $(OUT_DIR) $(OUT_BIN) - -disasm: - $(OBJDUMP) $(OUT_ELF) | less - -run: build justrun - -justrun: - $(call run_qemu) - -debug: build - $(call run_qemu_debug) - -gdb: - $(GDB) $(OUT_ELF) \ - -ex 'target remote localhost:1234' \ - -ex 'b rust_entry' \ - -ex 'disp /16i $$pc' - -clippy: oldconfig -ifeq ($(origin ARCH), command line) - $(call cargo_clippy,--target $(TARGET)) -else - $(call cargo_clippy) -endif - -doc: oldconfig - $(call cargo_doc) - -doc_check_missing: - $(call cargo_doc) - -fmt: - cargo fmt --all - -fmt_c: - @clang-format --style=file -i $(shell find ulib/axlibc -iname '*.c' -o -iname '*.h') - -test: - $(call app_test) - -unittest: - $(call unit_test) - -unittest_no_fail_fast: - $(call unit_test,--no-fail-fast) - -disk_img: -ifneq ($(wildcard $(DISK_IMG)),) - @printf "$(YELLOW_C)warning$(END_C): disk image \"$(DISK_IMG)\" already exists!\n" -else - $(call make_disk_image,fat32,$(DISK_IMG)) -endif - -ubuntu_img: -ifneq ($(wildcard $(DISK_IMG)),) - @printf "$(YELLOW_C)warning$(END_C): disk image \"$(DISK_IMG)\" already exists!\n" -else - $(call make_guest_ubuntu_ext4,$(DISK_IMG),$(ARCH_STR)) -endif - -clean: clean_c - rm -rf $(APP)/target - rm -rf $(APP)/*.bin $(APP)/*.elf $(APP)/*.asm $(OUT_CONFIG) - cargo clean - -clean_c: - rm -rf ulib/axlibc/build_* - rm -rf $(app-objs) - -# clean: clean_c -# rm -rf $(APP)/*.bin $(APP)/*.elf -# cargo clean - -# clean_c:: -# rm -rf ulib/axlibc/build_* -# rm -rf $(app-objs) - -.PHONY: all build disasm run justrun debug clippy fmt fmt_c test test_no_fail_fast clean clean_c doc disk_image diff --git a/README.md b/README.md index 97e1ef61..c3327739 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ English | [中文](README_CN.md) # Introduction -AxVisor is a hypervisor implemented based on the ArceOS unikernel framework. Its goal is to leverage the foundational operating system features provided by ArceOS to implement a unified modular hypervisor. +AxVisor is a Hypervisor implemented based on the ArceOS unikernel framework. Its goal is to leverage the basic operating system functionalities provided by ArceOS as a foundation to build a unified and componentized Hypervisor. -"Unified" refers to using the same codebase to support x86_64, Arm (aarch64), and RISC-V architectures simultaneously, in order to maximize the reuse of architecture-independent code and simplify development and maintenance costs. +**Unified** means using the same codebase to support three architectures—x86_64, Arm (aarch64), and RISC-V—maximizing the reuse of architecture-agnostic code and simplifying development and maintenance efforts. -"Modular" means that the functionality of the hypervisor is decomposed into multiple modules, each implementing a specific function. The modules communicate with each other through standard interfaces to achieve decoupling and reuse of functionality. +**Componentized** means that the Hypervisor's functionalities are decomposed into multiple independently usable components. Each component implements a specific function, and components communicate through standardized interfaces to achieve decoupling and reusability. ## Architecture @@ -40,19 +40,22 @@ Currently, AxVisor has been verified on the following platforms: - [x] QEMU ARM64 virt (qemu-max) - [x] Rockchip RK3568 / RK3588 -- [x] 黑芝麻华山 A1000 +- [x] PhytiumPi ## Guest VMs Currently, AxVisor has been verified in scenarios with the following systems as guests: -* [ArceOS](https://github.com/arceos-org/arceos) -* [Starry-OS](https://github.com/Starry-OS) -* [NimbOS](https://github.com/equation314/nimbos) -* Linux - * currently only Linux with passthrough device on aarch64 is tested. - * single core: [config.toml](configs/vms/linux-qemu-aarch64.toml) | [dts](configs/vms/linux-qemu.dts) - * smp: [config.toml](configs/vms/linux-qemu-aarch64-smp2.toml) | [dts](configs/vms/linux-qemu-smp2.dts) +- [ArceOS](https://github.com/arceos-org/arceos) +- [Starry-OS](https://github.com/Starry-OS) +- [NimbOS](https://github.com/equation314/nimbos) +- Linux + +## Shell Management + +AxVisor provides an interactive shell interface for managing virtual machines and file operations. + +For detailed information about shell features, commands, and usage, see: [Shell模块介绍.md](doc/Shell模块介绍.md) # Build and Run @@ -61,145 +64,82 @@ After AxVisor starts, it loads and starts the guest based on the information in ## Build Environment AxVisor is written in the Rust programming language, so you need to install the Rust development environment following the instructions on the official Rust website. Additionally, you need to install cargo-binutils to use tools like rust-objcopy and rust-objdump. + ```console -$ cargo install cargo-binutils +cargo install cargo-binutils ``` If necessary, you may also need to install [musl-gcc](http://musl.cc/x86_64-linux-musl-cross.tgz) to build guest applications. ## Configuration Files -Since configuring the guest is a complex process, AxVisor chooses to use TOML files to manage the guest configurations. These configurations include the virtual machine ID, virtual machine name, virtual machine type, number of CPU cores, memory size, virtual devices, passthrough devices, and more. In the source code, the `./config/vms` directory contains some example templates for guest configurations. +Since guest configuration is a complex process, AxVisor chooses to use toml files to manage guest configurations, which include the virtual machine ID, virtual machine name, virtual machine type, number of CPU cores, memory size, virtual devices, and passthrough devices. + +- In the source code's `./config/vms` directory, there are some example templates for guest configurations. The configuration files are named in the format `--board_or_cpu-smpx`, where: + - `` is the guest operating system name + - `` is the architecture + - `board_or_cpu` is the name of the hardware development board or CPU (different strings are concatenated with `_`) + - `smpx` refers to the number of CPUs allocated to the guest, where `x` is the specific value + - The different components are concatenated with `-` to form the whole name -In addition, you can use the [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) tool to generate a custom configuration file. For detailed information, refer to the [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html) documentation. +- Additionally, you can also use the [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) tool to generate a custom configuration file. For detailed information, please refer to [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html). ## Load and run from file system -1. Build a client image file suitable for your own architecture. Taking the ArceOS mainline code as an example, run `make PLATFORM=aarch64-qemu-virt SMP=1 A=examples/helloworld` to generate `helloworld_aarch64-qemu-virt.bin`. +Loading from the filesystem refers to the method where the AxVisor image, Linux guest image, and its device tree are independently deployed in the filesystem on the storage. After AxVisor starts, it loads the guest image and its device tree from the filesystem to boot the guest. -2. Create a disk image file and place the guest machine image into the file system. +### NimbOS as guest - 1. Use the `make disk_img` command to generate an empty FAT32 disk image file named `disk.img`. - 2. Manually mount `disk.img`, and then place your guest machine image into the file system. +1. Execute script to download and prepare NimbOS image. - ```console - $ mkdir -p tmp - $ sudo mount disk.img tmp - $ sudo cp /PATH/TO/YOUR/GUEST/VM/IMAGE tmp/ - $ sudo umount tmp - ``` + ```shell + ./scripts/nimbos.sh --arch aarch64 + ``` -3. Modify the configuration items in the corresponding `./configs/vms/.toml` - - `image_location="fs"` indicates loading from the file system. - - `kernel_path` specifies the path to the kernel image in the file system. - - `entry_point` specifies the entry address of the kernel image. - - `kernel_load_addr` specifies the loading address of the kernel image. - - others +2. Execute `./axvisor.sh run --plat aarch64-generic --features fs,ept-level-4 --arceos-args BUS=mmio,BLK=y,DISK_IMG=tmp/nimbos-aarch64.img,LOG=info --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml` to build AxVisor and start it in QEMU. -4. Execute `make ACCEL=n ARCH=aarch64 LOG=info VM_CONFIGS=configs/vms/arceos-aarch64.toml APP_FEATURES=fs run` to build AxVisor and start it in QEMU. +3. After that, you can directly run `./axvisor.sh run` to start it, and modify `.hvconfig.toml` to change the startup parameters. + +### More guest + + TODO ## Load and run from memory -1. Build a client image file suitable for your own architecture. Taking the ArceOS mainline code as an example, run `make PLATFORM=aarch64-qemu-virt SMP=1 A=examples/helloworld` to generate `helloworld_aarch64-qemu-virt.bin`. +Loading from memory refers to a method where the AxVisor image, guest image, and its device tree are already packaged together during the build phase. Only AxVisor itself needs to be deployed in the file system on the storage device. After AxVisor starts, it loads the guest image and its device tree from memory to boot the guest. -2. Modify the configuration items in the corresponding `./configs/vms/.toml` - - `image_location="memory"` indicates loading from the memory. - - `kernel_path` kernel_path specifies the relative/absolute path of the kernel image in the workspace. - - `entry_point` specifies the entry address of the kernel image. - - `kernel_load_addr` specifies the loading address of the kernel image. - - others +### linux as guest -3. Execute `make ACCEL=n ARCH=aarch64 LOG=info VM_CONFIGS=configs/vms/arceos-aarch64.toml run` to build AxVisor and start it in QEMU. +1. Prepare working directory + ```console + mkdir -p tmp + cp configs/vms/linux-aarch64-qemu-smp1.toml tmp/ + cp configs/vms/linux-aarch64-qemu-smp1.dts tmp/ + ``` -## Demo +2. [See Linux build help](https://github.com/arceos-hypervisor/guest-test-linux) to get the guest Image and rootfs.img, then copy them to the `tmp` directory. -```bash - d8888 .d88888b. .d8888b. - d88888 d88P" "Y88b d88P Y88b - d88P888 888 888 Y88b. - d88P 888 888d888 .d8888b .d88b. 888 888 "Y888b. - d88P 888 888P" d88P" d8P Y8b 888 888 "Y88b. - d88P 888 888 888 88888888 888 888 "888 - d8888888888 888 Y88b. Y8b. Y88b. .d88P Y88b d88P -d88P 888 888 "Y8888P "Y8888 "Y88888P" "Y8888P" - -arch = aarch64 -platform = aarch64-qemu-virt-hv -target = aarch64-unknown-none-softfloat -build_mode = release -log_level = info -smp = 1 - -[ 0.020822 0 axruntime:130] Logging is enabled. -[ 0.026419 0 axruntime:131] Primary CPU 0 started, dtb = 0x44000000. -[ 0.028520 0 axruntime:133] Found physcial memory regions: -[ 0.030673 0 axruntime:135] [PA:0x40080000, PA:0x400d6000) .text (READ | EXECUTE | RESERVED) -[ 0.033564 0 axruntime:135] [PA:0x400d6000, PA:0x400ef000) .rodata (READ | RESERVED) -[ 0.035313 0 axruntime:135] [PA:0x400ef000, PA:0x400f5000) .data .tdata .tbss .percpu (READ | WRITE | RESERVED) -[ 0.037083 0 axruntime:135] [PA:0x400f5000, PA:0x40135000) boot stack (READ | WRITE | RESERVED) -[ 0.038622 0 axruntime:135] [PA:0x40135000, PA:0x4013b000) .bss (READ | WRITE | RESERVED) -[ 0.040643 0 axruntime:135] [PA:0x4013b000, PA:0x48000000) free memory (READ | WRITE | FREE) -[ 0.042907 0 axruntime:135] [PA:0x9000000, PA:0x9001000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.045011 0 axruntime:135] [PA:0x9040000, PA:0x9041000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.047070 0 axruntime:135] [PA:0x9100000, PA:0x9101000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.049093 0 axruntime:135] [PA:0x8000000, PA:0x8020000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.051081 0 axruntime:135] [PA:0xa000000, PA:0xa004000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.053120 0 axruntime:135] [PA:0x10000000, PA:0x3eff0000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.055229 0 axruntime:135] [PA:0x4010000000, PA:0x4020000000) mmio (READ | WRITE | DEVICE | RESERVED) -[ 0.057642 0 axruntime:208] Initialize global memory allocator... -[ 0.059377 0 axruntime:209] use TLSF allocator. -[ 0.072071 0 axmm:60] Initialize virtual memory management... -[ 0.136312 0 axruntime:150] Initialize platform devices... -[ 0.137733 0 axhal::platform::aarch64_common::gic:67] Initialize GICv2... -[ 0.143653 0 axtask::api:73] Initialize scheduling... -[ 0.151435 0 axtask::api:79] use FIFO scheduler. -[ 0.152744 0 axruntime:176] Initialize interrupt handlers... -[ 0.157472 0 axruntime:186] Primary CPU 0 init OK. -[ 0.159027 0:2 axvisor:17] Starting virtualization... -[ 0.160968 0:2 axvisor:19] Hardware support: true -[ 0.168619 0:4 axvisor::vmm::timer:103] Initing HV Timer... -[ 0.170399 0:4 axvisor::hal:117] Hardware virtualization support enabled on core 0 -[ 0.295531 0:2 axvisor::vmm::config:33] Creating VM [1] "arceos" -[ 0.301423 0:2 axvm::vm:113] Setting up memory region: [0x40000000~0x41000000] READ | WRITE | EXECUTE -[ 0.334424 0:2 axvm::vm:156] Setting up passthrough device memory region: [0x8000000~0x8050000] -> [0x8000000~0x8050000] -[ 0.339431 0:2 axvm::vm:156] Setting up passthrough device memory region: [0x9000000~0x9001000] -> [0x9000000~0x9001000] -[ 0.341925 0:2 axvm::vm:156] Setting up passthrough device memory region: [0x9010000~0x9011000] -> [0x9010000~0x9011000] -[ 0.343758 0:2 axvm::vm:156] Setting up passthrough device memory region: [0x9030000~0x9031000] -> [0x9030000~0x9031000] -[ 0.345559 0:2 axvm::vm:156] Setting up passthrough device memory region: [0xa000000~0xa004000] -> [0xa000000~0xa004000] -[ 0.348819 0:2 axvm::vm:191] VM created: id=1 -[ 0.350749 0:2 axvm::vm:206] VM setup: id=1 -[ 0.352526 0:2 axvisor::vmm::config:40] VM[1] created success, loading images... -[ 0.355270 0:2 axvisor::vmm::images:24] Loading VM[1] images from memory -[ 0.363583 0:2 axvisor::vmm:29] Setting up vcpus... -[ 0.368014 0:2 axvisor::vmm::vcpus:176] Initializing VM[1]'s 1 vcpus -[ 0.370802 0:2 axvisor::vmm::vcpus:207] Spawning task for VM[1] Vcpu[0] -[ 0.374805 0:2 axvisor::vmm::vcpus:219] Vcpu task Task(5, "VM[1]-VCpu[0]") created cpumask: [0, ] -[ 0.378878 0:2 axvisor::vmm:36] VMM starting, booting VMs... -[ 0.380775 0:2 axvm::vm:273] Booting VM[1] -[ 0.382631 0:2 axvisor::vmm:42] VM[1] boot success -[ 0.387436 0:5 axvisor::vmm::vcpus:240] VM[1] Vcpu[0] waiting for running -[ 0.390048 0:5 axvisor::vmm::vcpus:243] VM[1] Vcpu[0] running... - - d8888 .d88888b. .d8888b. - d88888 d88P" "Y88b d88P Y88b - d88P888 888 888 Y88b. - d88P 888 888d888 .d8888b .d88b. 888 888 "Y888b. - d88P 888 888P" d88P" d8P Y8b 888 888 "Y88b. - d88P 888 888 888 88888888 888 888 "888 - d8888888888 888 Y88b. Y8b. Y88b. .d88P Y88b d88P -d88P 888 888 "Y8888P "Y8888 "Y88888P" "Y8888P" - -arch = aarch64 -platform = aarch64-qemu-virt -target = aarch64-unknown-none-softfloat -build_mode = release -log_level = warn -smp = 1 - -Hello, world! -[ 0.416823 0:5 axvisor::vmm::vcpus:288] VM[1] run VCpu[0] SystemDown -[ 0.419035 0:5 axhal::platform::aarch64_common::psci:98] Shutting down... -``` +3. Execute `dtc -O dtb -I dts -o tmp/linux-aarch64-qemu-smp1.dtb tmp/linux-aarch64-qemu-smp1.dts` to build the guest device tree file + +4. Execute `./axvisor.sh defconfig`, then edit the `.hvconfig.toml` file, set the `vmconfigs` item to your guest machine configuration file path, with the following content: + + ```toml + arceos_args = [ + "BUS=mmio", + "BLK=y", + "MEM=8g", + "LOG=debug", + "QEMU_ARGS=\"-machine gic-version=3 -cpu cortex-a72 \"", + "DISK_IMG=\"tmp/rootfs.img\"", + ] + vmconfigs = [ "tmp/linux-aarch64-qemu-smp1.toml"] + ``` + +4. Execute `./axvisor.sh run` to build AxVisor and start it in QEMU. + +### More guest + + TODO # Contributing @@ -209,7 +149,23 @@ You can refer to these [discussions]((https://github.com/arceos-hypervisor/axvis ## Development -AxVisor, as a modular hypervisor, has many components used as Crates. You can use the `tool/dev_env.py` command to localize the relevant Crates, making it easier for development and debugging. +To contribute to AxVisor, you can follow these steps: + +1. Fork the repository on GitHub. +2. Clone your forked repository to your local machine. +3. Create a new branch for your feature or bug fix. +4. Make your changes and commit them with clear messages. +5. Push your changes to your forked repository. +6. Open a pull request against the main branch of the original repository. + +To develop crates used by AxVisor, you can use the following command to build and run the project: + +```bash +cargo install cargo-lpatch +cargo lpatch -n deps_crate_name +``` + +Then you can modify the code in the `crates/deps_crate_name` directory, and it will be automatically used by AxVisor. ## Contributors @@ -223,7 +179,7 @@ This project exists thanks to all the people who contribute. AxVisor uses the following open-source license: - * Apache-2.0 - * MulanPubL-2.0 - * MulanPSL2 - * GPL-3.0-or-later +- Apache-2.0 +- MulanPubL-2.0 +- MulanPSL2 +- GPL-3.0-or-later diff --git a/README_CN.md b/README_CN.md index 4e5e61ec..37cd0102 100644 --- a/README_CN.md +++ b/README_CN.md @@ -6,7 +6,7 @@

AxVisor

-

一个基于 ArceOS 的统一模块化虚拟机管理程序

+

一个基于 ArceOS 的统一组件化虚拟机管理程序

@@ -20,15 +20,15 @@ # 简介 -AxVisor 是基于 ArceOS unikernel 框架实现的 Hypervisor。其目标是利用 ArceOS 提供的基础操作系统功能作为基础,实现一个统一的模块化 Hypervisor。 +AxVisor 是基于 ArceOS unikernel 框架实现的 Hypervisor。其目标是利用 ArceOS 提供的基础操作系统功能作为基础,实现一个统一的组件化 Hypervisor。 -“统一”指使用同一套代码同时支持 x86_64、Arm(aarch64) 和 RISC-V 三种架构,以最大化复用架构无关代码,简化代码开发和维护成本。 +**统一**是指使用同一套代码同时支持 x86_64、Arm(aarch64) 和 RISC-V 三种架构,以最大化复用架构无关代码,简化代码开发和维护成本。 -“模块化”指 Hypervisor 的功能被分解为多个模块,每个模块实现一个特定的功能,模块之间通过标准接口进行通信,以实现功能的解耦和复用。 +**组件化**是指 Hypervisor 的功能被分解为多个可独立使用的组件,每个组件实现一个特定的功能,组件之间通过标准接口进行通信,以实现功能的解耦和复用。 ## 架构 -AxVisor 的软件架构分为如下图所示的五层,其中,每一个框都是一个独立的模块,模块之间通过标准接口进行通信。 +AxVisor 的软件架构分为如下图所示的五层,其中,每一个框都是一个独立的组件,组件之间通过标准接口进行通信。 ![Architecture](https://arceos-hypervisor.github.io/doc/assets/arceos-hypervisor-architecture.png) @@ -40,19 +40,16 @@ AxVisor 的软件架构分为如下图所示的五层,其中,每一个框都 - [x] QEMU ARM64 virt (qemu-max) - [x] Rockchip RK3568 / RK3588 -- [x] 黑芝麻华山 A1000 +- [x] 飞腾派 ## 客户机 目前,AxVisor 已经在对如下系统作为客户机的情况进行了验证: -* [ArceOS](https://github.com/arceos-org/arceos) -* [Starry-OS](https://github.com/Starry-OS) -* [NimbOS](https://github.com/equation314/nimbos) -* Linux - * currently only Linux with passthrough device on aarch64 is tested. - * single core: [config.toml](configs/vms/linux-qemu-aarch64.toml) | [dts](configs/vms/linux-qemu.dts) - * smp: [config.toml](configs/vms/linux-qemu-aarch64-smp2.toml) | [dts](configs/vms/linux-qemu-smp2.dts) +- [ArceOS](https://github.com/arceos-org/arceos) +- [Starry-OS](https://github.com/Starry-OS) +- [NimbOS](https://github.com/equation314/nimbos) +- Linux # 构建及运行 @@ -63,54 +60,80 @@ AxVisor 启动之后会根据客户机配置文件中的信息加载并启动客 AxVisor 是使用 Rust 编程语言编写的,因此,需要根据 Rust 官方网站的说明安装 Rust 开发环境。此外,还需要安装 [cargo-binutils](https://github.com/rust-embedded/cargo-binutils) 以便使用 `rust-objcopy` 和 `rust-objdump` 等工具 ```console -$ cargo install cargo-binutils +cargo install cargo-binutils ``` 根据需要,可能还要安装 [musl-gcc](http://musl.cc/x86_64-linux-musl-cross.tgz) 来构建客户机应用程序 ## 配置文件 -由于客户机配置是一个复杂的过程,AxVisor 选择使用 toml 文件来管理客户机的配置,其中包括虚拟机 ID、虚拟机名称、虚拟机类型、CPU 核心数量、内存大小、虚拟设备和直通设备等。在源码的 `./config/vms` 目录下是一些客户机配置的示例模板。 +由于客户机配置是一个复杂的过程,AxVisor 选择使用 toml 文件来管理客户机的配置,其中包括虚拟机 ID、虚拟机名称、虚拟机类型、CPU 核心数量、内存大小、虚拟设备和直通设备等。 -此外,也可以使用 [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) 工具来生成一个自定义配置文件。详细介绍参见 [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html)。 +- 在源码的 `./config/vms` 目录下是一些客户机配置的示例模板,配置文件命名格式为 `--board_or_cpu-smpx`,其中 + - `` 是客户机系统名字 + - `` 是架构 + - `board_or_cpu` 硬件开发板或者 CPU 的名字(以 `_` 拼接不同字符串) + - `smpx` 是指分配客户机的 CPU 数量 `x` 为具体数值 + - 各项之间以 `-` 拼接为整体 + +- 此外,也可以使用 [axvmconfig](https://github.com/arceos-hypervisor/axvmconfig) 工具来生成一个自定义配置文件。详细介绍参见 [axvmconfig](https://arceos-hypervisor.github.io/axvmconfig/axvmconfig/index.html)。 ## 从文件系统加载运行 -1. 构建适用于自己架构的客户机镜像文件。以 ArceOS 主线代码为例,执行 `make PLATFORM=aarch64-qemu-virt SMP=1 A=examples/helloworld` 获取 `helloworld_aarch64-qemu-virt.bin` +从文件系统加载是指将 AxVisor 镜像和 Linux 客户机镜像及其设备树独立部署在存储器上的文件系统中,AxVisor 启动后从文件系统中加载客户机镜像及其设备树进而启动客户机的方式。 + +### NimbOS 作为客户机 + +1. 执行仓库内的脚本下载并准备 NimbOS 镜像: -2. 制作一个磁盘镜像文件,并将客户机镜像放到文件系统中 + ```bash + ./scripts/nimbos.sh --arch aarch64 + ``` - 1. 使用 `make disk_img` 命令生成一个空的 FAT32 磁盘镜像文件 `disk.img` - 2. 手动挂载 `disk.img`,然后将自己的客户机镜像复制到该文件系统中 +2. 执行 `./axvisor.sh run --plat aarch64-generic --features fs,ept-level-4 --arceos-args BUS=mmio,BLK=y,DISK_IMG=tmp/nimbos-aarch64.img,LOG=info --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml` 构建 AxVisor 并在 QEMU 中启动 NimbOS 客户机。 - ```bash - $ mkdir -p tmp - $ sudo mount disk.img tmp - $ sudo cp /PATH/TO/YOUR/GUEST/VM/IMAGE tmp/ - $ sudo umount tmp - ``` +3. 后续可直接执行 `./axvisor.sh run` 来启动,并可通过修改 `.hvconfig.toml` 来更改启动参数 -3. 修改对应的 `./configs/vms/.toml` 文件中的配置项 - - `image_location="fs"` 表示从文件系统加载 - - `kernel_path` 指出内核镜像在文件系统中的路径 - - `entry_point` 指出内核镜像的入口地址 - - `kernel_load_addr` 指出内核镜像的加载地址 - - 其他 +### 更多客户机 -4. 执行 `make ACCEL=n ARCH=aarch64 LOG=info VM_CONFIGS=configs/vms/arceos-aarch64.toml APP_FEATURES=fs run` 构建 AxVisor,并在 QEMU 中启动。 + TODO ## 从内存加载运行 -1. 构建适用于自己架构的客户机镜像文件。以 ArceOS 主线代码为例,执行 `make PLATFORM=aarch64-qemu-virt SMP=1 A=examples/helloworld` 获取 `helloworld_aarch64-qemu-virt.bin` +从内存加载是指在构建时已经将 AxVisor 镜像与客户机镜像及其设备树打包在了一起,而只需要将 AxVisor 本身部署在存储器上文件系统中,AxVisor 启动后从内存中加载客户机镜像及其设备树进而启动客户机的方式。 + +### Linux 作为客户机 + +1. 准备工作目录及相关文件 + ```console + mkdir -p tmp + cp configs/vms/linux-aarch64-qemu-smp1.toml tmp/ + cp configs/vms/linux-aarch64-qemu-smp1.dts tmp/ + ``` + +2. [参见 linux 构建帮助](https://github.com/arceos-hypervisor/guest-test-linux)获取客户机 Image 和 rootfs.img,然后复制到 `tmp` 目录中。 + +3. 构建客户机设备树 `dtc -O dtb -I dts -o tmp/linux-aarch64-qemu-smp1.dtb tmp/linux-aarch64-qemu-smp1.dts` + +4. 执行 `./axvisor.sh defconfig`,然后编辑 `.hvconfig.toml` 文件,设置 `vmconfigs` 项为您的客户机配置文件路径,例如: + + ```toml + arceos_args = [ + "BUS=mmio", + "BLK=y", + "MEM=8g", + "LOG=debug", + "QEMU_ARGS=\"-machine gic-version=3 -cpu cortex-a72 \"", + "DISK_IMG=\"tmp/rootfs.img\"", + ] + vmconfigs = [ "tmp/linux-aarch64-qemu-smp1.toml"] + ``` + +4. 执行 `./axvisor.sh run` 构建 AxVisor 并在 QEMU 中启动。 -2. 修改对应的 `./configs/vms/.toml` 中的配置项 - - `image_location="memory"` 配置项 - - `kernel_path` 指定内核镜像在工作空间中的相对/绝对路径 - - `entry_point` 指出内核镜像的入口地址 - - `kernel_load_addr` 指出内核镜像的加载地址 - - 其他 +### 更多客户机 -3. 执行 `make ACCEL=n ARCH=aarch64 LOG=info VM_CONFIGS=configs/vms/arceos-aarch64.toml run` 构建 AxVisor,并在 QEMU 中启动。 + TODO ## 启动示例 @@ -124,10 +147,6 @@ $ cargo install cargo-binutils d8888888888 888 Y88b. Y8b. Y88b. .d88P Y88b d88P d88P 888 888 "Y8888P "Y8888 "Y88888P" "Y8888P" -arch = aarch64 -platform = aarch64-qemu-virt-hv -target = aarch64-unknown-none-softfloat -build_mode = release log_level = info smp = 1 @@ -204,13 +223,29 @@ Hello, world! # 如何贡献 -欢迎 FORK 本仓库并提交 PR。 +欢迎 fork 本仓库并提交 pull request。 您可以参考这些[讨论](https://github.com/arceos-hypervisor/axvisor/discussions),以深入了解该项目的思路和未来发展方向。 ## 开发 -AxVisor 作为组件化的虚拟机管理程序,很多组件是作为 Crate 来使用的,可以使用 `tool/dev_env.py` 命令将相关 Crate 本地化,方便开发调试。 +要为 AxVisor 做贡献,您可以按照以下步骤操作: + +1. 在 GitHub 上 fork 本仓库。 +2. 将您 fork 的仓库克隆到本地。 +3. 为您的功能或错误修复创建新分支。 +4. 进行更改并提交清晰的消息。 +5. 将更改推送到您 fork 的仓库。 +6. 对原始仓库的主分支提交 pull request。 + +要开发 AxVisor 使用的 crate,您可以使用以下命令构建和运行项目: + +```bash +cargo install cargo-lpatch +cargo lpatch -n deps_crate_name +``` + +然后您可以修改 `crates/deps_crate_name` 目录中的代码,AxVisor 将自动使用这些代码。 ## 贡献者 @@ -224,7 +259,7 @@ AxVisor 作为组件化的虚拟机管理程序,很多组件是作为 Crate AxVisor 使用如下开源协议 - * Apache-2.0 - * MulanPubL-2.0 - * MulanPSL2 - * GPL-3.0-or-later +- Apache-2.0 +- MulanPubL-2.0 +- MulanPSL2 +- GPL-3.0-or-later diff --git a/axvisor.sh b/axvisor.sh new file mode 100755 index 00000000..b528ad91 --- /dev/null +++ b/axvisor.sh @@ -0,0 +1,453 @@ +#!/bin/bash +# -*- coding: utf-8 -*- + +# Axvisor unified management script +# Replaces the Makefile, providing complete project management functionality + +set -e + +# Color definitions +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +# Project configuration +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$SCRIPT_DIR" +HVCONFIG="$PROJECT_ROOT/.hvconfig.toml" +DEFAULT_HVCONFIG="$PROJECT_ROOT/configs/def_hvconfig.toml" +VENV_DIR="$PROJECT_ROOT/venv" +VENV_MARKER="$VENV_DIR/.bootstrapped" +REQUIREMENTS="$PROJECT_ROOT/scripts/requirements.txt" + +# Switch to project root +cd "$PROJECT_ROOT" + +# Output helper functions - unified emoji style +info() { echo -e "${BLUE}ℹ️${NC} $*"; } +success() { echo -e "${GREEN}✅${NC} $*"; } +warning() { echo -e "${YELLOW}⚠️${NC} $*"; } +error() { echo -e "${RED}❌${NC} $*"; } +step() { echo -e "${CYAN}🚀${NC} $*"; } +debug() { echo -e "${CYAN}🔍${NC} $*"; } + +# Error handling +handle_error() { + error "命令失败: $1" + exit 1 +} + +trap 'handle_error "Script interrupted"' ERR + +# Check system dependencies +check_system_deps() { + local missing_deps=() + + # Check Python 3 + if ! command -v python3 >/dev/null 2>&1; then + missing_deps+=("python3") + fi + + # Check Cargo + if ! command -v cargo >/dev/null 2>&1; then + missing_deps+=("cargo") + fi + + if [[ ${#missing_deps[@]} -gt 0 ]]; then + error "Missing required dependencies: ${missing_deps[*]}" + info "Install the missing dependencies and retry" + exit 1 + fi +} + +# Determine whether venv setup is needed +needs_venv_setup() { + # Virtual environment directory does not exist + if [[ ! -d "$VENV_DIR" ]]; then + return 0 + fi + + # Python executable missing inside venv + if [[ ! -x "$VENV_DIR/bin/python3" ]]; then + return 0 + fi + + # requirements.txt is newer than the bootstrap marker + if [[ "$REQUIREMENTS" -nt "$VENV_MARKER" ]]; then + return 0 + fi + + return 1 +} + +# Setup virtual environment +setup_venv() { + if ! needs_venv_setup; then + return 0 + fi + + step "Setting up Python virtual environment..." + + # 运行 bootstrap 脚本 + ./scripts/bootstrap.sh + + success "Virtual environment ready" +} + +# Config file management +setup_defconfig() { + step "Setting default config..." + + if [[ ! -f "$DEFAULT_HVCONFIG" ]]; then + error "Default config file $DEFAULT_HVCONFIG not found" + exit 1 + fi + + if [[ -f "$HVCONFIG" ]]; then + warning "Config file $HVCONFIG already exists" + read -p "Overwrite existing config? (y/N): " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + info "Operation cancelled" + return 0 + fi + fi + + cp "$DEFAULT_HVCONFIG" "$HVCONFIG" + success "Copied $DEFAULT_HVCONFIG -> $HVCONFIG" + + info "Config file setup completed" + info "Edit $HVCONFIG to customize settings" +} + +# Ensure config file exists (silent) +ensure_config() { + if [[ ! -f "$HVCONFIG" ]]; then + if [[ -f "$DEFAULT_HVCONFIG" ]]; then + info "Auto copying default config file..." + cp "$DEFAULT_HVCONFIG" "$HVCONFIG" + success "Copied $DEFAULT_HVCONFIG -> $HVCONFIG" + else + warning "Default config file $DEFAULT_HVCONFIG not found" + warning "Run './axvisor.sh defconfig' first to create it" + fi + fi +} + +# Run Python task (unified entry point) +run_python_task() { + local cmd="$1" + shift + + # Check if help flag requested + for arg in "$@"; do + if [[ "$arg" == "--help" || "$arg" == "-h" ]]; then + step "Showing help for $cmd..." + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/task.py "$cmd" --help + return $? + fi + done + + # Smart argument parsing based on command + case "$cmd" in + "clippy") + parse_clippy_args "$@" + ;; + "disk_img") + parse_disk_img_args "$@" + ;; + "build") + parse_build_args "$@" + ;; + "run") + parse_run_args "$@" + ;; + *) + # Other commands: pass all args + step "Executing command $cmd..." + if [[ $# -gt 0 ]]; then + debug "Args: $*" + fi + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/task.py "$cmd" "$@" + ;; + esac +} + +# Parse clippy command arguments +parse_clippy_args() { + local arch="aarch64" # default arch + local extra_args=() + + # Parse args + while [[ $# -gt 0 ]]; do + case $1 in + --arch) + arch="$2" + shift 2 + ;; + *) + # First positional arg (without --arch) is treated as architecture + if [[ ${#extra_args[@]} -eq 0 && "$1" != -* ]]; then + arch="$1" + shift + else + extra_args+=("$1") + shift + fi + ;; + esac + done + + step "Running clippy (arch: $arch)..." + if [[ ${#extra_args[@]} -gt 0 ]]; then + debug "Extra args: ${extra_args[*]}" + fi + + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/task.py clippy --arch "$arch" "${extra_args[@]}" +} + +# Parse disk_img command arguments +parse_disk_img_args() { + local image="disk.img" # default image name + local extra_args=() + + # Parse args + while [[ $# -gt 0 ]]; do + case $1 in + --image) + image="$2" + shift 2 + ;; + *) + # First positional arg (without --image) is image name + if [[ ${#extra_args[@]} -eq 0 && "$1" != -* ]]; then + image="$1" + shift + else + extra_args+=("$1") + shift + fi + ;; + esac + done + + step "Creating disk image: $image" + if [[ ${#extra_args[@]} -gt 0 ]]; then + debug "Extra args: ${extra_args[*]}" + fi + + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/task.py disk_img --image "$image" "${extra_args[@]}" +} + +# Parse build command arguments +parse_build_args() { + step "Building project..." + if [[ $# -gt 0 ]]; then + debug "Build args: $*" + fi + + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/task.py build "$@" +} + +# Parse run command arguments +parse_run_args() { + step "Running project..." + if [[ $# -gt 0 ]]; then + debug "Run args: $*" + fi + + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/task.py run "$@" +} + +# Show help information +show_help() { + echo -e "${CYAN}🔧 Axvisor Project Management Tool${NC}" + echo + echo -e "${YELLOW}📋 Usage:${NC} $0 [args...]" + echo + echo -e "${YELLOW}🛠️ Environment:${NC}" + echo " setup - 🚀 Setup development environment" + echo " defconfig - ⚙️ Copy default config file" + echo " check-deps - ✅ Check system dependencies" + echo " rebuild-venv - 🔄 Force rebuild virtual environment" + echo " dev-env - 🔧 Development environment helper" + echo + echo -e "${YELLOW}🔨 Build:${NC}" + echo " build [args] - 🏗️ Build project (args passthrough)" + echo " clean [args] - 🧹 Clean build artifacts" + echo " clippy [args] - 🔍 Run clippy lint (supports --arch)" + echo + echo -e "${YELLOW}▶️ Run:${NC}" + echo " run [args] - 🚀 Run project (args passthrough)" + echo " disk_img [args] - 💾 Create disk image (supports --image)" + echo + echo -e "${YELLOW}ℹ️ Info:${NC}" + echo " status - 📊 Show project status" + echo " version - 📦 Show version information" + echo " help - ❓ Show this help" + echo + echo -e "${YELLOW}🎯 Advanced:${NC}" + echo " • All commands support --help" + echo " • Arguments passed directly to task.py" + echo " • Smart argument parsing (legacy/new)" + echo + echo -e "${YELLOW}📚 Build examples:${NC}" + echo " $0 build --plat aarch64-qemu-virt-hv" + echo " $0 build --plat aarch64-generic --features fs" + echo " $0 clippy --arch aarch64" + echo + echo -e "${YELLOW}🎮 Run examples:${NC}" + echo " $0 run --plat aarch64-qemu-virt-hv" + echo " $0 run --vmconfigs configs/vms/linux-qemu-aarch64.toml" +} + +# Show project status +show_status() { + step "Project status" + + echo "Project root: $PROJECT_ROOT" + echo "Config file: $([ -f "$HVCONFIG" ] && echo "✓ Present" || echo "✗ Missing")" + echo "Virtual env: $([ -d "$VENV_DIR" ] && echo "✓ Present" || echo "✗ Missing")" + + if [[ -f "$VENV_MARKER" ]]; then + echo "Env status: ✓ Initialized" + local timestamp=$(grep "timestamp:" "$VENV_MARKER" 2>/dev/null | cut -d' ' -f2- || echo "unknown") + echo "Initialized time: $timestamp" + else + echo "Env status: ✗ Not initialized" + fi + + # Check system dependencies + echo "System deps:" + command -v python3 >/dev/null 2>&1 && echo " Python3: ✓" || echo " Python3: ✗" + command -v cargo >/dev/null 2>&1 && echo " Cargo: ✓" || echo " Cargo: ✗" + + # Show latest build artifact timestamp + if [[ -f "axvisor-dev_aarch64-generic.bin" ]]; then + local build_time=$(stat -c %y "axvisor-dev_aarch64-generic.bin" 2>/dev/null | cut -d' ' -f1,2) + echo "Latest build: $build_time" + fi +} + +# Show version information +show_version() { + echo "Axvisor management script v2.0" + echo "Project: axvisor-dev" + echo "Branch: $(git branch --show-current 2>/dev/null || echo "unknown")" + echo "Commit: $(git rev-parse --short HEAD 2>/dev/null || echo "unknown")" +} + +# Force rebuild virtual environment +rebuild_venv() { + step "Force rebuilding virtual environment..." + + if [[ -d "$VENV_DIR" ]]; then + warning "Removing existing virtual environment..." + rm -rf "$VENV_DIR" + fi + + setup_venv + success "Virtual environment rebuilt" +} + +# Setup full development environment +setup_environment() { + step "Setting up development environment..." + check_system_deps + setup_venv + success "Development environment setup completed" +} + +# Main command dispatcher +main() { + local cmd="${1:-help}" + shift || true # 移除第一个参数,剩余参数传递给子命令 + + case "$cmd" in + # Help & info + "help"|"-h"|"--help") + show_help + ;; + "version"|"-v"|"--version") + show_version + ;; + "status") + show_status + ;; + + # Environment management + "setup") + setup_environment + ;; + "defconfig") + setup_defconfig + ;; + "check-deps") + check_system_deps + success "所有系统依赖已满足" + ;; + "rebuild-venv") + rebuild_venv + ;; + + # Build & development commands + "build") + run_python_task build "$@" + ;; + "clean") + run_python_task clean "$@" + # Additionally clean cargo artifacts + if command -v cargo >/dev/null 2>&1; then + step "Cleaning Cargo build artifacts..." + cargo clean + fi + success "Clean completed" + ;; + "clippy") + run_python_task clippy "$@" + ;; + "run") + run_python_task run "$@" + ;; + "disk_img") + run_python_task disk_img "$@" + ;; + "dev-env") + step "Setting up development environment..." + setup_venv + source "$VENV_DIR/bin/activate" + python3 scripts/dev_env.py "$@" + ;; + + # Unknown command + *) + error "Unknown command: $cmd" + info "Use '$0 help' to list available commands" + exit 1 + ;; + esac +} + +# Script entry point +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + # Handle interrupt signal + trap 'echo -e "\n${YELLOW}User cancelled operation${NC}"; exit 130' INT + + # Execute main function + main "$@" +fi diff --git a/build.rs b/build.rs index 0106e6ed..4d4b0f88 100644 --- a/build.rs +++ b/build.rs @@ -31,7 +31,7 @@ use std::{ }; use quote::quote; -use toml::Value; +use toml::Table; static CONFIGS_DIR_PATH: &str = "configs/vms"; @@ -102,12 +102,13 @@ struct MemoryImage { pub kernel: PathBuf, pub dtb: Option, pub bios: Option, + pub ramdisk: Option, } fn parse_config_file(config_file: &ConfigFile) -> Option { let config = config_file .content - .parse::() + .parse::() .expect("failed to parse config file"); let id = config.get("base")?.as_table()?.get("id")?.as_integer()? as usize; @@ -138,11 +139,19 @@ fn parse_config_file(config_file: &ConfigFile) -> Option { .and_then(|v| v.as_str()) .map(|v| convert_to_absolute(CONFIGS_DIR_PATH, v)); + let ramdisk = config + .get("kernel")? + .as_table()? + .get("ramdisk_path") + .and_then(|v| v.as_str()) + .map(|v| convert_to_absolute(CONFIGS_DIR_PATH, v)); + Some(MemoryImage { id, kernel, dtb, bios, + ramdisk, }) } @@ -157,10 +166,10 @@ fn generate_guest_img_loading_functions( for config_file in config_files { if let Some(files) = parse_config_file(&config_file) { let id = files.id; - let kernel = files.kernel.display().to_string(); + let kernel = files.kernel.canonicalize().unwrap().display().to_string(); let dtb = match files.dtb { Some(v) => { - let s = v.display().to_string(); + let s = v.canonicalize().unwrap().display().to_string(); quote! { Some(include_bytes!(#s)) } } None => quote! { None }, @@ -168,7 +177,15 @@ fn generate_guest_img_loading_functions( let bios = match files.bios { Some(v) => { - let s = v.display().to_string(); + let s = v.canonicalize().unwrap().display().to_string(); + quote! { Some(include_bytes!(#s)) } + } + None => quote! { None }, + }; + + let ramdisk = match files.ramdisk { + Some(v) => { + let s = v.canonicalize().unwrap().display().to_string(); quote! { Some(include_bytes!(#s)) } } None => quote! { None }, @@ -180,6 +197,7 @@ fn generate_guest_img_loading_functions( kernel: include_bytes!(#kernel), dtb: #dtb, bios: #bios, + ramdisk: #ramdisk, } }); } @@ -196,6 +214,8 @@ fn generate_guest_img_loading_functions( pub dtb: Option<&'static [u8]>, /// bios image pub bios: Option<&'static [u8]>, + /// ramdisk image + pub ramdisk: Option<&'static [u8]>, } /// Get memory images from config file. @@ -216,7 +236,7 @@ fn main() -> io::Result<()> { let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap(); let platform = env::var("AX_PLATFORM").unwrap_or("".to_string()); - println!("cargo:rustc-cfg=platform=\"{}\"", platform); + println!("cargo:rustc-cfg=platform=\"{platform}\""); if platform != "dummy" { gen_linker_script(&arch, platform.as_str()).unwrap(); @@ -254,7 +274,7 @@ fn main() -> io::Result<()> { generate_guest_img_loading_functions(&mut output_file, config_files)?; } Err(error) => { - writeln!(output_file, " compile_error!(\"{}\")", error)?; + writeln!(output_file, " compile_error!(\"{error}\")")?; writeln!(output_file, "}}\n")?; } } @@ -262,7 +282,7 @@ fn main() -> io::Result<()> { } fn gen_linker_script(arch: &str, platform: &str) -> io::Result<()> { - let fname = format!("linker_{}.lds", platform); + let fname = format!("linker_{platform}.lds"); let output_arch = if arch == "x86_64" { "i386:x86-64" } else if arch.contains("riscv") { @@ -276,7 +296,7 @@ fn gen_linker_script(arch: &str, platform: &str) -> io::Result<()> { "%KERNEL_BASE%", &format!("{:#x}", axconfig::plat::KERNEL_BASE_VADDR), ); - let ld_content = ld_content.replace("%SMP%", &format!("{}", axconfig::SMP)); + let ld_content = ld_content.replace("%SMP%", &format!("{}", axconfig::plat::CPU_NUM)); // target///build/axvisor-xxxx/out let out_dir = std::env::var("OUT_DIR").unwrap(); diff --git a/configs/def_hvconfig.toml b/configs/def_hvconfig.toml new file mode 100644 index 00000000..1e21bed4 --- /dev/null +++ b/configs/def_hvconfig.toml @@ -0,0 +1,10 @@ +# Platform for Axvisor +plat = "aarch64-generic" +# Build features for Axvisor +features = ["ept-level-4"] +# Build arguments for ArceOS +arceos_args = ["BUS=mmio", "BLK=y", "MEM=8g", "LOG=debug", "QEMU_ARGS=\"-machine gic-version=3 -cpu cortex-a72 \""] +# ArceOS additional features +arceos_features = [] + +vmconfigs = [] diff --git a/configs/defconfig.toml b/configs/defconfig.toml index 49e07b8a..7b34df8c 100644 --- a/configs/defconfig.toml +++ b/configs/defconfig.toml @@ -3,7 +3,9 @@ task-stack-size = 0x40000 # uint # Number of timer ticks per second (Hz). A timer tick may contain several timer # interrupts. -ticks-per-sec = 100 # uint + +# WORKAROUND: To provide correct `CNTFRQ_EL0` value to the guest in aarch64. +ticks-per-sec = 1000 # uint # Number of CPUs smp = 1 # uint diff --git a/configs/platforms/aarch64-bsta1000b-hv.toml b/configs/platforms/aarch64-bsta1000b-hv.toml deleted file mode 100644 index 03ba9994..00000000 --- a/configs/platforms/aarch64-bsta1000b-hv.toml +++ /dev/null @@ -1,71 +0,0 @@ -# Architecture identifier. -arch = "aarch64" # str -# Platform identifier. -platform = "aarch64-bsta1000b-hv" # str - -# -# Platform configs -# -[plat] -# Platform family. -family = "aarch64-bsta1000b" # str - -# Base address of the whole physical memory. -phys-memory-base = 0x1_9800_0000 -# Size of the whole physical memory. -phys-memory-size = 0x5800_0000 -# Base physical address of the kernel image. -kernel-base-paddr = 0x1_a000_0000 -# Base virtual address of the kernel image. -kernel-base-vaddr = "0x0000_0001_a000_0000" -# Linear mapping offset, for quick conversions between physical and virtual -# addresses. -phys-virt-offset = "0x0000_0000_0000_0000" -# Offset of bus address and phys address. some boards, the bus address is -# different from the physical address. -phys-bus-offset = 0 -# Kernel address space base. -kernel-aspace-base = "0x0000_0000_0000_0000" -# Kernel address space size. -kernel-aspace-size = "0x0000_ffff_ffff_f000" - -# -# Device specifications -# -[devices] -# MMIO regions with format (`base_paddr`, `size`). -mmio-regions = [ - [0x20008000, 0x1000], # uart8250 UART0 - [0x32000000, 0x8000], # arm,gic-400 - [0x32011000, 0x1000], # CPU CSR - [0x33002000, 0x1000], # Top CRM - [0x70035000, 0x1000], # CRM reg - [0x70038000, 0x1000], # aon pinmux -] # [(uint, uint)] -# VirtIO MMIO regions with format (`base_paddr`, `size`). -virtio-mmio-regions = [] # [(uint, uint)] - -# Base physical address of the PCIe ECAM space. -pci-ecam-base = 0x30E0_2000 - -# UART Address -uart-paddr = 0x2000_8000 # uint -# UART IRQ number -uart-irq = 0xd5 # uint - -# GIC CPU Interface base address -gicc-paddr = 0x3200_2000 # uint -# GIC Distributor base address -gicd-paddr = 0x3200_1000 # uint - -# BST A1000B board registers -cpu-csr-base = 0x3201_1000 # uint -a1000base-topcrm = 0x3300_2000 # uint -a1000base-safetycrm = 0x7003_5000 # uint -a1000base-aoncfg = 0x7003_8000 # uint - -# PSCI -psci-method = "smc" # str - -# RTC (PL031) Address (Need to read from DTB). -rtc-paddr = 0x0 # uint diff --git a/configs/platforms/aarch64-qemu-virt-hv.toml b/configs/platforms/aarch64-qemu-virt-hv.toml deleted file mode 100644 index b5c2001a..00000000 --- a/configs/platforms/aarch64-qemu-virt-hv.toml +++ /dev/null @@ -1,116 +0,0 @@ -# Architecture identifier. -arch = "aarch64" # str -# Platform identifier. -platform = "aarch64-qemu-virt-hv" # str - -# -# Platform configs -# -[plat] -# Platform family. -family = "aarch64-qemu-virt" # str - -# Base address of the whole physical memory. -phys-memory-base = 0x4000_0000 # uint -# Size of the whole physical memory. (2GB) -phys-memory-size = 0x8000_0000 # uint -# Base physical address of the kernel image. -kernel-base-paddr = 0x4008_0000 # uint -# Base virtual address of the kernel image. -kernel-base-vaddr = "0x0000_0000_4008_0000" # uint -# Linear mapping offset, for quick conversions between physical and virtual -# addresses. -phys-virt-offset = "0x0000_0000_0000_0000" # uint -# Offset of bus address and phys address. some boards, the bus address is -# different from the physical address. -phys-bus-offset = 0 # uint -# Kernel address space base. -kernel-aspace-base = "0x0000_0000_0000_0000" # uint -# Kernel address space size. -kernel-aspace-size = "0x0000_ffff_ffff_f000" # uint - -# -# Device specifications -# -[devices] -# MMIO regions with format (`base_paddr`, `size`). -mmio-regions = [ - [0x0900_0000, 0x1000], # PL011 UART1 - [0x0904_0000, 0x1000], # PL011 UART2 - [0x0910_0000, 0x1000], # PL031 RTC - [0x0800_0000, 0x2_0000], # GICv2 - [0x080a_0000, 0xf6_0000], # GICv3 gicr - [0x0a00_0000, 0x4000], # VirtIO - [0x1000_0000, 0x2eff_0000], # PCI memory ranges (ranges 1: 32-bit MMIO space) - [0x40_1000_0000, 0x1000_0000], # PCI config space -] # [(uint, uint)] -# VirtIO MMIO regions with format (`base_paddr`, `size`). -virtio-mmio-regions = [ - [0x0a00_0000, 0x200], - [0x0a00_0200, 0x200], - [0x0a00_0400, 0x200], - [0x0a00_0600, 0x200], - [0x0a00_0800, 0x200], - [0x0a00_0a00, 0x200], - [0x0a00_0c00, 0x200], - [0x0a00_0e00, 0x200], - [0x0a00_1000, 0x200], - [0x0a00_1200, 0x200], - [0x0a00_1400, 0x200], - [0x0a00_1600, 0x200], - [0x0a00_1800, 0x200], - [0x0a00_1a00, 0x200], - [0x0a00_1c00, 0x200], - [0x0a00_1e00, 0x200], - [0x0a00_3000, 0x200], - [0x0a00_2200, 0x200], - [0x0a00_2400, 0x200], - [0x0a00_2600, 0x200], - [0x0a00_2800, 0x200], - [0x0a00_2a00, 0x200], - [0x0a00_2c00, 0x200], - [0x0a00_2e00, 0x200], - [0x0a00_3000, 0x200], - [0x0a00_3200, 0x200], - [0x0a00_3400, 0x200], - [0x0a00_3600, 0x200], - [0x0a00_3800, 0x200], - [0x0a00_3a00, 0x200], - [0x0a00_3c00, 0x200], - [0x0a00_3e00, 0x200], -] # [(uint, uint)] -# Base physical address of the PCIe ECAM space. -pci-ecam-base = 0x40_1000_0000 # uint -# End PCI bus number (`bus-range` property in device tree). -pci-bus-end = 0xff # uint -# PCI device memory ranges (`ranges` property in device tree). -pci-ranges = [ - [0x3ef_f0000, 0x1_0000], # PIO space - [0x1000_0000, 0x2eff_0000], # 32-bit MMIO space - [0x80_0000_0000, 0x80_0000_0000], # 64-bit MMIO space -] # [(uint, uint)] -# UART Address -uart-paddr = 0x0900_0000 # uint -# UART IRQ number -uart-irq = 1 # uint - -# GIC CPU Interface base address -gicc-paddr = 0x0801_0000 # uint -# GIC Distributor base address -gicd-paddr = 0x0800_0000 # uint - -# GIC Redistributor base address -gicr-paddr = 0x080a_0000 - -# PSCI -psci-method = "smc" # str - -# pl031@9010000 { -# clock-names = "apb_pclk"; -# clocks = <0x8000>; -# interrupts = <0x00 0x02 0x04>; -# reg = <0x00 0x9010000 0x00 0x1000>; -# compatible = "arm,pl031\0arm,primecell"; -# }; -# RTC (PL031) Address -rtc-paddr = 0x901_0000 # uint diff --git a/configs/platforms/aarch64-rk3588j-hv.toml b/configs/platforms/aarch64-rk3588j-hv.toml deleted file mode 100644 index de34e4ab..00000000 --- a/configs/platforms/aarch64-rk3588j-hv.toml +++ /dev/null @@ -1,79 +0,0 @@ -# Architecture identifier. -arch = "aarch64" # str -# Platform identifier. -platform = "aarch64-rk3588j" # str - -# -# Platform configs -# -[plat] -# Platform family. -family = "aarch64-rk3588j" - -# Base address of the whole physical memory. -phys-memory-base = 0x20_0000 # uint -# Size of the whole physical memory. -phys-memory-size = 0x800_0000 # uint -# Base physical address of the kernel image. -kernel-base-paddr = 0x48_0000 # uint -# Base virtual address of the kernel image. -kernel-base-vaddr = "0x0000_0000_0048_0000" -# Linear mapping offset, for quick conversions between physical and virtual -# addresses. -phys-virt-offset = "0x0000_0000_0000_0000" -# Kernel address space base. -kernel-aspace-base = "0x0000_0000_0000_0000" -# Kernel address space size. -kernel-aspace-size = "0x0000_ffff_ffff_f000" - -# -# Device specifications -# -[devices] -# MMIO regions with format (`base_paddr`, `size`). -mmio-regions = [ - # ["0x0900_0000", "0x1000"], # PL011 UART - # ["0x0800_0000", "0x5_0000"], # GICv2 with Virtualization (GICV@0x0803_0000, GICH@0x0804_0000) - # ["0x0a00_0000", "0x4000"], # VirtIO - # ["0x1000_0000", "0x2eff_0000"], # PCI memory ranges (ranges 1: 32-bit MMIO space) - # ["0x40_1000_0000", "0x1000_0000"], # PCI config space - [0xfeb50000, 0x1000], # uart8250 UART0 - [0xfe600000, 0x10000], # gic-v3 gicd - [0xfe680000, 0x100000], # gic-v3 gicr - [0xa41000000, 0x400000], - [0xa40c00000, 0x400000], - [0xf4000000,0x1000000], - [0xf3000000,0x1000000], -] # [(uint, uint)] -# VirtIO MMIO regions with format (`base_paddr`, `size`). -virtio-mmio-regions = [] # [(uint, uint)] - -# Base physical address of the PCIe ECAM space. -pci-ecam-base = 0xf4000000 # uint -# End PCI bus number (`bus-range` property in device tree). -pci-bus-end = 0xff # uint -# PCI device memory ranges (`ranges` property in device tree). -pci-ranges = [] # [(uint, uint)] -# UART Address -uart-paddr = 0xfeb5_0000 # uint -uart-irq = 0x14d # uint - -# GICC Address -gicd-paddr = 0xfe600000 # uint -# GICR Address -gicc-paddr = 0xfe680000 # uint -# GICR Address -gicr-paddr = 0xfe680000 # uint - -# PSCI -psci-method = "smc" # str - -# pl031@9010000 { -# clock-names = "apb_pclk"; -# clocks = <0x8000>; -# interrupts = <0x00 0x02 0x04>; -# reg = <0x00 0x9010000 0x00 0x1000>; -# compatible = "arm,pl031\0arm,primecell"; -# }; -# RTC (PL031) Address -rtc-paddr = 0x901_0000 # uint \ No newline at end of file diff --git a/configs/platforms/riscv64-qemu-virt.toml b/configs/platforms/riscv64-qemu-virt.toml deleted file mode 100644 index f272f515..00000000 --- a/configs/platforms/riscv64-qemu-virt.toml +++ /dev/null @@ -1,77 +0,0 @@ -# Architecture identifier. -arch = "riscv64" # str -# Platform identifier. -platform = "riscv64-qemu-virt" # str - -# -# Platform configs -# -[plat] -# Platform family. -family = "riscv64-qemu-virt" # str - -# Base address of the whole physical memory. -phys-memory-base = 0x8000_0000 # uint -# Size of the whole physical memory. (128M) -phys-memory-size = 0x800_0000 # uint -# Base physical address of the kernel image. -kernel-base-paddr = 0x8020_0000 # uint -# Base virtual address of the kernel image. -kernel-base-vaddr = "0xffff_ffc0_8020_0000" # uint -# Linear mapping offset, for quick conversions between physical and virtual -# addresses. -phys-virt-offset = "0xffff_ffc0_0000_0000" # uint -# Offset of bus address and phys address. some boards, the bus address is -# different from the physical address. -phys-bus-offset = 0 # uint -# Kernel address space base. -kernel-aspace-base = "0xffff_ffc0_0000_0000" # uint -# Kernel address space size. -kernel-aspace-size = "0x0000_003f_ffff_f000" # uint - -# -# Device specifications -# -[devices] -# MMIO regions with format (`base_paddr`, `size`). -mmio-regions = [ - [0x0010_1000, 0x1000], # RTC - [0x0c00_0000, 0x21_0000], # PLIC - [0x1000_0000, 0x1000], # UART - [0x1000_1000, 0x8000], # VirtIO - [0x3000_0000, 0x1000_0000], # PCI config space - [0x4000_0000, 0x4000_0000], # PCI memory ranges (ranges 1: 32-bit MMIO space) -] # [(uint, uint)] -# VirtIO MMIO regions with format (`base_paddr`, `size`). -virtio-mmio-regions = [ - [0x1000_1000, 0x1000], - [0x1000_2000, 0x1000], - [0x1000_3000, 0x1000], - [0x1000_4000, 0x1000], - [0x1000_5000, 0x1000], - [0x1000_6000, 0x1000], - [0x1000_7000, 0x1000], - [0x1000_8000, 0x1000], -] # [(uint, uint)] -# Base physical address of the PCIe ECAM space. -pci-ecam-base = 0x3000_0000 # uint -# End PCI bus number (`bus-range` property in device tree). -pci-bus-end = 0xff # uint -# PCI device memory ranges (`ranges` property in device tree). -pci-ranges = [ - [0x0300_0000, 0x1_0000], # PIO space - [0x4000_0000, 0x4000_0000], # 32-bit MMIO space - [0x4_0000_0000, 0x4_0000_0000], # 64-bit MMIO space -] # [(uint, uint)] - -# Timer interrupt frequency in Hz. -timer-frequency = 10_000_000 # uint - -# rtc@101000 { -# interrupts = <0x0b>; -# interrupt-parent = <0x03>; -# reg = <0x00 0x101000 0x00 0x1000>; -# compatible = "google,goldfish-rtc"; -# }; -# RTC (goldfish) Address -rtc-paddr = 0x10_1000 # uint diff --git a/configs/vms/arceos-aarch64-e2000-smp1.dts b/configs/vms/arceos-aarch64-e2000-smp1.dts new file mode 100644 index 00000000..e2f9d8e4 --- /dev/null +++ b/configs/vms/arceos-aarch64-e2000-smp1.dts @@ -0,0 +1,155 @@ +/dts-v1/; + +/memreserve/ 0x0000000080000000 0x0000000000010000; +/ { + compatible = "phytium,pe2204"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Phytium Pi Board"; + + // memory@01 { + // device_type = "memory"; + // reg = <0x20 0x00 0x00 0x80000000>; + // numa-node-id = <0x00>; + // }; + + aliases { + serial1 = "/soc/uart@2800d000"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu-map { + + cluster0 { + + core0 { + cpu = <0x05>; + }; + }; + + // cluster1 { + + // core0 { + // cpu = <0x06>; + // }; + // }; + + // cluster2 { + + // core0 { + // cpu = <0x07>; + // }; + + // core1 { + // cpu = <0x08>; + // }; + // }; + }; + + // cpu@0 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x200>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x07>; + // }; + + // cpu@1 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x201>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x08>; + // }; + + cpu@100 { + device_type = "cpu"; + compatible = "phytium,ftc664\0arm,armv8"; + reg = <0x00 0x00>; + enable-method = "psci"; + clocks = <0x09 0x00>; + capacity-dmips-mhz = <0x161c>; + phandle = <0x05>; + }; + + // cpu@101 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x100>; + // enable-method = "psci"; + // clocks = <0x09 0x01>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x06>; + // }; + }; + + interrupt-controller@30800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>; + interrupts = <0x01 0x09 0x08>; + phandle = <0x01>; + + gic-its@30820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x00 0x30820000 0x00 0x20000>; + phandle = <0x0f>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>; + clock-frequency = <0x2faf080>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + dma-coherent; + ranges; + + uart@2800d000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800d000 0x00 0x1000>; + interrupts = <0x00 0x54 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + }; + + chosen { + bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait rw cma=256m ;"; + stdout-path = "serial1:115200n8"; + }; + + memory@00 { + device_type = "memory"; + reg = <0x20 0x20000000 0x00 0x20000000>; + }; +}; diff --git a/configs/vms/arceos-aarch64.toml b/configs/vms/arceos-aarch64-e2000-smp1.toml similarity index 51% rename from configs/vms/arceos-aarch64.toml rename to configs/vms/arceos-aarch64-e2000-smp1.toml index d2f87d93..7e4ecdb9 100644 --- a/configs/vms/arceos-aarch64.toml +++ b/configs/vms/arceos-aarch64-e2000-smp1.toml @@ -2,39 +2,36 @@ # [base] # Guest vm id. -id = 1 +id = 2 # Guest vm name. name = "arceos" # Virtualization type. vm_type = 1 # The number of virtual CPUs. cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] +# The physical CPU ids. +phys_cpu_ids = [0x00] # # Vm kernel configs # [kernel] # The entry point of the kernel image. -entry_point = 0x4008_0000 +entry_point = 0x20_2008_0000 # The location of image: "memory" | "fs". # Load from file system. -image_location = "fs" -# The file path of the kernel image. -kernel_path = "arceos-aarch64.bin" +image_location = "memory" # The load address of the kernel image. -kernel_load_addr = 0x4008_0000 -## Load from memory -# image_location = "memory" +kernel_load_addr = 0x20_2008_0000 ## The file path of the kernel image. -# kernel_path = "" +kernel_path = "/path/to/arceos_aarch64-dyn_smp1.bin" ## The file path of the device tree blob (DTB). -# dtb_path = "" +dtb_load_addr = 0x20_2000_0000 +#dtb_path = "/path/to/axvisor/configs/vms/arceos-aarch64-e2000_smp1.dtb" # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b00111 R|W|EXECUTE + [0x20_2000_0000, 0x2000_0000, 0x7, 1], # System RAM MAP_IDENTICAL ] # @@ -48,11 +45,11 @@ emu_devices = [] # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], ] \ No newline at end of file diff --git a/configs/vms/arceos-aarch64-e2000-smp2.dts b/configs/vms/arceos-aarch64-e2000-smp2.dts new file mode 100644 index 00000000..b80c5dad --- /dev/null +++ b/configs/vms/arceos-aarch64-e2000-smp2.dts @@ -0,0 +1,155 @@ +/dts-v1/; + +/memreserve/ 0x0000000080000000 0x0000000000010000; +/ { + compatible = "phytium,pe2204"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Phytium Pi Board"; + + // memory@01 { + // device_type = "memory"; + // reg = <0x20 0x00 0x00 0x80000000>; + // numa-node-id = <0x00>; + // }; + + aliases { + serial1 = "/soc/uart@2800d000"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu-map { + + // cluster0 { + + // core0 { + // cpu = <0x05>; + // }; + // }; + + cluster1 { + + core0 { + cpu = <0x06>; + }; + }; + + cluster2 { + + // core0 { + // cpu = <0x07>; + // }; + + core1 { + cpu = <0x08>; + }; + }; + }; + + // cpu@0 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x200>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x07>; + // }; + + cpu@1 { + device_type = "cpu"; + compatible = "phytium,ftc310\0arm,armv8"; + reg = <0x00 0x201>; + enable-method = "psci"; + clocks = <0x09 0x02>; + capacity-dmips-mhz = <0xb22>; + phandle = <0x08>; + }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x00>; + // enable-method = "psci"; + // clocks = <0x09 0x00>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x05>; + // }; + + cpu@101 { + device_type = "cpu"; + compatible = "phytium,ftc664\0arm,armv8"; + reg = <0x00 0x100>; + enable-method = "psci"; + clocks = <0x09 0x01>; + capacity-dmips-mhz = <0x161c>; + phandle = <0x06>; + }; + }; + + interrupt-controller@30800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>; + interrupts = <0x01 0x09 0x08>; + phandle = <0x01>; + + gic-its@30820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x00 0x30820000 0x00 0x20000>; + phandle = <0x0f>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>; + clock-frequency = <0x2faf080>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + dma-coherent; + ranges; + + uart@2800d000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800d000 0x00 0x1000>; + interrupts = <0x00 0x54 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + }; + + chosen { + bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait rw cma=256m ;"; + stdout-path = "serial1:115200n8"; + }; + + memory@00 { + device_type = "memory"; + reg = <0x20 0x20000000 0x00 0x20000000>; + }; +}; diff --git a/configs/vms/arceos-riscv64-smp.toml b/configs/vms/arceos-aarch64-e2000-smp2.toml similarity index 54% rename from configs/vms/arceos-riscv64-smp.toml rename to configs/vms/arceos-aarch64-e2000-smp2.toml index 2af9a6bf..0a39e493 100644 --- a/configs/vms/arceos-riscv64-smp.toml +++ b/configs/vms/arceos-aarch64-e2000-smp2.toml @@ -2,33 +2,35 @@ # [base] # Guest vm id. -id = 1 +id = 2 # Guest vm name. name = "arceos" # Virtualization type. vm_type = 1 # The number of virtual CPUs. cpu_num = 2 -# Guest vm physical cpu sets. -phys_cpu_sets = [1, 2] - +# The physical CPU ids. +phys_cpu_ids = [0x201, 0x100] # # Vm kernel configs # [kernel] # The entry point of the kernel image. -entry_point = 0x8020_0000 +entry_point = 0x20_2008_0000 # The location of image: "memory" | "fs". # Load from file system. -image_location = "fs" -# The file path of the kernel image. -kernel_path = "arceos-riscv64-smp.bin" +image_location = "memory" # The load address of the kernel image. -kernel_load_addr = 0x8020_0000 +kernel_load_addr = 0x20_2008_0000 +## The file path of the kernel image. +kernel_path = "/guest/arceos/arceos_aarch64-dyn_smp2.bin" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x20_2000_0000 +#dtb_path = "/path/to/axvisor/configs/vms/arceos-aarch64-e2000_smp2.dtb" # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x8000_0000, 0x100_0000, 0xf, 0], # Low RAM 16M 0b1111 R|W|EXECUTE|U + [0x20_2000_0000, 0x2000_0000, 0x7, 1], # System RAM MAP_IDENTICAL ] # @@ -42,18 +44,11 @@ emu_devices = [] # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - [ - "PLIC@c000000", - 0x0c00_0000, - 0x0c00_0000, - 0x21_0000, - 0x1, - ], - [ - "UART@10000000", - 0x1000_0000, - 0x1000_0000, - 0x1000, - 0x1, - ], + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], ] \ No newline at end of file diff --git a/configs/vms/arceos-aarch64-rk3568-smp1.dts b/configs/vms/arceos-aarch64-rk3568-smp1.dts new file mode 100644 index 00000000..d1ad3a39 --- /dev/null +++ b/configs/vms/arceos-aarch64-rk3568-smp1.dts @@ -0,0 +1,87 @@ +/dts-v1/; + +/memreserve/ 0x0000000008300000 0x000000000001c000; +/memreserve/ 0x000000000a200000 0x00000000008cf15d; +/ { + serial-number = "425ca8fc29ade692"; + compatible = "rockchip,rk3568-firefly-roc-pc\0rockchip,rk3568"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Firefly RK3568-ROC-PC"; + + memory { + reg = <0x00 0x70000000 0x00 0x10000000>; + device_type = "memory"; + }; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0xfe660000"; + }; + + aliases { + serial2 = "/serial@fe660000"; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu@200 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00 0x200>; + enable-method = "psci"; + clocks = <0x02 0x00>; + operating-points-v2 = <0x03>; + cpu-idle-states = <0x04>; + phandle = <0x0d>; + }; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; + arm,no-tick-in-suspend; + }; + + interrupt-controller@fd400000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0xfd400000 0x00 0x10000 0x00 0xfd460000 0x00 0xc0000>; + interrupts = <0x01 0x09 0x04>; + phandle = <0x01>; + + interrupt-controller@fd440000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <0x01>; + reg = <0x00 0xfd440000 0x00 0x20000>; + status = "okay"; + phandle = <0xbe>; + }; + }; + + serial@fe660000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe660000 0x00 0x100>; + interrupts = <0x00 0x76 0x04>; + clocks = <0x23 0x123 0x23 0x120>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x04 0x4e 0x05>; + pinctrl-names = "default"; + pinctrl-0 = <0x10c>; + status = "okay"; + }; +}; \ No newline at end of file diff --git a/configs/vms/arceos-aarch64-rk3568-smp1.toml b/configs/vms/arceos-aarch64-rk3568-smp1.toml new file mode 100644 index 00000000..92ab9acc --- /dev/null +++ b/configs/vms/arceos-aarch64-rk3568-smp1.toml @@ -0,0 +1,57 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "arceos" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# The physical CPU ids. +phys_cpu_ids = [0x200] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x7008_0000 +# The location of image: "memory" | "fs". +# Load from memory. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x7008_0000 +## The file path of the kernel image. +kernel_path = "/path/arceos-aarch64-dyn.bin" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x7000_0000 +#dtb_path = "/path/arceos-rk3568.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x7000_0000, 0x1000_0000, 0x7, 0], # System RAM 1G MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# The interrupt mode. +interrupt_mode = "passthrough" +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] diff --git a/configs/vms/arceos-aarch64-rk3568-smp2.dts b/configs/vms/arceos-aarch64-rk3568-smp2.dts new file mode 100644 index 00000000..6da5bf8b --- /dev/null +++ b/configs/vms/arceos-aarch64-rk3568-smp2.dts @@ -0,0 +1,101 @@ +/dts-v1/; + +/memreserve/ 0x0000000008300000 0x000000000001c000; +/memreserve/ 0x000000000a200000 0x00000000008cf15d; +/ { + serial-number = "425ca8fc29ade692"; + compatible = "rockchip,rk3568-firefly-roc-pc\0rockchip,rk3568"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Firefly RK3568-ROC-PC"; + + memory { + reg = <0x00 0x70000000 0x00 0x10000000>; + device_type = "memory"; + }; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0xfe660000"; + }; + + aliases { + serial2 = "/serial@fe660000"; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00 0x00>; + enable-method = "psci"; + clocks = <0x02 0x00>; + operating-points-v2 = <0x03>; + cpu-idle-states = <0x04>; + #cooling-cells = <0x02>; + dynamic-power-coefficient = <0xbb>; + cpu-supply = <0x05>; + phandle = <0x0c>; + }; + + cpu@100 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00 0x100>; + enable-method = "psci"; + clocks = <0x02 0x00>; + operating-points-v2 = <0x03>; + cpu-idle-states = <0x04>; + phandle = <0x0d>; + }; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; + arm,no-tick-in-suspend; + }; + + interrupt-controller@fd400000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0xfd400000 0x00 0x10000 0x00 0xfd460000 0x00 0xc0000>; + interrupts = <0x01 0x09 0x04>; + phandle = <0x01>; + + interrupt-controller@fd440000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <0x01>; + reg = <0x00 0xfd440000 0x00 0x20000>; + status = "okay"; + phandle = <0xbe>; + }; + }; + + serial@fe660000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe660000 0x00 0x100>; + interrupts = <0x00 0x76 0x04>; + clocks = <0x23 0x123 0x23 0x120>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x04 0x4e 0x05>; + pinctrl-names = "default"; + pinctrl-0 = <0x10c>; + status = "okay"; + }; +}; \ No newline at end of file diff --git a/configs/vms/arceos-aarch64-rk3568-smp2.toml b/configs/vms/arceos-aarch64-rk3568-smp2.toml new file mode 100644 index 00000000..e1a1c26a --- /dev/null +++ b/configs/vms/arceos-aarch64-rk3568-smp2.toml @@ -0,0 +1,57 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 2 +# Guest vm name. +name = "arceos" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 2 +# The physical CPU ids. +phys_cpu_ids = [0x00, 0x100] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x7008_0000 +# The location of image: "memory" | "fs". +# Load from memory. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x7008_0000 +## The file path of the kernel image. +kernel_path = "/path/arceos-aarch64-dyn.bin" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x7000_0000 +#dtb_path = "/path/arceos-aarch64-rk3568_smp2.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x7000_0000, 0x1000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# The interrupt mode. +interrupt_mode = "passthrough" +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] diff --git a/configs/vms/arceos-aarch64-smp.toml b/configs/vms/arceos-aarch64-smp.toml deleted file mode 100644 index 79f5f5d5..00000000 --- a/configs/vms/arceos-aarch64-smp.toml +++ /dev/null @@ -1,57 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "arceos" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 2 -# Guest vm physical cpu sets. -phys_cpu_sets = [1, 2] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x4008_0000 -# The file path of the kernel image. -kernel_path = "arceos-aarch64-smp.bin" -# The load address of the kernel image. -kernel_load_addr = 0x4008_0000 - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b00111 R|W|EXECUTE MAP_ALLOC -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] - -# Pass-through devices. -# Name Base-Ipa Base-Pa Length Alloc-Irq. -passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], -] \ No newline at end of file diff --git a/configs/vms/arceos-aarch64-tac_e400-smp1.dts b/configs/vms/arceos-aarch64-tac_e400-smp1.dts new file mode 100644 index 00000000..53d9a15f --- /dev/null +++ b/configs/vms/arceos-aarch64-tac_e400-smp1.dts @@ -0,0 +1,155 @@ +/dts-v1/; + +/memreserve/ 0x0000000080000000 0x0000000000010000; +/ { + compatible = "phytium,pe2204"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Phytium Pi Board"; + + // memory@01 { + // device_type = "memory"; + // reg = <0x20 0x00 0x00 0x80000000>; + // numa-node-id = <0x00>; + // }; + + aliases { + serial1 = "/soc/uart@2800d000"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu-map { + + // cluster0 { + + // core0 { + // cpu = <0x05>; + // }; + // }; + + // cluster1 { + + // core0 { + // cpu = <0x06>; + // }; + // }; + + cluster2 { + + core0 { + cpu = <0x07>; + }; + + // core1 { + // cpu = <0x08>; + // }; + }; + }; + + cpu@0 { + device_type = "cpu"; + compatible = "phytium,ftc310\0arm,armv8"; + reg = <0x00 0x200>; + enable-method = "psci"; + clocks = <0x09 0x02>; + capacity-dmips-mhz = <0xb22>; + phandle = <0x07>; + }; + + // cpu@1 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x201>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x08>; + // }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x00>; + // enable-method = "psci"; + // clocks = <0x09 0x00>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x05>; + // }; + + // cpu@101 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x100>; + // enable-method = "psci"; + // clocks = <0x09 0x01>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x06>; + // }; + }; + + interrupt-controller@30800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>; + interrupts = <0x01 0x09 0x08>; + phandle = <0x01>; + + gic-its@30820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x00 0x30820000 0x00 0x20000>; + phandle = <0x0f>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>; + clock-frequency = <0x2faf080>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + dma-coherent; + ranges; + + uart@2800d000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800d000 0x00 0x1000>; + interrupts = <0x00 0x54 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + }; + + chosen { + bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 root=/dev/sda2 rootfstype=ext4 rootwait rw cma=256m ;"; + stdout-path = "serial1:115200n8"; + }; + + memory@00 { + device_type = "memory"; + reg = <0x20 0x20000000 0x00 0x20000000>; + }; +}; diff --git a/configs/vms/arceos-riscv64.toml b/configs/vms/arceos-aarch64-tac_e400-smp1.toml similarity index 55% rename from configs/vms/arceos-riscv64.toml rename to configs/vms/arceos-aarch64-tac_e400-smp1.toml index bc0045c1..ccf474fc 100644 --- a/configs/vms/arceos-riscv64.toml +++ b/configs/vms/arceos-aarch64-tac_e400-smp1.toml @@ -2,33 +2,36 @@ # [base] # Guest vm id. -id = 1 +id = 2 # Guest vm name. name = "arceos" # Virtualization type. vm_type = 1 # The number of virtual CPUs. cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] +# The physical CPU ids. +phys_cpu_ids = [0x200] # # Vm kernel configs # [kernel] # The entry point of the kernel image. -entry_point = 0x8020_0000 +entry_point = 0x20_2008_0000 # The location of image: "memory" | "fs". # Load from file system. -image_location = "fs" -# The file path of the kernel image. -kernel_path = "arceos-riscv64.bin" +image_location = "memory" # The load address of the kernel image. -kernel_load_addr = 0x8020_0000 +kernel_load_addr = 0x20_2008_0000 +## The file path of the kernel image. +kernel_path = "/path/to/arceos_aarch64-dyn_smp1.bin" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x20_2000_0000 +#dtb_path = "/path/to/arceos-aarch64-tac_e400-smp1.dtb" # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x8000_0000, 0x100_0000, 0xf, 0], # Low RAM 16M 0b1111 R|W|EXECUTE|U + [0x20_2000_0000, 0x2000_0000, 0x7, 1], # System RAM MAP_IDENTICAL ] # @@ -42,18 +45,11 @@ emu_devices = [] # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - [ - "PLIC@c000000", - 0x0c00_0000, - 0x0c00_0000, - 0x21_0000, - 0x1, - ], - [ - "UART@10000000", - 0x1000_0000, - 0x1000_0000, - 0x1000, - 0x1, - ], + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], ] \ No newline at end of file diff --git a/configs/vms/arceos-x86_64.toml b/configs/vms/arceos-x86_64.toml deleted file mode 100644 index 1a67eef1..00000000 --- a/configs/vms/arceos-x86_64.toml +++ /dev/null @@ -1,78 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "arceos" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x8000 -# The location of image: "memory" | "fs". -# Load from file system. -image_location = "fs" -# The file path of the BIOS image. -bios_path = "axvm-bios.bin" -# The load address of the BIOS image. -bios_load_addr = 0x8000 -# The file path of the kernel image. -kernel_path = "arceos-x86_64.bin" -# The load address of the kernel image. -kernel_load_addr = 0x20_0000 - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x0000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b111 -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] - -# Pass-through devices. -# Name Base-Ipa Base-Pa Length Alloc-Irq. -passthrough_devices = [ - [ - "IO APIC", - 0xfec0_0000, - 0xfec0_0000, - 0x1000, - 0x1, - ], - [ - "Local APIC", - 0xfee0_0000, - 0xfee0_0000, - 0x1000, - 0x1, - ], - [ - "HPET", - 0xfed0_0000, - 0xfed0_0000, - 0x1000, - 0x1, - ], -] \ No newline at end of file diff --git a/configs/vms/linux-a1000-aarch64-smp8.toml b/configs/vms/linux-a1000-aarch64-smp8.toml deleted file mode 100644 index 0129f820..00000000 --- a/configs/vms/linux-a1000-aarch64-smp8.toml +++ /dev/null @@ -1,59 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "linux-a1000" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 8 -# The physical CPU ids. -phys_cpu_ids = [0x00, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700] -# Guest vm physical cpu sets. -phys_cpu_sets = [1, 2, 4, 8, 16, 32, 64, 128] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x8100_0000 -# The location of image: "memory" | "fs". -## Load from memory. -image_location = "memory" -# The file path of the kernel image. -kernel_path = "path/to/kernel" -# The load address of the kernel image. -kernel_load_addr = 0x8100_0000 -# The file path of the device tree blob (DTB). -dtb_path = "path/to/dtb" -# The load address of the device tree blob (DTB). -dtb_load_addr = 0x82e0_0000 - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`). -memory_regions = [ - [0x8000_0000, 0x7000_0000, 0x7, 1], #ram 1792MB -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [ -] - -# Pass-through devices. -passthrough_devices = [ - ["most-devices", 0x0, 0x0, 0x8000_0000, 0x1], -] \ No newline at end of file diff --git a/configs/vms/linux-aarch64-a1000-smp8-fada.dts b/configs/vms/linux-aarch64-a1000-smp8-fada.dts new file mode 100644 index 00000000..49cb3d06 --- /dev/null +++ b/configs/vms/linux-aarch64-a1000-smp8-fada.dts @@ -0,0 +1,3385 @@ +/dts-v1/; + +/memreserve/ 0x0000000018000000 0x0000000000100000; +/ { + compatible = "bst,a1000b"; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "BST A1000B FAD-A"; + + cpus { + #address-cells = <0x01>; + #size-cells = <0x00>; + + cpu@0 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x00>; + cpu-idle-states = <0x04>; + phandle = <0x3a>; + }; + + cpu@1 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x100>; + cpu-idle-states = <0x04>; + phandle = <0x3b>; + }; + + cpu@2 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x200>; + cpu-idle-states = <0x04>; + phandle = <0x3c>; + }; + + cpu@3 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x300>; + cpu-idle-states = <0x04>; + phandle = <0x3d>; + }; + + cpu@4 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x400>; + cpu-idle-states = <0x04>; + phandle = <0x3e>; + }; + + cpu@5 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x500>; + cpu-idle-states = <0x04>; + phandle = <0x3f>; + }; + + cpu@6 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x600>; + cpu-idle-states = <0x04>; + phandle = <0x40>; + }; + + cpu@7 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x700>; + cpu-idle-states = <0x04>; + phandle = <0x41>; + }; + + l2-cache0 { + compatible = "cache"; + phandle = <0x03>; + }; + + }; + + psci { + compatible = "arm,psci"; + method = "hvc"; + cpu_on = <0xc4000003>; + cpu_off = <0x84000002>; + cpu_suspend = <0xc4000001>; + }; + + misc_clk { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x3d0900>; + phandle = <0x02>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupt-parent = <0x01>; + interrupts = <0x01 0x0d 0xff08 0x01 0x0e 0xff08 0x01 0x0b 0xff08 0x01 0x0a 0xff08>; + }; + + amba_apu@0 { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x00 0x00 0xffffffff>; + + a1000bclkc@33002000 { + compatible = "bst,a1000b-clkc"; + osc-clk-frequency = <0x17d7840>; + rgmii0-rxclk-frequency = <0x7735940>; + rgmii1-rxclk-frequency = <0x7735940>; + ptp_clk-frequency = <0x7735940>; + #clock-cells = <0x01>; + reg = <0x00 0x33002000 0x1000 0x00 0x70035000 0x1000 0x00 0x20020000 0x1000 0x00 0x20021000 0x1000>; + phandle = <0x05>; + }; + + a1000rstc@0x3300217c { + compatible = "bst,a1000b-rstc"; + #reset-cells = <0x01>; + reg = <0x00 0x3300217c 0x04 0x00 0x33002180 0x04 0x00 0x70035008 0x04 0x00 0x20020000 0x04 0x00 0x20021000 0x04>; + phandle = <0x06>; + }; + + interrupt-controller@32000000 { + compatible = "arm,gic-400"; + #interrupt-cells = <0x03>; + interrupt-controller; + reg = <0x00 0x32001000 0x1000 0x00 0x32002000 0x2000 0x00 0x32004000 0x2000 0x00 0x32006000 0x2000>; + interrupt-parent = <0x01>; + interrupts = <0x01 0x09 0xff04>; + phandle = <0x01>; + }; + + a1000noc { + compatible = "bst,a1000-noc"; + echo-args = <0x01>; + noc-arg-num = <0x2a>; + noc-args = <0x3342000c 0x00 0x33420008 0x505 0x3342008c 0x00 0x33420088 0x505 0x3342010c 0x00 0x33420108 0x505 0x3342018c 0x00 0x33420188 0x505 0x3342020c 0x00 0x33420208 0x505 0x3342028c 0x00 0x33420288 0x505 0x3342030c 0x00 0x33420308 0x505 0x3342038c 0x00 0x33420388 0x303 0x3342040c 0x00 0x33420408 0x303 0x3342048c 0x00 0x33420488 0x303 0x3342050c 0x00 0x33420508 0x303 0x3342058c 0x00 0x33420588 0x303 0x3342060c 0x00 0x33420608 0x303 0x3342068c 0x00 0x33420688 0x303 0x3342070c 0x00 0x33420708 0x00 0x3342078c 0x00 0x33420788 0x707 0x3342080c 0x00 0x33420808 0x707 0x3342088c 0x00 0x33420888 0x707 0x3342090c 0x00 0x33420908 0x707 0x3340010c 0x00 0x33400108 0x505 0x3340018c 0x00 0x33400188 0x505>; + }; + + serial@20008000 { + status = "okay"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x20008000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd5 0x04>; + clocks = <0x05 0x54 0x05 0x66>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x1d>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x07>; + }; + + serial@2000a000 { + status = "okay"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x2000a000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd6 0x04>; + clocks = <0x05 0x55 0x05 0x67>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x17>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x08>; + }; + + serial@2000b000 { + status = "disable"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x2000b000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd7 0x04>; + clocks = <0x05 0x70 0x05 0x7d>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x29>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x09>; + }; + + serial@20009000 { + status = "okay"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x20009000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd8 0x04>; + clocks = <0x05 0x6f 0x05 0x7e>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x25>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x0a>; + }; + + dma-controller@33200000 { + status = "okay"; + compatible = "bst,dw-axi-gdma"; + reg = <0x00 0x33200000 0x1000>; + clocks = <0x05 0x2f 0x05 0x30>; + clock-names = "core-clk\0cfgr-clk"; + resets = <0x06 0x0c>; + reset-names = "gdma_reset"; + dma-channels = <0x08>; + snps,dma-masters = <0x01>; + snps,data-width = <0x04>; + snps,block-size = <0x1000 0x1000 0x1000 0x1000 0x1000 0x1000 0x1000 0x1000>; + snps,priority = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>; + snps,axi-max-burst-len = <0x10>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x90 0xff04 0x00 0x91 0xff04 0x00 0x92 0xff04 0x00 0x93 0xff04 0x00 0x94 0xff04 0x00 0x95 0xff04 0x00 0x96 0xff04 0x00 0x97 0xff04 0x00 0x98 0xff04>; + support-slave; + }; + + pcie-phy@30E02000 { + reg = <0x00 0x30e02000 0x1000>; + reg-names = "phy-base"; + dmc-lane = <0x01>; + dmc-mode = <0x02>; + pcie-ctl0 = <0x01>; + pcie-ctl1 = <0x00>; + phandle = <0x0b>; + }; + + pcie@30600000 { + status = "disable"; + compatible = "bst,dw-pcie-rc"; + device_type = "pci"; + controller-id = <0x00>; + bus-range = <0x00 0xff>; + linux,pci-domain = <0x00>; + reg = <0x00 0x30600000 0x10000 0x00 0x30700000 0x10000 0x00 0x30900000 0x40000 0x00 0x30980000 0x40000 0x00 0x40000000 0x40000>; + reg-names = "dbi\0dbi2\0atu\0dma\0config"; + num-iatu = <0x04>; + num-viewport = <0x04>; + #address-cells = <0x03>; + #size-cells = <0x02>; + ranges = <0x81000000 0x00 0x41000000 0x00 0x41000000 0x00 0x1000000 0x83000000 0x00 0x42000000 0x00 0x42000000 0x00 0x4000000>; + dma-ranges = <0x3000000 0x00 0x80000000 0x00 0x80000000 0x02 0x00>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xc5 0x04 0x00 0xbf 0x04 0x00 0xc0 0x04 0x00 0xc1 0x04 0x00 0xc6 0x04>; + interrupt-names = "sys\0dma\0correctable\0uncorrectable\0other"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x00>; + interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0xc5 0x04>; + pcie-phy = <0x0b>; + max-link-speed = <0x03>; + num-lanes = <0x02>; + picp-ctl = "mem"; + ob-memaddr-def = <0x0c>; + }; + + pcie0_ep@30600000 { + status = "disable"; + compatible = "bst,dw-pcie-ep"; + device_type = "pci"; + controller-id = <0x00>; + bus-range = <0x00 0x04>; + reg = <0x00 0x30600000 0x40000 0x00 0x30700000 0x40000 0x00 0x30900000 0x40000 0x00 0x30980000 0x40000 0x00 0x40000000 0x100000>; + reg-names = "dbi\0dbi2\0atu\0dma\0addr_space"; + num-ib-windows = <0x06>; + num-ob-windows = <0x06>; + max-functions = [04]; + pcie-phy = <0x0b>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xc5 0x04 0x00 0xbf 0x04 0x00 0xc0 0x04 0x00 0xc1 0x04 0x00 0xc6 0x04>; + interrupt-names = "sys\0dma\0correctable\0uncorrectable\0other"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x00>; + interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0xc5 0x04>; + }; + + pcie@30a00000 { + status = "disable"; + compatible = "bst,dw-pcie-ep"; + device_type = "pci"; + controller-id = <0x01>; + bus-range = <0x00 0x04>; + reg = <0x00 0x30a00000 0x40000 0x00 0x30b00000 0x40000 0x00 0x30d00000 0x40000 0x00 0x30d80000 0x40000 0x00 0x48000000 0x1000000>; + reg-names = "dbi\0dbi2\0atu\0dma\0addr_space"; + num-ib-windows = <0x06>; + num-ob-windows = <0x06>; + max-functions = [04]; + pcie-phy = <0x0b>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xc2 0x04 0x00 0xc3 0x04 0x00 0xc4 0x04 0x00 0xc7 0x04>; + interrupt-names = "dma\0correctable\0uncorrectable\0other"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x00>; + interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0xc5 0x04>; + }; + + pcie_vnet@0 { + status = "disable"; + compatible = "bst,pcie-vnet"; + vnet-id = <0x00>; + dma-chan-num = <0x01>; + rx_queues = <0x01>; + tx_queues = <0x01>; + tx-fifo-depth = <0x100>; + rx-fifo-depth = <0x100>; + extend-op = <0x10>; + memory-region = <0x0c>; + }; + + pcie_vnet@1 { + status = "disable"; + compatible = "bst,pcie-vnet"; + vnet-id = <0x01>; + dma-chan-num = <0x01>; + rx_queues = <0x01>; + tx_queues = <0x01>; + tx-fifo-depth = <0x100>; + rx-fifo-depth = <0x100>; + }; + + + + + gpio@20010000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,dw-apb-gpio"; + reg = <0x00 0x20010000 0x1000>; + clocks = <0x05 0x62>; + clock-names = "bus"; + resets = <0x06 0x1c>; + resets-names = "gpio0_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x15 0x16 0x17 0x18 0x19 0x1a 0x1b>; + + gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x00>; + chipnum-base = <0x00>; + interrupt-controller; + #interrupt-cells = <0x03>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdf 0x04 0x00 0xe3 0x04 0x00 0xe4 0x04 0x00 0xe5 0x04 0x00 0xe6 0x04 0x00 0xe7 0x04 0x00 0xe8 0x04 0x00 0xe9 0x04 0x00 0xea 0x04>; + phandle = <0x1f>; + }; + + gpio-controller@1 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x01>; + chipnum-base = <0x20>; + phandle = <0x4a>; + }; + + gpio-controller@2 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x02>; + chipnum-base = <0x40>; + phandle = <0x47>; + }; + + gpio-controller@3 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x03>; + chipnum-base = <0x60>; + phandle = <0x54>; + }; + }; + + gpio@20011000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,dw-apb-gpio"; + reg = <0x00 0x20011000 0x1000>; + clocks = <0x05 0x82>; + clock-names = "bus"; + resets = <0x06 0x27>; + resets-names = "gpio1_reset"; + + gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x00>; + chipnum-base = <0x80>; + interrupt-controller; + #interrupt-cells = <0x03>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xe0 0x04>; + }; + + gpio-controller@1 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x01>; + chipnum-base = <0xa0>; + }; + + gpio-controller@2 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x02>; + chipnum-base = <0xc0>; + }; + + gpio-controller@3 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x03>; + chipnum-base = <0xe0>; + phandle = <0x0d>; + }; + }; + + watchdog@2001a000 { + status = "disable"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001a000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x5d 0x04>; + clocks = <0x05 0x5a 0x05 0x64>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x1f>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt0"; + }; + + watchdog@2001b000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001b000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x5e 0x04>; + clocks = <0x05 0x5b 0x05 0x65>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x20>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt1"; + }; + + watchdog@2001c000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001c000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x5f 0x04>; + clocks = <0x05 0x74 0x05 0x7b>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x2e>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt2"; + }; + + watchdog@2001d000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001d000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x60 0x04>; + clocks = <0x05 0x75 0x05 0x7c>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x2f>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt3"; + }; + + watchdog@32009000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x32009000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x43 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt0"; + }; + + watchdog@3200a000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200a000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x44 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt1"; + }; + + watchdog@3200b000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200b000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x45 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt2"; + }; + + watchdog@3200c000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200c000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x46 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt3"; + }; + + watchdog@3200d000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200d000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x47 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt4"; + }; + + watchdog@3200e000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200e000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x48 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt5"; + }; + + watchdog@3200f000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200f000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x49 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt6"; + }; + + watchdog@32010000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x32010000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4a 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt7"; + }; + + i2c@20000000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20000000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xcf 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4b 0x05 0x49>; + clock-names = "LSP0_PCLK\0LSP0_WCLK"; + resets = <0x06 0x18>; + reset-names = "i2c0_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x1c>; + }; + + i2c@20001000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20001000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd0 0x04>; + clock-frequency = <0xf4240>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4b 0x05 0x49>; + clock-names = "LSP0_PCLK\0LSP0_WCLK"; + resets = <0x06 0x19>; + reset-names = "i2c1_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x1d>; + + max96789@40 { + compatible = "bst,max96789"; + reg = <0x40>; + channel_ids = <0x2a 0x3a 0x2a 0x3b>; + }; + }; + + i2c@20002000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20002000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd1 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4b 0x05 0x49>; + clock-names = "LSP0_PCLK\0LSP0_WCLK"; + resets = <0x06 0x1a>; + reset-names = "i2c2_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x1e>; + + max96712@29 { + compatible = "bst,maxim-deser-hub"; + type = "max96712"; + ctl-mode = "fad-ctl"; + reg = <0x29>; + lane-num = <0x02>; + i2c-port = <0x00>; + csi2-port = <0x00>; + lane-speed = <0x960>; + regs = <0x40>; + data-type = <0x2d>; + trigger-mode = <0x01>; + trigger-fps = <0x14>; + trigger-rx-gpio = <0x0a>; + trigger-tx-gpio = <0x08>; + maxim,hsync-invert = <0x00>; + maxim,vsync-invert = <0x00>; + maxim,linkrx-rate = <0x06 0x06 0x06 0x06>; + maxim,link-mode = "GMSL2"; + pdb-gpio = <0x1f 0x14 0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + csi-link { + + ports { + + port@0 { + clock-lanes = <0x00>; + data-lanes = <0x01 0x02 0x03 0x04>; + + endpoint { + remote-endpoint = <0x20>; + phandle = <0x71>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x21>; + phandle = <0x2d>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x22>; + phandle = <0x2e>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x23>; + phandle = <0x2f>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x24>; + phandle = <0x30>; + }; + }; + }; + }; + + max96712@2a { + compatible = "bst,maxim-deser-hub"; + type = "max96712"; + ctl-mode = "fad-ctl"; + reg = <0x2a>; + i2c-port = <0x00>; + csi2-port = <0x00>; + lane-speed = <0x640>; + regs = <0x40>; + data-type = <0x2d>; + trigger-mode = <0x01>; + trigger-fps = <0x1e>; + trigger-rx-gpio = <0x01>; + maxim,hsync-invert = <0x00>; + maxim,vsync-invert = <0x00>; + maxim,linkrx-rate = <0x03 0x03 0x03 0x03>; + maxim,link-mode = "GMSL2"; + pdb-gpio = <0x1f 0x15 0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + csi-link { + + ports { + + port@0 { + clock-lanes = <0x00>; + data-lanes = <0x01 0x02 0x03 0x04>; + + endpoint { + remote-endpoint = <0x25>; + phandle = <0x76>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x26>; + phandle = <0x31>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x27>; + phandle = <0x32>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x28>; + phandle = <0x33>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x29>; + phandle = <0x34>; + }; + }; + }; + }; + + max96712@2e { + compatible = "bst,maxim-deser-hub"; + type = "max96712"; + ctl-mode = "fad-ctl"; + reg = <0x2e>; + lane-num = <0x02>; + i2c-port = <0x00>; + csi2-port = <0x00>; + lane-speed = <0x960>; + regs = <0x40>; + data-type = <0x2d>; + trigger-mode = <0x01>; + trigger-fps = <0x14>; + trigger-rx-gpio = <0x0a>; + trigger-tx-gpio = <0x08>; + maxim,hsync-invert = <0x00>; + maxim,vsync-invert = <0x00>; + maxim,linkrx-rate = <0x06 0x06 0x06 0x06>; + maxim,link-mode = "GMSL2"; + pdb-gpio = <0x1f 0x17 0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + csi-link { + + ports { + + port@0 { + clock-lanes = <0x00>; + data-lanes = <0x01 0x02>; + + endpoint { + remote-endpoint = <0x2a>; + phandle = <0x7b>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x2b>; + phandle = <0x35>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x2c>; + phandle = <0x36>; + }; + }; + }; + }; + + camera@70 { + reg = <0x70>; + ser-alias-id = <0x60>; + sensor-alias-id = <0x70>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x2d>; + phandle = <0x21>; + }; + }; + }; + + camera71 { + status = "disabled"; + reg = <0x71>; + ser-alias-id = <0x61>; + sensor-alias-id = <0x71>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x2e>; + phandle = <0x22>; + }; + }; + }; + + camera@72 { + status = "disabled"; + reg = <0x72>; + ser-alias-id = <0x62>; + sensor-alias-id = <0x72>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x2f>; + phandle = <0x23>; + }; + }; + }; + + camera@73 { + status = "disabled"; + reg = <0x73>; + ser-alias-id = <0x63>; + sensor-alias-id = <0x73>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x30>; + phandle = <0x24>; + }; + }; + }; + + camera@54 { + reg = <0x54>; + ser-alias-id = <0x64>; + sensor-alias-id = <0x54>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x31>; + phandle = <0x26>; + }; + }; + }; + + camera@55 { + reg = <0x55>; + ser-alias-id = <0x65>; + sensor-alias-id = <0x55>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x32>; + phandle = <0x27>; + }; + }; + }; + + camera@56 { + reg = <0x56>; + ser-alias-id = <0x66>; + sensor-alias-id = <0x56>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x33>; + phandle = <0x28>; + }; + }; + }; + + camera@57 { + reg = <0x57>; + ser-alias-id = <0x67>; + sensor-alias-id = <0x57>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x34>; + phandle = <0x29>; + }; + }; + }; + + camera@58 { + reg = <0x58>; + ser-alias-id = <0x48>; + sensor-alias-id = <0x58>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x35>; + phandle = <0x2b>; + }; + }; + }; + + camera@59 { + status = "disabled"; + reg = <0x59>; + ser-alias-id = <0x49>; + sensor-alias-id = <0x59>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x36>; + phandle = <0x2c>; + }; + }; + }; + }; + + i2c@20003000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20003000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd2 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4c 0x05 0x4a>; + clock-names = "LSP1_PCLK\0LSP1_WCLK"; + resets = <0x06 0x2c>; + reset-names = "i2c3_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x37>; + }; + + i2c@20004000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20004000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd3 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4c 0x05 0x4a>; + clock-names = "LSP1_PCLK\0LSP1_WCLK"; + resets = <0x06 0x2d>; + reset-names = "i2c4_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x38>; + + lt9211@2d { + compatible = "bst,lt9211"; + reg = <0x2d>; + }; + }; + + i2c@20005000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20005000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd4 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4c 0x05 0x4a>; + clock-names = "LSP1_PCLK\0LSP1_WCLK"; + resets = <0x06 0x26>; + reset-names = "i2c5_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x39>; + }; + + ddr_ecc { + status = "okay"; + compatible = "bst,a1000_ddr_ecc"; + reg = <0x00 0x38000000 0x1400 0x00 0x3c000000 0x1400 0x00 0x33000000 0x140>; + reg-names = "ddr0\0ddr1\0a55_ctrl"; + interrupt-parent = <0x01>; + interrupts = <0x00 0x8b 0x04 0x00 0x8d 0x04>; + interrupt-names = "ddr0_ecc_irq\0ddr1_ecc_irq"; + mbox-names = "bstn-mbox"; + }; + + arm_pmu { + status = "okay"; + compatible = "arm,armv8-pmuv3"; + interrupt-parent = <0x01>; + interrupts = <0x00 0x38 0xff04 0x00 0x39 0xff04 0x00 0x3a 0xff04 0x00 0x3b 0xff04 0x00 0x3c 0xff04 0x00 0x3d 0xff04 0x00 0x3e 0xff04 0x00 0x3f 0xff04>; + interrupt-affinity = <0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41>; + }; + + noc_pmu@0x32702000 { + status = "okay"; + compatible = "bst,bst_noc_pmu"; + reg = <0x00 0x32702000 0x1000 0x00 0x32703000 0x1000 0x00 0x32704000 0x2000 0x00 0x32708000 0x1000 0x00 0x33402000 0x2400 0x00 0x33422000 0x4400 0x00 0x33401100 0x10 0x00 0x33421480 0x10>; + reg-names = "coresight_cpunoc_etf\0coresight_etr\0coresight_funnel\0coresight_corenoc_etf\0cpu_port_set\0core_port_set\0cpunoc_atb\0corenoc_atb"; + memory-region = <0x42>; + }; + + lsp0_pwm0@20012000 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x56 0x05 0x6b>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20012000 0x14 0x00 0x200120b0 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x43>; + }; + + lsp0_pwm1@20012014 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x57 0x05 0x6b>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20012014 0x14 0x00 0x200120b4 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x44>; + }; + + lsp1_pwm0@20013000 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x71 0x05 0x7a>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20013000 0x14 0x00 0x200130b0 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x45>; + }; + + lsp1_pwm1@20013014 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x72 0x05 0x7a>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20013014 0x14 0x00 0x200130b4 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x46>; + }; + + a55_timer0@32008000 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4b 0x04>; + reg = <0x00 0x32008000 0x14>; + }; + + a55_timer1@32008014 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4c 0x04>; + reg = <0x00 0x32008014 0x14>; + }; + + a55_timer2@32008028 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4d 0x04>; + reg = <0x00 0x32008028 0x14>; + }; + + a55_timer3@3200803c { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4e 0x04>; + reg = <0x00 0x3200803c 0x14>; + }; + + a55_timer4@32008050 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4f 0x04>; + reg = <0x00 0x32008050 0x14>; + }; + + a55_timer5@32008064 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x50 0x04>; + reg = <0x00 0x32008064 0x14>; + }; + + a55_timer6@32008078 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x51 0x04>; + reg = <0x00 0x32008078 0x14>; + }; + + a55_timer7@3200808c { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x52 0x04>; + reg = <0x00 0x3200808c 0x14>; + }; + + spi@2000c000 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000c000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdb 0x04>; + clocks = <0x05 0x58 0x05 0x68>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x00>; + cs-gpios = <0x47 0x02 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x48>; + }; + + spi@2000d000 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000d000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdc 0x04>; + clocks = <0x05 0x73 0x05 0x80>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x01>; + cs-gpios = <0x47 0x06 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x49>; + }; + + spi@2000c800 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000c800 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xf4 0x04>; + clocks = <0x05 0x58 0x05 0x68>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x02>; + cs-gpios = <0x4a 0x08 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4b 0x4c>; + }; + + spi@2000d800 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000d800 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xf5 0x04>; + clocks = <0x05 0x73 0x05 0x80>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x03>; + cs-gpios = <0x4a 0x10 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4d 0x4e>; + }; + + spi@20022000 { + status = "okay"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x20022000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xe2 0x04>; + clocks = <0x05 0x58 0x05 0x68>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x04>; + cs-gpios = <0x47 0x02 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4f>; + spi-slave; + + slave@0 { + compatible = "rohm,dh2228fv"; + reg = <0x00>; + spi-max-frequency = <0x989680>; + }; + }; + + spi@20023000 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x20023000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xe1 0x04>; + clocks = <0x05 0x73 0x05 0x80>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x05>; + cs-gpios = <0x47 0x06 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x50>; + }; + + i2s-play@2000e000 { + status = "disable"; + compatible = "snps,designware-i2s"; + reg = <0x00 0x2000e000 0x1000>; + interrupt-names = "play_irq"; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdd 0x04>; + clocks = <0x05 0x61 0x05 0x59>; + clock-names = "i2spclk\0i2sclk"; + play; + channel = <0x02>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x51>; + }; + + i2s-rec@2000f000 { + status = "disable"; + compatible = "snps,designware-i2s"; + reg = <0x00 0x2000f000 0x1000>; + interrupt-names = "record_irq"; + interrupt-parent = <0x01>; + interrupts = <0x00 0xde 0x04>; + clocks = <0x02>; + record; + channel = <0x02>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x52>; + }; + + qspi@00000000 { + status = "okay"; + compatible = "snps,dwc-ssi-1.01a"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x00 0x4000000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd9 0x04>; + clocks = <0x05 0x4d 0x05 0x4e>; + clock-names = "hclk\0wclk"; + work-mode = <0x01>; + reg-io-width = <0x04>; + bst,use-gpio-cs; + spi-rx-bus-width = <0x04>; + spi-tx-bus-width = <0x04>; + cs-gpios = <0x47 0x15 0x00>; + num-cs = <0x01>; + bus-num = <0x06>; + pinctrl-names = "default"; + pinctrl-0 = <0x53>; + + qspi0-nor0@0 { + #address-cells = <0x01>; + #size-cells = <0x01>; + spi-rx-bus-width = <0x01>; + spi-tx-bus-width = <0x01>; + compatible = "jedec,spi-nor"; + status = "okay"; + spi-max-frequency = <0xf4240>; + reg = <0x00>; + mode = <0x00>; + powerctl-fada-gpios = <0x1f 0x1b 0x00>; + powerctl-fadb-gpios = <0x1f 0x1c 0x00>; + + partition@0 { + reg = <0x00 0x1e00000>; + label = "nor0_part0"; + }; + + partition@1e00000 { + reg = <0x1e00000 0x200000>; + label = "nor0_part1"; + }; + }; + }; + + qspi@14000000 { + status = "disable"; + compatible = "snps,dwc-ssi-1.01a"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x14000000 0x4000000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xda 0x04>; + clocks = <0x05 0x4f 0x05 0x50>; + clock-names = "hclk\0wclk"; + work-mode = <0x01>; + reg-io-width = <0x04>; + bst,use-gpio-cs; + spi-rx-bus-width = <0x04>; + spi-tx-bus-width = <0x04>; + cs-gpios = <0x54 0x01 0x00>; + num-cs = <0x01>; + bus-num = <0x07>; + pinctrl-names = "default"; + pinctrl-0 = <0x55>; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x0f>; + snps,rd_osr_lmt = <0x0f>; + snps,axi_fb; + snps,blen = <0x04 0x08 0x10 0x00 0x00 0x00 0x00>; + phandle = <0x56>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x04>; + snps,rx-sched-sp; + phandle = <0x57>; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x00>; + snps,priority = <0x00>; + }; + + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x01>; + snps,priority = <0x01>; + }; + + queue2 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x02>; + snps,priority = <0x02>; + }; + + queue3 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x03>; + snps,priority = <0x03>; + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x04>; + snps,tx-sched-wrr; + phandle = <0x58>; + + queue0 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x00>; + }; + + queue1 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x01>; + }; + + queue2 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x02>; + }; + + queue3 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x03>; + }; + }; + + thermal@70039000 { + status = "okay"; + compatible = "bst,bst-thermal"; + reg = <0x00 0x70039000 0x1000>; + #thermal-sensor-cells = <0x00>; + phandle = <0x61>; + }; + + ethernet@30000000 { + status = "okay"; + compatible = "bst,dw-eqos-eth"; + reg = <0x00 0x30000000 0x100000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9f 0xff04 0x00 0xa0 0xff04 0x00 0xa1 0xff04 0x00 0xa2 0xff04 0x00 0xa3 0xff04 0x00 0xa4 0xff04 0x00 0xa5 0xff04 0x00 0xa6 0xff04 0x00 0xa7 0xff04 0x00 0xa8 0xff04 0x00 0xa9 0xff04 0x00 0xaa 0xff04>; + interrupt-names = "sbd_irq\0sfty_ce_irq\0sfty_ue_irq\0tx_chan0_irq\0tx_chan1_irq\0tx_chan2_irq\0tx_chan3_irq\0rx_chan0_irq\0rx_chan1_irq\0rx_chan2_irq\0rx_chan3_irq\0eth_lpi"; + ethernet-id = <0x00>; + mac-address = [00 00 00 00 00 00]; + max-frame-size = <0xed8>; + phy-mode = "rgmii"; + snps,multicast-filter-bins = <0x100>; + snps,perfect-filter-entries = <0x80>; + rx-fifo-depth = <0x4000>; + tx-fifo-depth = <0x4000>; + clocks = <0x05 0x0f 0x05 0x13 0x05 0x15 0x05 0x11>; + clock-names = "wclk\0axim_aclk\0pclk\0ptp_ref"; + bst,fix-safety = <0x00>; + bst,dma_int_mode = <0x01>; + snps,fixed-burst; + snps,force_sf_dma_mode; + snps,ps-speed = <0x3e8>; + snps,axi-config = <0x56>; + snps,mtl-rx-config = <0x57>; + snps,mtl-tx-config = <0x58>; + label = "gmac0"; + resets = <0x06 0x11>; + reset-names = "bstgmaceth"; + eth-name = "gmac0"; + eth-number = <0x00>; + mac-mode = "rgmii"; + extend-op = <0x02>; + pinctrl-names = "default"; + pinctrl-0 = <0x59>; + + fixed-link { + speed = <0x3e8>; + full-duplex; + }; + }; + + ethernet@30100000 { + status = "okay"; + compatible = "bst,dw-eqos-eth"; + reg = <0x00 0x30100000 0x100000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xab 0xff04 0x00 0xac 0xff04 0x00 0xad 0xff04 0x00 0xae 0xff04 0x00 0xaf 0xff04 0x00 0xb0 0xff04 0x00 0xb1 0xff04 0x00 0xb2 0xff04 0x00 0xb3 0xff04 0x00 0xb4 0xff04 0x00 0xb5 0xff04 0x00 0xb6 0xff04>; + interrupt-names = "sbd_irq\0sfty_ce_irq\0sfty_ue_irq\0tx_chan0_irq\0tx_chan1_irq\0tx_chan2_irq\0tx_chan3_irq\0rx_chan0_irq\0rx_chan1_irq\0rx_chan2_irq\0rx_chan3_irq\0eth_lpi"; + ethernet-id = <0x01>; + mac-address = [00 00 00 00 00 00]; + max-frame-size = <0xed8>; + phy-mode = "rgmii"; + snps,multicast-filter-bins = <0x100>; + snps,perfect-filter-entries = <0x80>; + rx-fifo-depth = <0x4000>; + tx-fifo-depth = <0x4000>; + clocks = <0x05 0x10 0x05 0x14 0x05 0x16 0x05 0x12>; + clock-names = "wclk\0axim_aclk\0pclk\0ptp_ref"; + bst,fix-safety = <0x00>; + bst,dma_int_mode = <0x01>; + snps,fixed-burst; + snps,force_sf_dma_mode; + snps,ps-speed = <0x3e8>; + snps,axi-config = <0x56>; + snps,mtl-rx-config = <0x57>; + snps,mtl-tx-config = <0x58>; + label = "gmac1"; + resets = <0x06 0x12>; + reset-names = "bstgmaceth"; + pinctrl-names = "default"; + pinctrl-0 = <0x5a>; + extend-op = <0x02>; + eth-name = "gmac1"; + eth-number = <0x01>; + mac-mode = "rgmii"; + phy-handle = <0x5b>; + + mdio1 { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + eth_phy1@1 { + compatible = "marvell,88Q2112\0ethernet-phy-id002B.0983\0ethernet-phy-ieee802.3-c45"; + device_type = "ethernet-phy"; + max-speed = <0x3e8>; + reg = <0x07>; + reset-gpios = <0x1f 0x09 0x01>; + reset-active-low; + reset-assert-us = <0x4e20>; + reset-deassert-us = <0x4e20>; + phandle = <0x5b>; + }; + }; + }; + + phy@30E01000 { + compatible = "bst,dwc-usb-phy"; + #phy-cells = <0x00>; + reg = <0x00 0x30e01000 0x1000>; + usb_mode = "usb20"; + phandle = <0x5e>; + }; + + phy@30E00000 { + compatible = "bst,dwc-usb-phy"; + reg = <0x00 0x30e00000 0x1000>; + #phy-cells = <0x00>; + usb_mode = "usb30"; + pll_type = "internal"; + phandle = <0x5c>; + }; + + usb3 { + compatible = "bst,dwc3usb"; + status = "okay"; + ranges; + #address-cells = <0x02>; + #size-cells = <0x01>; + clock-names = "suspend\0ref\0axi\0apb"; + clocks = <0x05 0x17 0x05 0x18 0x05 0x19 0x05 0x1a>; + resets = <0x06 0x04>; + reset-names = "usb3_reset"; + phys = <0x5c>; + phy-names = "usb-phy"; + pll_type = "internal"; + powerctl-gpios = <0x1f 0x0e 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x5d>; + + dwc3@30200000 { + compatible = "snps,dwc3"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + reg = <0x00 0x30200000 0x100000>; + interrupts = <0x00 0xc8 0x04>; + interrupt-parent = <0x01>; + dr_mode = "host"; + snps,dis_u3_susphy_quirk; + }; + }; + + usb2 { + compatible = "bst,dwc3usb"; + status = "okay"; + ranges; + #address-cells = <0x02>; + #size-cells = <0x01>; + clock-names = "ahb\0ref\0apb"; + clocks = <0x05 0x1b 0x05 0x1d 0x05 0x1c>; + reset-names = "usb2_reset"; + resets = <0x06 0x05>; + phys = <0x5e>; + phy-names = "usb-phy"; + pll_type = "internal"; + + dwc3@30300000 { + status = "okay"; + compatible = "snps,dwc3"; + reg = <0x00 0x30300000 0x100000>; + interrupts = <0x00 0xc9 0x04>; + interrupt-parent = <0x01>; + dr_mode = "peripheral"; + snps,incr-burst-type-adjustment = <0x01 0x04 0x08 0x10>; + snps,reqinfo-for-data-read = <0x08>; + snps,reqinfo-for-descriptor-read = <0x08>; + }; + }; + + dwmmc0@30400000 { + status = "okay"; + compatible = "bst,dwcmshc-sdhci"; + clocks = <0x05 0x1f 0x05 0x1e>; + clock-names = "core\0bus"; + reg = <0x00 0x30400000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xb9 0x04>; + interrupt-names = "IRQDWMMC0"; + #address-cells = <0x01>; + #size-cells = <0x00>; + data-addr = <0x200>; + fifo-watermark-aligned; + clock-frequency = <0x2faf080>; + max-frequency = <0xbebc200>; + min-frequency = <0x61a80>; + broken-64bit-dma; + clear-tarns-mode; + fifo-depth = <0x400>; + card-detect-delay = <0xc8>; + bus-width = <0x08>; + cap-mmc-highspeed; + non-removable; + no-sdio; + no-sd; + keep-power-in-suspend; + no-3-3-v; + sdhci,auto-cmd12; + pinctrl-names = "default"; + pinctrl-0 = <0x5f>; + }; + + dwmmc1@30500000 { + status = "okay"; + compatible = "bst,dwcmshc-sdhci"; + clocks = <0x05 0x21 0x05 0x20>; + clock-names = "core\0bus"; + reg = <0x00 0x30500000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xbd 0x04>; + interrupt-names = "IRQDWMMC1"; + #address-cells = <0x01>; + #size-cells = <0x00>; + data-addr = <0x200>; + fifo-watermark-aligned; + clock-frequency = <0x5f5e100>; + max-frequency = <0xbebc200>; + min-frequency = <0x61a80>; + broken-64bit-dma; + clear-tarns-mode; + fifo-depth = <0x400>; + card-detect-delay = <0xc8>; + bus-width = <0x04>; + cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + no-sdio; + no-mmc; + sdhci,auto-cmd12; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <0x60>; + }; + + gpu@33300000 { + status = "okay"; + compatible = "arm,mali-450\0arm,mali-utgard"; + reg = <0x00 0x33300000 0x30000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x81 0x04 0x00 0x82 0x04 0x00 0x83 0x04 0x00 0x84 0x04 0x00 0x85 0x04 0x00 0x86 0x04 0x00 0x87 0x04 0x00 0x88 0x04>; + interrupt-names = "IRQPP0\0IRQPPMMU0\0IRQPP1\0IRQPPMMU1\0IRQGP\0IRQGPMMU\0IRQPMU\0IRQPP"; + clocks = <0x05 0x31 0x05 0x32>; + clock-names = "clk_mali\0clk_mali_apb"; + resets = <0x06 0x0b>; + reset-names = "gpu_reset"; + ppcores = <0x02>; + dedicated_mem_start = <0x00>; + dedicated_mem_size = <0x00>; + }; + + mali-v500@0x55000000 { + status = "okay"; + compatible = "arm,mali-v500"; + reg = <0x00 0x55000000 0xffff>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9a 0x04>; + interrupt-names = "IRQV500"; + resets = <0x06 0x00>; + reset-names = "codec_reset"; + clocks = <0x05 0x3d>; + clock-names = "clk_v500"; + }; + }; + + cooling_dev { + + pwm { + cpumask = <0x0f>; + capacitance = <0x5dc>; + #cooling-cells = <0x02>; + phandle = <0x63>; + }; + }; + + thermal-zones { + + cpu-thermal { + polling-delay-passive = <0x1f4>; + polling-delay = <0x3e8>; + thermal-sensors = <0x61>; + + trips { + + switch_trip { + temperature = <0x15f90>; + hysteresis = <0x7d0>; + type = "passive"; + phandle = <0x62>; + }; + + critical_trip { + temperature = <0x1e848>; + hysteresis = <0x00>; + type = "critical"; + }; + }; + + cooling-maps { + + map0 { + trip = <0x62>; + cooling-device = <0x63 0x00 0x01>; + }; + }; + }; + }; + + pinctrl@70038000 { + status = "okay"; + compatible = "bst,pinctrl-a1000b"; + #address-cells = <0x02>; + #size-cells = <0x02>; + reg = <0x00 0x70038000 0x00 0x1000 0x00 0x33001000 0x00 0x1000>; + reg-names = "aon\0top"; + #gpio-cells = <0x02>; + + spi0_pinctrl { + phandle = <0x48>; + + mux { + pins = "spi0_miso\0spi0_mosi\0spi0_sclk"; + function = "spi0"; + }; + }; + + spi1_pinctrl { + phandle = <0x49>; + + mux { + pins = "spi1_miso\0spi1_mosi\0spi1_sclk"; + function = "spi1"; + }; + }; + + spi2_pinctrl { + phandle = <0x4b>; + + mux { + pins = "uart0_cts\0uart1_cts\0uart1_rts"; + function = "spi2"; + }; + }; + + spi2_cs_pinctrl { + phandle = <0x4c>; + + mux { + pins = "uart0_rts"; + function = "gpio"; + }; + }; + + spi3_pinctrl { + phandle = <0x4d>; + + mux { + pins = "uart2_cts\0uart3_cts\0uart3_rts"; + function = "spi3"; + }; + }; + + spi3_cs_pinctrl { + phandle = <0x4e>; + + mux { + pins = "uart2_rts"; + function = "gpio"; + }; + }; + + spi4_pinctrl { + phandle = <0x4f>; + + mux { + pins = "spi0_miso\0spi0_mosi\0spi0_sclk\0spi0_cs"; + function = "spi0_s"; + }; + }; + + spi5_pinctrl { + phandle = <0x50>; + + mux { + pins = "spi1_miso\0spi1_mosi\0spi1_sclk"; + function = "spi1_s"; + }; + }; + + i2c0_pinctrl { + phandle = <0x1c>; + + mux { + pins = "i2c0_scl\0i2c0_sda"; + function = "i2c0"; + }; + }; + + i2c1_pinctrl { + phandle = <0x1d>; + + mux { + pins = "i2c1_scl\0i2c1_sda"; + function = "i2c1"; + }; + }; + + i2c2_pinctrl { + phandle = <0x1e>; + + mux { + pins = "i2c2_scl\0i2c2_sda"; + function = "i2c2"; + }; + }; + + i2c3_pinctrl { + phandle = <0x37>; + + mux { + pins = "i2c3_scl\0i2c3_sda"; + function = "i2c3"; + }; + }; + + i2c4_pinctrl { + phandle = <0x38>; + + mux { + pins = "i2c4_scl\0i2c4_sda"; + function = "i2c4"; + }; + }; + + i2c5_pinctrl { + phandle = <0x39>; + + mux { + pins = "i2c5_scl\0i2c5_sda"; + function = "i2c5"; + }; + }; + + uart0_pinctrl { + phandle = <0x07>; + + mux { + pins = "uart0_txd\0uart0_rxd"; + function = "uart0"; + }; + }; + + uart1_pinctrl { + phandle = <0x08>; + + mux { + pins = "uart1_txd\0uart1_rxd"; + function = "uart1"; + }; + }; + + uart2_pinctrl { + phandle = <0x09>; + + mux { + pins = "uart2_txd\0uart2_rxd"; + function = "uart2"; + }; + }; + + uart3_pinctrl { + phandle = <0x0a>; + + mux { + pins = "uart3_txd\0uart3_rxd"; + function = "uart3"; + }; + }; + + gpio0_pinctrl { + + mux { + pins = "gpio_29"; + function = "gpio"; + }; + }; + + gpio_special_func_pinctrl { + + mux { + pins = "gpio_24\0gpio_29\0debug4\0debug5\0uart0_cts\0uart0_rts"; + function = "gpio"; + }; + }; + + qspi0_pinctrl { + phandle = <0x53>; + + mux { + pins = "qspi0_cs0"; + function = "gpio"; + }; + }; + + usb3_pinctrl { + phandle = <0x5d>; + + mux { + pins = "gpio_14"; + function = "gpio"; + }; + }; + + qspi1_pinctrl { + phandle = <0x55>; + + mux { + pins = "qspi1_cs1"; + function = "gpio"; + }; + }; + + des_960_1_pinctrl { + + mux { + pins = "qspi1_io1"; + function = "gpio"; + }; + }; + + des_960_2_pinctrl { + + mux { + pins = "qspi1_io3"; + function = "gpio"; + }; + }; + + des_960_3_pinctrl { + + mux { + pins = "qspi1_io5"; + function = "gpio"; + }; + }; + + bist_pinctrl { + + mux { + pins = "spi1_mosi"; + function = "bist"; + }; + }; + + + + + + i2s0_pinctrl { + phandle = <0x51>; + + mux { + pins = "i2s0_ck\0i2s0_mck\0i2s0_sd_out\0i2s0_ws\0qspi0_io4"; + function = "i2s0"; + }; + }; + + i2s1_pinctrl { + phandle = <0x52>; + + mux { + pins = "i2s1_ck\0i2s1_sd_in\0i2s1_ws"; + function = "i2s1"; + }; + }; + + isp_pinctrl { + phandle = <0x66>; + + mux { + pins = "isp_fsync0\0isp_fsync1\0isp_fsync2\0isp_fsync3"; + function = "isp"; + }; + }; + + ptp_pinctrl { + + mux { + pins = "ptp_pps0\0ptp_pps1\0ptp_clk"; + function = "ptp"; + }; + }; + + ptp_pinconfig { + + config { + pins = "ptp_clk"; + drive-strength = <0x02>; + input-enable; + }; + }; + + err_rpt_l0_pinctrl { + + mux { + pins = "err_rpt_l0_n\0err_rpt_l0_p"; + function = "err_rpt_l0"; + }; + }; + + err_rpt_gpio_l0_pinctrl { + + mux { + pins = "err_rpt_l0_n\0err_rpt_l0_p"; + function = "gpio"; + }; + }; + + err_rpt_l1_pinctrl { + + mux { + pins = "err_rpt_l1_n\0err_rpt_l1_p"; + function = "err_rpt_l1"; + }; + }; + + pwm_lsp0_pwm0_pinctrl { + phandle = <0x43>; + + mux { + pins = "pwm0"; + function = "pwm"; + }; + }; + + pwm_lsp0_pwm1_pinctrl { + phandle = <0x44>; + + mux { + pins = "pwm1"; + function = "pwm"; + }; + }; + + pwm_lsp1_pwm0_pinctrl { + phandle = <0x45>; + + mux { + pins = "pwm2"; + function = "pwm"; + }; + }; + + pwm_lsp1_pwm1_pinctrl { + phandle = <0x46>; + + mux { + pins = "pwm3"; + function = "pwm"; + }; + }; + + ts_pinctrl { + + mux { + pins = "ts_trig_in00\0ts_trig_in01\0ts_trig_in10\0ts_trig_in11"; + function = "ts"; + }; + }; + + sdemmc0_pinctrl { + phandle = <0x15>; + + mux { + pins = "sdemmc0_clk\0sdemmc0_cmd\0sdemmc0_dat0\0sdemmc0_dat1\0sdemmc0_dat2\0sdemmc0_dat3\0sdemmc0_dat4\0sdemmc0_dat5\0sdemmc0_dat6\0sdemmc0_dat7\0sdemmc0_rstb\0sdemmc0_cdn\0sdemmc0_wp"; + function = "sdemmc0"; + }; + }; + + sdemmc0_pinconfig { + phandle = <0x5f>; + + config { + pins = "sdemmc0_clk\0sdemmc0_cmd\0sdemmc0_dat0\0sdemmc0_dat1\0sdemmc0_dat2\0sdemmc0_dat3\0sdemmc0_dat4\0sdemmc0_dat5\0sdemmc0_dat6\0sdemmc0_dat7\0sdemmc0_rstb\0sdemmc0_cdn\0sdemmc0_wp"; + drive-strength = <0x02>; + input-enable; + }; + }; + + sdemmc1_pinctrl { + phandle = <0x16>; + + mux { + pins = "sdemmc1_clk\0sdemmc1_cmd\0sdemmc1_dat0\0sdemmc1_dat1\0sdemmc1_dat2\0sdemmc1_dat3\0sdemmc1_dat4\0sdemmc1_dat5\0sdemmc1_dat6\0sdemmc1_dat7\0sdemmc1_rstb\0sdemmc1_cdn\0sdemmc1_wp"; + function = "sdemmc1"; + }; + }; + + sdemmc1_pinconfig { + phandle = <0x60>; + + config { + pins = "sdemmc1_clk\0sdemmc1_cmd\0sdemmc1_dat0\0sdemmc1_dat1\0sdemmc1_dat2\0sdemmc1_dat3\0sdemmc1_dat4\0sdemmc1_dat5\0sdemmc1_dat6\0sdemmc1_dat7\0sdemmc1_rstb\0sdemmc1_cdn\0sdemmc1_wp"; + drive-strength = <0x0f>; + input-enable; + }; + }; + + debug_pinctrl { + phandle = <0x17>; + + mux { + pins = "debug0\0debug1\0debug2\0debug3\0debug4\0debug5\0debug6\0debug7"; + function = "debug"; + }; + }; + + strap_pinctrl { + + mux { + pins = "gpio_24\0gpio_25\0gpio_26\0gpio_27\0gpio_28\0gpio_29\0spi1_sclk\0i2s0_mck\0i2s0_ck\0gpio_107\0gpio_108"; + function = "strap"; + }; + }; + + vout_pinctrl { + phandle = <0x18>; + + mux { + pins = "vout_r0\0vout_r1\0vout_r2\0vout_r3\0vout_r4\0vout_r5\0vout_r6\0vout_r7\0vout_g0\0vout_g1\0vout_g2\0vout_g3\0vout_g4\0vout_g5\0vout_g6\0vout_g7\0vout_b0\0vout_b1\0vout_b2\0vout_b3\0vout_b4\0vout_b5\0vout_b6\0vout_b7\0vout_hs\0vout_vs\0vout_de\0vout_pclk\0vout_pdb"; + function = "vout"; + }; + }; + + vout_pinconfig { + + config { + pins = "vout_r0\0vout_r1\0vout_r2\0vout_r3\0vout_r4\0vout_r5\0vout_r6\0vout_r7\0vout_g0\0vout_g1\0vout_g2\0vout_g3\0vout_g4\0vout_g5\0vout_g6\0vout_g7\0vout_b0\0vout_b1\0vout_b2\0vout_b3\0vout_b4\0vout_b5\0vout_b6\0vout_b7\0vout_hs\0vout_vs\0vout_de\0vout_pclk\0vout_pdb"; + drive-strength = <0x02>; + input-enable; + }; + }; + + vin_pinctrl { + phandle = <0x19>; + + mux { + pins = "vin_b0\0vin_b1\0vin_b2\0vin_b3\0vin_b4\0vin_de\0vin_g0\0vin_g1\0vin_g2\0vin_g3\0vin_g4\0vin_g5\0vin_hs\0vin_llc\0vin_r0\0vin_r1\0vin_r2\0vin_r3\0vin_r4\0vin_vs"; + function = "vin"; + }; + }; + + vin_pinconfig { + + config { + pins = "vin_b0\0vin_b1\0vin_b2\0vin_b3\0vin_b4\0vin_de\0vin_g0\0vin_g1\0vin_g2\0vin_g3\0vin_g4\0vin_g5\0vin_hs\0vin_llc\0vin_r0\0vin_r1\0vin_r2\0vin_r3\0vin_r4\0vin_vs"; + drive-strength = <0x02>; + input-enable; + }; + }; + + rgmii0_pinctrl { + phandle = <0x59>; + + mux { + pins = "rgmii0_txd0\0rgmii0_txd1\0rgmii0_txd2\0rgmii0_txd3\0gmii0_txd4\0gmii0_txd5\0gmii0_txd6\0gmii0_txd7\0gmii0_txer\0rgmii0_txctrl\0mii0_txclk\0rgmii0_gtxclk\0rgmii0_rxd0\0rgmii0_rxd1\0rgmii0_rxd2\0rgmii0_rxd3\0gmii0_rxd4\0gmii0_rxd5\0gmii0_rxd6\0gmii0_rxd7\0gmii0_rxer\0rgmii0_rxctrl\0rgmii0_rxclk\0rgmii0_mdio\0rgmii0_mdc\0rgmii0_intr"; + function = "rgmii0"; + }; + }; + + rgmii0_pinconfig { + + config { + pins = "rgmii0_gtxclk\0rgmii0_mdc\0rgmii0_mdio\0rgmii0_rxclk\0rgmii0_rxctrl\0rgmii0_rxd0\0rgmii0_rxd1\0rgmii0_rxd2\0rgmii0_rxd3\0rgmii0_txctrl\0rgmii0_txd0\0rgmii0_txd1\0rgmii0_txd2\0rgmii0_txd3"; + drive-strength = <0x02>; + input-enable; + }; + }; + + rgmii1_pinctrl { + phandle = <0x5a>; + + mux { + pins = "rgmii1_txd0\0rgmii1_txd1\0rgmii1_txd2\0rgmii1_txd3\0mii1_rxer\0mii1_txclk\0rgmii1_txctrl\0rgmii1_gtxclk\0rgmii1_rxd0\0rgmii1_rxd1\0rgmii1_rxd2\0rgmii1_rxd3\0rgmii1_rxctrl\0rgmii1_rxclk\0rgmii1_mdc\0rgmii1_mdio\0rgmii1_intr"; + function = "rgmii1"; + }; + }; + + rgmii1_pinconfig { + + config { + pins = "rgmii1_gtxclk\0rgmii1_mdc\0rgmii1_mdio\0rgmii1_rxclk\0rgmii1_rxctrl\0rgmii1_rxd0\0rgmii1_rxd1\0rgmii1_rxd2\0rgmii1_rxd3\0rgmii1_txctrl\0rgmii1_txd0\0rgmii1_txd1\0rgmii1_txd2\0rgmii1_txd3"; + drive-strength = <0x02>; + input-enable; + }; + }; + + gmii0_pinconfig { + + config { + pins = "gmii0_rxd4\0gmii0_rxd5\0gmii0_rxd6\0gmii0_rxd7\0gmii0_rxer\0gmii0_txd4\0gmii0_txd5\0gmii0_txd6\0gmii0_txd7\0gmii0_txer"; + drive-strength = <0x02>; + input-enable; + }; + }; + + ssd_pinctrl { + + mux { + pins = "sdemmc0_led_ctl\0sdemmc1_led_ctl\0gpio_26\0gpio_27"; + function = "gpio"; + }; + }; + + gnss_pinctrl { + + mux { + pins = "gpio_31\0gpio_12\0pwm1"; + function = "gpio"; + }; + }; + + fan_pinctrl { + phandle = <0x1a>; + + mux { + pins = "gpio_27\0gpio_28"; + function = "gpio"; + }; + }; + + + + + board_special_func_pinctrl { + phandle = <0x1b>; + + mux { + pins = "vout_pdb\0gpio_31"; + function = "gpio"; + }; + }; + }; + + isp { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,a1000b-isp"; + memory-region = <0x64 0x65>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x06>; + isp-fw-fbuf-addr = <0xa2000000>; + isp-fw-fbuf-size = <0x10000000>; + dma-coherent; + pinctrl-names = "default"; + pinctrl-0 = <0x66>; + + core@0 { + id = <0x00>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x67>; + phandle = <0x72>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x68>; + phandle = <0x73>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x69>; + phandle = <0x74>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x6a>; + phandle = <0x75>; + }; + }; + }; + }; + + core@1 { + id = <0x01>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@4 { + remote-endpoint = <0x6b>; + phandle = <0x77>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@5 { + remote-endpoint = <0x6c>; + phandle = <0x78>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@6 { + remote-endpoint = <0x6d>; + phandle = <0x79>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@7 { + remote-endpoint = <0x6e>; + phandle = <0x7a>; + }; + }; + }; + }; + + core@2 { + id = <0x02>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@8 { + remote-endpoint = <0x6f>; + phandle = <0x7c>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@9 { + remote-endpoint = <0x70>; + phandle = <0x7d>; + }; + }; + }; + }; + }; + + csi@0 { + compatible = "bst,a1000b_csi2"; + #address-cells = <0x01>; + #size-cells = <0x00>; + clock-lanes = <0x00>; + data-lanes = <0x01 0x02>; + lane-speed = <0x960>; + id = <0x00>; + resets = <0x06 0x0d>; + reset-names = "csi0_reset"; + + csi-link { + + ports { + + port@0 { + + endpoint@0 { + remote-endpoint = <0x71>; + phandle = <0x20>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x72>; + phandle = <0x67>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x73>; + phandle = <0x68>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x74>; + phandle = <0x69>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x75>; + phandle = <0x6a>; + }; + }; + }; + }; + + csi@1 { + compatible = "bst,a1000b_csi2"; + #address-cells = <0x01>; + #size-cells = <0x00>; + clock-lanes = <0x00>; + data-lanes = <0x01 0x02 0x03 0x04>; + lane-speed = <0x640>; + id = <0x01>; + resets = <0x06 0x0e>; + reset-names = "csi1_reset"; + + csi-link { + + ports { + + port@0 { + + endpoint@0 { + remote-endpoint = <0x76>; + phandle = <0x25>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x77>; + phandle = <0x6b>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x78>; + phandle = <0x6c>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x79>; + phandle = <0x6d>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x7a>; + phandle = <0x6e>; + }; + }; + }; + }; + + csi@3 { + compatible = "bst,a1000b-csi2-2x2"; + #address-cells = <0x01>; + #size-cells = <0x00>; + clock-lanes = <0x00>; + data-lanes = <0x01 0x02>; + lane-speed = <0x960>; + resets = <0x06 0x10>; + reset-names = "csi2_reset"; + id = <0x03>; + + csi-link { + + ports { + + port@0 { + + endpoint@0 { + remote-endpoint = <0x7b>; + phandle = <0x2a>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x7c>; + phandle = <0x6f>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x7d>; + phandle = <0x70>; + }; + }; + }; + }; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0x20008000 console=ttyS0,115200n8 memreserve=64M@0xf8000000 rdinit=/sbin/init root=/dev/mmcblk0p7 rw rodata=n"; + stdout-path = "uart0"; + }; + + aliases { + uart0 = "/amba_apu/serial@20008000"; + }; + + memory@90000000 { + device_type = "memory"; + reg = <0x00 0x90000000 0x00 0x60000000>; + }; + + // memory@1b0000000 { + // device_type = "memory"; + // reg = <0x01 0xb0000000 0x00 0x40000000>; + // }; + + reserved-memory { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + pcie_ctrl@8fd00000 { + compatible = "bst,pcie-ctrl"; + reg = <0x00 0x8fd00000 0x00 0x100000>; + no-map; + phandle = <0x0c>; + }; + + bst_atf@8b000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x8b000000 0x00 0x2000000>; + no-map; + }; + + bst_tee@8fec0000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x8fec0000 0x00 0x40000>; + no-map; + phandle = <0x81>; + }; + + bstn_cma@8ff00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x8ff00000 0x00 0x100000>; + no-map; + phandle = <0x7e>; + }; + + bstn@90000000 { + compatible = "bst,bstn"; + reg = <0x00 0x90000000 0x00 0x2000000>; + no-map; + }; + + bst_lwnn@92000000 { + compatible = "bst,bst_lwnn"; + reg = <0x00 0x92000000 0x00 0x2000000>; + no-map; + }; + + bst_lwnn@94000000 { + compatible = "bst,bst_lwnn"; + reg = <0x00 0x94000000 0x00 0x2000000>; + no-map; + }; + + bst_cv@96000000 { + compatible = "bst,bst_cv"; + reg = <0x00 0x96000000 0x00 0x4000000>; + no-map; + }; + + bst_cv_cma@9a000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9a000000 0x00 0x2000000>; + align-shift = <0x08>; + no-map; + phandle = <0x7f>; + }; + + vsp@0x9c000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c000000 0x00 0x1000000>; + no-map; + phandle = <0x80>; + }; + + vsp_fw@0x9d000000 { + reg = <0x00 0x9d000000 0x00 0x4000000>; + no-map; + }; + + bst_isp@0xa1000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xa1000000 0x00 0x1000000>; + no-map; + phandle = <0x64>; + }; + + bst_isp_fw@0xa2000000 { + reg = <0x00 0xa2000000 0x00 0x10000000>; + no-map; + }; + + coreip_pub_cma@0xb2000000 { + compatible = "shared-dma-pool"; + align-shift = <0x08>; + reg = <0x00 0xb2000000 0x00 0x36000000>; + reusable; + phandle = <0x65>; + }; + + noc_pmu@0xe8000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xe8000000 0x00 0x800000>; + reusable; + phandle = <0x42>; + }; + + + ddr0@0xf0000000 { + reg = <0x00 0xf0000000 0x00 0x10000000>; + no-map; + }; + + ddr1@0x1f0000000 { + reg = <0x01 0xf0000000 0x00 0x10000000>; + no-map; + }; + }; + + mbox-poll-clients { + compatible = "bst,ipc-mbox-client"; + reg = <0xfec00020 0x08 0x52030090 0x08 0x53090008 0x08 0xfec00028 0x08>; + #mbox-cells = <0x01>; + phandle = <0x0e>; + }; + + bstn-mbox { + compatible = "bstn,bstn-mbox"; + reg = <0x00 0x33102000 0x00 0x2000 0x00 0x33100000 0x00 0x2000 0x00 0x80000000 0x00 0x04 0x00 0x80002000 0x00 0x04>; + fpga-reset = <0x01>; + memory-region = <0x7e>; + assigned-mem-size = <0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x71 0xff04 0x00 0x72 0xff04 0x00 0x73 0xff04 0x00 0x74 0xff04 0x00 0x75 0xff04 0x00 0x76 0xff04 0x00 0x77 0xff04 0x00 0x78 0xff04>; + #mbox-cells = <0x01>; + phandle = <0xea>; + }; + + bstn@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bstn-a1000b,cma"; + reg = <0x00 0x50020000 0x00 0x100 0x00 0x90000000 0x00 0x2000000>; + memory-region = <0x65>; + rmem-base = <0x00 0xb2000000>; + rmem-size = <0x00 0x36000000>; + id = <0x00>; + assigned-mem-size = <0x1000>; + bus-offset = <0x00 0x00>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x08>; + firmware = "bstn_dsp_rtos.rbf"; + }; + + bst_cv@0x51030000 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst_cv,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x96000000 0x00 0x2000000 0x00 0x98000000 0x00 0x2000000 0x00 0x92000000 0x00 0x2000000 0x00 0x94000000 0x00 0x2000000>; + memory-region = <0x7f>; + assigned-mem-size = <0x4000>; + bus-offset = <0x00 0x00>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x09>; + dsp-num = <0x04>; + ipc-register-addr = <0x8ff00000>; + + dsp@0x96000000 { + index = <0x00>; + firmware = "bst_cv_dsp_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x967ff000>; + ipc-src-core = <0x03>; + }; + + dsp@0x98000000 { + index = <0x01>; + firmware = "bst_cv_dsp1_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x987ff000>; + ipc-src-core = <0x03>; + }; + + dsp@0x92000000 { + index = <0x02>; + firmware = "bst_cv_dsp2_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x927ff000>; + ipc-src-core = <0x03>; + }; + + dsp@0x94000000 { + index = <0x03>; + firmware = "bst_cv_dsp3_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x947ff000>; + ipc-src-core = <0x03>; + }; + }; + + bst_gwarp_scaler@0x51060000 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst_gwarp_scaler,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x51050000 0x00 0x100 0x00 0x51060000 0x00 0x100>; + memory-region = <0x65>; + id = <0x00>; + bus-offset = <0x00 0x00>; + assigned-mem-size = <0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9b 0x04>; + interrupt-names = "bst_cv_irq"; + }; + + bare_cv@51030000 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bare_cv,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x96000000 0x00 0x1000000 0x00 0x98000000 0x00 0x1000000 0x00 0x97000000 0x00 0x1000000 0x00 0x99000000 0x00 0x1000000>; + memory-region = <0x7f>; + id = <0x01>; + assigned-mem-size = <0x2000000 0x2000000 0x2000000 0x2000000>; + bus-offset = <0x00 0x00>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x09>; + firmware = "bstcv0.rbf\0bstcv1.rbf\0bstcv2.rbf\0bstcv3.rbf"; + }; + + bst_lwnn@0x51030000 { + compatible = "bst,bst_lwnn-a1000b,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x92000000 0x00 0x2000000 0x00 0x94000000 0x00 0x2000000>; + memory-region = <0x65>; + bus-offset = <0x00 0x00>; + mbox-names = "bst-lwnn-mbox"; + dsp-num = <0x02>; + ipc-register-addr = <0x8ff00000>; + + dsp@0x92000000 { + index = <0x02>; + firmware = "bst_lwnn_dsp2_rt.rbf"; + assigned-mem-size = <0x2000>; + rt-init-addr = <0x927ff000>; + ipc-src-core = <0x06>; + }; + + dsp@0x94000000 { + index = <0x03>; + firmware = "bst_lwnn_dsp3_rt.rbf"; + assigned-mem-size = <0x2000>; + rt-init-addr = <0x947ff000>; + ipc-src-core = <0x00>; + }; + }; + + ipc_vsp@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-vsp-ipc"; + reg = <0x00 0x9c000000 0x00 0x100000 0x00 0x9c100000 0x00 0x80000 0x00 0x9c180000 0x00 0x80000 0x00 0x53090004 0x00 0x04 0x00 0x53090010 0x00 0x0c 0x00 0x33102fbc 0x00 0x04 0x00 0x9d000000 0x00 0x4000000>; + memory-region = <0x80>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x07>; + }; + + vsp@1 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-vsp"; + memory-region = <0x65>; + assigned-mem-size = <0x1000>; + clocks = <0x05 0x43>; + clock-names = "vout_display_clk"; + output-format = "HDMI_RGB"; + output-hsize = <0x780>; + output-vsize = <0x438>; + output-fresh = <0x3c>; + }; + + gmwarp@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-gmwarp"; + memory-region = <0x65>; + }; + + encoder@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-encoder"; + memory-region = <0x65>; + }; + + codec_dma_buf@0 { + compatible = "bst,dma_buf_te"; + memory-region = <0x65>; + }; + + firmware { + + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + chip-number = <0x02>; + }; + }; + + tee { + #address-cells = <0x02>; + #size-cells = <0x02>; + reg = <0x00 0x18060000 0x00 0x20000>; + memory-region = <0x81>; + mbox-names = "bstn-mbox"; + chip-number = <0x01>; + }; + + ipc_arm0@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm0"; + reg = <0x04 0xfec00000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7e>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x00>; + }; + + ipc_arm3@3 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm3"; + reg = <0x04 0xfec10000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7e>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x03>; + }; + + ipc_arm2@2 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm2"; + reg = <0x04 0xfec10000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7e>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x02>; + }; + + ipc_arm1@1 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm1"; + reg = <0x04 0xfec10000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7e>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x01>; + }; + + ipc@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,ipc"; + reg = <0x04 0xfec00000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7e>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x05>; + }; +}; diff --git a/configs/vms/linux-aarch64-a1000-smp8-fadb.dts b/configs/vms/linux-aarch64-a1000-smp8-fadb.dts new file mode 100644 index 00000000..287b9526 --- /dev/null +++ b/configs/vms/linux-aarch64-a1000-smp8-fadb.dts @@ -0,0 +1,3378 @@ +/dts-v1/; + +/memreserve/ 0x0000000018000000 0x0000000000100000; +/ { + compatible = "bst,a1000b"; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "BST A1000B FAD-B"; + + cpus { + #address-cells = <0x01>; + #size-cells = <0x00>; + + cpu@0 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x00>; + cpu-idle-states = <0x04>; + phandle = <0x3b>; + }; + + cpu@1 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x100>; + cpu-idle-states = <0x04>; + phandle = <0x3c>; + }; + + cpu@2 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x200>; + cpu-idle-states = <0x04>; + phandle = <0x3d>; + }; + + cpu@3 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x300>; + cpu-idle-states = <0x04>; + phandle = <0x3e>; + }; + + cpu@4 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x400>; + cpu-idle-states = <0x04>; + phandle = <0x3f>; + }; + + cpu@5 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x500>; + cpu-idle-states = <0x04>; + phandle = <0x40>; + }; + + cpu@6 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x600>; + cpu-idle-states = <0x04>; + phandle = <0x41>; + }; + + cpu@7 { + compatible = "arm,cortex-a55\0arm,armv8"; + device_type = "cpu"; + enable-method = "psci"; + next-level-cache = <0x03>; + reg = <0x700>; + cpu-idle-states = <0x04>; + phandle = <0x42>; + }; + + l2-cache0 { + compatible = "cache"; + phandle = <0x03>; + }; + }; + + psci { + compatible = "arm,psci"; + method = "hvc"; + cpu_on = <0xc4000003>; + cpu_off = <0x84000002>; + cpu_suspend = <0xc4000001>; + }; + + misc_clk { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x3d0900>; + phandle = <0x02>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupt-parent = <0x01>; + interrupts = <0x01 0x0d 0xff08 0x01 0x0e 0xff08 0x01 0x0b 0xff08 0x01 0x0a 0xff08>; + }; + + amba_apu@0 { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x00 0x00 0xffffffff>; + + a1000bclkc@33002000 { + compatible = "bst,a1000b-clkc"; + osc-clk-frequency = <0x17d7840>; + rgmii0-rxclk-frequency = <0x7735940>; + rgmii1-rxclk-frequency = <0x7735940>; + ptp_clk-frequency = <0x7735940>; + #clock-cells = <0x01>; + reg = <0x00 0x33002000 0x1000 0x00 0x70035000 0x1000 0x00 0x20020000 0x1000 0x00 0x20021000 0x1000>; + phandle = <0x05>; + }; + + a1000rstc@0x3300217c { + compatible = "bst,a1000b-rstc"; + #reset-cells = <0x01>; + reg = <0x00 0x3300217c 0x04 0x00 0x33002180 0x04 0x00 0x70035008 0x04 0x00 0x20020000 0x04 0x00 0x20021000 0x04>; + phandle = <0x06>; + }; + + interrupt-controller@32000000 { + compatible = "arm,gic-400"; + #interrupt-cells = <0x03>; + interrupt-controller; + reg = <0x00 0x32001000 0x1000 0x00 0x32002000 0x2000 0x00 0x32004000 0x2000 0x00 0x32006000 0x2000>; + interrupt-parent = <0x01>; + interrupts = <0x01 0x09 0xff04>; + phandle = <0x01>; + }; + + a1000noc { + compatible = "bst,a1000-noc"; + echo-args = <0x01>; + noc-arg-num = <0x2a>; + noc-args = <0x3342000c 0x00 0x33420008 0x505 0x3342008c 0x00 0x33420088 0x505 0x3342010c 0x00 0x33420108 0x505 0x3342018c 0x00 0x33420188 0x505 0x3342020c 0x00 0x33420208 0x505 0x3342028c 0x00 0x33420288 0x505 0x3342030c 0x00 0x33420308 0x505 0x3342038c 0x00 0x33420388 0x303 0x3342040c 0x00 0x33420408 0x303 0x3342048c 0x00 0x33420488 0x303 0x3342050c 0x00 0x33420508 0x303 0x3342058c 0x00 0x33420588 0x303 0x3342060c 0x00 0x33420608 0x303 0x3342068c 0x00 0x33420688 0x303 0x3342070c 0x00 0x33420708 0x00 0x3342078c 0x00 0x33420788 0x707 0x3342080c 0x00 0x33420808 0x707 0x3342088c 0x00 0x33420888 0x707 0x3342090c 0x00 0x33420908 0x707 0x3340010c 0x00 0x33400108 0x505 0x3340018c 0x00 0x33400188 0x505>; + }; + + serial@20008000 { + status = "okay"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x20008000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd5 0x04>; + clocks = <0x05 0x54 0x05 0x66>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x1d>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x07>; + }; + + serial@2000a000 { + status = "okay"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x2000a000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd6 0x04>; + clocks = <0x05 0x55 0x05 0x67>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x17>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x08>; + }; + + serial@2000b000 { + status = "disable"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x2000b000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd7 0x04>; + clocks = <0x05 0x70 0x05 0x7d>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x29>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x09>; + }; + + serial@20009000 { + status = "okay"; + compatible = "snps,dw-apb-uart"; + reg = <0x00 0x20009000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd8 0x04>; + clocks = <0x05 0x6f 0x05 0x7e>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x06 0x25>; + resets-names = "uart_reset"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x0a>; + }; + + dma-controller@33200000 { + status = "okay"; + compatible = "bst,dw-axi-gdma"; + reg = <0x00 0x33200000 0x1000>; + clocks = <0x05 0x2f 0x05 0x30>; + clock-names = "core-clk\0cfgr-clk"; + resets = <0x06 0x0c>; + reset-names = "gdma_reset"; + dma-channels = <0x08>; + snps,dma-masters = <0x01>; + snps,data-width = <0x04>; + snps,block-size = <0x1000 0x1000 0x1000 0x1000 0x1000 0x1000 0x1000 0x1000>; + snps,priority = <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>; + snps,axi-max-burst-len = <0x10>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x90 0xff04 0x00 0x91 0xff04 0x00 0x92 0xff04 0x00 0x93 0xff04 0x00 0x94 0xff04 0x00 0x95 0xff04 0x00 0x96 0xff04 0x00 0x97 0xff04 0x00 0x98 0xff04>; + support-slave; + }; + + pcie-phy@30E02000 { + reg = <0x00 0x30e02000 0x1000>; + reg-names = "phy-base"; + dmc-lane = <0x01>; + dmc-mode = <0x02>; + pcie-ctl0 = <0x01>; + pcie-ctl1 = <0x01>; + phandle = <0x0b>; + }; + + pcie@30600000 { + status = "disable"; + compatible = "bst,dw-pcie-rc"; + device_type = "pci"; + controller-id = <0x00>; + bus-range = <0x00 0xff>; + linux,pci-domain = <0x00>; + reg = <0x00 0x30600000 0x10000 0x00 0x30700000 0x10000 0x00 0x30900000 0x40000 0x00 0x30980000 0x40000 0x00 0x40000000 0x40000>; + reg-names = "dbi\0dbi2\0atu\0dma\0config"; + num-iatu = <0x04>; + num-viewport = <0x04>; + #address-cells = <0x03>; + #size-cells = <0x02>; + ranges = <0x81000000 0x00 0x41000000 0x00 0x41000000 0x00 0x1000000 0x83000000 0x00 0x42000000 0x00 0x42000000 0x00 0x4000000>; + dma-ranges = <0x3000000 0x00 0x80000000 0x00 0x80000000 0x02 0x00>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xc5 0x04 0x00 0xbf 0x04 0x00 0xc0 0x04 0x00 0xc1 0x04 0x00 0xc6 0x04>; + interrupt-names = "sys\0dma\0correctable\0uncorrectable\0other"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x00>; + interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0xc5 0x04>; + pcie-phy = <0x0b>; + max-link-speed = <0x03>; + num-lanes = <0x02>; + }; + + pcie0_ep@30600000 { + status = "disable"; + compatible = "bst,dw-pcie-ep"; + device_type = "pci"; + controller-id = <0x00>; + bus-range = <0x00 0x04>; + reg = <0x00 0x30600000 0x40000 0x00 0x30700000 0x40000 0x00 0x30900000 0x40000 0x00 0x30980000 0x40000 0x00 0x40000000 0x100000>; + reg-names = "dbi\0dbi2\0atu\0dma\0addr_space"; + num-ib-windows = <0x06>; + num-ob-windows = <0x06>; + max-functions = [04]; + pcie-phy = <0x0b>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xc5 0x04 0x00 0xbf 0x04 0x00 0xc0 0x04 0x00 0xc1 0x04 0x00 0xc6 0x04>; + interrupt-names = "sys\0dma\0correctable\0uncorrectable\0other"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x00>; + interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0xc5 0x04>; + }; + + pcie@30a00000 { + status = "disable"; + compatible = "bst,dw-pcie-ep"; + device_type = "pci"; + controller-id = <0x01>; + bus-range = <0x00 0x04>; + reg = <0x00 0x30a00000 0x40000 0x00 0x30b00000 0x40000 0x00 0x30d00000 0x40000 0x00 0x30d80000 0x40000 0x00 0x48000000 0x1000000>; + reg-names = "dbi\0dbi2\0atu\0dma\0addr_space"; + num-ib-windows = <0x06>; + num-ob-windows = <0x06>; + max-functions = [04]; + pcie-phy = <0x0b>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xc2 0x04 0x00 0xc3 0x04 0x00 0xc4 0x04 0x00 0xc7 0x04>; + interrupt-names = "dma\0correctable\0uncorrectable\0other"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x00>; + interrupt-map = <0x00 0x00 0x00 0x00 0x01 0x00 0xc5 0x04>; + max-link-speed = <0x03>; + num-lanes = <0x02>; + picp-ctl = "dma"; + ob-memaddr-def = <0x0c>; + }; + + pcie_vnet@0 { + status = "disable"; + compatible = "bst,pcie-vnet"; + vnet-id = <0x00>; + dma-chan-num = <0x01>; + rx_queues = <0x01>; + tx_queues = <0x01>; + tx-fifo-depth = <0x100>; + rx-fifo-depth = <0x100>; + extend-op = <0x11>; + memory-region = <0x0c>; + }; + + pcie_vnet@1 { + status = "disable"; + compatible = "bst,pcie-vnet"; + vnet-id = <0x01>; + dma-chan-num = <0x01>; + rx_queues = <0x01>; + tx_queues = <0x01>; + tx-fifo-depth = <0x100>; + rx-fifo-depth = <0x100>; + }; + + + gpio@20010000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,dw-apb-gpio"; + reg = <0x00 0x20010000 0x1000>; + clocks = <0x05 0x62>; + clock-names = "bus"; + resets = <0x06 0x1c>; + resets-names = "gpio0_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c>; + + gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x00>; + chipnum-base = <0x00>; + interrupt-controller; + #interrupt-cells = <0x03>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdf 0x04 0x00 0xe3 0x04 0x00 0xe4 0x04 0x00 0xe5 0x04 0x00 0xe6 0x04 0x00 0xe7 0x04 0x00 0xe8 0x04 0x00 0xe9 0x04 0x00 0xea 0x04>; + phandle = <0x20>; + }; + + gpio-controller@1 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x01>; + chipnum-base = <0x20>; + phandle = <0x4b>; + }; + + gpio-controller@2 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x02>; + chipnum-base = <0x40>; + phandle = <0x48>; + }; + + gpio-controller@3 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x03>; + chipnum-base = <0x60>; + phandle = <0x55>; + }; + }; + + gpio@20011000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,dw-apb-gpio"; + reg = <0x00 0x20011000 0x1000>; + clocks = <0x05 0x82>; + clock-names = "bus"; + resets = <0x06 0x27>; + resets-names = "gpio1_reset"; + + gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x00>; + chipnum-base = <0x80>; + interrupt-controller; + #interrupt-cells = <0x03>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xe0 0x04>; + }; + + gpio-controller@1 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x01>; + chipnum-base = <0xa0>; + }; + + gpio-controller@2 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x02>; + chipnum-base = <0xc0>; + }; + + gpio-controller@3 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <0x02>; + snps,nr-gpios = <0x20>; + reg = <0x03>; + chipnum-base = <0xe0>; + phandle = <0x0d>; + }; + }; + + watchdog@2001a000 { + status = "disable"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001a000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x5d 0x04>; + clocks = <0x05 0x5a 0x05 0x64>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x1f>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt0"; + }; + + watchdog@2001b000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001b000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x5e 0x04>; + clocks = <0x05 0x5b 0x05 0x65>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x20>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt1"; + }; + + watchdog@2001c000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001c000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x5f 0x04>; + clocks = <0x05 0x74 0x05 0x7b>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x2e>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt2"; + }; + + watchdog@2001d000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x2001d000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x60 0x04>; + clocks = <0x05 0x75 0x05 0x7c>; + clock-names = "wclk\0pclk"; + resets = <0x06 0x2f>; + resets-names = "wdt_reset"; + response-mode = <0x00>; + bst_wdt_name = "lsp_wdt3"; + }; + + watchdog@32009000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x32009000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x43 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt0"; + }; + + watchdog@3200a000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200a000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x44 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt1"; + }; + + watchdog@3200b000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200b000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x45 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt2"; + }; + + watchdog@3200c000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200c000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x46 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt3"; + }; + + watchdog@3200d000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200d000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x47 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt4"; + }; + + watchdog@3200e000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200e000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x48 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt5"; + }; + + watchdog@3200f000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x3200f000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x49 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt6"; + }; + + watchdog@32010000 { + status = "okay"; + compatible = "snps,dw-wdt"; + reg = <0x00 0x32010000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4a 0x04>; + clocks = <0x05 0x01>; + clock-names = "wclk"; + response-mode = <0x01>; + bst_wdt_name = "a55_wdt7"; + }; + + i2c@20000000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20000000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xcf 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4b 0x05 0x49>; + clock-names = "LSP0_PCLK\0LSP0_WCLK"; + resets = <0x06 0x18>; + reset-names = "i2c0_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x1d>; + }; + + i2c@20001000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20001000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd0 0x04>; + clock-frequency = <0xf4240>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4b 0x05 0x49>; + clock-names = "LSP0_PCLK\0LSP0_WCLK"; + resets = <0x06 0x19>; + reset-names = "i2c1_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x1e>; + }; + + i2c@20002000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20002000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd1 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4b 0x05 0x49>; + clock-names = "LSP0_PCLK\0LSP0_WCLK"; + resets = <0x06 0x1a>; + reset-names = "i2c2_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x1f>; + + max96712@2a { + compatible = "bst,maxim-deser-hub"; + type = "max96712"; + ctl-mode = "fad-lis"; + reg = <0x2a>; + i2c-port = <0x01>; + csi2-port = <0x01>; + lane-speed = <0x960>; + regs = <0x40>; + data-type = <0x2d>; + trigger-mode = <0x01>; + trigger-fps = <0x14>; + trigger-rx-gpio = <0x02>; + trigger-tx-gpio = <0x08>; + maxim,hsync-invert = <0x00>; + maxim,vsync-invert = <0x00>; + maxim,linkrx-rate = <0x06 0x06 0x06 0x06>; + maxim,link-mode = "GMSL2"; + pdb-gpio = <0x20 0x14 0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + csi-link { + + ports { + + port@0 { + clock-lanes = <0x00>; + data-lanes = <0x01 0x02 0x03 0x04>; + + endpoint { + remote-endpoint = <0x21>; + phandle = <0x72>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x22>; + phandle = <0x2e>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x23>; + phandle = <0x2f>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x24>; + phandle = <0x30>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x25>; + phandle = <0x31>; + }; + }; + }; + }; + + max96712@6b { + compatible = "bst,maxim-deser-hub"; + type = "max96712"; + ctl-mode = "fad-ctl"; + reg = <0x6b>; + i2c-port = <0x00>; + csi2-port = <0x00>; + lane-speed = <0x640>; + regs = <0x44>; + data-type = <0x1e>; + trigger-mode = <0x01>; + trigger-fps = <0x1e>; + trigger-rx-gpio = <0x01>; + maxim,hsync-invert = <0x00>; + maxim,vsync-invert = <0x00>; + maxim,linkrx-rate = <0x03 0x03 0x03 0x03>; + maxim,link-mode = "GMSL2"; + pdb-gpio = <0x20 0x15 0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + csi-link { + + ports { + + port@0 { + clock-lanes = <0x00>; + data-lanes = <0x01 0x02 0x03 0x04>; + + endpoint { + remote-endpoint = <0x26>; + phandle = <0x77>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x27>; + phandle = <0x32>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x28>; + phandle = <0x33>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x29>; + phandle = <0x34>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x2a>; + phandle = <0x35>; + }; + }; + }; + }; + + max96712@29 { + compatible = "bst,maxim-deser-hub"; + type = "max96712"; + ctl-mode = "fad-lis"; + reg = <0x29>; + i2c-port = <0x01>; + csi2-port = <0x01>; + lane-speed = <0x960>; + regs = <0x40>; + data-type = <0x2d>; + trigger-mode = <0x01>; + trigger-fps = <0x14>; + trigger-rx-gpio = <0x02>; + trigger-tx-gpio = <0x08>; + maxim,hsync-invert = <0x00>; + maxim,vsync-invert = <0x00>; + maxim,linkrx-rate = <0x06 0x06 0x06 0x06>; + maxim,link-mode = "GMSL2"; + pdb-gpio = <0x20 0x17 0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + csi-link { + + ports { + + port@0 { + clock-lanes = <0x00>; + data-lanes = <0x01 0x02>; + + endpoint { + remote-endpoint = <0x2b>; + phandle = <0x7c>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x2c>; + phandle = <0x36>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x2d>; + phandle = <0x37>; + }; + }; + }; + }; + + camera@70 { + reg = <0x70>; + ser-alias-id = <0x60>; + sensor-alias-id = <0x70>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x2e>; + phandle = <0x22>; + }; + }; + }; + + camera71 { + status = "disabled"; + reg = <0x71>; + ser-alias-id = <0x61>; + sensor-alias-id = <0x71>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x2f>; + phandle = <0x23>; + }; + }; + }; + + camera@72 { + status = "disabled"; + reg = <0x72>; + ser-alias-id = <0x62>; + sensor-alias-id = <0x72>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x30>; + phandle = <0x24>; + }; + }; + }; + + camera@73 { + status = "disabled"; + reg = <0x73>; + ser-alias-id = <0x63>; + sensor-alias-id = <0x73>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x31>; + phandle = <0x25>; + }; + }; + }; + + camera@54 { + reg = <0x54>; + ser-alias-id = <0x64>; + sensor-alias-id = <0x54>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x32>; + phandle = <0x27>; + }; + }; + }; + + camera@55 { + reg = <0x55>; + ser-alias-id = <0x65>; + sensor-alias-id = <0x55>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x33>; + phandle = <0x28>; + }; + }; + }; + + camera@56 { + reg = <0x56>; + ser-alias-id = <0x66>; + sensor-alias-id = <0x56>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x34>; + phandle = <0x29>; + }; + }; + }; + + camera@57 { + reg = <0x57>; + ser-alias-id = <0x67>; + sensor-alias-id = <0x57>; + compatible = "bst,ofilm_ox3c"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity-low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max96717f"; + algo-bin = "ox3c/0X03C10_raw14_OF_h100_AlgoParam.bin"; + iq-bin = "ox3c/0X03C10_raw14_OF_h100_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0x780 0x506>; + dvp-dummy = <0xabcd>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0x780 0x438>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0x780 0x64 0x49c>; + sensor-fps = <0x1e>; + trigger-gpio = <0x00>; + trigger-tx-gpio = <0x00>; + maxim,rx_rate = <0x03>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x35>; + phandle = <0x2a>; + }; + }; + }; + + camera@58 { + reg = <0x58>; + ser-alias-id = <0x48>; + sensor-alias-id = <0x58>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x36>; + phandle = <0x2c>; + }; + }; + }; + + camera@59 { + status = "disabled"; + reg = <0x59>; + ser-alias-id = <0x49>; + sensor-alias-id = <0x59>; + compatible = "bst,jk_ox08b"; + sensor-id = <0x36>; + data-type = <0x2d>; + fv-polarity_low = <0x00>; + fpd3-mode = "csi-2"; + serializer = "max9295"; + algo-bin = "ox08b/Ox08B40_raw14_hk_h120_AlgoParam.bin"; + iq-bin = "ox08b/Ox08B40_raw14_hk_h120_IqParam.bin"; + hdr-stagger-en = <0x01>; + exp-num = <0x01>; + pwl-format = <0x0f>; + dvp-data-type = <0x2d>; + vin-data-type = <0x2d>; + size = <0xf00 0x876>; + dvp-dummy = <0xaaa0>; + view0-fmt = <0x01>; + view0-size = <0x500 0x2d0>; + view1-fmt = <0x01>; + view1-size = <0xf00 0x870>; + pdns-mode = <0x00>; + pdns-input-view = <0x00>; + hblank = <0x00>; + input-crop = <0x00 0xf00 0x02 0x872>; + clock-frequency = <0x18>; + sensor-fps = <0x1e>; + maxim,rx_rate = <0x06>; + trigger-gpio = <0x01>; + trigger-tx-gpio = <0x08>; + serializer-id = <0x42>; + maxim,link-mode = "GMSL2"; + + port { + + endpoint@0 { + remote-endpoint = <0x37>; + phandle = <0x2d>; + }; + }; + }; + }; + + i2c@20003000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20003000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd2 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4c 0x05 0x4a>; + clock-names = "LSP1_PCLK\0LSP1_WCLK"; + resets = <0x06 0x2c>; + reset-names = "i2c3_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x38>; + }; + + i2c@20004000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20004000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd3 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4c 0x05 0x4a>; + clock-names = "LSP1_PCLK\0LSP1_WCLK"; + resets = <0x06 0x2d>; + reset-names = "i2c4_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x39>; + + eeprom@56 { + compatible = "atmel,24c02"; + reg = <0x56>; + pagesize = <0x10>; + }; + + lt9211@2d { + compatible = "bst,lt9211"; + reg = <0x2d>; + }; + }; + + i2c@20005000 { + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "snps,designware-i2c"; + reg = <0x00 0x20005000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd4 0x04>; + clock-frequency = <0x186a0>; + i2c-sda-hold-time-ns = <0x12c>; + i2c-sda-falling-time-ns = <0x12c>; + i2c-scl-falling-time-ns = <0x12c>; + clocks = <0x05 0x4c 0x05 0x4a>; + clock-names = "LSP1_PCLK\0LSP1_WCLK"; + resets = <0x06 0x26>; + reset-names = "i2c5_reset"; + pinctrl-names = "default"; + pinctrl-0 = <0x3a>; + }; + + ddr_ecc { + status = "okay"; + compatible = "bst,a1000_ddr_ecc"; + reg = <0x00 0x38000000 0x1400 0x00 0x3c000000 0x1400 0x00 0x33000000 0x140>; + reg-names = "ddr0\0ddr1\0a55_ctrl"; + interrupt-parent = <0x01>; + interrupts = <0x00 0x8b 0x04 0x00 0x8d 0x04>; + interrupt-names = "ddr0_ecc_irq\0ddr1_ecc_irq"; + mbox-names = "bstn-mbox"; + }; + + arm_pmu { + status = "okay"; + compatible = "arm,armv8-pmuv3"; + interrupt-parent = <0x01>; + interrupts = <0x00 0x38 0xff04 0x00 0x39 0xff04 0x00 0x3a 0xff04 0x00 0x3b 0xff04 0x00 0x3c 0xff04 0x00 0x3d 0xff04 0x00 0x3e 0xff04 0x00 0x3f 0xff04>; + interrupt-affinity = <0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42>; + }; + + noc_pmu@0x32702000 { + status = "okay"; + compatible = "bst,bst_noc_pmu"; + reg = <0x00 0x32702000 0x1000 0x00 0x32703000 0x1000 0x00 0x32704000 0x2000 0x00 0x32708000 0x1000 0x00 0x33402000 0x2400 0x00 0x33422000 0x4400 0x00 0x33401100 0x10 0x00 0x33421480 0x10>; + reg-names = "coresight_cpunoc_etf\0coresight_etr\0coresight_funnel\0coresight_corenoc_etf\0cpu_port_set\0core_port_set\0cpunoc_atb\0corenoc_atb"; + memory-region = <0x43>; + }; + + lsp0_pwm0@20012000 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x56 0x05 0x6b>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20012000 0x14 0x00 0x200120b0 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x44>; + }; + + lsp0_pwm1@20012014 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x57 0x05 0x6b>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20012014 0x14 0x00 0x200120b4 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x45>; + }; + + lsp1_pwm0@20013000 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x71 0x05 0x7a>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20013000 0x14 0x00 0x200130b0 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x46>; + }; + + lsp1_pwm1@20013014 { + status = "disable"; + compatible = "snps,bst-pwm"; + clocks = <0x05 0x72 0x05 0x7a>; + clock-names = "wclk\0pclk"; + clock-frequency = <0x17d7840>; + reg = <0x00 0x20013014 0x14 0x00 0x200130b4 0x04>; + reg-names = "base\0top"; + pwm-ch = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x47>; + }; + + a55_timer0@32008000 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4b 0x04>; + reg = <0x00 0x32008000 0x14>; + }; + + a55_timer1@32008014 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4c 0x04>; + reg = <0x00 0x32008014 0x14>; + }; + + a55_timer2@32008028 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4d 0x04>; + reg = <0x00 0x32008028 0x14>; + }; + + a55_timer3@3200803c { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4e 0x04>; + reg = <0x00 0x3200803c 0x14>; + }; + + a55_timer4@32008050 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x4f 0x04>; + reg = <0x00 0x32008050 0x14>; + }; + + a55_timer5@32008064 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x50 0x04>; + reg = <0x00 0x32008064 0x14>; + }; + + a55_timer6@32008078 { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x51 0x04>; + reg = <0x00 0x32008078 0x14>; + }; + + a55_timer7@3200808c { + status = "disable"; + compatible = "snps,dw-apb-timer"; + clock-frequency = <0x14dc9380>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x52 0x04>; + reg = <0x00 0x3200808c 0x14>; + }; + + spi@2000c000 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000c000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdb 0x04>; + clocks = <0x05 0x58 0x05 0x68>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x00>; + cs-gpios = <0x48 0x02 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x49>; + }; + + spi@2000d000 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000d000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdc 0x04>; + clocks = <0x05 0x73 0x05 0x80>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x01>; + cs-gpios = <0x48 0x06 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4a>; + }; + + spi@2000c800 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000c800 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xf4 0x04>; + clocks = <0x05 0x58 0x05 0x68>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x02>; + cs-gpios = <0x4b 0x08 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4c 0x4d>; + }; + + spi@2000d800 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x2000d800 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xf5 0x04>; + clocks = <0x05 0x73 0x05 0x80>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x03>; + cs-gpios = <0x4b 0x10 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4e 0x4f>; + }; + + spi@20022000 { + status = "okay"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x20022000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xe2 0x04>; + clocks = <0x05 0x58 0x05 0x68>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x04>; + cs-gpios = <0x48 0x02 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x50>; + spi-slave; + + slave@0 { + compatible = "rohm,dh2228fv"; + reg = <0x00>; + spi-max-frequency = <0x989680>; + }; + }; + + spi@20023000 { + status = "disable"; + compatible = "snps,dw-apb-ssi"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x20023000 0x800>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xe1 0x04>; + clocks = <0x05 0x73 0x05 0x80>; + clock-names = "spi_wclk\0spi_pclk"; + num-cs = <0x01>; + bus-num = <0x05>; + cs-gpios = <0x48 0x06 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x51>; + }; + + i2s-play@2000e000 { + status = "disable"; + compatible = "snps,designware-i2s"; + reg = <0x00 0x2000e000 0x1000>; + interrupt-names = "play_irq"; + interrupt-parent = <0x01>; + interrupts = <0x00 0xdd 0x04>; + clocks = <0x05 0x61 0x05 0x59>; + clock-names = "i2spclk\0i2sclk"; + play; + channel = <0x02>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x52>; + }; + + i2s-rec@2000f000 { + status = "disable"; + compatible = "snps,designware-i2s"; + reg = <0x00 0x2000f000 0x1000>; + interrupt-names = "record_irq"; + interrupt-parent = <0x01>; + interrupts = <0x00 0xde 0x04>; + clocks = <0x02>; + record; + channel = <0x02>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x53>; + }; + + qspi@00000000 { + status = "okay"; + compatible = "snps,dwc-ssi-1.01a"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x00 0x4000000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xd9 0x04>; + clocks = <0x05 0x4d 0x05 0x4e>; + clock-names = "hclk\0wclk"; + work-mode = <0x01>; + reg-io-width = <0x04>; + bst,use-gpio-cs; + spi-rx-bus-width = <0x04>; + spi-tx-bus-width = <0x04>; + cs-gpios = <0x48 0x15 0x00>; + num-cs = <0x01>; + bus-num = <0x06>; + pinctrl-names = "default"; + pinctrl-0 = <0x54>; + + qspi0-nor0@0 { + #address-cells = <0x01>; + #size-cells = <0x01>; + spi-rx-bus-width = <0x01>; + spi-tx-bus-width = <0x01>; + compatible = "jedec,spi-nor"; + status = "okay"; + spi-max-frequency = <0xf4240>; + reg = <0x00>; + mode = <0x00>; + powerctl-fad-gpios = <0x20 0x1c 0x00>; + + partition@0 { + reg = <0x00 0x1e00000>; + label = "nor0_part0"; + }; + + partition@1e00000 { + reg = <0x1e00000 0x200000>; + label = "nor0_part1"; + }; + }; + }; + + qspi@14000000 { + status = "disable"; + compatible = "snps,dwc-ssi-1.01a"; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00 0x14000000 0x4000000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xda 0x04>; + clocks = <0x05 0x4f 0x05 0x50>; + clock-names = "hclk\0wclk"; + work-mode = <0x01>; + reg-io-width = <0x04>; + bst,use-gpio-cs; + spi-rx-bus-width = <0x04>; + spi-tx-bus-width = <0x04>; + cs-gpios = <0x55 0x01 0x00>; + num-cs = <0x01>; + bus-num = <0x07>; + pinctrl-names = "default"; + pinctrl-0 = <0x56>; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x0f>; + snps,rd_osr_lmt = <0x0f>; + snps,axi_fb; + snps,blen = <0x04 0x08 0x10 0x00 0x00 0x00 0x00>; + phandle = <0x57>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x04>; + snps,rx-sched-sp; + phandle = <0x58>; + + queue0 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x00>; + snps,priority = <0x00>; + }; + + queue1 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x01>; + snps,priority = <0x01>; + }; + + queue2 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x02>; + snps,priority = <0x02>; + }; + + queue3 { + snps,dcb-algorithm; + snps,map-to-dma-channel = <0x03>; + snps,priority = <0x03>; + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x04>; + snps,tx-sched-wrr; + phandle = <0x59>; + + queue0 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x00>; + }; + + queue1 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x01>; + }; + + queue2 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x02>; + }; + + queue3 { + snps,weight = <0x10>; + snps,dcb-algorithm; + snps,priority = <0x03>; + }; + }; + + thermal@70039000 { + status = "okay"; + compatible = "bst,bst-thermal"; + reg = <0x00 0x70039000 0x1000>; + #thermal-sensor-cells = <0x00>; + phandle = <0x62>; + }; + + ethernet@30000000 { + status = "okay"; + compatible = "bst,dw-eqos-eth"; + reg = <0x00 0x30000000 0x100000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9f 0xff04 0x00 0xa0 0xff04 0x00 0xa1 0xff04 0x00 0xa2 0xff04 0x00 0xa3 0xff04 0x00 0xa4 0xff04 0x00 0xa5 0xff04 0x00 0xa6 0xff04 0x00 0xa7 0xff04 0x00 0xa8 0xff04 0x00 0xa9 0xff04 0x00 0xaa 0xff04>; + interrupt-names = "sbd_irq\0sfty_ce_irq\0sfty_ue_irq\0tx_chan0_irq\0tx_chan1_irq\0tx_chan2_irq\0tx_chan3_irq\0rx_chan0_irq\0rx_chan1_irq\0rx_chan2_irq\0rx_chan3_irq\0eth_lpi"; + ethernet-id = <0x00>; + mac-address = [00 00 00 00 00 00]; + max-frame-size = <0xed8>; + phy-mode = "rgmii"; + snps,multicast-filter-bins = <0x100>; + snps,perfect-filter-entries = <0x80>; + rx-fifo-depth = <0x4000>; + tx-fifo-depth = <0x4000>; + clocks = <0x05 0x0f 0x05 0x13 0x05 0x15 0x05 0x11>; + clock-names = "wclk\0axim_aclk\0pclk\0ptp_ref"; + bst,fix-safety = <0x00>; + bst,dma_int_mode = <0x01>; + snps,fixed-burst; + snps,force_sf_dma_mode; + snps,ps-speed = <0x3e8>; + snps,axi-config = <0x57>; + snps,mtl-rx-config = <0x58>; + snps,mtl-tx-config = <0x59>; + label = "gmac0"; + resets = <0x06 0x11>; + reset-names = "bstgmaceth"; + eth-name = "gmac0"; + eth-number = <0x00>; + mac-mode = "rgmii"; + extend-op = <0x03>; + pinctrl-names = "default"; + pinctrl-0 = <0x5a>; + + fixed-link { + speed = <0x3e8>; + full-duplex; + }; + }; + + ethernet@30100000 { + status = "disable"; + compatible = "bst,dw-eqos-eth"; + reg = <0x00 0x30100000 0x100000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xab 0xff04 0x00 0xac 0xff04 0x00 0xad 0xff04 0x00 0xae 0xff04 0x00 0xaf 0xff04 0x00 0xb0 0xff04 0x00 0xb1 0xff04 0x00 0xb2 0xff04 0x00 0xb3 0xff04 0x00 0xb4 0xff04 0x00 0xb5 0xff04 0x00 0xb6 0xff04>; + interrupt-names = "sbd_irq\0sfty_ce_irq\0sfty_ue_irq\0tx_chan0_irq\0tx_chan1_irq\0tx_chan2_irq\0tx_chan3_irq\0rx_chan0_irq\0rx_chan1_irq\0rx_chan2_irq\0rx_chan3_irq\0eth_lpi"; + ethernet-id = <0x01>; + mac-address = [00 00 00 00 00 00]; + max-frame-size = <0xed8>; + phy-mode = "rgmii"; + snps,multicast-filter-bins = <0x100>; + snps,perfect-filter-entries = <0x80>; + rx-fifo-depth = <0x4000>; + tx-fifo-depth = <0x4000>; + clocks = <0x05 0x10 0x05 0x14 0x05 0x16 0x05 0x12>; + clock-names = "wclk\0axim_aclk\0pclk\0ptp_ref"; + bst,fix-safety = <0x00>; + bst,dma_int_mode = <0x01>; + snps,fixed-burst; + snps,force_sf_dma_mode; + snps,ps-speed = <0x3e8>; + snps,axi-config = <0x57>; + snps,mtl-rx-config = <0x58>; + snps,mtl-tx-config = <0x59>; + label = "gmac1"; + resets = <0x06 0x12>; + reset-names = "bstgmaceth"; + pinctrl-names = "default"; + pinctrl-0 = <0x5b>; + extend-op = <0x03>; + eth-name = "gmac1"; + eth-number = <0x01>; + mac-mode = "rgmii"; + phy-handle = <0x5c>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + eth_phy1@1 { + compatible = "marvell,88Q2122\0ethernet-phy-id002B.0983\0ethernet-phy-ieee802.3-c45"; + device_type = "ethernet-phy"; + max-speed = <0x3e8>; + reg = <0x01>; + reset-gpios = <0x20 0x09 0x01>; + reset-active-low; + reset-assert-us = <0x4e20>; + reset-deassert-us = <0x4e20>; + phandle = <0x5c>; + }; + }; + }; + + phy@30E01000 { + compatible = "bst,dwc-usb-phy"; + #phy-cells = <0x00>; + reg = <0x00 0x30e01000 0x1000>; + usb_mode = "usb20"; + phandle = <0x5f>; + }; + + phy@30E00000 { + compatible = "bst,dwc-usb-phy"; + reg = <0x00 0x30e00000 0x1000>; + #phy-cells = <0x00>; + usb_mode = "usb30"; + pll_type = "internal"; + phandle = <0x5d>; + }; + + usb3 { + compatible = "bst,dwc3usb"; + status = "okay"; + ranges; + #address-cells = <0x02>; + #size-cells = <0x01>; + clock-names = "suspend\0ref\0axi\0apb"; + clocks = <0x05 0x17 0x05 0x18 0x05 0x19 0x05 0x1a>; + resets = <0x06 0x04>; + reset-names = "usb3_reset"; + phys = <0x5d>; + phy-names = "usb-phy"; + pll_type = "internal"; + powerctl-gpios = <0x20 0x0e 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x5e>; + + dwc3@30200000 { + compatible = "snps,dwc3"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + reg = <0x00 0x30200000 0x100000>; + interrupts = <0x00 0xc8 0x04>; + interrupt-parent = <0x01>; + dr_mode = "host"; + snps,dis_u3_susphy_quirk; + }; + }; + + usb2 { + compatible = "bst,dwc3usb"; + status = "okay"; + ranges; + #address-cells = <0x02>; + #size-cells = <0x01>; + clock-names = "ahb\0ref\0apb"; + clocks = <0x05 0x1b 0x05 0x1d 0x05 0x1c>; + reset-names = "usb2_reset"; + resets = <0x06 0x05>; + phys = <0x5f>; + phy-names = "usb-phy"; + pll_type = "internal"; + + dwc3@30300000 { + status = "okay"; + compatible = "snps,dwc3"; + reg = <0x00 0x30300000 0x100000>; + interrupts = <0x00 0xc9 0x04>; + interrupt-parent = <0x01>; + dr_mode = "peripheral"; + snps,incr-burst-type-adjustment = <0x01 0x04 0x08 0x10>; + snps,reqinfo-for-data-read = <0x08>; + snps,reqinfo-for-descriptor-read = <0x08>; + }; + }; + + dwmmc0@30400000 { + status = "okay"; + compatible = "bst,dwcmshc-sdhci"; + clocks = <0x05 0x1f 0x05 0x1e>; + clock-names = "core\0bus"; + reg = <0x00 0x30400000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xb9 0x04>; + interrupt-names = "IRQDWMMC0"; + #address-cells = <0x01>; + #size-cells = <0x00>; + data-addr = <0x200>; + fifo-watermark-aligned; + clock-frequency = <0x2faf080>; + max-frequency = <0xbebc200>; + min-frequency = <0x61a80>; + broken-64bit-dma; + clear-tarns-mode; + fifo-depth = <0x400>; + card-detect-delay = <0xc8>; + bus-width = <0x08>; + cap-mmc-highspeed; + non-removable; + no-sdio; + no-sd; + keep-power-in-suspend; + no-3-3-v; + sdhci,auto-cmd12; + pinctrl-names = "default"; + pinctrl-0 = <0x60>; + }; + + dwmmc1@30500000 { + status = "okay"; + compatible = "bst,dwcmshc-sdhci"; + clocks = <0x05 0x21 0x05 0x20>; + clock-names = "core\0bus"; + reg = <0x00 0x30500000 0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xbd 0x04>; + interrupt-names = "IRQDWMMC1"; + #address-cells = <0x01>; + #size-cells = <0x00>; + data-addr = <0x200>; + fifo-watermark-aligned; + clock-frequency = <0x5f5e100>; + max-frequency = <0xbebc200>; + min-frequency = <0x61a80>; + broken-64bit-dma; + clear-tarns-mode; + fifo-depth = <0x400>; + card-detect-delay = <0xc8>; + bus-width = <0x04>; + cap-sd-highspeed; + sd-uhs-sdr12; + sd-uhs-sdr25; + sd-uhs-sdr50; + no-sdio; + no-mmc; + sdhci,auto-cmd12; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <0x61>; + }; + + gpu@33300000 { + status = "okay"; + compatible = "arm,mali-450\0arm,mali-utgard"; + reg = <0x00 0x33300000 0x30000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x81 0x04 0x00 0x82 0x04 0x00 0x83 0x04 0x00 0x84 0x04 0x00 0x85 0x04 0x00 0x86 0x04 0x00 0x87 0x04 0x00 0x88 0x04>; + interrupt-names = "IRQPP0\0IRQPPMMU0\0IRQPP1\0IRQPPMMU1\0IRQGP\0IRQGPMMU\0IRQPMU\0IRQPP"; + clocks = <0x05 0x31 0x05 0x32>; + clock-names = "clk_mali\0clk_mali_apb"; + resets = <0x06 0x0b>; + reset-names = "gpu_reset"; + ppcores = <0x02>; + dedicated_mem_start = <0x00>; + dedicated_mem_size = <0x00>; + }; + + mali-v500@0x55000000 { + status = "okay"; + compatible = "arm,mali-v500"; + reg = <0x00 0x55000000 0xffff>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9a 0x04>; + interrupt-names = "IRQV500"; + resets = <0x06 0x00>; + reset-names = "codec_reset"; + clocks = <0x05 0x3d>; + clock-names = "clk_v500"; + }; + }; + + cooling_dev { + + pwm { + cpumask = <0x0f>; + capacitance = <0x5dc>; + #cooling-cells = <0x02>; + phandle = <0x64>; + }; + }; + + thermal-zones { + + cpu-thermal { + polling-delay-passive = <0x1f4>; + polling-delay = <0x3e8>; + thermal-sensors = <0x62>; + + trips { + + switch_trip { + temperature = <0x15f90>; + hysteresis = <0x7d0>; + type = "passive"; + phandle = <0x63>; + }; + + critical_trip { + temperature = <0x1e848>; + hysteresis = <0x00>; + type = "critical"; + }; + }; + + cooling-maps { + + map0 { + trip = <0x63>; + cooling-device = <0x64 0x00 0x01>; + }; + }; + }; + }; + + pinctrl@70038000 { + status = "okay"; + compatible = "bst,pinctrl-a1000b"; + #address-cells = <0x02>; + #size-cells = <0x02>; + reg = <0x00 0x70038000 0x00 0x1000 0x00 0x33001000 0x00 0x1000>; + reg-names = "aon\0top"; + #gpio-cells = <0x02>; + + spi0_pinctrl { + phandle = <0x49>; + + mux { + pins = "spi0_miso\0spi0_mosi\0spi0_sclk"; + function = "spi0"; + }; + }; + + spi1_pinctrl { + phandle = <0x4a>; + + mux { + pins = "spi1_miso\0spi1_mosi\0spi1_sclk"; + function = "spi1"; + }; + }; + + spi2_pinctrl { + phandle = <0x4c>; + + mux { + pins = "uart0_cts\0uart1_cts\0uart1_rts"; + function = "spi2"; + }; + }; + + spi2_cs_pinctrl { + phandle = <0x4d>; + + mux { + pins = "uart0_rts"; + function = "gpio"; + }; + }; + + spi3_pinctrl { + phandle = <0x4e>; + + mux { + pins = "uart2_cts\0uart3_cts\0uart3_rts"; + function = "spi3"; + }; + }; + + spi3_cs_pinctrl { + phandle = <0x4f>; + + mux { + pins = "uart2_rts"; + function = "gpio"; + }; + }; + + spi4_pinctrl { + phandle = <0x50>; + + mux { + pins = "spi0_miso\0spi0_mosi\0spi0_sclk\0spi0_cs"; + function = "spi0_s"; + }; + }; + + spi5_pinctrl { + phandle = <0x51>; + + mux { + pins = "spi1_miso\0spi1_mosi\0spi1_sclk"; + function = "spi1_s"; + }; + }; + + i2c0_pinctrl { + phandle = <0x1d>; + + mux { + pins = "i2c0_scl\0i2c0_sda"; + function = "i2c0"; + }; + }; + + i2c1_pinctrl { + phandle = <0x1e>; + + mux { + pins = "i2c1_scl\0i2c1_sda"; + function = "i2c1"; + }; + }; + + i2c2_pinctrl { + phandle = <0x1f>; + + mux { + pins = "i2c2_scl\0i2c2_sda"; + function = "i2c2"; + }; + }; + + i2c3_pinctrl { + phandle = <0x38>; + + mux { + pins = "i2c3_scl\0i2c3_sda"; + function = "i2c3"; + }; + }; + + i2c4_pinctrl { + phandle = <0x39>; + + mux { + pins = "i2c4_scl\0i2c4_sda"; + function = "i2c4"; + }; + }; + + i2c5_pinctrl { + phandle = <0x3a>; + + mux { + pins = "i2c5_scl\0i2c5_sda"; + function = "i2c5"; + }; + }; + + uart0_pinctrl { + phandle = <0x07>; + + mux { + pins = "uart0_txd\0uart0_rxd"; + function = "uart0"; + }; + }; + + uart1_pinctrl { + phandle = <0x08>; + + mux { + pins = "uart1_txd\0uart1_rxd"; + function = "uart1"; + }; + }; + + uart2_pinctrl { + phandle = <0x09>; + + mux { + pins = "uart2_txd\0uart2_rxd"; + function = "uart2"; + }; + }; + + uart3_pinctrl { + phandle = <0x0a>; + + mux { + pins = "uart3_txd\0uart3_rxd"; + function = "uart3"; + }; + }; + + gpio0_pinctrl { + + mux { + pins = "gpio_29"; + function = "gpio"; + }; + }; + + gpio_special_func_pinctrl { + + mux { + pins = "gpio_24\0gpio_29\0debug4\0debug5\0uart0_cts\0uart0_rts"; + function = "gpio"; + }; + }; + + qspi0_pinctrl { + phandle = <0x54>; + + mux { + pins = "qspi0_cs0"; + function = "gpio"; + }; + }; + + usb3_pinctrl { + phandle = <0x5e>; + + mux { + pins = "gpio_14"; + function = "gpio"; + }; + }; + + qspi1_pinctrl { + phandle = <0x56>; + + mux { + pins = "qspi1_cs1"; + function = "gpio"; + }; + }; + + des_960_1_pinctrl { + + mux { + pins = "qspi1_io1"; + function = "gpio"; + }; + }; + + des_960_2_pinctrl { + + mux { + pins = "qspi1_io3"; + function = "gpio"; + }; + }; + + des_960_3_pinctrl { + + mux { + pins = "qspi1_io5"; + function = "gpio"; + }; + }; + + bist_pinctrl { + + mux { + pins = "spi1_mosi"; + function = "bist"; + }; + }; + + + + i2s0_pinctrl { + phandle = <0x52>; + + mux { + pins = "i2s0_ck\0i2s0_mck\0i2s0_sd_out\0i2s0_ws\0qspi0_io4"; + function = "i2s0"; + }; + }; + + i2s1_pinctrl { + phandle = <0x53>; + + mux { + pins = "i2s1_ck\0i2s1_sd_in\0i2s1_ws"; + function = "i2s1"; + }; + }; + + isp_pinctrl { + phandle = <0x67>; + + mux { + pins = "isp_fsync0\0isp_fsync1\0isp_fsync2\0isp_fsync3"; + function = "isp"; + }; + }; + + ptp_pinctrl { + + mux { + pins = "ptp_pps0\0ptp_pps1\0ptp_clk"; + function = "ptp"; + }; + }; + + ptp_pinconfig { + + config { + pins = "ptp_clk"; + drive-strength = <0x02>; + input-enable; + }; + }; + + err_rpt_l0_pinctrl { + + mux { + pins = "err_rpt_l0_n\0err_rpt_l0_p"; + function = "err_rpt_l0"; + }; + }; + + err_rpt_gpio_l0_pinctrl { + + mux { + pins = "err_rpt_l0_n\0err_rpt_l0_p"; + function = "gpio"; + }; + }; + + err_rpt_l1_pinctrl { + + mux { + pins = "err_rpt_l1_n\0err_rpt_l1_p"; + function = "err_rpt_l1"; + }; + }; + + pwm_lsp0_pwm0_pinctrl { + phandle = <0x44>; + + mux { + pins = "pwm0"; + function = "pwm"; + }; + }; + + pwm_lsp0_pwm1_pinctrl { + phandle = <0x45>; + + mux { + pins = "pwm1"; + function = "pwm"; + }; + }; + + pwm_lsp1_pwm0_pinctrl { + phandle = <0x46>; + + mux { + pins = "pwm2"; + function = "pwm"; + }; + }; + + pwm_lsp1_pwm1_pinctrl { + phandle = <0x47>; + + mux { + pins = "pwm3"; + function = "pwm"; + }; + }; + + ts_pinctrl { + + mux { + pins = "ts_trig_in00\0ts_trig_in01\0ts_trig_in10\0ts_trig_in11"; + function = "ts"; + }; + }; + + sdemmc0_pinctrl { + phandle = <0x15>; + + mux { + pins = "sdemmc0_clk\0sdemmc0_cmd\0sdemmc0_dat0\0sdemmc0_dat1\0sdemmc0_dat2\0sdemmc0_dat3\0sdemmc0_dat4\0sdemmc0_dat5\0sdemmc0_dat6\0sdemmc0_dat7\0sdemmc0_rstb\0sdemmc0_cdn\0sdemmc0_wp"; + function = "sdemmc0"; + }; + }; + + sdemmc0_pinconfig { + phandle = <0x60>; + + config { + pins = "sdemmc0_clk\0sdemmc0_cmd\0sdemmc0_dat0\0sdemmc0_dat1\0sdemmc0_dat2\0sdemmc0_dat3\0sdemmc0_dat4\0sdemmc0_dat5\0sdemmc0_dat6\0sdemmc0_dat7\0sdemmc0_rstb\0sdemmc0_cdn\0sdemmc0_wp"; + drive-strength = <0x02>; + input-enable; + }; + }; + + sdemmc1_pinctrl { + phandle = <0x16>; + + mux { + pins = "sdemmc1_clk\0sdemmc1_cmd\0sdemmc1_dat0\0sdemmc1_dat1\0sdemmc1_dat2\0sdemmc1_dat3\0sdemmc1_dat4\0sdemmc1_dat5\0sdemmc1_dat6\0sdemmc1_dat7\0sdemmc1_rstb\0sdemmc1_cdn\0sdemmc1_wp"; + function = "sdemmc1"; + }; + }; + + sdemmc1_pinconfig { + phandle = <0x61>; + + config { + pins = "sdemmc1_clk\0sdemmc1_cmd\0sdemmc1_dat0\0sdemmc1_dat1\0sdemmc1_dat2\0sdemmc1_dat3\0sdemmc1_dat4\0sdemmc1_dat5\0sdemmc1_dat6\0sdemmc1_dat7\0sdemmc1_rstb\0sdemmc1_cdn\0sdemmc1_wp"; + drive-strength = <0x0f>; + input-enable; + }; + }; + + debug_pinctrl { + phandle = <0x17>; + + mux { + pins = "debug0\0debug1\0debug2\0debug3\0debug4\0debug5\0debug6\0debug7"; + function = "debug"; + }; + }; + + strap_pinctrl { + + mux { + pins = "gpio_24\0gpio_25\0gpio_26\0gpio_27\0gpio_28\0gpio_29\0spi1_sclk\0i2s0_mck\0i2s0_ck\0gpio_107\0gpio_108"; + function = "strap"; + }; + }; + + vout_pinctrl { + phandle = <0x18>; + + mux { + pins = "vout_r0\0vout_r1\0vout_r2\0vout_r3\0vout_r4\0vout_r5\0vout_r6\0vout_r7\0vout_g0\0vout_g1\0vout_g2\0vout_g3\0vout_g4\0vout_g5\0vout_g6\0vout_g7\0vout_b0\0vout_b1\0vout_b2\0vout_b3\0vout_b4\0vout_b5\0vout_b6\0vout_b7\0vout_hs\0vout_vs\0vout_de\0vout_pclk\0vout_pdb"; + function = "vout"; + }; + }; + + vout_pinconfig { + + config { + pins = "vout_r0\0vout_r1\0vout_r2\0vout_r3\0vout_r4\0vout_r5\0vout_r6\0vout_r7\0vout_g0\0vout_g1\0vout_g2\0vout_g3\0vout_g4\0vout_g5\0vout_g6\0vout_g7\0vout_b0\0vout_b1\0vout_b2\0vout_b3\0vout_b4\0vout_b5\0vout_b6\0vout_b7\0vout_hs\0vout_vs\0vout_de\0vout_pclk\0vout_pdb"; + drive-strength = <0x02>; + input-enable; + }; + }; + + vin_pinctrl { + phandle = <0x19>; + + mux { + pins = "vin_b0\0vin_b1\0vin_b2\0vin_b3\0vin_b4\0vin_de\0vin_g0\0vin_g1\0vin_g2\0vin_g3\0vin_g4\0vin_g5\0vin_hs\0vin_llc\0vin_r0\0vin_r1\0vin_r2\0vin_r3\0vin_r4\0vin_vs"; + function = "vin"; + }; + }; + + vin_pinconfig { + + config { + pins = "vin_b0\0vin_b1\0vin_b2\0vin_b3\0vin_b4\0vin_de\0vin_g0\0vin_g1\0vin_g2\0vin_g3\0vin_g4\0vin_g5\0vin_hs\0vin_llc\0vin_r0\0vin_r1\0vin_r2\0vin_r3\0vin_r4\0vin_vs"; + drive-strength = <0x02>; + input-enable; + }; + }; + + rgmii0_pinctrl { + phandle = <0x5a>; + + mux { + pins = "rgmii0_txd0\0rgmii0_txd1\0rgmii0_txd2\0rgmii0_txd3\0gmii0_txd4\0gmii0_txd5\0gmii0_txd6\0gmii0_txd7\0gmii0_txer\0rgmii0_txctrl\0mii0_txclk\0rgmii0_gtxclk\0rgmii0_rxd0\0rgmii0_rxd1\0rgmii0_rxd2\0rgmii0_rxd3\0gmii0_rxd4\0gmii0_rxd5\0gmii0_rxd6\0gmii0_rxd7\0gmii0_rxer\0rgmii0_rxctrl\0rgmii0_rxclk\0rgmii0_mdio\0rgmii0_mdc\0rgmii0_intr"; + function = "rgmii0"; + }; + }; + + rgmii0_pinconfig { + + config { + pins = "rgmii0_gtxclk\0rgmii0_mdc\0rgmii0_mdio\0rgmii0_rxclk\0rgmii0_rxctrl\0rgmii0_rxd0\0rgmii0_rxd1\0rgmii0_rxd2\0rgmii0_rxd3\0rgmii0_txctrl\0rgmii0_txd0\0rgmii0_txd1\0rgmii0_txd2\0rgmii0_txd3"; + drive-strength = <0x02>; + input-enable; + }; + }; + + rgmii1_pinctrl { + phandle = <0x5b>; + + mux { + pins = "rgmii1_txd0\0rgmii1_txd1\0rgmii1_txd2\0rgmii1_txd3\0mii1_rxer\0mii1_txclk\0rgmii1_txctrl\0rgmii1_gtxclk\0rgmii1_rxd0\0rgmii1_rxd1\0rgmii1_rxd2\0rgmii1_rxd3\0rgmii1_rxctrl\0rgmii1_rxclk\0rgmii1_mdc\0rgmii1_mdio\0rgmii1_intr"; + function = "rgmii1"; + }; + }; + + rgmii1_pinconfig { + + config { + pins = "rgmii1_gtxclk\0rgmii1_mdc\0rgmii1_mdio\0rgmii1_rxclk\0rgmii1_rxctrl\0rgmii1_rxd0\0rgmii1_rxd1\0rgmii1_rxd2\0rgmii1_rxd3\0rgmii1_txctrl\0rgmii1_txd0\0rgmii1_txd1\0rgmii1_txd2\0rgmii1_txd3"; + drive-strength = <0x02>; + input-enable; + }; + }; + + gmii0_pinconfig { + + config { + pins = "gmii0_rxd4\0gmii0_rxd5\0gmii0_rxd6\0gmii0_rxd7\0gmii0_rxer\0gmii0_txd4\0gmii0_txd5\0gmii0_txd6\0gmii0_txd7\0gmii0_txer"; + drive-strength = <0x02>; + input-enable; + }; + }; + + ssd_pinctrl { + phandle = <0x1a>; + + mux { + pins = "sdemmc0_led_ctl\0sdemmc1_led_ctl\0gpio_26\0gpio_27"; + function = "gpio"; + }; + }; + + gnss_pinctrl { + phandle = <0x1b>; + + mux { + pins = "gpio_31\0gpio_12\0pwm1"; + function = "gpio"; + }; + }; + + fan_pinctrl { + phandle = <0x1c>; + + mux { + pins = "gpio_27\0gpio_28"; + function = "gpio"; + }; + }; + + + }; + + isp { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,a1000b-isp"; + memory-region = <0x65 0x66>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x06>; + isp-fw-fbuf-addr = <0xa2000000>; + isp-fw-fbuf-size = <0x10000000>; + dma-coherent; + pinctrl-names = "default"; + pinctrl-0 = <0x67>; + + core@0 { + id = <0x00>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x68>; + phandle = <0x73>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x69>; + phandle = <0x74>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x6a>; + phandle = <0x75>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x6b>; + phandle = <0x76>; + }; + }; + }; + }; + + core@1 { + id = <0x01>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@4 { + remote-endpoint = <0x6c>; + phandle = <0x78>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@5 { + remote-endpoint = <0x6d>; + phandle = <0x79>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@6 { + remote-endpoint = <0x6e>; + phandle = <0x7a>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@7 { + remote-endpoint = <0x6f>; + phandle = <0x7b>; + }; + }; + }; + }; + + core@2 { + id = <0x02>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@8 { + remote-endpoint = <0x70>; + phandle = <0x7d>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@9 { + remote-endpoint = <0x71>; + phandle = <0x7e>; + }; + }; + }; + }; + }; + + csi@0 { + compatible = "bst,a1000b_csi2"; + #address-cells = <0x01>; + #size-cells = <0x00>; + clock-lanes = <0x00>; + data-lanes = <0x01 0x02>; + lane-speed = <0x960>; + id = <0x00>; + resets = <0x06 0x0d>; + reset-names = "csi0_reset"; + + csi-link { + + ports { + + port@0 { + + endpoint@0 { + remote-endpoint = <0x72>; + phandle = <0x21>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x73>; + phandle = <0x68>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x74>; + phandle = <0x69>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x75>; + phandle = <0x6a>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x76>; + phandle = <0x6b>; + }; + }; + }; + }; + + csi@1 { + compatible = "bst,a1000b_csi2"; + #address-cells = <0x01>; + #size-cells = <0x00>; + clock-lanes = <0x00>; + data-lanes = <0x01 0x02 0x03 0x04>; + lane-speed = <0x640>; + id = <0x01>; + resets = <0x06 0x0e>; + reset-names = "csi1_reset"; + + csi-link { + + ports { + + port@0 { + + endpoint@0 { + remote-endpoint = <0x77>; + phandle = <0x26>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x78>; + phandle = <0x6c>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x79>; + phandle = <0x6d>; + }; + }; + + port@2 { + reg = <0x02>; + + endpoint@2 { + remote-endpoint = <0x7a>; + phandle = <0x6e>; + }; + }; + + port@3 { + reg = <0x03>; + + endpoint@3 { + remote-endpoint = <0x7b>; + phandle = <0x6f>; + }; + }; + }; + }; + + csi@3 { + compatible = "bst,a1000b-csi2-2x2"; + #address-cells = <0x01>; + #size-cells = <0x00>; + clock-lanes = <0x00>; + data-lanes = <0x01 0x02>; + lane-speed = <0x960>; + resets = <0x06 0x10>; + reset-names = "csi2_reset"; + id = <0x03>; + + csi-link { + + ports { + + port@0 { + + endpoint@0 { + remote-endpoint = <0x7c>; + phandle = <0x2b>; + }; + }; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x7d>; + phandle = <0x70>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint@1 { + remote-endpoint = <0x7e>; + phandle = <0x71>; + }; + }; + }; + }; + + chosen { + bootargs = "earlycon=uart8250,mmio32,0x20008000 console=ttyS0,115200n8 memreserve=64M@0xf8000000 rdinit=/sbin/init root=/dev/mmcblk0p7 rw"; + stdout-path = "uart0"; + }; + + aliases { + // uart0 = "/amba_apu/serial@20008000"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x00 0x80000000 0x00 0x70000000>; + }; + + // memory@1b0000000 { + // device_type = "memory"; + // reg = <0x01 0xb0000000 0x00 0x40000000>; + // }; + + reserved-memory { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + // linux,cma@88000000 { + // compatible = "shared-dma-pool"; + // reusable; + // reg = <0x0 0x84000000 0x0 0x07000000>; + // linux,cma-default; + // }; + + pcie_ctrl@8fd00000 { + compatible = "bst,pcie-ctrl"; + reg = <0x00 0x8fd00000 0x00 0x100000>; + no-map; + phandle = <0x0c>; + }; + + bst_atf@8b000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x8b000000 0x00 0x2000000>; + no-map; + }; + + bst_tee@8fec0000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x8fec0000 0x00 0x40000>; + no-map; + phandle = <0x82>; + }; + + bstn_cma@8ff00000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x8ff00000 0x00 0x100000>; + no-map; + phandle = <0x7f>; + }; + + bstn@90000000 { + compatible = "bst,bstn"; + reg = <0x00 0x90000000 0x00 0x2000000>; + no-map; + }; + + bst_lwnn@92000000 { + compatible = "bst,bst_lwnn"; + reg = <0x00 0x92000000 0x00 0x2000000>; + no-map; + }; + + bst_lwnn@94000000 { + compatible = "bst,bst_lwnn"; + reg = <0x00 0x94000000 0x00 0x2000000>; + no-map; + }; + + bst_cv@96000000 { + compatible = "bst,bst_cv"; + reg = <0x00 0x96000000 0x00 0x4000000>; + no-map; + }; + + bst_cv_cma@9a000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9a000000 0x00 0x2000000>; + align-shift = <0x08>; + no-map; + phandle = <0x80>; + }; + + vsp@0x9c000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0x9c000000 0x00 0x1000000>; + no-map; + phandle = <0x81>; + }; + + vsp_fw@0x9d000000 { + reg = <0x00 0x9d000000 0x00 0x4000000>; + no-map; + }; + + bst_isp@0xa1000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xa1000000 0x00 0x1000000>; + no-map; + phandle = <0x65>; + }; + + bst_isp_fw@0xa2000000 { + reg = <0x00 0xa2000000 0x00 0x10000000>; + no-map; + }; + + coreip_pub_cma@0xb2000000 { + compatible = "shared-dma-pool"; + align-shift = <0x08>; + reg = <0x00 0xb2000000 0x00 0x36000000>; + reusable; + phandle = <0x66>; + }; + + noc_pmu@0xe8000000 { + compatible = "shared-dma-pool"; + reg = <0x00 0xe8000000 0x00 0x800000>; + reusable; + phandle = <0x43>; + }; + + + ddr0@0xf0000000 { + reg = <0x00 0xf0000000 0x00 0x10000000>; + no-map; + }; + + ddr1@0x1f0000000 { + reg = <0x01 0xf0000000 0x00 0x10000000>; + no-map; + }; + }; + + mbox-poll-clients { + compatible = "bst,ipc-mbox-client"; + reg = <0xfec00020 0x08 0x52030090 0x08 0x53090008 0x08 0xfec00028 0x08>; + #mbox-cells = <0x01>; + phandle = <0x0e>; + }; + + bstn-mbox { + compatible = "bstn,bstn-mbox"; + reg = <0x00 0x33102000 0x00 0x2000 0x00 0x33100000 0x00 0x2000 0x00 0x80000000 0x00 0x04 0x00 0x80002000 0x00 0x04>; + fpga-reset = <0x01>; + memory-region = <0x7f>; + assigned-mem-size = <0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x71 0xff04 0x00 0x72 0xff04 0x00 0x73 0xff04 0x00 0x74 0xff04 0x00 0x75 0xff04 0x00 0x76 0xff04 0x00 0x77 0xff04 0x00 0x78 0xff04>; + #mbox-cells = <0x01>; + phandle = <0xea>; + }; + + bstn@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bstn-a1000b,cma"; + reg = <0x00 0x50020000 0x00 0x100 0x00 0x90000000 0x00 0x2000000>; + memory-region = <0x66>; + rmem-base = <0x00 0xb2000000>; + rmem-size = <0x00 0x36000000>; + id = <0x00>; + assigned-mem-size = <0x1000>; + bus-offset = <0x00 0x00>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x08>; + firmware = "bstn_dsp_rtos.rbf"; + }; + + bst_cv@0x51030000 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst_cv,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x96000000 0x00 0x2000000 0x00 0x98000000 0x00 0x2000000 0x00 0x92000000 0x00 0x2000000 0x00 0x94000000 0x00 0x2000000>; + memory-region = <0x80>; + assigned-mem-size = <0x4000>; + bus-offset = <0x00 0x00>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x09>; + dsp-num = <0x04>; + ipc-register-addr = <0x8ff00000>; + + dsp@0x96000000 { + index = <0x00>; + firmware = "bst_cv_dsp_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x967ff000>; + ipc-src-core = <0x03>; + }; + + dsp@0x98000000 { + index = <0x01>; + firmware = "bst_cv_dsp1_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x987ff000>; + ipc-src-core = <0x03>; + }; + + dsp@0x92000000 { + index = <0x02>; + firmware = "bst_cv_dsp2_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x927ff000>; + ipc-src-core = <0x03>; + }; + + dsp@0x94000000 { + index = <0x03>; + firmware = "bst_cv_dsp3_rt.rbf"; + assigned-mem-size = <0x1000>; + rt-init-addr = <0x947ff000>; + ipc-src-core = <0x03>; + }; + }; + + bst_gwarp_scaler@0x51060000 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst_gwarp_scaler,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x51050000 0x00 0x100 0x00 0x51060000 0x00 0x100>; + memory-region = <0x66>; + id = <0x00>; + bus-offset = <0x00 0x00>; + assigned-mem-size = <0x1000>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9b 0x04>; + interrupt-names = "bst_cv_irq"; + }; + + bare_cv@51030000 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bare_cv,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x96000000 0x00 0x1000000 0x00 0x98000000 0x00 0x1000000 0x00 0x97000000 0x00 0x1000000 0x00 0x99000000 0x00 0x1000000>; + memory-region = <0x80>; + id = <0x01>; + assigned-mem-size = <0x2000000 0x2000000 0x2000000 0x2000000>; + bus-offset = <0x00 0x00>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x09>; + firmware = "bstcv0.rbf\0bstcv1.rbf\0bstcv2.rbf\0bstcv3.rbf"; + }; + + bst_lwnn@0x51030000 { + compatible = "bst,bst_lwnn-a1000b,cma"; + reg = <0x00 0x51030000 0x00 0x100 0x00 0x92000000 0x00 0x2000000 0x00 0x94000000 0x00 0x2000000>; + memory-region = <0x66>; + bus-offset = <0x00 0x00>; + mbox-names = "bst-lwnn-mbox"; + dsp-num = <0x02>; + ipc-register-addr = <0x8ff00000>; + + dsp@0x92000000 { + index = <0x02>; + firmware = "bst_lwnn_dsp2_rt.rbf"; + assigned-mem-size = <0x2000>; + rt-init-addr = <0x927ff000>; + ipc-src-core = <0x06>; + }; + + dsp@0x94000000 { + index = <0x03>; + firmware = "bst_lwnn_dsp3_rt.rbf"; + assigned-mem-size = <0x2000>; + rt-init-addr = <0x947ff000>; + ipc-src-core = <0x00>; + }; + }; + + ipc_vsp@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-vsp-ipc"; + reg = <0x00 0x9c000000 0x00 0x100000 0x00 0x9c100000 0x00 0x80000 0x00 0x9c180000 0x00 0x80000 0x00 0x53090004 0x00 0x04 0x00 0x53090010 0x00 0x0c 0x00 0x33102fbc 0x00 0x04 0x00 0x9d000000 0x00 0x4000000>; + memory-region = <0x81>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x07>; + }; + + vsp@1 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-vsp"; + memory-region = <0x66>; + assigned-mem-size = <0x1000>; + clocks = <0x05 0x43>; + clock-names = "vout_display_clk"; + output-format = "HDMI_RGB"; + output-hsize = <0x780>; + output-vsize = <0x438>; + output-fresh = <0x3c>; + }; + + gmwarp@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-gmwarp"; + memory-region = <0x66>; + }; + + encoder@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,bst-encoder"; + memory-region = <0x66>; + }; + + codec_dma_buf@0 { + compatible = "bst,dma_buf_te"; + memory-region = <0x66>; + }; + + firmware { + + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + chip-number = <0x02>; + }; + }; + + tee { + #address-cells = <0x02>; + #size-cells = <0x02>; + reg = <0x00 0x18060000 0x00 0x20000>; + memory-region = <0x82>; + mbox-names = "bstn-mbox"; + chip-number = <0x01>; + }; + + ipc_arm0@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm0"; + reg = <0x04 0xfec00000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7f>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x00>; + }; + + ipc_arm3@3 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm3"; + reg = <0x04 0xfec10000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7f>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x03>; + }; + + ipc_arm2@2 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm2"; + reg = <0x04 0xfec10000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7f>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x02>; + }; + + ipc_arm1@1 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,arm1"; + reg = <0x04 0xfec10000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7f>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x01>; + }; + + ipc@0 { + #address-cells = <0x02>; + #size-cells = <0x02>; + compatible = "bst,ipc"; + reg = <0x04 0xfec00000 0x00 0x20 0x04 0x80000000 0x00 0x20000>; + memory-region = <0x7f>; + assigned-mem-size = <0x1000>; + mbox-names = "bstn-mbox"; + mboxes = <0xea 0x05>; + }; +}; diff --git a/configs/vms/linux-aarch64-a1000-smp8.toml b/configs/vms/linux-aarch64-a1000-smp8.toml new file mode 100644 index 00000000..f9767d4a --- /dev/null +++ b/configs/vms/linux-aarch64-a1000-smp8.toml @@ -0,0 +1,57 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 8 +# The physical CPU ids. +phys_cpu_ids = [0x00, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700] +# Guest vm physical cpu sets. +phys_cpu_sets = [1, 2, 4, 8, 16, 32, 64, 128] + + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x1_ce80_0000 +# The location of image: "memory" | "fs". +# Load from memory. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x1_ce80_0000 +## The file path of the kernel image. +kernel_path = "/path/to/kernel" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x1_cef0_0000 +dtb_path = "/path/to/dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x8000_0000, 0x2000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] +# +# Device specifications +# +[devices] +# The interrupt mode. +interrupt_mode = "passthrough" +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ +["most-devices", 0x0, 0x0, 0x8000_0000, 0x1], +["memory", 0x8000_0000, 0x8000_0000, 0x7000_0000, 0x1] +] +excluded_devices = [ + # ["/gic-v3"], +] \ No newline at end of file diff --git a/configs/vms/linux-aarch64-e2000-smp1.dts b/configs/vms/linux-aarch64-e2000-smp1.dts new file mode 100644 index 00000000..18d68f0f --- /dev/null +++ b/configs/vms/linux-aarch64-e2000-smp1.dts @@ -0,0 +1,1302 @@ +/dts-v1/; + +/memreserve/ 0x0000000080000000 0x0000000000010000; +/ { + compatible = "phytium,pe2204"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Phytium Pi Board"; + + // memory@01 { + // device_type = "memory"; + // reg = <0x20 0x40000000 0x00 0x40000000>; + // numa-node-id = <0x00>; + // }; + + aliases { + serial0 = "/soc/uart@2800c000"; + serial1 = "/soc/uart@2800d000"; + serial2 = "/soc/uart@2800e000"; + serial3 = "/soc/uart@2800f000"; + ethernet0 = "/soc/ethernet@3200c000"; + ethernet1 = "/soc/ethernet@3200e000"; + ethernet2 = "/soc/ethernet@32010000"; + ethernet3 = "/soc/ethernet@32012000"; + serial4 = "/soc/uart@28014000"; + serial5 = "/soc/uart@2802A000"; + serial6 = "/soc/uart@28032000"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + firmware { + + scmi { + compatible = "arm,scmi"; + mboxes = <0x02 0x00>; + mbox-names = "tx"; + shmem = <0x03>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + protocol@13 { + reg = <0x13>; + #clock-cells = <0x01>; + phandle = <0x09>; + }; + + protocol@15 { + reg = <0x15>; + #thermal-sensor-cells = <0x01>; + phandle = <0x04>; + }; + }; + + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + thermal-zones { + + sensor0 { + polling-delay-passive = <0x64>; + polling-delay = <0x3e8>; + thermal-sensors = <0x04 0x00>; + }; + + sensor1 { + polling-delay-passive = <0x64>; + polling-delay = <0x3e8>; + thermal-sensors = <0x04 0x01>; + }; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu-map { + + // cluster0 { + + // core0 { + // cpu = <0x05>; + // }; + // }; + + cluster1 { + + core0 { + cpu = <0x06>; + }; + }; + + // cluster2 { + + // core0 { + // cpu = <0x07>; + // }; + + // core1 { + // cpu = <0x08>; + // }; + // }; + }; + + // cpu@0 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x200>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x07>; + // }; + + // cpu@1 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x201>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x08>; + // }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x00>; + // enable-method = "psci"; + // clocks = <0x09 0x00>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x05>; + // }; + + cpu@101 { + device_type = "cpu"; + compatible = "phytium,ftc664\0arm,armv8"; + reg = <0x00 0x100>; + enable-method = "psci"; + clocks = <0x09 0x01>; + capacity-dmips-mhz = <0x161c>; + phandle = <0x06>; + }; + }; + + interrupt-controller@30800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>; + interrupts = <0x01 0x09 0x08>; + phandle = <0x01>; + + gic-its@30820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x00 0x30820000 0x00 0x20000>; + phandle = <0x0f>; + }; + }; + + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0x01 0x07 0x08>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>; + clock-frequency = <0x2faf080>; + }; + + clocks { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + clk48mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2dc6c00>; + phandle = <0x13>; + }; + + clk50mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2faf080>; + phandle = <0x0d>; + }; + + clk100mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x5f5e100>; + phandle = <0x0c>; + }; + + clk200mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbebc200>; + phandle = <0x11>; + }; + + clk250mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xee6b280>; + phandle = <0x12>; + }; + + clk300mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x11e1a300>; + phandle = <0x0b>; + }; + + clk600mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x23c34600>; + phandle = <0x0e>; + }; + + clk1200mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x47868c00>; + phandle = <0x0a>; + }; + }; + + iommu@30000000 { + compatible = "arm,smmu-v3"; + reg = <0x00 0x30000000 0x00 0x800000>; + interrupts = <0x00 0xf0 0x01 0x00 0xef 0x01 0x00 0xec 0x01 0x00 0xf2 0x01>; + interrupt-names = "eventq\0priq\0cmdq-sync\0gerror"; + dma-coherent; + #iommu-cells = <0x01>; + phandle = <0x10>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + dma-coherent; + ranges; + + mmc@28000000 { + compatible = "phytium,mci"; + reg = <0x00 0x28000000 0x00 0x1000>; + interrupts = <0x00 0x48 0x04>; + clocks = <0x0a>; + clock-names = "phytium_mci_clk"; + status = "okay"; + bus-width = <0x04>; + max-frequency = <0x2faf080>; + cap-sdio-irq; + cap-sd-highspeed; + no-mmc; + }; + + mmc@28001000 { + compatible = "phytium,mci"; + reg = <0x00 0x28001000 0x00 0x1000>; + interrupts = <0x00 0x49 0x04>; + clocks = <0x0a>; + clock-names = "phytium_mci_clk"; + status = "okay"; + bus-width = <0x04>; + max-frequency = <0x2faf080>; + cap-sdio-irq; + cap-sd-highspeed; + no-mmc; + no-sd; + non-removable; + }; + + nand@28002000 { + compatible = "phytium,nfc"; + reg = <0x00 0x28002000 0x00 0x1000>; + interrupts = <0x00 0x4a 0x04>; + status = "disabled"; + }; + + ddma@28003000 { + compatible = "phytium,ddma"; + reg = <0x00 0x28003000 0x00 0x1000>; + interrupts = <0x00 0x4b 0x04>; + #dma-cells = <0x02>; + dma-channels = <0x08>; + }; + + ddma@28004000 { + compatible = "phytium,ddma"; + reg = <0x00 0x28004000 0x00 0x1000>; + interrupts = <0x00 0x4c 0x04>; + #dma-cells = <0x02>; + dma-channels = <0x08>; + }; + + spi@28008000 { + compatible = "phytium,qspi-nor"; + reg = <0x00 0x28008000 0x00 0x1000 0x00 0x00 0x00 0xfffffff>; + reg-names = "qspi\0qspi_mm"; + clocks = <0x0b>; + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x00>; + spi-rx-bus-width = <0x01>; + spi-max-frequency = <0x1312d00>; + status = "okay"; + }; + }; + + uart@2800c000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800c000 0x00 0x1000>; + interrupts = <0x00 0x53 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800d000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800d000 0x00 0x1000>; + interrupts = <0x00 0x54 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800e000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800e000 0x00 0x1000>; + interrupts = <0x00 0x55 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800f000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800f000 0x00 0x1000>; + interrupts = <0x00 0x56 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + lpc@28010000 { + compatible = "simple-mfd\0syscon"; + reg = <0x00 0x28010000 0x00 0x1000>; + reg-io-width = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x28010000 0x1000>; + + kcs@24 { + compatible = "phytium,kcs-bmc"; + reg = <0x24 0x01 0x30 0x01 0x3c 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@28 { + compatible = "phytium,kcs-bmc"; + reg = <0x28 0x01 0x34 0x01 0x40 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@2c { + compatible = "phytium,kcs-bmc"; + reg = <0x2c 0x01 0x38 0x01 0x44 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@8c { + compatible = "phytium,kcs-bmc"; + reg = <0x8c 0x01 0x90 0x01 0x94 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + bt@48 { + compatible = "phytium,bt-bmc"; + reg = <0x48 0x20>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + }; + + gpio@28034000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28034000 0x00 0x1000>; + interrupts = <0x00 0x6c 0x04 0x00 0x6d 0x04 0x00 0x6e 0x04 0x00 0x6f 0x04 0x00 0x70 0x04 0x00 0x71 0x04 0x00 0x72 0x04 0x00 0x73 0x04 0x00 0x74 0x04 0x00 0x75 0x04 0x00 0x76 0x04 0x00 0x77 0x04 0x00 0x78 0x04 0x00 0x79 0x04 0x00 0x7a 0x04 0x00 0x7b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28035000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28035000 0x00 0x1000>; + interrupts = <0x00 0x7c 0x04 0x00 0x7d 0x04 0x00 0x7e 0x04 0x00 0x7f 0x04 0x00 0x80 0x04 0x00 0x81 0x04 0x00 0x82 0x04 0x00 0x83 0x04 0x00 0x84 0x04 0x00 0x85 0x04 0x00 0x86 0x04 0x00 0x87 0x04 0x00 0x88 0x04 0x00 0x89 0x04 0x00 0x8a 0x04 0x00 0x8b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x14>; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28036000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28036000 0x00 0x1000>; + interrupts = <0x00 0x8c 0x04 0x00 0x8d 0x04 0x00 0x8e 0x04 0x00 0x8f 0x04 0x00 0x90 0x04 0x00 0x91 0x04 0x00 0x92 0x04 0x00 0x93 0x04 0x00 0x94 0x04 0x00 0x95 0x04 0x00 0x96 0x04 0x00 0x97 0x04 0x00 0x98 0x04 0x00 0x99 0x04 0x00 0x9a 0x04 0x00 0x9b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x15>; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28037000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28037000 0x00 0x1000>; + interrupts = <0x00 0x9c 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28038000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28038000 0x00 0x1000>; + interrupts = <0x00 0x9d 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28039000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28039000 0x00 0x1000>; + interrupts = <0x00 0x9e 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + spi@2803a000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803a000 0x00 0x1000>; + interrupts = <0x00 0x9f 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + global-cs = <0x01>; + + spidev@0 { + compatible = "spidev"; + reg = <0x00>; + spi-max-frequency = <0x2faf080>; + status = "disabled"; + }; + }; + + spi@2803b000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803b000 0x00 0x1000>; + interrupts = <0x00 0xa0 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@2803c000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803c000 0x00 0x1000>; + interrupts = <0x00 0xa1 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@2803d000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803d000 0x00 0x1000>; + interrupts = <0x00 0xa2 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + watchdog@28040000 { + compatible = "arm,sbsa-gwdt"; + reg = <0x00 0x28041000 0x00 0x1000 0x00 0x28040000 0x00 0x1000>; + interrupts = <0x00 0xa4 0x04>; + timeout-sec = <0x1e>; + status = "okay"; + }; + + watchdog@28042000 { + compatible = "arm,sbsa-gwdt"; + reg = <0x00 0x28043000 0x00 0x1000 0x00 0x28042000 0x00 0x1000>; + interrupts = <0x00 0xa5 0x04>; + timeout-sec = <0x1e>; + status = "okay"; + }; + + pwm@2804a000 { + compatible = "phytium,pwm"; + reg = <0x00 0x2804a000 0x00 0x1000>; + interrupts = <0x00 0xad 0x04>; + clocks = <0x0d>; + status = "okay"; + phytium,db = <0x00 0x00 0x64 0x3e8 0x3e8 0x00>; + }; + + pwm@2804b000 { + compatible = "phytium,pwm"; + reg = <0x00 0x2804b000 0x00 0x1000>; + interrupts = <0x00 0xae 0x04>; + clocks = <0x0d>; + status = "okay"; + phytium,db = <0x00 0x00 0x64 0x3e8 0x3e8 0x00>; + }; + + tacho@28054000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28054000 0x00 0x1000>; + interrupts = <0x00 0xc2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28055000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28055000 0x00 0x1000>; + interrupts = <0x00 0xc3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28056000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28056000 0x00 0x1000>; + interrupts = <0x00 0xc4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28057000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28057000 0x00 0x1000>; + interrupts = <0x00 0xc5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28058000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28058000 0x00 0x1000>; + interrupts = <0x00 0xc6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28059000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28059000 0x00 0x1000>; + interrupts = <0x00 0xc7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805a000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805a000 0x00 0x1000>; + interrupts = <0x00 0xc8 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805b000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805b000 0x00 0x1000>; + interrupts = <0x00 0xc9 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805c000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805c000 0x00 0x1000>; + interrupts = <0x00 0xca 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805d000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805d000 0x00 0x1000>; + interrupts = <0x00 0xcb 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805e000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805e000 0x00 0x1000>; + interrupts = <0x00 0xcc 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805f000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805f000 0x00 0x1000>; + interrupts = <0x00 0xcd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28060000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28060000 0x00 0x1000>; + interrupts = <0x00 0xce 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28061000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28061000 0x00 0x1000>; + interrupts = <0x00 0xcf 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28062000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28062000 0x00 0x1000>; + interrupts = <0x00 0xd0 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28063000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28063000 0x00 0x1000>; + interrupts = <0x00 0xd1 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28064000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28064000 0x00 0x1000>; + interrupts = <0x00 0xd2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28065000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28065000 0x00 0x1000>; + interrupts = <0x00 0xd3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28066000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28066000 0x00 0x1000>; + interrupts = <0x00 0xd4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28067000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28067000 0x00 0x1000>; + interrupts = <0x00 0xd5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28068000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28068000 0x00 0x1000>; + interrupts = <0x00 0xd6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28069000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28069000 0x00 0x1000>; + interrupts = <0x00 0xd7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806a000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806a000 0x00 0x1000>; + interrupts = <0x00 0xd8 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806b000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806b000 0x00 0x1000>; + interrupts = <0x00 0xd9 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806c000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806c000 0x00 0x1000>; + interrupts = <0x00 0xda 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806d000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806d000 0x00 0x1000>; + interrupts = <0x00 0xdb 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806e000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806e000 0x00 0x1000>; + interrupts = <0x00 0xdc 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806f000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806f000 0x00 0x1000>; + interrupts = <0x00 0xdd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28070000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28070000 0x00 0x1000>; + interrupts = <0x00 0xde 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28071000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28071000 0x00 0x1000>; + interrupts = <0x00 0xdf 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28072000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28072000 0x00 0x1000>; + interrupts = <0x00 0xe0 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28073000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28073000 0x00 0x1000>; + interrupts = <0x00 0xe1 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28074000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28074000 0x00 0x1000>; + interrupts = <0x00 0xe2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28075000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28075000 0x00 0x1000>; + interrupts = <0x00 0xe3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28076000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28076000 0x00 0x1000>; + interrupts = <0x00 0xe4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28077000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28077000 0x00 0x1000>; + interrupts = <0x00 0xe5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28078000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28078000 0x00 0x1000>; + interrupts = <0x00 0xe6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28079000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28079000 0x00 0x1000>; + interrupts = <0x00 0xe7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + usb2@31800000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31800000 0x00 0x80000 0x00 0x31990000 0x00 0x10000>; + interrupts = <0x00 0x20 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + usb2@31880000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31880000 0x00 0x80000 0x00 0x319a0000 0x00 0x10000>; + interrupts = <0x00 0x21 0x04>; + status = "disabled"; + dr_mode = "peripheral"; + }; + + usb2@31900000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31900000 0x00 0x80000 0x00 0x319b0000 0x00 0x10000>; + interrupts = <0x00 0x22 0x04>; + status = "disabled"; + dr_mode = "peripheral"; + }; + + usb2@32800000 { + compatible = "phytium,usb2"; + reg = <0x00 0x32800000 0x00 0x40000 0x00 0x32880000 0x00 0x40000>; + interrupts = <0x00 0x0e 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + usb2@32840000 { + compatible = "phytium,usb2"; + reg = <0x00 0x32840000 0x00 0x40000 0x00 0x328c0000 0x00 0x40000>; + interrupts = <0x00 0x0f 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + dc@32000000 { + compatible = "phytium,dc"; + reg = <0x00 0x32000000 0x00 0x8000>; + interrupts = <0x00 0x2c 0x04>; + status = "okay"; + pipe_mask = [01]; + edp_mask = [00]; + }; + + i2s_dp0@32009000 { + compatible = "phytium,i2s"; + reg = <0x00 0x32009000 0x00 0x1000 0x00 0x32008000 0x00 0x1000>; + interrupts = <0x00 0x2f 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + dai-name = "phytium-i2s-dp0"; + status = "okay"; + }; + + i2s_dp1@3200B000 { + compatible = "phytium,i2s"; + reg = <0x00 0x3200b000 0x00 0x1000 0x00 0x3200a000 0x00 0x1000>; + interrupts = <0x00 0x30 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + dai-name = "phytium-i2s-dp1"; + status = "disabled"; + }; + + pmdk_dp { + compatible = "phytium,pmdk-dp"; + status = "okay"; + num-dp = <0x01>; + dp-mask = [01]; + }; + + mailbox@32a00000 { + compatible = "phytium,mbox"; + reg = <0x00 0x32a00000 0x00 0x1000>; + interrupts = <0x00 0x16 0x04>; + #mbox-cells = <0x01>; + phandle = <0x02>; + }; + + rng@32a36000 { + compatible = "phytium,rng"; + reg = <0x00 0x32a36000 0x00 0x1000>; + status = "okay"; + }; + + sram@32a10000 { + compatible = "phytium,pe220x-sram-ns\0mmio-sram"; + reg = <0x00 0x32a10000 0x00 0x2000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x32a10000 0x2000>; + + scp-shmem@0 { + compatible = "arm,scmi-shmem"; + reg = <0x1000 0x400>; + }; + + scp-shmem@1 { + compatible = "arm,scmi-shmem"; + reg = <0x1400 0x400>; + phandle = <0x03>; + }; + }; + + gdma@32b34000 { + compatible = "phytium,gdma"; + dma-channels = <0x10>; + max-outstanding = <0x10>; + reg = <0x00 0x32b34000 0x00 0x1000>; + interrupts = <0x00 0xea 0x04>; + #dma-cells = <0x01>; + }; + + spinlock@32b36000 { + compatible = "phytium,hwspinlock"; + reg = <0x00 0x32b36000 0x00 0x1000>; + #hwlock-cells = <0x01>; + nr-locks = <0x20>; + status = "disabled"; + }; + + pcie@40000000 { + compatible = "pci-host-ecam-generic"; + device_type = "pci"; + #address-cells = <0x03>; + #size-cells = <0x02>; + #interrupt-cells = <0x01>; + reg = <0x00 0x40000000 0x00 0x10000000>; + msi-parent = <0x0f>; + bus-range = <0x00 0xff>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x02 0x01 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x03 0x01 0x00 0x00 0x00 0x06 0x04 0x00 0x00 0x00 0x04 0x01 0x00 0x00 0x00 0x07 0x04>; + ranges = <0x1000000 0x00 0x00 0x00 0x50000000 0x00 0xf00000 0x2000000 0x00 0x58000000 0x00 0x58000000 0x00 0x28000000 0x3000000 0x10 0x00 0x10 0x00 0x10 0x00>; + iommu-map = <0x00 0x10 0x00 0x10000>; + status = "okay"; + }; + + edac@32b28000 { + compatible = "phytium,pe220x-edac"; + reg = <0x00 0x32b28000 0x00 0x1000 0x00 0x31400000 0x00 0x1000 0x00 0x31401000 0x00 0x1000>; + interrupts = <0x00 0x00 0x04 0x00 0x01 0x04>; + status = "disabled"; + }; + + hda@28006000 { + compatible = "phytium,hda"; + reg = <0x00 0x28006000 0x00 0x1000>; + interrupts = <0x00 0x4e 0x04>; + status = "disabled"; + }; + + i2s@28009000 { + compatible = "phytium,i2s"; + reg = <0x00 0x28009000 0x00 0x1000 0x00 0x28005000 0x00 0x1000>; + interrupts = <0x00 0x4d 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + status = "okay"; + #sound-dai-cells = <0x00>; + dai-name = "phytium-i2s-lsd"; + phandle = <0x16>; + }; + + can@2800a000 { + compatible = "phytium,canfd"; + reg = <0x00 0x2800a000 0x00 0x1000>; + interrupts = <0x00 0x51 0x04>; + clocks = <0x11>; + clock-names = "can_clk"; + tx-fifo-depth = <0x40>; + rx-fifo-depth = <0x40>; + status = "okay"; + }; + + can@2800b000 { + compatible = "phytium,canfd"; + reg = <0x00 0x2800b000 0x00 0x1000>; + interrupts = <0x00 0x52 0x04>; + clocks = <0x11>; + clock-names = "can_clk"; + tx-fifo-depth = <0x40>; + rx-fifo-depth = <0x40>; + status = "okay"; + }; + + keypad@2807a000 { + compatible = "phytium,keypad"; + reg = <0x00 0x2807a000 0x00 0x1000>; + interrupts = <0x00 0xbd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + usb3@31a08000 { + compatible = "phytium,pe220x-xhci"; + reg = <0x00 0x31a08000 0x00 0x18000>; + interrupts = <0x00 0x10 0x04>; + status = "okay"; + }; + + usb3@31a28000 { + compatible = "phytium,pe220x-xhci"; + reg = <0x00 0x31a28000 0x00 0x18000>; + interrupts = <0x00 0x11 0x04>; + status = "okay"; + }; + + sata@31a40000 { + compatible = "generic-ahci"; + reg = <0x00 0x31a40000 0x00 0x1000>; + interrupts = <0x00 0x2a 0x04>; + status = "disabled"; + }; + + sata@32014000 { + compatible = "generic-ahci"; + reg = <0x00 0x32014000 0x00 0x1000>; + interrupts = <0x00 0x2b 0x04>; + status = "disabled"; + }; + + ethernet@3200c000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x3200c000 0x00 0x2000>; + interrupts = <0x00 0x37 0x04 0x00 0x38 0x04 0x00 0x39 0x04 0x00 0x3a 0x04 0x00 0x1c 0x04 0x00 0x1d 0x04 0x00 0x1e 0x04 0x00 0x1f 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + support-tsn; + status = "okay"; + phy-mode = "sgmii"; + use-mii; + }; + + ethernet@3200e000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x3200e000 0x00 0x2000>; + interrupts = <0x00 0x3b 0x04 0x00 0x3c 0x04 0x00 0x3d 0x04 0x00 0x3e 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "okay"; + phy-mode = "sgmii"; + use-mii; + }; + + ethernet@32010000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x32010000 0x00 0x2000>; + interrupts = <0x00 0x40 0x04 0x00 0x41 0x04 0x00 0x42 0x04 0x00 0x43 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "disabled"; + }; + + ethernet@32012000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x32012000 0x00 0x2000>; + interrupts = <0x00 0x44 0x04 0x00 0x45 0x04 0x00 0x46 0x04 0x00 0x47 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "disabled"; + }; + + vpu@32b00000 { + compatible = "phytium,vpu"; + reg = <0x00 0x32b00000 0x00 0x20000>; + interrupts = <0x00 0x0c 0x04>; + status = "okay"; + }; + + i2c@28026000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28026000 0x00 0x1000>; + interrupts = <0x00 0x65 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + i2c@28030000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28030000 0x00 0x1000>; + interrupts = <0x00 0x6a 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + es8336@10 { + #sound-dai-cells = <0x00>; + compatible = "everest,es8336"; + reg = <0x10>; + phandle = <0x17>; + }; + }; + + uart@28014000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x28014000 0x00 0x1000>; + interrupts = <0x00 0x5c 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + i2c@28016000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28016000 0x00 0x1000>; + interrupts = <0x00 0x5d 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + i2c@28024000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28024000 0x00 0x1000>; + interrupts = <0x00 0x64 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + uart@2802A000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2802a000 0x00 0x1000>; + interrupts = <0x00 0x67 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@28032000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x28032000 0x00 0x1000>; + interrupts = <0x00 0x6b 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + }; + + chosen { + bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait rw cma=256m ;"; + stdout-path = "serial1:115200n8"; + }; + + memory { + device_type = "memory"; + reg = <0x20 0x40000000 0x00 0x40000000>; + }; + + leds { + compatible = "gpio-leds"; + + sysled { + label = "sysled"; + gpios = <0x14 0x05 0x00>; + linux,default-trigger = "none"; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "phytium,pe220x-i2s-audio"; + simple-audio-card,pin-switches = "mic-in"; + simple-audio-card,widgets = "Microphone\0mic-in\0Headphone\0Headphones"; + simple-audio-card,routing = "MIC2\0mic-in"; + simple-audio-card,hp-det-gpio = <0x15 0x0b 0x01>; + + simple-audio-card,cpu { + sound-dai = <0x16>; + }; + + simple-audio-card,codec { + sound-dai = <0x17>; + }; + }; +}; diff --git a/configs/vms/linux-aarch64-e2000-smp1.toml b/configs/vms/linux-aarch64-e2000-smp1.toml new file mode 100644 index 00000000..ece732d1 --- /dev/null +++ b/configs/vms/linux-aarch64-e2000-smp1.toml @@ -0,0 +1,56 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# The physical CPU ids. +phys_cpu_ids = [0x100] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x20_4008_0000 +# The location of image: "memory" | "fs". +# Load from file system. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x20_4008_0000 +## The file path of the kernel image. +kernel_path = "/path/to/Image" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x20_4000_0000 +#dtb_path = "/path/to/axvisor/configs/vms/linux-aarch64-e2000_smp1.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x20_4000_0000, 0x4000_0000, 0x7, 1], # System RAM MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +interrupt_mode = "passthrough" +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] \ No newline at end of file diff --git a/configs/vms/linux-aarch64-e2000-smp2.dts b/configs/vms/linux-aarch64-e2000-smp2.dts new file mode 100644 index 00000000..0d3b86b4 --- /dev/null +++ b/configs/vms/linux-aarch64-e2000-smp2.dts @@ -0,0 +1,1302 @@ +/dts-v1/; + +/memreserve/ 0x0000000080000000 0x0000000000010000; +/ { + compatible = "phytium,pe2204"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Phytium Pi Board"; + + // memory@01 { + // device_type = "memory"; + // reg = <0x20 0x00000000 0x00 0x40000000>; + // numa-node-id = <0x00>; + // }; + + aliases { + serial0 = "/soc/uart@2800c000"; + serial1 = "/soc/uart@2800d000"; + serial2 = "/soc/uart@2800e000"; + serial3 = "/soc/uart@2800f000"; + ethernet0 = "/soc/ethernet@3200c000"; + ethernet1 = "/soc/ethernet@3200e000"; + ethernet2 = "/soc/ethernet@32010000"; + ethernet3 = "/soc/ethernet@32012000"; + serial4 = "/soc/uart@28014000"; + serial5 = "/soc/uart@2802A000"; + serial6 = "/soc/uart@28032000"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + firmware { + + scmi { + compatible = "arm,scmi"; + mboxes = <0x02 0x00>; + mbox-names = "tx"; + shmem = <0x03>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + protocol@13 { + reg = <0x13>; + #clock-cells = <0x01>; + phandle = <0x09>; + }; + + protocol@15 { + reg = <0x15>; + #thermal-sensor-cells = <0x01>; + phandle = <0x04>; + }; + }; + + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + thermal-zones { + + sensor0 { + polling-delay-passive = <0x64>; + polling-delay = <0x3e8>; + thermal-sensors = <0x04 0x00>; + }; + + sensor1 { + polling-delay-passive = <0x64>; + polling-delay = <0x3e8>; + thermal-sensors = <0x04 0x01>; + }; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu-map { + + cluster0 { + + core0 { + cpu = <0x05>; + }; + }; + + // cluster1 { + + // core0 { + // cpu = <0x06>; + // }; + // }; + + cluster2 { + + core0 { + cpu = <0x07>; + }; + + // core1 { + // cpu = <0x08>; + // }; + }; + }; + + cpu@0 { + device_type = "cpu"; + compatible = "phytium,ftc310\0arm,armv8"; + reg = <0x00 0x200>; + enable-method = "psci"; + clocks = <0x09 0x02>; + capacity-dmips-mhz = <0xb22>; + phandle = <0x07>; + }; + + // cpu@1 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x201>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x08>; + // }; + + cpu@100 { + device_type = "cpu"; + compatible = "phytium,ftc664\0arm,armv8"; + reg = <0x00 0x00>; + enable-method = "psci"; + clocks = <0x09 0x00>; + capacity-dmips-mhz = <0x161c>; + phandle = <0x05>; + }; + + // cpu@101 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x100>; + // enable-method = "psci"; + // clocks = <0x09 0x01>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x06>; + // }; + }; + + interrupt-controller@30800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>; + interrupts = <0x01 0x09 0x08>; + phandle = <0x01>; + + gic-its@30820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x00 0x30820000 0x00 0x20000>; + phandle = <0x0f>; + }; + }; + + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0x01 0x07 0x08>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>; + clock-frequency = <0x2faf080>; + }; + + clocks { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + clk48mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2dc6c00>; + phandle = <0x13>; + }; + + clk50mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2faf080>; + phandle = <0x0d>; + }; + + clk100mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x5f5e100>; + phandle = <0x0c>; + }; + + clk200mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbebc200>; + phandle = <0x11>; + }; + + clk250mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xee6b280>; + phandle = <0x12>; + }; + + clk300mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x11e1a300>; + phandle = <0x0b>; + }; + + clk600mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x23c34600>; + phandle = <0x0e>; + }; + + clk1200mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x47868c00>; + phandle = <0x0a>; + }; + }; + + iommu@30000000 { + compatible = "arm,smmu-v3"; + reg = <0x00 0x30000000 0x00 0x800000>; + interrupts = <0x00 0xf0 0x01 0x00 0xef 0x01 0x00 0xec 0x01 0x00 0xf2 0x01>; + interrupt-names = "eventq\0priq\0cmdq-sync\0gerror"; + dma-coherent; + #iommu-cells = <0x01>; + phandle = <0x10>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + dma-coherent; + ranges; + + mmc@28000000 { + compatible = "phytium,mci"; + reg = <0x00 0x28000000 0x00 0x1000>; + interrupts = <0x00 0x48 0x04>; + clocks = <0x0a>; + clock-names = "phytium_mci_clk"; + status = "okay"; + bus-width = <0x04>; + max-frequency = <0x2faf080>; + cap-sdio-irq; + cap-sd-highspeed; + no-mmc; + }; + + mmc@28001000 { + compatible = "phytium,mci"; + reg = <0x00 0x28001000 0x00 0x1000>; + interrupts = <0x00 0x49 0x04>; + clocks = <0x0a>; + clock-names = "phytium_mci_clk"; + status = "okay"; + bus-width = <0x04>; + max-frequency = <0x2faf080>; + cap-sdio-irq; + cap-sd-highspeed; + no-mmc; + no-sd; + non-removable; + }; + + nand@28002000 { + compatible = "phytium,nfc"; + reg = <0x00 0x28002000 0x00 0x1000>; + interrupts = <0x00 0x4a 0x04>; + status = "disabled"; + }; + + ddma@28003000 { + compatible = "phytium,ddma"; + reg = <0x00 0x28003000 0x00 0x1000>; + interrupts = <0x00 0x4b 0x04>; + #dma-cells = <0x02>; + dma-channels = <0x08>; + }; + + ddma@28004000 { + compatible = "phytium,ddma"; + reg = <0x00 0x28004000 0x00 0x1000>; + interrupts = <0x00 0x4c 0x04>; + #dma-cells = <0x02>; + dma-channels = <0x08>; + }; + + spi@28008000 { + compatible = "phytium,qspi-nor"; + reg = <0x00 0x28008000 0x00 0x1000 0x00 0x00 0x00 0xfffffff>; + reg-names = "qspi\0qspi_mm"; + clocks = <0x0b>; + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x00>; + spi-rx-bus-width = <0x01>; + spi-max-frequency = <0x1312d00>; + status = "okay"; + }; + }; + + uart@2800c000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800c000 0x00 0x1000>; + interrupts = <0x00 0x53 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800d000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800d000 0x00 0x1000>; + interrupts = <0x00 0x54 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800e000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800e000 0x00 0x1000>; + interrupts = <0x00 0x55 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800f000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800f000 0x00 0x1000>; + interrupts = <0x00 0x56 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + lpc@28010000 { + compatible = "simple-mfd\0syscon"; + reg = <0x00 0x28010000 0x00 0x1000>; + reg-io-width = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x28010000 0x1000>; + + kcs@24 { + compatible = "phytium,kcs-bmc"; + reg = <0x24 0x01 0x30 0x01 0x3c 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@28 { + compatible = "phytium,kcs-bmc"; + reg = <0x28 0x01 0x34 0x01 0x40 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@2c { + compatible = "phytium,kcs-bmc"; + reg = <0x2c 0x01 0x38 0x01 0x44 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@8c { + compatible = "phytium,kcs-bmc"; + reg = <0x8c 0x01 0x90 0x01 0x94 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + bt@48 { + compatible = "phytium,bt-bmc"; + reg = <0x48 0x20>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + }; + + gpio@28034000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28034000 0x00 0x1000>; + interrupts = <0x00 0x6c 0x04 0x00 0x6d 0x04 0x00 0x6e 0x04 0x00 0x6f 0x04 0x00 0x70 0x04 0x00 0x71 0x04 0x00 0x72 0x04 0x00 0x73 0x04 0x00 0x74 0x04 0x00 0x75 0x04 0x00 0x76 0x04 0x00 0x77 0x04 0x00 0x78 0x04 0x00 0x79 0x04 0x00 0x7a 0x04 0x00 0x7b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28035000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28035000 0x00 0x1000>; + interrupts = <0x00 0x7c 0x04 0x00 0x7d 0x04 0x00 0x7e 0x04 0x00 0x7f 0x04 0x00 0x80 0x04 0x00 0x81 0x04 0x00 0x82 0x04 0x00 0x83 0x04 0x00 0x84 0x04 0x00 0x85 0x04 0x00 0x86 0x04 0x00 0x87 0x04 0x00 0x88 0x04 0x00 0x89 0x04 0x00 0x8a 0x04 0x00 0x8b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x14>; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28036000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28036000 0x00 0x1000>; + interrupts = <0x00 0x8c 0x04 0x00 0x8d 0x04 0x00 0x8e 0x04 0x00 0x8f 0x04 0x00 0x90 0x04 0x00 0x91 0x04 0x00 0x92 0x04 0x00 0x93 0x04 0x00 0x94 0x04 0x00 0x95 0x04 0x00 0x96 0x04 0x00 0x97 0x04 0x00 0x98 0x04 0x00 0x99 0x04 0x00 0x9a 0x04 0x00 0x9b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x15>; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28037000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28037000 0x00 0x1000>; + interrupts = <0x00 0x9c 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28038000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28038000 0x00 0x1000>; + interrupts = <0x00 0x9d 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28039000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28039000 0x00 0x1000>; + interrupts = <0x00 0x9e 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + spi@2803a000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803a000 0x00 0x1000>; + interrupts = <0x00 0x9f 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + global-cs = <0x01>; + + spidev@0 { + compatible = "spidev"; + reg = <0x00>; + spi-max-frequency = <0x2faf080>; + status = "disabled"; + }; + }; + + spi@2803b000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803b000 0x00 0x1000>; + interrupts = <0x00 0xa0 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@2803c000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803c000 0x00 0x1000>; + interrupts = <0x00 0xa1 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@2803d000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803d000 0x00 0x1000>; + interrupts = <0x00 0xa2 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + watchdog@28040000 { + compatible = "arm,sbsa-gwdt"; + reg = <0x00 0x28041000 0x00 0x1000 0x00 0x28040000 0x00 0x1000>; + interrupts = <0x00 0xa4 0x04>; + timeout-sec = <0x1e>; + status = "okay"; + }; + + watchdog@28042000 { + compatible = "arm,sbsa-gwdt"; + reg = <0x00 0x28043000 0x00 0x1000 0x00 0x28042000 0x00 0x1000>; + interrupts = <0x00 0xa5 0x04>; + timeout-sec = <0x1e>; + status = "okay"; + }; + + pwm@2804a000 { + compatible = "phytium,pwm"; + reg = <0x00 0x2804a000 0x00 0x1000>; + interrupts = <0x00 0xad 0x04>; + clocks = <0x0d>; + status = "okay"; + phytium,db = <0x00 0x00 0x64 0x3e8 0x3e8 0x00>; + }; + + pwm@2804b000 { + compatible = "phytium,pwm"; + reg = <0x00 0x2804b000 0x00 0x1000>; + interrupts = <0x00 0xae 0x04>; + clocks = <0x0d>; + status = "okay"; + phytium,db = <0x00 0x00 0x64 0x3e8 0x3e8 0x00>; + }; + + tacho@28054000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28054000 0x00 0x1000>; + interrupts = <0x00 0xc2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28055000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28055000 0x00 0x1000>; + interrupts = <0x00 0xc3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28056000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28056000 0x00 0x1000>; + interrupts = <0x00 0xc4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28057000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28057000 0x00 0x1000>; + interrupts = <0x00 0xc5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28058000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28058000 0x00 0x1000>; + interrupts = <0x00 0xc6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28059000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28059000 0x00 0x1000>; + interrupts = <0x00 0xc7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805a000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805a000 0x00 0x1000>; + interrupts = <0x00 0xc8 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805b000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805b000 0x00 0x1000>; + interrupts = <0x00 0xc9 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805c000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805c000 0x00 0x1000>; + interrupts = <0x00 0xca 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805d000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805d000 0x00 0x1000>; + interrupts = <0x00 0xcb 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805e000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805e000 0x00 0x1000>; + interrupts = <0x00 0xcc 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805f000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805f000 0x00 0x1000>; + interrupts = <0x00 0xcd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28060000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28060000 0x00 0x1000>; + interrupts = <0x00 0xce 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28061000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28061000 0x00 0x1000>; + interrupts = <0x00 0xcf 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28062000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28062000 0x00 0x1000>; + interrupts = <0x00 0xd0 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28063000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28063000 0x00 0x1000>; + interrupts = <0x00 0xd1 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28064000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28064000 0x00 0x1000>; + interrupts = <0x00 0xd2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28065000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28065000 0x00 0x1000>; + interrupts = <0x00 0xd3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28066000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28066000 0x00 0x1000>; + interrupts = <0x00 0xd4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28067000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28067000 0x00 0x1000>; + interrupts = <0x00 0xd5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28068000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28068000 0x00 0x1000>; + interrupts = <0x00 0xd6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28069000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28069000 0x00 0x1000>; + interrupts = <0x00 0xd7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806a000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806a000 0x00 0x1000>; + interrupts = <0x00 0xd8 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806b000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806b000 0x00 0x1000>; + interrupts = <0x00 0xd9 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806c000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806c000 0x00 0x1000>; + interrupts = <0x00 0xda 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806d000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806d000 0x00 0x1000>; + interrupts = <0x00 0xdb 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806e000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806e000 0x00 0x1000>; + interrupts = <0x00 0xdc 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806f000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806f000 0x00 0x1000>; + interrupts = <0x00 0xdd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28070000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28070000 0x00 0x1000>; + interrupts = <0x00 0xde 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28071000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28071000 0x00 0x1000>; + interrupts = <0x00 0xdf 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28072000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28072000 0x00 0x1000>; + interrupts = <0x00 0xe0 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28073000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28073000 0x00 0x1000>; + interrupts = <0x00 0xe1 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28074000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28074000 0x00 0x1000>; + interrupts = <0x00 0xe2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28075000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28075000 0x00 0x1000>; + interrupts = <0x00 0xe3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28076000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28076000 0x00 0x1000>; + interrupts = <0x00 0xe4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28077000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28077000 0x00 0x1000>; + interrupts = <0x00 0xe5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28078000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28078000 0x00 0x1000>; + interrupts = <0x00 0xe6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28079000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28079000 0x00 0x1000>; + interrupts = <0x00 0xe7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + usb2@31800000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31800000 0x00 0x80000 0x00 0x31990000 0x00 0x10000>; + interrupts = <0x00 0x20 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + usb2@31880000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31880000 0x00 0x80000 0x00 0x319a0000 0x00 0x10000>; + interrupts = <0x00 0x21 0x04>; + status = "disabled"; + dr_mode = "peripheral"; + }; + + usb2@31900000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31900000 0x00 0x80000 0x00 0x319b0000 0x00 0x10000>; + interrupts = <0x00 0x22 0x04>; + status = "disabled"; + dr_mode = "peripheral"; + }; + + usb2@32800000 { + compatible = "phytium,usb2"; + reg = <0x00 0x32800000 0x00 0x40000 0x00 0x32880000 0x00 0x40000>; + interrupts = <0x00 0x0e 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + usb2@32840000 { + compatible = "phytium,usb2"; + reg = <0x00 0x32840000 0x00 0x40000 0x00 0x328c0000 0x00 0x40000>; + interrupts = <0x00 0x0f 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + dc@32000000 { + compatible = "phytium,dc"; + reg = <0x00 0x32000000 0x00 0x8000>; + interrupts = <0x00 0x2c 0x04>; + status = "okay"; + pipe_mask = [01]; + edp_mask = [00]; + }; + + i2s_dp0@32009000 { + compatible = "phytium,i2s"; + reg = <0x00 0x32009000 0x00 0x1000 0x00 0x32008000 0x00 0x1000>; + interrupts = <0x00 0x2f 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + dai-name = "phytium-i2s-dp0"; + status = "okay"; + }; + + i2s_dp1@3200B000 { + compatible = "phytium,i2s"; + reg = <0x00 0x3200b000 0x00 0x1000 0x00 0x3200a000 0x00 0x1000>; + interrupts = <0x00 0x30 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + dai-name = "phytium-i2s-dp1"; + status = "disabled"; + }; + + pmdk_dp { + compatible = "phytium,pmdk-dp"; + status = "okay"; + num-dp = <0x01>; + dp-mask = [01]; + }; + + mailbox@32a00000 { + compatible = "phytium,mbox"; + reg = <0x00 0x32a00000 0x00 0x1000>; + interrupts = <0x00 0x16 0x04>; + #mbox-cells = <0x01>; + phandle = <0x02>; + }; + + rng@32a36000 { + compatible = "phytium,rng"; + reg = <0x00 0x32a36000 0x00 0x1000>; + status = "okay"; + }; + + sram@32a10000 { + compatible = "phytium,pe220x-sram-ns\0mmio-sram"; + reg = <0x00 0x32a10000 0x00 0x2000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x32a10000 0x2000>; + + scp-shmem@0 { + compatible = "arm,scmi-shmem"; + reg = <0x1000 0x400>; + }; + + scp-shmem@1 { + compatible = "arm,scmi-shmem"; + reg = <0x1400 0x400>; + phandle = <0x03>; + }; + }; + + gdma@32b34000 { + compatible = "phytium,gdma"; + dma-channels = <0x10>; + max-outstanding = <0x10>; + reg = <0x00 0x32b34000 0x00 0x1000>; + interrupts = <0x00 0xea 0x04>; + #dma-cells = <0x01>; + }; + + spinlock@32b36000 { + compatible = "phytium,hwspinlock"; + reg = <0x00 0x32b36000 0x00 0x1000>; + #hwlock-cells = <0x01>; + nr-locks = <0x20>; + status = "disabled"; + }; + + pcie@40000000 { + compatible = "pci-host-ecam-generic"; + device_type = "pci"; + #address-cells = <0x03>; + #size-cells = <0x02>; + #interrupt-cells = <0x01>; + reg = <0x00 0x40000000 0x00 0x10000000>; + msi-parent = <0x0f>; + bus-range = <0x00 0xff>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x02 0x01 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x03 0x01 0x00 0x00 0x00 0x06 0x04 0x00 0x00 0x00 0x04 0x01 0x00 0x00 0x00 0x07 0x04>; + ranges = <0x1000000 0x00 0x00 0x00 0x50000000 0x00 0xf00000 0x2000000 0x00 0x58000000 0x00 0x58000000 0x00 0x28000000 0x3000000 0x10 0x00 0x10 0x00 0x10 0x00>; + iommu-map = <0x00 0x10 0x00 0x10000>; + status = "okay"; + }; + + edac@32b28000 { + compatible = "phytium,pe220x-edac"; + reg = <0x00 0x32b28000 0x00 0x1000 0x00 0x31400000 0x00 0x1000 0x00 0x31401000 0x00 0x1000>; + interrupts = <0x00 0x00 0x04 0x00 0x01 0x04>; + status = "disabled"; + }; + + hda@28006000 { + compatible = "phytium,hda"; + reg = <0x00 0x28006000 0x00 0x1000>; + interrupts = <0x00 0x4e 0x04>; + status = "disabled"; + }; + + i2s@28009000 { + compatible = "phytium,i2s"; + reg = <0x00 0x28009000 0x00 0x1000 0x00 0x28005000 0x00 0x1000>; + interrupts = <0x00 0x4d 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + status = "okay"; + #sound-dai-cells = <0x00>; + dai-name = "phytium-i2s-lsd"; + phandle = <0x16>; + }; + + can@2800a000 { + compatible = "phytium,canfd"; + reg = <0x00 0x2800a000 0x00 0x1000>; + interrupts = <0x00 0x51 0x04>; + clocks = <0x11>; + clock-names = "can_clk"; + tx-fifo-depth = <0x40>; + rx-fifo-depth = <0x40>; + status = "okay"; + }; + + can@2800b000 { + compatible = "phytium,canfd"; + reg = <0x00 0x2800b000 0x00 0x1000>; + interrupts = <0x00 0x52 0x04>; + clocks = <0x11>; + clock-names = "can_clk"; + tx-fifo-depth = <0x40>; + rx-fifo-depth = <0x40>; + status = "okay"; + }; + + keypad@2807a000 { + compatible = "phytium,keypad"; + reg = <0x00 0x2807a000 0x00 0x1000>; + interrupts = <0x00 0xbd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + usb3@31a08000 { + compatible = "phytium,pe220x-xhci"; + reg = <0x00 0x31a08000 0x00 0x18000>; + interrupts = <0x00 0x10 0x04>; + status = "okay"; + }; + + usb3@31a28000 { + compatible = "phytium,pe220x-xhci"; + reg = <0x00 0x31a28000 0x00 0x18000>; + interrupts = <0x00 0x11 0x04>; + status = "okay"; + }; + + sata@31a40000 { + compatible = "generic-ahci"; + reg = <0x00 0x31a40000 0x00 0x1000>; + interrupts = <0x00 0x2a 0x04>; + status = "disabled"; + }; + + sata@32014000 { + compatible = "generic-ahci"; + reg = <0x00 0x32014000 0x00 0x1000>; + interrupts = <0x00 0x2b 0x04>; + status = "disabled"; + }; + + ethernet@3200c000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x3200c000 0x00 0x2000>; + interrupts = <0x00 0x37 0x04 0x00 0x38 0x04 0x00 0x39 0x04 0x00 0x3a 0x04 0x00 0x1c 0x04 0x00 0x1d 0x04 0x00 0x1e 0x04 0x00 0x1f 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + support-tsn; + status = "okay"; + phy-mode = "sgmii"; + use-mii; + }; + + ethernet@3200e000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x3200e000 0x00 0x2000>; + interrupts = <0x00 0x3b 0x04 0x00 0x3c 0x04 0x00 0x3d 0x04 0x00 0x3e 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "okay"; + phy-mode = "sgmii"; + use-mii; + }; + + ethernet@32010000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x32010000 0x00 0x2000>; + interrupts = <0x00 0x40 0x04 0x00 0x41 0x04 0x00 0x42 0x04 0x00 0x43 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "disabled"; + }; + + ethernet@32012000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x32012000 0x00 0x2000>; + interrupts = <0x00 0x44 0x04 0x00 0x45 0x04 0x00 0x46 0x04 0x00 0x47 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "disabled"; + }; + + vpu@32b00000 { + compatible = "phytium,vpu"; + reg = <0x00 0x32b00000 0x00 0x20000>; + interrupts = <0x00 0x0c 0x04>; + status = "okay"; + }; + + i2c@28026000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28026000 0x00 0x1000>; + interrupts = <0x00 0x65 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + i2c@28030000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28030000 0x00 0x1000>; + interrupts = <0x00 0x6a 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + es8336@10 { + #sound-dai-cells = <0x00>; + compatible = "everest,es8336"; + reg = <0x10>; + phandle = <0x17>; + }; + }; + + uart@28014000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x28014000 0x00 0x1000>; + interrupts = <0x00 0x5c 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + i2c@28016000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28016000 0x00 0x1000>; + interrupts = <0x00 0x5d 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + i2c@28024000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28024000 0x00 0x1000>; + interrupts = <0x00 0x64 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + uart@2802A000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2802a000 0x00 0x1000>; + interrupts = <0x00 0x67 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@28032000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x28032000 0x00 0x1000>; + interrupts = <0x00 0x6b 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + }; + + chosen { + bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait rw cma=256m ;"; + stdout-path = "serial1:115200n8"; + }; + + memory@00 { + device_type = "memory"; + reg = <0x20 0x40000000 0x00 0x40000000>; + }; + + leds { + compatible = "gpio-leds"; + + sysled { + label = "sysled"; + gpios = <0x14 0x05 0x00>; + linux,default-trigger = "none"; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "phytium,pe220x-i2s-audio"; + simple-audio-card,pin-switches = "mic-in"; + simple-audio-card,widgets = "Microphone\0mic-in\0Headphone\0Headphones"; + simple-audio-card,routing = "MIC2\0mic-in"; + simple-audio-card,hp-det-gpio = <0x15 0x0b 0x01>; + + simple-audio-card,cpu { + sound-dai = <0x16>; + }; + + simple-audio-card,codec { + sound-dai = <0x17>; + }; + }; +}; diff --git a/configs/vms/linux-aarch64-e2000-smp2.toml b/configs/vms/linux-aarch64-e2000-smp2.toml new file mode 100644 index 00000000..054954d4 --- /dev/null +++ b/configs/vms/linux-aarch64-e2000-smp2.toml @@ -0,0 +1,57 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 2 +# The physical CPU ids. +phys_cpu_ids = [0x200, 0x00] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x20_4008_0000 +# The location of image: "memory" | "fs". +# Load from file system. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x20_4008_0000 +## The file path of the kernel image. +kernel_path = "/path/to/Image" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x20_4000_0000 +#dtb_path = "/path/to/axvisor/configs/vms/linux-aarch64-e2000_smp2.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x20_4000_0000, 0x4000_0000, 0x7, 1], # System RAM MAP_IDENTICAL + # [0xa000_0000, 0x2000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +interrupt_mode = "passthrough" +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] \ No newline at end of file diff --git a/configs/vms/linux-qemu.dts b/configs/vms/linux-aarch64-qemu-smp1.dts similarity index 72% rename from configs/vms/linux-qemu.dts rename to configs/vms/linux-aarch64-qemu-smp1.dts index 28f34042..a37731fb 100644 --- a/configs/vms/linux-qemu.dts +++ b/configs/vms/linux-aarch64-qemu-smp1.dts @@ -2,6 +2,7 @@ / { interrupt-parent = <0x8002>; + dma-coherent; model = "linux,dummy-virt"; #size-cells = <0x02>; #address-cells = <0x02>; @@ -21,6 +22,20 @@ device_type = "memory"; }; + platform-bus@c000000 { + interrupt-parent = <0x8002>; + ranges = <0x00 0x00 0xc000000 0x2000000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "qemu,platform\0simple-bus"; + }; + + fw-cfg@9020000 { + dma-coherent; + reg = <0x00 0x9020000 0x00 0x18>; + compatible = "qemu,fw-cfg-mmio"; + }; + virtio_mmio@a000000 { dma-coherent; interrupts = <0x00 0x10 0x01>; @@ -266,6 +281,22 @@ reg = <0x00 0x9030000 0x00 0x1000>; }; + // pcie@10000000 { + // interrupt-map-mask = <0x1800 0x00 0x00 0x07>; + // interrupt-map = <0x00 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x03 0x04 0x00 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x04 0x04 0x800 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x05 0x04 0x800 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x05 0x04 0x1000 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x06 0x04 0x1000 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x01 0x8002 0x00 0x00 0x00 0x06 0x04 0x1800 0x00 0x00 0x02 0x8002 0x00 0x00 0x00 0x03 0x04 0x1800 0x00 0x00 0x03 0x8002 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x04 0x8002 0x00 0x00 0x00 0x05 0x04>; + // #interrupt-cells = <0x01>; + // ranges = <0x1000000 0x00 0x00 0x00 0x3eff0000 0x00 0x10000 0x2000000 0x00 0x10000000 0x00 0x10000000 0x00 0x2eff0000 0x3000000 0x80 0x00 0x80 0x00 0x80 0x00>; + // reg = <0x40 0x10000000 0x00 0x10000000>; + // msi-map = <0x00 0x8003 0x00 0x10000>; + // dma-coherent; + // bus-range = <0x00 0xff>; + // linux,pci-domain = <0x00>; + // #size-cells = <0x02>; + // #address-cells = <0x03>; + // device_type = "pci"; + // compatible = "pci-host-ecam-generic"; + // }; + pl031@9010000 { clock-names = "apb_pclk"; clocks = <0x8000>; @@ -283,29 +314,37 @@ }; pmu { - interrupts = <0x01 0x07 0x104>; + interrupts = <0x01 0x07 0x04>; compatible = "arm,armv8-pmuv3"; }; intc@8000000 { phandle = <0x8002>; interrupts = <0x01 0x09 0x04>; - reg = <0x00 0x8000000 0x00 0x10000 0x00 0x8010000 0x00 0x10000 0x00 0x8030000 0x00 0x10000 0x00 0x8040000 0x00 0x10000>; - compatible = "arm,cortex-a15-gic"; + reg = <0x00 0x8000000 0x00 0x10000 0x00 0x80a0000 0x00 0xf60000>; + #redistributor-regions = <0x01>; + compatible = "arm,gic-v3"; ranges; #size-cells = <0x02>; #address-cells = <0x02>; interrupt-controller; #interrupt-cells = <0x03>; - v2m@8020000 { + its@8080000 { phandle = <0x8003>; - reg = <0x00 0x8020000 0x00 0x1000>; + reg = <0x00 0x8080000 0x00 0x20000>; + #msi-cells = <0x01>; msi-controller; - compatible = "arm,gic-v2m-frame"; + compatible = "arm,gic-v3-its"; }; }; + flash@0 { + bank-width = <0x04>; + reg = <0x00 0x00 0x00 0x4000000 0x00 0x4000000 0x00 0x4000000>; + compatible = "cfi-flash"; + }; + cpus { #size-cells = <0x00>; #address-cells = <0x01>; @@ -326,13 +365,13 @@ cpu@0 { phandle = <0x8001>; reg = <0x00>; - compatible = "arm,cortex-a57"; + compatible = "arm,cortex-a72"; device_type = "cpu"; }; }; timer { - interrupts = <0x01 0x0d 0x104 0x01 0x0e 0x104 0x01 0x0b 0x104 0x01 0x0a 0x104>; + interrupts = <0x01 0x0d 0x04 0x01 0x0e 0x04 0x01 0x0b 0x04 0x01 0x0a 0x04>; always-on; compatible = "arm,armv8-timer\0arm,armv7-timer"; }; @@ -345,10 +384,14 @@ compatible = "fixed-clock"; }; + aliases { + serial0 = "/pl011@9000000"; + }; + chosen { - bootargs = "earlycon console=ttyAMA0 root=/dev/vda rw audit=0 default_hugepagesz=32M hugepagesz=32M hugepages=4"; + bootargs = "root=/dev/vda rw init=/init"; stdout-path = "/pl011@9000000"; - rng-seed = <0x7d690073 0x793eb999 0xf6bdac0f 0xd29fa1a 0x78c11b49 0xf975a441 0xbb12bacc 0xd938d0a9>; - kaslr-seed = <0x45202e26 0x23f63f1f>; + rng-seed = <0xc63e7c7f 0x25869631 0xfa243fbb 0xe48363de 0xfd9dc3ce 0x5127dfe3 0x88de6403 0xb04a0eef>; + kaslr-seed = <0xdcf4331d 0x73a35db>; }; }; diff --git a/configs/vms/linux-aarch64-qemu-smp1.toml b/configs/vms/linux-aarch64-qemu-smp1.toml new file mode 100644 index 00000000..3accc1b3 --- /dev/null +++ b/configs/vms/linux-aarch64-qemu-smp1.toml @@ -0,0 +1,64 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux-qemu" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# Guest vm physical cpu sets. +phys_cpu_ids = [0] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x8020_0000 +# The location of image: "memory" | "fs". +# load from memory. +image_location = "memory" +# The file path of the kernel image. +# kernel_path = "linux-6.6.62.bin" +kernel_path = "tmp/Image" +# The load address of the kernel image. +kernel_load_addr = 0x8020_0000 +# The file path of the device tree blob (DTB). +#dtb_path = "tmp/linux-aarch64-qemu-smp1.dtb" +# The load address of the device tree blob (DTB). +dtb_load_addr = 0x8000_0000 + +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x8000_0000, 0x1000_0000, 0x7, 0], # System RAM 1G MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] + +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [ + # ["gppt-gicd", 0x0800_0000, 0x1_0000, 0, 0x21, []], + # ["gppt-gicr", 0x080a_0000, 0x2_0000, 0, 0x20, [1, 0x2_0000, 0]], # 1 vcpu, stride 0x20000, starts with pcpu 0 + # ["gppt-gits", 0x0808_0000, 0x2_0000, 0, 0x22, [0x0808_0000]], # host_gits_base +] + +interrupt_mode = "passthrough" diff --git a/configs/vms/linux-aarch64-rk3568-smp1.dts b/configs/vms/linux-aarch64-rk3568-smp1.dts new file mode 100644 index 00000000..bdc54614 --- /dev/null +++ b/configs/vms/linux-aarch64-rk3568-smp1.dts @@ -0,0 +1,6108 @@ +/dts-v1/; + +/memreserve/ 0x0000000008300000 0x000000000001c000; +/memreserve/ 0x000000000a200000 0x00000000008cf15d; +/ { + serial-number = "425ca8fc29ade692"; + compatible = "rockchip,rk3568-firefly-roc-pc-se\0rockchip,rk3568"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Firefly RK3568-ROC-PC-SE HDMI (Linux)"; + + memory { + reg = <0x00 0x80000000 0x00 0x60000000>; + device_type = "memory"; + }; + + ddr3-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x420>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x12c>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x21>; + phy_ca_drv_odten = <0x21>; + phy_clk_drv_odten = <0x21>; + dram_dq_drv_odten = <0x22>; + phy_dq_drv_odtoff = <0x21>; + phy_ca_drv_odtoff = <0x21>; + phy_clk_drv_odtoff = <0x21>; + dram_dq_drv_odtoff = <0x22>; + dram_odt = <0x78>; + phy_odt = <0xa7>; + phy_odt_puup_en = <0x01>; + phy_odt_pudn_en = <0x01>; + dram_dq_odt_en_freq = <0x14d>; + phy_odt_en_freq = <0x14d>; + phy_dq_sr_odten = <0x0f>; + phy_ca_sr_odten = <0x03>; + phy_clk_sr_odten = <0x00>; + phy_dq_sr_odtoff = <0x0f>; + phy_ca_sr_odtoff = <0x03>; + phy_clk_sr_odtoff = <0x00>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x15>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + phandle = <0xb7>; + }; + + ddr4-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x420>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x271>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x25>; + phy_ca_drv_odten = <0x25>; + phy_clk_drv_odten = <0x25>; + dram_dq_drv_odten = <0x22>; + phy_dq_drv_odtoff = <0x25>; + phy_ca_drv_odtoff = <0x25>; + phy_clk_drv_odtoff = <0x25>; + dram_dq_drv_odtoff = <0x22>; + dram_odt = <0x78>; + phy_odt = <0x8b>; + phy_odt_puup_en = <0x01>; + phy_odt_pudn_en = <0x01>; + dram_dq_odt_en_freq = <0x1f4>; + phy_odt_en_freq = <0x1f4>; + phy_dq_sr_odten = <0x0e>; + phy_ca_sr_odten = <0x01>; + phy_clk_sr_odten = <0x01>; + phy_dq_sr_odtoff = <0x0e>; + phy_ca_sr_odtoff = <0x01>; + phy_clk_sr_odtoff = <0x01>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x0c>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x22777788>; + dq_map_cs0_dq_h = <0xd7888877>; + dq_map_cs1_dq_l = <0x22777788>; + dq_map_cs1_dq_h = <0xd7888877>; + phandle = <0xb8>; + }; + + lpddr3-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x420>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x00>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x25>; + phy_ca_drv_odten = <0x25>; + phy_clk_drv_odten = <0x27>; + dram_dq_drv_odten = <0x22>; + phy_dq_drv_odtoff = <0x25>; + phy_ca_drv_odtoff = <0x25>; + phy_clk_drv_odtoff = <0x27>; + dram_dq_drv_odtoff = <0x22>; + dram_odt = <0x78>; + phy_odt = <0x94>; + phy_odt_puup_en = <0x01>; + phy_odt_pudn_en = <0x01>; + dram_dq_odt_en_freq = <0x14d>; + phy_odt_en_freq = <0x14d>; + phy_dq_sr_odten = <0x0f>; + phy_ca_sr_odten = <0x01>; + phy_clk_sr_odten = <0x0f>; + phy_dq_sr_odtoff = <0x0f>; + phy_ca_sr_odtoff = <0x01>; + phy_clk_sr_odtoff = <0x0f>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x00>; + dram_ext_temp = <0x00>; + byte_map = <0x8d>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + phandle = <0xb9>; + }; + + lpddr4-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x618>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x00>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x1e>; + phy_ca_drv_odten = <0x26>; + phy_clk_drv_odten = <0x26>; + dram_dq_drv_odten = <0x28>; + phy_dq_drv_odtoff = <0x1e>; + phy_ca_drv_odtoff = <0x26>; + phy_clk_drv_odtoff = <0x26>; + dram_dq_drv_odtoff = <0x28>; + dram_odt = <0x50>; + phy_odt = <0x3c>; + phy_odt_puup_en = <0x00>; + phy_odt_pudn_en = <0x00>; + dram_dq_odt_en_freq = <0x320>; + phy_odt_en_freq = <0x320>; + phy_dq_sr_odten = <0x00>; + phy_ca_sr_odten = <0x0f>; + phy_clk_sr_odten = <0x0f>; + phy_dq_sr_odtoff = <0x00>; + phy_ca_sr_odtoff = <0x0f>; + phy_clk_sr_odtoff = <0x0f>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x00>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + lp4_ca_odt = <0x78>; + lp4_drv_pu_cal_odten = <0x01>; + lp4_drv_pu_cal_odtoff = <0x01>; + phy_lp4_drv_pulldown_en_odten = <0x00>; + phy_lp4_drv_pulldown_en_odtoff = <0x00>; + lp4_ca_odt_en_freq = <0x320>; + phy_lp4_cs_drv_odten = <0x00>; + phy_lp4_cs_drv_odtoff = <0x00>; + lp4_odte_ck_en = <0x01>; + lp4_odte_cs_en = <0x01>; + lp4_odtd_ca_en = <0x00>; + phy_lp4_dq_vref_odten = <0xa6>; + lp4_dq_vref_odten = <0x12c>; + lp4_ca_vref_odten = <0x17c>; + phy_lp4_dq_vref_odtoff = <0x1a4>; + lp4_dq_vref_odtoff = <0x1a4>; + lp4_ca_vref_odtoff = <0x1a4>; + phandle = <0xba>; + }; + + lpddr4x-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x618>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x00>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x1d>; + phy_ca_drv_odten = <0x24>; + phy_clk_drv_odten = <0x24>; + dram_dq_drv_odten = <0x28>; + phy_dq_drv_odtoff = <0x1d>; + phy_ca_drv_odtoff = <0x24>; + phy_clk_drv_odtoff = <0x24>; + dram_dq_drv_odtoff = <0x28>; + dram_odt = <0x50>; + phy_odt = <0x3c>; + phy_odt_puup_en = <0x00>; + phy_odt_pudn_en = <0x00>; + dram_dq_odt_en_freq = <0x320>; + phy_odt_en_freq = <0x320>; + phy_dq_sr_odten = <0x00>; + phy_ca_sr_odten = <0x00>; + phy_clk_sr_odten = <0x00>; + phy_dq_sr_odtoff = <0x00>; + phy_ca_sr_odtoff = <0x00>; + phy_clk_sr_odtoff = <0x00>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x00>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + lp4_ca_odt = <0x78>; + lp4_drv_pu_cal_odten = <0x00>; + lp4_drv_pu_cal_odtoff = <0x00>; + phy_lp4_drv_pulldown_en_odten = <0x00>; + phy_lp4_drv_pulldown_en_odtoff = <0x00>; + lp4_ca_odt_en_freq = <0x320>; + phy_lp4_cs_drv_odten = <0x00>; + phy_lp4_cs_drv_odtoff = <0x00>; + lp4_odte_ck_en = <0x00>; + lp4_odte_cs_en = <0x00>; + lp4_odtd_ca_en = <0x00>; + phy_lp4_dq_vref_odten = <0xa6>; + lp4_dq_vref_odten = <0xe4>; + lp4_ca_vref_odten = <0x157>; + phy_lp4_dq_vref_odtoff = <0x1a4>; + lp4_dq_vref_odtoff = <0x1a4>; + lp4_ca_vref_odtoff = <0x157>; + phandle = <0xbb>; + }; + + aliases { + csi2dphy0 = "/csi2-dphy0"; + csi2dphy1 = "/csi2-dphy1"; + csi2dphy2 = "/csi2-dphy2"; + dsi0 = "/dsi@fe060000"; + dsi1 = "/dsi@fe070000"; + ethernet0 = "/ethernet@fe2a0000"; + ethernet1 = "/ethernet@fe010000"; + gpio0 = "/pinctrl/gpio0@fdd60000"; + gpio1 = "/pinctrl/gpio1@fe740000"; + gpio2 = "/pinctrl/gpio2@fe750000"; + gpio3 = "/pinctrl/gpio3@fe760000"; + gpio4 = "/pinctrl/gpio4@fe770000"; + i2c0 = "/i2c@fdd40000"; + i2c1 = "/i2c@fe5a0000"; + i2c2 = "/i2c@fe5b0000"; + i2c3 = "/i2c@fe5c0000"; + i2c4 = "/i2c@fe5d0000"; + i2c5 = "/i2c@fe5e0000"; + mmc0 = "/sdhci@fe310000"; + mmc1 = "/dwmmc@fe2b0000"; + mmc2 = "/dwmmc@fe2c0000"; + mmc3 = "/dwmmc@fe000000"; + serial0 = "/serial@fdd50000"; + serial1 = "/serial@fe650000"; + serial2 = "/serial@fe660000"; + serial3 = "/serial@fe670000"; + serial4 = "/serial@fe680000"; + serial5 = "/serial@fe690000"; + serial6 = "/serial@fe6a0000"; + serial7 = "/serial@fe6b0000"; + serial8 = "/serial@fe6c0000"; + serial9 = "/serial@fe6d0000"; + spi0 = "/spi@fe610000"; + spi1 = "/spi@fe620000"; + spi2 = "/spi@fe630000"; + spi3 = "/spi@fe640000"; + lvds0 = "/syscon@fdc60000/lvds"; + lvds1 = "/syscon@fdc60000/lvds1"; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00 0x00>; + enable-method = "psci"; + clocks = <0x02 0x00>; + operating-points-v2 = <0x03>; + cpu-idle-states = <0x04>; + #cooling-cells = <0x02>; + dynamic-power-coefficient = <0xbb>; + cpu-supply = <0x05>; + phandle = <0x0c>; + }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x00 0x100>; + // enable-method = "psci"; + // clocks = <0x02 0x00>; + // operating-points-v2 = <0x03>; + // cpu-idle-states = <0x04>; + // phandle = <0x0d>; + // }; + + // cpu@200 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x00 0x200>; + // enable-method = "psci"; + // clocks = <0x02 0x00>; + // operating-points-v2 = <0x03>; + // cpu-idle-states = <0x04>; + // phandle = <0x0e>; + // }; + + // cpu@300 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x00 0x300>; + // enable-method = "psci"; + // clocks = <0x02 0x00>; + // operating-points-v2 = <0x03>; + // cpu-idle-states = <0x04>; + // phandle = <0x0f>; + // }; + + idle-states { + entry-method = "psci"; + + cpu-sleep { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x10000>; + entry-latency-us = <0x64>; + exit-latency-us = <0x78>; + min-residency-us = <0x3e8>; + phandle = <0x04>; + }; + }; + }; + + cpu0-opp-table { + compatible = "operating-points-v2"; + opp-shared; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x06 0x07 0x08 0x09 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0x118c30>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x153d8 0x01 0x153d9 0x16378 0x02 0x16379 0x186a0 0x03>; + rockchip,pvtm-freq = <0x639c0>; + rockchip,pvtm-volt = <0xdbba0>; + rockchip,pvtm-ch = <0x00 0x05>; + rockchip,pvtm-sample-time = <0x3e8>; + rockchip,pvtm-number = <0x0a>; + rockchip,pvtm-error = <0x3e8>; + rockchip,pvtm-ref-temp = <0x28>; + rockchip,pvtm-temp-prop = <0x1a 0x1a>; + rockchip,thermal-zone = "soc-thermal"; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x7c8 0x124f8>; + phandle = <0x03>; + + opp-408000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x18519600>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-600000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-816000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x30a32c00>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + opp-suspend; + }; + + opp-1104000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x41cdb400>; + opp-microvolt = <0xdbba0 0xdbba0 0x118c30>; + opp-microvolt-L0 = <0xdbba0 0xdbba0 0x118c30>; + opp-microvolt-L1 = <0xcf850 0xcf850 0x118c30>; + opp-microvolt-L2 = <0xcf850 0xcf850 0x118c30>; + opp-microvolt-L3 = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1416000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x54667200>; + opp-microvolt = <0xfa3e8 0xfa3e8 0x118c30>; + opp-microvolt-L0 = <0xfa3e8 0xfa3e8 0x118c30>; + opp-microvolt-L1 = <0xee098 0xee098 0x118c30>; + opp-microvolt-L2 = <0xe7ef0 0xe7ef0 0x118c30>; + opp-microvolt-L3 = <0xe1d48 0xe1d48 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1608000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x5fd82200>; + opp-microvolt = <0x10c8e0 0x10c8e0 0x118c30>; + opp-microvolt-L0 = <0x10c8e0 0x10c8e0 0x118c30>; + opp-microvolt-L1 = <0x100590 0x100590 0x118c30>; + opp-microvolt-L2 = <0xfa3e8 0xfa3e8 0x118c30>; + opp-microvolt-L3 = <0xf4240 0xf4240 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1800000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x6b49d200>; + opp-microvolt = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L0 = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L1 = <0x10c8e0 0x10c8e0 0x118c30>; + opp-microvolt-L2 = <0x106738 0x106738 0x118c30>; + opp-microvolt-L3 = <0x100590 0x100590 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1992000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x76bb8200>; + opp-microvolt = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L0 = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L1 = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L2 = <0x112a88 0x112a88 0x118c30>; + opp-microvolt-L3 = <0x10c8e0 0x10c8e0 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-j-1008000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x3c14dc00>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-j-1416000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x54667200>; + opp-microvolt = <0xdbba0 0xdbba0 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-m-1608000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x5fd82200>; + opp-microvolt = <0xf4240 0xf4240 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + }; + + arm-pmu { + compatible = "arm,cortex-a55-pmu\0arm,armv8-pmuv3"; + interrupts = <0x00 0xe4 0x04 0x00 0xe5 0x04 0x00 0xe6 0x04 0x00 0xe7 0x04>; + interrupt-affinity = <0x0c 0x0d 0x0e 0x0f>; + }; + + cpuinfo { + compatible = "rockchip,cpuinfo"; + nvmem-cells = <0x10 0x11 0x12>; + nvmem-cell-names = "id\0cpu-version\0cpu-code"; + }; + + display-subsystem { + compatible = "rockchip,display-subsystem"; + memory-region = <0x13 0x14>; + memory-region-names = "drm-logo\0drm-cubic-lut"; + ports = <0x15>; + devfreq = <0x16>; + + route { + + route-dsi0 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x17>; + }; + + route-dsi1 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x18>; + }; + + route-edp { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x19>; + }; + + route-hdmi { + status = "okay"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x1a>; + }; + + route-lvds { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x1b>; + }; + + route-rgb { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x1c>; + }; + }; + }; + + edac { + compatible = "rockchip,rk3568-edac"; + interrupts = <0x00 0xad 0x04 0x00 0xaf 0x04>; + interrupt-names = "ce\0ue"; + status = "disabled"; + }; + + firmware { + + scmi { + compatible = "arm,scmi-smc"; + shmem = <0x1d>; + arm,smc-id = <0x82000010>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + protocol@14 { + reg = <0x14>; + #clock-cells = <0x01>; + rockchip,clk-init = <0x41cdb400>; + phandle = <0x02>; + }; + }; + + sdei { + compatible = "arm,sdei-1.0"; + method = "smc"; + }; + }; + + mipi-csi2 { + compatible = "rockchip,rk3568-mipi-csi2"; + rockchip,hw = <0x1e>; + status = "disabled"; + }; + + mpp-srv { + compatible = "rockchip,mpp-service"; + rockchip,taskqueue-count = <0x06>; + rockchip,resetgroup-count = <0x06>; + status = "okay"; + phandle = <0x7b>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + reserved-memory { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + drm-logo@00000000 { + compatible = "rockchip,drm-logo"; + reg = <0x00 0xedf00000 0x00 0x2e0000>; + phandle = <0x13>; + }; + + drm-cubic-lut@00000000 { + compatible = "rockchip,drm-cubic-lut"; + reg = <0x00 0xeff00000 0x00 0x8000>; + phandle = <0x14>; + }; + + ramoops@110000 { + compatible = "ramoops"; + reg = <0x00 0x110000 0x00 0xf0000>; + record-size = <0x20000>; + console-size = <0x80000>; + ftrace-size = <0x00>; + pmsg-size = <0x50000>; + }; + }; + + rockchip-suspend { + compatible = "rockchip,pm-rk3568"; + status = "okay"; + rockchip,sleep-debug-en = <0x01>; + rockchip,sleep-mode-config = <0x5ec>; + rockchip,wakeup-config = <0x10>; + }; + + rockchip-system-monitor { + compatible = "rockchip,system-monitor"; + rockchip,thermal-zone = "soc-thermal"; + }; + + thermal-zones { + + soc-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + sustainable-power = <0x389>; + thermal-sensors = <0x1f 0x00>; + + trips { + + trip-point-0 { + temperature = <0x124f8>; + hysteresis = <0x7d0>; + type = "passive"; + }; + + trip-point-1 { + temperature = <0x14c08>; + hysteresis = <0x7d0>; + type = "passive"; + phandle = <0x20>; + }; + + soc-crit { + temperature = <0x1c138>; + hysteresis = <0x7d0>; + type = "critical"; + }; + }; + + cooling-maps { + + map0 { + trip = <0x20>; + cooling-device = <0x0c 0xffffffff 0xffffffff>; + contribution = <0x400>; + }; + + map1 { + trip = <0x20>; + cooling-device = <0x21 0xffffffff 0xffffffff>; + contribution = <0x400>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x1f 0x01>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; + arm,no-tick-in-suspend; + }; + + external-gmac0-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "gmac0_clkin"; + #clock-cells = <0x00>; + phandle = <0xc7>; + }; + + external-gmac1-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "gmac1_clkin"; + #clock-cells = <0x00>; + phandle = <0x92>; + }; + + xpcs-gmac0-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "clk_gmac0_xpcs_mii"; + #clock-cells = <0x00>; + }; + + xpcs-gmac1-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "clk_gmac1_xpcs_mii"; + #clock-cells = <0x00>; + }; + + i2s1-mclkin-rx { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s1_mclkin_rx"; + }; + + i2s1-mclkin-tx { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s1_mclkin_tx"; + }; + + i2s2-mclkin { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s2_mclkin"; + }; + + i2s3-mclkin { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s3_mclkin"; + }; + + mpll { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2faf0800>; + clock-output-names = "mpll"; + }; + + xin24m { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x16e3600>; + clock-output-names = "xin24m"; + }; + + xin32k { + compatible = "fixed-clock"; + clock-frequency = <0x8000>; + clock-output-names = "xin32k"; + #clock-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x22>; + }; + + scmi-shmem@10f000 { + compatible = "arm,scmi-shmem"; + reg = <0x00 0x10f000 0x00 0x100>; + phandle = <0x1d>; + }; + + sata@fc000000 { + compatible = "snps,dwc-ahci"; + reg = <0x00 0xfc000000 0x00 0x1000>; + clocks = <0x23 0x96 0x23 0x97 0x23 0x98>; + clock-names = "sata\0pmalive\0rxoob"; + interrupts = <0x00 0x5e 0x04>; + interrupt-names = "hostc"; + phys = <0x24 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + power-domains = <0x25 0x0f>; + status = "disabled"; + }; + + sata@fc400000 { + compatible = "snps,dwc-ahci"; + reg = <0x00 0xfc400000 0x00 0x1000>; + clocks = <0x23 0x9b 0x23 0x9c 0x23 0x9d>; + clock-names = "sata\0pmalive\0rxoob"; + interrupts = <0x00 0x5f 0x04>; + interrupt-names = "hostc"; + phys = <0x26 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + power-domains = <0x25 0x0f>; + status = "disabled"; + }; + + sata@fc800000 { + compatible = "snps,dwc-ahci"; + reg = <0x00 0xfc800000 0x00 0x1000>; + clocks = <0x23 0xa0 0x23 0xa1 0x23 0xa2>; + clock-names = "sata\0pmalive\0rxoob"; + interrupts = <0x00 0x60 0x04>; + interrupt-names = "hostc"; + phys = <0x27 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + power-domains = <0x25 0x0f>; + status = "okay"; + }; + + usbdrd { + compatible = "rockchip,rk3568-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x23 0xa6 0x23 0xa7 0x23 0xa5 0x23 0x7f>; + clock-names = "ref_clk\0suspend_clk\0bus_clk\0pipe_clk"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "okay"; + + dwc3@fcc00000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfcc00000 0x00 0x400000>; + interrupts = <0x00 0xa9 0x04>; + dr_mode = "otg"; + phys = <0x28 0x24 0x04>; + phy-names = "usb2-phy\0usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <0x25 0x0f>; + resets = <0x23 0x94>; + reset-names = "usb3-otg"; + snps,dis_enblslpm_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,dis_rxdet_inp3_quirk; + snps,parkmode-disable-hs-quirk; + snps,parkmode-disable-ss-quirk; + quirk-skip-phy-init; + status = "okay"; + extcon = <0x29>; + usb-role-switch; + + port { + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x2a>; + phandle = <0x4d>; + }; + }; + }; + }; + + usbhost { + compatible = "rockchip,rk3568-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x23 0xa9 0x23 0xaa 0x23 0xa8 0x23 0x7f>; + clock-names = "ref_clk\0suspend_clk\0bus_clk\0pipe_clk"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "okay"; + + dwc3@fd000000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfd000000 0x00 0x400000>; + interrupts = <0x00 0xaa 0x04>; + dr_mode = "host"; + phys = <0x2b 0x26 0x04>; + phy-names = "usb2-phy\0usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <0x25 0x0f>; + resets = <0x23 0x95>; + reset-names = "usb3-host"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,dis_rxdet_inp3_quirk; + snps,parkmode-disable-hs-quirk; + snps,parkmode-disable-ss-quirk; + status = "okay"; + }; + }; + + interrupt-controller@fd400000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0xfd400000 0x00 0x10000 0x00 0xfd460000 0x00 0xc0000>; + interrupts = <0x01 0x09 0x04>; + phandle = <0x01>; + + interrupt-controller@fd440000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <0x01>; + reg = <0x00 0xfd440000 0x00 0x20000>; + status = "okay"; + phandle = <0xbe>; + }; + }; + + usb@fd800000 { + compatible = "generic-ehci"; + reg = <0x00 0xfd800000 0x00 0x40000>; + interrupts = <0x00 0x82 0x04>; + clocks = <0x23 0xbd 0x23 0xbe 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2d>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + usb@fd840000 { + compatible = "generic-ohci"; + reg = <0x00 0xfd840000 0x00 0x40000>; + interrupts = <0x00 0x83 0x04>; + clocks = <0x23 0xbd 0x23 0xbe 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2d>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + usb@fd880000 { + compatible = "generic-ehci"; + reg = <0x00 0xfd880000 0x00 0x40000>; + interrupts = <0x00 0x85 0x04>; + clocks = <0x23 0xbf 0x23 0xc0 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2e>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + usb@fd8c0000 { + compatible = "generic-ohci"; + reg = <0x00 0xfd8c0000 0x00 0x40000>; + interrupts = <0x00 0x86 0x04>; + clocks = <0x23 0xbf 0x23 0xc0 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2e>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + syscon@fda00000 { + compatible = "rockchip,rk3568-xpcs\0syscon"; + reg = <0x00 0xfda00000 0x00 0x200000>; + status = "disabled"; + }; + + syscon@fdc20000 { + compatible = "rockchip,rk3568-pmugrf\0syscon\0simple-mfd"; + reg = <0x00 0xfdc20000 0x00 0x10000>; + phandle = <0x3c>; + + io-domains { + compatible = "rockchip,rk3568-pmu-io-voltage-domain"; + status = "okay"; + pmuio1-supply = <0x2f>; + pmuio2-supply = <0x2f>; + vccio1-supply = <0x30>; + vccio3-supply = <0x31>; + vccio4-supply = <0x32>; + vccio5-supply = <0x33>; + vccio6-supply = <0x32>; + vccio7-supply = <0x33>; + }; + + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x200>; + mode-bootloader = <0x5242c301>; + mode-charge = <0x5242c30b>; + mode-fastboot = <0x5242c309>; + mode-loader = <0x5242c301>; + mode-normal = <0x5242c300>; + mode-recovery = <0x5242c303>; + mode-ums = <0x5242c30c>; + mode-panic = <0x5242c307>; + mode-watchdog = <0x5242c308>; + }; + }; + + syscon@fdc50000 { + compatible = "rockchip,rk3568-pipegrf\0syscon"; + reg = <0x00 0xfdc50000 0x00 0x1000>; + phandle = <0x12a>; + }; + + syscon@fdc60000 { + compatible = "rockchip,rk3568-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfdc60000 0x00 0x10000>; + phandle = <0x3b>; + + io-domains { + compatible = "rockchip,rk3568-io-voltage-domain"; + status = "disabled"; + }; + + lvds { + compatible = "rockchip,rk3568-lvds"; + phys = <0x34>; + phy-names = "phy"; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x1b>; + status = "disabled"; + phandle = <0xa3>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x35>; + status = "disabled"; + phandle = <0xa5>; + }; + }; + }; + }; + + lvds1 { + compatible = "rockchip,rk3568-lvds"; + phys = <0x36>; + phy-names = "phy"; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x37>; + phandle = <0xa4>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x38>; + phandle = <0xa7>; + }; + }; + }; + }; + + rgb { + compatible = "rockchip,rk3568-rgb"; + pinctrl-names = "default"; + pinctrl-0 = <0x39>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x1c>; + status = "disabled"; + phandle = <0xa6>; + }; + }; + }; + }; + }; + + syscon@fdc70000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfdc70000 0x00 0x1000>; + phandle = <0x12b>; + }; + + syscon@fdc80000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfdc80000 0x00 0x1000>; + phandle = <0x12c>; + }; + + syscon@fdc90000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfdc90000 0x00 0x1000>; + phandle = <0x12d>; + }; + + syscon@fdca0000 { + compatible = "rockchip,rk3568-usb2phy-grf\0syscon"; + reg = <0x00 0xfdca0000 0x00 0x8000>; + phandle = <0x135>; + }; + + syscon@fdca8000 { + compatible = "rockchip,rk3568-usb2phy-grf\0syscon"; + reg = <0x00 0xfdca8000 0x00 0x8000>; + phandle = <0x137>; + }; + + syscon@fdcb0000 { + compatible = "rockchip,rk3568-edp-phy-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfdcb0000 0x00 0x100>; + clocks = <0x23 0x192>; + + edp-phy { + compatible = "rockchip,rk3568-edp-phy"; + clocks = <0x3a 0x29>; + clock-names = "refclk"; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0xae>; + }; + }; + + syscon@fdcb8000 { + compatible = "rockchip,pcie30-phy-grf\0syscon"; + reg = <0x00 0xfdcb8000 0x00 0x10000>; + phandle = <0x138>; + }; + + sram@fdcc0000 { + compatible = "mmio-sram"; + reg = <0x00 0xfdcc0000 0x00 0xb000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0xfdcc0000 0xb000>; + + rkvdec-sram@0 { + reg = <0x00 0xb000>; + phandle = <0x84>; + }; + }; + + clock-controller@fdd00000 { + compatible = "rockchip,rk3568-pmucru"; + reg = <0x00 0xfdd00000 0x00 0x1000>; + rockchip,grf = <0x3b>; + rockchip,pmugrf = <0x3c>; + #clock-cells = <0x01>; + #reset-cells = <0x01>; + assigned-clocks = <0x3a 0x32>; + assigned-clock-parents = <0x3a 0x05>; + phandle = <0x3a>; + }; + + clock-controller@fdd20000 { + compatible = "rockchip,rk3568-cru"; + reg = <0x00 0xfdd20000 0x00 0x1000>; + rockchip,grf = <0x3b>; + #clock-cells = <0x01>; + #reset-cells = <0x01>; + assigned-clocks = <0x3a 0x05 0x23 0x106 0x23 0x10b 0x3a 0x01 0x3a 0x2b 0x23 0x03 0x23 0x19b 0x23 0x09 0x23 0x19c 0x23 0x19d 0x23 0x1a1 0x23 0x19e 0x23 0x19f 0x23 0x1a0 0x23 0x04 0x23 0x10d 0x23 0x10e 0x23 0x173 0x23 0x174 0x23 0x175 0x23 0x176 0x23 0xc9 0x23 0xca 0x23 0x06 0x23 0x7e 0x23 0x7f 0x23 0x3d 0x23 0x41 0x23 0x45 0x23 0x49 0x23 0x4d 0x23 0x4d 0x23 0x55 0x23 0x51 0x23 0x5d 0x23 0xdd>; + assigned-clock-rates = <0x8000 0x11e1a300 0x11e1a300 0xbebc200 0x5f5e100 0x3b9aca00 0x1dcd6500 0x13d92d40 0xee6b280 0x7735940 0x5f5e100 0x3b9aca0 0x2faf080 0x17d7840 0x46cf7100 0x8f0d180 0x5f5e100 0x1dcd6500 0x17d78400 0x8f0d180 0x5f5e100 0x11e1a300 0x8f0d180 0x47868c00 0x17d78400 0x5f5e100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x1dcd6500>; + assigned-clock-parents = <0x3a 0x08 0x23 0x04 0x23 0x04>; + phandle = <0x23>; + }; + + i2c@fdd40000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfdd40000 0x00 0x1000>; + clocks = <0x3a 0x07 0x3a 0x2d>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x2e 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x3d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + tcs4525@1c { + compatible = "tcs,tcs452x"; + reg = <0x1c>; + vin-supply = <0x3e>; + regulator-compatible = "fan53555-reg"; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <0xadf34>; + regulator-max-microvolt = <0x1535b0>; + regulator-ramp-delay = <0x8fc>; + fcs,suspend-voltage-selector = <0x01>; + regulator-boot-on; + regulator-always-on; + phandle = <0x05>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + interrupt-parent = <0x3f>; + interrupts = <0x03 0x08>; + pinctrl-names = "default\0pmic-sleep\0pmic-power-off\0pmic-reset"; + pinctrl-0 = <0x40>; + pinctrl-1 = <0x41 0x42>; + pinctrl-2 = <0x43 0x44>; + pinctrl-3 = <0x43 0x45>; + rockchip,system-power-controller; + wakeup-source; + #clock-cells = <0x01>; + clock-output-names = "rk808-clkout1\0rk808-clkout2"; + pmic-reset-func = <0x00>; + not-save-power-en = <0x01>; + vcc1-supply = <0x46>; + vcc2-supply = <0x46>; + vcc3-supply = <0x46>; + vcc4-supply = <0x46>; + vcc5-supply = <0x46>; + vcc6-supply = <0x46>; + vcc7-supply = <0x46>; + vcc8-supply = <0x46>; + vcc9-supply = <0x46>; + phandle = <0x152>; + + pwrkey { + status = "okay"; + }; + + pinctrl_rk8xx { + gpio-controller; + #gpio-cells = <0x02>; + + rk817_slppin_null { + pins = "gpio_slp"; + function = "pin_fun0"; + }; + + rk817_slppin_slp { + pins = "gpio_slp"; + function = "pin_fun1"; + phandle = <0x42>; + }; + + rk817_slppin_pwrdn { + pins = "gpio_slp"; + function = "pin_fun2"; + phandle = <0x44>; + }; + + rk817_slppin_rst { + pins = "gpio_slp"; + function = "pin_fun3"; + phandle = <0x45>; + }; + }; + + regulators { + + DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x7a120>; + regulator-max-microvolt = <0x149970>; + regulator-init-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x1771>; + regulator-initial-mode = <0x02>; + regulator-name = "vdd_logic"; + phandle = <0x75>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x7a120>; + regulator-max-microvolt = <0x149970>; + regulator-init-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x1771>; + regulator-initial-mode = <0x02>; + regulator-name = "vdd_gpu"; + phandle = <0x77>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x02>; + regulator-name = "vcc_ddr"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + DCDC_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x7a120>; + regulator-max-microvolt = <0x149970>; + regulator-init-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x1771>; + regulator-initial-mode = <0x02>; + regulator-name = "vdd_npu"; + phandle = <0x71>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG1 { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + regulator-name = "vdda0v9_image"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + regulator-name = "vdda_0v9"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + regulator-name = "vdda0v9_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0xdbba0>; + }; + }; + + LDO_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vccio_acodec"; + phandle = <0x30>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vccio_sd"; + phandle = <0x31>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vcc3v3_pmu"; + phandle = <0x2f>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x325aa0>; + }; + }; + + LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcca_1v8"; + phandle = <0x129>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcca1v8_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x1b7740>; + }; + }; + + LDO_REG9 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcca1v8_image"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcc_1v8"; + phandle = <0x32>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + SWITCH_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc_3v3"; + phandle = <0x33>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + SWITCH_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc3v3_sd"; + phandle = <0xcf>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + + codec { + #sound-dai-cells = <0x00>; + compatible = "rockchip,rk809-codec\0rockchip,rk817-codec"; + clocks = <0x23 0x1a3>; + clock-names = "mclk"; + assigned-clocks = <0x23 0x1a3 0x23 0x1a6>; + assigned-clock-rates = <0xbb8000>; + assigned-clock-parents = <0x23 0x48 0x23 0x48>; + pinctrl-names = "default\0spk_gpio"; + pinctrl-0 = <0x47>; + pinctrl-1 = <0x48>; + hp-volume = <0x03>; + spk-volume = <0x03>; + mic-in-differential; + board-spk-from-hp; + capture-volume = <0x00>; + io-channels = <0x49 0x07>; + hp-det-adc-value = <0x3e8>; + status = "okay"; + hp-adc-drift-scope = <0x64>; + phandle = <0x14b>; + }; + + rtc { + status = "disabled"; + }; + }; + + fusb302@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <0x3f>; + fcs,int_n = <0x3f 0x11 0x08>; + fusb340-switch-gpios = <0x4a 0x12 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4b>; + vbus-supply = <0x4c>; + status = "okay"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x4d>; + phandle = <0x2a>; + }; + }; + }; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + op-sink-microwatt = <0xf4240>; + sink-pdos = <0x40190fa>; + source-pdos = <0x4019096>; + }; + }; + }; + + serial@fdd50000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfdd50000 0x00 0x100>; + interrupts = <0x00 0x74 0x04>; + clocks = <0x3a 0x0b 0x3a 0x2c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x00 0x4e 0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x4f>; + status = "disabled"; + }; + + pwm@fdd70000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70000 0x00 0x10>; + interrupts = <0x00 0x52 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x50>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fdd70010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70010 0x00 0x10>; + interrupts = <0x00 0x52 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x51>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fdd70020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70020 0x00 0x10>; + interrupts = <0x00 0x52 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x52>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fdd70030 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70030 0x00 0x10>; + interrupts = <0x00 0x52 0x04 0x00 0x56 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x53>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + power-management@fdd90000 { + compatible = "rockchip,rk3568-pmu\0syscon\0simple-mfd"; + reg = <0x00 0xfdd90000 0x00 0x1000>; + + power-controller { + compatible = "rockchip,rk3568-power-controller"; + #power-domain-cells = <0x01>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x25>; + + pd_npu@6 { + reg = <0x06>; + clocks = <0x23 0x27 0x23 0x25 0x23 0x26>; + pm_qos = <0x54>; + }; + + pd_gpu@7 { + reg = <0x07>; + clocks = <0x23 0x19 0x23 0x1a>; + pm_qos = <0x55>; + }; + + pd_vi@8 { + reg = <0x08>; + clocks = <0x23 0xcc 0x23 0xcd>; + pm_qos = <0x56 0x57 0x58>; + }; + + pd_vo@9 { + reg = <0x09>; + clocks = <0x23 0xda 0x23 0xdb 0x23 0xdc>; + pm_qos = <0x59 0x5a 0x5b>; + }; + + pd_rga@10 { + reg = <0x0a>; + clocks = <0x23 0xf1 0x23 0xf2>; + pm_qos = <0x5c 0x5d 0x5e 0x5f 0x60 0x61>; + }; + + pd_vpu@11 { + reg = <0x0b>; + clocks = <0x23 0xed>; + pm_qos = <0x62>; + }; + + pd_rkvdec@13 { + clocks = <0x23 0x107>; + reg = <0x0d>; + pm_qos = <0x63>; + }; + + pd_rkvenc@14 { + reg = <0x0e>; + clocks = <0x23 0x102>; + pm_qos = <0x64 0x65 0x66>; + }; + + pd_pipe@15 { + reg = <0x0f>; + clocks = <0x23 0x7f>; + pm_qos = <0x67 0x68 0x69 0x6a 0x6b 0x6c 0x6d 0x6e>; + }; + }; + }; + + pvtm@fde00000 { + compatible = "rockchip,rk3568-core-pvtm"; + reg = <0x00 0xfde00000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@0 { + reg = <0x00>; + clocks = <0x23 0x13 0x23 0x1c2>; + clock-names = "clk\0pclk"; + resets = <0x23 0x1a 0x23 0x19>; + reset-names = "rts\0rst-p"; + thermal-zone = "soc-thermal"; + }; + }; + + npu@fde40000 { + compatible = "rockchip,rk3568-rknpu\0rockchip,rknpu"; + reg = <0x00 0xfde40000 0x00 0x10000>; + interrupts = <0x00 0x97 0x04>; + clocks = <0x02 0x02 0x23 0x23 0x23 0x28 0x23 0x29>; + clock-names = "scmi_clk\0clk\0aclk\0hclk"; + assigned-clocks = <0x23 0x23>; + assigned-clock-rates = <0x23c34600>; + resets = <0x23 0x2b 0x23 0x2c>; + reset-names = "srst_a\0srst_h"; + power-domains = <0x25 0x06>; + operating-points-v2 = <0x6f>; + iommus = <0x70>; + status = "okay"; + rknpu-supply = <0x71>; + }; + + npu-opp-table { + compatible = "operating-points-v2"; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x72 0x07 0x08 0x73 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x3e8 0xc350>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x153d8 0x01 0x153d9 0x16378 0x02 0x16379 0x186a0 0x03>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x6f>; + + opp-200000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0xbebc200>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-300000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x11b3dc40>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-400000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-600000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-700000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L0 = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L1 = <0xcf850 0xcf850 0xf4240>; + opp-microvolt-L2 = <0xcf850 0xcf850 0xf4240>; + opp-microvolt-L3 = <0xcf850 0xcf850 0xf4240>; + }; + + opp-800000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L0 = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L1 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L2 = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L3 = <0xd59f8 0xd59f8 0xf4240>; + }; + + opp-900000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xee098 0xee098 0xf4240>; + opp-microvolt-L0 = <0xee098 0xee098 0xf4240>; + opp-microvolt-L1 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L2 = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L3 = <0xdbba0 0xdbba0 0xf4240>; + }; + + opp-1000000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x3b9aca00>; + opp-microvolt = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L0 = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L1 = <0xee098 0xee098 0xf4240>; + opp-microvolt-L2 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L3 = <0xe1d48 0xe1d48 0xf4240>; + status = "disabled"; + }; + + opp-j-600000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + }; + + opp-m-900000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xe1d48 0xe1d48 0xf4240>; + }; + }; + + bus-npu { + compatible = "rockchip,rk3568-bus"; + rockchip,busfreq-policy = "clkfreq"; + clocks = <0x02 0x02>; + clock-names = "bus"; + operating-points-v2 = <0x74>; + status = "okay"; + bus-supply = <0x75>; + pvtm-supply = <0x05>; + }; + + bus-npu-opp-table { + compatible = "operating-points-v2"; + opp-shared; + nvmem-cells = <0x07>; + nvmem-cell-names = "pvtm"; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x16378 0x01 0x16379 0x186a0 0x02>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x74>; + + opp-700000000 { + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xdbba0>; + opp-microvolt-L0 = <0xdbba0>; + opp-microvolt-L1 = <0xd59f8>; + opp-microvolt-L2 = <0xd59f8>; + }; + + opp-900000000 { + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xdbba0>; + }; + + opp-1000000000 { + opp-hz = <0x00 0x3b9aca00>; + opp-microvolt = <0xe7ef0>; + opp-microvolt-L0 = <0xe7ef0>; + opp-microvolt-L1 = <0xe1d48>; + opp-microvolt-L2 = <0xdbba0>; + }; + }; + + iommu@fde4b000 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfde4b000 0x00 0x40>; + interrupts = <0x00 0x97 0x04>; + interrupt-names = "rknpu_mmu"; + clocks = <0x23 0x28 0x23 0x29>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x06>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x70>; + }; + + gpu@fde60000 { + compatible = "arm,mali-bifrost"; + reg = <0x00 0xfde60000 0x00 0x4000>; + interrupts = <0x00 0x27 0x04 0x00 0x29 0x04 0x00 0x28 0x04>; + interrupt-names = "GPU\0MMU\0JOB"; + upthreshold = <0x28>; + downdifferential = <0x0a>; + clocks = <0x02 0x01 0x23 0x1b>; + clock-names = "clk_mali\0clk_gpu"; + power-domains = <0x25 0x07>; + #cooling-cells = <0x02>; + operating-points-v2 = <0x76>; + status = "okay"; + mali-supply = <0x77>; + phandle = <0x21>; + + power-model { + compatible = "simple-power-model"; + leakage-range = <0x05 0x0f>; + ls = <0xffffa23e 0x5927 0x00>; + static-coefficient = <0x186a0>; + dynamic-coefficient = <0x3b9>; + ts = <0xfffe56a6 0xf87a 0xfffffab5 0x14>; + thermal-zone = "gpu-thermal"; + }; + }; + + opp-table2 { + compatible = "operating-points-v2"; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x78 0x07 0x08 0x79 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x320 0xc350>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x153d8 0x01 0x153d9 0x16378 0x02 0x16379 0x186a0 0x03>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x76>; + + opp-200000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0xbebc200>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-300000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x11e1a300>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-400000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-600000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L0 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L1 = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L2 = <0xcf850 0xcf850 0xf4240>; + opp-microvolt-L3 = <0xcf850 0xcf850 0xf4240>; + }; + + opp-700000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L0 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L1 = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L2 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L3 = <0xd59f8 0xd59f8 0xf4240>; + }; + + opp-800000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L0 = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L1 = <0xee098 0xee098 0xf4240>; + opp-microvolt-L2 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L3 = <0xe1d48 0xe1d48 0xf4240>; + }; + + opp-j-600000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + }; + + opp-m-800000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xe7ef0 0xe7ef0 0xf4240>; + }; + }; + + pvtm@fde80000 { + compatible = "rockchip,rk3568-gpu-pvtm"; + reg = <0x00 0xfde80000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@1 { + reg = <0x01>; + clocks = <0x23 0x1e 0x23 0x1d>; + clock-names = "clk\0pclk"; + resets = <0x23 0x24 0x23 0x23>; + reset-names = "rts\0rst-p"; + thermal-zone = "gpu-thermal"; + }; + }; + + pvtm@fde90000 { + compatible = "rockchip,rk3568-npu-pvtm"; + reg = <0x00 0xfde90000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@2 { + reg = <0x02>; + clocks = <0x23 0x2b 0x23 0x2a 0x23 0x25>; + clock-names = "clk\0pclk\0hclk"; + resets = <0x23 0x2e 0x23 0x2d>; + reset-names = "rts\0rst-p"; + thermal-zone = "soc-thermal"; + }; + }; + + vdpu@fdea0400 { + compatible = "rockchip,vpu-decoder-v2"; + reg = <0x00 0xfdea0400 0x00 0x400>; + interrupts = <0x00 0x8b 0x04>; + interrupt-names = "irq_dec"; + clocks = <0x23 0xee 0x23 0xef>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + resets = <0x23 0x11a 0x23 0x11b>; + reset-names = "video_a\0video_h"; + iommus = <0x7a>; + power-domains = <0x25 0x0b>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x00>; + rockchip,resetgroup-node = <0x00>; + status = "okay"; + }; + + iommu@fdea0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdea0800 0x00 0x40>; + interrupts = <0x00 0x8a 0x04>; + interrupt-names = "vdpu_mmu"; + clock-names = "aclk\0iface"; + clocks = <0x23 0xee 0x23 0xef>; + power-domains = <0x25 0x0b>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x7a>; + }; + + rk_rga@fdeb0000 { + compatible = "rockchip,rga2"; + reg = <0x00 0xfdeb0000 0x00 0x1000>; + interrupts = <0x00 0x5a 0x04>; + clocks = <0x23 0xf3 0x23 0xf4 0x23 0xf5>; + clock-names = "aclk_rga\0hclk_rga\0clk_rga"; + power-domains = <0x25 0x0a>; + status = "okay"; + }; + + ebc@fdec0000 { + compatible = "rockchip,rk3568-ebc-tcon"; + reg = <0x00 0xfdec0000 0x00 0x5000>; + interrupts = <0x00 0x11 0x04>; + clocks = <0x23 0xf9 0x23 0xfa>; + clock-names = "hclk\0dclk"; + power-domains = <0x25 0x0a>; + rockchip,grf = <0x3b>; + pinctrl-names = "default"; + pinctrl-0 = <0x7c>; + status = "disabled"; + }; + + jpegd@fded0000 { + compatible = "rockchip,rkv-jpeg-decoder-v1"; + reg = <0x00 0xfded0000 0x00 0x400>; + interrupts = <0x00 0x3e 0x04>; + clocks = <0x23 0xfb 0x23 0xfc>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,disable-auto-freq; + resets = <0x23 0x12c 0x23 0x12d>; + reset-names = "video_a\0video_h"; + iommus = <0x7d>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x01>; + rockchip,resetgroup-node = <0x01>; + power-domains = <0x25 0x0a>; + status = "okay"; + }; + + iommu@fded0480 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfded0480 0x00 0x40>; + interrupts = <0x00 0x3d 0x04>; + interrupt-names = "jpegd_mmu"; + clock-names = "aclk\0iface"; + clocks = <0x23 0xfb 0x23 0xfc>; + power-domains = <0x25 0x0a>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x7d>; + }; + + vepu@fdee0000 { + compatible = "rockchip,vpu-encoder-v2"; + reg = <0x00 0xfdee0000 0x00 0x400>; + interrupts = <0x00 0x40 0x04>; + clocks = <0x23 0xfd 0x23 0xfe>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,disable-auto-freq; + resets = <0x23 0x12e 0x23 0x12f>; + reset-names = "video_a\0video_h"; + iommus = <0x7e>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x02>; + rockchip,resetgroup-node = <0x02>; + power-domains = <0x25 0x0a>; + status = "okay"; + }; + + iommu@fdee0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdee0800 0x00 0x40>; + interrupts = <0x00 0x3f 0x04>; + interrupt-names = "vepu_mmu"; + clock-names = "aclk\0iface"; + clocks = <0x23 0xfd 0x23 0xfe>; + power-domains = <0x25 0x0a>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x7e>; + }; + + iep@fdef0000 { + compatible = "rockchip,iep-v2"; + reg = <0x00 0xfdef0000 0x00 0x500>; + interrupts = <0x00 0x38 0x04>; + clocks = <0x23 0xf6 0x23 0xf7 0x23 0xf8>; + clock-names = "aclk\0hclk\0sclk"; + resets = <0x23 0x127 0x23 0x128 0x23 0x129>; + reset-names = "rst_a\0rst_h\0rst_s"; + power-domains = <0x25 0x0a>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x05>; + rockchip,resetgroup-node = <0x05>; + iommus = <0x7f>; + status = "okay"; + }; + + iommu@fdef0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdef0800 0x00 0x100>; + interrupts = <0x00 0x38 0x04>; + interrupt-names = "iep_mmu"; + clocks = <0x23 0xf6 0x23 0xf7>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + power-domains = <0x25 0x0a>; + status = "okay"; + phandle = <0x7f>; + }; + + eink@fdf00000 { + compatible = "rockchip,rk3568-eink-tcon"; + reg = <0x00 0xfdf00000 0x00 0x74>; + interrupts = <0x00 0xb2 0x04>; + clocks = <0x23 0xff 0x23 0x100>; + clock-names = "pclk\0hclk"; + status = "disabled"; + }; + + rkvenc@fdf40000 { + compatible = "rockchip,rkv-encoder-v1"; + reg = <0x00 0xfdf40000 0x00 0x400>; + interrupts = <0x00 0x8c 0x04>; + interrupt-names = "irq_enc"; + clocks = <0x23 0x103 0x23 0x104 0x23 0x105>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_core"; + rockchip,normal-rates = <0x11b3dc40 0x00 0x11b3dc40>; + resets = <0x23 0x133 0x23 0x134 0x23 0x135>; + reset-names = "video_a\0video_h\0video_core"; + assigned-clocks = <0x23 0x103 0x23 0x105>; + assigned-clock-rates = <0x11b3dc40 0x11b3dc40>; + iommus = <0x80>; + node-name = "rkvenc"; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x03>; + rockchip,resetgroup-node = <0x03>; + power-domains = <0x25 0x0e>; + operating-points-v2 = <0x81>; + status = "okay"; + venc-supply = <0x75>; + }; + + rkvenc-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x07>; + nvmem-cell-names = "pvtm"; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x16378 0x01 0x16379 0x186a0 0x02>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x81>; + + opp-297000000 { + opp-hz = <0x00 0x11b3dc40>; + opp-microvolt = <0xdbba0>; + opp-microvolt-L0 = <0xdbba0>; + opp-microvolt-L1 = <0xd59f8>; + opp-microvolt-L2 = <0xd59f8>; + }; + + opp-400000000 { + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xe7ef0>; + opp-microvolt-L0 = <0xe7ef0>; + opp-microvolt-L1 = <0xe1d48>; + opp-microvolt-L2 = <0xdbba0>; + }; + }; + + iommu@fdf40f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdf40f00 0x00 0x40 0x00 0xfdf40f40 0x00 0x40>; + interrupts = <0x00 0x8d 0x04 0x00 0x8e 0x04>; + interrupt-names = "rkvenc_mmu0\0rkvenc_mmu1"; + clocks = <0x23 0x103 0x23 0x104>; + clock-names = "aclk\0iface"; + rockchip,disable-mmu-reset; + rockchip,enable-cmd-retry; + #iommu-cells = <0x00>; + power-domains = <0x25 0x0e>; + status = "okay"; + phandle = <0x80>; + }; + + rkvdec@fdf80200 { + compatible = "rockchip,rkv-decoder-rk3568\0rockchip,rkv-decoder-v2"; + reg = <0x00 0xfdf80200 0x00 0x400 0x00 0xfdf80100 0x00 0x100>; + reg-names = "regs\0link"; + interrupts = <0x00 0x5b 0x04>; + interrupt-names = "irq_dec"; + clocks = <0x23 0x108 0x23 0x109 0x23 0x10a 0x23 0x10b 0x23 0x10c>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_cabac\0clk_core\0clk_hevc_cabac"; + rockchip,normal-rates = <0x11b3dc40 0x00 0x11b3dc40 0x11b3dc40 0x23c34600>; + rockchip,advanced-rates = <0x179a7b00 0x00 0x179a7b00 0x179a7b00 0x23c34600>; + rockchip,default-max-load = <0x1fe000>; + resets = <0x23 0x142 0x23 0x143 0x23 0x144 0x23 0x145 0x23 0x146>; + assigned-clocks = <0x23 0x108 0x23 0x10a 0x23 0x10b 0x23 0x10c>; + assigned-clock-rates = <0x11b3dc40 0x11b3dc40 0x11b3dc40 0x11b3dc40>; + reset-names = "video_a\0video_h\0video_cabac\0video_core\0video_hevc_cabac"; + power-domains = <0x25 0x0d>; + operating-points-v2 = <0x82>; + vdec-supply = <0x75>; + iommus = <0x83>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x04>; + rockchip,resetgroup-node = <0x04>; + rockchip,sram = <0x84>; + rockchip,rcb-iova = <0x10000000 0x10000>; + rockchip,rcb-min-width = <0x200>; + rockchip,task-capacity = <0x10>; + status = "okay"; + }; + + rkvdec-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x85 0x07>; + nvmem-cell-names = "leakage\0pvtm"; + rockchip,leakage-voltage-sel = <0x01 0x50 0x00 0x51 0xfe 0x01>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x186a0 0x01>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x82>; + + opp-297000000 { + opp-hz = <0x00 0x11b3dc40>; + opp-microvolt = <0xdbba0>; + opp-microvolt-L0 = <0xdbba0>; + opp-microvolt-L1 = <0xd59f8>; + }; + + opp-400000000 { + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xdbba0>; + }; + }; + + iommu@fdf80800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdf80800 0x00 0x40 0x00 0xfdf80840 0x00 0x40>; + interrupts = <0x00 0x5c 0x04>; + interrupt-names = "rkvdec_mmu"; + clocks = <0x23 0x108 0x23 0x109>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x0d>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x83>; + }; + + mipi-csi2-hw@fdfb0000 { + compatible = "rockchip,rk3568-mipi-csi2-hw"; + reg = <0x00 0xfdfb0000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x08 0x04 0x00 0x09 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x23 0xd5>; + clock-names = "pclk_csi2host"; + resets = <0x23 0xff>; + reset-names = "srst_csihost_p"; + status = "okay"; + phandle = <0x1e>; + }; + + rkcif@fdfe0000 { + compatible = "rockchip,rk3568-cif"; + reg = <0x00 0xfdfe0000 0x00 0x8000>; + reg-names = "cif_regs"; + interrupts = <0x00 0x92 0x04>; + interrupt-names = "cif-intr"; + clocks = <0x23 0xce 0x23 0xcf 0x23 0xd0 0x23 0xd1>; + clock-names = "aclk_cif\0hclk_cif\0dclk_cif\0iclk_cif_g"; + resets = <0x23 0xf7 0x23 0xf8 0x23 0xf9 0x23 0xfb 0x23 0xfa>; + reset-names = "rst_cif_a\0rst_cif_h\0rst_cif_d\0rst_cif_p\0rst_cif_i"; + assigned-clocks = <0x23 0xd0>; + assigned-clock-rates = <0x11e1a300>; + power-domains = <0x25 0x08>; + rockchip,grf = <0x3b>; + iommus = <0x86>; + status = "disabled"; + phandle = <0x87>; + }; + + iommu@fdfe0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdfe0800 0x00 0x100>; + interrupts = <0x00 0x92 0x04>; + interrupt-names = "cif_mmu"; + clocks = <0x23 0xce 0x23 0xcf>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x08>; + rockchip,disable-mmu-reset; + #iommu-cells = <0x00>; + status = "disabled"; + phandle = <0x86>; + }; + + rkcif_dvp { + compatible = "rockchip,rkcif-dvp"; + rockchip,hw = <0x87>; + status = "disabled"; + phandle = <0x88>; + }; + + rkcif_dvp_sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x88>; + status = "disabled"; + }; + + rkcif_mipi_lvds { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x87>; + status = "disabled"; + phandle = <0x89>; + }; + + rkcif_mipi_lvds_sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x89>; + status = "disabled"; + }; + + rkisp@fdff0000 { + compatible = "rockchip,rk3568-rkisp"; + reg = <0x00 0xfdff0000 0x00 0x10000>; + interrupts = <0x00 0x39 0x04 0x00 0x3a 0x04 0x00 0x3c 0x04>; + interrupt-names = "mipi_irq\0mi_irq\0isp_irq"; + clocks = <0x23 0xd2 0x23 0xd3 0x23 0xd4>; + clock-names = "aclk_isp\0hclk_isp\0clk_isp"; + resets = <0x23 0xfd 0x23 0xfc>; + reset-names = "isp\0isp-h"; + rockchip,grf = <0x3b>; + power-domains = <0x25 0x08>; + iommus = <0x8a>; + rockchip,iq-feature = <0x1bfb 0xfffe67ff>; + status = "okay"; + phandle = <0x8b>; + }; + + iommu@fdff1a00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdff1a00 0x00 0x100>; + interrupts = <0x00 0x3b 0x04>; + interrupt-names = "isp_mmu"; + clocks = <0x23 0xd2 0x23 0xd3>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x08>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "okay"; + phandle = <0x8a>; + }; + + rkisp-vir0 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x8b>; + status = "okay"; + + port { + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x8c>; + phandle = <0x134>; + }; + }; + }; + + rkisp-vir1 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x8b>; + status = "disabled"; + }; + + uio@fe010000 { + compatible = "rockchip,uio-gmac"; + reg = <0x00 0xfe010000 0x00 0x10000>; + rockchip,ethernet = <0x8d>; + status = "disabled"; + }; + + ethernet@fe010000 { + local-mac-address = [5e 4f fd 70 05 c6]; + compatible = "rockchip,rk3568-gmac\0snps,dwmac-4.20a"; + reg = <0x00 0xfe010000 0x00 0x10000>; + interrupts = <0x00 0x20 0x04 0x00 0x1d 0x04>; + interrupt-names = "macirq\0eth_wake_irq"; + rockchip,grf = <0x3b>; + clocks = <0x23 0x186 0x23 0x189 0x23 0x189 0x23 0xc7 0x23 0xc3 0x23 0xc4 0x23 0x189 0x23 0xc8 0x23 0xac 0x23 0xab>; + clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_refout\0aclk_mac\0pclk_mac\0clk_mac_speed\0ptp_ref\0pclk_xpcs\0clk_xpcs_eee"; + resets = <0x23 0xec>; + reset-names = "stmmaceth"; + snps,mixed-burst; + snps,tso; + snps,axi-config = <0x8e>; + snps,mtl-rx-config = <0x8f>; + snps,mtl-tx-config = <0x90>; + status = "okay"; + phy-mode = "rgmii"; + clock_in_out = "input"; + snps,reset-gpio = <0x91 0x19 0x01>; + snps,reset-active-low; + snps,reset-delays-us = <0x00 0x4e20 0x186a0>; + assigned-clocks = <0x23 0x189 0x23 0x186>; + assigned-clock-parents = <0x23 0x187 0x92>; + pinctrl-names = "default"; + pinctrl-0 = <0x93 0x94 0x95 0x96 0x97 0x98>; + tx_delay = <0x3e>; + rx_delay = <0x32>; + phy-handle = <0x99>; + phandle = <0x8d>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x00>; + led_status_value = <0x6940>; + phandle = <0x99>; + }; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x04>; + snps,rd_osr_lmt = <0x08>; + snps,blen = <0x00 0x00 0x00 0x00 0x10 0x08 0x04>; + phandle = <0x8e>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x01>; + phandle = <0x8f>; + + queue0 { + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x01>; + phandle = <0x90>; + + queue0 { + }; + }; + }; + + vop@fe040000 { + compatible = "rockchip,rk3568-vop"; + reg = <0x00 0xfe040000 0x00 0x3000 0x00 0xfe044000 0x00 0x1000>; + reg-names = "regs\0gamma_lut"; + rockchip,grf = <0x3b>; + interrupts = <0x00 0x94 0x04>; + clocks = <0x23 0xdd 0x23 0xde 0x23 0xdf 0x23 0xe0 0x23 0xe1>; + clock-names = "aclk_vop\0hclk_vop\0dclk_vp0\0dclk_vp1\0dclk_vp2"; + iommus = <0x9a>; + power-domains = <0x25 0x09>; + status = "okay"; + assigned-clocks = <0x23 0xdf 0x23 0xe0>; + assigned-clock-parents = <0x3a 0x02 0x23 0x05>; + disable-win-move; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + phandle = <0x15>; + + port@0 { + rockchip,primary-plane = <0x04>; + rockchip,plane-mask = <0x15>; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x9b>; + phandle = <0x17>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x9c>; + phandle = <0x18>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x9d>; + phandle = <0x19>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0x9e>; + phandle = <0x1a>; + }; + }; + + port@1 { + rockchip,primary-plane = <0x05>; + rockchip,plane-mask = <0x22>; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x01>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x9f>; + phandle = <0xa8>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa0>; + phandle = <0xa9>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xa1>; + phandle = <0xaf>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0xa2>; + phandle = <0xad>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0xa3>; + phandle = <0x1b>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0xa4>; + phandle = <0x37>; + }; + }; + + port@2 { + rockchip,primary-plane = <0x03>; + rockchip,plane-mask = <0x08>; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x02>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xa5>; + phandle = <0x35>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa6>; + phandle = <0x1c>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xa7>; + phandle = <0x38>; + }; + }; + }; + }; + + iommu@fe043e00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfe043e00 0x00 0x100 0x00 0xfe043f00 0x00 0x100>; + interrupts = <0x00 0x94 0x04>; + interrupt-names = "vop_mmu"; + clocks = <0x23 0xdd 0x23 0xde>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + rockchip,disable-device-link-resume; + status = "okay"; + phandle = <0x9a>; + }; + + dsi@fe060000 { + compatible = "rockchip,rk3568-mipi-dsi"; + reg = <0x00 0xfe060000 0x00 0x10000>; + interrupts = <0x00 0x44 0x04>; + clocks = <0x23 0xe8 0x23 0xda>; + clock-names = "pclk\0hclk"; + resets = <0x23 0x110>; + reset-names = "apb"; + phys = <0x34>; + phy-names = "dphy"; + power-domains = <0x25 0x09>; + rockchip,grf = <0x3b>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x17>; + status = "disabled"; + phandle = <0x9b>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa8>; + status = "disabled"; + phandle = <0x9f>; + }; + }; + }; + }; + + dsi@fe070000 { + compatible = "rockchip,rk3568-mipi-dsi"; + reg = <0x00 0xfe070000 0x00 0x10000>; + interrupts = <0x00 0x45 0x04>; + clocks = <0x23 0xe9 0x23 0xda>; + clock-names = "pclk\0hclk"; + resets = <0x23 0x111>; + reset-names = "apb"; + phys = <0x36>; + phy-names = "dphy"; + power-domains = <0x25 0x09>; + rockchip,grf = <0x3b>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x18>; + status = "disabled"; + phandle = <0x9c>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa9>; + status = "disabled"; + phandle = <0xa0>; + }; + }; + }; + }; + + hdmi@fe0a0000 { + compatible = "rockchip,rk3568-dw-hdmi"; + reg = <0x00 0xfe0a0000 0x00 0x20000>; + interrupts = <0x00 0x2d 0x04>; + clocks = <0x23 0xe6 0x23 0xe7 0x23 0x193 0x3a 0x02 0x23 0xde>; + clock-names = "iahb\0isfr\0cec\0ref\0hclk"; + power-domains = <0x25 0x09>; + reg-io-width = <0x04>; + rockchip,grf = <0x3b>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xaa 0xab 0xac>; + status = "okay"; + phandle = <0x147>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x1a>; + status = "okay"; + phandle = <0x9e>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xad>; + status = "disabled"; + phandle = <0xa2>; + }; + }; + }; + }; + + edp@fe0c0000 { + compatible = "rockchip,rk3568-edp"; + reg = <0x00 0xfe0c0000 0x00 0x10000>; + interrupts = <0x00 0x12 0x04>; + clocks = <0x3a 0x29 0x23 0xea 0x23 0xeb 0x23 0xda>; + clock-names = "dp\0pclk\0spdif\0hclk"; + resets = <0x23 0x113 0x23 0x112>; + reset-names = "dp\0apb"; + phys = <0xae>; + phy-names = "dp"; + power-domains = <0x25 0x09>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x19>; + status = "disabled"; + phandle = <0x9d>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xaf>; + status = "disabled"; + phandle = <0xa1>; + }; + }; + }; + }; + + nocp-cpu@fe102000 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102000 0x00 0x400>; + phandle = <0xb5>; + }; + + nocp-gpu-vpu-rga-venc@fe102400 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102400 0x00 0x400>; + }; + + nocp-vdec@fe102800 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102800 0x00 0x400>; + }; + + nocp-vi-usb-peri-pipe@fe102c00 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102c00 0x00 0x400>; + }; + + nocp-vo@fe103000 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe103000 0x00 0x400>; + }; + + qos@fe128000 { + compatible = "syscon"; + reg = <0x00 0xfe128000 0x00 0x20>; + phandle = <0x55>; + }; + + qos@fe138080 { + compatible = "syscon"; + reg = <0x00 0xfe138080 0x00 0x20>; + phandle = <0x64>; + }; + + qos@fe138100 { + compatible = "syscon"; + reg = <0x00 0xfe138100 0x00 0x20>; + phandle = <0x65>; + }; + + qos@fe138180 { + compatible = "syscon"; + reg = <0x00 0xfe138180 0x00 0x20>; + phandle = <0x66>; + }; + + qos@fe148000 { + compatible = "syscon"; + reg = <0x00 0xfe148000 0x00 0x20>; + phandle = <0x56>; + }; + + qos@fe148080 { + compatible = "syscon"; + reg = <0x00 0xfe148080 0x00 0x20>; + phandle = <0x57>; + }; + + qos@fe148100 { + compatible = "syscon"; + reg = <0x00 0xfe148100 0x00 0x20>; + phandle = <0x58>; + }; + + qos@fe150000 { + compatible = "syscon"; + reg = <0x00 0xfe150000 0x00 0x20>; + phandle = <0x62>; + }; + + qos@fe158000 { + compatible = "syscon"; + reg = <0x00 0xfe158000 0x00 0x20>; + phandle = <0x5c>; + }; + + qos@fe158100 { + compatible = "syscon"; + reg = <0x00 0xfe158100 0x00 0x20>; + phandle = <0x5d>; + }; + + qos@fe158180 { + compatible = "syscon"; + reg = <0x00 0xfe158180 0x00 0x20>; + phandle = <0x5e>; + }; + + qos@fe158200 { + compatible = "syscon"; + reg = <0x00 0xfe158200 0x00 0x20>; + phandle = <0x5f>; + }; + + qos@fe158280 { + compatible = "syscon"; + reg = <0x00 0xfe158280 0x00 0x20>; + phandle = <0x60>; + }; + + qos@fe158300 { + compatible = "syscon"; + reg = <0x00 0xfe158300 0x00 0x20>; + phandle = <0x61>; + }; + + qos@fe180000 { + compatible = "syscon"; + reg = <0x00 0xfe180000 0x00 0x20>; + phandle = <0x54>; + }; + + qos@fe190000 { + compatible = "syscon"; + reg = <0x00 0xfe190000 0x00 0x20>; + phandle = <0x67>; + }; + + qos@fe190080 { + compatible = "syscon"; + reg = <0x00 0xfe190080 0x00 0x20>; + phandle = <0x68>; + }; + + qos@fe190100 { + compatible = "syscon"; + reg = <0x00 0xfe190100 0x00 0x20>; + phandle = <0x69>; + }; + + qos@fe190200 { + compatible = "syscon"; + reg = <0x00 0xfe190200 0x00 0x20>; + phandle = <0x6a>; + }; + + qos@fe190280 { + compatible = "syscon"; + reg = <0x00 0xfe190280 0x00 0x20>; + phandle = <0x6b>; + }; + + qos@fe190300 { + compatible = "syscon"; + reg = <0x00 0xfe190300 0x00 0x20>; + phandle = <0x6c>; + }; + + qos@fe190380 { + compatible = "syscon"; + reg = <0x00 0xfe190380 0x00 0x20>; + phandle = <0x6d>; + }; + + qos@fe190400 { + compatible = "syscon"; + reg = <0x00 0xfe190400 0x00 0x20>; + phandle = <0x6e>; + }; + + qos@fe198000 { + compatible = "syscon"; + reg = <0x00 0xfe198000 0x00 0x20>; + phandle = <0x63>; + }; + + qos@fe1a8000 { + compatible = "syscon"; + reg = <0x00 0xfe1a8000 0x00 0x20>; + phandle = <0x59>; + }; + + qos@fe1a8080 { + compatible = "syscon"; + reg = <0x00 0xfe1a8080 0x00 0x20>; + phandle = <0x5a>; + }; + + qos@fe1a8100 { + compatible = "syscon"; + reg = <0x00 0xfe1a8100 0x00 0x20>; + phandle = <0x5b>; + }; + + dwmmc@fe000000 { + compatible = "rockchip,rk3568-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe000000 0x00 0x4000>; + interrupts = <0x00 0x64 0x04>; + max-frequency = <0x8f0d180>; + clocks = <0x23 0xc1 0x23 0xc2 0x23 0x18e 0x23 0x18f>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + resets = <0x23 0xeb>; + reset-names = "reset"; + status = "okay"; + no-sd; + no-mmc; + bus-width = <0x04>; + disable-wp; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <0xb0 0xb1 0xb2>; + sd-uhs-sdr104; + mmc-pwrseq = <0xb3>; + non-removable; + }; + + dfi@fe230000 { + reg = <0x00 0xfe230000 0x00 0x400>; + compatible = "rockchip,rk3568-dfi"; + rockchip,pmugrf = <0x3c>; + status = "okay"; + phandle = <0xb4>; + }; + + dmc { + compatible = "rockchip,rk3568-dmc"; + interrupts = <0x00 0x0a 0x04>; + interrupt-names = "complete"; + devfreq-events = <0xb4 0xb5>; + clocks = <0x02 0x03>; + clock-names = "dmc_clk"; + operating-points-v2 = <0xb6>; + vop-bw-dmc-freq = <0x00 0x11e 0x4f1a0 0x11f 0x1869f 0x80e80>; + vop-frame-bw-dmc-freq = <0x00 0x26c 0x4f1a0 0x26d 0x1869f 0xbe6e0>; + cpu-bw-dmc-freq = <0x00 0x15e 0x4f1a0 0x15f 0x190 0x80e80 0x191 0x1869f 0xbe6e0>; + upthreshold = <0x28>; + downdifferential = <0x14>; + system-status-level = <0x01 0x04 0x08 0x08 0x02 0x01 0x10 0x04 0x10000 0x04 0x1000 0x08 0x4000 0x08 0x2000 0x08 0xc00 0x08>; + auto-min-freq = <0x4f1a0>; + auto-freq-en = <0x01>; + #cooling-cells = <0x02>; + status = "okay"; + center-supply = <0x75>; + phandle = <0x16>; + }; + + dmc-fsp { + compatible = "rockchip,rk3568-dmc-fsp"; + debug_print_level = <0x00>; + ddr3_params = <0xb7>; + ddr4_params = <0xb8>; + lpddr3_params = <0xb9>; + lpddr4_params = <0xba>; + lpddr4x_params = <0xbb>; + status = "okay"; + }; + + dmc-opp-table { + compatible = "operating-points-v2"; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x85 0x07 0x08 0xbc 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x618 0x124f8>; + rockchip,leakage-voltage-sel = <0x01 0x50 0x00 0x51 0xfe 0x01>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x186a0 0x01>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0xb6>; + + opp-1560000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x5cfbb600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L0 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L1 = <0xd59f8 0xd59f8 0xf4240>; + }; + + opp-j-m-1560000000 { + opp-supported-hw = <0x06 0xffff>; + opp-hz = <0x00 0x5cfbb600>; + opp-microvolt = <0xd59f8 0xd59f8 0xf4240>; + }; + }; + + pcie@fe260000 { + compatible = "rockchip,rk3568-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x00 0x0f>; + clocks = <0x23 0x81 0x23 0x82 0x23 0x83 0x23 0x84 0x23 0x85>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux"; + device_type = "pci"; + interrupts = <0x00 0x4b 0x04 0x00 0x4a 0x04 0x00 0x49 0x04 0x00 0x48 0x04 0x00 0x47 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xbd 0x00 0x00 0x00 0x00 0x02 0xbd 0x01 0x00 0x00 0x00 0x03 0xbd 0x02 0x00 0x00 0x00 0x04 0xbd 0x03>; + linux,pci-domain = <0x00>; + num-ib-windows = <0x06>; + num-viewport = <0x08>; + num-ob-windows = <0x02>; + max-link-speed = <0x02>; + msi-map = <0x00 0xbe 0x00 0x1000>; + num-lanes = <0x01>; + phys = <0x27 0x02>; + phy-names = "pcie-phy"; + power-domains = <0x25 0x0f>; + ranges = <0x800 0x00 0xf4000000 0x00 0xf4000000 0x00 0x100000 0x81000000 0x00 0xf4100000 0x00 0xf4100000 0x00 0x100000 0x82000000 0x00 0xf4200000 0x00 0xf4200000 0x00 0x1e00000 0xc3000000 0x03 0x00 0x03 0x00 0x00 0x40000000>; + reg = <0x03 0xc0000000 0x00 0x400000 0x00 0xfe260000 0x00 0x10000>; + reg-names = "pcie-dbi\0pcie-apb"; + resets = <0x23 0xa1>; + reset-names = "pipe"; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x48 0x01>; + phandle = <0xbd>; + }; + }; + + pcie@fe270000 { + compatible = "rockchip,rk3568-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x10 0x1f>; + clocks = <0x23 0x88 0x23 0x89 0x23 0x8a 0x23 0x8b 0x23 0x8c>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux"; + device_type = "pci"; + interrupts = <0x00 0xa0 0x04 0x00 0x9f 0x04 0x00 0x9e 0x04 0x00 0x9d 0x04 0x00 0x9c 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xbf 0x00 0x00 0x00 0x00 0x02 0xbf 0x01 0x00 0x00 0x00 0x03 0xbf 0x02 0x00 0x00 0x00 0x04 0xbf 0x03>; + linux,pci-domain = <0x01>; + num-ib-windows = <0x06>; + num-ob-windows = <0x02>; + num-viewport = <0x08>; + max-link-speed = <0x03>; + msi-map = <0x1000 0xbe 0x1000 0x1000>; + num-lanes = <0x01>; + phys = <0xc0>; + phy-names = "pcie-phy"; + power-domains = <0x25 0x0f>; + ranges = <0x800 0x00 0xf2000000 0x00 0xf2000000 0x00 0x100000 0x81000000 0x00 0xf2100000 0x00 0xf2100000 0x00 0x100000 0x82000000 0x00 0xf2200000 0x00 0xf2200000 0x00 0x1e00000 0xc3000000 0x03 0x40000000 0x03 0x40000000 0x00 0x40000000>; + reg = <0x03 0xc0400000 0x00 0x400000 0x00 0xfe270000 0x00 0x10000>; + reg-names = "pcie-dbi\0pcie-apb"; + resets = <0x23 0xb1>; + reset-names = "pipe"; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9d 0x01>; + phandle = <0xbf>; + }; + }; + + pcie@fe280000 { + compatible = "rockchip,rk3568-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x20 0x2f>; + clocks = <0x23 0x8f 0x23 0x90 0x23 0x91 0x23 0x92 0x23 0x93>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux"; + device_type = "pci"; + interrupts = <0x00 0xa5 0x04 0x00 0xa4 0x04 0x00 0xa3 0x04 0x00 0xa2 0x04 0x00 0xa1 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xc1 0x00 0x00 0x00 0x00 0x02 0xc1 0x01 0x00 0x00 0x00 0x03 0xc1 0x02 0x00 0x00 0x00 0x04 0xc1 0x03>; + linux,pci-domain = <0x02>; + num-ib-windows = <0x06>; + num-viewport = <0x08>; + num-ob-windows = <0x02>; + max-link-speed = <0x03>; + msi-map = <0x2000 0xbe 0x2000 0x1000>; + num-lanes = <0x02>; + phys = <0xc0>; + phy-names = "pcie-phy"; + power-domains = <0x25 0x0f>; + ranges = <0x800 0x00 0xf0000000 0x00 0xf0000000 0x00 0x100000 0x81000000 0x00 0xf0100000 0x00 0xf0100000 0x00 0x100000 0x82000000 0x00 0xf0200000 0x00 0xf0200000 0x00 0x1e00000 0xc3000000 0x03 0x80000000 0x03 0x80000000 0x00 0x40000000>; + reg = <0x03 0xc0800000 0x00 0x400000 0x00 0xfe280000 0x00 0x10000>; + reg-names = "pcie-dbi\0pcie-apb"; + resets = <0x23 0xc1>; + reset-names = "pipe"; + status = "okay"; + reset-gpios = <0x91 0x1e 0x00>; + vpcie3v3-supply = <0xc2>; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xa2 0x01>; + phandle = <0xc1>; + }; + }; + + uio@fe2a0000 { + compatible = "rockchip,uio-gmac"; + reg = <0x00 0xfe2a0000 0x00 0x10000>; + rockchip,ethernet = <0xc3>; + status = "disabled"; + }; + + ethernet@fe2a0000 { + local-mac-address = [5a 4f fd 70 05 c6]; + compatible = "rockchip,rk3568-gmac\0snps,dwmac-4.20a"; + reg = <0x00 0xfe2a0000 0x00 0x10000>; + interrupts = <0x00 0x1b 0x04 0x00 0x18 0x04>; + interrupt-names = "macirq\0eth_wake_irq"; + rockchip,grf = <0x3b>; + clocks = <0x23 0x182 0x23 0x185 0x23 0x185 0x23 0xb8 0x23 0xb4 0x23 0xb5 0x23 0x185 0x23 0xb9 0x23 0xac 0x23 0xab>; + clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_refout\0aclk_mac\0pclk_mac\0clk_mac_speed\0ptp_ref\0pclk_xpcs\0clk_xpcs_eee"; + resets = <0x23 0xd7>; + reset-names = "stmmaceth"; + snps,mixed-burst; + snps,tso; + snps,axi-config = <0xc4>; + snps,mtl-rx-config = <0xc5>; + snps,mtl-tx-config = <0xc6>; + status = "okay"; + phy-mode = "rgmii"; + clock_in_out = "input"; + snps,reset-gpio = <0x91 0x1b 0x01>; + snps,reset-active-low; + snps,reset-delays-us = <0x00 0x4e20 0x186a0>; + assigned-clocks = <0x23 0x185 0x23 0x182>; + assigned-clock-parents = <0x23 0x183 0xc7>; + pinctrl-names = "default"; + pinctrl-0 = <0xc8 0xc9 0xca 0xcb 0xcc 0xcd>; + tx_delay = <0x4a>; + rx_delay = <0x2e>; + phy-handle = <0xce>; + phandle = <0xc3>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x00>; + led_status_value = <0x6940>; + phandle = <0xce>; + }; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x04>; + snps,rd_osr_lmt = <0x08>; + snps,blen = <0x00 0x00 0x00 0x00 0x10 0x08 0x04>; + phandle = <0xc4>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x01>; + phandle = <0xc5>; + + queue0 { + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x01>; + phandle = <0xc6>; + + queue0 { + }; + }; + }; + + dwmmc@fe2b0000 { + compatible = "rockchip,rk3568-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe2b0000 0x00 0x4000>; + interrupts = <0x00 0x62 0x04>; + max-frequency = <0x8f0d180>; + clocks = <0x23 0xb0 0x23 0xb1 0x23 0x18a 0x23 0x18b>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + resets = <0x23 0xd4>; + reset-names = "reset"; + status = "okay"; + no-sdio; + no-mmc; + bus-width = <0x04>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vmmc-supply = <0xcf>; + vqmmc-supply = <0x31>; + pinctrl-names = "default"; + pinctrl-0 = <0xd0 0xd1 0xd2 0xd3>; + }; + + dwmmc@fe2c0000 { + compatible = "rockchip,rk3568-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe2c0000 0x00 0x4000>; + interrupts = <0x00 0x63 0x04>; + max-frequency = <0x8f0d180>; + clocks = <0x23 0xb2 0x23 0xb3 0x23 0x18c 0x23 0x18d>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + resets = <0x23 0xd6>; + reset-names = "reset"; + status = "disabled"; + }; + + spi@fe300000 { + compatible = "rockchip,sfc"; + reg = <0x00 0xfe300000 0x00 0x4000>; + interrupts = <0x00 0x65 0x04>; + clocks = <0x23 0x78 0x23 0x76>; + clock-names = "clk_sfc\0hclk_sfc"; + assigned-clocks = <0x23 0x78>; + assigned-clock-rates = <0x2faf080>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <0xd4>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x00>; + spi-max-frequency = <0x2faf080>; + spi-rx-bus-width = <0x01>; + spi-tx-bus-width = <0x01>; + }; + }; + + sdhci@fe310000 { + compatible = "rockchip,rk3568-dwcmshc\0rockchip,dwcmshc-sdhci"; + reg = <0x00 0xfe310000 0x00 0x10000>; + interrupts = <0x00 0x13 0x04>; + assigned-clocks = <0x23 0x7b 0x23 0x7d 0x23 0x7c>; + assigned-clock-rates = <0xbebc200 0x16e3600 0xbebc200>; + clocks = <0x23 0x7c 0x23 0x7a 0x23 0x79 0x23 0x7b 0x23 0x7d>; + clock-names = "core\0bus\0axi\0block\0timer"; + resets = <0x23 0x78 0x23 0x76 0x23 0x75 0x23 0x77 0x23 0x79>; + reset-names = "core\0bus\0axi\0block\0timer"; + status = "okay"; + bus-width = <0x08>; + no-sdio; + no-sd; + non-removable; + max-frequency = <0xbebc200>; + full-pwr-cycle-in-suspend; + }; + + nandc@fe330000 { + compatible = "rockchip,rk-nandc-v9"; + reg = <0x00 0xfe330000 0x00 0x4000>; + interrupts = <0x00 0x46 0x04>; + nandc_id = <0x00>; + clocks = <0x23 0x75 0x23 0x74>; + clock-names = "clk_nandc\0hclk_nandc"; + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + nand@0 { + reg = <0x00>; + nand-bus-width = <0x08>; + nand-ecc-mode = "hw"; + nand-ecc-strength = <0x10>; + nand-ecc-step-size = <0x400>; + }; + }; + + crypto@fe380000 { + compatible = "rockchip,rk3568-crypto"; + reg = <0x00 0xfe380000 0x00 0x4000>; + interrupts = <0x00 0x04 0x04>; + clocks = <0x23 0x6a 0x23 0x6b 0x23 0x6c 0x23 0x6d>; + clock-names = "aclk\0hclk\0sclk\0apb_pclk"; + assigned-clocks = <0x23 0x6c>; + assigned-clock-rates = <0xbebc200>; + resets = <0x23 0x69>; + reset-names = "crypto-rst"; + status = "disabled"; + }; + + rng@fe388000 { + compatible = "rockchip,cryptov2-rng"; + reg = <0x00 0xfe388000 0x00 0x2000>; + clocks = <0x23 0x70 0x23 0x6f>; + clock-names = "clk_trng\0hclk_trng"; + resets = <0x23 0x6d>; + reset-names = "reset"; + status = "okay"; + }; + + otp@fe38c000 { + compatible = "rockchip,rk3568-otp"; + reg = <0x00 0xfe38c000 0x00 0x4000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + clocks = <0x23 0x73 0x23 0x72 0x23 0x71 0x23 0x181>; + clock-names = "usr\0sbpi\0apb\0phy"; + resets = <0x23 0x1cf>; + reset-names = "otp_phy"; + + cpu-code@2 { + reg = <0x02 0x02>; + phandle = <0x12>; + }; + + specification-serial-number@7 { + reg = <0x07 0x01>; + bits = <0x00 0x05>; + phandle = <0x0a>; + }; + + cpu-version@8 { + reg = <0x08 0x01>; + bits = <0x03 0x03>; + phandle = <0x11>; + }; + + mbist-vmin@9 { + reg = <0x09 0x01>; + bits = <0x00 0x04>; + phandle = <0x08>; + }; + + id@a { + reg = <0x0a 0x10>; + phandle = <0x10>; + }; + + cpu-leakage@1a { + reg = <0x1a 0x01>; + phandle = <0x06>; + }; + + log-leakage@1b { + reg = <0x1b 0x01>; + phandle = <0x85>; + }; + + npu-leakage@1c { + reg = <0x1c 0x01>; + phandle = <0x72>; + }; + + gpu-leakage@1d { + reg = <0x1d 0x01>; + phandle = <0x78>; + }; + + core-pvtm@2a { + reg = <0x2a 0x02>; + phandle = <0x07>; + }; + + cpu-tsadc-trim-l@2e { + reg = <0x2e 0x01>; + phandle = <0x125>; + }; + + cpu-tsadc-trim-h@2f { + reg = <0x2f 0x01>; + bits = <0x00 0x04>; + phandle = <0x126>; + }; + + npu-tsadc-trim-l@30 { + reg = <0x30 0x01>; + phandle = <0x127>; + }; + + npu-tsadc-trim-h@31 { + reg = <0x31 0x01>; + bits = <0x00 0x04>; + phandle = <0x128>; + }; + + tsadc-trim-base-frac@31 { + reg = <0x31 0x01>; + bits = <0x04 0x04>; + phandle = <0x122>; + }; + + tsadc-trim-base@32 { + reg = <0x32 0x01>; + phandle = <0x121>; + }; + + cpu-opp-info@36 { + reg = <0x36 0x06>; + phandle = <0x09>; + }; + + gpu-opp-info@3c { + reg = <0x3c 0x06>; + phandle = <0x79>; + }; + + npu-opp-info@42 { + reg = <0x42 0x06>; + phandle = <0x73>; + }; + + dmc-opp-info@48 { + reg = <0x48 0x06>; + phandle = <0xbc>; + }; + + remark-spec-serial-number@56 { + reg = <0x56 0x01>; + bits = <0x00 0x05>; + phandle = <0x0b>; + }; + }; + + i2s@fe400000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe400000 0x00 0x1000>; + interrupts = <0x00 0x34 0x04>; + clocks = <0x23 0x3f 0x23 0x43 0x23 0x39>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x00>; + dma-names = "tx"; + resets = <0x23 0x50 0x23 0x51>; + reset-names = "tx-m\0rx-m"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + rockchip,playback-only; + #sound-dai-cells = <0x00>; + status = "okay"; + phandle = <0x146>; + }; + + i2s@fe410000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe410000 0x00 0x1000>; + interrupts = <0x00 0x35 0x04>; + clocks = <0x23 0x47 0x23 0x4b 0x23 0x3a>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x02 0xd5 0x03>; + dma-names = "tx\0rx"; + resets = <0x23 0x52 0x23 0x53>; + reset-names = "tx-m\0rx-m"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xd6 0xd7 0xd8 0xd9>; + status = "okay"; + rockchip,clk-trcm = <0x01>; + phandle = <0xe8>; + }; + + i2s@fe420000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe420000 0x00 0x1000>; + interrupts = <0x00 0x36 0x04>; + clocks = <0x23 0x4f 0x23 0x4f 0x23 0x3b>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x04 0xd5 0x05>; + dma-names = "tx\0rx"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + rockchip,clk-trcm = <0x01>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xda 0xdb 0xdc 0xdd>; + status = "disabled"; + }; + + i2s@fe430000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe430000 0x00 0x1000>; + interrupts = <0x00 0x37 0x04>; + clocks = <0x23 0x53 0x23 0x57 0x23 0x3c>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x06 0xd5 0x07>; + dma-names = "tx\0rx"; + resets = <0x23 0x55 0x23 0x56>; + reset-names = "tx-m\0rx-m"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + rockchip,clk-trcm = <0x01>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xde 0xdf 0xe0 0xe1>; + status = "disabled"; + phandle = <0x144>; + }; + + pdm@fe440000 { + compatible = "rockchip,rk3568-pdm\0rockchip,pdm"; + reg = <0x00 0xfe440000 0x00 0x1000>; + clocks = <0x23 0x5a 0x23 0x59>; + clock-names = "pdm_clk\0pdm_hclk"; + dmas = <0xd5 0x09>; + dma-names = "rx"; + pinctrl-names = "default"; + pinctrl-0 = <0xe2 0xe3 0xe4 0xe5 0xe6 0xe7>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x149>; + }; + + vad@fe450000 { + compatible = "rockchip,rk3568-vad"; + reg = <0x00 0xfe450000 0x00 0x10000>; + reg-names = "vad"; + clocks = <0x23 0x5b>; + clock-names = "hclk"; + interrupts = <0x00 0x89 0x04>; + rockchip,audio-src = <0xe8>; + rockchip,det-channel = <0x00>; + rockchip,mode = <0x00>; + #sound-dai-cells = <0x00>; + status = "disabled"; + rockchip,buffer-time-ms = <0x80>; + phandle = <0x14e>; + }; + + spdif@fe460000 { + compatible = "rockchip,rk3568-spdif"; + reg = <0x00 0xfe460000 0x00 0x1000>; + interrupts = <0x00 0x66 0x04>; + dmas = <0xd5 0x01>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x23 0x5f 0x23 0x5c>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xe9>; + status = "disabled"; + phandle = <0x14c>; + }; + + audpwm@fe470000 { + compatible = "rockchip,rk3568-audio-pwm\0rockchip,audio-pwm-v1"; + reg = <0x00 0xfe470000 0x00 0x1000>; + clocks = <0x23 0x63 0x23 0x60>; + clock-names = "clk\0hclk"; + dmas = <0xd5 0x08>; + dma-names = "tx"; + #sound-dai-cells = <0x00>; + rockchip,sample-width-bits = <0x0b>; + rockchip,interpolat-points = <0x01>; + status = "disabled"; + }; + + codec-digital@fe478000 { + compatible = "rockchip,rk3568-codec-digital\0rockchip,codec-digital-v1"; + reg = <0x00 0xfe478000 0x00 0x1000>; + clocks = <0x23 0x67 0x23 0x66 0x23 0x65 0x23 0x64>; + clock-names = "adc\0dac\0i2c\0pclk"; + pinctrl-names = "default"; + pinctrl-0 = <0xea>; + resets = <0x23 0x5f>; + reset-names = "reset"; + rockchip,grf = <0x3b>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x145>; + }; + + dmac@fe530000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfe530000 0x00 0x4000>; + interrupts = <0x00 0x0e 0x04 0x00 0x0d 0x04>; + clocks = <0x23 0x10d>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0x4e>; + }; + + dmac@fe550000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfe550000 0x00 0x4000>; + interrupts = <0x00 0x10 0x04 0x00 0x0f 0x04>; + clocks = <0x23 0x10d>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0xd5>; + }; + + rkscr@fe560000 { + compatible = "rockchip-scr"; + reg = <0x00 0xfe560000 0x00 0x10000>; + interrupts = <0x00 0x61 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xeb>; + clocks = <0x23 0x114>; + clock-names = "g_pclk_sim_card"; + status = "disabled"; + }; + + can@fe570000 { + compatible = "rockchip,rk3568-can-2.0"; + reg = <0x00 0xfe570000 0x00 0x1000>; + interrupts = <0x00 0x01 0x04>; + clocks = <0x23 0x141 0x23 0x140>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x23 0x155 0x23 0x154>; + reset-names = "can\0can-apb"; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "disabled"; + }; + + can@fe580000 { + compatible = "rockchip,rk3568-can-2.0"; + reg = <0x00 0xfe580000 0x00 0x1000>; + interrupts = <0x00 0x02 0x04>; + clocks = <0x23 0x143 0x23 0x142>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x23 0x157 0x23 0x156>; + reset-names = "can\0can-apb"; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "okay"; + assigned-clocks = <0x23 0x143>; + assigned-clock-rates = <0xbebc200>; + pinctrl-names = "default"; + pinctrl-0 = <0xec>; + }; + + can@fe590000 { + compatible = "rockchip,rk3568-can-2.0"; + reg = <0x00 0xfe590000 0x00 0x1000>; + interrupts = <0x00 0x03 0x04>; + clocks = <0x23 0x145 0x23 0x144>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x23 0x159 0x23 0x158>; + reset-names = "can\0can-apb"; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "disabled"; + assigned-clocks = <0x23 0x145>; + assigned-clock-rates = <0xbebc200>; + pinctrl-names = "default"; + pinctrl-0 = <0xed>; + }; + + i2c@fe5a0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5a0000 0x00 0x1000>; + clocks = <0x23 0x148 0x23 0x147>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x2f 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xee>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + clock-frequency = <0x186a0>; + + gpio@21 { + status = "disabled"; + compatible = "nxp,pca9555"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-group-num = <0xc8>; + phandle = <0x102>; + }; + + gt1x@14 { + status = "disabled"; + compatible = "goodix,gt1x"; + reg = <0x14>; + pinctrl-names = "default"; + pinctrl-0 = <0xef>; + goodix,rst-gpio = <0x3f 0x0e 0x00>; + goodix,irq-gpio = <0x3f 0x0d 0x08>; + }; + }; + + i2c@fe5b0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5b0000 0x00 0x1000>; + clocks = <0x23 0x14a 0x23 0x149>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x30 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xf0>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@fe5c0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5c0000 0x00 0x1000>; + clocks = <0x23 0x14c 0x23 0x14b>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x31 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xf1>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@fe5d0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5d0000 0x00 0x1000>; + clocks = <0x23 0x14e 0x23 0x14d>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x32 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xf2>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + clock-frequency = <0x61a80>; + + gc8034@37 { + compatible = "galaxycore,gc8034"; + status = "disabled"; + reg = <0x37>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x4a 0x0e 0x01>; + pwdn-gpios = <0xf4 0x0c 0x01>; + rockchip,grf = <0x3b>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RK-CMK-8M-2-v1"; + rockchip,camera-module-lens-name = "CK8401"; + + port { + + endpoint { + remote-endpoint = <0xf5>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x130>; + }; + }; + }; + + os04a10@36 { + status = "disabled"; + compatible = "ovti,os04a10"; + reg = <0x36>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x4a 0x0e 0x01>; + pwdn-gpios = <0xf4 0x0c 0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "CMK-OT1607-FV1"; + rockchip,camera-module-lens-name = "M12-40IRC-4MP-F16"; + + port { + + endpoint { + remote-endpoint = <0xf6>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x12f>; + }; + }; + }; + + ov5695@36 { + status = "disabled"; + compatible = "ovti,ov5695"; + reg = <0x36>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x4a 0x0e 0x00>; + pwdn-gpios = <0xf4 0x0c 0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "TongJu"; + rockchip,camera-module-lens-name = "CHT842-MD"; + + port { + + endpoint { + remote-endpoint = <0xf7>; + data-lanes = <0x01 0x02>; + phandle = <0x131>; + }; + }; + }; + + XC7160b@1b { + status = "okay"; + compatible = "firefly,xc7160"; + reg = <0x1b>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x3f 0x1d 0x00>; + pwdn-gpios = <0xf4 0x0c 0x00>; + firefly,clkout-enabled-index = <0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "NC"; + rockchip,camera-module-lens-name = "NC"; + + port { + + endpoint { + remote-endpoint = <0xf8>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x132>; + }; + }; + }; + + imx415@37 { + status = "okay"; + compatible = "sony,imx415"; + reg = <0x37>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x3f 0x1d 0x01>; + pwdn-gpios = <0xf4 0x0c 0x00>; + firefly,clkout-enabled-index = <0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "CMK-OT2022-PX1"; + rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; + + port { + + endpoint { + remote-endpoint = <0xf9>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x133>; + }; + }; + }; + }; + + i2c@fe5e0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5e0000 0x00 0x1000>; + clocks = <0x23 0x150 0x23 0x14f>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x33 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xfa>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + hym8563@51 { + status = "okay"; + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0x00>; + rtc-irq-gpio = <0x3f 0x1b 0x02>; + clock-frequency = <0x8000>; + }; + + mc3230sensor@4c { + compatible = "gs_mc3230"; + reg = <0x4c>; + type = <0x02>; + irq_enable = <0x00>; + poll_delay_ms = <0x1e>; + layout = <0x04>; + status = "okay"; + }; + + mxc6655xa@15 { + status = "disabled"; + compatible = "gs_mxc6655xa"; + pinctrl-names = "default"; + pinctrl-0 = <0xfb>; + reg = <0x15>; + irq-gpio = <0x4a 0x11 0x08>; + irq_enable = <0x00>; + poll_delay_ms = <0x1e>; + type = <0x02>; + power-off-in-suspend = <0x01>; + layout = <0x01>; + }; + }; + + timer@fe5f0000 { + compatible = "rockchip,rk3568-timer\0rockchip,rk3288-timer"; + reg = <0x00 0xfe5f0000 0x00 0x1000>; + interrupts = <0x00 0x6d 0x04>; + clocks = <0x23 0x16c 0x23 0x16d>; + clock-names = "pclk\0timer"; + }; + + watchdog@fe600000 { + compatible = "snps,dw-wdt"; + reg = <0x00 0xfe600000 0x00 0x100>; + clocks = <0x23 0x116 0x23 0x115>; + clock-names = "tclk\0pclk"; + interrupts = <0x00 0x95 0x04>; + status = "okay"; + }; + + spi@fe610000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe610000 0x00 0x1000>; + interrupts = <0x00 0x67 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x152 0x23 0x151>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x14 0x4e 0x15>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0xfc 0xfd 0xfe>; + pinctrl-1 = <0xfc 0xfd 0xff>; + num-cs = <0x02>; + status = "disabled"; + }; + + spi@fe620000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe620000 0x00 0x1000>; + interrupts = <0x00 0x68 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x154 0x23 0x153>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x16 0x4e 0x17>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0x100>; + pinctrl-1 = <0x101>; + num-cs = <0x02>; + status = "disabled"; + max-freq = <0x2dc6c00>; + dev-port = <0x00>; + + spi_wk2xxx@0 { + status = "disabled"; + compatible = "firefly,spi-wk2xxx"; + reg = <0x00>; + spi-max-frequency = <0x989680>; + power-gpio = <0x102 0x0f 0x00>; + reset-gpio = <0x102 0x09 0x00>; + irq-gpio = <0x3f 0x06 0x02>; + cs-gpio = <0x4a 0x01 0x00>; + }; + }; + + spi@fe630000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe630000 0x00 0x1000>; + interrupts = <0x00 0x69 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x156 0x23 0x155>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x18 0x4e 0x19>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0x103 0x104 0x105>; + pinctrl-1 = <0x103 0x104 0x106>; + num-cs = <0x02>; + status = "disabled"; + }; + + spi@fe640000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe640000 0x00 0x1000>; + interrupts = <0x00 0x6a 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x158 0x23 0x157>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x1a 0x4e 0x1b>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0x107 0x108 0x109>; + pinctrl-1 = <0x107 0x108 0x10a>; + num-cs = <0x02>; + status = "disabled"; + }; + + serial@fe650000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe650000 0x00 0x100>; + interrupts = <0x00 0x75 0x04>; + clocks = <0x23 0x11f 0x23 0x11c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x02 0x4e 0x03>; + pinctrl-names = "default"; + pinctrl-0 = <0x10b>; + status = "disabled"; + }; + + serial@fe660000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe660000 0x00 0x100>; + interrupts = <0x00 0x76 0x04>; + clocks = <0x23 0x123 0x23 0x120>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x04 0x4e 0x05>; + pinctrl-names = "default"; + pinctrl-0 = <0x10c>; + status = "disabled"; + }; + + serial@fe670000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe670000 0x00 0x100>; + interrupts = <0x00 0x77 0x04>; + clocks = <0x23 0x127 0x23 0x124>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x06 0x4e 0x07>; + pinctrl-names = "default"; + pinctrl-0 = <0x10d>; + status = "okay"; + }; + + serial@fe680000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe680000 0x00 0x100>; + interrupts = <0x00 0x78 0x04>; + clocks = <0x23 0x12b 0x23 0x128>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x08 0x4e 0x09>; + pinctrl-names = "default"; + pinctrl-0 = <0x10e>; + status = "okay"; + }; + + serial@fe690000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe690000 0x00 0x100>; + interrupts = <0x00 0x79 0x04>; + clocks = <0x23 0x12f 0x23 0x12c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x0a 0x4e 0x0b>; + pinctrl-names = "default"; + pinctrl-0 = <0x10f>; + status = "disabled"; + }; + + serial@fe6a0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6a0000 0x00 0x100>; + interrupts = <0x00 0x7a 0x04>; + clocks = <0x23 0x133 0x23 0x130>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x0c 0x4e 0x0d>; + pinctrl-names = "default"; + pinctrl-0 = <0x110>; + status = "disabled"; + }; + + serial@fe6b0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6b0000 0x00 0x100>; + interrupts = <0x00 0x7b 0x04>; + clocks = <0x23 0x137 0x23 0x134>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x0e 0x4e 0x0f>; + pinctrl-names = "default"; + pinctrl-0 = <0x111>; + status = "okay"; + }; + + serial@fe6c0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6c0000 0x00 0x100>; + interrupts = <0x00 0x7c 0x04>; + clocks = <0x23 0x13b 0x23 0x138>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x10 0x4e 0x11>; + pinctrl-names = "default"; + pinctrl-0 = <0x112 0x113>; + status = "okay"; + }; + + serial@fe6d0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6d0000 0x00 0x100>; + interrupts = <0x00 0x7d 0x04>; + clocks = <0x23 0x13f 0x23 0x13c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x12 0x4e 0x13>; + pinctrl-names = "default"; + pinctrl-0 = <0x114>; + status = "okay"; + }; + + pwm@fe6e0000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6e0000 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x115>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "okay"; + }; + + pwm@fe6e0010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6e0010 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x116>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "okay"; + }; + + pwm@fe6e0020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6e0020 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x117>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6e0030 { + compatible = "rockchip,remotectl-pwm"; + reg = <0x00 0xfe6e0030 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "default"; + pinctrl-0 = <0x118>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "okay"; + remote_pwm_id = <0x03>; + handle_cpu_id = <0x01>; + remote_support_psci = <0x00>; + + ir_key_firefly { + rockchip,usercode = <0xff00>; + rockchip,key_table = <0xeb 0x74 0xec 0x8b 0xfe 0x9e 0xb7 0x66 0xa3 0x96 0xf4 0x73 0xa7 0x72 0xf8 0xe8 0xfc 0x67 0xfd 0x6c 0xf1 0x69 0xe5 0x6a>; + }; + }; + + pwm@fe6f0000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0000 0x00 0x10>; + interrupts = <0x00 0x54 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x119>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6f0010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0010 0x00 0x10>; + interrupts = <0x00 0x54 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11a>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6f0020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0020 0x00 0x10>; + interrupts = <0x00 0x54 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11b>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6f0030 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0030 0x00 0x10>; + interrupts = <0x00 0x54 0x04 0x00 0x58 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11c>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + phandle = <0x157>; + }; + + pwm@fe700000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700000 0x00 0x10>; + interrupts = <0x00 0x55 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11d>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe700010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700010 0x00 0x10>; + interrupts = <0x00 0x55 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11e>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe700020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700020 0x00 0x10>; + interrupts = <0x00 0x55 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11f>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe700030 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700030 0x00 0x10>; + interrupts = <0x00 0x55 0x04 0x00 0x59 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x120>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + tsadc@fe710000 { + compatible = "rockchip,rk3568-tsadc"; + reg = <0x00 0xfe710000 0x00 0x100>; + interrupts = <0x00 0x73 0x04>; + rockchip,grf = <0x3b>; + clocks = <0x23 0x111 0x23 0x10f>; + clock-names = "tsadc\0apb_pclk"; + assigned-clocks = <0x23 0x110 0x23 0x111>; + assigned-clock-rates = <0x1036640 0xaae60>; + resets = <0x23 0x182 0x23 0x181 0x23 0x1d7>; + reset-names = "tsadc\0tsadc-apb\0tsadc-phy"; + #thermal-sensor-cells = <0x01>; + nvmem-cells = <0x121 0x122>; + nvmem-cell-names = "trim_base\0trim_base_frac"; + rockchip,hw-tshut-temp = <0x1d4c0>; + rockchip,hw-tshut-mode = <0x00>; + rockchip,hw-tshut-polarity = <0x00>; + pinctrl-names = "gpio\0otpout"; + pinctrl-0 = <0x123>; + pinctrl-1 = <0x124>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x1f>; + + tsadc@0 { + reg = <0x00>; + nvmem-cells = <0x125 0x126>; + nvmem-cell-names = "trim_l\0trim_h"; + }; + + tsadc@1 { + reg = <0x01>; + nvmem-cells = <0x127 0x128>; + nvmem-cell-names = "trim_l\0trim_h"; + }; + }; + + saradc@fe720000 { + compatible = "rockchip,rk3568-saradc\0rockchip,rk3399-saradc"; + reg = <0x00 0xfe720000 0x00 0x100>; + interrupts = <0x00 0x5d 0x04>; + #io-channel-cells = <0x01>; + clocks = <0x23 0x113 0x23 0x112>; + clock-names = "saradc\0apb_pclk"; + resets = <0x23 0x180>; + reset-names = "saradc-apb"; + status = "okay"; + vref-supply = <0x129>; + phandle = <0x49>; + }; + + mailbox@fe780000 { + compatible = "rockchip,rk3568-mailbox\0rockchip,rk3368-mailbox"; + reg = <0x00 0xfe780000 0x00 0x1000>; + interrupts = <0x00 0xb7 0x04 0x00 0xb8 0x04 0x00 0xb9 0x04 0x00 0xba 0x04>; + clocks = <0x23 0x11b>; + clock-names = "pclk_mailbox"; + #mbox-cells = <0x01>; + status = "disabled"; + }; + + phy@fe820000 { + compatible = "rockchip,rk3568-naneng-combphy"; + reg = <0x00 0xfe820000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x3a 0x1f 0x23 0x17c 0x23 0x7f>; + clock-names = "refclk\0apbclk\0pipe_clk"; + assigned-clocks = <0x3a 0x1f>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x23 0x1c4 0x23 0x1c5>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x12a>; + rockchip,pipe-phy-grf = <0x12b>; + status = "okay"; + phandle = <0x24>; + }; + + phy@fe830000 { + compatible = "rockchip,rk3568-naneng-combphy"; + reg = <0x00 0xfe830000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x3a 0x22 0x23 0x17d 0x23 0x7f>; + clock-names = "refclk\0apbclk\0pipe_clk"; + assigned-clocks = <0x3a 0x22>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x23 0x1c6 0x23 0x1c7>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x12a>; + rockchip,pipe-phy-grf = <0x12c>; + status = "okay"; + phandle = <0x26>; + }; + + phy@fe840000 { + compatible = "rockchip,rk3568-naneng-combphy"; + reg = <0x00 0xfe840000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x3a 0x25 0x23 0x17e 0x23 0x7f>; + clock-names = "refclk\0apbclk\0pipe_clk"; + assigned-clocks = <0x3a 0x25>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x23 0x1c8 0x23 0x1c9>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x12a>; + rockchip,pipe-phy-grf = <0x12d>; + status = "okay"; + phandle = <0x27>; + }; + + phy@fe850000 { + compatible = "rockchip,rk3568-dsi-dphy\0rockchip,rk3568-video-phy"; + reg = <0x00 0xfe850000 0x00 0x10000 0x00 0xfe060000 0x00 0x10000>; + reg-names = "phy\0host"; + clocks = <0x3a 0x17 0x23 0x17a 0x23 0xe8>; + clock-names = "ref\0pclk\0pclk_host"; + #clock-cells = <0x00>; + resets = <0x23 0x1bb>; + reset-names = "apb"; + power-domains = <0x25 0x09>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x34>; + }; + + phy@fe860000 { + compatible = "rockchip,rk3568-dsi-dphy\0rockchip,rk3568-video-phy"; + reg = <0x00 0xfe860000 0x00 0x10000 0x00 0xfe070000 0x00 0x10000>; + reg-names = "phy\0host"; + clocks = <0x3a 0x19 0x23 0x17b 0x23 0xe9>; + clock-names = "ref\0pclk\0pclk_host"; + #clock-cells = <0x00>; + resets = <0x23 0x1bc>; + reset-names = "apb"; + power-domains = <0x25 0x09>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x36>; + }; + + csi2-dphy-hw@fe870000 { + compatible = "rockchip,rk3568-csi2-dphy-hw"; + reg = <0x00 0xfe870000 0x00 0x1000>; + clocks = <0x23 0x179>; + clock-names = "pclk"; + rockchip,grf = <0x3b>; + status = "okay"; + phandle = <0x12e>; + }; + + csi2-dphy0 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x12e>; + status = "okay"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x12f>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf6>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x130>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf5>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0x131>; + data-lanes = <0x01 0x02>; + phandle = <0xf7>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0x132>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf8>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0x133>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf9>; + }; + }; + + port@1 { + reg = <0x01>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x134>; + phandle = <0x8c>; + }; + }; + }; + }; + + csi2-dphy1 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x12e>; + status = "disabled"; + }; + + csi2-dphy2 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x12e>; + status = "disabled"; + }; + + usb2-phy@fe8a0000 { + compatible = "rockchip,rk3568-usb2phy"; + reg = <0x00 0xfe8a0000 0x00 0x10000>; + interrupts = <0x00 0x87 0x04>; + clocks = <0x3a 0x13>; + clock-names = "phyclk"; + #clock-cells = <0x00>; + assigned-clocks = <0x23 0x0b>; + assigned-clock-parents = <0x29>; + clock-output-names = "usb480m_phy"; + rockchip,usbgrf = <0x135>; + status = "okay"; + phandle = <0x29>; + + host-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x136>; + phandle = <0x2b>; + }; + + otg-port { + #phy-cells = <0x00>; + status = "okay"; + phandle = <0x28>; + }; + }; + + usb2-phy@fe8b0000 { + compatible = "rockchip,rk3568-usb2phy"; + reg = <0x00 0xfe8b0000 0x00 0x10000>; + interrupts = <0x00 0x88 0x04>; + clocks = <0x3a 0x15>; + clock-names = "phyclk"; + #clock-cells = <0x00>; + rockchip,usbgrf = <0x137>; + status = "okay"; + phandle = <0x2c>; + + host-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x136>; + phandle = <0x2e>; + }; + + otg-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x136>; + phandle = <0x2d>; + }; + }; + + phy@fe8c0000 { + compatible = "rockchip,rk3568-pcie3-phy"; + reg = <0x00 0xfe8c0000 0x00 0x20000>; + #phy-cells = <0x00>; + clocks = <0x3a 0x26 0x3a 0x27 0x23 0x177>; + clock-names = "refclk_m\0refclk_n\0pclk"; + resets = <0x23 0x1be>; + reset-names = "phy"; + rockchip,phy-grf = <0x138>; + status = "okay"; + phandle = <0xc0>; + }; + + pinctrl { + compatible = "rockchip,rk3568-pinctrl"; + rockchip,grf = <0x3b>; + rockchip,pmu = <0x3c>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + gpio0@fdd60000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfdd60000 0x00 0x100>; + interrupts = <0x00 0x21 0x04>; + clocks = <0x3a 0x2e 0x3a 0x0c>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x3f>; + }; + + gpio1@fe740000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe740000 0x00 0x100>; + interrupts = <0x00 0x22 0x04>; + clocks = <0x23 0x163 0x23 0x164>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x159>; + }; + + gpio2@fe750000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe750000 0x00 0x100>; + interrupts = <0x00 0x23 0x04>; + clocks = <0x23 0x165 0x23 0x166>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x91>; + }; + + gpio3@fe760000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe760000 0x00 0x100>; + interrupts = <0x00 0x24 0x04>; + clocks = <0x23 0x167 0x23 0x168>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x4a>; + }; + + gpio4@fe770000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe770000 0x00 0x100>; + interrupts = <0x00 0x25 0x04>; + clocks = <0x23 0x169 0x23 0x16a>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0xf4>; + }; + + pcfg-pull-up { + bias-pull-up; + phandle = <0x13b>; + }; + + pcfg-pull-down { + bias-pull-down; + phandle = <0x142>; + }; + + pcfg-pull-none { + bias-disable; + phandle = <0x139>; + }; + + pcfg-pull-none-drv-level-1 { + bias-disable; + drive-strength = <0x01>; + phandle = <0x13d>; + }; + + pcfg-pull-none-drv-level-2 { + bias-disable; + drive-strength = <0x02>; + phandle = <0x13c>; + }; + + pcfg-pull-none-drv-level-3 { + bias-disable; + drive-strength = <0x03>; + phandle = <0x141>; + }; + + pcfg-pull-up-drv-level-1 { + bias-pull-up; + drive-strength = <0x01>; + phandle = <0x140>; + }; + + pcfg-pull-up-drv-level-2 { + bias-pull-up; + drive-strength = <0x02>; + phandle = <0x13a>; + }; + + pcfg-pull-none-smt { + bias-disable; + input-schmitt-enable; + phandle = <0x13e>; + }; + + pcfg-output-low-pull-down { + output-low; + bias-pull-down; + phandle = <0x13f>; + }; + + acodec { + + acodec-pins { + rockchip,pins = <0x01 0x09 0x05 0x139 0x01 0x01 0x05 0x139 0x01 0x00 0x05 0x139 0x01 0x07 0x05 0x139 0x01 0x08 0x05 0x139 0x01 0x03 0x05 0x139 0x01 0x05 0x05 0x139>; + phandle = <0xea>; + }; + }; + + cam { + + vcc-cam { + rockchip,pins = <0x00 0x11 0x00 0x139>; + phandle = <0x158>; + }; + }; + + can1 { + + can1m1-pins { + rockchip,pins = <0x04 0x12 0x03 0x139 0x04 0x13 0x03 0x139>; + phandle = <0xec>; + }; + }; + + can2 { + + can2m0-pins { + rockchip,pins = <0x04 0x0c 0x03 0x139 0x04 0x0d 0x03 0x139>; + phandle = <0xed>; + }; + }; + + cif { + + cif-clk { + rockchip,pins = <0x04 0x10 0x01 0x139>; + phandle = <0xf3>; + }; + }; + + clk32k { + + clk32k-out0 { + rockchip,pins = <0x00 0x08 0x02 0x139>; + phandle = <0x22>; + }; + }; + + ebc { + + ebc-pins { + rockchip,pins = <0x04 0x10 0x02 0x139 0x04 0x0b 0x02 0x139 0x04 0x0c 0x02 0x139 0x04 0x06 0x02 0x139 0x04 0x11 0x02 0x139 0x03 0x16 0x02 0x139 0x03 0x17 0x02 0x139 0x03 0x18 0x02 0x139 0x03 0x19 0x02 0x139 0x03 0x1a 0x02 0x139 0x03 0x1b 0x02 0x139 0x03 0x1c 0x02 0x139 0x03 0x1d 0x02 0x139 0x03 0x1e 0x02 0x139 0x03 0x1f 0x02 0x139 0x04 0x00 0x02 0x139 0x04 0x01 0x02 0x139 0x04 0x02 0x02 0x139 0x04 0x03 0x02 0x139 0x04 0x04 0x02 0x139 0x04 0x05 0x02 0x139 0x04 0x0e 0x02 0x139 0x04 0x0f 0x02 0x139>; + phandle = <0x7c>; + }; + }; + + fspi { + + fspi-pins { + rockchip,pins = <0x01 0x18 0x01 0x139 0x01 0x1b 0x01 0x139 0x01 0x19 0x01 0x139 0x01 0x1a 0x01 0x139 0x01 0x17 0x02 0x139 0x01 0x1c 0x01 0x139>; + phandle = <0xd4>; + }; + }; + + gmac0 { + + gmac0-miim { + rockchip,pins = <0x02 0x13 0x02 0x139 0x02 0x14 0x02 0x139>; + phandle = <0xc8>; + }; + + gmac0-clkinout { + rockchip,pins = <0x02 0x12 0x02 0x139>; + phandle = <0xcd>; + }; + + gmac0-rx-bus2 { + rockchip,pins = <0x02 0x0e 0x01 0x139 0x02 0x0f 0x02 0x139 0x02 0x10 0x02 0x139>; + phandle = <0xca>; + }; + + gmac0-tx-bus2 { + rockchip,pins = <0x02 0x0b 0x01 0x13c 0x02 0x0c 0x01 0x13c 0x02 0x0d 0x01 0x139>; + phandle = <0xc9>; + }; + + gmac0-rgmii-clk { + rockchip,pins = <0x02 0x05 0x02 0x139 0x02 0x08 0x02 0x13d>; + phandle = <0xcb>; + }; + + gmac0-rgmii-bus { + rockchip,pins = <0x02 0x03 0x02 0x139 0x02 0x04 0x02 0x139 0x02 0x06 0x02 0x13c 0x02 0x07 0x02 0x13c>; + phandle = <0xcc>; + }; + }; + + gmac1 { + + gmac1m1-miim { + rockchip,pins = <0x04 0x0e 0x03 0x139 0x04 0x0f 0x03 0x139>; + phandle = <0x93>; + }; + + gmac1m1-clkinout { + rockchip,pins = <0x04 0x11 0x03 0x139>; + phandle = <0x98>; + }; + + gmac1m1-rx-bus2 { + rockchip,pins = <0x04 0x07 0x03 0x139 0x04 0x08 0x03 0x139 0x04 0x09 0x03 0x139>; + phandle = <0x95>; + }; + + gmac1m1-tx-bus2 { + rockchip,pins = <0x04 0x04 0x03 0x13c 0x04 0x05 0x03 0x13c 0x04 0x06 0x03 0x139>; + phandle = <0x94>; + }; + + gmac1m1-rgmii-clk { + rockchip,pins = <0x04 0x03 0x03 0x139 0x04 0x00 0x03 0x13d>; + phandle = <0x96>; + }; + + gmac1m1-rgmii-bus { + rockchip,pins = <0x04 0x01 0x03 0x139 0x04 0x02 0x03 0x139 0x03 0x1e 0x03 0x13c 0x03 0x1f 0x03 0x13c>; + phandle = <0x97>; + }; + }; + + hdmitx { + + hdmitxm0-cec { + rockchip,pins = <0x04 0x19 0x01 0x139>; + phandle = <0xac>; + }; + + hdmitx-scl { + rockchip,pins = <0x04 0x17 0x01 0x139>; + phandle = <0xaa>; + }; + + hdmitx-sda { + rockchip,pins = <0x04 0x18 0x01 0x139>; + phandle = <0xab>; + }; + }; + + i2c0 { + + i2c0-xfer { + rockchip,pins = <0x00 0x09 0x01 0x13e 0x00 0x0a 0x01 0x13e>; + phandle = <0x3d>; + }; + }; + + i2c1 { + + i2c1-xfer { + rockchip,pins = <0x00 0x0b 0x01 0x13e 0x00 0x0c 0x01 0x13e>; + phandle = <0xee>; + }; + }; + + i2c2 { + + i2c2m0-xfer { + rockchip,pins = <0x00 0x0d 0x01 0x13e 0x00 0x0e 0x01 0x13e>; + phandle = <0xf0>; + }; + }; + + i2c3 { + + i2c3m0-xfer { + rockchip,pins = <0x01 0x01 0x01 0x13e 0x01 0x00 0x01 0x13e>; + phandle = <0xf1>; + }; + }; + + i2c4 { + + i2c4m0-xfer { + rockchip,pins = <0x04 0x0b 0x01 0x13e 0x04 0x0a 0x01 0x13e>; + phandle = <0xf2>; + }; + }; + + i2c5 { + + i2c5m0-xfer { + rockchip,pins = <0x03 0x0b 0x04 0x13e 0x03 0x0c 0x04 0x13e>; + phandle = <0xfa>; + }; + }; + + i2s1 { + + i2s1m0-lrcktx { + rockchip,pins = <0x01 0x05 0x01 0x13e>; + phandle = <0xd7>; + }; + + i2s1m0-mclk { + rockchip,pins = <0x01 0x02 0x01 0x13e>; + phandle = <0x47>; + }; + + i2s1m0-sclktx { + rockchip,pins = <0x01 0x03 0x01 0x13e>; + phandle = <0xd6>; + }; + + i2s1m0-sdi0 { + rockchip,pins = <0x01 0x0b 0x01 0x139>; + phandle = <0xd8>; + }; + + i2s1m0-sdo0 { + rockchip,pins = <0x01 0x07 0x01 0x139>; + phandle = <0xd9>; + }; + }; + + i2s2 { + + i2s2m0-lrcktx { + rockchip,pins = <0x02 0x13 0x01 0x13e>; + phandle = <0xdb>; + }; + + i2s2m0-sclktx { + rockchip,pins = <0x02 0x12 0x01 0x13e>; + phandle = <0xda>; + }; + + i2s2m0-sdi { + rockchip,pins = <0x02 0x15 0x01 0x139>; + phandle = <0xdc>; + }; + + i2s2m0-sdo { + rockchip,pins = <0x02 0x14 0x01 0x139>; + phandle = <0xdd>; + }; + }; + + i2s3 { + + i2s3m0-lrck { + rockchip,pins = <0x03 0x04 0x04 0x13e>; + phandle = <0xdf>; + }; + + i2s3m0-sclk { + rockchip,pins = <0x03 0x03 0x04 0x13e>; + phandle = <0xde>; + }; + + i2s3m0-sdi { + rockchip,pins = <0x03 0x06 0x04 0x139>; + phandle = <0xe0>; + }; + + i2s3m0-sdo { + rockchip,pins = <0x03 0x05 0x04 0x139>; + phandle = <0xe1>; + }; + }; + + lcdc { + + lcdc-ctl { + rockchip,pins = <0x03 0x00 0x01 0x139 0x02 0x18 0x01 0x139 0x02 0x19 0x01 0x139 0x02 0x1a 0x01 0x139 0x02 0x1b 0x01 0x139 0x02 0x1c 0x01 0x139 0x02 0x1d 0x01 0x139 0x02 0x1e 0x01 0x139 0x02 0x1f 0x01 0x139 0x03 0x01 0x01 0x139 0x03 0x02 0x01 0x139 0x03 0x03 0x01 0x139 0x03 0x04 0x01 0x139 0x03 0x05 0x01 0x139 0x03 0x06 0x01 0x139 0x03 0x07 0x01 0x139 0x03 0x08 0x01 0x139 0x03 0x09 0x01 0x139 0x03 0x0a 0x01 0x139 0x03 0x0b 0x01 0x139 0x03 0x0c 0x01 0x139 0x03 0x0d 0x01 0x139 0x03 0x0e 0x01 0x139 0x03 0x0f 0x01 0x139 0x03 0x10 0x01 0x139 0x03 0x13 0x01 0x139 0x03 0x11 0x01 0x139 0x03 0x12 0x01 0x139>; + phandle = <0x39>; + }; + }; + + pdm { + + pdmm0-clk { + rockchip,pins = <0x01 0x06 0x03 0x139>; + phandle = <0xe2>; + }; + + pdmm0-clk1 { + rockchip,pins = <0x01 0x04 0x03 0x139>; + phandle = <0xe3>; + }; + + pdmm0-sdi0 { + rockchip,pins = <0x01 0x0b 0x02 0x139>; + phandle = <0xe4>; + }; + + pdmm0-sdi1 { + rockchip,pins = <0x01 0x0a 0x03 0x139>; + phandle = <0xe5>; + }; + + pdmm0-sdi2 { + rockchip,pins = <0x01 0x09 0x03 0x139>; + phandle = <0xe6>; + }; + + pdmm0-sdi3 { + rockchip,pins = <0x01 0x08 0x03 0x139>; + phandle = <0xe7>; + }; + }; + + pmic { + + pmic_int { + rockchip,pins = <0x00 0x03 0x00 0x13b>; + phandle = <0x40>; + }; + + soc_slppin_gpio { + rockchip,pins = <0x00 0x02 0x00 0x13f>; + phandle = <0x43>; + }; + + soc_slppin_slp { + rockchip,pins = <0x00 0x02 0x01 0x13b>; + phandle = <0x41>; + }; + + soc_slppin_rst { + rockchip,pins = <0x00 0x02 0x02 0x139>; + }; + + spk_ctl_gpio { + rockchip,pins = <0x03 0x15 0x00 0x13b>; + phandle = <0x48>; + }; + }; + + pwm0 { + + pwm0m0-pins { + rockchip,pins = <0x00 0x0f 0x01 0x139>; + phandle = <0x50>; + }; + }; + + pwm1 { + + pwm1m0-pins { + rockchip,pins = <0x00 0x10 0x01 0x139>; + phandle = <0x51>; + }; + }; + + pwm2 { + + pwm2m0-pins { + rockchip,pins = <0x00 0x11 0x01 0x139>; + phandle = <0x52>; + }; + }; + + pwm3 { + + pwm3-pins { + rockchip,pins = <0x00 0x12 0x01 0x139>; + phandle = <0x53>; + }; + }; + + pwm4 { + + pwm4-pins { + rockchip,pins = <0x00 0x13 0x01 0x139>; + phandle = <0x115>; + }; + }; + + pwm5 { + + pwm5-pins { + rockchip,pins = <0x00 0x14 0x01 0x139>; + phandle = <0x116>; + }; + }; + + pwm6 { + + pwm6-pins { + rockchip,pins = <0x00 0x15 0x01 0x139>; + phandle = <0x117>; + }; + }; + + pwm7 { + + pwm7-pins { + rockchip,pins = <0x00 0x16 0x01 0x139>; + phandle = <0x118>; + }; + }; + + pwm8 { + + pwm8m0-pins { + rockchip,pins = <0x03 0x09 0x05 0x139>; + phandle = <0x119>; + }; + }; + + pwm9 { + + pwm9m0-pins { + rockchip,pins = <0x03 0x0a 0x05 0x139>; + phandle = <0x11a>; + }; + }; + + pwm10 { + + pwm10m0-pins { + rockchip,pins = <0x03 0x0d 0x05 0x139>; + phandle = <0x11b>; + }; + }; + + pwm11 { + + pwm11m0-pins { + rockchip,pins = <0x03 0x0e 0x05 0x139>; + phandle = <0x11c>; + }; + }; + + pwm12 { + + pwm12m0-pins { + rockchip,pins = <0x03 0x0f 0x02 0x139>; + phandle = <0x11d>; + }; + }; + + pwm13 { + + pwm13m0-pins { + rockchip,pins = <0x03 0x10 0x02 0x139>; + phandle = <0x11e>; + }; + }; + + pwm14 { + + pwm14m0-pins { + rockchip,pins = <0x03 0x14 0x01 0x139>; + phandle = <0x11f>; + }; + }; + + pwm15 { + + pwm15m0-pins { + rockchip,pins = <0x03 0x15 0x01 0x139>; + phandle = <0x120>; + }; + }; + + scr { + + scr-pins { + rockchip,pins = <0x01 0x02 0x03 0x139 0x01 0x07 0x03 0x13b 0x01 0x03 0x03 0x13b 0x01 0x05 0x03 0x139>; + phandle = <0xeb>; + }; + }; + + sdmmc0 { + + sdmmc0-bus4 { + rockchip,pins = <0x01 0x1d 0x01 0x13a 0x01 0x1e 0x01 0x13a 0x01 0x1f 0x01 0x13a 0x02 0x00 0x01 0x13a>; + phandle = <0xd0>; + }; + + sdmmc0-clk { + rockchip,pins = <0x02 0x02 0x01 0x13a>; + phandle = <0xd1>; + }; + + sdmmc0-cmd { + rockchip,pins = <0x02 0x01 0x01 0x13a>; + phandle = <0xd2>; + }; + + sdmmc0-det { + rockchip,pins = <0x00 0x04 0x01 0x13b>; + phandle = <0xd3>; + }; + }; + + sdmmc2 { + + sdmmc2m0-bus4 { + rockchip,pins = <0x03 0x16 0x03 0x13a 0x03 0x17 0x03 0x13a 0x03 0x18 0x03 0x13a 0x03 0x19 0x03 0x13a>; + phandle = <0xb0>; + }; + + sdmmc2m0-clk { + rockchip,pins = <0x03 0x1b 0x03 0x13a>; + phandle = <0xb2>; + }; + + sdmmc2m0-cmd { + rockchip,pins = <0x03 0x1a 0x03 0x13a>; + phandle = <0xb1>; + }; + }; + + spdif { + + spdifm1-tx { + rockchip,pins = <0x03 0x15 0x02 0x139>; + phandle = <0xe9>; + }; + }; + + spi0 { + + spi0m0-pins { + rockchip,pins = <0x00 0x0d 0x02 0x139 0x00 0x15 0x02 0x139 0x00 0x0e 0x02 0x139>; + phandle = <0xfe>; + }; + + spi0m0-cs0 { + rockchip,pins = <0x00 0x16 0x02 0x139>; + phandle = <0xfc>; + }; + + spi0m0-cs1 { + rockchip,pins = <0x00 0x14 0x02 0x139>; + phandle = <0xfd>; + }; + }; + + spi1 { + + spi1m1-pins { + rockchip,pins = <0x03 0x13 0x03 0x139 0x03 0x12 0x03 0x139 0x03 0x11 0x03 0x139>; + phandle = <0x100>; + }; + }; + + spi2 { + + spi2m0-pins { + rockchip,pins = <0x02 0x11 0x04 0x139 0x02 0x12 0x04 0x139 0x02 0x13 0x04 0x139>; + phandle = <0x105>; + }; + + spi2m0-cs0 { + rockchip,pins = <0x02 0x14 0x04 0x139>; + phandle = <0x103>; + }; + + spi2m0-cs1 { + rockchip,pins = <0x02 0x15 0x04 0x139>; + phandle = <0x104>; + }; + }; + + spi3 { + + spi3m0-pins { + rockchip,pins = <0x04 0x0b 0x04 0x139 0x04 0x08 0x04 0x139 0x04 0x0a 0x04 0x139>; + phandle = <0x109>; + }; + + spi3m0-cs0 { + rockchip,pins = <0x04 0x06 0x04 0x139>; + phandle = <0x107>; + }; + + spi3m0-cs1 { + rockchip,pins = <0x04 0x07 0x04 0x139>; + phandle = <0x108>; + }; + }; + + tsadc { + + tsadc-shutorg { + rockchip,pins = <0x00 0x01 0x02 0x139>; + phandle = <0x124>; + }; + }; + + uart0 { + + uart0-xfer { + rockchip,pins = <0x00 0x10 0x03 0x13b 0x00 0x11 0x03 0x13b>; + phandle = <0x4f>; + }; + }; + + uart1 { + + uart1m0-xfer { + rockchip,pins = <0x02 0x0b 0x02 0x13b 0x02 0x0c 0x02 0x13b>; + phandle = <0x10b>; + }; + }; + + uart2 { + + uart2m0-xfer { + rockchip,pins = <0x00 0x18 0x01 0x13b 0x00 0x19 0x01 0x13b>; + phandle = <0x10c>; + }; + }; + + uart3 { + + uart3m1-xfer { + rockchip,pins = <0x03 0x10 0x04 0x13b 0x03 0x0f 0x04 0x13b>; + phandle = <0x10d>; + }; + }; + + uart4 { + + uart4m1-xfer { + rockchip,pins = <0x03 0x09 0x04 0x13b 0x03 0x0a 0x04 0x13b>; + phandle = <0x10e>; + }; + }; + + uart5 { + + uart5m0-xfer { + rockchip,pins = <0x02 0x01 0x03 0x13b 0x02 0x02 0x03 0x13b>; + phandle = <0x10f>; + }; + }; + + uart6 { + + uart6m0-xfer { + rockchip,pins = <0x02 0x03 0x03 0x13b 0x02 0x04 0x03 0x13b>; + phandle = <0x110>; + }; + }; + + uart7 { + + uart7m1-xfer { + rockchip,pins = <0x03 0x15 0x04 0x13b 0x03 0x14 0x04 0x13b>; + phandle = <0x111>; + }; + }; + + uart8 { + + uart8m0-xfer { + rockchip,pins = <0x02 0x16 0x02 0x13b 0x02 0x15 0x03 0x13b>; + phandle = <0x112>; + }; + + uart8m0-ctsn { + rockchip,pins = <0x02 0x0a 0x03 0x139>; + phandle = <0x113>; + }; + + uart8m0-rtsn { + rockchip,pins = <0x02 0x09 0x03 0x139>; + phandle = <0x155>; + }; + }; + + uart9 { + + uart9m1-xfer { + rockchip,pins = <0x04 0x16 0x04 0x13b 0x04 0x15 0x04 0x13b>; + phandle = <0x114>; + }; + }; + + spi0-hs { + + spi0m0-pins { + rockchip,pins = <0x00 0x0d 0x02 0x140 0x00 0x15 0x02 0x140 0x00 0x0e 0x02 0x140>; + phandle = <0xff>; + }; + }; + + spi1-hs { + + spi1m1-pins { + rockchip,pins = <0x03 0x13 0x03 0x140 0x03 0x12 0x03 0x140 0x03 0x11 0x03 0x140>; + phandle = <0x101>; + }; + }; + + spi2-hs { + + spi2m0-pins { + rockchip,pins = <0x02 0x11 0x04 0x140 0x02 0x12 0x04 0x140 0x02 0x13 0x04 0x140>; + phandle = <0x106>; + }; + }; + + spi3-hs { + + spi3m0-pins { + rockchip,pins = <0x04 0x0b 0x04 0x140 0x04 0x08 0x04 0x140 0x04 0x0a 0x04 0x140>; + phandle = <0x10a>; + }; + }; + + gpio-func { + + tsadc-gpio-func { + rockchip,pins = <0x00 0x01 0x00 0x139>; + phandle = <0x123>; + }; + }; + + usb { + + vcc5v0-host-en { + rockchip,pins = <0x00 0x06 0x00 0x139>; + phandle = <0x150>; + }; + + vcc5v0-otg-en { + rockchip,pins = <0x00 0x05 0x00 0x139>; + phandle = <0x151>; + }; + + vcc-hub-reset-en { + rockchip,pins = <0x01 0x04 0x00 0x139>; + phandle = <0x15a>; + }; + }; + + headphone { + + hp-det { + rockchip,pins = <0x03 0x12 0x00 0x142>; + phandle = <0x148>; + }; + }; + + sdio-pwrseq { + + wifi-enable-h { + rockchip,pins = <0x03 0x1d 0x00 0x139>; + phandle = <0x153>; + }; + }; + + wireless-wlan { + + wifi-host-wake-irq { + rockchip,pins = <0x03 0x1c 0x00 0x142>; + phandle = <0x154>; + }; + }; + + wireless-bluetooth { + + uart8-gpios { + rockchip,pins = <0x02 0x09 0x00 0x139>; + phandle = <0x156>; + }; + }; + + touch { + + touch-gpio { + rockchip,pins = <0x00 0x0d 0x00 0x13b 0x00 0x0e 0x00 0x139>; + phandle = <0xef>; + }; + }; + + mxc6655xa { + + mxc6655xa_irq_gpio { + rockchip,pins = <0x03 0x11 0x00 0x139>; + phandle = <0xfb>; + }; + }; + + pcie { + + pcie-pi6c-oe-en { + rockchip,pins = <0x03 0x07 0x00 0x139>; + phandle = <0x15b>; + }; + }; + + leds { + + leds-gpio { + rockchip,pins = <0x01 0x0a 0x00 0x139 0x01 0x09 0x00 0x139 0x01 0x08 0x00 0x139 0x02 0x11 0x00 0x139>; + phandle = <0x15d>; + }; + }; + + 4g { + + vcc-4g-power-en { + rockchip,pins = <0x03 0x03 0x00 0x139>; + phandle = <0x15c>; + }; + }; + + usb-typec { + + usbc0-int { + rockchip,pins = <0x00 0x11 0x00 0x13b>; + phandle = <0x4b>; + }; + + vcc5v0-typec0-en { + rockchip,pins = <0x00 0x05 0x00 0x139>; + }; + }; + }; + + audiopwmout-diff { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,audiopwmout-diff"; + simple-audio-card,mclk-fs = <0x100>; + simple-audio-card,bitclock-master = <0x143>; + simple-audio-card,frame-master = <0x143>; + + simple-audio-card,cpu { + sound-dai = <0x144>; + }; + + simple-audio-card,codec { + sound-dai = <0x145>; + phandle = <0x143>; + }; + }; + + dc-12v { + compatible = "regulator-fixed"; + regulator-name = "dc_12v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xb71b00>; + regulator-max-microvolt = <0xb71b00>; + phandle = <0x14f>; + }; + + hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <0x80>; + simple-audio-card,name = "rockchip,hdmi"; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <0x146>; + }; + + simple-audio-card,codec { + sound-dai = <0x147>; + }; + }; + + rk-headset { + status = "disabled"; + compatible = "rockchip_headset"; + headset_gpio = <0x4a 0x12 0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x148>; + }; + + dummy-codec { + status = "disabled"; + compatible = "rockchip,dummy-codec"; + #sound-dai-cells = <0x00>; + phandle = <0x14a>; + }; + + pdm-mic-array { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,pdm-mic-array"; + + simple-audio-card,cpu { + sound-dai = <0x149>; + }; + + simple-audio-card,codec { + sound-dai = <0x14a>; + }; + }; + + rk809-sound { + status = "okay"; + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip-rk809"; + rockchip,format = "i2s"; + rockchip,mclk-fs = <0x100>; + rockchip,cpu = <0xe8>; + rockchip,codec = <0x14b>; + }; + + spdif-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,name = "ROCKCHIP,SPDIF"; + + simple-audio-card,cpu { + sound-dai = <0x14c>; + }; + + simple-audio-card,codec { + sound-dai = <0x14d>; + }; + }; + + spdif-out { + status = "okay"; + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0x00>; + phandle = <0x14d>; + }; + + vad-sound { + status = "disabled"; + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip,rk3568-vad"; + rockchip,cpu = <0xe8>; + rockchip,codec = <0x14b 0x14e>; + }; + + vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + vin-supply = <0x14f>; + phandle = <0x46>; + }; + + vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + vin-supply = <0x14f>; + phandle = <0x3e>; + }; + + vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x3f 0x06 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x150>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + regulator-boot-on; + phandle = <0x136>; + }; + + vcc5v0-otg-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x3f 0x05 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x151>; + regulator-name = "vcc5v0_otg"; + phandle = <0x4c>; + }; + + vcc3v3-lcd0-n { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd0_n"; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3-lcd1-n { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd1_n"; + regulator-boot-on; + status = "disabled"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + test-power { + status = "okay"; + }; + + chosen { + // linux,initrd-end = <0x00 0xaacf15d>; + // linux,initrd-start = <0x00 0xa200000>; + bootargs = "storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.verifiedbootstate=orange rw rootwait earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1 swiotlb=0x10000 net.ifnames=0 comm-05/20/2025 androidboot.fwver=ddr-v1.21-2d653b3476,spl-v1.14,bl31-v1.44,bl32-v2.12,uboot--boot"; + }; + + fiq-debugger { + compatible = "rockchip,fiq-debugger"; + rockchip,serial-id = <0x02>; + rockchip,wake-irq = <0x00>; + rockchip,irq-mode-enable = <0x01>; + rockchip,baudrate = <0x16e360>; + interrupts = <0x00 0xfc 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0x10c>; + status = "okay"; + }; + + debug@fd904000 { + compatible = "rockchip,debug"; + reg = <0x00 0xfd904000 0x00 0x1000 0x00 0xfd905000 0x00 0x1000 0x00 0xfd906000 0x00 0x1000 0x00 0xfd907000 0x00 0x1000>; + }; + + cspmu@fd90c000 { + compatible = "rockchip,cspmu"; + reg = <0x00 0xfd90c000 0x00 0x1000 0x00 0xfd90d000 0x00 0x1000 0x00 0xfd90e000 0x00 0x1000 0x00 0xfd90f000 0x00 0x1000>; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <0x49 0x00>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <0x1b7740>; + poll-interval = <0x64>; + + recovery-key { + label = "F12"; + linux,code = <0x58>; + press-threshold-microvolt = <0x6d6>; + }; + + vol-down-key { + label = "volume down"; + linux,code = <0x72>; + press-threshold-microvolt = <0x48a1c>; + }; + + menu-key { + label = "menu"; + linux,code = <0x8b>; + press-threshold-microvolt = <0xef420>; + }; + + back-key { + label = "back"; + linux,code = <0x9e>; + press-threshold-microvolt = <0x13eb9c>; + }; + }; + + vcc2v5-ddr { + compatible = "regulator-fixed"; + regulator-name = "vcc2v5-sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x2625a0>; + regulator-max-microvolt = <0x2625a0>; + vin-supply = <0x46>; + }; + + pcie30-avdd0v9 { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + vin-supply = <0x46>; + }; + + pcie30-avdd1v8 { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + vin-supply = <0x46>; + }; + + gpio-regulator { + compatible = "regulator-gpio"; + regulator-name = "pcie30_3v3"; + regulator-min-microvolt = <0x186a0>; + regulator-max-microvolt = <0x325aa0>; + gpios = <0x3f 0x1c 0x00>; + gpios-states = <0x01>; + states = <0x186a0 0x00 0x325aa0 0x01>; + phandle = <0xc2>; + }; + + vcc3v3-bu { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_bu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + vin-supply = <0x3e>; + }; + + sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <0x152 0x01>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <0x153>; + post-power-on-delay-ms = <0x64>; + reset-gpios = <0x4a 0x1d 0x01>; + status = "okay"; + phandle = <0xb3>; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <0x3b>; + wifi_chip_type = "ap6256"; + pinctrl-names = "default"; + pinctrl-0 = <0x154>; + WIFI,host_wake_irq = <0x4a 0x1c 0x00>; + status = "okay"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + clocks = <0x152 0x01>; + clock-names = "ext_clock"; + uart_rts_gpios = <0x91 0x09 0x01>; + pinctrl-names = "default\0rts_gpio"; + pinctrl-0 = <0x155>; + pinctrl-1 = <0x156>; + BT,reset_gpio = <0x4a 0x00 0x00>; + BT,wake_gpio = <0x4a 0x02 0x00>; + BT,wake_host_irq = <0x4a 0x01 0x00>; + status = "okay"; + }; + + flash-led { + compatible = "led,rgb13h"; + label = "pwm-flash-led"; + led-max-microamp = <0x4e20>; + flash-max-microamp = <0x4e20>; + flash-max-timeout-us = <0xf4240>; + pwms = <0x157 0x00 0x61a8 0x00>; + rockchip,camera-module-index = <0x01>; + rockchip,camera-module-facing = "front"; + status = "disabled"; + }; + + vcc-camera-regulator { + compatible = "regulator-fixed"; + gpio = <0x102 0x03 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x158>; + regulator-name = "vcc_camera"; + enable-active-high; + status = "disabled"; + }; + + vcc-hub-reset-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x159 0x04 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x15a>; + regulator-name = "vcc_hub_reset_en"; + regulator-always-on; + }; + + pcie-pi6c-oe-regulator { + compatible = "regulator-fixed"; + gpio = <0x4a 0x07 0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x15b>; + regulator-name = "pcie_pi6c_oe_en"; + regulator-always-on; + }; + + vcc-4g-power-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x4a 0x03 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x15c>; + regulator-name = "vcc_4g_power_en"; + regulator-always-on; + }; + + leds { + status = "okay"; + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <0x15d>; + + power { + label = "firefly:blue:power"; + linux,default-trigger = "ir-power-click"; + default-state = "on"; + gpios = <0x159 0x0a 0x00>; + }; + + user { + label = "firefly:yellow:user"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <0x159 0x09 0x00>; + }; + + diy1 { + label = "firefly:green:diy"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <0x159 0x08 0x00>; + }; + + diy2 { + label = "firefly:yellow:diy"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <0x91 0x11 0x00>; + }; + }; +}; \ No newline at end of file diff --git a/configs/vms/linux-aarch64-rk3568-smp1.toml b/configs/vms/linux-aarch64-rk3568-smp1.toml new file mode 100644 index 00000000..8301b575 --- /dev/null +++ b/configs/vms/linux-aarch64-rk3568-smp1.toml @@ -0,0 +1,56 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 2 +# Guest vm name. +name = "linux" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# The physical CPU ids. +phys_cpu_ids = [0x00] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x8008_0000 +# The location of image: "memory" | "fs". +# Load from memory. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x8008_0000 +## The file path of the kernel image. +kernel_path = "/path/Image" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x8000_0000 +#dtb_path = "/path/linux-aarch64-rk3568_smp1.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x8000_0000, 0x6000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] +# +# Device specifications +# +[devices] +# The interrupt mode. +interrupt_mode = "passthrough" +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] diff --git a/configs/vms/linux-aarch64-rk3568-smp2.dts b/configs/vms/linux-aarch64-rk3568-smp2.dts new file mode 100644 index 00000000..5475dbe6 --- /dev/null +++ b/configs/vms/linux-aarch64-rk3568-smp2.dts @@ -0,0 +1,6108 @@ +/dts-v1/; + +/memreserve/ 0x0000000008300000 0x000000000001c000; +/memreserve/ 0x000000000a200000 0x00000000008cf15d; +/ { + serial-number = "425ca8fc29ade692"; + compatible = "rockchip,rk3568-firefly-roc-pc-se\0rockchip,rk3568"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Firefly RK3568-ROC-PC-SE HDMI (Linux)"; + + memory { + reg = <0x00 0x80000000 0x00 0x60000000>; + device_type = "memory"; + }; + + ddr3-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x420>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x12c>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x21>; + phy_ca_drv_odten = <0x21>; + phy_clk_drv_odten = <0x21>; + dram_dq_drv_odten = <0x22>; + phy_dq_drv_odtoff = <0x21>; + phy_ca_drv_odtoff = <0x21>; + phy_clk_drv_odtoff = <0x21>; + dram_dq_drv_odtoff = <0x22>; + dram_odt = <0x78>; + phy_odt = <0xa7>; + phy_odt_puup_en = <0x01>; + phy_odt_pudn_en = <0x01>; + dram_dq_odt_en_freq = <0x14d>; + phy_odt_en_freq = <0x14d>; + phy_dq_sr_odten = <0x0f>; + phy_ca_sr_odten = <0x03>; + phy_clk_sr_odten = <0x00>; + phy_dq_sr_odtoff = <0x0f>; + phy_ca_sr_odtoff = <0x03>; + phy_clk_sr_odtoff = <0x00>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x15>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + phandle = <0xb7>; + }; + + ddr4-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x420>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x271>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x25>; + phy_ca_drv_odten = <0x25>; + phy_clk_drv_odten = <0x25>; + dram_dq_drv_odten = <0x22>; + phy_dq_drv_odtoff = <0x25>; + phy_ca_drv_odtoff = <0x25>; + phy_clk_drv_odtoff = <0x25>; + dram_dq_drv_odtoff = <0x22>; + dram_odt = <0x78>; + phy_odt = <0x8b>; + phy_odt_puup_en = <0x01>; + phy_odt_pudn_en = <0x01>; + dram_dq_odt_en_freq = <0x1f4>; + phy_odt_en_freq = <0x1f4>; + phy_dq_sr_odten = <0x0e>; + phy_ca_sr_odten = <0x01>; + phy_clk_sr_odten = <0x01>; + phy_dq_sr_odtoff = <0x0e>; + phy_ca_sr_odtoff = <0x01>; + phy_clk_sr_odtoff = <0x01>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x0c>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x22777788>; + dq_map_cs0_dq_h = <0xd7888877>; + dq_map_cs1_dq_l = <0x22777788>; + dq_map_cs1_dq_h = <0xd7888877>; + phandle = <0xb8>; + }; + + lpddr3-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x420>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x00>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x25>; + phy_ca_drv_odten = <0x25>; + phy_clk_drv_odten = <0x27>; + dram_dq_drv_odten = <0x22>; + phy_dq_drv_odtoff = <0x25>; + phy_ca_drv_odtoff = <0x25>; + phy_clk_drv_odtoff = <0x27>; + dram_dq_drv_odtoff = <0x22>; + dram_odt = <0x78>; + phy_odt = <0x94>; + phy_odt_puup_en = <0x01>; + phy_odt_pudn_en = <0x01>; + dram_dq_odt_en_freq = <0x14d>; + phy_odt_en_freq = <0x14d>; + phy_dq_sr_odten = <0x0f>; + phy_ca_sr_odten = <0x01>; + phy_clk_sr_odten = <0x0f>; + phy_dq_sr_odtoff = <0x0f>; + phy_ca_sr_odtoff = <0x01>; + phy_clk_sr_odtoff = <0x0f>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x00>; + dram_ext_temp = <0x00>; + byte_map = <0x8d>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + phandle = <0xb9>; + }; + + lpddr4-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x618>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x00>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x1e>; + phy_ca_drv_odten = <0x26>; + phy_clk_drv_odten = <0x26>; + dram_dq_drv_odten = <0x28>; + phy_dq_drv_odtoff = <0x1e>; + phy_ca_drv_odtoff = <0x26>; + phy_clk_drv_odtoff = <0x26>; + dram_dq_drv_odtoff = <0x28>; + dram_odt = <0x50>; + phy_odt = <0x3c>; + phy_odt_puup_en = <0x00>; + phy_odt_pudn_en = <0x00>; + dram_dq_odt_en_freq = <0x320>; + phy_odt_en_freq = <0x320>; + phy_dq_sr_odten = <0x00>; + phy_ca_sr_odten = <0x0f>; + phy_clk_sr_odten = <0x0f>; + phy_dq_sr_odtoff = <0x00>; + phy_ca_sr_odtoff = <0x0f>; + phy_clk_sr_odtoff = <0x0f>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x00>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + lp4_ca_odt = <0x78>; + lp4_drv_pu_cal_odten = <0x01>; + lp4_drv_pu_cal_odtoff = <0x01>; + phy_lp4_drv_pulldown_en_odten = <0x00>; + phy_lp4_drv_pulldown_en_odtoff = <0x00>; + lp4_ca_odt_en_freq = <0x320>; + phy_lp4_cs_drv_odten = <0x00>; + phy_lp4_cs_drv_odtoff = <0x00>; + lp4_odte_ck_en = <0x01>; + lp4_odte_cs_en = <0x01>; + lp4_odtd_ca_en = <0x00>; + phy_lp4_dq_vref_odten = <0xa6>; + lp4_dq_vref_odten = <0x12c>; + lp4_ca_vref_odten = <0x17c>; + phy_lp4_dq_vref_odtoff = <0x1a4>; + lp4_dq_vref_odtoff = <0x1a4>; + lp4_ca_vref_odtoff = <0x1a4>; + phandle = <0xba>; + }; + + lpddr4x-params { + version = <0x100>; + expanded_version = <0x00>; + reserved = <0x00>; + freq_0 = <0x618>; + freq_1 = <0x144>; + freq_2 = <0x210>; + freq_3 = <0x30c>; + freq_4 = <0x00>; + freq_5 = <0x00>; + pd_idle = <0x0d>; + sr_idle = <0x5d>; + sr_mc_gate_idle = <0x00>; + srpd_lite_idle = <0x00>; + standby_idle = <0x00>; + pd_dis_freq = <0x42a>; + sr_dis_freq = <0x320>; + dram_dll_dis_freq = <0x00>; + phy_dll_dis_freq = <0x00>; + phy_dq_drv_odten = <0x1d>; + phy_ca_drv_odten = <0x24>; + phy_clk_drv_odten = <0x24>; + dram_dq_drv_odten = <0x28>; + phy_dq_drv_odtoff = <0x1d>; + phy_ca_drv_odtoff = <0x24>; + phy_clk_drv_odtoff = <0x24>; + dram_dq_drv_odtoff = <0x28>; + dram_odt = <0x50>; + phy_odt = <0x3c>; + phy_odt_puup_en = <0x00>; + phy_odt_pudn_en = <0x00>; + dram_dq_odt_en_freq = <0x320>; + phy_odt_en_freq = <0x320>; + phy_dq_sr_odten = <0x00>; + phy_ca_sr_odten = <0x00>; + phy_clk_sr_odten = <0x00>; + phy_dq_sr_odtoff = <0x00>; + phy_ca_sr_odtoff = <0x00>; + phy_clk_sr_odtoff = <0x00>; + ssmod_downspread = <0x00>; + ssmod_div = <0x00>; + ssmod_spread = <0x00>; + mode_2t = <0x00>; + speed_bin = <0x00>; + dram_ext_temp = <0x00>; + byte_map = <0xe4>; + dq_map_cs0_dq_l = <0x00>; + dq_map_cs0_dq_h = <0x00>; + dq_map_cs1_dq_l = <0x00>; + dq_map_cs1_dq_h = <0x00>; + lp4_ca_odt = <0x78>; + lp4_drv_pu_cal_odten = <0x00>; + lp4_drv_pu_cal_odtoff = <0x00>; + phy_lp4_drv_pulldown_en_odten = <0x00>; + phy_lp4_drv_pulldown_en_odtoff = <0x00>; + lp4_ca_odt_en_freq = <0x320>; + phy_lp4_cs_drv_odten = <0x00>; + phy_lp4_cs_drv_odtoff = <0x00>; + lp4_odte_ck_en = <0x00>; + lp4_odte_cs_en = <0x00>; + lp4_odtd_ca_en = <0x00>; + phy_lp4_dq_vref_odten = <0xa6>; + lp4_dq_vref_odten = <0xe4>; + lp4_ca_vref_odten = <0x157>; + phy_lp4_dq_vref_odtoff = <0x1a4>; + lp4_dq_vref_odtoff = <0x1a4>; + lp4_ca_vref_odtoff = <0x157>; + phandle = <0xbb>; + }; + + aliases { + csi2dphy0 = "/csi2-dphy0"; + csi2dphy1 = "/csi2-dphy1"; + csi2dphy2 = "/csi2-dphy2"; + dsi0 = "/dsi@fe060000"; + dsi1 = "/dsi@fe070000"; + ethernet0 = "/ethernet@fe2a0000"; + ethernet1 = "/ethernet@fe010000"; + gpio0 = "/pinctrl/gpio0@fdd60000"; + gpio1 = "/pinctrl/gpio1@fe740000"; + gpio2 = "/pinctrl/gpio2@fe750000"; + gpio3 = "/pinctrl/gpio3@fe760000"; + gpio4 = "/pinctrl/gpio4@fe770000"; + i2c0 = "/i2c@fdd40000"; + i2c1 = "/i2c@fe5a0000"; + i2c2 = "/i2c@fe5b0000"; + i2c3 = "/i2c@fe5c0000"; + i2c4 = "/i2c@fe5d0000"; + i2c5 = "/i2c@fe5e0000"; + mmc0 = "/sdhci@fe310000"; + mmc1 = "/dwmmc@fe2b0000"; + mmc2 = "/dwmmc@fe2c0000"; + mmc3 = "/dwmmc@fe000000"; + serial0 = "/serial@fdd50000"; + serial1 = "/serial@fe650000"; + serial2 = "/serial@fe660000"; + serial3 = "/serial@fe670000"; + serial4 = "/serial@fe680000"; + serial5 = "/serial@fe690000"; + serial6 = "/serial@fe6a0000"; + serial7 = "/serial@fe6b0000"; + serial8 = "/serial@fe6c0000"; + serial9 = "/serial@fe6d0000"; + spi0 = "/spi@fe610000"; + spi1 = "/spi@fe620000"; + spi2 = "/spi@fe630000"; + spi3 = "/spi@fe640000"; + lvds0 = "/syscon@fdc60000/lvds"; + lvds1 = "/syscon@fdc60000/lvds1"; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + // cpu@0 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x00 0x00>; + // enable-method = "psci"; + // clocks = <0x02 0x00>; + // operating-points-v2 = <0x03>; + // cpu-idle-states = <0x04>; + // #cooling-cells = <0x02>; + // dynamic-power-coefficient = <0xbb>; + // cpu-supply = <0x05>; + // phandle = <0x0c>; + // }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x00 0x100>; + // enable-method = "psci"; + // clocks = <0x02 0x00>; + // operating-points-v2 = <0x03>; + // cpu-idle-states = <0x04>; + // phandle = <0x0d>; + // }; + + cpu@200 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00 0x200>; + enable-method = "psci"; + clocks = <0x02 0x00>; + operating-points-v2 = <0x03>; + cpu-idle-states = <0x04>; + phandle = <0x0e>; + }; + + cpu@300 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00 0x300>; + enable-method = "psci"; + clocks = <0x02 0x00>; + operating-points-v2 = <0x03>; + cpu-idle-states = <0x04>; + phandle = <0x0f>; + }; + + idle-states { + entry-method = "psci"; + + cpu-sleep { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x10000>; + entry-latency-us = <0x64>; + exit-latency-us = <0x78>; + min-residency-us = <0x3e8>; + phandle = <0x04>; + }; + }; + }; + + cpu0-opp-table { + compatible = "operating-points-v2"; + opp-shared; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x06 0x07 0x08 0x09 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0x118c30>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x153d8 0x01 0x153d9 0x16378 0x02 0x16379 0x186a0 0x03>; + rockchip,pvtm-freq = <0x639c0>; + rockchip,pvtm-volt = <0xdbba0>; + rockchip,pvtm-ch = <0x00 0x05>; + rockchip,pvtm-sample-time = <0x3e8>; + rockchip,pvtm-number = <0x0a>; + rockchip,pvtm-error = <0x3e8>; + rockchip,pvtm-ref-temp = <0x28>; + rockchip,pvtm-temp-prop = <0x1a 0x1a>; + rockchip,thermal-zone = "soc-thermal"; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x7c8 0x124f8>; + phandle = <0x03>; + + opp-408000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x18519600>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-600000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-816000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x30a32c00>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + opp-suspend; + }; + + opp-1104000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x41cdb400>; + opp-microvolt = <0xdbba0 0xdbba0 0x118c30>; + opp-microvolt-L0 = <0xdbba0 0xdbba0 0x118c30>; + opp-microvolt-L1 = <0xcf850 0xcf850 0x118c30>; + opp-microvolt-L2 = <0xcf850 0xcf850 0x118c30>; + opp-microvolt-L3 = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1416000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x54667200>; + opp-microvolt = <0xfa3e8 0xfa3e8 0x118c30>; + opp-microvolt-L0 = <0xfa3e8 0xfa3e8 0x118c30>; + opp-microvolt-L1 = <0xee098 0xee098 0x118c30>; + opp-microvolt-L2 = <0xe7ef0 0xe7ef0 0x118c30>; + opp-microvolt-L3 = <0xe1d48 0xe1d48 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1608000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x5fd82200>; + opp-microvolt = <0x10c8e0 0x10c8e0 0x118c30>; + opp-microvolt-L0 = <0x10c8e0 0x10c8e0 0x118c30>; + opp-microvolt-L1 = <0x100590 0x100590 0x118c30>; + opp-microvolt-L2 = <0xfa3e8 0xfa3e8 0x118c30>; + opp-microvolt-L3 = <0xf4240 0xf4240 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1800000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x6b49d200>; + opp-microvolt = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L0 = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L1 = <0x10c8e0 0x10c8e0 0x118c30>; + opp-microvolt-L2 = <0x106738 0x106738 0x118c30>; + opp-microvolt-L3 = <0x100590 0x100590 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-1992000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x76bb8200>; + opp-microvolt = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L0 = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L1 = <0x118c30 0x118c30 0x118c30>; + opp-microvolt-L2 = <0x112a88 0x112a88 0x118c30>; + opp-microvolt-L3 = <0x10c8e0 0x10c8e0 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-j-1008000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x3c14dc00>; + opp-microvolt = <0xcf850 0xcf850 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-j-1416000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x54667200>; + opp-microvolt = <0xdbba0 0xdbba0 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + + opp-m-1608000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x5fd82200>; + opp-microvolt = <0xf4240 0xf4240 0x118c30>; + clock-latency-ns = <0x9c40>; + }; + }; + + arm-pmu { + compatible = "arm,cortex-a55-pmu\0arm,armv8-pmuv3"; + interrupts = <0x00 0xe4 0x04 0x00 0xe5 0x04 0x00 0xe6 0x04 0x00 0xe7 0x04>; + interrupt-affinity = <0x0c 0x0d 0x0e 0x0f>; + }; + + cpuinfo { + compatible = "rockchip,cpuinfo"; + nvmem-cells = <0x10 0x11 0x12>; + nvmem-cell-names = "id\0cpu-version\0cpu-code"; + }; + + display-subsystem { + compatible = "rockchip,display-subsystem"; + memory-region = <0x13 0x14>; + memory-region-names = "drm-logo\0drm-cubic-lut"; + ports = <0x15>; + devfreq = <0x16>; + + route { + + route-dsi0 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x17>; + }; + + route-dsi1 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x18>; + }; + + route-edp { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x19>; + }; + + route-hdmi { + status = "okay"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x1a>; + }; + + route-lvds { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x1b>; + }; + + route-rgb { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x1c>; + }; + }; + }; + + edac { + compatible = "rockchip,rk3568-edac"; + interrupts = <0x00 0xad 0x04 0x00 0xaf 0x04>; + interrupt-names = "ce\0ue"; + status = "disabled"; + }; + + firmware { + + scmi { + compatible = "arm,scmi-smc"; + shmem = <0x1d>; + arm,smc-id = <0x82000010>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + protocol@14 { + reg = <0x14>; + #clock-cells = <0x01>; + rockchip,clk-init = <0x41cdb400>; + phandle = <0x02>; + }; + }; + + sdei { + compatible = "arm,sdei-1.0"; + method = "smc"; + }; + }; + + mipi-csi2 { + compatible = "rockchip,rk3568-mipi-csi2"; + rockchip,hw = <0x1e>; + status = "disabled"; + }; + + mpp-srv { + compatible = "rockchip,mpp-service"; + rockchip,taskqueue-count = <0x06>; + rockchip,resetgroup-count = <0x06>; + status = "okay"; + phandle = <0x7b>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + reserved-memory { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + drm-logo@00000000 { + compatible = "rockchip,drm-logo"; + reg = <0x00 0xedf00000 0x00 0x2e0000>; + phandle = <0x13>; + }; + + drm-cubic-lut@00000000 { + compatible = "rockchip,drm-cubic-lut"; + reg = <0x00 0xeff00000 0x00 0x8000>; + phandle = <0x14>; + }; + + ramoops@110000 { + compatible = "ramoops"; + reg = <0x00 0x110000 0x00 0xf0000>; + record-size = <0x20000>; + console-size = <0x80000>; + ftrace-size = <0x00>; + pmsg-size = <0x50000>; + }; + }; + + rockchip-suspend { + compatible = "rockchip,pm-rk3568"; + status = "okay"; + rockchip,sleep-debug-en = <0x01>; + rockchip,sleep-mode-config = <0x5ec>; + rockchip,wakeup-config = <0x10>; + }; + + rockchip-system-monitor { + compatible = "rockchip,system-monitor"; + rockchip,thermal-zone = "soc-thermal"; + }; + + thermal-zones { + + soc-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + sustainable-power = <0x389>; + thermal-sensors = <0x1f 0x00>; + + trips { + + trip-point-0 { + temperature = <0x124f8>; + hysteresis = <0x7d0>; + type = "passive"; + }; + + trip-point-1 { + temperature = <0x14c08>; + hysteresis = <0x7d0>; + type = "passive"; + phandle = <0x20>; + }; + + soc-crit { + temperature = <0x1c138>; + hysteresis = <0x7d0>; + type = "critical"; + }; + }; + + cooling-maps { + + map0 { + trip = <0x20>; + cooling-device = <0x0c 0xffffffff 0xffffffff>; + contribution = <0x400>; + }; + + map1 { + trip = <0x20>; + cooling-device = <0x21 0xffffffff 0xffffffff>; + contribution = <0x400>; + }; + }; + }; + + gpu-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x1f 0x01>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; + arm,no-tick-in-suspend; + }; + + external-gmac0-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "gmac0_clkin"; + #clock-cells = <0x00>; + phandle = <0xc7>; + }; + + external-gmac1-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "gmac1_clkin"; + #clock-cells = <0x00>; + phandle = <0x92>; + }; + + xpcs-gmac0-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "clk_gmac0_xpcs_mii"; + #clock-cells = <0x00>; + }; + + xpcs-gmac1-clock { + compatible = "fixed-clock"; + clock-frequency = <0x7735940>; + clock-output-names = "clk_gmac1_xpcs_mii"; + #clock-cells = <0x00>; + }; + + i2s1-mclkin-rx { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s1_mclkin_rx"; + }; + + i2s1-mclkin-tx { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s1_mclkin_tx"; + }; + + i2s2-mclkin { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s2_mclkin"; + }; + + i2s3-mclkin { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbb8000>; + clock-output-names = "i2s3_mclkin"; + }; + + mpll { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2faf0800>; + clock-output-names = "mpll"; + }; + + xin24m { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x16e3600>; + clock-output-names = "xin24m"; + }; + + xin32k { + compatible = "fixed-clock"; + clock-frequency = <0x8000>; + clock-output-names = "xin32k"; + #clock-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x22>; + }; + + scmi-shmem@10f000 { + compatible = "arm,scmi-shmem"; + reg = <0x00 0x10f000 0x00 0x100>; + phandle = <0x1d>; + }; + + sata@fc000000 { + compatible = "snps,dwc-ahci"; + reg = <0x00 0xfc000000 0x00 0x1000>; + clocks = <0x23 0x96 0x23 0x97 0x23 0x98>; + clock-names = "sata\0pmalive\0rxoob"; + interrupts = <0x00 0x5e 0x04>; + interrupt-names = "hostc"; + phys = <0x24 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + power-domains = <0x25 0x0f>; + status = "disabled"; + }; + + sata@fc400000 { + compatible = "snps,dwc-ahci"; + reg = <0x00 0xfc400000 0x00 0x1000>; + clocks = <0x23 0x9b 0x23 0x9c 0x23 0x9d>; + clock-names = "sata\0pmalive\0rxoob"; + interrupts = <0x00 0x5f 0x04>; + interrupt-names = "hostc"; + phys = <0x26 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + power-domains = <0x25 0x0f>; + status = "disabled"; + }; + + sata@fc800000 { + compatible = "snps,dwc-ahci"; + reg = <0x00 0xfc800000 0x00 0x1000>; + clocks = <0x23 0xa0 0x23 0xa1 0x23 0xa2>; + clock-names = "sata\0pmalive\0rxoob"; + interrupts = <0x00 0x60 0x04>; + interrupt-names = "hostc"; + phys = <0x27 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + power-domains = <0x25 0x0f>; + status = "okay"; + }; + + usbdrd { + compatible = "rockchip,rk3568-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x23 0xa6 0x23 0xa7 0x23 0xa5 0x23 0x7f>; + clock-names = "ref_clk\0suspend_clk\0bus_clk\0pipe_clk"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "okay"; + + dwc3@fcc00000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfcc00000 0x00 0x400000>; + interrupts = <0x00 0xa9 0x04>; + dr_mode = "otg"; + phys = <0x28 0x24 0x04>; + phy-names = "usb2-phy\0usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <0x25 0x0f>; + resets = <0x23 0x94>; + reset-names = "usb3-otg"; + snps,dis_enblslpm_quirk; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,dis_rxdet_inp3_quirk; + snps,parkmode-disable-hs-quirk; + snps,parkmode-disable-ss-quirk; + quirk-skip-phy-init; + status = "okay"; + extcon = <0x29>; + usb-role-switch; + + port { + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x2a>; + phandle = <0x4d>; + }; + }; + }; + }; + + usbhost { + compatible = "rockchip,rk3568-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x23 0xa9 0x23 0xaa 0x23 0xa8 0x23 0x7f>; + clock-names = "ref_clk\0suspend_clk\0bus_clk\0pipe_clk"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "okay"; + + dwc3@fd000000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfd000000 0x00 0x400000>; + interrupts = <0x00 0xaa 0x04>; + dr_mode = "host"; + phys = <0x2b 0x26 0x04>; + phy-names = "usb2-phy\0usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <0x25 0x0f>; + resets = <0x23 0x95>; + reset-names = "usb3-host"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,dis_rxdet_inp3_quirk; + snps,parkmode-disable-hs-quirk; + snps,parkmode-disable-ss-quirk; + status = "okay"; + }; + }; + + interrupt-controller@fd400000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0xfd400000 0x00 0x10000 0x00 0xfd460000 0x00 0xc0000>; + interrupts = <0x01 0x09 0x04>; + phandle = <0x01>; + + interrupt-controller@fd440000 { + compatible = "arm,gic-v3-its"; + msi-controller; + #msi-cells = <0x01>; + reg = <0x00 0xfd440000 0x00 0x20000>; + status = "okay"; + phandle = <0xbe>; + }; + }; + + usb@fd800000 { + compatible = "generic-ehci"; + reg = <0x00 0xfd800000 0x00 0x40000>; + interrupts = <0x00 0x82 0x04>; + clocks = <0x23 0xbd 0x23 0xbe 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2d>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + usb@fd840000 { + compatible = "generic-ohci"; + reg = <0x00 0xfd840000 0x00 0x40000>; + interrupts = <0x00 0x83 0x04>; + clocks = <0x23 0xbd 0x23 0xbe 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2d>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + usb@fd880000 { + compatible = "generic-ehci"; + reg = <0x00 0xfd880000 0x00 0x40000>; + interrupts = <0x00 0x85 0x04>; + clocks = <0x23 0xbf 0x23 0xc0 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2e>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + usb@fd8c0000 { + compatible = "generic-ohci"; + reg = <0x00 0xfd8c0000 0x00 0x40000>; + interrupts = <0x00 0x86 0x04>; + clocks = <0x23 0xbf 0x23 0xc0 0x23 0xbc 0x2c>; + clock-names = "usbhost\0arbiter\0pclk\0utmi"; + phys = <0x2e>; + phy-names = "usb2-phy"; + status = "okay"; + }; + + syscon@fda00000 { + compatible = "rockchip,rk3568-xpcs\0syscon"; + reg = <0x00 0xfda00000 0x00 0x200000>; + status = "disabled"; + }; + + syscon@fdc20000 { + compatible = "rockchip,rk3568-pmugrf\0syscon\0simple-mfd"; + reg = <0x00 0xfdc20000 0x00 0x10000>; + phandle = <0x3c>; + + io-domains { + compatible = "rockchip,rk3568-pmu-io-voltage-domain"; + status = "okay"; + pmuio1-supply = <0x2f>; + pmuio2-supply = <0x2f>; + vccio1-supply = <0x30>; + vccio3-supply = <0x31>; + vccio4-supply = <0x32>; + vccio5-supply = <0x33>; + vccio6-supply = <0x32>; + vccio7-supply = <0x33>; + }; + + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x200>; + mode-bootloader = <0x5242c301>; + mode-charge = <0x5242c30b>; + mode-fastboot = <0x5242c309>; + mode-loader = <0x5242c301>; + mode-normal = <0x5242c300>; + mode-recovery = <0x5242c303>; + mode-ums = <0x5242c30c>; + mode-panic = <0x5242c307>; + mode-watchdog = <0x5242c308>; + }; + }; + + syscon@fdc50000 { + compatible = "rockchip,rk3568-pipegrf\0syscon"; + reg = <0x00 0xfdc50000 0x00 0x1000>; + phandle = <0x12a>; + }; + + syscon@fdc60000 { + compatible = "rockchip,rk3568-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfdc60000 0x00 0x10000>; + phandle = <0x3b>; + + io-domains { + compatible = "rockchip,rk3568-io-voltage-domain"; + status = "disabled"; + }; + + lvds { + compatible = "rockchip,rk3568-lvds"; + phys = <0x34>; + phy-names = "phy"; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x1b>; + status = "disabled"; + phandle = <0xa3>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x35>; + status = "disabled"; + phandle = <0xa5>; + }; + }; + }; + }; + + lvds1 { + compatible = "rockchip,rk3568-lvds"; + phys = <0x36>; + phy-names = "phy"; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x37>; + phandle = <0xa4>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x38>; + phandle = <0xa7>; + }; + }; + }; + }; + + rgb { + compatible = "rockchip,rk3568-rgb"; + pinctrl-names = "default"; + pinctrl-0 = <0x39>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x1c>; + status = "disabled"; + phandle = <0xa6>; + }; + }; + }; + }; + }; + + syscon@fdc70000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfdc70000 0x00 0x1000>; + phandle = <0x12b>; + }; + + syscon@fdc80000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfdc80000 0x00 0x1000>; + phandle = <0x12c>; + }; + + syscon@fdc90000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfdc90000 0x00 0x1000>; + phandle = <0x12d>; + }; + + syscon@fdca0000 { + compatible = "rockchip,rk3568-usb2phy-grf\0syscon"; + reg = <0x00 0xfdca0000 0x00 0x8000>; + phandle = <0x135>; + }; + + syscon@fdca8000 { + compatible = "rockchip,rk3568-usb2phy-grf\0syscon"; + reg = <0x00 0xfdca8000 0x00 0x8000>; + phandle = <0x137>; + }; + + syscon@fdcb0000 { + compatible = "rockchip,rk3568-edp-phy-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfdcb0000 0x00 0x100>; + clocks = <0x23 0x192>; + + edp-phy { + compatible = "rockchip,rk3568-edp-phy"; + clocks = <0x3a 0x29>; + clock-names = "refclk"; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0xae>; + }; + }; + + syscon@fdcb8000 { + compatible = "rockchip,pcie30-phy-grf\0syscon"; + reg = <0x00 0xfdcb8000 0x00 0x10000>; + phandle = <0x138>; + }; + + sram@fdcc0000 { + compatible = "mmio-sram"; + reg = <0x00 0xfdcc0000 0x00 0xb000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0xfdcc0000 0xb000>; + + rkvdec-sram@0 { + reg = <0x00 0xb000>; + phandle = <0x84>; + }; + }; + + clock-controller@fdd00000 { + compatible = "rockchip,rk3568-pmucru"; + reg = <0x00 0xfdd00000 0x00 0x1000>; + rockchip,grf = <0x3b>; + rockchip,pmugrf = <0x3c>; + #clock-cells = <0x01>; + #reset-cells = <0x01>; + assigned-clocks = <0x3a 0x32>; + assigned-clock-parents = <0x3a 0x05>; + phandle = <0x3a>; + }; + + clock-controller@fdd20000 { + compatible = "rockchip,rk3568-cru"; + reg = <0x00 0xfdd20000 0x00 0x1000>; + rockchip,grf = <0x3b>; + #clock-cells = <0x01>; + #reset-cells = <0x01>; + assigned-clocks = <0x3a 0x05 0x23 0x106 0x23 0x10b 0x3a 0x01 0x3a 0x2b 0x23 0x03 0x23 0x19b 0x23 0x09 0x23 0x19c 0x23 0x19d 0x23 0x1a1 0x23 0x19e 0x23 0x19f 0x23 0x1a0 0x23 0x04 0x23 0x10d 0x23 0x10e 0x23 0x173 0x23 0x174 0x23 0x175 0x23 0x176 0x23 0xc9 0x23 0xca 0x23 0x06 0x23 0x7e 0x23 0x7f 0x23 0x3d 0x23 0x41 0x23 0x45 0x23 0x49 0x23 0x4d 0x23 0x4d 0x23 0x55 0x23 0x51 0x23 0x5d 0x23 0xdd>; + assigned-clock-rates = <0x8000 0x11e1a300 0x11e1a300 0xbebc200 0x5f5e100 0x3b9aca00 0x1dcd6500 0x13d92d40 0xee6b280 0x7735940 0x5f5e100 0x3b9aca0 0x2faf080 0x17d7840 0x46cf7100 0x8f0d180 0x5f5e100 0x1dcd6500 0x17d78400 0x8f0d180 0x5f5e100 0x11e1a300 0x8f0d180 0x47868c00 0x17d78400 0x5f5e100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x46cf7100 0x1dcd6500>; + assigned-clock-parents = <0x3a 0x08 0x23 0x04 0x23 0x04>; + phandle = <0x23>; + }; + + i2c@fdd40000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfdd40000 0x00 0x1000>; + clocks = <0x3a 0x07 0x3a 0x2d>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x2e 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x3d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + tcs4525@1c { + compatible = "tcs,tcs452x"; + reg = <0x1c>; + vin-supply = <0x3e>; + regulator-compatible = "fan53555-reg"; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <0xadf34>; + regulator-max-microvolt = <0x1535b0>; + regulator-ramp-delay = <0x8fc>; + fcs,suspend-voltage-selector = <0x01>; + regulator-boot-on; + regulator-always-on; + phandle = <0x05>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + interrupt-parent = <0x3f>; + interrupts = <0x03 0x08>; + pinctrl-names = "default\0pmic-sleep\0pmic-power-off\0pmic-reset"; + pinctrl-0 = <0x40>; + pinctrl-1 = <0x41 0x42>; + pinctrl-2 = <0x43 0x44>; + pinctrl-3 = <0x43 0x45>; + rockchip,system-power-controller; + wakeup-source; + #clock-cells = <0x01>; + clock-output-names = "rk808-clkout1\0rk808-clkout2"; + pmic-reset-func = <0x00>; + not-save-power-en = <0x01>; + vcc1-supply = <0x46>; + vcc2-supply = <0x46>; + vcc3-supply = <0x46>; + vcc4-supply = <0x46>; + vcc5-supply = <0x46>; + vcc6-supply = <0x46>; + vcc7-supply = <0x46>; + vcc8-supply = <0x46>; + vcc9-supply = <0x46>; + phandle = <0x152>; + + pwrkey { + status = "okay"; + }; + + pinctrl_rk8xx { + gpio-controller; + #gpio-cells = <0x02>; + + rk817_slppin_null { + pins = "gpio_slp"; + function = "pin_fun0"; + }; + + rk817_slppin_slp { + pins = "gpio_slp"; + function = "pin_fun1"; + phandle = <0x42>; + }; + + rk817_slppin_pwrdn { + pins = "gpio_slp"; + function = "pin_fun2"; + phandle = <0x44>; + }; + + rk817_slppin_rst { + pins = "gpio_slp"; + function = "pin_fun3"; + phandle = <0x45>; + }; + }; + + regulators { + + DCDC_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x7a120>; + regulator-max-microvolt = <0x149970>; + regulator-init-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x1771>; + regulator-initial-mode = <0x02>; + regulator-name = "vdd_logic"; + phandle = <0x75>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x7a120>; + regulator-max-microvolt = <0x149970>; + regulator-init-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x1771>; + regulator-initial-mode = <0x02>; + regulator-name = "vdd_gpu"; + phandle = <0x77>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-initial-mode = <0x02>; + regulator-name = "vcc_ddr"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + DCDC_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x7a120>; + regulator-max-microvolt = <0x149970>; + regulator-init-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x1771>; + regulator-initial-mode = <0x02>; + regulator-name = "vdd_npu"; + phandle = <0x71>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG1 { + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + regulator-name = "vdda0v9_image"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + regulator-name = "vdda_0v9"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + regulator-name = "vdda0v9_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0xdbba0>; + }; + }; + + LDO_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vccio_acodec"; + phandle = <0x30>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vccio_sd"; + phandle = <0x31>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vcc3v3_pmu"; + phandle = <0x2f>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x325aa0>; + }; + }; + + LDO_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcca_1v8"; + phandle = <0x129>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + LDO_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcca1v8_pmu"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x1b7740>; + }; + }; + + LDO_REG9 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcca1v8_image"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcc_1v8"; + phandle = <0x32>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + SWITCH_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc_3v3"; + phandle = <0x33>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + SWITCH_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vcc3v3_sd"; + phandle = <0xcf>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + + codec { + #sound-dai-cells = <0x00>; + compatible = "rockchip,rk809-codec\0rockchip,rk817-codec"; + clocks = <0x23 0x1a3>; + clock-names = "mclk"; + assigned-clocks = <0x23 0x1a3 0x23 0x1a6>; + assigned-clock-rates = <0xbb8000>; + assigned-clock-parents = <0x23 0x48 0x23 0x48>; + pinctrl-names = "default\0spk_gpio"; + pinctrl-0 = <0x47>; + pinctrl-1 = <0x48>; + hp-volume = <0x03>; + spk-volume = <0x03>; + mic-in-differential; + board-spk-from-hp; + capture-volume = <0x00>; + io-channels = <0x49 0x07>; + hp-det-adc-value = <0x3e8>; + status = "okay"; + hp-adc-drift-scope = <0x64>; + phandle = <0x14b>; + }; + + rtc { + status = "disabled"; + }; + }; + + fusb302@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <0x3f>; + fcs,int_n = <0x3f 0x11 0x08>; + fusb340-switch-gpios = <0x4a 0x12 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x4b>; + vbus-supply = <0x4c>; + status = "okay"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x4d>; + phandle = <0x2a>; + }; + }; + }; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + op-sink-microwatt = <0xf4240>; + sink-pdos = <0x40190fa>; + source-pdos = <0x4019096>; + }; + }; + }; + + serial@fdd50000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfdd50000 0x00 0x100>; + interrupts = <0x00 0x74 0x04>; + clocks = <0x3a 0x0b 0x3a 0x2c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x00 0x4e 0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x4f>; + status = "disabled"; + }; + + pwm@fdd70000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70000 0x00 0x10>; + interrupts = <0x00 0x52 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x50>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fdd70010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70010 0x00 0x10>; + interrupts = <0x00 0x52 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x51>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fdd70020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70020 0x00 0x10>; + interrupts = <0x00 0x52 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x52>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fdd70030 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfdd70030 0x00 0x10>; + interrupts = <0x00 0x52 0x04 0x00 0x56 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x53>; + clocks = <0x3a 0x0d 0x3a 0x30>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + power-management@fdd90000 { + compatible = "rockchip,rk3568-pmu\0syscon\0simple-mfd"; + reg = <0x00 0xfdd90000 0x00 0x1000>; + + power-controller { + compatible = "rockchip,rk3568-power-controller"; + #power-domain-cells = <0x01>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x25>; + + pd_npu@6 { + reg = <0x06>; + clocks = <0x23 0x27 0x23 0x25 0x23 0x26>; + pm_qos = <0x54>; + }; + + pd_gpu@7 { + reg = <0x07>; + clocks = <0x23 0x19 0x23 0x1a>; + pm_qos = <0x55>; + }; + + pd_vi@8 { + reg = <0x08>; + clocks = <0x23 0xcc 0x23 0xcd>; + pm_qos = <0x56 0x57 0x58>; + }; + + pd_vo@9 { + reg = <0x09>; + clocks = <0x23 0xda 0x23 0xdb 0x23 0xdc>; + pm_qos = <0x59 0x5a 0x5b>; + }; + + pd_rga@10 { + reg = <0x0a>; + clocks = <0x23 0xf1 0x23 0xf2>; + pm_qos = <0x5c 0x5d 0x5e 0x5f 0x60 0x61>; + }; + + pd_vpu@11 { + reg = <0x0b>; + clocks = <0x23 0xed>; + pm_qos = <0x62>; + }; + + pd_rkvdec@13 { + clocks = <0x23 0x107>; + reg = <0x0d>; + pm_qos = <0x63>; + }; + + pd_rkvenc@14 { + reg = <0x0e>; + clocks = <0x23 0x102>; + pm_qos = <0x64 0x65 0x66>; + }; + + pd_pipe@15 { + reg = <0x0f>; + clocks = <0x23 0x7f>; + pm_qos = <0x67 0x68 0x69 0x6a 0x6b 0x6c 0x6d 0x6e>; + }; + }; + }; + + pvtm@fde00000 { + compatible = "rockchip,rk3568-core-pvtm"; + reg = <0x00 0xfde00000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@0 { + reg = <0x00>; + clocks = <0x23 0x13 0x23 0x1c2>; + clock-names = "clk\0pclk"; + resets = <0x23 0x1a 0x23 0x19>; + reset-names = "rts\0rst-p"; + thermal-zone = "soc-thermal"; + }; + }; + + npu@fde40000 { + compatible = "rockchip,rk3568-rknpu\0rockchip,rknpu"; + reg = <0x00 0xfde40000 0x00 0x10000>; + interrupts = <0x00 0x97 0x04>; + clocks = <0x02 0x02 0x23 0x23 0x23 0x28 0x23 0x29>; + clock-names = "scmi_clk\0clk\0aclk\0hclk"; + assigned-clocks = <0x23 0x23>; + assigned-clock-rates = <0x23c34600>; + resets = <0x23 0x2b 0x23 0x2c>; + reset-names = "srst_a\0srst_h"; + power-domains = <0x25 0x06>; + operating-points-v2 = <0x6f>; + iommus = <0x70>; + status = "okay"; + rknpu-supply = <0x71>; + }; + + npu-opp-table { + compatible = "operating-points-v2"; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x72 0x07 0x08 0x73 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x3e8 0xc350>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x153d8 0x01 0x153d9 0x16378 0x02 0x16379 0x186a0 0x03>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x6f>; + + opp-200000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0xbebc200>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-300000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x11b3dc40>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-400000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-600000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-700000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L0 = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L1 = <0xcf850 0xcf850 0xf4240>; + opp-microvolt-L2 = <0xcf850 0xcf850 0xf4240>; + opp-microvolt-L3 = <0xcf850 0xcf850 0xf4240>; + }; + + opp-800000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L0 = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L1 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L2 = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L3 = <0xd59f8 0xd59f8 0xf4240>; + }; + + opp-900000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xee098 0xee098 0xf4240>; + opp-microvolt-L0 = <0xee098 0xee098 0xf4240>; + opp-microvolt-L1 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L2 = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L3 = <0xdbba0 0xdbba0 0xf4240>; + }; + + opp-1000000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x3b9aca00>; + opp-microvolt = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L0 = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L1 = <0xee098 0xee098 0xf4240>; + opp-microvolt-L2 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L3 = <0xe1d48 0xe1d48 0xf4240>; + status = "disabled"; + }; + + opp-j-600000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + }; + + opp-m-900000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xe1d48 0xe1d48 0xf4240>; + }; + }; + + bus-npu { + compatible = "rockchip,rk3568-bus"; + rockchip,busfreq-policy = "clkfreq"; + clocks = <0x02 0x02>; + clock-names = "bus"; + operating-points-v2 = <0x74>; + status = "okay"; + bus-supply = <0x75>; + pvtm-supply = <0x05>; + }; + + bus-npu-opp-table { + compatible = "operating-points-v2"; + opp-shared; + nvmem-cells = <0x07>; + nvmem-cell-names = "pvtm"; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x16378 0x01 0x16379 0x186a0 0x02>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x74>; + + opp-700000000 { + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xdbba0>; + opp-microvolt-L0 = <0xdbba0>; + opp-microvolt-L1 = <0xd59f8>; + opp-microvolt-L2 = <0xd59f8>; + }; + + opp-900000000 { + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xdbba0>; + }; + + opp-1000000000 { + opp-hz = <0x00 0x3b9aca00>; + opp-microvolt = <0xe7ef0>; + opp-microvolt-L0 = <0xe7ef0>; + opp-microvolt-L1 = <0xe1d48>; + opp-microvolt-L2 = <0xdbba0>; + }; + }; + + iommu@fde4b000 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfde4b000 0x00 0x40>; + interrupts = <0x00 0x97 0x04>; + interrupt-names = "rknpu_mmu"; + clocks = <0x23 0x28 0x23 0x29>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x06>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x70>; + }; + + gpu@fde60000 { + compatible = "arm,mali-bifrost"; + reg = <0x00 0xfde60000 0x00 0x4000>; + interrupts = <0x00 0x27 0x04 0x00 0x29 0x04 0x00 0x28 0x04>; + interrupt-names = "GPU\0MMU\0JOB"; + upthreshold = <0x28>; + downdifferential = <0x0a>; + clocks = <0x02 0x01 0x23 0x1b>; + clock-names = "clk_mali\0clk_gpu"; + power-domains = <0x25 0x07>; + #cooling-cells = <0x02>; + operating-points-v2 = <0x76>; + status = "okay"; + mali-supply = <0x77>; + phandle = <0x21>; + + power-model { + compatible = "simple-power-model"; + leakage-range = <0x05 0x0f>; + ls = <0xffffa23e 0x5927 0x00>; + static-coefficient = <0x186a0>; + dynamic-coefficient = <0x3b9>; + ts = <0xfffe56a6 0xf87a 0xfffffab5 0x14>; + thermal-zone = "gpu-thermal"; + }; + }; + + opp-table2 { + compatible = "operating-points-v2"; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x78 0x07 0x08 0x79 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x320 0xc350>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x153d8 0x01 0x153d9 0x16378 0x02 0x16379 0x186a0 0x03>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x76>; + + opp-200000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0xbebc200>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-300000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x11e1a300>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-400000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xcf850 0xcf850 0xf4240>; + }; + + opp-600000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L0 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L1 = <0xd59f8 0xd59f8 0xf4240>; + opp-microvolt-L2 = <0xcf850 0xcf850 0xf4240>; + opp-microvolt-L3 = <0xcf850 0xcf850 0xf4240>; + }; + + opp-700000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L0 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L1 = <0xe1d48 0xe1d48 0xf4240>; + opp-microvolt-L2 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L3 = <0xd59f8 0xd59f8 0xf4240>; + }; + + opp-800000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L0 = <0xf4240 0xf4240 0xf4240>; + opp-microvolt-L1 = <0xee098 0xee098 0xf4240>; + opp-microvolt-L2 = <0xe7ef0 0xe7ef0 0xf4240>; + opp-microvolt-L3 = <0xe1d48 0xe1d48 0xf4240>; + }; + + opp-j-600000000 { + opp-supported-hw = <0x04 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + }; + + opp-m-800000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xe7ef0 0xe7ef0 0xf4240>; + }; + }; + + pvtm@fde80000 { + compatible = "rockchip,rk3568-gpu-pvtm"; + reg = <0x00 0xfde80000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@1 { + reg = <0x01>; + clocks = <0x23 0x1e 0x23 0x1d>; + clock-names = "clk\0pclk"; + resets = <0x23 0x24 0x23 0x23>; + reset-names = "rts\0rst-p"; + thermal-zone = "gpu-thermal"; + }; + }; + + pvtm@fde90000 { + compatible = "rockchip,rk3568-npu-pvtm"; + reg = <0x00 0xfde90000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@2 { + reg = <0x02>; + clocks = <0x23 0x2b 0x23 0x2a 0x23 0x25>; + clock-names = "clk\0pclk\0hclk"; + resets = <0x23 0x2e 0x23 0x2d>; + reset-names = "rts\0rst-p"; + thermal-zone = "soc-thermal"; + }; + }; + + vdpu@fdea0400 { + compatible = "rockchip,vpu-decoder-v2"; + reg = <0x00 0xfdea0400 0x00 0x400>; + interrupts = <0x00 0x8b 0x04>; + interrupt-names = "irq_dec"; + clocks = <0x23 0xee 0x23 0xef>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + resets = <0x23 0x11a 0x23 0x11b>; + reset-names = "video_a\0video_h"; + iommus = <0x7a>; + power-domains = <0x25 0x0b>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x00>; + rockchip,resetgroup-node = <0x00>; + status = "okay"; + }; + + iommu@fdea0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdea0800 0x00 0x40>; + interrupts = <0x00 0x8a 0x04>; + interrupt-names = "vdpu_mmu"; + clock-names = "aclk\0iface"; + clocks = <0x23 0xee 0x23 0xef>; + power-domains = <0x25 0x0b>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x7a>; + }; + + rk_rga@fdeb0000 { + compatible = "rockchip,rga2"; + reg = <0x00 0xfdeb0000 0x00 0x1000>; + interrupts = <0x00 0x5a 0x04>; + clocks = <0x23 0xf3 0x23 0xf4 0x23 0xf5>; + clock-names = "aclk_rga\0hclk_rga\0clk_rga"; + power-domains = <0x25 0x0a>; + status = "okay"; + }; + + ebc@fdec0000 { + compatible = "rockchip,rk3568-ebc-tcon"; + reg = <0x00 0xfdec0000 0x00 0x5000>; + interrupts = <0x00 0x11 0x04>; + clocks = <0x23 0xf9 0x23 0xfa>; + clock-names = "hclk\0dclk"; + power-domains = <0x25 0x0a>; + rockchip,grf = <0x3b>; + pinctrl-names = "default"; + pinctrl-0 = <0x7c>; + status = "disabled"; + }; + + jpegd@fded0000 { + compatible = "rockchip,rkv-jpeg-decoder-v1"; + reg = <0x00 0xfded0000 0x00 0x400>; + interrupts = <0x00 0x3e 0x04>; + clocks = <0x23 0xfb 0x23 0xfc>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,disable-auto-freq; + resets = <0x23 0x12c 0x23 0x12d>; + reset-names = "video_a\0video_h"; + iommus = <0x7d>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x01>; + rockchip,resetgroup-node = <0x01>; + power-domains = <0x25 0x0a>; + status = "okay"; + }; + + iommu@fded0480 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfded0480 0x00 0x40>; + interrupts = <0x00 0x3d 0x04>; + interrupt-names = "jpegd_mmu"; + clock-names = "aclk\0iface"; + clocks = <0x23 0xfb 0x23 0xfc>; + power-domains = <0x25 0x0a>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x7d>; + }; + + vepu@fdee0000 { + compatible = "rockchip,vpu-encoder-v2"; + reg = <0x00 0xfdee0000 0x00 0x400>; + interrupts = <0x00 0x40 0x04>; + clocks = <0x23 0xfd 0x23 0xfe>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,disable-auto-freq; + resets = <0x23 0x12e 0x23 0x12f>; + reset-names = "video_a\0video_h"; + iommus = <0x7e>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x02>; + rockchip,resetgroup-node = <0x02>; + power-domains = <0x25 0x0a>; + status = "okay"; + }; + + iommu@fdee0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdee0800 0x00 0x40>; + interrupts = <0x00 0x3f 0x04>; + interrupt-names = "vepu_mmu"; + clock-names = "aclk\0iface"; + clocks = <0x23 0xfd 0x23 0xfe>; + power-domains = <0x25 0x0a>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x7e>; + }; + + iep@fdef0000 { + compatible = "rockchip,iep-v2"; + reg = <0x00 0xfdef0000 0x00 0x500>; + interrupts = <0x00 0x38 0x04>; + clocks = <0x23 0xf6 0x23 0xf7 0x23 0xf8>; + clock-names = "aclk\0hclk\0sclk"; + resets = <0x23 0x127 0x23 0x128 0x23 0x129>; + reset-names = "rst_a\0rst_h\0rst_s"; + power-domains = <0x25 0x0a>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x05>; + rockchip,resetgroup-node = <0x05>; + iommus = <0x7f>; + status = "okay"; + }; + + iommu@fdef0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdef0800 0x00 0x100>; + interrupts = <0x00 0x38 0x04>; + interrupt-names = "iep_mmu"; + clocks = <0x23 0xf6 0x23 0xf7>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + power-domains = <0x25 0x0a>; + status = "okay"; + phandle = <0x7f>; + }; + + eink@fdf00000 { + compatible = "rockchip,rk3568-eink-tcon"; + reg = <0x00 0xfdf00000 0x00 0x74>; + interrupts = <0x00 0xb2 0x04>; + clocks = <0x23 0xff 0x23 0x100>; + clock-names = "pclk\0hclk"; + status = "disabled"; + }; + + rkvenc@fdf40000 { + compatible = "rockchip,rkv-encoder-v1"; + reg = <0x00 0xfdf40000 0x00 0x400>; + interrupts = <0x00 0x8c 0x04>; + interrupt-names = "irq_enc"; + clocks = <0x23 0x103 0x23 0x104 0x23 0x105>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_core"; + rockchip,normal-rates = <0x11b3dc40 0x00 0x11b3dc40>; + resets = <0x23 0x133 0x23 0x134 0x23 0x135>; + reset-names = "video_a\0video_h\0video_core"; + assigned-clocks = <0x23 0x103 0x23 0x105>; + assigned-clock-rates = <0x11b3dc40 0x11b3dc40>; + iommus = <0x80>; + node-name = "rkvenc"; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x03>; + rockchip,resetgroup-node = <0x03>; + power-domains = <0x25 0x0e>; + operating-points-v2 = <0x81>; + status = "okay"; + venc-supply = <0x75>; + }; + + rkvenc-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x07>; + nvmem-cell-names = "pvtm"; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x16378 0x01 0x16379 0x186a0 0x02>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x81>; + + opp-297000000 { + opp-hz = <0x00 0x11b3dc40>; + opp-microvolt = <0xdbba0>; + opp-microvolt-L0 = <0xdbba0>; + opp-microvolt-L1 = <0xd59f8>; + opp-microvolt-L2 = <0xd59f8>; + }; + + opp-400000000 { + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xe7ef0>; + opp-microvolt-L0 = <0xe7ef0>; + opp-microvolt-L1 = <0xe1d48>; + opp-microvolt-L2 = <0xdbba0>; + }; + }; + + iommu@fdf40f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdf40f00 0x00 0x40 0x00 0xfdf40f40 0x00 0x40>; + interrupts = <0x00 0x8d 0x04 0x00 0x8e 0x04>; + interrupt-names = "rkvenc_mmu0\0rkvenc_mmu1"; + clocks = <0x23 0x103 0x23 0x104>; + clock-names = "aclk\0iface"; + rockchip,disable-mmu-reset; + rockchip,enable-cmd-retry; + #iommu-cells = <0x00>; + power-domains = <0x25 0x0e>; + status = "okay"; + phandle = <0x80>; + }; + + rkvdec@fdf80200 { + compatible = "rockchip,rkv-decoder-rk3568\0rockchip,rkv-decoder-v2"; + reg = <0x00 0xfdf80200 0x00 0x400 0x00 0xfdf80100 0x00 0x100>; + reg-names = "regs\0link"; + interrupts = <0x00 0x5b 0x04>; + interrupt-names = "irq_dec"; + clocks = <0x23 0x108 0x23 0x109 0x23 0x10a 0x23 0x10b 0x23 0x10c>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_cabac\0clk_core\0clk_hevc_cabac"; + rockchip,normal-rates = <0x11b3dc40 0x00 0x11b3dc40 0x11b3dc40 0x23c34600>; + rockchip,advanced-rates = <0x179a7b00 0x00 0x179a7b00 0x179a7b00 0x23c34600>; + rockchip,default-max-load = <0x1fe000>; + resets = <0x23 0x142 0x23 0x143 0x23 0x144 0x23 0x145 0x23 0x146>; + assigned-clocks = <0x23 0x108 0x23 0x10a 0x23 0x10b 0x23 0x10c>; + assigned-clock-rates = <0x11b3dc40 0x11b3dc40 0x11b3dc40 0x11b3dc40>; + reset-names = "video_a\0video_h\0video_cabac\0video_core\0video_hevc_cabac"; + power-domains = <0x25 0x0d>; + operating-points-v2 = <0x82>; + vdec-supply = <0x75>; + iommus = <0x83>; + rockchip,srv = <0x7b>; + rockchip,taskqueue-node = <0x04>; + rockchip,resetgroup-node = <0x04>; + rockchip,sram = <0x84>; + rockchip,rcb-iova = <0x10000000 0x10000>; + rockchip,rcb-min-width = <0x200>; + rockchip,task-capacity = <0x10>; + status = "okay"; + }; + + rkvdec-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x85 0x07>; + nvmem-cell-names = "leakage\0pvtm"; + rockchip,leakage-voltage-sel = <0x01 0x50 0x00 0x51 0xfe 0x01>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x186a0 0x01>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0x82>; + + opp-297000000 { + opp-hz = <0x00 0x11b3dc40>; + opp-microvolt = <0xdbba0>; + opp-microvolt-L0 = <0xdbba0>; + opp-microvolt-L1 = <0xd59f8>; + }; + + opp-400000000 { + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xdbba0>; + }; + }; + + iommu@fdf80800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdf80800 0x00 0x40 0x00 0xfdf80840 0x00 0x40>; + interrupts = <0x00 0x5c 0x04>; + interrupt-names = "rkvdec_mmu"; + clocks = <0x23 0x108 0x23 0x109>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x0d>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x83>; + }; + + mipi-csi2-hw@fdfb0000 { + compatible = "rockchip,rk3568-mipi-csi2-hw"; + reg = <0x00 0xfdfb0000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x08 0x04 0x00 0x09 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x23 0xd5>; + clock-names = "pclk_csi2host"; + resets = <0x23 0xff>; + reset-names = "srst_csihost_p"; + status = "okay"; + phandle = <0x1e>; + }; + + rkcif@fdfe0000 { + compatible = "rockchip,rk3568-cif"; + reg = <0x00 0xfdfe0000 0x00 0x8000>; + reg-names = "cif_regs"; + interrupts = <0x00 0x92 0x04>; + interrupt-names = "cif-intr"; + clocks = <0x23 0xce 0x23 0xcf 0x23 0xd0 0x23 0xd1>; + clock-names = "aclk_cif\0hclk_cif\0dclk_cif\0iclk_cif_g"; + resets = <0x23 0xf7 0x23 0xf8 0x23 0xf9 0x23 0xfb 0x23 0xfa>; + reset-names = "rst_cif_a\0rst_cif_h\0rst_cif_d\0rst_cif_p\0rst_cif_i"; + assigned-clocks = <0x23 0xd0>; + assigned-clock-rates = <0x11e1a300>; + power-domains = <0x25 0x08>; + rockchip,grf = <0x3b>; + iommus = <0x86>; + status = "disabled"; + phandle = <0x87>; + }; + + iommu@fdfe0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdfe0800 0x00 0x100>; + interrupts = <0x00 0x92 0x04>; + interrupt-names = "cif_mmu"; + clocks = <0x23 0xce 0x23 0xcf>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x08>; + rockchip,disable-mmu-reset; + #iommu-cells = <0x00>; + status = "disabled"; + phandle = <0x86>; + }; + + rkcif_dvp { + compatible = "rockchip,rkcif-dvp"; + rockchip,hw = <0x87>; + status = "disabled"; + phandle = <0x88>; + }; + + rkcif_dvp_sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x88>; + status = "disabled"; + }; + + rkcif_mipi_lvds { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x87>; + status = "disabled"; + phandle = <0x89>; + }; + + rkcif_mipi_lvds_sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x89>; + status = "disabled"; + }; + + rkisp@fdff0000 { + compatible = "rockchip,rk3568-rkisp"; + reg = <0x00 0xfdff0000 0x00 0x10000>; + interrupts = <0x00 0x39 0x04 0x00 0x3a 0x04 0x00 0x3c 0x04>; + interrupt-names = "mipi_irq\0mi_irq\0isp_irq"; + clocks = <0x23 0xd2 0x23 0xd3 0x23 0xd4>; + clock-names = "aclk_isp\0hclk_isp\0clk_isp"; + resets = <0x23 0xfd 0x23 0xfc>; + reset-names = "isp\0isp-h"; + rockchip,grf = <0x3b>; + power-domains = <0x25 0x08>; + iommus = <0x8a>; + rockchip,iq-feature = <0x1bfb 0xfffe67ff>; + status = "okay"; + phandle = <0x8b>; + }; + + iommu@fdff1a00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdff1a00 0x00 0x100>; + interrupts = <0x00 0x3b 0x04>; + interrupt-names = "isp_mmu"; + clocks = <0x23 0xd2 0x23 0xd3>; + clock-names = "aclk\0iface"; + power-domains = <0x25 0x08>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "okay"; + phandle = <0x8a>; + }; + + rkisp-vir0 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x8b>; + status = "okay"; + + port { + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x8c>; + phandle = <0x134>; + }; + }; + }; + + rkisp-vir1 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x8b>; + status = "disabled"; + }; + + uio@fe010000 { + compatible = "rockchip,uio-gmac"; + reg = <0x00 0xfe010000 0x00 0x10000>; + rockchip,ethernet = <0x8d>; + status = "disabled"; + }; + + ethernet@fe010000 { + local-mac-address = [5e 4f fd 70 05 c6]; + compatible = "rockchip,rk3568-gmac\0snps,dwmac-4.20a"; + reg = <0x00 0xfe010000 0x00 0x10000>; + interrupts = <0x00 0x20 0x04 0x00 0x1d 0x04>; + interrupt-names = "macirq\0eth_wake_irq"; + rockchip,grf = <0x3b>; + clocks = <0x23 0x186 0x23 0x189 0x23 0x189 0x23 0xc7 0x23 0xc3 0x23 0xc4 0x23 0x189 0x23 0xc8 0x23 0xac 0x23 0xab>; + clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_refout\0aclk_mac\0pclk_mac\0clk_mac_speed\0ptp_ref\0pclk_xpcs\0clk_xpcs_eee"; + resets = <0x23 0xec>; + reset-names = "stmmaceth"; + snps,mixed-burst; + snps,tso; + snps,axi-config = <0x8e>; + snps,mtl-rx-config = <0x8f>; + snps,mtl-tx-config = <0x90>; + status = "okay"; + phy-mode = "rgmii"; + clock_in_out = "input"; + snps,reset-gpio = <0x91 0x19 0x01>; + snps,reset-active-low; + snps,reset-delays-us = <0x00 0x4e20 0x186a0>; + assigned-clocks = <0x23 0x189 0x23 0x186>; + assigned-clock-parents = <0x23 0x187 0x92>; + pinctrl-names = "default"; + pinctrl-0 = <0x93 0x94 0x95 0x96 0x97 0x98>; + tx_delay = <0x3e>; + rx_delay = <0x32>; + phy-handle = <0x99>; + phandle = <0x8d>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x00>; + led_status_value = <0x6940>; + phandle = <0x99>; + }; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x04>; + snps,rd_osr_lmt = <0x08>; + snps,blen = <0x00 0x00 0x00 0x00 0x10 0x08 0x04>; + phandle = <0x8e>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x01>; + phandle = <0x8f>; + + queue0 { + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x01>; + phandle = <0x90>; + + queue0 { + }; + }; + }; + + vop@fe040000 { + compatible = "rockchip,rk3568-vop"; + reg = <0x00 0xfe040000 0x00 0x3000 0x00 0xfe044000 0x00 0x1000>; + reg-names = "regs\0gamma_lut"; + rockchip,grf = <0x3b>; + interrupts = <0x00 0x94 0x04>; + clocks = <0x23 0xdd 0x23 0xde 0x23 0xdf 0x23 0xe0 0x23 0xe1>; + clock-names = "aclk_vop\0hclk_vop\0dclk_vp0\0dclk_vp1\0dclk_vp2"; + iommus = <0x9a>; + power-domains = <0x25 0x09>; + status = "okay"; + assigned-clocks = <0x23 0xdf 0x23 0xe0>; + assigned-clock-parents = <0x3a 0x02 0x23 0x05>; + disable-win-move; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + phandle = <0x15>; + + port@0 { + rockchip,primary-plane = <0x04>; + rockchip,plane-mask = <0x15>; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x9b>; + phandle = <0x17>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x9c>; + phandle = <0x18>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x9d>; + phandle = <0x19>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0x9e>; + phandle = <0x1a>; + }; + }; + + port@1 { + rockchip,primary-plane = <0x05>; + rockchip,plane-mask = <0x22>; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x01>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x9f>; + phandle = <0xa8>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa0>; + phandle = <0xa9>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xa1>; + phandle = <0xaf>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0xa2>; + phandle = <0xad>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0xa3>; + phandle = <0x1b>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0xa4>; + phandle = <0x37>; + }; + }; + + port@2 { + rockchip,primary-plane = <0x03>; + rockchip,plane-mask = <0x08>; + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x02>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xa5>; + phandle = <0x35>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa6>; + phandle = <0x1c>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xa7>; + phandle = <0x38>; + }; + }; + }; + }; + + iommu@fe043e00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfe043e00 0x00 0x100 0x00 0xfe043f00 0x00 0x100>; + interrupts = <0x00 0x94 0x04>; + interrupt-names = "vop_mmu"; + clocks = <0x23 0xdd 0x23 0xde>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + rockchip,disable-device-link-resume; + status = "okay"; + phandle = <0x9a>; + }; + + dsi@fe060000 { + compatible = "rockchip,rk3568-mipi-dsi"; + reg = <0x00 0xfe060000 0x00 0x10000>; + interrupts = <0x00 0x44 0x04>; + clocks = <0x23 0xe8 0x23 0xda>; + clock-names = "pclk\0hclk"; + resets = <0x23 0x110>; + reset-names = "apb"; + phys = <0x34>; + phy-names = "dphy"; + power-domains = <0x25 0x09>; + rockchip,grf = <0x3b>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x17>; + status = "disabled"; + phandle = <0x9b>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa8>; + status = "disabled"; + phandle = <0x9f>; + }; + }; + }; + }; + + dsi@fe070000 { + compatible = "rockchip,rk3568-mipi-dsi"; + reg = <0x00 0xfe070000 0x00 0x10000>; + interrupts = <0x00 0x45 0x04>; + clocks = <0x23 0xe9 0x23 0xda>; + clock-names = "pclk\0hclk"; + resets = <0x23 0x111>; + reset-names = "apb"; + phys = <0x36>; + phy-names = "dphy"; + power-domains = <0x25 0x09>; + rockchip,grf = <0x3b>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x18>; + status = "disabled"; + phandle = <0x9c>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xa9>; + status = "disabled"; + phandle = <0xa0>; + }; + }; + }; + }; + + hdmi@fe0a0000 { + compatible = "rockchip,rk3568-dw-hdmi"; + reg = <0x00 0xfe0a0000 0x00 0x20000>; + interrupts = <0x00 0x2d 0x04>; + clocks = <0x23 0xe6 0x23 0xe7 0x23 0x193 0x3a 0x02 0x23 0xde>; + clock-names = "iahb\0isfr\0cec\0ref\0hclk"; + power-domains = <0x25 0x09>; + reg-io-width = <0x04>; + rockchip,grf = <0x3b>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xaa 0xab 0xac>; + status = "okay"; + phandle = <0x147>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x1a>; + status = "okay"; + phandle = <0x9e>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xad>; + status = "disabled"; + phandle = <0xa2>; + }; + }; + }; + }; + + edp@fe0c0000 { + compatible = "rockchip,rk3568-edp"; + reg = <0x00 0xfe0c0000 0x00 0x10000>; + interrupts = <0x00 0x12 0x04>; + clocks = <0x3a 0x29 0x23 0xea 0x23 0xeb 0x23 0xda>; + clock-names = "dp\0pclk\0spdif\0hclk"; + resets = <0x23 0x113 0x23 0x112>; + reset-names = "dp\0apb"; + phys = <0xae>; + phy-names = "dp"; + power-domains = <0x25 0x09>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x19>; + status = "disabled"; + phandle = <0x9d>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xaf>; + status = "disabled"; + phandle = <0xa1>; + }; + }; + }; + }; + + nocp-cpu@fe102000 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102000 0x00 0x400>; + phandle = <0xb5>; + }; + + nocp-gpu-vpu-rga-venc@fe102400 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102400 0x00 0x400>; + }; + + nocp-vdec@fe102800 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102800 0x00 0x400>; + }; + + nocp-vi-usb-peri-pipe@fe102c00 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe102c00 0x00 0x400>; + }; + + nocp-vo@fe103000 { + compatible = "rockchip,rk3568-nocp"; + reg = <0x00 0xfe103000 0x00 0x400>; + }; + + qos@fe128000 { + compatible = "syscon"; + reg = <0x00 0xfe128000 0x00 0x20>; + phandle = <0x55>; + }; + + qos@fe138080 { + compatible = "syscon"; + reg = <0x00 0xfe138080 0x00 0x20>; + phandle = <0x64>; + }; + + qos@fe138100 { + compatible = "syscon"; + reg = <0x00 0xfe138100 0x00 0x20>; + phandle = <0x65>; + }; + + qos@fe138180 { + compatible = "syscon"; + reg = <0x00 0xfe138180 0x00 0x20>; + phandle = <0x66>; + }; + + qos@fe148000 { + compatible = "syscon"; + reg = <0x00 0xfe148000 0x00 0x20>; + phandle = <0x56>; + }; + + qos@fe148080 { + compatible = "syscon"; + reg = <0x00 0xfe148080 0x00 0x20>; + phandle = <0x57>; + }; + + qos@fe148100 { + compatible = "syscon"; + reg = <0x00 0xfe148100 0x00 0x20>; + phandle = <0x58>; + }; + + qos@fe150000 { + compatible = "syscon"; + reg = <0x00 0xfe150000 0x00 0x20>; + phandle = <0x62>; + }; + + qos@fe158000 { + compatible = "syscon"; + reg = <0x00 0xfe158000 0x00 0x20>; + phandle = <0x5c>; + }; + + qos@fe158100 { + compatible = "syscon"; + reg = <0x00 0xfe158100 0x00 0x20>; + phandle = <0x5d>; + }; + + qos@fe158180 { + compatible = "syscon"; + reg = <0x00 0xfe158180 0x00 0x20>; + phandle = <0x5e>; + }; + + qos@fe158200 { + compatible = "syscon"; + reg = <0x00 0xfe158200 0x00 0x20>; + phandle = <0x5f>; + }; + + qos@fe158280 { + compatible = "syscon"; + reg = <0x00 0xfe158280 0x00 0x20>; + phandle = <0x60>; + }; + + qos@fe158300 { + compatible = "syscon"; + reg = <0x00 0xfe158300 0x00 0x20>; + phandle = <0x61>; + }; + + qos@fe180000 { + compatible = "syscon"; + reg = <0x00 0xfe180000 0x00 0x20>; + phandle = <0x54>; + }; + + qos@fe190000 { + compatible = "syscon"; + reg = <0x00 0xfe190000 0x00 0x20>; + phandle = <0x67>; + }; + + qos@fe190080 { + compatible = "syscon"; + reg = <0x00 0xfe190080 0x00 0x20>; + phandle = <0x68>; + }; + + qos@fe190100 { + compatible = "syscon"; + reg = <0x00 0xfe190100 0x00 0x20>; + phandle = <0x69>; + }; + + qos@fe190200 { + compatible = "syscon"; + reg = <0x00 0xfe190200 0x00 0x20>; + phandle = <0x6a>; + }; + + qos@fe190280 { + compatible = "syscon"; + reg = <0x00 0xfe190280 0x00 0x20>; + phandle = <0x6b>; + }; + + qos@fe190300 { + compatible = "syscon"; + reg = <0x00 0xfe190300 0x00 0x20>; + phandle = <0x6c>; + }; + + qos@fe190380 { + compatible = "syscon"; + reg = <0x00 0xfe190380 0x00 0x20>; + phandle = <0x6d>; + }; + + qos@fe190400 { + compatible = "syscon"; + reg = <0x00 0xfe190400 0x00 0x20>; + phandle = <0x6e>; + }; + + qos@fe198000 { + compatible = "syscon"; + reg = <0x00 0xfe198000 0x00 0x20>; + phandle = <0x63>; + }; + + qos@fe1a8000 { + compatible = "syscon"; + reg = <0x00 0xfe1a8000 0x00 0x20>; + phandle = <0x59>; + }; + + qos@fe1a8080 { + compatible = "syscon"; + reg = <0x00 0xfe1a8080 0x00 0x20>; + phandle = <0x5a>; + }; + + qos@fe1a8100 { + compatible = "syscon"; + reg = <0x00 0xfe1a8100 0x00 0x20>; + phandle = <0x5b>; + }; + + dwmmc@fe000000 { + compatible = "rockchip,rk3568-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe000000 0x00 0x4000>; + interrupts = <0x00 0x64 0x04>; + max-frequency = <0x8f0d180>; + clocks = <0x23 0xc1 0x23 0xc2 0x23 0x18e 0x23 0x18f>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + resets = <0x23 0xeb>; + reset-names = "reset"; + status = "okay"; + no-sd; + no-mmc; + bus-width = <0x04>; + disable-wp; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <0xb0 0xb1 0xb2>; + sd-uhs-sdr104; + mmc-pwrseq = <0xb3>; + non-removable; + }; + + dfi@fe230000 { + reg = <0x00 0xfe230000 0x00 0x400>; + compatible = "rockchip,rk3568-dfi"; + rockchip,pmugrf = <0x3c>; + status = "okay"; + phandle = <0xb4>; + }; + + dmc { + compatible = "rockchip,rk3568-dmc"; + interrupts = <0x00 0x0a 0x04>; + interrupt-names = "complete"; + devfreq-events = <0xb4 0xb5>; + clocks = <0x02 0x03>; + clock-names = "dmc_clk"; + operating-points-v2 = <0xb6>; + vop-bw-dmc-freq = <0x00 0x11e 0x4f1a0 0x11f 0x1869f 0x80e80>; + vop-frame-bw-dmc-freq = <0x00 0x26c 0x4f1a0 0x26d 0x1869f 0xbe6e0>; + cpu-bw-dmc-freq = <0x00 0x15e 0x4f1a0 0x15f 0x190 0x80e80 0x191 0x1869f 0xbe6e0>; + upthreshold = <0x28>; + downdifferential = <0x14>; + system-status-level = <0x01 0x04 0x08 0x08 0x02 0x01 0x10 0x04 0x10000 0x04 0x1000 0x08 0x4000 0x08 0x2000 0x08 0xc00 0x08>; + auto-min-freq = <0x4f1a0>; + auto-freq-en = <0x01>; + #cooling-cells = <0x02>; + status = "okay"; + center-supply = <0x75>; + phandle = <0x16>; + }; + + dmc-fsp { + compatible = "rockchip,rk3568-dmc-fsp"; + debug_print_level = <0x00>; + ddr3_params = <0xb7>; + ddr4_params = <0xb8>; + lpddr3_params = <0xb9>; + lpddr4_params = <0xba>; + lpddr4x_params = <0xbb>; + status = "okay"; + }; + + dmc-opp-table { + compatible = "operating-points-v2"; + mbist-vmin = <0xc96a8 0xdbba0 0xe7ef0>; + nvmem-cells = <0x85 0x07 0x08 0xbc 0x0a 0x0b>; + nvmem-cell-names = "leakage\0pvtm\0mbist-vmin\0opp-info\0specification_serial_number\0remark_spec_serial_number"; + rockchip,supported-hw; + rockchip,max-volt = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x00>; + rockchip,low-temp-adjust-volt = <0x00 0x618 0x124f8>; + rockchip,leakage-voltage-sel = <0x01 0x50 0x00 0x51 0xfe 0x01>; + rockchip,pvtm-voltage-sel = <0x00 0x14820 0x00 0x14821 0x186a0 0x01>; + rockchip,pvtm-ch = <0x00 0x05>; + phandle = <0xb6>; + + opp-1560000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x5cfbb600>; + opp-microvolt = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L0 = <0xdbba0 0xdbba0 0xf4240>; + opp-microvolt-L1 = <0xd59f8 0xd59f8 0xf4240>; + }; + + opp-j-m-1560000000 { + opp-supported-hw = <0x06 0xffff>; + opp-hz = <0x00 0x5cfbb600>; + opp-microvolt = <0xd59f8 0xd59f8 0xf4240>; + }; + }; + + pcie@fe260000 { + compatible = "rockchip,rk3568-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x00 0x0f>; + clocks = <0x23 0x81 0x23 0x82 0x23 0x83 0x23 0x84 0x23 0x85>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux"; + device_type = "pci"; + interrupts = <0x00 0x4b 0x04 0x00 0x4a 0x04 0x00 0x49 0x04 0x00 0x48 0x04 0x00 0x47 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xbd 0x00 0x00 0x00 0x00 0x02 0xbd 0x01 0x00 0x00 0x00 0x03 0xbd 0x02 0x00 0x00 0x00 0x04 0xbd 0x03>; + linux,pci-domain = <0x00>; + num-ib-windows = <0x06>; + num-viewport = <0x08>; + num-ob-windows = <0x02>; + max-link-speed = <0x02>; + msi-map = <0x00 0xbe 0x00 0x1000>; + num-lanes = <0x01>; + phys = <0x27 0x02>; + phy-names = "pcie-phy"; + power-domains = <0x25 0x0f>; + ranges = <0x800 0x00 0xf4000000 0x00 0xf4000000 0x00 0x100000 0x81000000 0x00 0xf4100000 0x00 0xf4100000 0x00 0x100000 0x82000000 0x00 0xf4200000 0x00 0xf4200000 0x00 0x1e00000 0xc3000000 0x03 0x00 0x03 0x00 0x00 0x40000000>; + reg = <0x03 0xc0000000 0x00 0x400000 0x00 0xfe260000 0x00 0x10000>; + reg-names = "pcie-dbi\0pcie-apb"; + resets = <0x23 0xa1>; + reset-names = "pipe"; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x48 0x01>; + phandle = <0xbd>; + }; + }; + + pcie@fe270000 { + compatible = "rockchip,rk3568-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x10 0x1f>; + clocks = <0x23 0x88 0x23 0x89 0x23 0x8a 0x23 0x8b 0x23 0x8c>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux"; + device_type = "pci"; + interrupts = <0x00 0xa0 0x04 0x00 0x9f 0x04 0x00 0x9e 0x04 0x00 0x9d 0x04 0x00 0x9c 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xbf 0x00 0x00 0x00 0x00 0x02 0xbf 0x01 0x00 0x00 0x00 0x03 0xbf 0x02 0x00 0x00 0x00 0x04 0xbf 0x03>; + linux,pci-domain = <0x01>; + num-ib-windows = <0x06>; + num-ob-windows = <0x02>; + num-viewport = <0x08>; + max-link-speed = <0x03>; + msi-map = <0x1000 0xbe 0x1000 0x1000>; + num-lanes = <0x01>; + phys = <0xc0>; + phy-names = "pcie-phy"; + power-domains = <0x25 0x0f>; + ranges = <0x800 0x00 0xf2000000 0x00 0xf2000000 0x00 0x100000 0x81000000 0x00 0xf2100000 0x00 0xf2100000 0x00 0x100000 0x82000000 0x00 0xf2200000 0x00 0xf2200000 0x00 0x1e00000 0xc3000000 0x03 0x40000000 0x03 0x40000000 0x00 0x40000000>; + reg = <0x03 0xc0400000 0x00 0x400000 0x00 0xfe270000 0x00 0x10000>; + reg-names = "pcie-dbi\0pcie-apb"; + resets = <0x23 0xb1>; + reset-names = "pipe"; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x9d 0x01>; + phandle = <0xbf>; + }; + }; + + pcie@fe280000 { + compatible = "rockchip,rk3568-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x20 0x2f>; + clocks = <0x23 0x8f 0x23 0x90 0x23 0x91 0x23 0x92 0x23 0x93>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux"; + device_type = "pci"; + interrupts = <0x00 0xa5 0x04 0x00 0xa4 0x04 0x00 0xa3 0x04 0x00 0xa2 0x04 0x00 0xa1 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xc1 0x00 0x00 0x00 0x00 0x02 0xc1 0x01 0x00 0x00 0x00 0x03 0xc1 0x02 0x00 0x00 0x00 0x04 0xc1 0x03>; + linux,pci-domain = <0x02>; + num-ib-windows = <0x06>; + num-viewport = <0x08>; + num-ob-windows = <0x02>; + max-link-speed = <0x03>; + msi-map = <0x2000 0xbe 0x2000 0x1000>; + num-lanes = <0x02>; + phys = <0xc0>; + phy-names = "pcie-phy"; + power-domains = <0x25 0x0f>; + ranges = <0x800 0x00 0xf0000000 0x00 0xf0000000 0x00 0x100000 0x81000000 0x00 0xf0100000 0x00 0xf0100000 0x00 0x100000 0x82000000 0x00 0xf0200000 0x00 0xf0200000 0x00 0x1e00000 0xc3000000 0x03 0x80000000 0x03 0x80000000 0x00 0x40000000>; + reg = <0x03 0xc0800000 0x00 0x400000 0x00 0xfe280000 0x00 0x10000>; + reg-names = "pcie-dbi\0pcie-apb"; + resets = <0x23 0xc1>; + reset-names = "pipe"; + status = "okay"; + reset-gpios = <0x91 0x1e 0x00>; + vpcie3v3-supply = <0xc2>; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xa2 0x01>; + phandle = <0xc1>; + }; + }; + + uio@fe2a0000 { + compatible = "rockchip,uio-gmac"; + reg = <0x00 0xfe2a0000 0x00 0x10000>; + rockchip,ethernet = <0xc3>; + status = "disabled"; + }; + + ethernet@fe2a0000 { + local-mac-address = [5a 4f fd 70 05 c6]; + compatible = "rockchip,rk3568-gmac\0snps,dwmac-4.20a"; + reg = <0x00 0xfe2a0000 0x00 0x10000>; + interrupts = <0x00 0x1b 0x04 0x00 0x18 0x04>; + interrupt-names = "macirq\0eth_wake_irq"; + rockchip,grf = <0x3b>; + clocks = <0x23 0x182 0x23 0x185 0x23 0x185 0x23 0xb8 0x23 0xb4 0x23 0xb5 0x23 0x185 0x23 0xb9 0x23 0xac 0x23 0xab>; + clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_refout\0aclk_mac\0pclk_mac\0clk_mac_speed\0ptp_ref\0pclk_xpcs\0clk_xpcs_eee"; + resets = <0x23 0xd7>; + reset-names = "stmmaceth"; + snps,mixed-burst; + snps,tso; + snps,axi-config = <0xc4>; + snps,mtl-rx-config = <0xc5>; + snps,mtl-tx-config = <0xc6>; + status = "okay"; + phy-mode = "rgmii"; + clock_in_out = "input"; + snps,reset-gpio = <0x91 0x1b 0x01>; + snps,reset-active-low; + snps,reset-delays-us = <0x00 0x4e20 0x186a0>; + assigned-clocks = <0x23 0x185 0x23 0x182>; + assigned-clock-parents = <0x23 0x183 0xc7>; + pinctrl-names = "default"; + pinctrl-0 = <0xc8 0xc9 0xca 0xcb 0xcc 0xcd>; + tx_delay = <0x4a>; + rx_delay = <0x2e>; + phy-handle = <0xce>; + phandle = <0xc3>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x00>; + led_status_value = <0x6940>; + phandle = <0xce>; + }; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x04>; + snps,rd_osr_lmt = <0x08>; + snps,blen = <0x00 0x00 0x00 0x00 0x10 0x08 0x04>; + phandle = <0xc4>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x01>; + phandle = <0xc5>; + + queue0 { + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x01>; + phandle = <0xc6>; + + queue0 { + }; + }; + }; + + dwmmc@fe2b0000 { + compatible = "rockchip,rk3568-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe2b0000 0x00 0x4000>; + interrupts = <0x00 0x62 0x04>; + max-frequency = <0x8f0d180>; + clocks = <0x23 0xb0 0x23 0xb1 0x23 0x18a 0x23 0x18b>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + resets = <0x23 0xd4>; + reset-names = "reset"; + status = "okay"; + no-sdio; + no-mmc; + bus-width = <0x04>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vmmc-supply = <0xcf>; + vqmmc-supply = <0x31>; + pinctrl-names = "default"; + pinctrl-0 = <0xd0 0xd1 0xd2 0xd3>; + }; + + dwmmc@fe2c0000 { + compatible = "rockchip,rk3568-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe2c0000 0x00 0x4000>; + interrupts = <0x00 0x63 0x04>; + max-frequency = <0x8f0d180>; + clocks = <0x23 0xb2 0x23 0xb3 0x23 0x18c 0x23 0x18d>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + resets = <0x23 0xd6>; + reset-names = "reset"; + status = "disabled"; + }; + + spi@fe300000 { + compatible = "rockchip,sfc"; + reg = <0x00 0xfe300000 0x00 0x4000>; + interrupts = <0x00 0x65 0x04>; + clocks = <0x23 0x78 0x23 0x76>; + clock-names = "clk_sfc\0hclk_sfc"; + assigned-clocks = <0x23 0x78>; + assigned-clock-rates = <0x2faf080>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <0xd4>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x00>; + spi-max-frequency = <0x2faf080>; + spi-rx-bus-width = <0x01>; + spi-tx-bus-width = <0x01>; + }; + }; + + sdhci@fe310000 { + compatible = "rockchip,rk3568-dwcmshc\0rockchip,dwcmshc-sdhci"; + reg = <0x00 0xfe310000 0x00 0x10000>; + interrupts = <0x00 0x13 0x04>; + assigned-clocks = <0x23 0x7b 0x23 0x7d 0x23 0x7c>; + assigned-clock-rates = <0xbebc200 0x16e3600 0xbebc200>; + clocks = <0x23 0x7c 0x23 0x7a 0x23 0x79 0x23 0x7b 0x23 0x7d>; + clock-names = "core\0bus\0axi\0block\0timer"; + resets = <0x23 0x78 0x23 0x76 0x23 0x75 0x23 0x77 0x23 0x79>; + reset-names = "core\0bus\0axi\0block\0timer"; + status = "okay"; + bus-width = <0x08>; + no-sdio; + no-sd; + non-removable; + max-frequency = <0xbebc200>; + full-pwr-cycle-in-suspend; + }; + + nandc@fe330000 { + compatible = "rockchip,rk-nandc-v9"; + reg = <0x00 0xfe330000 0x00 0x4000>; + interrupts = <0x00 0x46 0x04>; + nandc_id = <0x00>; + clocks = <0x23 0x75 0x23 0x74>; + clock-names = "clk_nandc\0hclk_nandc"; + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + nand@0 { + reg = <0x00>; + nand-bus-width = <0x08>; + nand-ecc-mode = "hw"; + nand-ecc-strength = <0x10>; + nand-ecc-step-size = <0x400>; + }; + }; + + crypto@fe380000 { + compatible = "rockchip,rk3568-crypto"; + reg = <0x00 0xfe380000 0x00 0x4000>; + interrupts = <0x00 0x04 0x04>; + clocks = <0x23 0x6a 0x23 0x6b 0x23 0x6c 0x23 0x6d>; + clock-names = "aclk\0hclk\0sclk\0apb_pclk"; + assigned-clocks = <0x23 0x6c>; + assigned-clock-rates = <0xbebc200>; + resets = <0x23 0x69>; + reset-names = "crypto-rst"; + status = "disabled"; + }; + + rng@fe388000 { + compatible = "rockchip,cryptov2-rng"; + reg = <0x00 0xfe388000 0x00 0x2000>; + clocks = <0x23 0x70 0x23 0x6f>; + clock-names = "clk_trng\0hclk_trng"; + resets = <0x23 0x6d>; + reset-names = "reset"; + status = "okay"; + }; + + otp@fe38c000 { + compatible = "rockchip,rk3568-otp"; + reg = <0x00 0xfe38c000 0x00 0x4000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + clocks = <0x23 0x73 0x23 0x72 0x23 0x71 0x23 0x181>; + clock-names = "usr\0sbpi\0apb\0phy"; + resets = <0x23 0x1cf>; + reset-names = "otp_phy"; + + cpu-code@2 { + reg = <0x02 0x02>; + phandle = <0x12>; + }; + + specification-serial-number@7 { + reg = <0x07 0x01>; + bits = <0x00 0x05>; + phandle = <0x0a>; + }; + + cpu-version@8 { + reg = <0x08 0x01>; + bits = <0x03 0x03>; + phandle = <0x11>; + }; + + mbist-vmin@9 { + reg = <0x09 0x01>; + bits = <0x00 0x04>; + phandle = <0x08>; + }; + + id@a { + reg = <0x0a 0x10>; + phandle = <0x10>; + }; + + cpu-leakage@1a { + reg = <0x1a 0x01>; + phandle = <0x06>; + }; + + log-leakage@1b { + reg = <0x1b 0x01>; + phandle = <0x85>; + }; + + npu-leakage@1c { + reg = <0x1c 0x01>; + phandle = <0x72>; + }; + + gpu-leakage@1d { + reg = <0x1d 0x01>; + phandle = <0x78>; + }; + + core-pvtm@2a { + reg = <0x2a 0x02>; + phandle = <0x07>; + }; + + cpu-tsadc-trim-l@2e { + reg = <0x2e 0x01>; + phandle = <0x125>; + }; + + cpu-tsadc-trim-h@2f { + reg = <0x2f 0x01>; + bits = <0x00 0x04>; + phandle = <0x126>; + }; + + npu-tsadc-trim-l@30 { + reg = <0x30 0x01>; + phandle = <0x127>; + }; + + npu-tsadc-trim-h@31 { + reg = <0x31 0x01>; + bits = <0x00 0x04>; + phandle = <0x128>; + }; + + tsadc-trim-base-frac@31 { + reg = <0x31 0x01>; + bits = <0x04 0x04>; + phandle = <0x122>; + }; + + tsadc-trim-base@32 { + reg = <0x32 0x01>; + phandle = <0x121>; + }; + + cpu-opp-info@36 { + reg = <0x36 0x06>; + phandle = <0x09>; + }; + + gpu-opp-info@3c { + reg = <0x3c 0x06>; + phandle = <0x79>; + }; + + npu-opp-info@42 { + reg = <0x42 0x06>; + phandle = <0x73>; + }; + + dmc-opp-info@48 { + reg = <0x48 0x06>; + phandle = <0xbc>; + }; + + remark-spec-serial-number@56 { + reg = <0x56 0x01>; + bits = <0x00 0x05>; + phandle = <0x0b>; + }; + }; + + i2s@fe400000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe400000 0x00 0x1000>; + interrupts = <0x00 0x34 0x04>; + clocks = <0x23 0x3f 0x23 0x43 0x23 0x39>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x00>; + dma-names = "tx"; + resets = <0x23 0x50 0x23 0x51>; + reset-names = "tx-m\0rx-m"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + rockchip,playback-only; + #sound-dai-cells = <0x00>; + status = "okay"; + phandle = <0x146>; + }; + + i2s@fe410000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe410000 0x00 0x1000>; + interrupts = <0x00 0x35 0x04>; + clocks = <0x23 0x47 0x23 0x4b 0x23 0x3a>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x02 0xd5 0x03>; + dma-names = "tx\0rx"; + resets = <0x23 0x52 0x23 0x53>; + reset-names = "tx-m\0rx-m"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xd6 0xd7 0xd8 0xd9>; + status = "okay"; + rockchip,clk-trcm = <0x01>; + phandle = <0xe8>; + }; + + i2s@fe420000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe420000 0x00 0x1000>; + interrupts = <0x00 0x36 0x04>; + clocks = <0x23 0x4f 0x23 0x4f 0x23 0x3b>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x04 0xd5 0x05>; + dma-names = "tx\0rx"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + rockchip,clk-trcm = <0x01>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xda 0xdb 0xdc 0xdd>; + status = "disabled"; + }; + + i2s@fe430000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x00 0xfe430000 0x00 0x1000>; + interrupts = <0x00 0x37 0x04>; + clocks = <0x23 0x53 0x23 0x57 0x23 0x3c>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0xd5 0x06 0xd5 0x07>; + dma-names = "tx\0rx"; + resets = <0x23 0x55 0x23 0x56>; + reset-names = "tx-m\0rx-m"; + rockchip,cru = <0x23>; + rockchip,grf = <0x3b>; + rockchip,clk-trcm = <0x01>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xde 0xdf 0xe0 0xe1>; + status = "disabled"; + phandle = <0x144>; + }; + + pdm@fe440000 { + compatible = "rockchip,rk3568-pdm\0rockchip,pdm"; + reg = <0x00 0xfe440000 0x00 0x1000>; + clocks = <0x23 0x5a 0x23 0x59>; + clock-names = "pdm_clk\0pdm_hclk"; + dmas = <0xd5 0x09>; + dma-names = "rx"; + pinctrl-names = "default"; + pinctrl-0 = <0xe2 0xe3 0xe4 0xe5 0xe6 0xe7>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x149>; + }; + + vad@fe450000 { + compatible = "rockchip,rk3568-vad"; + reg = <0x00 0xfe450000 0x00 0x10000>; + reg-names = "vad"; + clocks = <0x23 0x5b>; + clock-names = "hclk"; + interrupts = <0x00 0x89 0x04>; + rockchip,audio-src = <0xe8>; + rockchip,det-channel = <0x00>; + rockchip,mode = <0x00>; + #sound-dai-cells = <0x00>; + status = "disabled"; + rockchip,buffer-time-ms = <0x80>; + phandle = <0x14e>; + }; + + spdif@fe460000 { + compatible = "rockchip,rk3568-spdif"; + reg = <0x00 0xfe460000 0x00 0x1000>; + interrupts = <0x00 0x66 0x04>; + dmas = <0xd5 0x01>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x23 0x5f 0x23 0x5c>; + #sound-dai-cells = <0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0xe9>; + status = "disabled"; + phandle = <0x14c>; + }; + + audpwm@fe470000 { + compatible = "rockchip,rk3568-audio-pwm\0rockchip,audio-pwm-v1"; + reg = <0x00 0xfe470000 0x00 0x1000>; + clocks = <0x23 0x63 0x23 0x60>; + clock-names = "clk\0hclk"; + dmas = <0xd5 0x08>; + dma-names = "tx"; + #sound-dai-cells = <0x00>; + rockchip,sample-width-bits = <0x0b>; + rockchip,interpolat-points = <0x01>; + status = "disabled"; + }; + + codec-digital@fe478000 { + compatible = "rockchip,rk3568-codec-digital\0rockchip,codec-digital-v1"; + reg = <0x00 0xfe478000 0x00 0x1000>; + clocks = <0x23 0x67 0x23 0x66 0x23 0x65 0x23 0x64>; + clock-names = "adc\0dac\0i2c\0pclk"; + pinctrl-names = "default"; + pinctrl-0 = <0xea>; + resets = <0x23 0x5f>; + reset-names = "reset"; + rockchip,grf = <0x3b>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x145>; + }; + + dmac@fe530000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfe530000 0x00 0x4000>; + interrupts = <0x00 0x0e 0x04 0x00 0x0d 0x04>; + clocks = <0x23 0x10d>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0x4e>; + }; + + dmac@fe550000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfe550000 0x00 0x4000>; + interrupts = <0x00 0x10 0x04 0x00 0x0f 0x04>; + clocks = <0x23 0x10d>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0xd5>; + }; + + rkscr@fe560000 { + compatible = "rockchip-scr"; + reg = <0x00 0xfe560000 0x00 0x10000>; + interrupts = <0x00 0x61 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xeb>; + clocks = <0x23 0x114>; + clock-names = "g_pclk_sim_card"; + status = "disabled"; + }; + + can@fe570000 { + compatible = "rockchip,rk3568-can-2.0"; + reg = <0x00 0xfe570000 0x00 0x1000>; + interrupts = <0x00 0x01 0x04>; + clocks = <0x23 0x141 0x23 0x140>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x23 0x155 0x23 0x154>; + reset-names = "can\0can-apb"; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "disabled"; + }; + + can@fe580000 { + compatible = "rockchip,rk3568-can-2.0"; + reg = <0x00 0xfe580000 0x00 0x1000>; + interrupts = <0x00 0x02 0x04>; + clocks = <0x23 0x143 0x23 0x142>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x23 0x157 0x23 0x156>; + reset-names = "can\0can-apb"; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "okay"; + assigned-clocks = <0x23 0x143>; + assigned-clock-rates = <0xbebc200>; + pinctrl-names = "default"; + pinctrl-0 = <0xec>; + }; + + can@fe590000 { + compatible = "rockchip,rk3568-can-2.0"; + reg = <0x00 0xfe590000 0x00 0x1000>; + interrupts = <0x00 0x03 0x04>; + clocks = <0x23 0x145 0x23 0x144>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x23 0x159 0x23 0x158>; + reset-names = "can\0can-apb"; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "disabled"; + assigned-clocks = <0x23 0x145>; + assigned-clock-rates = <0xbebc200>; + pinctrl-names = "default"; + pinctrl-0 = <0xed>; + }; + + i2c@fe5a0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5a0000 0x00 0x1000>; + clocks = <0x23 0x148 0x23 0x147>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x2f 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xee>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + clock-frequency = <0x186a0>; + + gpio@21 { + status = "disabled"; + compatible = "nxp,pca9555"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-group-num = <0xc8>; + phandle = <0x102>; + }; + + gt1x@14 { + status = "disabled"; + compatible = "goodix,gt1x"; + reg = <0x14>; + pinctrl-names = "default"; + pinctrl-0 = <0xef>; + goodix,rst-gpio = <0x3f 0x0e 0x00>; + goodix,irq-gpio = <0x3f 0x0d 0x08>; + }; + }; + + i2c@fe5b0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5b0000 0x00 0x1000>; + clocks = <0x23 0x14a 0x23 0x149>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x30 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xf0>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@fe5c0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5c0000 0x00 0x1000>; + clocks = <0x23 0x14c 0x23 0x14b>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x31 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xf1>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@fe5d0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5d0000 0x00 0x1000>; + clocks = <0x23 0x14e 0x23 0x14d>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x32 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xf2>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + clock-frequency = <0x61a80>; + + gc8034@37 { + compatible = "galaxycore,gc8034"; + status = "disabled"; + reg = <0x37>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x4a 0x0e 0x01>; + pwdn-gpios = <0xf4 0x0c 0x01>; + rockchip,grf = <0x3b>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "RK-CMK-8M-2-v1"; + rockchip,camera-module-lens-name = "CK8401"; + + port { + + endpoint { + remote-endpoint = <0xf5>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x130>; + }; + }; + }; + + os04a10@36 { + status = "disabled"; + compatible = "ovti,os04a10"; + reg = <0x36>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x4a 0x0e 0x01>; + pwdn-gpios = <0xf4 0x0c 0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "CMK-OT1607-FV1"; + rockchip,camera-module-lens-name = "M12-40IRC-4MP-F16"; + + port { + + endpoint { + remote-endpoint = <0xf6>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x12f>; + }; + }; + }; + + ov5695@36 { + status = "disabled"; + compatible = "ovti,ov5695"; + reg = <0x36>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x4a 0x0e 0x00>; + pwdn-gpios = <0xf4 0x0c 0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "TongJu"; + rockchip,camera-module-lens-name = "CHT842-MD"; + + port { + + endpoint { + remote-endpoint = <0xf7>; + data-lanes = <0x01 0x02>; + phandle = <0x131>; + }; + }; + }; + + XC7160b@1b { + status = "okay"; + compatible = "firefly,xc7160"; + reg = <0x1b>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x3f 0x1d 0x00>; + pwdn-gpios = <0xf4 0x0c 0x00>; + firefly,clkout-enabled-index = <0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "NC"; + rockchip,camera-module-lens-name = "NC"; + + port { + + endpoint { + remote-endpoint = <0xf8>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x132>; + }; + }; + }; + + imx415@37 { + status = "okay"; + compatible = "sony,imx415"; + reg = <0x37>; + clocks = <0x23 0xd6>; + clock-names = "xvclk"; + power-domains = <0x25 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0xf3>; + reset-gpios = <0x3f 0x1d 0x01>; + pwdn-gpios = <0xf4 0x0c 0x00>; + firefly,clkout-enabled-index = <0x00>; + rockchip,camera-module-index = <0x00>; + rockchip,camera-module-facing = "back"; + rockchip,camera-module-name = "CMK-OT2022-PX1"; + rockchip,camera-module-lens-name = "IR0147-50IRC-8M-F20"; + + port { + + endpoint { + remote-endpoint = <0xf9>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0x133>; + }; + }; + }; + }; + + i2c@fe5e0000 { + compatible = "rockchip,rk3399-i2c"; + reg = <0x00 0xfe5e0000 0x00 0x1000>; + clocks = <0x23 0x150 0x23 0x14f>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x33 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0xfa>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + hym8563@51 { + status = "okay"; + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0x00>; + rtc-irq-gpio = <0x3f 0x1b 0x02>; + clock-frequency = <0x8000>; + }; + + mc3230sensor@4c { + compatible = "gs_mc3230"; + reg = <0x4c>; + type = <0x02>; + irq_enable = <0x00>; + poll_delay_ms = <0x1e>; + layout = <0x04>; + status = "okay"; + }; + + mxc6655xa@15 { + status = "disabled"; + compatible = "gs_mxc6655xa"; + pinctrl-names = "default"; + pinctrl-0 = <0xfb>; + reg = <0x15>; + irq-gpio = <0x4a 0x11 0x08>; + irq_enable = <0x00>; + poll_delay_ms = <0x1e>; + type = <0x02>; + power-off-in-suspend = <0x01>; + layout = <0x01>; + }; + }; + + timer@fe5f0000 { + compatible = "rockchip,rk3568-timer\0rockchip,rk3288-timer"; + reg = <0x00 0xfe5f0000 0x00 0x1000>; + interrupts = <0x00 0x6d 0x04>; + clocks = <0x23 0x16c 0x23 0x16d>; + clock-names = "pclk\0timer"; + }; + + watchdog@fe600000 { + compatible = "snps,dw-wdt"; + reg = <0x00 0xfe600000 0x00 0x100>; + clocks = <0x23 0x116 0x23 0x115>; + clock-names = "tclk\0pclk"; + interrupts = <0x00 0x95 0x04>; + status = "okay"; + }; + + spi@fe610000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe610000 0x00 0x1000>; + interrupts = <0x00 0x67 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x152 0x23 0x151>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x14 0x4e 0x15>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0xfc 0xfd 0xfe>; + pinctrl-1 = <0xfc 0xfd 0xff>; + num-cs = <0x02>; + status = "disabled"; + }; + + spi@fe620000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe620000 0x00 0x1000>; + interrupts = <0x00 0x68 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x154 0x23 0x153>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x16 0x4e 0x17>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0x100>; + pinctrl-1 = <0x101>; + num-cs = <0x02>; + status = "disabled"; + max-freq = <0x2dc6c00>; + dev-port = <0x00>; + + spi_wk2xxx@0 { + status = "disabled"; + compatible = "firefly,spi-wk2xxx"; + reg = <0x00>; + spi-max-frequency = <0x989680>; + power-gpio = <0x102 0x0f 0x00>; + reset-gpio = <0x102 0x09 0x00>; + irq-gpio = <0x3f 0x06 0x02>; + cs-gpio = <0x4a 0x01 0x00>; + }; + }; + + spi@fe630000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe630000 0x00 0x1000>; + interrupts = <0x00 0x69 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x156 0x23 0x155>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x18 0x4e 0x19>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0x103 0x104 0x105>; + pinctrl-1 = <0x103 0x104 0x106>; + num-cs = <0x02>; + status = "disabled"; + }; + + spi@fe640000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfe640000 0x00 0x1000>; + interrupts = <0x00 0x6a 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x23 0x158 0x23 0x157>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x4e 0x1a 0x4e 0x1b>; + dma-names = "tx\0rx"; + pinctrl-names = "default\0high_speed"; + pinctrl-0 = <0x107 0x108 0x109>; + pinctrl-1 = <0x107 0x108 0x10a>; + num-cs = <0x02>; + status = "disabled"; + }; + + serial@fe650000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe650000 0x00 0x100>; + interrupts = <0x00 0x75 0x04>; + clocks = <0x23 0x11f 0x23 0x11c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x02 0x4e 0x03>; + pinctrl-names = "default"; + pinctrl-0 = <0x10b>; + status = "disabled"; + }; + + serial@fe660000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe660000 0x00 0x100>; + interrupts = <0x00 0x76 0x04>; + clocks = <0x23 0x123 0x23 0x120>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x04 0x4e 0x05>; + pinctrl-names = "default"; + pinctrl-0 = <0x10c>; + status = "disabled"; + }; + + serial@fe670000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe670000 0x00 0x100>; + interrupts = <0x00 0x77 0x04>; + clocks = <0x23 0x127 0x23 0x124>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x06 0x4e 0x07>; + pinctrl-names = "default"; + pinctrl-0 = <0x10d>; + status = "okay"; + }; + + serial@fe680000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe680000 0x00 0x100>; + interrupts = <0x00 0x78 0x04>; + clocks = <0x23 0x12b 0x23 0x128>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x08 0x4e 0x09>; + pinctrl-names = "default"; + pinctrl-0 = <0x10e>; + status = "okay"; + }; + + serial@fe690000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe690000 0x00 0x100>; + interrupts = <0x00 0x79 0x04>; + clocks = <0x23 0x12f 0x23 0x12c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x0a 0x4e 0x0b>; + pinctrl-names = "default"; + pinctrl-0 = <0x10f>; + status = "disabled"; + }; + + serial@fe6a0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6a0000 0x00 0x100>; + interrupts = <0x00 0x7a 0x04>; + clocks = <0x23 0x133 0x23 0x130>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x0c 0x4e 0x0d>; + pinctrl-names = "default"; + pinctrl-0 = <0x110>; + status = "disabled"; + }; + + serial@fe6b0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6b0000 0x00 0x100>; + interrupts = <0x00 0x7b 0x04>; + clocks = <0x23 0x137 0x23 0x134>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x0e 0x4e 0x0f>; + pinctrl-names = "default"; + pinctrl-0 = <0x111>; + status = "okay"; + }; + + serial@fe6c0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6c0000 0x00 0x100>; + interrupts = <0x00 0x7c 0x04>; + clocks = <0x23 0x13b 0x23 0x138>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x10 0x4e 0x11>; + pinctrl-names = "default"; + pinctrl-0 = <0x112 0x113>; + status = "okay"; + }; + + serial@fe6d0000 { + compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfe6d0000 0x00 0x100>; + interrupts = <0x00 0x7d 0x04>; + clocks = <0x23 0x13f 0x23 0x13c>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x4e 0x12 0x4e 0x13>; + pinctrl-names = "default"; + pinctrl-0 = <0x114>; + status = "okay"; + }; + + pwm@fe6e0000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6e0000 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x115>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "okay"; + }; + + pwm@fe6e0010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6e0010 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x116>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "okay"; + }; + + pwm@fe6e0020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6e0020 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x117>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6e0030 { + compatible = "rockchip,remotectl-pwm"; + reg = <0x00 0xfe6e0030 0x00 0x10>; + interrupts = <0x00 0x53 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "default"; + pinctrl-0 = <0x118>; + clocks = <0x23 0x15a 0x23 0x159>; + clock-names = "pwm\0pclk"; + status = "okay"; + remote_pwm_id = <0x03>; + handle_cpu_id = <0x01>; + remote_support_psci = <0x00>; + + ir_key_firefly { + rockchip,usercode = <0xff00>; + rockchip,key_table = <0xeb 0x74 0xec 0x8b 0xfe 0x9e 0xb7 0x66 0xa3 0x96 0xf4 0x73 0xa7 0x72 0xf8 0xe8 0xfc 0x67 0xfd 0x6c 0xf1 0x69 0xe5 0x6a>; + }; + }; + + pwm@fe6f0000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0000 0x00 0x10>; + interrupts = <0x00 0x54 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x119>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6f0010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0010 0x00 0x10>; + interrupts = <0x00 0x54 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11a>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6f0020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0020 0x00 0x10>; + interrupts = <0x00 0x54 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11b>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe6f0030 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe6f0030 0x00 0x10>; + interrupts = <0x00 0x54 0x04 0x00 0x58 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11c>; + clocks = <0x23 0x15d 0x23 0x15c>; + clock-names = "pwm\0pclk"; + status = "disabled"; + phandle = <0x157>; + }; + + pwm@fe700000 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700000 0x00 0x10>; + interrupts = <0x00 0x55 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11d>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe700010 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700010 0x00 0x10>; + interrupts = <0x00 0x55 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11e>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe700020 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700020 0x00 0x10>; + interrupts = <0x00 0x55 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x11f>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fe700030 { + compatible = "rockchip,rk3568-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfe700030 0x00 0x10>; + interrupts = <0x00 0x55 0x04 0x00 0x59 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x120>; + clocks = <0x23 0x160 0x23 0x15f>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + tsadc@fe710000 { + compatible = "rockchip,rk3568-tsadc"; + reg = <0x00 0xfe710000 0x00 0x100>; + interrupts = <0x00 0x73 0x04>; + rockchip,grf = <0x3b>; + clocks = <0x23 0x111 0x23 0x10f>; + clock-names = "tsadc\0apb_pclk"; + assigned-clocks = <0x23 0x110 0x23 0x111>; + assigned-clock-rates = <0x1036640 0xaae60>; + resets = <0x23 0x182 0x23 0x181 0x23 0x1d7>; + reset-names = "tsadc\0tsadc-apb\0tsadc-phy"; + #thermal-sensor-cells = <0x01>; + nvmem-cells = <0x121 0x122>; + nvmem-cell-names = "trim_base\0trim_base_frac"; + rockchip,hw-tshut-temp = <0x1d4c0>; + rockchip,hw-tshut-mode = <0x00>; + rockchip,hw-tshut-polarity = <0x00>; + pinctrl-names = "gpio\0otpout"; + pinctrl-0 = <0x123>; + pinctrl-1 = <0x124>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x1f>; + + tsadc@0 { + reg = <0x00>; + nvmem-cells = <0x125 0x126>; + nvmem-cell-names = "trim_l\0trim_h"; + }; + + tsadc@1 { + reg = <0x01>; + nvmem-cells = <0x127 0x128>; + nvmem-cell-names = "trim_l\0trim_h"; + }; + }; + + saradc@fe720000 { + compatible = "rockchip,rk3568-saradc\0rockchip,rk3399-saradc"; + reg = <0x00 0xfe720000 0x00 0x100>; + interrupts = <0x00 0x5d 0x04>; + #io-channel-cells = <0x01>; + clocks = <0x23 0x113 0x23 0x112>; + clock-names = "saradc\0apb_pclk"; + resets = <0x23 0x180>; + reset-names = "saradc-apb"; + status = "okay"; + vref-supply = <0x129>; + phandle = <0x49>; + }; + + mailbox@fe780000 { + compatible = "rockchip,rk3568-mailbox\0rockchip,rk3368-mailbox"; + reg = <0x00 0xfe780000 0x00 0x1000>; + interrupts = <0x00 0xb7 0x04 0x00 0xb8 0x04 0x00 0xb9 0x04 0x00 0xba 0x04>; + clocks = <0x23 0x11b>; + clock-names = "pclk_mailbox"; + #mbox-cells = <0x01>; + status = "disabled"; + }; + + phy@fe820000 { + compatible = "rockchip,rk3568-naneng-combphy"; + reg = <0x00 0xfe820000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x3a 0x1f 0x23 0x17c 0x23 0x7f>; + clock-names = "refclk\0apbclk\0pipe_clk"; + assigned-clocks = <0x3a 0x1f>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x23 0x1c4 0x23 0x1c5>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x12a>; + rockchip,pipe-phy-grf = <0x12b>; + status = "okay"; + phandle = <0x24>; + }; + + phy@fe830000 { + compatible = "rockchip,rk3568-naneng-combphy"; + reg = <0x00 0xfe830000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x3a 0x22 0x23 0x17d 0x23 0x7f>; + clock-names = "refclk\0apbclk\0pipe_clk"; + assigned-clocks = <0x3a 0x22>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x23 0x1c6 0x23 0x1c7>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x12a>; + rockchip,pipe-phy-grf = <0x12c>; + status = "okay"; + phandle = <0x26>; + }; + + phy@fe840000 { + compatible = "rockchip,rk3568-naneng-combphy"; + reg = <0x00 0xfe840000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x3a 0x25 0x23 0x17e 0x23 0x7f>; + clock-names = "refclk\0apbclk\0pipe_clk"; + assigned-clocks = <0x3a 0x25>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x23 0x1c8 0x23 0x1c9>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x12a>; + rockchip,pipe-phy-grf = <0x12d>; + status = "okay"; + phandle = <0x27>; + }; + + phy@fe850000 { + compatible = "rockchip,rk3568-dsi-dphy\0rockchip,rk3568-video-phy"; + reg = <0x00 0xfe850000 0x00 0x10000 0x00 0xfe060000 0x00 0x10000>; + reg-names = "phy\0host"; + clocks = <0x3a 0x17 0x23 0x17a 0x23 0xe8>; + clock-names = "ref\0pclk\0pclk_host"; + #clock-cells = <0x00>; + resets = <0x23 0x1bb>; + reset-names = "apb"; + power-domains = <0x25 0x09>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x34>; + }; + + phy@fe860000 { + compatible = "rockchip,rk3568-dsi-dphy\0rockchip,rk3568-video-phy"; + reg = <0x00 0xfe860000 0x00 0x10000 0x00 0xfe070000 0x00 0x10000>; + reg-names = "phy\0host"; + clocks = <0x3a 0x19 0x23 0x17b 0x23 0xe9>; + clock-names = "ref\0pclk\0pclk_host"; + #clock-cells = <0x00>; + resets = <0x23 0x1bc>; + reset-names = "apb"; + power-domains = <0x25 0x09>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x36>; + }; + + csi2-dphy-hw@fe870000 { + compatible = "rockchip,rk3568-csi2-dphy-hw"; + reg = <0x00 0xfe870000 0x00 0x1000>; + clocks = <0x23 0x179>; + clock-names = "pclk"; + rockchip,grf = <0x3b>; + status = "okay"; + phandle = <0x12e>; + }; + + csi2-dphy0 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x12e>; + status = "okay"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x12f>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf6>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x130>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf5>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0x131>; + data-lanes = <0x01 0x02>; + phandle = <0xf7>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0x132>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf8>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0x133>; + data-lanes = <0x01 0x02 0x03 0x04>; + phandle = <0xf9>; + }; + }; + + port@1 { + reg = <0x01>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x134>; + phandle = <0x8c>; + }; + }; + }; + }; + + csi2-dphy1 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x12e>; + status = "disabled"; + }; + + csi2-dphy2 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x12e>; + status = "disabled"; + }; + + usb2-phy@fe8a0000 { + compatible = "rockchip,rk3568-usb2phy"; + reg = <0x00 0xfe8a0000 0x00 0x10000>; + interrupts = <0x00 0x87 0x04>; + clocks = <0x3a 0x13>; + clock-names = "phyclk"; + #clock-cells = <0x00>; + assigned-clocks = <0x23 0x0b>; + assigned-clock-parents = <0x29>; + clock-output-names = "usb480m_phy"; + rockchip,usbgrf = <0x135>; + status = "okay"; + phandle = <0x29>; + + host-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x136>; + phandle = <0x2b>; + }; + + otg-port { + #phy-cells = <0x00>; + status = "okay"; + phandle = <0x28>; + }; + }; + + usb2-phy@fe8b0000 { + compatible = "rockchip,rk3568-usb2phy"; + reg = <0x00 0xfe8b0000 0x00 0x10000>; + interrupts = <0x00 0x88 0x04>; + clocks = <0x3a 0x15>; + clock-names = "phyclk"; + #clock-cells = <0x00>; + rockchip,usbgrf = <0x137>; + status = "okay"; + phandle = <0x2c>; + + host-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x136>; + phandle = <0x2e>; + }; + + otg-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x136>; + phandle = <0x2d>; + }; + }; + + phy@fe8c0000 { + compatible = "rockchip,rk3568-pcie3-phy"; + reg = <0x00 0xfe8c0000 0x00 0x20000>; + #phy-cells = <0x00>; + clocks = <0x3a 0x26 0x3a 0x27 0x23 0x177>; + clock-names = "refclk_m\0refclk_n\0pclk"; + resets = <0x23 0x1be>; + reset-names = "phy"; + rockchip,phy-grf = <0x138>; + status = "okay"; + phandle = <0xc0>; + }; + + pinctrl { + compatible = "rockchip,rk3568-pinctrl"; + rockchip,grf = <0x3b>; + rockchip,pmu = <0x3c>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + gpio0@fdd60000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfdd60000 0x00 0x100>; + interrupts = <0x00 0x21 0x04>; + clocks = <0x3a 0x2e 0x3a 0x0c>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x3f>; + }; + + gpio1@fe740000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe740000 0x00 0x100>; + interrupts = <0x00 0x22 0x04>; + clocks = <0x23 0x163 0x23 0x164>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x159>; + }; + + gpio2@fe750000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe750000 0x00 0x100>; + interrupts = <0x00 0x23 0x04>; + clocks = <0x23 0x165 0x23 0x166>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x91>; + }; + + gpio3@fe760000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe760000 0x00 0x100>; + interrupts = <0x00 0x24 0x04>; + clocks = <0x23 0x167 0x23 0x168>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x4a>; + }; + + gpio4@fe770000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfe770000 0x00 0x100>; + interrupts = <0x00 0x25 0x04>; + clocks = <0x23 0x169 0x23 0x16a>; + gpio-controller; + #gpio-cells = <0x02>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0xf4>; + }; + + pcfg-pull-up { + bias-pull-up; + phandle = <0x13b>; + }; + + pcfg-pull-down { + bias-pull-down; + phandle = <0x142>; + }; + + pcfg-pull-none { + bias-disable; + phandle = <0x139>; + }; + + pcfg-pull-none-drv-level-1 { + bias-disable; + drive-strength = <0x01>; + phandle = <0x13d>; + }; + + pcfg-pull-none-drv-level-2 { + bias-disable; + drive-strength = <0x02>; + phandle = <0x13c>; + }; + + pcfg-pull-none-drv-level-3 { + bias-disable; + drive-strength = <0x03>; + phandle = <0x141>; + }; + + pcfg-pull-up-drv-level-1 { + bias-pull-up; + drive-strength = <0x01>; + phandle = <0x140>; + }; + + pcfg-pull-up-drv-level-2 { + bias-pull-up; + drive-strength = <0x02>; + phandle = <0x13a>; + }; + + pcfg-pull-none-smt { + bias-disable; + input-schmitt-enable; + phandle = <0x13e>; + }; + + pcfg-output-low-pull-down { + output-low; + bias-pull-down; + phandle = <0x13f>; + }; + + acodec { + + acodec-pins { + rockchip,pins = <0x01 0x09 0x05 0x139 0x01 0x01 0x05 0x139 0x01 0x00 0x05 0x139 0x01 0x07 0x05 0x139 0x01 0x08 0x05 0x139 0x01 0x03 0x05 0x139 0x01 0x05 0x05 0x139>; + phandle = <0xea>; + }; + }; + + cam { + + vcc-cam { + rockchip,pins = <0x00 0x11 0x00 0x139>; + phandle = <0x158>; + }; + }; + + can1 { + + can1m1-pins { + rockchip,pins = <0x04 0x12 0x03 0x139 0x04 0x13 0x03 0x139>; + phandle = <0xec>; + }; + }; + + can2 { + + can2m0-pins { + rockchip,pins = <0x04 0x0c 0x03 0x139 0x04 0x0d 0x03 0x139>; + phandle = <0xed>; + }; + }; + + cif { + + cif-clk { + rockchip,pins = <0x04 0x10 0x01 0x139>; + phandle = <0xf3>; + }; + }; + + clk32k { + + clk32k-out0 { + rockchip,pins = <0x00 0x08 0x02 0x139>; + phandle = <0x22>; + }; + }; + + ebc { + + ebc-pins { + rockchip,pins = <0x04 0x10 0x02 0x139 0x04 0x0b 0x02 0x139 0x04 0x0c 0x02 0x139 0x04 0x06 0x02 0x139 0x04 0x11 0x02 0x139 0x03 0x16 0x02 0x139 0x03 0x17 0x02 0x139 0x03 0x18 0x02 0x139 0x03 0x19 0x02 0x139 0x03 0x1a 0x02 0x139 0x03 0x1b 0x02 0x139 0x03 0x1c 0x02 0x139 0x03 0x1d 0x02 0x139 0x03 0x1e 0x02 0x139 0x03 0x1f 0x02 0x139 0x04 0x00 0x02 0x139 0x04 0x01 0x02 0x139 0x04 0x02 0x02 0x139 0x04 0x03 0x02 0x139 0x04 0x04 0x02 0x139 0x04 0x05 0x02 0x139 0x04 0x0e 0x02 0x139 0x04 0x0f 0x02 0x139>; + phandle = <0x7c>; + }; + }; + + fspi { + + fspi-pins { + rockchip,pins = <0x01 0x18 0x01 0x139 0x01 0x1b 0x01 0x139 0x01 0x19 0x01 0x139 0x01 0x1a 0x01 0x139 0x01 0x17 0x02 0x139 0x01 0x1c 0x01 0x139>; + phandle = <0xd4>; + }; + }; + + gmac0 { + + gmac0-miim { + rockchip,pins = <0x02 0x13 0x02 0x139 0x02 0x14 0x02 0x139>; + phandle = <0xc8>; + }; + + gmac0-clkinout { + rockchip,pins = <0x02 0x12 0x02 0x139>; + phandle = <0xcd>; + }; + + gmac0-rx-bus2 { + rockchip,pins = <0x02 0x0e 0x01 0x139 0x02 0x0f 0x02 0x139 0x02 0x10 0x02 0x139>; + phandle = <0xca>; + }; + + gmac0-tx-bus2 { + rockchip,pins = <0x02 0x0b 0x01 0x13c 0x02 0x0c 0x01 0x13c 0x02 0x0d 0x01 0x139>; + phandle = <0xc9>; + }; + + gmac0-rgmii-clk { + rockchip,pins = <0x02 0x05 0x02 0x139 0x02 0x08 0x02 0x13d>; + phandle = <0xcb>; + }; + + gmac0-rgmii-bus { + rockchip,pins = <0x02 0x03 0x02 0x139 0x02 0x04 0x02 0x139 0x02 0x06 0x02 0x13c 0x02 0x07 0x02 0x13c>; + phandle = <0xcc>; + }; + }; + + gmac1 { + + gmac1m1-miim { + rockchip,pins = <0x04 0x0e 0x03 0x139 0x04 0x0f 0x03 0x139>; + phandle = <0x93>; + }; + + gmac1m1-clkinout { + rockchip,pins = <0x04 0x11 0x03 0x139>; + phandle = <0x98>; + }; + + gmac1m1-rx-bus2 { + rockchip,pins = <0x04 0x07 0x03 0x139 0x04 0x08 0x03 0x139 0x04 0x09 0x03 0x139>; + phandle = <0x95>; + }; + + gmac1m1-tx-bus2 { + rockchip,pins = <0x04 0x04 0x03 0x13c 0x04 0x05 0x03 0x13c 0x04 0x06 0x03 0x139>; + phandle = <0x94>; + }; + + gmac1m1-rgmii-clk { + rockchip,pins = <0x04 0x03 0x03 0x139 0x04 0x00 0x03 0x13d>; + phandle = <0x96>; + }; + + gmac1m1-rgmii-bus { + rockchip,pins = <0x04 0x01 0x03 0x139 0x04 0x02 0x03 0x139 0x03 0x1e 0x03 0x13c 0x03 0x1f 0x03 0x13c>; + phandle = <0x97>; + }; + }; + + hdmitx { + + hdmitxm0-cec { + rockchip,pins = <0x04 0x19 0x01 0x139>; + phandle = <0xac>; + }; + + hdmitx-scl { + rockchip,pins = <0x04 0x17 0x01 0x139>; + phandle = <0xaa>; + }; + + hdmitx-sda { + rockchip,pins = <0x04 0x18 0x01 0x139>; + phandle = <0xab>; + }; + }; + + i2c0 { + + i2c0-xfer { + rockchip,pins = <0x00 0x09 0x01 0x13e 0x00 0x0a 0x01 0x13e>; + phandle = <0x3d>; + }; + }; + + i2c1 { + + i2c1-xfer { + rockchip,pins = <0x00 0x0b 0x01 0x13e 0x00 0x0c 0x01 0x13e>; + phandle = <0xee>; + }; + }; + + i2c2 { + + i2c2m0-xfer { + rockchip,pins = <0x00 0x0d 0x01 0x13e 0x00 0x0e 0x01 0x13e>; + phandle = <0xf0>; + }; + }; + + i2c3 { + + i2c3m0-xfer { + rockchip,pins = <0x01 0x01 0x01 0x13e 0x01 0x00 0x01 0x13e>; + phandle = <0xf1>; + }; + }; + + i2c4 { + + i2c4m0-xfer { + rockchip,pins = <0x04 0x0b 0x01 0x13e 0x04 0x0a 0x01 0x13e>; + phandle = <0xf2>; + }; + }; + + i2c5 { + + i2c5m0-xfer { + rockchip,pins = <0x03 0x0b 0x04 0x13e 0x03 0x0c 0x04 0x13e>; + phandle = <0xfa>; + }; + }; + + i2s1 { + + i2s1m0-lrcktx { + rockchip,pins = <0x01 0x05 0x01 0x13e>; + phandle = <0xd7>; + }; + + i2s1m0-mclk { + rockchip,pins = <0x01 0x02 0x01 0x13e>; + phandle = <0x47>; + }; + + i2s1m0-sclktx { + rockchip,pins = <0x01 0x03 0x01 0x13e>; + phandle = <0xd6>; + }; + + i2s1m0-sdi0 { + rockchip,pins = <0x01 0x0b 0x01 0x139>; + phandle = <0xd8>; + }; + + i2s1m0-sdo0 { + rockchip,pins = <0x01 0x07 0x01 0x139>; + phandle = <0xd9>; + }; + }; + + i2s2 { + + i2s2m0-lrcktx { + rockchip,pins = <0x02 0x13 0x01 0x13e>; + phandle = <0xdb>; + }; + + i2s2m0-sclktx { + rockchip,pins = <0x02 0x12 0x01 0x13e>; + phandle = <0xda>; + }; + + i2s2m0-sdi { + rockchip,pins = <0x02 0x15 0x01 0x139>; + phandle = <0xdc>; + }; + + i2s2m0-sdo { + rockchip,pins = <0x02 0x14 0x01 0x139>; + phandle = <0xdd>; + }; + }; + + i2s3 { + + i2s3m0-lrck { + rockchip,pins = <0x03 0x04 0x04 0x13e>; + phandle = <0xdf>; + }; + + i2s3m0-sclk { + rockchip,pins = <0x03 0x03 0x04 0x13e>; + phandle = <0xde>; + }; + + i2s3m0-sdi { + rockchip,pins = <0x03 0x06 0x04 0x139>; + phandle = <0xe0>; + }; + + i2s3m0-sdo { + rockchip,pins = <0x03 0x05 0x04 0x139>; + phandle = <0xe1>; + }; + }; + + lcdc { + + lcdc-ctl { + rockchip,pins = <0x03 0x00 0x01 0x139 0x02 0x18 0x01 0x139 0x02 0x19 0x01 0x139 0x02 0x1a 0x01 0x139 0x02 0x1b 0x01 0x139 0x02 0x1c 0x01 0x139 0x02 0x1d 0x01 0x139 0x02 0x1e 0x01 0x139 0x02 0x1f 0x01 0x139 0x03 0x01 0x01 0x139 0x03 0x02 0x01 0x139 0x03 0x03 0x01 0x139 0x03 0x04 0x01 0x139 0x03 0x05 0x01 0x139 0x03 0x06 0x01 0x139 0x03 0x07 0x01 0x139 0x03 0x08 0x01 0x139 0x03 0x09 0x01 0x139 0x03 0x0a 0x01 0x139 0x03 0x0b 0x01 0x139 0x03 0x0c 0x01 0x139 0x03 0x0d 0x01 0x139 0x03 0x0e 0x01 0x139 0x03 0x0f 0x01 0x139 0x03 0x10 0x01 0x139 0x03 0x13 0x01 0x139 0x03 0x11 0x01 0x139 0x03 0x12 0x01 0x139>; + phandle = <0x39>; + }; + }; + + pdm { + + pdmm0-clk { + rockchip,pins = <0x01 0x06 0x03 0x139>; + phandle = <0xe2>; + }; + + pdmm0-clk1 { + rockchip,pins = <0x01 0x04 0x03 0x139>; + phandle = <0xe3>; + }; + + pdmm0-sdi0 { + rockchip,pins = <0x01 0x0b 0x02 0x139>; + phandle = <0xe4>; + }; + + pdmm0-sdi1 { + rockchip,pins = <0x01 0x0a 0x03 0x139>; + phandle = <0xe5>; + }; + + pdmm0-sdi2 { + rockchip,pins = <0x01 0x09 0x03 0x139>; + phandle = <0xe6>; + }; + + pdmm0-sdi3 { + rockchip,pins = <0x01 0x08 0x03 0x139>; + phandle = <0xe7>; + }; + }; + + pmic { + + pmic_int { + rockchip,pins = <0x00 0x03 0x00 0x13b>; + phandle = <0x40>; + }; + + soc_slppin_gpio { + rockchip,pins = <0x00 0x02 0x00 0x13f>; + phandle = <0x43>; + }; + + soc_slppin_slp { + rockchip,pins = <0x00 0x02 0x01 0x13b>; + phandle = <0x41>; + }; + + soc_slppin_rst { + rockchip,pins = <0x00 0x02 0x02 0x139>; + }; + + spk_ctl_gpio { + rockchip,pins = <0x03 0x15 0x00 0x13b>; + phandle = <0x48>; + }; + }; + + pwm0 { + + pwm0m0-pins { + rockchip,pins = <0x00 0x0f 0x01 0x139>; + phandle = <0x50>; + }; + }; + + pwm1 { + + pwm1m0-pins { + rockchip,pins = <0x00 0x10 0x01 0x139>; + phandle = <0x51>; + }; + }; + + pwm2 { + + pwm2m0-pins { + rockchip,pins = <0x00 0x11 0x01 0x139>; + phandle = <0x52>; + }; + }; + + pwm3 { + + pwm3-pins { + rockchip,pins = <0x00 0x12 0x01 0x139>; + phandle = <0x53>; + }; + }; + + pwm4 { + + pwm4-pins { + rockchip,pins = <0x00 0x13 0x01 0x139>; + phandle = <0x115>; + }; + }; + + pwm5 { + + pwm5-pins { + rockchip,pins = <0x00 0x14 0x01 0x139>; + phandle = <0x116>; + }; + }; + + pwm6 { + + pwm6-pins { + rockchip,pins = <0x00 0x15 0x01 0x139>; + phandle = <0x117>; + }; + }; + + pwm7 { + + pwm7-pins { + rockchip,pins = <0x00 0x16 0x01 0x139>; + phandle = <0x118>; + }; + }; + + pwm8 { + + pwm8m0-pins { + rockchip,pins = <0x03 0x09 0x05 0x139>; + phandle = <0x119>; + }; + }; + + pwm9 { + + pwm9m0-pins { + rockchip,pins = <0x03 0x0a 0x05 0x139>; + phandle = <0x11a>; + }; + }; + + pwm10 { + + pwm10m0-pins { + rockchip,pins = <0x03 0x0d 0x05 0x139>; + phandle = <0x11b>; + }; + }; + + pwm11 { + + pwm11m0-pins { + rockchip,pins = <0x03 0x0e 0x05 0x139>; + phandle = <0x11c>; + }; + }; + + pwm12 { + + pwm12m0-pins { + rockchip,pins = <0x03 0x0f 0x02 0x139>; + phandle = <0x11d>; + }; + }; + + pwm13 { + + pwm13m0-pins { + rockchip,pins = <0x03 0x10 0x02 0x139>; + phandle = <0x11e>; + }; + }; + + pwm14 { + + pwm14m0-pins { + rockchip,pins = <0x03 0x14 0x01 0x139>; + phandle = <0x11f>; + }; + }; + + pwm15 { + + pwm15m0-pins { + rockchip,pins = <0x03 0x15 0x01 0x139>; + phandle = <0x120>; + }; + }; + + scr { + + scr-pins { + rockchip,pins = <0x01 0x02 0x03 0x139 0x01 0x07 0x03 0x13b 0x01 0x03 0x03 0x13b 0x01 0x05 0x03 0x139>; + phandle = <0xeb>; + }; + }; + + sdmmc0 { + + sdmmc0-bus4 { + rockchip,pins = <0x01 0x1d 0x01 0x13a 0x01 0x1e 0x01 0x13a 0x01 0x1f 0x01 0x13a 0x02 0x00 0x01 0x13a>; + phandle = <0xd0>; + }; + + sdmmc0-clk { + rockchip,pins = <0x02 0x02 0x01 0x13a>; + phandle = <0xd1>; + }; + + sdmmc0-cmd { + rockchip,pins = <0x02 0x01 0x01 0x13a>; + phandle = <0xd2>; + }; + + sdmmc0-det { + rockchip,pins = <0x00 0x04 0x01 0x13b>; + phandle = <0xd3>; + }; + }; + + sdmmc2 { + + sdmmc2m0-bus4 { + rockchip,pins = <0x03 0x16 0x03 0x13a 0x03 0x17 0x03 0x13a 0x03 0x18 0x03 0x13a 0x03 0x19 0x03 0x13a>; + phandle = <0xb0>; + }; + + sdmmc2m0-clk { + rockchip,pins = <0x03 0x1b 0x03 0x13a>; + phandle = <0xb2>; + }; + + sdmmc2m0-cmd { + rockchip,pins = <0x03 0x1a 0x03 0x13a>; + phandle = <0xb1>; + }; + }; + + spdif { + + spdifm1-tx { + rockchip,pins = <0x03 0x15 0x02 0x139>; + phandle = <0xe9>; + }; + }; + + spi0 { + + spi0m0-pins { + rockchip,pins = <0x00 0x0d 0x02 0x139 0x00 0x15 0x02 0x139 0x00 0x0e 0x02 0x139>; + phandle = <0xfe>; + }; + + spi0m0-cs0 { + rockchip,pins = <0x00 0x16 0x02 0x139>; + phandle = <0xfc>; + }; + + spi0m0-cs1 { + rockchip,pins = <0x00 0x14 0x02 0x139>; + phandle = <0xfd>; + }; + }; + + spi1 { + + spi1m1-pins { + rockchip,pins = <0x03 0x13 0x03 0x139 0x03 0x12 0x03 0x139 0x03 0x11 0x03 0x139>; + phandle = <0x100>; + }; + }; + + spi2 { + + spi2m0-pins { + rockchip,pins = <0x02 0x11 0x04 0x139 0x02 0x12 0x04 0x139 0x02 0x13 0x04 0x139>; + phandle = <0x105>; + }; + + spi2m0-cs0 { + rockchip,pins = <0x02 0x14 0x04 0x139>; + phandle = <0x103>; + }; + + spi2m0-cs1 { + rockchip,pins = <0x02 0x15 0x04 0x139>; + phandle = <0x104>; + }; + }; + + spi3 { + + spi3m0-pins { + rockchip,pins = <0x04 0x0b 0x04 0x139 0x04 0x08 0x04 0x139 0x04 0x0a 0x04 0x139>; + phandle = <0x109>; + }; + + spi3m0-cs0 { + rockchip,pins = <0x04 0x06 0x04 0x139>; + phandle = <0x107>; + }; + + spi3m0-cs1 { + rockchip,pins = <0x04 0x07 0x04 0x139>; + phandle = <0x108>; + }; + }; + + tsadc { + + tsadc-shutorg { + rockchip,pins = <0x00 0x01 0x02 0x139>; + phandle = <0x124>; + }; + }; + + uart0 { + + uart0-xfer { + rockchip,pins = <0x00 0x10 0x03 0x13b 0x00 0x11 0x03 0x13b>; + phandle = <0x4f>; + }; + }; + + uart1 { + + uart1m0-xfer { + rockchip,pins = <0x02 0x0b 0x02 0x13b 0x02 0x0c 0x02 0x13b>; + phandle = <0x10b>; + }; + }; + + uart2 { + + uart2m0-xfer { + rockchip,pins = <0x00 0x18 0x01 0x13b 0x00 0x19 0x01 0x13b>; + phandle = <0x10c>; + }; + }; + + uart3 { + + uart3m1-xfer { + rockchip,pins = <0x03 0x10 0x04 0x13b 0x03 0x0f 0x04 0x13b>; + phandle = <0x10d>; + }; + }; + + uart4 { + + uart4m1-xfer { + rockchip,pins = <0x03 0x09 0x04 0x13b 0x03 0x0a 0x04 0x13b>; + phandle = <0x10e>; + }; + }; + + uart5 { + + uart5m0-xfer { + rockchip,pins = <0x02 0x01 0x03 0x13b 0x02 0x02 0x03 0x13b>; + phandle = <0x10f>; + }; + }; + + uart6 { + + uart6m0-xfer { + rockchip,pins = <0x02 0x03 0x03 0x13b 0x02 0x04 0x03 0x13b>; + phandle = <0x110>; + }; + }; + + uart7 { + + uart7m1-xfer { + rockchip,pins = <0x03 0x15 0x04 0x13b 0x03 0x14 0x04 0x13b>; + phandle = <0x111>; + }; + }; + + uart8 { + + uart8m0-xfer { + rockchip,pins = <0x02 0x16 0x02 0x13b 0x02 0x15 0x03 0x13b>; + phandle = <0x112>; + }; + + uart8m0-ctsn { + rockchip,pins = <0x02 0x0a 0x03 0x139>; + phandle = <0x113>; + }; + + uart8m0-rtsn { + rockchip,pins = <0x02 0x09 0x03 0x139>; + phandle = <0x155>; + }; + }; + + uart9 { + + uart9m1-xfer { + rockchip,pins = <0x04 0x16 0x04 0x13b 0x04 0x15 0x04 0x13b>; + phandle = <0x114>; + }; + }; + + spi0-hs { + + spi0m0-pins { + rockchip,pins = <0x00 0x0d 0x02 0x140 0x00 0x15 0x02 0x140 0x00 0x0e 0x02 0x140>; + phandle = <0xff>; + }; + }; + + spi1-hs { + + spi1m1-pins { + rockchip,pins = <0x03 0x13 0x03 0x140 0x03 0x12 0x03 0x140 0x03 0x11 0x03 0x140>; + phandle = <0x101>; + }; + }; + + spi2-hs { + + spi2m0-pins { + rockchip,pins = <0x02 0x11 0x04 0x140 0x02 0x12 0x04 0x140 0x02 0x13 0x04 0x140>; + phandle = <0x106>; + }; + }; + + spi3-hs { + + spi3m0-pins { + rockchip,pins = <0x04 0x0b 0x04 0x140 0x04 0x08 0x04 0x140 0x04 0x0a 0x04 0x140>; + phandle = <0x10a>; + }; + }; + + gpio-func { + + tsadc-gpio-func { + rockchip,pins = <0x00 0x01 0x00 0x139>; + phandle = <0x123>; + }; + }; + + usb { + + vcc5v0-host-en { + rockchip,pins = <0x00 0x06 0x00 0x139>; + phandle = <0x150>; + }; + + vcc5v0-otg-en { + rockchip,pins = <0x00 0x05 0x00 0x139>; + phandle = <0x151>; + }; + + vcc-hub-reset-en { + rockchip,pins = <0x01 0x04 0x00 0x139>; + phandle = <0x15a>; + }; + }; + + headphone { + + hp-det { + rockchip,pins = <0x03 0x12 0x00 0x142>; + phandle = <0x148>; + }; + }; + + sdio-pwrseq { + + wifi-enable-h { + rockchip,pins = <0x03 0x1d 0x00 0x139>; + phandle = <0x153>; + }; + }; + + wireless-wlan { + + wifi-host-wake-irq { + rockchip,pins = <0x03 0x1c 0x00 0x142>; + phandle = <0x154>; + }; + }; + + wireless-bluetooth { + + uart8-gpios { + rockchip,pins = <0x02 0x09 0x00 0x139>; + phandle = <0x156>; + }; + }; + + touch { + + touch-gpio { + rockchip,pins = <0x00 0x0d 0x00 0x13b 0x00 0x0e 0x00 0x139>; + phandle = <0xef>; + }; + }; + + mxc6655xa { + + mxc6655xa_irq_gpio { + rockchip,pins = <0x03 0x11 0x00 0x139>; + phandle = <0xfb>; + }; + }; + + pcie { + + pcie-pi6c-oe-en { + rockchip,pins = <0x03 0x07 0x00 0x139>; + phandle = <0x15b>; + }; + }; + + leds { + + leds-gpio { + rockchip,pins = <0x01 0x0a 0x00 0x139 0x01 0x09 0x00 0x139 0x01 0x08 0x00 0x139 0x02 0x11 0x00 0x139>; + phandle = <0x15d>; + }; + }; + + 4g { + + vcc-4g-power-en { + rockchip,pins = <0x03 0x03 0x00 0x139>; + phandle = <0x15c>; + }; + }; + + usb-typec { + + usbc0-int { + rockchip,pins = <0x00 0x11 0x00 0x13b>; + phandle = <0x4b>; + }; + + vcc5v0-typec0-en { + rockchip,pins = <0x00 0x05 0x00 0x139>; + }; + }; + }; + + audiopwmout-diff { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,audiopwmout-diff"; + simple-audio-card,mclk-fs = <0x100>; + simple-audio-card,bitclock-master = <0x143>; + simple-audio-card,frame-master = <0x143>; + + simple-audio-card,cpu { + sound-dai = <0x144>; + }; + + simple-audio-card,codec { + sound-dai = <0x145>; + phandle = <0x143>; + }; + }; + + dc-12v { + compatible = "regulator-fixed"; + regulator-name = "dc_12v"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xb71b00>; + regulator-max-microvolt = <0xb71b00>; + phandle = <0x14f>; + }; + + hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <0x80>; + simple-audio-card,name = "rockchip,hdmi"; + status = "okay"; + + simple-audio-card,cpu { + sound-dai = <0x146>; + }; + + simple-audio-card,codec { + sound-dai = <0x147>; + }; + }; + + rk-headset { + status = "disabled"; + compatible = "rockchip_headset"; + headset_gpio = <0x4a 0x12 0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x148>; + }; + + dummy-codec { + status = "disabled"; + compatible = "rockchip,dummy-codec"; + #sound-dai-cells = <0x00>; + phandle = <0x14a>; + }; + + pdm-mic-array { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,name = "rockchip,pdm-mic-array"; + + simple-audio-card,cpu { + sound-dai = <0x149>; + }; + + simple-audio-card,codec { + sound-dai = <0x14a>; + }; + }; + + rk809-sound { + status = "okay"; + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip-rk809"; + rockchip,format = "i2s"; + rockchip,mclk-fs = <0x100>; + rockchip,cpu = <0xe8>; + rockchip,codec = <0x14b>; + }; + + spdif-sound { + status = "okay"; + compatible = "simple-audio-card"; + simple-audio-card,name = "ROCKCHIP,SPDIF"; + + simple-audio-card,cpu { + sound-dai = <0x14c>; + }; + + simple-audio-card,codec { + sound-dai = <0x14d>; + }; + }; + + spdif-out { + status = "okay"; + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0x00>; + phandle = <0x14d>; + }; + + vad-sound { + status = "disabled"; + compatible = "rockchip,multicodecs-card"; + rockchip,card-name = "rockchip,rk3568-vad"; + rockchip,cpu = <0xe8>; + rockchip,codec = <0x14b 0x14e>; + }; + + vcc3v3-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + vin-supply = <0x14f>; + phandle = <0x46>; + }; + + vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + vin-supply = <0x14f>; + phandle = <0x3e>; + }; + + vcc5v0-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x3f 0x06 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x150>; + regulator-name = "vcc5v0_host"; + regulator-always-on; + regulator-boot-on; + phandle = <0x136>; + }; + + vcc5v0-otg-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x3f 0x05 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x151>; + regulator-name = "vcc5v0_otg"; + phandle = <0x4c>; + }; + + vcc3v3-lcd0-n { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd0_n"; + regulator-boot-on; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + vcc3v3-lcd1-n { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_lcd1_n"; + regulator-boot-on; + status = "disabled"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + test-power { + status = "okay"; + }; + + chosen { + // linux,initrd-end = <0x00 0xaacf15d>; + // linux,initrd-start = <0x00 0xa200000>; + bootargs = "storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.verifiedbootstate=orange rw rootwait earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1 swiotlb=0x10000 net.ifnames=0 comm-05/20/2025 androidboot.fwver=ddr-v1.21-2d653b3476,spl-v1.14,bl31-v1.44,bl32-v2.12,uboot--boot"; + }; + + fiq-debugger { + compatible = "rockchip,fiq-debugger"; + rockchip,serial-id = <0x02>; + rockchip,wake-irq = <0x00>; + rockchip,irq-mode-enable = <0x01>; + rockchip,baudrate = <0x16e360>; + interrupts = <0x00 0xfc 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0x10c>; + status = "okay"; + }; + + debug@fd904000 { + compatible = "rockchip,debug"; + reg = <0x00 0xfd904000 0x00 0x1000 0x00 0xfd905000 0x00 0x1000 0x00 0xfd906000 0x00 0x1000 0x00 0xfd907000 0x00 0x1000>; + }; + + cspmu@fd90c000 { + compatible = "rockchip,cspmu"; + reg = <0x00 0xfd90c000 0x00 0x1000 0x00 0xfd90d000 0x00 0x1000 0x00 0xfd90e000 0x00 0x1000 0x00 0xfd90f000 0x00 0x1000>; + }; + + adc-keys { + compatible = "adc-keys"; + io-channels = <0x49 0x00>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <0x1b7740>; + poll-interval = <0x64>; + + recovery-key { + label = "F12"; + linux,code = <0x58>; + press-threshold-microvolt = <0x6d6>; + }; + + vol-down-key { + label = "volume down"; + linux,code = <0x72>; + press-threshold-microvolt = <0x48a1c>; + }; + + menu-key { + label = "menu"; + linux,code = <0x8b>; + press-threshold-microvolt = <0xef420>; + }; + + back-key { + label = "back"; + linux,code = <0x9e>; + press-threshold-microvolt = <0x13eb9c>; + }; + }; + + vcc2v5-ddr { + compatible = "regulator-fixed"; + regulator-name = "vcc2v5-sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x2625a0>; + regulator-max-microvolt = <0x2625a0>; + vin-supply = <0x46>; + }; + + pcie30-avdd0v9 { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd0v9"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xdbba0>; + regulator-max-microvolt = <0xdbba0>; + vin-supply = <0x46>; + }; + + pcie30-avdd1v8 { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd1v8"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + vin-supply = <0x46>; + }; + + gpio-regulator { + compatible = "regulator-gpio"; + regulator-name = "pcie30_3v3"; + regulator-min-microvolt = <0x186a0>; + regulator-max-microvolt = <0x325aa0>; + gpios = <0x3f 0x1c 0x00>; + gpios-states = <0x01>; + states = <0x186a0 0x00 0x325aa0 0x01>; + phandle = <0xc2>; + }; + + vcc3v3-bu { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_bu"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + vin-supply = <0x3e>; + }; + + sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <0x152 0x01>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <0x153>; + post-power-on-delay-ms = <0x64>; + reset-gpios = <0x4a 0x1d 0x01>; + status = "okay"; + phandle = <0xb3>; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + rockchip,grf = <0x3b>; + wifi_chip_type = "ap6256"; + pinctrl-names = "default"; + pinctrl-0 = <0x154>; + WIFI,host_wake_irq = <0x4a 0x1c 0x00>; + status = "okay"; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + clocks = <0x152 0x01>; + clock-names = "ext_clock"; + uart_rts_gpios = <0x91 0x09 0x01>; + pinctrl-names = "default\0rts_gpio"; + pinctrl-0 = <0x155>; + pinctrl-1 = <0x156>; + BT,reset_gpio = <0x4a 0x00 0x00>; + BT,wake_gpio = <0x4a 0x02 0x00>; + BT,wake_host_irq = <0x4a 0x01 0x00>; + status = "okay"; + }; + + flash-led { + compatible = "led,rgb13h"; + label = "pwm-flash-led"; + led-max-microamp = <0x4e20>; + flash-max-microamp = <0x4e20>; + flash-max-timeout-us = <0xf4240>; + pwms = <0x157 0x00 0x61a8 0x00>; + rockchip,camera-module-index = <0x01>; + rockchip,camera-module-facing = "front"; + status = "disabled"; + }; + + vcc-camera-regulator { + compatible = "regulator-fixed"; + gpio = <0x102 0x03 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x158>; + regulator-name = "vcc_camera"; + enable-active-high; + status = "disabled"; + }; + + vcc-hub-reset-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x159 0x04 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x15a>; + regulator-name = "vcc_hub_reset_en"; + regulator-always-on; + }; + + pcie-pi6c-oe-regulator { + compatible = "regulator-fixed"; + gpio = <0x4a 0x07 0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x15b>; + regulator-name = "pcie_pi6c_oe_en"; + regulator-always-on; + }; + + vcc-4g-power-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <0x4a 0x03 0x00>; + pinctrl-names = "default"; + pinctrl-0 = <0x15c>; + regulator-name = "vcc_4g_power_en"; + regulator-always-on; + }; + + leds { + status = "okay"; + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <0x15d>; + + power { + label = "firefly:blue:power"; + linux,default-trigger = "ir-power-click"; + default-state = "on"; + gpios = <0x159 0x0a 0x00>; + }; + + user { + label = "firefly:yellow:user"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <0x159 0x09 0x00>; + }; + + diy1 { + label = "firefly:green:diy"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <0x159 0x08 0x00>; + }; + + diy2 { + label = "firefly:yellow:diy"; + linux,default-trigger = "ir-user-click"; + default-state = "off"; + gpios = <0x91 0x11 0x00>; + }; + }; +}; \ No newline at end of file diff --git a/configs/vms/linux-aarch64-rk3568-smp2.toml b/configs/vms/linux-aarch64-rk3568-smp2.toml new file mode 100644 index 00000000..70ae7ed4 --- /dev/null +++ b/configs/vms/linux-aarch64-rk3568-smp2.toml @@ -0,0 +1,56 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 2 +# The physical CPU ids. +phys_cpu_ids = [0x200, 0x300] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x8008_0000 +# The location of image: "memory" | "fs". +# Load from memory. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x8008_0000 +## The file path of the kernel image. +kernel_path = "/code/axvisor/rk3568-linux/Image" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x8000_0000 +#dtb_path = "/code/axvisor/configs/vms/linux-aarch64-rk3568_smp2.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x8000_0000, 0x6000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] +# +# Device specifications +# +[devices] +# The interrupt mode. +interrupt_mode = "passthrough" +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] \ No newline at end of file diff --git a/configs/vms/linux-aarch64-rk3588-smp8.dts b/configs/vms/linux-aarch64-rk3588-smp8.dts new file mode 100644 index 00000000..20bc1c3d --- /dev/null +++ b/configs/vms/linux-aarch64-rk3588-smp8.dts @@ -0,0 +1,8099 @@ +/dts-v1/; + +/ { + compatible = "rockchip,rk3588-firefly-itx-3588j\0rockchip,rk3588"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Firefly ITX-3588J HDMI(Linux)"; + + aliases { + csi2dcphy0 = "/csi2-dcphy0"; + csi2dcphy1 = "/csi2-dcphy1"; + csi2dphy0 = "/csi2-dphy0"; + csi2dphy1 = "/csi2-dphy1"; + csi2dphy2 = "/csi2-dphy2"; + dsi0 = "/dsi@fde20000"; + dsi1 = "/dsi@fde30000"; + ethernet0 = "/ethernet@fe1b0000"; + ethernet1 = "/ethernet@fe1c0000"; + gpio0 = "/pinctrl/gpio@fd8a0000"; + gpio1 = "/pinctrl/gpio@fec20000"; + gpio2 = "/pinctrl/gpio@fec30000"; + gpio3 = "/pinctrl/gpio@fec40000"; + gpio4 = "/pinctrl/gpio@fec50000"; + i2c0 = "/i2c@fd880000"; + i2c1 = "/i2c@fea90000"; + i2c2 = "/i2c@feaa0000"; + i2c3 = "/i2c@feab0000"; + i2c4 = "/i2c@feac0000"; + i2c5 = "/i2c@fead0000"; + i2c6 = "/i2c@fec80000"; + i2c7 = "/i2c@fec90000"; + i2c8 = "/i2c@feca0000"; + rkcif_mipi_lvds0 = "/rkcif-mipi-lvds"; + rkcif_mipi_lvds1 = "/rkcif-mipi-lvds1"; + rkcif_mipi_lvds2 = "/rkcif-mipi-lvds2"; + rkcif_mipi_lvds3 = "/rkcif-mipi-lvds3"; + rkvenc0 = "/rkvenc-core@fdbd0000"; + rkvenc1 = "/rkvenc-core@fdbe0000"; + jpege0 = "/jpege-core@fdba0000"; + jpege1 = "/jpege-core@fdba4000"; + jpege2 = "/jpege-core@fdba8000"; + jpege3 = "/jpege-core@fdbac000"; + serial0 = "/serial@fd890000"; + serial1 = "/serial@feb40000"; + serial2 = "/serial@feb50000"; + serial3 = "/serial@feb60000"; + serial4 = "/serial@feb70000"; + serial5 = "/serial@feb80000"; + serial6 = "/serial@feb90000"; + serial7 = "/serial@feba0000"; + serial8 = "/serial@febb0000"; + serial9 = "/serial@febc0000"; + spi0 = "/spi@feb00000"; + spi1 = "/spi@feb10000"; + spi2 = "/spi@feb20000"; + spi3 = "/spi@feb30000"; + spi4 = "/spi@fecb0000"; + spi5 = "/spi@fe2b0000"; + hdcp0 = "/hdcp@fde40000"; + hdcp1 = "/hdcp@fde70000"; + pwm0 = "/pwm@fd8b0000"; + pwm1 = "/pwm@fd8b0010"; + pwm2 = "/pwm@fd8b0020"; + pwm3 = "/pwm@fd8b0030"; + pwm4 = "/pwm@febd0000"; + pwm5 = "/pwm@febd0010"; + pwm6 = "/pwm@febd0020"; + pwm7 = "/pwm@febd0030"; + pwm8 = "/pwm@febe0000"; + pwm9 = "/pwm@febe0010"; + pwm10 = "/pwm@febe0020"; + pwm11 = "/pwm@febe0030"; + pwm12 = "/pwm@febf0000"; + pwm13 = "/pwm@febf0010"; + pwm14 = "/pwm@febf0020"; + pwm15 = "/pwm@febf0030"; + csi2dphy3 = "/csi2-dphy3"; + csi2dphy4 = "/csi2-dphy4"; + csi2dphy5 = "/csi2-dphy5"; + dp0 = "/dp@fde50000"; + dp1 = "/dp@fde60000"; + edp0 = "/edp@fdec0000"; + edp1 = "/edp@fded0000"; + hdptx0 = "/phy@fed60000"; + hdptx1 = "/phy@fed70000"; + hdptxhdmi0 = "/hdmiphy@fed60000"; + hdptxhdmi1 = "/hdmiphy@fed70000"; + hdmi0 = "/hdmi@fde80000"; + hdmi1 = "/hdmi@fdea0000"; + hdmirx0 = "/hdmirx-controller@fdee0000"; + rkcif_mipi_lvds4 = "/rkcif-mipi-lvds4"; + rkcif_mipi_lvds5 = "/rkcif-mipi-lvds5"; + usbdp0 = "/phy@fed80000"; + usbdp1 = "/phy@fed90000"; + mmc0 = "/mmc@fe2e0000"; + mmc1 = "/mmc@fe2c0000"; + mmc2 = "/mmc@fe2d0000"; + }; + + clocks { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + spll { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x29d7ab80>; + clock-output-names = "spll"; + }; + + xin32k { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x8000>; + clock-output-names = "xin32k"; + }; + + xin24m { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x16e3600>; + clock-output-names = "xin24m"; + }; + + hclk_vo1@fd7c08ec { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08ec 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x264>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + phandle = <0x05>; + }; + + aclk_vdpu_low_pre@fd7c08b0 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08b0 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1bc>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_vo0@fd7c08dc { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08dc 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x26d>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + phandle = <0x04>; + }; + + hclk_usb@fd7c08a8 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08a8 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x264>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_nvm@fd7c087c { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c087c 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x141>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + phandle = <0x03>; + }; + + aclk_usb@fd7c08a8 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08a8 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x263>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_isp1_pre@fd7c0868 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c0868 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1e1>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_isp1_pre@fd7c0868 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c0868 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1e0>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_rkvdec0_pre@fd7c08a0 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08a0 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1bc>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_rkvdec0_pre@fd7c08a0 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08a0 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1be>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_rkvdec1_pre@fd7c08a4 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08a4 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1bc>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_rkvdec1_pre@fd7c08a4 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08a4 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1be>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_jpeg_decoder_pre@fd7c08b0 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08b0 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1bc>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_rkvenc1_pre@fd7c08c0 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08c0 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1c5>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_rkvenc1_pre@fd7c08c0 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08c0 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1c4>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_hdcp0_pre@fd7c08dc { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08dc 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x26c>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_hdcp1_pre@fd7c08ec { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08ec 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x263>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + pclk_av1_pre@fd7c0910 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c0910 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1be>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + aclk_av1_pre@fd7c0910 { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c0910 0x00 0x10>; + clock-names = "link"; + clocks = <0x02 0x1bc>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + hclk_sdio_pre@fd7c092c { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c092c 0x00 0x10>; + clock-names = "link"; + clocks = <0x03>; + #power-domain-cells = <0x01>; + #clock-cells = <0x00>; + }; + + pclk_vo0_grf@fd7c08dc { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08dc 0x00 0x04>; + clocks = <0x04>; + clock-names = "link"; + #clock-cells = <0x00>; + phandle = <0x5d>; + }; + + pclk_vo1_grf@fd7c08ec { + compatible = "rockchip,rk3588-clock-gate-link"; + reg = <0x00 0xfd7c08ec 0x00 0x04>; + clocks = <0x05>; + clock-names = "link"; + #clock-cells = <0x00>; + phandle = <0x5e>; + }; + }; + + cpus { + #address-cells = <0x01>; + #size-cells = <0x00>; + + cpu-map { + + cluster0 { + + core0 { + cpu = <0x06>; + }; + + core1 { + cpu = <0x07>; + }; + + core2 { + cpu = <0x08>; + }; + + core3 { + cpu = <0x09>; + }; + }; + + cluster1 { + + core0 { + cpu = <0x0a>; + }; + + core1 { + cpu = <0x0b>; + }; + }; + + cluster2 { + + core0 { + cpu = <0x0c>; + }; + + core1 { + cpu = <0x0d>; + }; + }; + }; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a55"; + reg = <0x00>; + enable-method = "psci"; + capacity-dmips-mhz = <0x212>; + clocks = <0x0e 0x00>; + operating-points-v2 = <0x0f>; + cpu-idle-states = <0x10>; + i-cache-size = <0x8000>; + i-cache-line-size = <0x40>; + i-cache-sets = <0x80>; + d-cache-size = <0x8000>; + d-cache-line-size = <0x40>; + d-cache-sets = <0x80>; + next-level-cache = <0x11>; + #cooling-cells = <0x02>; + dynamic-power-coefficient = <0x64>; + cpu-supply = <0x12>; + mem-supply = <0x12>; + phandle = <0x06>; + }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x100>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x212>; + // clocks = <0x0e 0x00>; + // operating-points-v2 = <0x0f>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x8000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x80>; + // d-cache-size = <0x8000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x80>; + // next-level-cache = <0x13>; + // phandle = <0x07>; + // }; + + // cpu@200 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x200>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x212>; + // clocks = <0x0e 0x00>; + // operating-points-v2 = <0x0f>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x8000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x80>; + // d-cache-size = <0x8000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x80>; + // next-level-cache = <0x14>; + // phandle = <0x08>; + // }; + + // cpu@300 { + // device_type = "cpu"; + // compatible = "arm,cortex-a55"; + // reg = <0x300>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x212>; + // clocks = <0x0e 0x00>; + // operating-points-v2 = <0x0f>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x8000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x80>; + // d-cache-size = <0x8000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x80>; + // next-level-cache = <0x15>; + // phandle = <0x09>; + // }; + + // cpu@400 { + // device_type = "cpu"; + // compatible = "arm,cortex-a76"; + // reg = <0x400>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x400>; + // clocks = <0x0e 0x02>; + // operating-points-v2 = <0x16>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x10000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x100>; + // d-cache-size = <0x10000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x100>; + // next-level-cache = <0x17>; + // #cooling-cells = <0x02>; + // dynamic-power-coefficient = <0x12c>; + // cpu-supply = <0x18>; + // mem-supply = <0x18>; + // phandle = <0x0a>; + // }; + + // cpu@500 { + // device_type = "cpu"; + // compatible = "arm,cortex-a76"; + // reg = <0x500>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x400>; + // clocks = <0x0e 0x02>; + // operating-points-v2 = <0x16>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x10000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x100>; + // d-cache-size = <0x10000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x100>; + // next-level-cache = <0x19>; + // phandle = <0x0b>; + // }; + + // cpu@600 { + // device_type = "cpu"; + // compatible = "arm,cortex-a76"; + // reg = <0x600>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x400>; + // clocks = <0x0e 0x03>; + // operating-points-v2 = <0x1a>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x10000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x100>; + // d-cache-size = <0x10000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x100>; + // next-level-cache = <0x1b>; + // #cooling-cells = <0x02>; + // dynamic-power-coefficient = <0x12c>; + // cpu-supply = <0x1c>; + // mem-supply = <0x1c>; + // phandle = <0x0c>; + // }; + + // cpu@700 { + // device_type = "cpu"; + // compatible = "arm,cortex-a76"; + // reg = <0x700>; + // enable-method = "psci"; + // capacity-dmips-mhz = <0x400>; + // clocks = <0x0e 0x03>; + // operating-points-v2 = <0x1a>; + // cpu-idle-states = <0x10>; + // i-cache-size = <0x10000>; + // i-cache-line-size = <0x40>; + // i-cache-sets = <0x100>; + // d-cache-size = <0x10000>; + // d-cache-line-size = <0x40>; + // d-cache-sets = <0x100>; + // next-level-cache = <0x1d>; + // phandle = <0x0d>; + // }; + + l2-cache-l0 { + compatible = "cache"; + cache-size = <0x20000>; + cache-line-size = <0x40>; + cache-sets = <0x200>; + next-level-cache = <0x1e>; + phandle = <0x11>; + }; + + l2-cache-l1 { + compatible = "cache"; + cache-size = <0x20000>; + cache-line-size = <0x40>; + cache-sets = <0x200>; + next-level-cache = <0x1e>; + phandle = <0x13>; + }; + + l2-cache-l2 { + compatible = "cache"; + cache-size = <0x20000>; + cache-line-size = <0x40>; + cache-sets = <0x200>; + next-level-cache = <0x1e>; + phandle = <0x14>; + }; + + l2-cache-l3 { + compatible = "cache"; + cache-size = <0x20000>; + cache-line-size = <0x40>; + cache-sets = <0x200>; + next-level-cache = <0x1e>; + phandle = <0x15>; + }; + + l2-cache-b0 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <0x40>; + cache-sets = <0x400>; + next-level-cache = <0x1e>; + phandle = <0x17>; + }; + + l2-cache-b1 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <0x40>; + cache-sets = <0x400>; + next-level-cache = <0x1e>; + phandle = <0x19>; + }; + + l2-cache-b2 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <0x40>; + cache-sets = <0x400>; + next-level-cache = <0x1e>; + phandle = <0x1b>; + }; + + l2-cache-b3 { + compatible = "cache"; + cache-size = <0x80000>; + cache-line-size = <0x40>; + cache-sets = <0x400>; + next-level-cache = <0x1e>; + phandle = <0x1d>; + }; + + l3-cache { + compatible = "cache"; + cache-size = <0x300000>; + cache-line-size = <0x40>; + cache-sets = <0x1000>; + phandle = <0x1e>; + }; + }; + + cluster0-opp-table { + compatible = "operating-points-v2"; + opp-shared; + nvmem-cells = <0x1f 0x20>; + nvmem-cell-names = "leakage\0specification_serial_number"; + rockchip,supported-hw; + rockchip,opp-shared-dsu; + rockchip,pvtm-voltage-sel = <0x00 0x582 0x00 0x583 0x59a 0x01 0x59b 0x5b2 0x02 0x5b3 0x5ca 0x03 0x5cb 0x5e2 0x04 0x5e3 0x5fa 0x05 0x5fb 0x270f 0x06>; + rockchip,pvtm-pvtpll; + rockchip,pvtm-offset = <0x64>; + rockchip,pvtm-sample-time = <0x44c>; + rockchip,pvtm-freq = <0x159b40>; + rockchip,pvtm-volt = <0xb71b0>; + rockchip,pvtm-ref-temp = <0x19>; + rockchip,pvtm-temp-prop = <0xf4 0xf4>; + rockchip,pvtm-thermal-zone = "soc-thermal"; + rockchip,grf = <0x21>; + rockchip,dsu-grf = <0x22>; + volt-mem-read-margin = <0xd0bd8 0x01 0xbac48 0x02 0xa4cb8 0x03 0x78d98 0x04>; + low-volt-mem-read-margin = <0x04>; + intermediate-threshold-freq = <0xf6180>; + rockchip,reboot-freq = <0x159b40>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x2710>; + rockchip,low-temp-min-volt = <0xb71b0>; + rockchip,high-temp = <0x14c08>; + rockchip,high-temp-max-freq = <0x188940>; + phandle = <0x0f>; + + opp-408000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x18519600>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-600000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-816000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x30a32c00>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-1008000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x3c14dc00>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-1200000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x47868c00>; + opp-microvolt = <0xadf34 0xadf34 0xe7ef0 0xadf34 0xadf34 0xe7ef0>; + opp-microvolt-L1 = <0xaae60 0xaae60 0xe7ef0 0xaae60 0xaae60 0xe7ef0>; + opp-microvolt-L2 = <0xaae60 0xaae60 0xe7ef0 0xaae60 0xaae60 0xe7ef0>; + opp-microvolt-L3 = <0xa7d8c 0xa7d8c 0xe7ef0 0xa7d8c 0xa7d8c 0xe7ef0>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + opp-microvolt-L6 = <0xa4cb8 0xa4cb8 0xe7ef0 0xa4cb8 0xa4cb8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-1416000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x54667200>; + opp-microvolt = <0xba284 0xba284 0xe7ef0 0xba284 0xba284 0xe7ef0>; + opp-microvolt-L1 = <0xb71b0 0xb71b0 0xe7ef0 0xb71b0 0xb71b0 0xe7ef0>; + opp-microvolt-L2 = <0xb40dc 0xb40dc 0xe7ef0 0xb40dc 0xb40dc 0xe7ef0>; + opp-microvolt-L3 = <0xb1008 0xb1008 0xe7ef0 0xb1008 0xb1008 0xe7ef0>; + opp-microvolt-L4 = <0xb1008 0xb1008 0xe7ef0 0xb1008 0xb1008 0xe7ef0>; + opp-microvolt-L5 = <0xadf34 0xadf34 0xe7ef0 0xadf34 0xadf34 0xe7ef0>; + opp-microvolt-L6 = <0xadf34 0xadf34 0xe7ef0 0xadf34 0xadf34 0xe7ef0>; + clock-latency-ns = <0x9c40>; + opp-suspend; + }; + + opp-1608000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x5fd82200>; + opp-microvolt = <0xcf850 0xcf850 0xe7ef0 0xcf850 0xcf850 0xe7ef0>; + opp-microvolt-L1 = <0xcc77c 0xcc77c 0xe7ef0 0xcc77c 0xcc77c 0xe7ef0>; + opp-microvolt-L2 = <0xc96a8 0xc96a8 0xe7ef0 0xc96a8 0xc96a8 0xe7ef0>; + opp-microvolt-L3 = <0xc65d4 0xc65d4 0xe7ef0 0xc65d4 0xc65d4 0xe7ef0>; + opp-microvolt-L4 = <0xc3500 0xc3500 0xe7ef0 0xc3500 0xc3500 0xe7ef0>; + opp-microvolt-L5 = <0xc3500 0xc3500 0xe7ef0 0xc3500 0xc3500 0xe7ef0>; + opp-microvolt-L6 = <0xc042c 0xc042c 0xe7ef0 0xc042c 0xc042c 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-1704000000 { + opp-supported-hw = <0x02 0xffff>; + opp-hz = <0x00 0x6590fa00>; + opp-microvolt = <0xdbba0 0xdbba0 0xe7ef0 0xdbba0 0xdbba0 0xe7ef0>; + opp-microvolt-L1 = <0xd8acc 0xd8acc 0xe7ef0 0xd8acc 0xd8acc 0xe7ef0>; + opp-microvolt-L2 = <0xd59f8 0xd59f8 0xe7ef0 0xd59f8 0xd59f8 0xe7ef0>; + opp-microvolt-L3 = <0xd2924 0xd2924 0xe7ef0 0xd2924 0xd2924 0xe7ef0>; + opp-microvolt-L4 = <0xcf850 0xcf850 0xe7ef0 0xcf850 0xcf850 0xe7ef0>; + opp-microvolt-L5 = <0xcc77c 0xcc77c 0xe7ef0 0xcc77c 0xcc77c 0xe7ef0>; + opp-microvolt-L6 = <0xc96a8 0xc96a8 0xe7ef0 0xc96a8 0xc96a8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + + opp-1800000000 { + opp-supported-hw = <0xf9 0xffff>; + opp-hz = <0x00 0x6b49d200>; + opp-microvolt = <0xe7ef0 0xe7ef0 0xe7ef0 0xe7ef0 0xe7ef0 0xe7ef0>; + opp-microvolt-L1 = <0xe4e1c 0xe4e1c 0xe7ef0 0xe4e1c 0xe4e1c 0xe7ef0>; + opp-microvolt-L2 = <0xe1d48 0xe1d48 0xe7ef0 0xe1d48 0xe1d48 0xe7ef0>; + opp-microvolt-L3 = <0xdec74 0xdec74 0xe7ef0 0xdec74 0xdec74 0xe7ef0>; + opp-microvolt-L4 = <0xdbba0 0xdbba0 0xe7ef0 0xdbba0 0xdbba0 0xe7ef0>; + opp-microvolt-L5 = <0xd8acc 0xd8acc 0xe7ef0 0xd8acc 0xd8acc 0xe7ef0>; + opp-microvolt-L6 = <0xd59f8 0xd59f8 0xe7ef0 0xd59f8 0xd59f8 0xe7ef0>; + clock-latency-ns = <0x9c40>; + }; + }; + + arm-pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0x01 0x07 0x08>; + interrupt-affinity = <0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d>; + }; + + cpuinfo { + compatible = "rockchip,cpuinfo"; + nvmem-cells = <0x27 0x28 0x29>; + nvmem-cell-names = "id\0cpu-version\0cpu-code"; + }; + + csi2-dcphy0 { + compatible = "rockchip,rk3588-csi2-dcphy"; + phys = <0x2a>; + phy-names = "dcphy"; + status = "disabled"; + }; + + csi2-dcphy1 { + compatible = "rockchip,rk3588-csi2-dcphy"; + phys = <0x2b>; + phy-names = "dcphy"; + status = "disabled"; + }; + + csi2-dphy0 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x2c>; + status = "disabled"; + }; + + csi2-dphy1 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x2c>; + status = "disabled"; + }; + + csi2-dphy2 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x2c>; + status = "disabled"; + }; + + display-subsystem { + compatible = "rockchip,display-subsystem"; + ports = <0x2d>; + clocks = <0x2e 0x2f>; + clock-names = "hdmi0_phy_pll\0hdmi1_phy_pll"; + memory-region = <0x30>; + memory-region-names = "drm-logo"; + + route { + + route-dp0 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x31>; + }; + + route-dsi0 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x32>; + }; + + route-dsi1 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x33>; + }; + + route-edp0 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x34>; + }; + + route-edp1 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + }; + + route-hdmi0 { + status = "okay"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x35>; + }; + + route-rgb { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x36>; + }; + + route-dp1 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x37>; + }; + + route-hdmi1 { + status = "disabled"; + logo,uboot = "logo.bmp"; + logo,kernel = "logo_kernel.bmp"; + logo,mode = "center"; + charge_logo,mode = "center"; + connect = <0x38>; + }; + }; + }; + + dmc { + compatible = "rockchip,rk3588-dmc"; + interrupts = <0x00 0x49 0x04>; + interrupt-names = "complete"; + devfreq-events = <0x39>; + clocks = <0x0e 0x04>; + clock-names = "dmc_clk"; + operating-points-v2 = <0x3a>; + upthreshold = <0x28>; + downdifferential = <0x14>; + system-status-level = <0x01 0x04 0x08 0x08 0x02 0x01 0x10 0x04 0x10000 0x04 0x80000 0x04 0x1000 0x08 0x4000 0x08 0x2000 0x08 0xc00 0x08 0x40000 0x08>; + auto-freq-en = <0x01>; + status = "okay"; + center-supply = <0x3b>; + mem-supply = <0x3c>; + }; + + dmc-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x3d>; + nvmem-cell-names = "leakage"; + rockchip,leakage-voltage-sel = <0x01 0x1f 0x00 0x20 0x2c 0x01 0x2d 0x39 0x02 0x3a 0xfe 0x03>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x2710>; + rockchip,low-temp-min-volt = <0xb71b0>; + phandle = <0x3a>; + + opp-528000000 { + opp-hz = <0x00 0x1f78a400>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xd59f8 0xb1008 0xb1008 0xb71b0>; + opp-microvolt-L1 = <0xa4cb8 0xa4cb8 0xd59f8 0xaae60 0xaae60 0xb71b0>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xd59f8 0xa7d8c 0xa7d8c 0xb71b0>; + opp-microvolt-L3 = <0xa4cb8 0xa4cb8 0xd59f8 0xa4cb8 0xa4cb8 0xb71b0>; + }; + + opp-1068000000 { + opp-hz = <0x00 0x3fa86300>; + opp-microvolt = <0xb1008 0xb1008 0xd59f8 0xb40dc 0xb40dc 0xb71b0>; + opp-microvolt-L1 = <0xaae60 0xaae60 0xd59f8 0xadf34 0xadf34 0xb71b0>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xd59f8 0xaae60 0xaae60 0xb71b0>; + opp-microvolt-L3 = <0xa4cb8 0xa4cb8 0xd59f8 0xa7d8c 0xa7d8c 0xb71b0>; + }; + + opp-1560000000 { + opp-hz = <0x00 0x5cfbb600>; + opp-microvolt = <0xc3500 0xc3500 0xd59f8 0xb71b0 0xb71b0 0xb71b0>; + opp-microvolt-L1 = <0xbd358 0xbd358 0xd59f8 0xb1008 0xb1008 0xb71b0>; + opp-microvolt-L2 = <0xb71b0 0xb71b0 0xd59f8 0xadf34 0xadf34 0xb71b0>; + opp-microvolt-L3 = <0xb1008 0xb1008 0xd59f8 0xaae60 0xaae60 0xb71b0>; + }; + + opp-2750000000 { + opp-hz = <0x00 0xa3e9ab80>; + opp-microvolt = <0xd59f8 0xd59f8 0xd59f8 0xb71b0 0xb71b0 0xb71b0>; + opp-microvolt-L1 = <0xcf850 0xcf850 0xd59f8 0xb71b0 0xb71b0 0xb71b0>; + opp-microvolt-L2 = <0xcc77c 0xcc77c 0xd59f8 0xb1008 0xb1008 0xb71b0>; + opp-microvolt-L3 = <0xc96a8 0xc8320 0xd59f8 0xaae60 0xaae60 0xb71b0>; + }; + }; + + firmware { + + scmi { + compatible = "arm,scmi-smc"; + shmem = <0x3e>; + arm,smc-id = <0x82000010>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + protocol@14 { + reg = <0x14>; + #clock-cells = <0x01>; + assigned-clocks = <0x0e 0x00 0x0e 0x02 0x0e 0x03>; + assigned-clock-rates = <0x30a32c00 0x30a32c00 0x30a32c00>; + phandle = <0x0e>; + }; + + protocol@16 { + reg = <0x16>; + #reset-cells = <0x01>; + phandle = <0x104>; + }; + }; + + sdei { + compatible = "arm,sdei-1.0"; + method = "smc"; + }; + + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + jpege-ccu { + compatible = "rockchip,vpu-jpege-ccu"; + status = "okay"; + phandle = <0xa4>; + }; + + mpp-srv { + compatible = "rockchip,mpp-service"; + rockchip,taskqueue-count = <0x0c>; + rockchip,resetgroup-count = <0x01>; + status = "okay"; + phandle = <0x9f>; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + }; + + rkcif-dvp { + compatible = "rockchip,rkcif-dvp"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x41>; + }; + + rkcif-dvp-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x41>; + status = "disabled"; + }; + + rkcif-mipi-lvds { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x42>; + }; + + rkcif-mipi-lvds-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x42>; + status = "disabled"; + }; + + rkcif-mipi-lvds-sditf-vir1 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x42>; + status = "disabled"; + }; + + rkcif-mipi-lvds-sditf-vir2 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x42>; + status = "disabled"; + }; + + rkcif-mipi-lvds-sditf-vir3 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x42>; + status = "disabled"; + }; + + rkcif-mipi-lvds1 { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x43>; + }; + + rkcif-mipi-lvds1-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x43>; + status = "disabled"; + }; + + rkcif-mipi-lvds1-sditf-vir1 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x43>; + status = "disabled"; + }; + + rkcif-mipi-lvds1-sditf-vir2 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x43>; + status = "disabled"; + }; + + rkcif-mipi-lvds1-sditf-vir3 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x43>; + status = "disabled"; + }; + + rkcif-mipi-lvds2 { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x44>; + }; + + rkcif-mipi-lvds2-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x44>; + status = "disabled"; + }; + + rkcif-mipi-lvds2-sditf-vir1 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x44>; + status = "disabled"; + }; + + rkcif-mipi-lvds2-sditf-vir2 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x44>; + status = "disabled"; + }; + + rkcif-mipi-lvds2-sditf-vir3 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x44>; + status = "disabled"; + }; + + rkcif-mipi-lvds3 { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x45>; + }; + + rkcif-mipi-lvds3-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x45>; + status = "disabled"; + }; + + rkcif-mipi-lvds3-sditf-vir1 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x45>; + status = "disabled"; + }; + + rkcif-mipi-lvds3-sditf-vir2 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x45>; + status = "disabled"; + }; + + rkcif-mipi-lvds3-sditf-vir3 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x45>; + status = "disabled"; + }; + + rkisp0-vir0 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x46>; + status = "disabled"; + }; + + rkisp0-vir1 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x46>; + status = "disabled"; + }; + + rkisp0-vir2 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x46>; + status = "disabled"; + }; + + rkisp0-vir3 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x46>; + status = "disabled"; + }; + + rkisp1-vir0 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x47>; + status = "disabled"; + }; + + rkisp1-vir1 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x47>; + status = "disabled"; + }; + + rkisp1-vir2 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x47>; + status = "disabled"; + }; + + rkisp1-vir3 { + compatible = "rockchip,rkisp-vir"; + rockchip,hw = <0x47>; + status = "disabled"; + }; + + rkispp0-vir0 { + compatible = "rockchip,rk3588-rkispp-vir"; + rockchip,hw = <0x48>; + status = "disabled"; + }; + + rkispp1-vir0 { + compatible = "rockchip,rk3588-rkispp-vir"; + rockchip,hw = <0x49>; + status = "disabled"; + }; + + rkvenc-ccu { + compatible = "rockchip,rkv-encoder-v2-ccu"; + status = "okay"; + phandle = <0xaa>; + }; + + rockchip-suspend { + compatible = "rockchip,pm-rk3588"; + status = "okay"; + rockchip,sleep-debug-en = <0x01>; + rockchip,sleep-mode-config = <0x04>; + rockchip,wakeup-config = <0x900>; + }; + + rockchip-system-monitor { + compatible = "rockchip,system-monitor"; + rockchip,thermal-zone = "soc-thermal"; + }; + + thermal-zones { + + soc-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + sustainable-power = <0x834>; + thermal-sensors = <0x4a 0x00>; + + trips { + + trip-point-0 { + temperature = <0x124f8>; + hysteresis = <0x7d0>; + type = "passive"; + }; + + trip-point-1 { + temperature = <0x14c08>; + hysteresis = <0x7d0>; + type = "passive"; + phandle = <0x4b>; + }; + + soc-crit { + temperature = <0x1c138>; + hysteresis = <0x7d0>; + type = "critical"; + }; + }; + + cooling-maps { + + map0 { + trip = <0x4b>; + cooling-device = <0x06 0xffffffff 0xffffffff>; + contribution = <0x400>; + }; + + map3 { + trip = <0x4b>; + cooling-device = <0x4c 0xffffffff 0xffffffff>; + contribution = <0x400>; + }; + }; + }; + + bigcore0-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x4a 0x01>; + }; + + bigcore1-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x4a 0x02>; + }; + + littlecore-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x4a 0x03>; + }; + + center-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x4a 0x04>; + }; + + gpu-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x4a 0x05>; + }; + + npu-thermal { + polling-delay-passive = <0x14>; + polling-delay = <0x3e8>; + thermal-sensors = <0x4a 0x06>; + }; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; + }; + + sram@10f000 { + compatible = "mmio-sram"; + reg = <0x00 0x10f000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x10f000 0x100>; + + sram@0 { + compatible = "arm,scmi-shmem"; + reg = <0x00 0x100>; + phandle = <0x3e>; + }; + }; + + gpu@fb000000 { + compatible = "arm,mali-bifrost"; + reg = <0x00 0xfb000000 0x00 0x200000>; + interrupts = <0x00 0x5e 0x04 0x00 0x5d 0x04 0x00 0x5c 0x04>; + interrupt-names = "GPU\0MMU\0JOB"; + clocks = <0x0e 0x05 0x02 0x115 0x02 0x116 0x02 0x114>; + clock-names = "clk_mali\0clk_gpu_coregroup\0clk_gpu_stacks\0clk_gpu"; + assigned-clocks = <0x0e 0x05>; + assigned-clock-rates = <0xbebc200>; + power-domains = <0x4d 0x0c>; + operating-points-v2 = <0x4e>; + #cooling-cells = <0x02>; + dynamic-power-coefficient = <0xba6>; + upthreshold = <0x1e>; + downdifferential = <0x0a>; + status = "okay"; + mali-supply = <0x4f>; + mem-supply = <0x4f>; + phandle = <0x4c>; + }; + + gpu-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x50 0x20>; + nvmem-cell-names = "leakage\0specification_serial_number"; + rockchip,supported-hw; + rockchip,pvtm-voltage-sel = <0x00 0x32f 0x00 0x330 0x343 0x01 0x344 0x35c 0x02 0x35d 0x375 0x03 0x376 0x38e 0x04 0x38f 0x270f 0x05>; + rockchip,pvtm-pvtpll; + rockchip,pvtm-offset = <0x1c>; + rockchip,pvtm-freq = <0xc3500>; + rockchip,pvtm-sample-time = <0x44c>; + rockchip,pvtm-volt = <0xb71b0>; + rockchip,pvtm-ref-temp = <0x19>; + rockchip,pvtm-temp-prop = <0xffffff79 0xffffff79>; + rockchip,pvtm-thermal-zone = "gpu-thermal"; + clocks = <0x02 0x114>; + clock-names = "clk"; + rockchip,grf = <0x51>; + volt-mem-read-margin = <0xd0bd8 0x01 0xbac48 0x02 0xa4cb8 0x03 0x78d98 0x04>; + low-volt-mem-read-margin = <0x04>; + intermediate-threshold-freq = <0x61a80>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x2710>; + rockchip,low-temp-min-volt = <0xb71b0>; + rockchip,high-temp = <0x14c08>; + rockchip,high-temp-max-freq = <0xc3500>; + phandle = <0x4e>; + + opp-300000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x11e1a300>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-400000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-500000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x1dcd6500>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-600000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-700000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + opp-microvolt-L1 = <0xa7d8c 0xa7d8c 0xcf850 0xa7d8c 0xa7d8c 0xcf850>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-800000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xb71b0 0xb71b0 0xcf850 0xb71b0 0xb71b0 0xcf850>; + opp-microvolt-L1 = <0xb40dc 0xb40dc 0xcf850 0xb40dc 0xb40dc 0xcf850>; + opp-microvolt-L2 = <0xb1008 0xb1008 0xcf850 0xb1008 0xb1008 0xcf850>; + opp-microvolt-L3 = <0xadf34 0xadf34 0xcf850 0xadf34 0xadf34 0xcf850>; + opp-microvolt-L4 = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + }; + + opp-900000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xc3500 0xc3500 0xcf850 0xc3500 0xc3500 0xcf850>; + opp-microvolt-L1 = <0xc042c 0xc042c 0xcf850 0xc042c 0xc042c 0xcf850>; + opp-microvolt-L2 = <0xbd358 0xbd358 0xcf850 0xbd358 0xbd358 0xcf850>; + opp-microvolt-L3 = <0xba284 0xba284 0xcf850 0xba284 0xba284 0xcf850>; + opp-microvolt-L4 = <0xb71b0 0xb71b0 0xcf850 0xb71b0 0xb71b0 0xcf850>; + }; + + opp-1000000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x3b9aca00>; + opp-microvolt = <0xcf850 0xcf850 0xcf850 0xcf850 0xcf850 0xcf850>; + opp-microvolt-L1 = <0xcc77c 0xcc77c 0xcf850 0xcc77c 0xcc77c 0xcf850>; + opp-microvolt-L2 = <0xc96a8 0xc96a8 0xcf850 0xc96a8 0xc96a8 0xcf850>; + opp-microvolt-L3 = <0xc65d4 0xc65d4 0xcf850 0xc65d4 0xc65d4 0xcf850>; + opp-microvolt-L4 = <0xc3500 0xc3500 0xcf850 0xc3500 0xc3500 0xcf850>; + }; + }; + + usbdrd3_0 { + compatible = "rockchip,rk3588-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x02 0x1a3 0x02 0x1a2 0x02 0x1a1>; + clock-names = "ref\0suspend\0bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "okay"; + + usb@fc000000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfc000000 0x00 0x400000>; + interrupts = <0x00 0xdc 0x04>; + power-domains = <0x4d 0x1f>; + resets = <0x02 0x2a4>; + reset-names = "usb3-otg"; + dr_mode = "host"; + phys = <0x52 0x53>; + phy-names = "usb2-phy\0usb3-phy"; + phy_type = "utmi_wide"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,parkmode-disable-ss-quirk; + status = "okay"; + usb-role-switch; + + port { + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x54>; + phandle = <0x163>; + }; + }; + }; + }; + + usb@fc800000 { + compatible = "rockchip,rk3588-ehci\0generic-ehci"; + reg = <0x00 0xfc800000 0x00 0x40000>; + interrupts = <0x00 0xd7 0x04>; + clocks = <0x02 0x19d 0x02 0x19e 0x55>; + clock-names = "usbhost\0arbiter\0utmi"; + companion = <0x56>; + phys = <0x57>; + phy-names = "usb2-phy"; + power-domains = <0x4d 0x1f>; + status = "okay"; + }; + + usb@fc840000 { + compatible = "generic-ohci"; + reg = <0x00 0xfc840000 0x00 0x40000>; + interrupts = <0x00 0xd8 0x04>; + clocks = <0x02 0x19d 0x02 0x19e 0x55>; + clock-names = "usbhost\0arbiter\0utmi"; + phys = <0x57>; + phy-names = "usb2-phy"; + power-domains = <0x4d 0x1f>; + status = "okay"; + phandle = <0x56>; + }; + + usb@fc880000 { + compatible = "rockchip,rk3588-ehci\0generic-ehci"; + reg = <0x00 0xfc880000 0x00 0x40000>; + interrupts = <0x00 0xda 0x04>; + clocks = <0x02 0x19f 0x02 0x1a0 0x58>; + clock-names = "usbhost\0arbiter\0utmi"; + companion = <0x59>; + phys = <0x5a>; + phy-names = "usb2-phy"; + power-domains = <0x4d 0x1f>; + status = "okay"; + }; + + usb@fc8c0000 { + compatible = "generic-ohci"; + reg = <0x00 0xfc8c0000 0x00 0x40000>; + interrupts = <0x00 0xdb 0x04>; + clocks = <0x02 0x19f 0x02 0x1a0 0x58>; + clock-names = "usbhost\0arbiter\0utmi"; + phys = <0x5a>; + phy-names = "usb2-phy"; + power-domains = <0x4d 0x1f>; + status = "okay"; + phandle = <0x59>; + }; + + iommu@fc900000 { + compatible = "arm,smmu-v3"; + reg = <0x00 0xfc900000 0x00 0x200000>; + interrupts = <0x00 0x171 0x04 0x00 0x173 0x04 0x00 0x176 0x04 0x00 0x16f 0x04>; + interrupt-names = "eventq\0gerror\0priq\0cmdq-sync"; + #iommu-cells = <0x01>; + status = "disabled"; + }; + + iommu@fcb00000 { + compatible = "arm,smmu-v3"; + reg = <0x00 0xfcb00000 0x00 0x200000>; + interrupts = <0x00 0x17d 0x04 0x00 0x17f 0x04 0x00 0x182 0x04 0x00 0x17b 0x04>; + interrupt-names = "eventq\0gerror\0priq\0cmdq-sync"; + #iommu-cells = <0x01>; + status = "disabled"; + }; + + usbhost3_0 { + compatible = "rockchip,rk3588-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x02 0x179 0x02 0x178 0x02 0x177 0x02 0x17a 0x02 0x166 0x02 0x181>; + clock-names = "ref\0suspend\0bus\0utmi\0php\0pipe"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "disabled"; + + usb@fcd00000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfcd00000 0x00 0x400000>; + interrupts = <0x00 0xde 0x04>; + resets = <0x02 0x237>; + reset-names = "usb3-host"; + dr_mode = "host"; + phys = <0x5b 0x04>; + phy-names = "usb3-phy"; + phy_type = "utmi_wide"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,dis_rxdet_inp3_quirk; + snps,parkmode-disable-ss-quirk; + status = "disabled"; + }; + }; + + syscon@fd588000 { + compatible = "rockchip,rk3588-pmu0-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfd588000 0x00 0x2000>; + + reboot-mode { + compatible = "syscon-reboot-mode"; + offset = <0x80>; + mode-bootloader = <0x5242c301>; + mode-charge = <0x5242c30b>; + mode-fastboot = <0x5242c309>; + mode-loader = <0x5242c301>; + mode-normal = <0x5242c300>; + mode-recovery = <0x5242c303>; + mode-ums = <0x5242c30c>; + mode-panic = <0x5242c307>; + mode-watchdog = <0x5242c308>; + }; + }; + + syscon@fd58a000 { + compatible = "rockchip,rk3588-pmu1-grf\0syscon"; + reg = <0x00 0xfd58a000 0x00 0x2000>; + phandle = <0xe6>; + }; + + syscon@fd58c000 { + compatible = "rockchip,rk3588-sys-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfd58c000 0x00 0x1000>; + phandle = <0xb7>; + + rgb { + compatible = "rockchip,rk3588-rgb"; + pinctrl-names = "default"; + pinctrl-0 = <0x5c>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x36>; + status = "disabled"; + phandle = <0xd2>; + }; + }; + }; + }; + }; + + syscon@fd590000 { + compatible = "rockchip,rk3588-bigcore0-grf\0syscon"; + reg = <0x00 0xfd590000 0x00 0x100>; + phandle = <0x24>; + }; + + syscon@fd592000 { + compatible = "rockchip,rk3588-bigcore1-grf\0syscon"; + reg = <0x00 0xfd592000 0x00 0x100>; + phandle = <0x26>; + }; + + syscon@fd594000 { + compatible = "rockchip,rk3588-litcore-grf\0syscon"; + reg = <0x00 0xfd594000 0x00 0x100>; + phandle = <0x21>; + }; + + syscon@fd598000 { + compatible = "rockchip,rk3588-dsu-grf\0syscon"; + reg = <0x00 0xfd598000 0x00 0x100>; + phandle = <0x22>; + }; + + syscon@fd5a0000 { + compatible = "rockchip,rk3588-gpu-grf\0syscon"; + reg = <0x00 0xfd5a0000 0x00 0x100>; + phandle = <0x51>; + }; + + syscon@fd5a2000 { + compatible = "rockchip,rk3588-npu-grf\0syscon"; + reg = <0x00 0xfd5a2000 0x00 0x100>; + phandle = <0x9d>; + }; + + syscon@fd5a4000 { + compatible = "rockchip,rk3588-vop-grf\0syscon"; + reg = <0x00 0xfd5a4000 0x00 0x2000>; + phandle = <0xb9>; + }; + + syscon@fd5a6000 { + compatible = "rockchip,rk3588-vo-grf\0syscon"; + reg = <0x00 0xfd5a6000 0x00 0x2000>; + clocks = <0x5d>; + phandle = <0xd7>; + }; + + syscon@fd5a8000 { + compatible = "rockchip,rk3588-vo-grf\0syscon"; + reg = <0x00 0xfd5a8000 0x00 0x100>; + clocks = <0x5e>; + phandle = <0xba>; + }; + + syscon@fd5ac000 { + compatible = "rockchip,rk3588-usb-grf\0syscon"; + reg = <0x00 0xfd5ac000 0x00 0x4000>; + phandle = <0x5f>; + }; + + syscon@fd5b0000 { + compatible = "rockchip,rk3588-php-grf\0syscon"; + reg = <0x00 0xfd5b0000 0x00 0x1000>; + phandle = <0x61>; + }; + + syscon@fd5b4000 { + compatible = "rockchip,mipi-dphy-grf\0syscon"; + reg = <0x00 0xfd5b4000 0x00 0x1000>; + phandle = <0x173>; + }; + + syscon@fd5b5000 { + compatible = "rockchip,mipi-dphy-grf\0syscon"; + reg = <0x00 0xfd5b5000 0x00 0x1000>; + phandle = <0x1a7>; + }; + + syscon@fd5bc000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfd5bc000 0x00 0x100>; + phandle = <0x174>; + }; + + syscon@fd5c4000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfd5c4000 0x00 0x100>; + phandle = <0x175>; + }; + + syscon@fd5c8000 { + compatible = "rockchip,rk3588-usbdpphy-grf\0syscon"; + reg = <0x00 0xfd5c8000 0x00 0x4000>; + phandle = <0x16d>; + }; + + syscon@fd5d0000 { + compatible = "rockchip,rk3588-usb2phy-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfd5d0000 0x00 0x4000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + phandle = <0x16c>; + + usb2-phy@0 { + compatible = "rockchip,rk3588-usb2phy"; + reg = <0x00 0x10>; + interrupts = <0x00 0x189 0x04>; + resets = <0x02 0xc0047 0x02 0x488>; + reset-names = "phy\0apb"; + clocks = <0x02 0x2b5>; + clock-names = "phyclk"; + clock-output-names = "usb480m_phy0"; + #clock-cells = <0x00>; + rockchip,usbctrl-grf = <0x5f>; + status = "okay"; + phandle = <0x16e>; + + otg-port { + #phy-cells = <0x00>; + status = "okay"; + rockchip,typec-vbus-det; + phandle = <0x52>; + }; + }; + }; + + syscon@fd5d8000 { + compatible = "rockchip,rk3588-usb2phy-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfd5d8000 0x00 0x4000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + + usb2-phy@8000 { + compatible = "rockchip,rk3588-usb2phy"; + reg = <0x8000 0x10>; + interrupts = <0x00 0x187 0x04>; + resets = <0x02 0xc0049 0x02 0x48a>; + reset-names = "phy\0apb"; + clocks = <0x02 0x2b5>; + clock-names = "phyclk"; + clock-output-names = "usb480m_phy2"; + #clock-cells = <0x00>; + status = "okay"; + phandle = <0x55>; + + host-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x60>; + phandle = <0x57>; + }; + }; + }; + + syscon@fd5dc000 { + compatible = "rockchip,rk3588-usb2phy-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfd5dc000 0x00 0x4000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + + usb2-phy@c000 { + compatible = "rockchip,rk3588-usb2phy"; + reg = <0xc000 0x10>; + interrupts = <0x00 0x188 0x04>; + resets = <0x02 0xc004a 0x02 0x48b>; + reset-names = "phy\0apb"; + clocks = <0x02 0x2b5>; + clock-names = "phyclk"; + clock-output-names = "usb480m_phy3"; + #clock-cells = <0x00>; + status = "okay"; + phandle = <0x58>; + + host-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x60>; + phandle = <0x5a>; + }; + }; + }; + + syscon@fd5e0000 { + compatible = "rockchip,rk3588-hdptxphy-grf\0syscon"; + reg = <0x00 0xfd5e0000 0x00 0x100>; + phandle = <0x16b>; + }; + + syscon@fd5e8000 { + compatible = "rockchip,mipi-dcphy-grf\0syscon"; + reg = <0x00 0xfd5e8000 0x00 0x4000>; + phandle = <0x171>; + }; + + syscon@fd5ec000 { + compatible = "rockchip,mipi-dcphy-grf\0syscon"; + reg = <0x00 0xfd5ec000 0x00 0x4000>; + phandle = <0x172>; + }; + + syscon@fd5f0000 { + compatible = "rockchip,rk3588-ioc\0syscon"; + reg = <0x00 0xfd5f0000 0x00 0x10000>; + phandle = <0x176>; + }; + + clock-controller@fd7c0000 { + compatible = "rockchip,rk3588-cru"; + rockchip,grf = <0x61>; + reg = <0x00 0xfd7c0000 0x00 0x5c000>; + #clock-cells = <0x01>; + #reset-cells = <0x01>; + assigned-clocks = <0x02 0x09 0x02 0x05 0x02 0x08 0x02 0x07 0x02 0xd8 0x02 0xda 0x02 0xd9 0x02 0x10e 0x02 0x10f 0x02 0x110 0x02 0x299 0x02 0x29a 0x02 0x7b 0x02 0xec 0x02 0x114 0x02 0x208 0x02 0x20e>; + assigned-clock-rates = <0x4190ab00 0x2ee00000 0x32a9f880 0x46cf7100 0x29d7ab80 0x17d78400 0x1dcd6500 0x2faf0800 0x5f5e100 0x17d78400 0x5f5e100 0xbebc200 0x165a0bc0 0x8f0d180 0xbebc200 0xb71b00 0xb71b00>; + phandle = <0x02>; + }; + + i2c@fd880000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfd880000 0x00 0x1000>; + clocks = <0x02 0x287 0x02 0x286>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x13d 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x62>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + rk8602@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; + vin-supply = <0x63>; + regulator-compatible = "rk860x-reg"; + regulator-name = "vdd_cpu_big0_s0"; + regulator-min-microvolt = <0x86470>; + regulator-max-microvolt = <0x100590>; + regulator-ramp-delay = <0x8fc>; + rockchip,suspend-voltage-selector = <0x01>; + regulator-boot-on; + regulator-always-on; + phandle = <0x18>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + rk8603@43 { + compatible = "rockchip,rk8603"; + reg = <0x43>; + vin-supply = <0x63>; + regulator-compatible = "rk860x-reg"; + regulator-name = "vdd_cpu_big1_s0"; + regulator-min-microvolt = <0x86470>; + regulator-max-microvolt = <0x100590>; + regulator-ramp-delay = <0x8fc>; + rockchip,suspend-voltage-selector = <0x01>; + regulator-boot-on; + regulator-always-on; + phandle = <0x1c>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + + serial@fd890000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfd890000 0x00 0x100>; + interrupts = <0x00 0x14b 0x04>; + clocks = <0x02 0x2ae 0x02 0x2af>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x64 0x06 0x64 0x07>; + pinctrl-names = "default"; + pinctrl-0 = <0x65>; + status = "disabled"; + }; + + pwm@fd8b0000 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfd8b0000 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x66>; + clocks = <0x02 0x2a5 0x02 0x2a4>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fd8b0010 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfd8b0010 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x67>; + clocks = <0x02 0x2a5 0x02 0x2a4>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fd8b0020 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfd8b0020 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x68>; + clocks = <0x02 0x2a5 0x02 0x2a4>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@fd8b0030 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfd8b0030 0x00 0x10>; + interrupts = <0x00 0x158 0x04 0x00 0x159 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x69>; + clocks = <0x02 0x2a5 0x02 0x2a4>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + power-management@fd8d8000 { + compatible = "rockchip,rk3588-pmu\0syscon\0simple-mfd"; + reg = <0x00 0xfd8d8000 0x00 0x400>; + phandle = <0xbb>; + + power-controller { + compatible = "rockchip,rk3588-power-controller"; + #power-domain-cells = <0x01>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x4d>; + + power-domain@8 { + reg = <0x08>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + power-domain@9 { + reg = <0x09>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0x12f 0x02 0x131 0x02 0x130 0x02 0x126>; + pm_qos = <0x6a 0x6b 0x6c>; + + power-domain@10 { + reg = <0x0a>; + clocks = <0x02 0x12f 0x02 0x131 0x02 0x130>; + pm_qos = <0x6d>; + }; + + power-domain@11 { + reg = <0x0b>; + clocks = <0x02 0x12f 0x02 0x131 0x02 0x130>; + pm_qos = <0x6e>; + }; + }; + }; + + power-domain@12 { + reg = <0x0c>; + clocks = <0x02 0x114 0x02 0x115 0x02 0x116>; + pm_qos = <0x6f 0x70 0x71 0x72>; + }; + + power-domain@13 { + reg = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + power-domain@14 { + reg = <0x0e>; + clocks = <0x02 0x18f 0x02 0x1be 0x02 0x1bc 0x02 0x190 0x02 0x18e>; + pm_qos = <0x73>; + }; + + power-domain@15 { + reg = <0x0f>; + clocks = <0x02 0x194 0x02 0x1be 0x02 0x1bc 0x02 0x195>; + pm_qos = <0x74>; + }; + + power-domain@16 { + reg = <0x10>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0x1c4 0x02 0x1c5>; + pm_qos = <0x75 0x76 0x77>; + + power-domain@17 { + reg = <0x11>; + clocks = <0x02 0x1c9 0x02 0x1c4 0x02 0x1c5 0x02 0x1ca>; + pm_qos = <0x78 0x79 0x7a>; + }; + }; + }; + + power-domain@21 { + reg = <0x15>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0x1be 0x02 0x1bd 0x02 0x1bc 0x02 0x1bf 0x02 0x1aa 0x02 0x1a9 0x02 0x1ac 0x02 0x1ad 0x02 0x1ae 0x02 0x1af 0x02 0x1b0 0x02 0x1b1 0x02 0x1b2 0x02 0x1b3 0x02 0x1b4 0x02 0x1b5 0x02 0x1b7 0x02 0x1b6>; + pm_qos = <0x7b 0x7c 0x7d 0x7e 0x7f 0x80 0x81 0x82>; + + power-domain@23 { + reg = <0x17>; + clocks = <0x02 0x4b 0x02 0x49 0x02 0x1be>; + pm_qos = <0x83>; + }; + + power-domain@14 { + reg = <0x0e>; + clocks = <0x02 0x18f 0x02 0x1be 0x02 0x1bc 0x02 0x190>; + pm_qos = <0x73>; + }; + + power-domain@15 { + reg = <0x0f>; + clocks = <0x02 0x194 0x02 0x1be 0x02 0x1bc>; + pm_qos = <0x74>; + }; + + power-domain@22 { + reg = <0x16>; + clocks = <0x02 0x1ba 0x02 0x1b9>; + pm_qos = <0x84>; + }; + }; + + power-domain@24 { + reg = <0x18>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0x26e 0x02 0x26d 0x02 0x270>; + pm_qos = <0x85 0x86>; + + power-domain@25 { + reg = <0x19>; + clocks = <0x02 0x1f6 0x02 0x1f7 0x02 0x1f5 0x02 0x1f3 0x02 0x1ee 0x02 0x1ed 0x02 0x26d>; + pm_qos = <0x87>; + }; + }; + + power-domain@26 { + reg = <0x1a>; + clocks = <0x02 0x22e 0x02 0x22f 0x02 0x22d 0x02 0x218 0x02 0x217 0x02 0x22b 0x02 0x264>; + pm_qos = <0x88 0x89>; + }; + + power-domain@27 { + reg = <0x1b>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0x1e1 0x02 0x1e2 0x02 0x1df 0x02 0x1de 0x02 0x1e5 0x02 0x1e4>; + pm_qos = <0x8a 0x8b 0x8c 0x8d>; + + power-domain@28 { + reg = <0x1c>; + clocks = <0x02 0x121 0x02 0x120 0x02 0x1e1 0x02 0x1e2>; + pm_qos = <0x8e 0x8f>; + }; + + power-domain@29 { + reg = <0x1d>; + clocks = <0x02 0x1d6 0x02 0x1d5 0x02 0x1d9 0x02 0x1d8 0x02 0x1e2>; + pm_qos = <0x90 0x91>; + }; + }; + + power-domain@30 { + reg = <0x1e>; + clocks = <0x02 0x189 0x02 0x18a>; + pm_qos = <0x92>; + }; + + power-domain@31 { + reg = <0x1f>; + clocks = <0x02 0x166 0x02 0x19b 0x02 0x19c 0x02 0x19d 0x02 0x19e 0x02 0x19f 0x02 0x1a0>; + pm_qos = <0x93 0x94 0x95 0x96>; + }; + + power-domain@33 { + reg = <0x21>; + clocks = <0x02 0x166 0x02 0x169 0x02 0x16a>; + }; + + power-domain@34 { + reg = <0x22>; + clocks = <0x02 0x166 0x02 0x169 0x02 0x16a>; + }; + + power-domain@37 { + reg = <0x25>; + clocks = <0x02 0x199 0x02 0x140>; + pm_qos = <0x97>; + }; + + power-domain@38 { + reg = <0x26>; + clocks = <0x02 0x3c 0x02 0x3d>; + }; + + power-domain@40 { + reg = <0x28>; + pm_qos = <0x98>; + }; + }; + }; + + pvtm@fda40000 { + compatible = "rockchip,rk3588-bigcore0-pvtm"; + reg = <0x00 0xfda40000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@0 { + reg = <0x00>; + clocks = <0x02 0x2c6 0x02 0x15>; + clock-names = "clk\0pclk"; + }; + }; + + pvtm@fda50000 { + compatible = "rockchip,rk3588-bigcore1-pvtm"; + reg = <0x00 0xfda50000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@1 { + reg = <0x01>; + clocks = <0x02 0x2c8 0x02 0x17>; + clock-names = "clk\0pclk"; + }; + }; + + pvtm@fda60000 { + compatible = "rockchip,rk3588-litcore-pvtm"; + reg = <0x00 0xfda60000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@2 { + reg = <0x02>; + clocks = <0x02 0x2ca 0x02 0x1b>; + clock-names = "clk\0pclk"; + }; + }; + + pvtm@fdaf0000 { + compatible = "rockchip,rk3588-npu-pvtm"; + reg = <0x00 0xfdaf0000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@3 { + reg = <0x03>; + clocks = <0x02 0x12b 0x02 0x129>; + clock-names = "clk\0pclk"; + resets = <0x02 0x1de 0x02 0x1dc>; + reset-names = "rts\0rst-p"; + }; + }; + + pvtm@fdb30000 { + compatible = "rockchip,rk3588-gpu-pvtm"; + reg = <0x00 0xfdb30000 0x00 0x100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + pvtm@4 { + reg = <0x04>; + clocks = <0x02 0x118>; + clock-names = "clk"; + resets = <0x02 0x430 0x02 0x42f>; + reset-names = "rts\0rst-p"; + }; + }; + + npu@fdab0000 { + compatible = "rockchip,rk3588-rknpu"; + reg = <0x00 0xfdab0000 0x00 0x10000 0x00 0xfdac0000 0x00 0x10000 0x00 0xfdad0000 0x00 0x10000>; + interrupts = <0x00 0x6e 0x04 0x00 0x6f 0x04 0x00 0x70 0x04>; + interrupt-names = "npu0_irq\0npu1_irq\0npu2_irq"; + clocks = <0x0e 0x06 0x02 0x12d 0x02 0x122 0x02 0x124 0x02 0x12e 0x02 0x123 0x02 0x125 0x02 0x131>; + clock-names = "clk_npu\0aclk0\0aclk1\0aclk2\0hclk0\0hclk1\0hclk2\0pclk"; + assigned-clocks = <0x0e 0x06>; + assigned-clock-rates = <0xbebc200>; + resets = <0x02 0x1e6 0x02 0x1b0 0x02 0x1c0 0x02 0x1e8 0x02 0x1b2 0x02 0x1c2>; + reset-names = "srst_a0\0srst_a1\0srst_a2\0srst_h0\0srst_h1\0srst_h2"; + power-domains = <0x4d 0x09 0x4d 0x0a 0x4d 0x0b>; + power-domain-names = "npu0\0npu1\0npu2"; + operating-points-v2 = <0x99>; + iommus = <0x9a>; + status = "okay"; + rknpu-supply = <0x9b>; + mem-supply = <0x9b>; + }; + + npu-opp-table { + compatible = "operating-points-v2"; + nvmem-cells = <0x9c 0x20>; + nvmem-cell-names = "leakage\0specification_serial_number"; + rockchip,supported-hw; + rockchip,pvtm-voltage-sel = <0x00 0x32f 0x00 0x330 0x343 0x01 0x344 0x35c 0x02 0x35d 0x375 0x03 0x376 0x38e 0x04 0x38f 0x270f 0x05>; + rockchip,pvtm-pvtpll; + rockchip,pvtm-offset = <0x50>; + rockchip,pvtm-sample-time = <0x44c>; + rockchip,pvtm-freq = <0xc3500>; + rockchip,pvtm-volt = <0xb71b0>; + rockchip,pvtm-ref-temp = <0x19>; + rockchip,pvtm-temp-prop = <0xffffff8f 0xffffff8f>; + rockchip,pvtm-thermal-zone = "npu-thermal"; + clocks = <0x02 0x12a>; + clock-names = "pclk"; + rockchip,grf = <0x9d>; + volt-mem-read-margin = <0xd0bd8 0x01 0xbac48 0x02 0xa4cb8 0x03 0x78d98 0x04>; + low-volt-read-margin = <0x04>; + intermediate-threshold-freq = <0x7a120>; + rockchip,init-freq = <0xf4240>; + rockchip,temp-hysteresis = <0x1388>; + rockchip,low-temp = <0x2710>; + rockchip,low-temp-min-volt = <0xb71b0>; + rockchip,high-temp = <0x14c08>; + rockchip,high-temp-max-freq = <0xc3500>; + phandle = <0x99>; + + opp-300000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x11e1a300>; + opp-microvolt = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + opp-microvolt-L1 = <0xa7d8c 0xa7d8c 0xcf850 0xa7d8c 0xa7d8c 0xcf850>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L3 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-400000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x17d78400>; + opp-microvolt = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + opp-microvolt-L1 = <0xa7d8c 0xa7d8c 0xcf850 0xa7d8c 0xa7d8c 0xcf850>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L3 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-500000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x1dcd6500>; + opp-microvolt = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + opp-microvolt-L1 = <0xa7d8c 0xa7d8c 0xcf850 0xa7d8c 0xa7d8c 0xcf850>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L3 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-600000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x23c34600>; + opp-microvolt = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + opp-microvolt-L1 = <0xa7d8c 0xa7d8c 0xcf850 0xa7d8c 0xa7d8c 0xcf850>; + opp-microvolt-L2 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L3 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-700000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x29b92700>; + opp-microvolt = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + opp-microvolt-L3 = <0xa7d8c 0xa7d8c 0xcf850 0xa7d8c 0xa7d8c 0xcf850>; + opp-microvolt-L4 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + opp-microvolt-L5 = <0xa4cb8 0xa4cb8 0xcf850 0xa4cb8 0xa4cb8 0xcf850>; + }; + + opp-800000000 { + opp-supported-hw = <0xff 0xffff>; + opp-hz = <0x00 0x2faf0800>; + opp-microvolt = <0xb71b0 0xb71b0 0xcf850 0xb71b0 0xb71b0 0xcf850>; + opp-microvolt-L2 = <0xb40dc 0xb40dc 0xcf850 0xb40dc 0xb40dc 0xcf850>; + opp-microvolt-L3 = <0xb1008 0xb1008 0xcf850 0xb1008 0xb1008 0xcf850>; + opp-microvolt-L4 = <0xadf34 0xadf34 0xcf850 0xadf34 0xadf34 0xcf850>; + opp-microvolt-L5 = <0xaae60 0xaae60 0xcf850 0xaae60 0xaae60 0xcf850>; + }; + + opp-900000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x35a4e900>; + opp-microvolt = <0xc3500 0xc3500 0xcf850 0xc3500 0xc3500 0xcf850>; + opp-microvolt-L1 = <0xc042c 0xc042c 0xcf850 0xc042c 0xc042c 0xcf850>; + opp-microvolt-L2 = <0xbd358 0xbd358 0xcf850 0xbd358 0xbd358 0xcf850>; + opp-microvolt-L3 = <0xba284 0xba284 0xcf850 0xba284 0xba284 0xcf850>; + opp-microvolt-L4 = <0xb71b0 0xb71b0 0xcf850 0xb71b0 0xb71b0 0xcf850>; + opp-microvolt-L5 = <0xb40dc 0xb40dc 0xcf850 0xb40dc 0xb40dc 0xcf850>; + }; + + opp-1000000000 { + opp-supported-hw = <0xfb 0xffff>; + opp-hz = <0x00 0x3b9aca00>; + opp-microvolt = <0xcf850 0xcf850 0xcf850 0xcf850 0xcf850 0xcf850>; + opp-microvolt-L1 = <0xcc77c 0xcc77c 0xcf850 0xcc77c 0xcc77c 0xcf850>; + opp-microvolt-L2 = <0xc96a8 0xc96a8 0xcf850 0xc96a8 0xc96a8 0xcf850>; + opp-microvolt-L3 = <0xc65d4 0xc65d4 0xcf850 0xc65d4 0xc65d4 0xcf850>; + opp-microvolt-L4 = <0xc3500 0xc3500 0xcf850 0xc3500 0xc3500 0xcf850>; + opp-microvolt-L5 = <0xc042c 0xc042c 0xcf850 0xc042c 0xc042c 0xcf850>; + }; + }; + + iommu@fdab9000 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdab9000 0x00 0x100 0x00 0xfdaba000 0x00 0x100 0x00 0xfdaca000 0x00 0x100 0x00 0xfdada000 0x00 0x100>; + interrupts = <0x00 0x6e 0x04 0x00 0x6f 0x04 0x00 0x70 0x04>; + interrupt-names = "npu0_mmu\0npu1_mmu\0npu2_mmu"; + clocks = <0x02 0x12d 0x02 0x122 0x02 0x124 0x02 0x12e 0x02 0x123 0x02 0x125>; + clock-names = "aclk0\0aclk1\0aclk2\0iface0\0iface1\0iface2"; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x9a>; + }; + + vepu@fdb50000 { + compatible = "rockchip,vpu-encoder-v2"; + reg = <0x00 0xfdb50000 0x00 0x400>; + interrupts = <0x00 0x78 0x04>; + interrupt-names = "irq_vepu"; + clocks = <0x02 0x1c0 0x02 0x1c1>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x2367b880 0x00>; + assigned-clocks = <0x02 0x1c0>; + assigned-clock-rates = <0x2367b880>; + resets = <0x02 0x2c8 0x02 0x2c9>; + reset-names = "shared_video_a\0shared_video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0x9e>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x00>; + rockchip,resetgroup-node = <0x00>; + power-domains = <0x4d 0x15>; + status = "disabled"; + }; + + vdpu@fdb50400 { + compatible = "rockchip,vpu-decoder-v2"; + reg = <0x00 0xfdb50400 0x00 0x400>; + interrupts = <0x00 0x77 0x04>; + interrupt-names = "irq_vdpu"; + clocks = <0x02 0x1c0 0x02 0x1c1>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x2367b880 0x00>; + assigned-clocks = <0x02 0x1c0>; + assigned-clock-rates = <0x2367b880>; + resets = <0x02 0x2c8 0x02 0x2c9>; + reset-names = "shared_video_a\0shared_video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0x9e>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x00>; + rockchip,resetgroup-node = <0x00>; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + iommu@fdb50800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdb50800 0x00 0x40>; + interrupts = <0x00 0x76 0x04>; + interrupt-names = "irq_vdpu_mmu"; + clocks = <0x02 0x1c0 0x02 0x1c1>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x15>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0x9e>; + }; + + avsd-plus@fdb51000 { + compatible = "rockchip,avs-plus-decoder"; + reg = <0x00 0xfdb51000 0x00 0x200>; + interrupts = <0x00 0x77 0x04>; + interrupt-names = "irq_avsd"; + clocks = <0x02 0x1c0 0x02 0x1c1>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + resets = <0x02 0x2c8 0x02 0x2c9>; + reset-names = "shared_video_a\0shared_video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0x9e>; + power-domains = <0x4d 0x15>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x00>; + rockchip,resetgroup-node = <0x00>; + status = "disabled"; + }; + + rga@fdb60000 { + compatible = "rockchip,rga3_core0"; + reg = <0x00 0xfdb60000 0x00 0x1000>; + interrupts = <0x00 0x72 0x04>; + interrupt-names = "rga3_core0_irq"; + clocks = <0x02 0x1ba 0x02 0x1b9 0x02 0x1bb>; + clock-names = "aclk_rga3_0\0hclk_rga3_0\0clk_rga3_0"; + power-domains = <0x4d 0x16>; + iommus = <0xa0>; + status = "okay"; + }; + + iommu@fdb60f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdb60f00 0x00 0x100>; + interrupts = <0x00 0x72 0x04>; + interrupt-names = "rga3_0_mmu"; + clocks = <0x02 0x1ba 0x02 0x1b9>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x16>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa0>; + }; + + rga@fdb70000 { + compatible = "rockchip,rga3_core1"; + reg = <0x00 0xfdb70000 0x00 0x1000>; + interrupts = <0x00 0x73 0x04>; + interrupt-names = "rga3_core1_irq"; + clocks = <0x02 0x18a 0x02 0x189 0x02 0x18b>; + clock-names = "aclk_rga3_1\0hclk_rga3_1\0clk_rga3_1"; + power-domains = <0x4d 0x1e>; + iommus = <0xa1>; + status = "okay"; + }; + + iommu@fdb70f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdb70f00 0x00 0x100>; + interrupts = <0x00 0x73 0x04>; + interrupt-names = "rga3_1_mmu"; + clocks = <0x02 0x18a 0x02 0x189>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x1e>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa1>; + }; + + rga@fdb80000 { + compatible = "rockchip,rga2_core0"; + reg = <0x00 0xfdb80000 0x00 0x1000>; + interrupts = <0x00 0x74 0x04>; + interrupt-names = "rga2_irq"; + clocks = <0x02 0x1b7 0x02 0x1b6 0x02 0x1b8>; + clock-names = "aclk_rga2\0hclk_rga2\0clk_rga2"; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + jpegd@fdb90000 { + compatible = "rockchip,rkv-jpeg-decoder-v1"; + reg = <0x00 0xfdb90000 0x00 0x400>; + interrupts = <0x00 0x81 0x04>; + interrupt-names = "irq_jpegd"; + clocks = <0x02 0x1b4 0x02 0x1b5>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x23c34600 0x00>; + assigned-clocks = <0x02 0x1b4>; + assigned-clock-rates = <0x23c34600>; + resets = <0x02 0x2d2 0x02 0x2d3>; + reset-names = "video_a\0video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0xa2>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x01>; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + iommu@fdb90480 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdb90480 0x00 0x40>; + interrupts = <0x00 0x82 0x04>; + interrupt-names = "irq_jpegd_mmu"; + clocks = <0x02 0x1b4 0x02 0x1b5>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x15>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa2>; + }; + + jpege-core@fdba0000 { + compatible = "rockchip,vpu-jpege-core"; + reg = <0x00 0xfdba0000 0x00 0x400>; + interrupts = <0x00 0x7a 0x04>; + interrupt-names = "irq_jpege0"; + clocks = <0x02 0x1ac 0x02 0x1ad>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x2367b880 0x00>; + assigned-clocks = <0x02 0x1ac>; + assigned-clock-rates = <0x2367b880>; + resets = <0x02 0x2ca 0x02 0x2cb>; + reset-names = "video_a\0video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0xa3>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x02>; + rockchip,ccu = <0xa4>; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + iommu@fdba0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdba0800 0x00 0x40>; + interrupts = <0x00 0x79 0x04>; + interrupt-names = "irq_jpege0_mmu"; + clocks = <0x02 0x1ac 0x02 0x1ad>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x15>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa3>; + }; + + jpege-core@fdba4000 { + compatible = "rockchip,vpu-jpege-core"; + reg = <0x00 0xfdba4000 0x00 0x400>; + interrupts = <0x00 0x7c 0x04>; + interrupt-names = "irq_jpege1"; + clocks = <0x02 0x1ae 0x02 0x1af>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x2367b880 0x00>; + assigned-clocks = <0x02 0x1ae>; + assigned-clock-rates = <0x2367b880>; + resets = <0x02 0x2cc 0x02 0x2cd>; + reset-names = "video_a\0video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0xa5>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x02>; + rockchip,ccu = <0xa4>; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + iommu@fdba4800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdba4800 0x00 0x40>; + interrupts = <0x00 0x7b 0x04>; + interrupt-names = "irq_jpege1_mmu"; + clocks = <0x02 0x1ae 0x02 0x1af>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x15>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa5>; + }; + + jpege-core@fdba8000 { + compatible = "rockchip,vpu-jpege-core"; + reg = <0x00 0xfdba8000 0x00 0x400>; + interrupts = <0x00 0x7e 0x04>; + interrupt-names = "irq_jpege2"; + clocks = <0x02 0x1b0 0x02 0x1b1>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x2367b880 0x00>; + assigned-clocks = <0x02 0x1b0>; + assigned-clock-rates = <0x2367b880>; + resets = <0x02 0x2ce 0x02 0x2cf>; + reset-names = "video_a\0video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0xa6>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x02>; + rockchip,ccu = <0xa4>; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + iommu@fdba8800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdba8800 0x00 0x40>; + interrupts = <0x00 0x7d 0x04>; + interrupt-names = "irq_jpege2_mmu"; + clocks = <0x02 0x1b0 0x02 0x1b1>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x15>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa6>; + }; + + jpege-core@fdbac000 { + compatible = "rockchip,vpu-jpege-core"; + reg = <0x00 0xfdbac000 0x00 0x400>; + interrupts = <0x00 0x80 0x04>; + interrupt-names = "irq_jpege3"; + clocks = <0x02 0x1b2 0x02 0x1b3>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x2367b880 0x00>; + assigned-clocks = <0x02 0x1b2>; + assigned-clock-rates = <0x2367b880>; + resets = <0x02 0x2d0 0x02 0x2d1>; + reset-names = "video_a\0video_h"; + rockchip,skip-pmu-idle-request; + iommus = <0xa7>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x02>; + rockchip,ccu = <0xa4>; + power-domains = <0x4d 0x15>; + status = "okay"; + }; + + iommu@fdbac800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdbac800 0x00 0x40>; + interrupts = <0x00 0x7f 0x04>; + interrupt-names = "irq_jpege3_mmu"; + clocks = <0x02 0x1b2 0x02 0x1b3>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x15>; + #iommu-cells = <0x00>; + status = "okay"; + phandle = <0xa7>; + }; + + iep@fdbb0000 { + compatible = "rockchip,iep-v2"; + reg = <0x00 0xfdbb0000 0x00 0x500>; + interrupts = <0x00 0x75 0x04>; + interrupt-names = "irq_iep"; + clocks = <0x02 0x1aa 0x02 0x1a9 0x02 0x1ab>; + clock-names = "aclk\0hclk\0sclk"; + resets = <0x02 0x2d5 0x02 0x2d4 0x02 0x2d6>; + reset-names = "rst_a\0rst_h\0rst_s"; + rockchip,skip-pmu-idle-request; + power-domains = <0x4d 0x15>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x06>; + iommus = <0xa8>; + status = "okay"; + }; + + iommu@fdbb0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdbb0800 0x00 0x100>; + interrupts = <0x00 0x75 0x04>; + interrupt-names = "irq_iep_mmu"; + clocks = <0x02 0x1aa 0x02 0x1a9>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + power-domains = <0x4d 0x15>; + status = "okay"; + phandle = <0xa8>; + }; + + rkvenc-core@fdbd0000 { + compatible = "rockchip,rkv-encoder-v2-core"; + reg = <0x00 0xfdbd0000 0x00 0x6000>; + interrupts = <0x00 0x65 0x04>; + interrupt-names = "irq_rkvenc0"; + clocks = <0x02 0x1c5 0x02 0x1c4 0x02 0x1c6>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_core"; + rockchip,normal-rates = <0x23c34600 0x00 0x2faf0800>; + assigned-clocks = <0x02 0x1c5 0x02 0x1c6>; + assigned-clock-rates = <0x23c34600 0x2faf0800>; + resets = <0x02 0x2f5 0x02 0x2f4 0x02 0x2f6>; + reset-names = "video_a\0video_h\0video_core"; + rockchip,skip-pmu-idle-request; + iommus = <0xa9>; + rockchip,srv = <0x9f>; + rockchip,ccu = <0xaa>; + rockchip,taskqueue-node = <0x07>; + rockchip,task-capacity = <0x08>; + power-domains = <0x4d 0x10>; + status = "okay"; + }; + + iommu@fdbdf000 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdbdf000 0x00 0x40 0x00 0xfdbdf040 0x00 0x40>; + interrupts = <0x00 0x63 0x04 0x00 0x64 0x04>; + interrupt-names = "irq_rkvenc0_mmu0\0irq_rkvenc0_mmu1"; + clocks = <0x02 0x1c5 0x02 0x1c4>; + clock-names = "aclk\0iface"; + rockchip,disable-mmu-reset; + rockchip,enable-cmd-retry; + rockchip,shootdown-entire; + #iommu-cells = <0x00>; + power-domains = <0x4d 0x10>; + status = "okay"; + phandle = <0xa9>; + }; + + rkvenc-core@fdbe0000 { + compatible = "rockchip,rkv-encoder-v2-core"; + reg = <0x00 0xfdbe0000 0x00 0x6000>; + interrupts = <0x00 0x68 0x04>; + interrupt-names = "irq_rkvenc1"; + clocks = <0x02 0x1ca 0x02 0x1c9 0x02 0x1cb>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_core"; + rockchip,normal-rates = <0x23c34600 0x00 0x2faf0800>; + assigned-clocks = <0x02 0x1ca 0x02 0x1cb>; + assigned-clock-rates = <0x23c34600 0x2faf0800>; + resets = <0x02 0x305 0x02 0x304 0x02 0x306>; + reset-names = "video_a\0video_h\0video_core"; + rockchip,skip-pmu-idle-request; + iommus = <0xab>; + rockchip,srv = <0x9f>; + rockchip,ccu = <0xaa>; + rockchip,taskqueue-node = <0x07>; + rockchip,task-capacity = <0x08>; + power-domains = <0x4d 0x11>; + status = "okay"; + }; + + iommu@fdbef000 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdbef000 0x00 0x40 0x00 0xfdbef040 0x00 0x40>; + interrupts = <0x00 0x66 0x04 0x00 0x67 0x04>; + interrupt-names = "irq_rkvenc1_mmu0\0irq_rkvenc1_mmu1"; + clocks = <0x02 0x1ca 0x02 0x1c9>; + lock-names = "aclk\0iface"; + rockchip,disable-mmu-reset; + rockchip,enable-cmd-retry; + rockchip,shootdown-entire; + #iommu-cells = <0x00>; + power-domains = <0x4d 0x11>; + status = "okay"; + phandle = <0xab>; + }; + + rkvdec-ccu@fdc30000 { + compatible = "rockchip,rkv-decoder-v2-ccu"; + reg = <0x00 0xfdc30000 0x00 0x100>; + reg-names = "ccu"; + clocks = <0x02 0x18e>; + clock-names = "aclk_ccu"; + assigned-clocks = <0x02 0x18e>; + assigned-clock-rates = <0x23c34600>; + resets = <0x02 0x282>; + reset-names = "video_ccu"; + rockchip,skip-pmu-idle-request; + power-domains = <0x4d 0x0e>; + status = "okay"; + phandle = <0xad>; + }; + + rkvdec-core@fdc38000 { + compatible = "rockchip,rkv-decoder-v2"; + reg = <0x00 0xfdc38100 0x00 0x400 0x00 0xfdc38000 0x00 0x100>; + reg-names = "regs\0link"; + interrupts = <0x00 0x5f 0x04>; + interrupt-names = "irq_rkvdec0"; + clocks = <0x02 0x190 0x02 0x18f 0x02 0x193 0x02 0x191 0x02 0x192>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_core\0clk_cabac\0clk_hevc_cabac"; + rockchip,normal-rates = <0x2faf0800 0x00 0x23c34600 0x23c34600 0x3b9aca00>; + assigned-clocks = <0x02 0x190 0x02 0x193 0x02 0x191 0x02 0x192>; + assigned-clock-rates = <0x2faf0800 0x23c34600 0x23c34600 0x3b9aca00>; + resets = <0x02 0x284 0x02 0x283 0x02 0x289 0x02 0x287 0x02 0x288>; + reset-names = "video_a\0video_h\0video_core\0video_cabac\0video_hevc_cabac"; + rockchip,skip-pmu-idle-request; + iommus = <0xac>; + rockchip,srv = <0x9f>; + rockchip,ccu = <0xad>; + rockchip,core-mask = <0x10001>; + rockchip,taskqueue-node = <0x09>; + rockchip,sram = <0xae>; + rockchip,rcb-iova = <0xfff00000 0x100000>; + rockchip,rcb-min-width = <0x200>; + power-domains = <0x4d 0x0e>; + status = "okay"; + }; + + iommu@fdc38700 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdc38700 0x00 0x40 0x00 0xfdc38740 0x00 0x40>; + interrupts = <0x00 0x60 0x04>; + interrupt-names = "irq_rkvdec0_mmu"; + clocks = <0x02 0x190 0x02 0x18f>; + clock-names = "aclk\0iface"; + rockchip,disable-mmu-reset; + rockchip,enable-cmd-retry; + rockchip,shootdown-entire; + rockchip,master-handle-irq; + #iommu-cells = <0x00>; + power-domains = <0x4d 0x0e>; + status = "okay"; + phandle = <0xac>; + }; + + rkvdec-core@fdc48000 { + compatible = "rockchip,rkv-decoder-v2"; + reg = <0x00 0xfdc48100 0x00 0x400 0x00 0xfdc48000 0x00 0x100>; + reg-names = "regs\0link"; + interrupts = <0x00 0x61 0x04>; + interrupt-names = "irq_rkvdec1"; + clocks = <0x02 0x195 0x02 0x194 0x02 0x198 0x02 0x196 0x02 0x197>; + clock-names = "aclk_vcodec\0hclk_vcodec\0clk_core\0clk_cabac\0clk_hevc_cabac"; + rockchip,normal-rates = <0x2faf0800 0x00 0x23c34600 0x23c34600 0x3b9aca00>; + assigned-clocks = <0x02 0x195 0x02 0x198 0x02 0x196 0x02 0x197>; + assigned-clock-rates = <0x2faf0800 0x23c34600 0x23c34600 0x3b9aca00>; + resets = <0x02 0x293 0x02 0x292 0x02 0x298 0x02 0x296 0x02 0x297>; + reset-names = "video_a\0video_h\0video_core\0video_cabac\0video_hevc_cabac"; + rockchip,skip-pmu-idle-request; + iommus = <0xaf>; + rockchip,srv = <0x9f>; + rockchip,ccu = <0xad>; + rockchip,core-mask = <0x20002>; + rockchip,taskqueue-node = <0x09>; + rockchip,sram = <0xb0>; + rockchip,rcb-iova = <0xffe00000 0x100000>; + rockchip,rcb-min-width = <0x200>; + power-domains = <0x4d 0x0f>; + status = "okay"; + }; + + iommu@fdc48700 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdc48700 0x00 0x40 0x00 0xfdc48740 0x00 0x40>; + interrupts = <0x00 0x62 0x04>; + interrupt-names = "irq_rkvdec1_mmu"; + clocks = <0x02 0x195 0x02 0x194>; + clock-names = "aclk\0iface"; + rockchip,disable-mmu-reset; + rockchip,enable-cmd-retry; + rockchip,shootdown-entire; + rockchip,master-handle-irq; + #iommu-cells = <0x00>; + power-domains = <0x4d 0x0f>; + status = "okay"; + phandle = <0xaf>; + }; + + av1d@fdc70000 { + compatible = "rockchip,av1-decoder"; + reg = <0x00 0xfdc70000 0x00 0x800 0x00 0xfdc80000 0x00 0x400 0x00 0xfdc90000 0x00 0x400>; + reg-names = "vcd\0cache\0afbc"; + interrupts = <0x00 0x6c 0x04 0x00 0x6b 0x04 0x00 0x6a 0x04>; + interrupt-names = "irq_av1d\0irq_cache\0irq_afbc"; + clocks = <0x02 0x49 0x02 0x4b>; + clock-names = "aclk_vcodec\0hclk_vcodec"; + rockchip,normal-rates = <0x17d78400 0x17d78400>; + assigned-clocks = <0x02 0x49 0x02 0x4b>; + assigned-clock-rates = <0x17d78400 0x17d78400>; + resets = <0x02 0x442 0x02 0x445>; + reset-names = "video_a\0video_h"; + iommus = <0xb1>; + rockchip,srv = <0x9f>; + rockchip,taskqueue-node = <0x0b>; + power-domains = <0x4d 0x17>; + status = "okay"; + }; + + iommu@fdca0000 { + compatible = "rockchip,iommu-av1"; + reg = <0x00 0xfdca0000 0x00 0x600>; + interrupts = <0x00 0x6d 0x04>; + interrupt-names = "irq_av1d_mmu"; + clocks = <0x02 0x49 0x02 0x4b>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + power-domains = <0x4d 0x17>; + status = "okay"; + phandle = <0xb1>; + }; + + rkisp-unite@fdcb0000 { + compatible = "rockchip,rk3588-rkisp-unite"; + reg = <0x00 0xfdcb0000 0x00 0x10000 0x00 0xfdcc0000 0x00 0x10000>; + interrupts = <0x00 0x87 0x04 0x00 0x89 0x04 0x00 0x8a 0x04>; + interrupt-names = "isp_irq\0mi_irq\0mipi_irq"; + clocks = <0x02 0x1de 0x02 0x1df 0x02 0x1db 0x02 0x1dc 0x02 0x1dd 0x02 0x120 0x02 0x121 0x02 0x11d 0x02 0x11e 0x02 0x11f>; + clock-names = "aclk_isp0\0hclk_isp0\0clk_isp_core0\0clk_isp_core_marvin0\0clk_isp_core_vicap0\0aclk_isp1\0hclk_isp1\0clk_isp_core1\0clk_isp_core_marvin1\0clk_isp_core_vicap1"; + power-domains = <0x4d 0x1c>; + iommus = <0xb2>; + status = "disabled"; + }; + + rkisp@fdcb0000 { + compatible = "rockchip,rk3588-rkisp"; + reg = <0x00 0xfdcb0000 0x00 0x7f00>; + interrupts = <0x00 0x83 0x04 0x00 0x85 0x04 0x00 0x86 0x04>; + interrupt-names = "isp_irq\0mi_irq\0mipi_irq"; + clocks = <0x02 0x1de 0x02 0x1df 0x02 0x1db 0x02 0x1dc 0x02 0x1dd>; + clock-names = "aclk_isp\0hclk_isp\0clk_isp_core\0clk_isp_core_marvin\0clk_isp_core_vicap"; + power-domains = <0x4d 0x1b>; + iommus = <0xb3>; + status = "disabled"; + phandle = <0x46>; + }; + + rkisp-unite-mmu@fdcb7f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdcb7f00 0x00 0x100 0x00 0xfdcc7f00 0x00 0x100>; + interrupts = <0x00 0x84 0x04 0x00 0x88 0x04>; + interrupt-names = "isp0_mmu\0isp1_mmu"; + clocks = <0x02 0x1de 0x02 0x1df 0x02 0x120 0x02 0x121>; + clock-names = "aclk0\0iface0\0aclk1\0iface1"; + power-domains = <0x4d 0x1c>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "disabled"; + phandle = <0xb2>; + }; + + iommu@fdcb7f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdcb7f00 0x00 0x100>; + interrupts = <0x00 0x84 0x04>; + interrupt-names = "isp0_mmu"; + clocks = <0x02 0x1de 0x02 0x1df>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x1b>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "disabled"; + phandle = <0xb3>; + }; + + rkisp@fdcc0000 { + compatible = "rockchip,rk3588-rkisp"; + reg = <0x00 0xfdcc0000 0x00 0x7f00>; + interrupts = <0x00 0x87 0x04 0x00 0x89 0x04 0x00 0x8a 0x04>; + interrupt-names = "isp_irq\0mi_irq\0mipi_irq"; + clocks = <0x02 0x120 0x02 0x121 0x02 0x11d 0x02 0x11e 0x02 0x11f>; + clock-names = "aclk_isp\0hclk_isp\0clk_isp_core\0clk_isp_core_marvin\0clk_isp_core_vicap"; + power-domains = <0x4d 0x1c>; + iommus = <0xb4>; + status = "disabled"; + phandle = <0x47>; + }; + + iommu@fdcc7f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdcc7f00 0x00 0x100>; + interrupts = <0x00 0x88 0x04>; + interrupt-names = "isp1_mmu"; + clocks = <0x02 0x120 0x02 0x121>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x1c>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "disabled"; + phandle = <0xb4>; + }; + + rkispp@fdcd0000 { + compatible = "rockchip,rk3588-rkispp"; + reg = <0x00 0xfdcd0000 0x00 0xf00>; + interrupts = <0x00 0x8b 0x04>; + interrupt-names = "fec_irq"; + clocks = <0x02 0x1d5 0x02 0x1d6 0x02 0x1d7>; + clock-names = "aclk_ispp\0hclk_ispp\0clk_ispp"; + assigned-clocks = <0x02 0x1d6>; + assigned-clock-rates = <0x5f5e100>; + power-domains = <0x4d 0x1d>; + iommus = <0xb5>; + status = "disabled"; + phandle = <0x48>; + }; + + iommu@fdcd0f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdcd0f00 0x00 0x100>; + interrupts = <0x00 0x8c 0x04>; + interrupt-names = "fec0_mmu"; + clocks = <0x02 0x1d5 0x02 0x1d6 0x02 0x1d7>; + clock-names = "aclk\0iface\0pclk"; + power-domains = <0x4d 0x1d>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "disabled"; + phandle = <0xb5>; + }; + + rkispp@fdcd8000 { + compatible = "rockchip,rk3588-rkispp"; + reg = <0x00 0xfdcd8000 0x00 0xf00>; + interrupts = <0x00 0x8d 0x04>; + interrupt-names = "fec_irq"; + clocks = <0x02 0x1d8 0x02 0x1d9 0x02 0x1da>; + clock-names = "aclk_ispp\0hclk_ispp\0clk_ispp"; + assigned-clocks = <0x02 0x1d9>; + assigned-clock-rates = <0x5f5e100>; + power-domains = <0x4d 0x1d>; + iommus = <0xb6>; + status = "disabled"; + phandle = <0x49>; + }; + + iommu@fdcd8f00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdcd8f00 0x00 0x100>; + interrupts = <0x00 0x8e 0x04>; + interrupt-names = "fec1_mmu"; + clocks = <0x02 0x1d8 0x02 0x1d9 0x02 0x1da>; + clock-names = "aclk\0iface\0pclk"; + power-domains = <0x4d 0x1d>; + #iommu-cells = <0x00>; + rockchip,disable-mmu-reset; + status = "disabled"; + phandle = <0xb6>; + }; + + rkcif@fdce0000 { + compatible = "rockchip,rk3588-cif"; + reg = <0x00 0xfdce0000 0x00 0x800>; + reg-names = "cif_regs"; + interrupts = <0x00 0x9b 0x04>; + interrupt-names = "cif-intr"; + clocks = <0x02 0x1e4 0x02 0x1e5 0x02 0x1e3>; + clock-names = "aclk_cif\0hclk_cif\0dclk_cif"; + resets = <0x02 0x317 0x02 0x318 0x02 0x316>; + reset-names = "rst_cif_a\0rst_cif_h\0rst_cif_d"; + assigned-clocks = <0x02 0x1e3>; + assigned-clock-rates = <0x23c34600>; + power-domains = <0x4d 0x1b>; + rockchip,grf = <0xb7>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x3f>; + }; + + iommu@fdce0800 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdce0800 0x00 0x100 0x00 0xfdce0900 0x00 0x100>; + interrupts = <0x00 0x71 0x04>; + interrupt-names = "cif_mmu"; + clocks = <0x02 0x1e4 0x02 0x1e5>; + clock-names = "aclk\0iface"; + power-domains = <0x4d 0x1b>; + rockchip,disable-mmu-reset; + #iommu-cells = <0x00>; + status = "disabled"; + phandle = <0x40>; + }; + + mipi0-csi2@fdd10000 { + compatible = "rockchip,rk3588-mipi-csi2"; + reg = <0x00 0xfdd10000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x8f 0x04 0x00 0x90 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x02 0x1cf 0x02 0x1cd>; + clock-names = "pclk_csi2host\0iclk_csi2host"; + resets = <0x02 0x324 0x02 0x334>; + reset-names = "srst_csihost_p\0srst_csihost_vicap"; + status = "disabled"; + }; + + mipi1-csi2@fdd20000 { + compatible = "rockchip,rk3588-mipi-csi2"; + reg = <0x00 0xfdd20000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x91 0x04 0x00 0x92 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x02 0x1d0 0x02 0x1ce>; + clock-names = "pclk_csi2host\0iclk_csi2host"; + resets = <0x02 0x325 0x02 0x335>; + reset-names = "srst_csihost_p\0srst_csihost_vicap"; + status = "disabled"; + }; + + mipi2-csi2@fdd30000 { + compatible = "rockchip,rk3588-mipi-csi2"; + reg = <0x00 0xfdd30000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x93 0x04 0x00 0x94 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x02 0x1d1>; + clock-names = "pclk_csi2host"; + resets = <0x02 0x326 0x02 0x336>; + reset-names = "srst_csihost_p\0srst_csihost_vicap"; + status = "disabled"; + }; + + mipi3-csi2@fdd40000 { + compatible = "rockchip,rk3588-mipi-csi2"; + reg = <0x00 0xfdd40000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x95 0x04 0x00 0x96 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x02 0x1d2>; + clock-names = "pclk_csi2host"; + resets = <0x02 0x327 0x02 0x337>; + reset-names = "srst_csihost_p\0srst_csihost_vicap"; + status = "disabled"; + }; + + vop@fdd90000 { + compatible = "rockchip,rk3588-vop"; + reg = <0x00 0xfdd90000 0x00 0x4200 0x00 0xfdd95000 0x00 0x1000>; + reg-names = "regs\0gamma_lut"; + interrupts = <0x00 0x9c 0x04>; + clocks = <0x02 0x270 0x02 0x26f 0x02 0x274 0x02 0x275 0x02 0x276 0x02 0x277 0x02 0x26e 0x02 0x271 0x02 0x272 0x02 0x273>; + clock-names = "aclk_vop\0hclk_vop\0dclk_vp0\0dclk_vp1\0dclk_vp2\0dclk_vp3\0pclk_vop\0dclk_src_vp0\0dclk_src_vp1\0dclk_src_vp2"; + assigned-clocks = <0x02 0x270>; + assigned-clock-rates = <0x2faf0800>; + resets = <0x02 0x349 0x02 0x348 0x02 0x34d 0x02 0x350 0x02 0x351 0x02 0x352>; + reset-names = "axi\0ahb\0dclk_vp0\0dclk_vp1\0dclk_vp2\0dclk_vp3"; + iommus = <0xb8>; + power-domains = <0x4d 0x18>; + rockchip,grf = <0xb7>; + rockchip,vop-grf = <0xb9>; + rockchip,vo1-grf = <0xba>; + rockchip,pmu = <0xbb>; + status = "okay"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + phandle = <0x2d>; + + port@0 { + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x00>; + rockchip,plane-mask = <0x05>; + rockchip,primary-plane = <0x02>; + assigned-clocks = <0x02 0x270>; + assigned-clock-rates = <0x2faf0800>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xbc>; + phandle = <0xd9>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xbd>; + phandle = <0xe4>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xbe>; + phandle = <0x35>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0xbf>; + phandle = <0x18a>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0xc0>; + phandle = <0x194>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0xc1>; + phandle = <0x191>; + }; + }; + + port@1 { + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x01>; + rockchip,plane-mask = <0x0a>; + rockchip,primary-plane = <0x03>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xc2>; + phandle = <0x31>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xc3>; + phandle = <0xe5>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xc4>; + phandle = <0xe1>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0xc5>; + phandle = <0x18b>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0xc6>; + phandle = <0x195>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0xc7>; + phandle = <0x38>; + }; + }; + + port@2 { + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x02>; + assigned-clocks = <0x02 0x273>; + assigned-clock-parents = <0x02 0x04>; + rockchip,plane-mask = <0x140>; + rockchip,primary-plane = <0x08>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xc8>; + phandle = <0xda>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xc9>; + phandle = <0x34>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xca>; + phandle = <0xe2>; + }; + + endpoint@3 { + reg = <0x03>; + remote-endpoint = <0xcb>; + phandle = <0xd5>; + }; + + endpoint@4 { + reg = <0x04>; + remote-endpoint = <0xcc>; + phandle = <0xd6>; + }; + + endpoint@5 { + reg = <0x05>; + remote-endpoint = <0xcd>; + phandle = <0x37>; + }; + + endpoint@6 { + reg = <0x06>; + remote-endpoint = <0xce>; + phandle = <0x196>; + }; + + endpoint@7 { + reg = <0x07>; + remote-endpoint = <0xcf>; + phandle = <0x192>; + }; + }; + + port@3 { + #address-cells = <0x01>; + #size-cells = <0x00>; + reg = <0x03>; + rockchip,plane-mask = <0x280>; + rockchip,primary-plane = <0x09>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xd0>; + phandle = <0x32>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xd1>; + phandle = <0x33>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xd2>; + phandle = <0x36>; + }; + }; + }; + }; + + iommu@fdd97e00 { + compatible = "rockchip,iommu-v2"; + reg = <0x00 0xfdd97e00 0x00 0x100 0x00 0xfdd97f00 0x00 0x100>; + interrupts = <0x00 0x9c 0x04>; + interrupt-names = "vop_mmu"; + clocks = <0x02 0x270 0x02 0x26f>; + clock-names = "aclk\0iface"; + #iommu-cells = <0x00>; + rockchip,disable-device-link-resume; + rockchip,shootdown-entire; + status = "okay"; + phandle = <0xb8>; + }; + + spdif-tx@fddb0000 { + compatible = "rockchip,rk3588-spdif\0rockchip,rk3568-spdif"; + reg = <0x00 0xfddb0000 0x00 0x1000>; + interrupts = <0x00 0xc3 0x04>; + dmas = <0xd3 0x06>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x02 0x209 0x02 0x204>; + assigned-clocks = <0x02 0x205>; + assigned-clock-parents = <0x02 0x05>; + power-domains = <0x4d 0x19>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x1af>; + }; + + i2s@fddc0000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfddc0000 0x00 0x1000>; + interrupts = <0x00 0xb8 0x04>; + clocks = <0x02 0x1fb 0x02 0x1fb 0x02 0x1f0>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x1f9>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd4 0x00>; + dma-names = "tx"; + power-domains = <0x4d 0x19>; + resets = <0x02 0x38d>; + reset-names = "tx-m"; + rockchip,playback-only; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-tx@fdde0000 { + compatible = "rockchip,rk3588-spdif\0rockchip,rk3568-spdif"; + reg = <0x00 0xfdde0000 0x00 0x1000>; + interrupts = <0x00 0xc4 0x04>; + dmas = <0xd3 0x07>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x02 0x257 0x02 0x253>; + assigned-clocks = <0x02 0x254>; + assigned-clock-parents = <0x02 0x05>; + power-domains = <0x4d 0x1a>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + i2s@fddf0000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfddf0000 0x00 0x1000>; + interrupts = <0x00 0xb9 0x04>; + clocks = <0x02 0x246 0x02 0x246 0x02 0x248>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x243>; + assigned-clock-parents = <0x02 0x07>; + dmas = <0xd4 0x02>; + dma-names = "tx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x3e8>; + reset-names = "tx-m"; + rockchip,always-on; + rockchip,hdmi-path; + rockchip,playback-only; + #sound-dai-cells = <0x00>; + status = "okay"; + phandle = <0x1ad>; + }; + + i2s@fddfc000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfddfc000 0x00 0x1000>; + interrupts = <0x00 0xbd 0x04>; + clocks = <0x02 0x242 0x02 0x242 0x02 0x23e>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x23f>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd4 0x17>; + dma-names = "rx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x413>; + reset-names = "rx-m"; + rockchip,capture-only; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-rx@fde08000 { + compatible = "rockchip,rk3588-spdifrx\0rockchip,rk3308-spdifrx"; + reg = <0x00 0xfde08000 0x00 0x1000>; + interrupts = <0x00 0xc7 0x04>; + clocks = <0x02 0x25e 0x02 0x25d>; + clock-names = "mclk\0hclk"; + assigned-clocks = <0x02 0x25e>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0x64 0x15>; + dma-names = "rx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x3fd>; + reset-names = "spdifrx-m"; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + dsi@fde20000 { + compatible = "rockchip,rk3588-mipi-dsi2"; + reg = <0x00 0xfde20000 0x00 0x10000>; + interrupts = <0x00 0xa7 0x04>; + clocks = <0x02 0x278 0x02 0x27a>; + clock-names = "pclk\0sys_clk"; + resets = <0x02 0x354>; + reset-names = "apb"; + power-domains = <0x4d 0x18>; + phys = <0x2a>; + phy-names = "dcphy"; + rockchip,grf = <0xb9>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xd5>; + status = "disabled"; + phandle = <0xcb>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x32>; + status = "disabled"; + phandle = <0xd0>; + }; + }; + }; + }; + + dsi@fde30000 { + compatible = "rockchip,rk3588-mipi-dsi2"; + reg = <0x00 0xfde30000 0x00 0x10000>; + interrupts = <0x00 0xa8 0x04>; + clocks = <0x02 0x279 0x02 0x27b>; + clock-names = "pclk\0sys_clk"; + resets = <0x02 0x355>; + reset-names = "apb"; + power-domains = <0x4d 0x18>; + phys = <0x2b>; + phy-names = "dcphy"; + rockchip,grf = <0xb9>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xd6>; + status = "disabled"; + phandle = <0xcc>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x33>; + status = "disabled"; + phandle = <0xd1>; + }; + }; + }; + }; + + hdcp@fde40000 { + compatible = "rockchip,rk3588-hdcp"; + reg = <0x00 0xfde40000 0x00 0x80>; + interrupts = <0x00 0x9f 0x04>; + clocks = <0x02 0x1ed 0x02 0x1ef 0x02 0x1ee 0x02 0x1ec 0x02 0x1f1 0x02 0x1f2>; + clock-names = "aclk\0pclk\0hclk\0hclk_key\0aclk_trng\0pclk_trng"; + resets = <0x02 0x37f 0x02 0x37d 0x02 0x37c 0x02 0x37b 0x02 0x381>; + reset-names = "hdcp\0h_hdcp\0a_hdcp\0hdcp_key\0trng"; + power-domains = <0x4d 0x19>; + rockchip,vo-grf = <0xd7>; + status = "disabled"; + }; + + dp@fde50000 { + compatible = "rockchip,rk3588-dp"; + reg = <0x00 0xfde50000 0x00 0x4000>; + interrupts = <0x00 0xa1 0x04>; + clocks = <0x02 0x1e6 0x02 0x2cc 0x02 0x1fb 0x02 0x207 0x04>; + clock-names = "apb\0aux\0i2s\0spdif\0hclk"; + assigned-clocks = <0x02 0x2cc>; + assigned-clock-rates = <0xf42400>; + resets = <0x02 0x388>; + phys = <0xd8>; + power-domains = <0x4d 0x19>; + #sound-dai-cells = <0x01>; + status = "disabled"; + phandle = <0x1b0>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xd9>; + status = "disabled"; + phandle = <0xbc>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x31>; + status = "disabled"; + phandle = <0xc2>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xda>; + status = "disabled"; + phandle = <0xc8>; + }; + }; + }; + }; + + hdcp@fde70000 { + compatible = "rockchip,rk3588-hdcp"; + reg = <0x00 0xfde70000 0x00 0x80>; + interrupts = <0x00 0xa0 0x04>; + clocks = <0x02 0x217 0x02 0x219 0x02 0x218 0x02 0x216 0x02 0x228 0x02 0x229>; + clock-names = "aclk\0pclk\0hclk\0hclk_key\0aclk_trng\0pclk_trng"; + resets = <0x02 0x3c8 0x02 0x3c6 0x02 0x3c5 0x02 0x3c4 0x02 0x3ca>; + reset-names = "hdcp\0h_hdcp\0a_hdcp\0hdcp_key\0trng"; + power-domains = <0x4d 0x1a>; + rockchip,vo-grf = <0xba>; + status = "disabled"; + }; + + hdmi@fde80000 { + compatible = "rockchip,rk3588-dw-hdmi"; + reg = <0x00 0xfde80000 0x00 0x20000>; + interrupts = <0x00 0xa9 0x04 0x00 0xaa 0x04 0x00 0xab 0x04 0x00 0xac 0x04 0x00 0x168 0x04>; + clocks = <0x02 0x221 0x02 0x265 0x02 0x222 0x02 0x223 0x02 0x246 0x02 0x274 0x02 0x275 0x02 0x276 0x02 0x277 0x05 0x2e>; + clock-names = "pclk\0hpd\0earc\0hdmitx_ref\0aud\0dclk_vp0\0dclk_vp1\0dclk_vp2\0dclk_vp3\0hclk_vo1\0link_clk"; + resets = <0x02 0x3d0 0x02 0x49c>; + reset-names = "ref\0hdp"; + power-domains = <0x4d 0x1a>; + pinctrl-names = "default"; + pinctrl-0 = <0xdb 0xdc 0xdd 0xde>; + reg-io-width = <0x04>; + rockchip,grf = <0xb7>; + rockchip,vo1_grf = <0xba>; + phys = <0xdf>; + phy-names = "hdmi"; + #sound-dai-cells = <0x00>; + status = "okay"; + enable-gpios = <0xe0 0x00 0x00>; + phandle = <0x1ae>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x35>; + status = "okay"; + phandle = <0xbe>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xe1>; + status = "disabled"; + phandle = <0xc4>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0xe2>; + status = "disabled"; + phandle = <0xca>; + }; + }; + }; + }; + + edp@fdec0000 { + compatible = "rockchip,rk3588-edp"; + reg = <0x00 0xfdec0000 0x00 0x1000>; + interrupts = <0x00 0xa3 0x04>; + clocks = <0x02 0x211 0x02 0x210 0x02 0x212 0x05>; + clock-names = "dp\0pclk\0spdif\0hclk"; + resets = <0x02 0x3e1 0x02 0x3e0>; + reset-names = "dp\0apb"; + phys = <0xe3>; + phy-names = "dp"; + power-domains = <0x4d 0x1a>; + rockchip,grf = <0xba>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0xe4>; + status = "disabled"; + phandle = <0xbd>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0xe5>; + status = "disabled"; + phandle = <0xc3>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x34>; + status = "disabled"; + phandle = <0xc9>; + }; + }; + }; + }; + + qos@fdf35000 { + compatible = "syscon"; + reg = <0x00 0xfdf35000 0x00 0x20>; + phandle = <0x6f>; + }; + + qos@fdf35200 { + compatible = "syscon"; + reg = <0x00 0xfdf35200 0x00 0x20>; + phandle = <0x70>; + }; + + qos@fdf35400 { + compatible = "syscon"; + reg = <0x00 0xfdf35400 0x00 0x20>; + phandle = <0x71>; + }; + + qos@fdf35600 { + compatible = "syscon"; + reg = <0x00 0xfdf35600 0x00 0x20>; + phandle = <0x72>; + }; + + qos@fdf36000 { + compatible = "syscon"; + reg = <0x00 0xfdf36000 0x00 0x20>; + phandle = <0x92>; + }; + + qos@fdf39000 { + compatible = "syscon"; + reg = <0x00 0xfdf39000 0x00 0x20>; + phandle = <0x97>; + }; + + qos@fdf3d800 { + compatible = "syscon"; + reg = <0x00 0xfdf3d800 0x00 0x20>; + phandle = <0x98>; + }; + + qos@fdf3e000 { + compatible = "syscon"; + reg = <0x00 0xfdf3e000 0x00 0x20>; + phandle = <0x94>; + }; + + qos@fdf3e200 { + compatible = "syscon"; + reg = <0x00 0xfdf3e200 0x00 0x20>; + phandle = <0x93>; + }; + + qos@fdf3e400 { + compatible = "syscon"; + reg = <0x00 0xfdf3e400 0x00 0x20>; + phandle = <0x95>; + }; + + qos@fdf3e600 { + compatible = "syscon"; + reg = <0x00 0xfdf3e600 0x00 0x20>; + phandle = <0x96>; + }; + + qos@fdf40000 { + compatible = "syscon"; + reg = <0x00 0xfdf40000 0x00 0x20>; + phandle = <0x90>; + }; + + qos@fdf40200 { + compatible = "syscon"; + reg = <0x00 0xfdf40200 0x00 0x20>; + phandle = <0x91>; + }; + + qos@fdf40400 { + compatible = "syscon"; + reg = <0x00 0xfdf40400 0x00 0x20>; + phandle = <0x8a>; + }; + + qos@fdf40500 { + compatible = "syscon"; + reg = <0x00 0xfdf40500 0x00 0x20>; + phandle = <0x8b>; + }; + + qos@fdf40600 { + compatible = "syscon"; + reg = <0x00 0xfdf40600 0x00 0x20>; + phandle = <0x8c>; + }; + + qos@fdf40800 { + compatible = "syscon"; + reg = <0x00 0xfdf40800 0x00 0x20>; + phandle = <0x8d>; + }; + + qos@fdf41000 { + compatible = "syscon"; + reg = <0x00 0xfdf41000 0x00 0x20>; + phandle = <0x8e>; + }; + + qos@fdf41100 { + compatible = "syscon"; + reg = <0x00 0xfdf41100 0x00 0x20>; + phandle = <0x8f>; + }; + + qos@fdf60000 { + compatible = "syscon"; + reg = <0x00 0xfdf60000 0x00 0x20>; + phandle = <0x75>; + }; + + qos@fdf60200 { + compatible = "syscon"; + reg = <0x00 0xfdf60200 0x00 0x20>; + phandle = <0x76>; + }; + + qos@fdf60400 { + compatible = "syscon"; + reg = <0x00 0xfdf60400 0x00 0x20>; + phandle = <0x77>; + }; + + qos@fdf61000 { + compatible = "syscon"; + reg = <0x00 0xfdf61000 0x00 0x20>; + phandle = <0x78>; + }; + + qos@fdf61200 { + compatible = "syscon"; + reg = <0x00 0xfdf61200 0x00 0x20>; + phandle = <0x79>; + }; + + qos@fdf61400 { + compatible = "syscon"; + reg = <0x00 0xfdf61400 0x00 0x20>; + phandle = <0x7a>; + }; + + qos@fdf62000 { + compatible = "syscon"; + reg = <0x00 0xfdf62000 0x00 0x20>; + phandle = <0x73>; + }; + + qos@fdf63000 { + compatible = "syscon"; + reg = <0x00 0xfdf63000 0x00 0x20>; + phandle = <0x74>; + }; + + qos@fdf64000 { + compatible = "syscon"; + reg = <0x00 0xfdf64000 0x00 0x20>; + phandle = <0x83>; + }; + + qos@fdf66000 { + compatible = "syscon"; + reg = <0x00 0xfdf66000 0x00 0x20>; + phandle = <0x7b>; + }; + + qos@fdf66200 { + compatible = "syscon"; + reg = <0x00 0xfdf66200 0x00 0x20>; + phandle = <0x7c>; + }; + + qos@fdf66400 { + compatible = "syscon"; + reg = <0x00 0xfdf66400 0x00 0x20>; + phandle = <0x7d>; + }; + + qos@fdf66600 { + compatible = "syscon"; + reg = <0x00 0xfdf66600 0x00 0x20>; + phandle = <0x7e>; + }; + + qos@fdf66800 { + compatible = "syscon"; + reg = <0x00 0xfdf66800 0x00 0x20>; + phandle = <0x7f>; + }; + + qos@fdf66a00 { + compatible = "syscon"; + reg = <0x00 0xfdf66a00 0x00 0x20>; + phandle = <0x80>; + }; + + qos@fdf66c00 { + compatible = "syscon"; + reg = <0x00 0xfdf66c00 0x00 0x20>; + phandle = <0x81>; + }; + + qos@fdf66e00 { + compatible = "syscon"; + reg = <0x00 0xfdf66e00 0x00 0x20>; + phandle = <0x82>; + }; + + qos@fdf67000 { + compatible = "syscon"; + reg = <0x00 0xfdf67000 0x00 0x20>; + phandle = <0x84>; + }; + + qos@fdf67200 { + compatible = "syscon"; + reg = <0x00 0xfdf67200 0x00 0x20>; + }; + + qos@fdf70000 { + compatible = "syscon"; + reg = <0x00 0xfdf70000 0x00 0x20>; + phandle = <0x6d>; + }; + + qos@fdf71000 { + compatible = "syscon"; + reg = <0x00 0xfdf71000 0x00 0x20>; + phandle = <0x6e>; + }; + + qos@fdf72000 { + compatible = "syscon"; + reg = <0x00 0xfdf72000 0x00 0x20>; + phandle = <0x6a>; + }; + + qos@fdf72200 { + compatible = "syscon"; + reg = <0x00 0xfdf72200 0x00 0x20>; + phandle = <0x6b>; + }; + + qos@fdf72400 { + compatible = "syscon"; + reg = <0x00 0xfdf72400 0x00 0x20>; + phandle = <0x6c>; + }; + + qos@fdf80000 { + compatible = "syscon"; + reg = <0x00 0xfdf80000 0x00 0x20>; + phandle = <0x87>; + }; + + qos@fdf81000 { + compatible = "syscon"; + reg = <0x00 0xfdf81000 0x00 0x20>; + phandle = <0x88>; + }; + + qos@fdf81200 { + compatible = "syscon"; + reg = <0x00 0xfdf81200 0x00 0x20>; + phandle = <0x89>; + }; + + qos@fdf82000 { + compatible = "syscon"; + reg = <0x00 0xfdf82000 0x00 0x20>; + phandle = <0x85>; + }; + + qos@fdf82200 { + compatible = "syscon"; + reg = <0x00 0xfdf82200 0x00 0x20>; + phandle = <0x86>; + }; + + dfi@fe060000 { + compatible = "rockchip,rk3588-dfi"; + reg = <0x00 0xfe060000 0x00 0x10000>; + rockchip,pmu_grf = <0xe6>; + status = "okay"; + phandle = <0x39>; + }; + + pcie@fe180000 { + compatible = "rockchip,rk3588-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x30 0x3f>; + clocks = <0x02 0x151 0x02 0x156 0x02 0x14c 0x02 0x15c 0x02 0x161 0x02 0x2c5>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux\0pipe"; + device_type = "pci"; + interrupts = <0x00 0xf8 0x04 0x00 0xf7 0x04 0x00 0xf6 0x04 0x00 0xf5 0x04 0x00 0xf4 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xe7 0x00 0x00 0x00 0x00 0x02 0xe7 0x01 0x00 0x00 0x00 0x03 0xe7 0x02 0x00 0x00 0x00 0x04 0xe7 0x03>; + linux,pci-domain = <0x03>; + num-ib-windows = <0x08>; + num-ob-windows = <0x08>; + num-viewport = <0x04>; + max-link-speed = <0x02>; + msi-map = <0x3000 0xe8 0x3000 0x1000>; + num-lanes = <0x01>; + phys = <0x5b 0x02>; + phy-names = "pcie-phy"; + ranges = <0x800 0x00 0xf3000000 0x00 0xf3000000 0x00 0x100000 0x81000000 0x00 0xf3100000 0x00 0xf3100000 0x00 0x100000 0x82000000 0x00 0xf3200000 0x00 0xf3200000 0x00 0xe00000 0xc3000000 0x09 0xc0000000 0x09 0xc0000000 0x00 0x40000000>; + reg = <0x00 0xfe180000 0x00 0x10000 0x0a 0x40c00000 0x00 0x400000>; + reg-names = "pcie-apb\0pcie-dbi"; + resets = <0x02 0x210 0x02 0x21f>; + reset-names = "pcie\0periph"; + rockchip,pipe-grf = <0x61>; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xf5 0x01>; + phandle = <0xe7>; + }; + }; + + pcie@fe190000 { + compatible = "rockchip,rk3588-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x40 0x4f>; + clocks = <0x02 0x152 0x02 0x157 0x02 0x14d 0x02 0x15d 0x02 0x162 0x02 0x182>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux\0pipe"; + device_type = "pci"; + interrupts = <0x00 0xfd 0x04 0x00 0xfc 0x04 0x00 0xfb 0x04 0x00 0xfa 0x04 0x00 0xf9 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0xe9 0x00 0x00 0x00 0x00 0x02 0xe9 0x01 0x00 0x00 0x00 0x03 0xe9 0x02 0x00 0x00 0x00 0x04 0xe9 0x03>; + linux,pci-domain = <0x04>; + num-ib-windows = <0x08>; + num-ob-windows = <0x08>; + num-viewport = <0x04>; + max-link-speed = <0x02>; + msi-map = <0x4000 0xe8 0x4000 0x1000>; + num-lanes = <0x01>; + phys = <0xea 0x02>; + phy-names = "pcie-phy"; + ranges = <0x800 0x00 0xf4000000 0x00 0xf4000000 0x00 0x100000 0x81000000 0x00 0xf4100000 0x00 0xf4100000 0x00 0x100000 0x82000000 0x00 0xf4200000 0x00 0xf4200000 0x00 0xe00000 0xc3000000 0x0a 0x00 0x0a 0x00 0x00 0x40000000>; + reg = <0x00 0xfe190000 0x00 0x10000 0x0a 0x41000000 0x00 0x400000>; + reg-names = "pcie-apb\0pcie-dbi"; + resets = <0x02 0x211 0x02 0x220>; + reset-names = "pcie\0periph"; + rockchip,pipe-grf = <0x61>; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xfa 0x01>; + phandle = <0xe9>; + }; + }; + + ethernet@fe1b0000 { + compatible = "rockchip,rk3588-gmac\0snps,dwmac-4.20a"; + reg = <0x00 0xfe1b0000 0x00 0x10000>; + interrupts = <0x00 0xe3 0x04 0x00 0xe2 0x04>; + interrupt-names = "macirq\0eth_wake_irq"; + rockchip,grf = <0xb7>; + rockchip,php_grf = <0x61>; + local-mac-address = [d2 5e 8a 13 5d df]; + clocks = <0x02 0x144 0x02 0x145 0x02 0x167 0x02 0x16c 0x02 0x142>; + clock-names = "stmmaceth\0clk_mac_ref\0pclk_mac\0aclk_mac\0ptp_ref"; + resets = <0x02 0x20a>; + reset-names = "stmmaceth"; + power-domains = <0x4d 0x21>; + snps,mixed-burst; + snps,tso; + snps,axi-config = <0xeb>; + snps,mtl-rx-config = <0xec>; + snps,mtl-tx-config = <0xed>; + snps,txpbl = <0x04>; + status = "okay"; + phy-mode = "rgmii-rxid"; + clock_in_out = "output"; + snps,reset-gpio = <0xee 0x17 0x01>; + snps,reset-active-low; + snps,reset-delays-us = <0x00 0x4e20 0x186a0>; + pinctrl-names = "default"; + pinctrl-0 = <0xef 0xf0 0xf1 0xf2 0xf3>; + tx_delay = <0x45>; + phy-handle = <0xf4>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x01>; + phandle = <0xf4>; + }; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x04>; + snps,rd_osr_lmt = <0x08>; + snps,blen = <0x00 0x00 0x00 0x00 0x10 0x08 0x04>; + phandle = <0xeb>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x02>; + phandle = <0xec>; + + queue0 { + }; + + queue1 { + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x02>; + phandle = <0xed>; + + queue0 { + }; + + queue1 { + }; + }; + }; + + ethernet@fe1c0000 { + compatible = "rockchip,rk3588-gmac\0snps,dwmac-4.20a"; + reg = <0x00 0xfe1c0000 0x00 0x10000>; + interrupts = <0x00 0xea 0x04 0x00 0xe9 0x04>; + interrupt-names = "macirq\0eth_wake_irq"; + rockchip,grf = <0xb7>; + rockchip,php_grf = <0x61>; + local-mac-address = [d6 5e 8a 13 5d df]; + clocks = <0x02 0x144 0x02 0x145 0x02 0x168 0x02 0x16d 0x02 0x143>; + clock-names = "stmmaceth\0clk_mac_ref\0pclk_mac\0aclk_mac\0ptp_ref"; + resets = <0x02 0x20b>; + reset-names = "stmmaceth"; + power-domains = <0x4d 0x21>; + snps,mixed-burst; + snps,tso; + snps,axi-config = <0xf5>; + snps,mtl-rx-config = <0xf6>; + snps,mtl-tx-config = <0xf7>; + snps,txpbl = <0x04>; + status = "okay"; + phy-mode = "rgmii-rxid"; + clock_in_out = "output"; + snps,reset-gpio = <0xee 0x0f 0x01>; + snps,reset-active-low; + snps,reset-delays-us = <0x00 0x4e20 0x186a0>; + pinctrl-names = "default"; + pinctrl-0 = <0xf8 0xf9 0xfa 0xfb 0xfc>; + tx_delay = <0x42>; + phy-handle = <0xfd>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x01>; + phandle = <0xfd>; + }; + }; + + stmmac-axi-config { + snps,wr_osr_lmt = <0x04>; + snps,rd_osr_lmt = <0x08>; + snps,blen = <0x00 0x00 0x00 0x00 0x10 0x08 0x04>; + phandle = <0xf5>; + }; + + rx-queues-config { + snps,rx-queues-to-use = <0x02>; + phandle = <0xf6>; + + queue0 { + }; + + queue1 { + }; + }; + + tx-queues-config { + snps,tx-queues-to-use = <0x02>; + phandle = <0xf7>; + + queue0 { + }; + + queue1 { + }; + }; + }; + + sata@fe210000 { + compatible = "rockchip,rk-ahci\0snps,dwc-ahci"; + reg = <0x00 0xfe210000 0x00 0x1000>; + clocks = <0x02 0x171 0x02 0x16e 0x02 0x174 0x02 0x163 0x02 0x17e>; + clock-names = "sata\0pmalive\0rxoob\0ref\0asic"; + interrupts = <0x00 0x111 0x04>; + interrupt-names = "hostc"; + phys = <0xea 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + status = "disabled"; + }; + + sata@fe230000 { + compatible = "rockchip,rk-ahci\0snps,dwc-ahci"; + reg = <0x00 0xfe230000 0x00 0x1000>; + clocks = <0x02 0x173 0x02 0x170 0x02 0x176 0x02 0x165 0x02 0x180>; + clock-names = "sata\0pmalive\0rxoob\0ref\0asic"; + interrupts = <0x00 0x113 0x04>; + interrupt-names = "hostc"; + phys = <0x5b 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + status = "disabled"; + }; + + spi@fe2b0000 { + compatible = "rockchip,sfc"; + reg = <0x00 0xfe2b0000 0x00 0x4000>; + interrupts = <0x00 0xce 0x04>; + clocks = <0x02 0x13d 0x02 0x13e>; + clock-names = "clk_sfc\0hclk_sfc"; + assigned-clocks = <0x02 0x13d>; + assigned-clock-rates = <0x5f5e100>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + mmc@fe2c0000 { + compatible = "rockchip,rk3588-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe2c0000 0x00 0x4000>; + interrupts = <0x00 0xcb 0x04>; + clocks = <0x0e 0x17 0x0e 0x09 0x02 0x2c2 0x02 0x2c3>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + max-frequency = <0x8f0d180>; + pinctrl-names = "default"; + pinctrl-0 = <0xfe 0xff 0x100 0x101>; + power-domains = <0x4d 0x28>; + status = "okay"; + no-sdio; + no-mmc; + bus-width = <0x04>; + cap-mmc-highspeed; + cap-sd-highspeed; + disable-wp; + sd-uhs-sdr104; + vqmmc-supply = <0x102>; + }; + + mmc@fe2d0000 { + compatible = "rockchip,rk3588-dw-mshc\0rockchip,rk3288-dw-mshc"; + reg = <0x00 0xfe2d0000 0x00 0x4000>; + interrupts = <0x00 0xcc 0x04>; + clocks = <0x02 0x199 0x02 0x19a 0x02 0x2c0 0x02 0x2c1>; + clock-names = "biu\0ciu\0ciu-drive\0ciu-sample"; + fifo-depth = <0x100>; + max-frequency = <0xbebc200>; + pinctrl-names = "default"; + pinctrl-0 = <0x103>; + power-domains = <0x4d 0x25>; + status = "disabled"; + }; + + mmc@fe2e0000 { + compatible = "rockchip,rk3588-dwcmshc\0rockchip,dwcmshc-sdhci"; + reg = <0x00 0xfe2e0000 0x00 0x10000>; + interrupts = <0x00 0xcd 0x04>; + assigned-clocks = <0x02 0x13b 0x02 0x13c 0x02 0x13a>; + assigned-clock-rates = <0xbebc200 0x16e3600 0xbebc200>; + clocks = <0x02 0x13a 0x02 0x138 0x02 0x139 0x02 0x13b 0x02 0x13c>; + clock-names = "core\0bus\0axi\0block\0timer"; + resets = <0x02 0x1f6 0x02 0x1f4 0x02 0x1f5 0x02 0x1f7 0x02 0x1f8>; + reset-names = "core\0bus\0axi\0block\0timer"; + max-frequency = <0xbebc200>; + status = "okay"; + bus-width = <0x08>; + no-sdio; + no-sd; + non-removable; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + }; + + crypto@fe370000 { + compatible = "rockchip,rk3588-crypto"; + reg = <0x00 0xfe370000 0x00 0x2000>; + interrupts = <0x00 0xd1 0x04>; + clocks = <0x0e 0x0b 0x0e 0x0c 0x0e 0x14 0x0e 0x15>; + clock-names = "aclk\0hclk\0sclk\0pka"; + resets = <0x104 0x0f>; + reset-names = "crypto-rst"; + status = "disabled"; + }; + + rng@fe378000 { + compatible = "rockchip,trngv1"; + reg = <0x00 0xfe378000 0x00 0x200>; + interrupts = <0x00 0x190 0x04>; + clocks = <0x0e 0x0c>; + clock-names = "hclk_trng"; + resets = <0x104 0x30>; + reset-names = "reset"; + status = "okay"; + }; + + i2s@fe470000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfe470000 0x00 0x1000>; + interrupts = <0x00 0xb4 0x04>; + clocks = <0x02 0x33 0x02 0x37 0x02 0x30>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x31 0x02 0x35>; + assigned-clock-parents = <0x02 0x05 0x02 0x05>; + dmas = <0x64 0x00 0x64 0x01>; + dma-names = "tx\0rx"; + power-domains = <0x4d 0x26>; + resets = <0x02 0x77 0x02 0x7a>; + reset-names = "tx-m\0rx-m"; + rockchip,clk-trcm = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x105 0x106 0x107 0x108>; + #sound-dai-cells = <0x00>; + status = "okay"; + phandle = <0x1b4>; + }; + + i2s@fe480000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfe480000 0x00 0x1000>; + interrupts = <0x00 0xb5 0x04>; + clocks = <0x02 0x28c 0x02 0x290 0x02 0x288>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + dmas = <0x64 0x02 0x64 0x03>; + dma-names = "tx\0rx"; + resets = <0x02 0xc002a 0x02 0xc002d>; + reset-names = "tx-m\0rx-m"; + rockchip,clk-trcm = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x109 0x10a 0x10b 0x10c 0x10d 0x10e 0x10f 0x110 0x111 0x112>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + i2s@fe490000 { + compatible = "rockchip,rk3588-i2s\0rockchip,rk3066-i2s"; + reg = <0x00 0xfe490000 0x00 0x1000>; + interrupts = <0x00 0xb6 0x04>; + clocks = <0x02 0x27 0x02 0x22>; + clock-names = "i2s_clk\0i2s_hclk"; + assigned-clocks = <0x02 0x24>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd3 0x00 0xd3 0x01>; + dma-names = "tx\0rx"; + power-domains = <0x4d 0x26>; + rockchip,clk-trcm = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x113 0x114 0x115 0x116>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + i2s@fe4a0000 { + compatible = "rockchip,rk3588-i2s\0rockchip,rk3066-i2s"; + reg = <0x00 0xfe4a0000 0x00 0x1000>; + interrupts = <0x00 0xb7 0x04>; + clocks = <0x02 0x2d 0x02 0x23>; + clock-names = "i2s_clk\0i2s_hclk"; + assigned-clocks = <0x02 0x2a>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd3 0x02 0xd3 0x03>; + dma-names = "tx\0rx"; + power-domains = <0x4d 0x26>; + rockchip,clk-trcm = <0x01>; + pinctrl-names = "default"; + pinctrl-0 = <0x117 0x118 0x119 0x11a>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + pdm@fe4b0000 { + compatible = "rockchip,rk3588-pdm"; + reg = <0x00 0xfe4b0000 0x00 0x1000>; + clocks = <0x02 0x29f 0x02 0x29e>; + clock-names = "pdm_clk\0pdm_hclk"; + dmas = <0x64 0x04>; + dma-names = "rx"; + pinctrl-names = "default"; + pinctrl-0 = <0x11b 0x11c 0x11d 0x11e 0x11f 0x120>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + pdm@fe4c0000 { + compatible = "rockchip,rk3588-pdm"; + reg = <0x00 0xfe4c0000 0x00 0x1000>; + clocks = <0x02 0x3b 0x02 0x3a>; + clock-names = "pdm_clk\0pdm_hclk"; + assigned-clocks = <0x02 0x3b>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd3 0x04>; + dma-names = "rx"; + power-domains = <0x4d 0x26>; + pinctrl-names = "default"; + pinctrl-0 = <0x121 0x122 0x123 0x124 0x125 0x126>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + vad@fe4d0000 { + compatible = "rockchip,rk3588-vad"; + reg = <0x00 0xfe4d0000 0x00 0x1000>; + reg-names = "vad"; + clocks = <0x02 0x2a0>; + clock-names = "hclk"; + interrupts = <0x00 0xca 0x04>; + rockchip,audio-src = <0x00>; + rockchip,det-channel = <0x00>; + rockchip,mode = <0x00>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-tx@fe4e0000 { + compatible = "rockchip,rk3588-spdif\0rockchip,rk3568-spdif"; + reg = <0x00 0xfe4e0000 0x00 0x1000>; + interrupts = <0x00 0xc1 0x04>; + dmas = <0x64 0x05>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x02 0x41 0x02 0x3e>; + assigned-clocks = <0x02 0x3f>; + assigned-clock-parents = <0x02 0x05>; + power-domains = <0x4d 0x26>; + pinctrl-names = "default"; + pinctrl-0 = <0x127>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-tx@fe4f0000 { + compatible = "rockchip,rk3588-spdif\0rockchip,rk3568-spdif"; + reg = <0x00 0xfe4f0000 0x00 0x1000>; + interrupts = <0x00 0xc2 0x04>; + dmas = <0xd3 0x05>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x02 0x47 0x02 0x44>; + assigned-clocks = <0x02 0x45>; + assigned-clock-parents = <0x02 0x05>; + power-domains = <0x4d 0x26>; + pinctrl-names = "default"; + pinctrl-0 = <0x128>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x1b1>; + }; + + codec-digital@fe500000 { + compatible = "rockchip,rk3588-codec-digital\0rockchip,codec-digital-v1"; + reg = <0x00 0xfe500000 0x00 0x1000>; + clocks = <0x02 0x29 0x02 0x2f>; + clock-names = "dac\0pclk"; + power-domains = <0x4d 0x26>; + resets = <0x02 0x84>; + reset-names = "reset"; + rockchip,grf = <0xb7>; + rockchip,pwm-output-mode; + pinctrl-names = "default"; + pinctrl-0 = <0x129>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + hwspinlock@fe5a0000 { + compatible = "rockchip,hwspinlock"; + reg = <0x00 0xfe5a0000 0x00 0x100>; + #hwlock-cells = <0x01>; + }; + + interrupt-controller@fe600000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0xfe600000 0x00 0x10000 0x00 0xfe680000 0x00 0x100000>; + interrupts = <0x01 0x09 0x04>; + phandle = <0x01>; + }; + + dma-controller@fea10000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfea10000 0x00 0x4000>; + interrupts = <0x00 0x56 0x04 0x00 0x57 0x04>; + clocks = <0x02 0x78>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0x64>; + }; + + dma-controller@fea30000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfea30000 0x00 0x4000>; + interrupts = <0x00 0x58 0x04 0x00 0x59 0x04>; + clocks = <0x02 0x79>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0xd3>; + }; + + can@fea50000 { + compatible = "rockchip,can-2.0"; + reg = <0x00 0xfea50000 0x00 0x1000>; + interrupts = <0x00 0x155 0x04>; + clocks = <0x02 0x70 0x02 0x6f>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x02 0xb9 0x02 0xb8>; + reset-names = "can\0can-apb"; + pinctrl-names = "default"; + pinctrl-0 = <0x12a>; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "disabled"; + }; + + can@fea60000 { + compatible = "rockchip,can-2.0"; + reg = <0x00 0xfea60000 0x00 0x1000>; + interrupts = <0x00 0x156 0x04>; + clocks = <0x02 0x72 0x02 0x71>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x02 0xbb 0x02 0xba>; + reset-names = "can\0can-apb"; + pinctrl-names = "default"; + pinctrl-0 = <0x12b>; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "okay"; + assigned-clocks = <0x02 0x72>; + assigned-clock-rates = <0xbebc200>; + }; + + can@fea70000 { + compatible = "rockchip,can-2.0"; + reg = <0x00 0xfea70000 0x00 0x1000>; + interrupts = <0x00 0x157 0x04>; + clocks = <0x02 0x74 0x02 0x73>; + clock-names = "baudclk\0apb_pclk"; + resets = <0x02 0xbd 0x02 0xbc>; + reset-names = "can\0can-apb"; + pinctrl-names = "default"; + pinctrl-0 = <0x12c>; + tx-fifo-depth = <0x01>; + rx-fifo-depth = <0x06>; + status = "disabled"; + }; + + decompress@fea80000 { + compatible = "rockchip,hw-decompress"; + reg = <0x00 0xfea80000 0x00 0x1000>; + interrupts = <0x00 0x55 0x04>; + clocks = <0x02 0x75 0x02 0x77 0x02 0x76>; + clock-names = "aclk\0dclk\0pclk"; + resets = <0x02 0x118>; + reset-names = "dresetn"; + status = "disabled"; + }; + + i2c@fea90000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfea90000 0x00 0x1000>; + clocks = <0x02 0x8d 0x02 0x85>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x13e 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x12d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + rk8602@42 { + compatible = "rockchip,rk8602"; + reg = <0x42>; + vin-supply = <0x63>; + regulator-compatible = "rk860x-reg"; + regulator-name = "vdd_npu_s0"; + regulator-min-microvolt = <0x86470>; + regulator-max-microvolt = <0xe7ef0>; + regulator-ramp-delay = <0x8fc>; + rockchip,suspend-voltage-selector = <0x01>; + regulator-boot-on; + regulator-always-on; + phandle = <0x9b>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + + i2c@feaa0000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfeaa0000 0x00 0x1000>; + clocks = <0x02 0x8e 0x02 0x86>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x13f 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x12e>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@feab0000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfeab0000 0x00 0x1000>; + clocks = <0x02 0x8f 0x02 0x87>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x140 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x12f>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + + es8388@11 { + status = "disabled"; + #sound-dai-cells = <0x00>; + compatible = "everest,es8388\0everest,es8323"; + reg = <0x11>; + clocks = <0x02 0x39>; + clock-names = "mclk"; + assigned-clocks = <0x02 0x39>; + assigned-clock-rates = <0xbb8000>; + pinctrl-names = "default"; + pinctrl-0 = <0x130>; + phandle = <0x1b5>; + }; + }; + + i2c@feac0000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfeac0000 0x00 0x1000>; + clocks = <0x02 0x90 0x02 0x88>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x141 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x131>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@fead0000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfead0000 0x00 0x1000>; + clocks = <0x02 0x91 0x02 0x89>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x142 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x132>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + timer@feae0000 { + compatible = "rockchip,rk3588-timer\0rockchip,rk3288-timer"; + reg = <0x00 0xfeae0000 0x00 0x20>; + interrupts = <0x00 0x121 0x04>; + clocks = <0x02 0x5c 0x02 0x5f>; + clock-names = "pclk\0timer"; + }; + + watchdog@feaf0000 { + compatible = "snps,dw-wdt"; + reg = <0x00 0xfeaf0000 0x00 0x100>; + clocks = <0x02 0x6c 0x02 0x6b>; + clock-names = "tclk\0pclk"; + interrupts = <0x00 0x13b 0x04>; + status = "okay"; + }; + + spi@feb00000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfeb00000 0x00 0x1000>; + interrupts = <0x00 0x146 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0xa3 0x02 0x9e>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x64 0x0e 0x64 0x0f>; + dma-names = "tx\0rx"; + pinctrl-names = "default"; + pinctrl-0 = <0x133 0x134 0x135>; + num-cs = <0x02>; + status = "disabled"; + }; + + spi@feb10000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfeb10000 0x00 0x1000>; + interrupts = <0x00 0x147 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0xa4 0x02 0x9f>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0x64 0x10 0x64 0x11>; + dma-names = "tx\0rx"; + pinctrl-names = "default"; + pinctrl-0 = <0x136 0x137 0x138>; + num-cs = <0x02>; + status = "disabled"; + }; + + spi@feb20000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfeb20000 0x00 0x1000>; + interrupts = <0x00 0x148 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0xa5 0x02 0xa0>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0xd3 0x0f 0xd3 0x10>; + dma-names = "tx\0rx"; + pinctrl-names = "default"; + pinctrl-0 = <0x139 0x13a>; + num-cs = <0x01>; + status = "okay"; + assigned-clocks = <0x02 0xa5>; + assigned-clock-rates = <0xbebc200>; + + rk806single@0 { + compatible = "rockchip,rk806"; + spi-max-frequency = <0xf4240>; + reg = <0x00>; + interrupt-parent = <0x13b>; + interrupts = <0x07 0x08>; + pinctrl-names = "default\0pmic-power-off"; + pinctrl-0 = <0x13c 0x13d 0x13e 0x13f>; + pinctrl-1 = <0x140>; + low_voltage_threshold = <0xbb8>; + shutdown_voltage_threshold = <0xa8c>; + shutdown_temperture_threshold = <0xa0>; + hotdie_temperture_threshold = <0x73>; + pmic-reset-func = <0x01>; + vcc1-supply = <0x63>; + vcc2-supply = <0x63>; + vcc3-supply = <0x63>; + vcc4-supply = <0x63>; + vcc5-supply = <0x63>; + vcc6-supply = <0x63>; + vcc7-supply = <0x63>; + vcc8-supply = <0x63>; + vcc9-supply = <0x63>; + vcc10-supply = <0x63>; + vcc11-supply = <0x141>; + vcc12-supply = <0x63>; + vcc13-supply = <0x142>; + vcc14-supply = <0x142>; + vcca-supply = <0x63>; + + pwrkey { + status = "okay"; + }; + + pinctrl_rk806 { + gpio-controller; + #gpio-cells = <0x02>; + + rk806_dvs1_null { + pins = "gpio_pwrctrl2"; + function = "pin_fun0"; + phandle = <0x13d>; + }; + + rk806_dvs1_slp { + pins = "gpio_pwrctrl1"; + function = "pin_fun1"; + }; + + rk806_dvs1_pwrdn { + pins = "gpio_pwrctrl1"; + function = "pin_fun2"; + phandle = <0x140>; + }; + + rk806_dvs1_rst { + pins = "gpio_pwrctrl1"; + function = "pin_fun3"; + }; + + rk806_dvs2_null { + pins = "gpio_pwrctrl2"; + function = "pin_fun0"; + phandle = <0x13e>; + }; + + rk806_dvs2_slp { + pins = "gpio_pwrctrl2"; + function = "pin_fun1"; + }; + + rk806_dvs2_pwrdn { + pins = "gpio_pwrctrl2"; + function = "pin_fun2"; + }; + + rk806_dvs2_rst { + pins = "gpio_pwrctrl2"; + function = "pin_fun3"; + }; + + rk806_dvs2_dvs { + pins = "gpio_pwrctrl2"; + function = "pin_fun4"; + }; + + rk806_dvs2_gpio { + pins = "gpio_pwrctrl2"; + function = "pin_fun5"; + }; + + rk806_dvs3_null { + pins = "gpio_pwrctrl3"; + function = "pin_fun0"; + phandle = <0x13f>; + }; + + rk806_dvs3_slp { + pins = "gpio_pwrctrl3"; + function = "pin_fun1"; + }; + + rk806_dvs3_pwrdn { + pins = "gpio_pwrctrl3"; + function = "pin_fun2"; + }; + + rk806_dvs3_rst { + pins = "gpio_pwrctrl3"; + function = "pin_fun3"; + }; + + rk806_dvs3_dvs { + pins = "gpio_pwrctrl3"; + function = "pin_fun4"; + }; + + rk806_dvs3_gpio { + pins = "gpio_pwrctrl3"; + function = "pin_fun5"; + }; + }; + + regulators { + + DCDC_REG1 { + regulator-boot-on; + regulator-min-microvolt = <0x86470>; + regulator-max-microvolt = <0xe7ef0>; + regulator-ramp-delay = <0x30d4>; + regulator-name = "vdd_gpu_s0"; + regulator-enable-ramp-delay = <0x190>; + phandle = <0x4f>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x86470>; + regulator-max-microvolt = <0xe7ef0>; + regulator-ramp-delay = <0x30d4>; + regulator-name = "vdd_cpu_lit_s0"; + phandle = <0x12>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xa4cb8>; + regulator-max-microvolt = <0xb71b0>; + regulator-ramp-delay = <0x30d4>; + regulator-name = "vdd_log_s0"; + phandle = <0x3c>; + + regulator-state-mem { + regulator-suspend-microvolt = <0xb71b0>; + regulator-on-in-suspend; + }; + }; + + DCDC_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x86470>; + regulator-max-microvolt = <0xe7ef0>; + regulator-init-microvolt = <0xb71b0>; + regulator-ramp-delay = <0x30d4>; + regulator-name = "vdd_vdenc_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xa4cb8>; + regulator-max-microvolt = <0xdbba0>; + regulator-ramp-delay = <0x30d4>; + regulator-name = "vdd_ddr_s0"; + phandle = <0x3b>; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <0xcf850>; + }; + }; + + DCDC_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vdd2_ddr_s3"; + + regulator-state-mem { + regulator-on-in-suspend; + }; + }; + + DCDC_REG7 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1e8480>; + regulator-max-microvolt = <0x1e8480>; + regulator-name = "vdd_2v0_pldo_s3"; + phandle = <0x141>; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x1e8480>; + }; + }; + + DCDC_REG8 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vcc_3v3_s3"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x325aa0>; + }; + }; + + DCDC_REG9 { + regulator-always-on; + regulator-boot-on; + regulator-name = "vddq_ddr_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + DCDC_REG10 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcc_1v8_s3"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x1b7740>; + }; + }; + + PLDO_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "avcc_1v8_s0"; + phandle = <0x1ba>; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-on-in-suspend; + }; + }; + + PLDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "vcc_1v8_s0"; + phandle = <0x15e>; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <0x1b7740>; + regulator-on-in-suspend; + }; + }; + + PLDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x124f80>; + regulator-max-microvolt = <0x124f80>; + regulator-name = "avdd_1v2_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + PLDO_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vcc_3v3_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + PLDO_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x325aa0>; + regulator-name = "vccio_sd_s0"; + phandle = <0x102>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + PLDO_REG6 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + regulator-name = "pldo6_s3"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0x1b7740>; + }; + }; + + NLDO_REG1 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xb71b0>; + regulator-max-microvolt = <0xb71b0>; + regulator-name = "vdd_0v75_s3"; + + regulator-state-mem { + regulator-on-in-suspend; + regulator-suspend-microvolt = <0xb71b0>; + }; + }; + + NLDO_REG2 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xcf850>; + regulator-max-microvolt = <0xcf850>; + regulator-name = "vdd_ddr_pll_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + regulator-suspend-microvolt = <0xcf850>; + }; + }; + + NLDO_REG3 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xb71b0>; + regulator-max-microvolt = <0xb71b0>; + regulator-name = "avdd_0v75_s0"; + phandle = <0x1bb>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + NLDO_REG4 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xcf850>; + regulator-max-microvolt = <0xcf850>; + regulator-name = "vdd_0v85_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + + NLDO_REG5 { + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xb71b0>; + regulator-max-microvolt = <0xb71b0>; + regulator-name = "vdd_0v75_s0"; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; + }; + }; + }; + + spi@feb30000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfeb30000 0x00 0x1000>; + interrupts = <0x00 0x149 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0xa6 0x02 0xa1>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0xd3 0x11 0xd3 0x12>; + dma-names = "tx\0rx"; + pinctrl-names = "default"; + pinctrl-0 = <0x143 0x144 0x145>; + num-cs = <0x02>; + status = "disabled"; + }; + + serial@feb40000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeb40000 0x00 0x100>; + interrupts = <0x00 0x14c 0x04>; + clocks = <0x02 0xb7 0x02 0xab>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x64 0x08 0x64 0x09>; + pinctrl-names = "default"; + pinctrl-0 = <0x146>; + status = "disabled"; + }; + + serial@feb50000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeb50000 0x00 0x100>; + interrupts = <0x00 0x14d 0x04>; + clocks = <0x02 0xbb 0x02 0xac>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x64 0x0a 0x64 0x0b>; + pinctrl-names = "default"; + pinctrl-0 = <0x147>; + status = "disabled"; + }; + + serial@feb60000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeb60000 0x00 0x100>; + interrupts = <0x00 0x14e 0x04>; + clocks = <0x02 0xbf 0x02 0xad>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0x64 0x0c 0x64 0x0d>; + pinctrl-names = "default"; + pinctrl-0 = <0x148>; + status = "disabled"; + }; + + serial@feb70000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeb70000 0x00 0x100>; + interrupts = <0x00 0x14f 0x04>; + clocks = <0x02 0xc3 0x02 0xae>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0xd3 0x09 0xd3 0x0a>; + pinctrl-names = "default"; + pinctrl-0 = <0x149>; + status = "disabled"; + }; + + serial@feb80000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeb80000 0x00 0x100>; + interrupts = <0x00 0x150 0x04>; + clocks = <0x02 0xc7 0x02 0xaf>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0xd3 0x0b 0xd3 0x0c>; + pinctrl-names = "default"; + pinctrl-0 = <0x14a>; + status = "disabled"; + }; + + serial@feb90000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeb90000 0x00 0x100>; + interrupts = <0x00 0x151 0x04>; + clocks = <0x02 0xcb 0x02 0xb0>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0xd3 0x0d 0xd3 0x0e>; + pinctrl-names = "default"; + pinctrl-0 = <0x14b 0x14c>; + status = "okay"; + }; + + serial@feba0000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfeba0000 0x00 0x100>; + interrupts = <0x00 0x152 0x04>; + clocks = <0x02 0xcf 0x02 0xb1>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0xd4 0x07 0xd4 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0x14d>; + status = "disabled"; + }; + + serial@febb0000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfebb0000 0x00 0x100>; + interrupts = <0x00 0x153 0x04>; + clocks = <0x02 0xd3 0x02 0xb2>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0xd4 0x09 0xd4 0x0a>; + pinctrl-names = "default"; + pinctrl-0 = <0x14e>; + status = "disabled"; + }; + + serial@febc0000 { + compatible = "rockchip,rk3588-uart\0snps,dw-apb-uart"; + reg = <0x00 0xfebc0000 0x00 0x100>; + interrupts = <0x00 0x154 0x04>; + clocks = <0x02 0xd7 0x02 0xb3>; + clock-names = "baudclk\0apb_pclk"; + reg-shift = <0x02>; + reg-io-width = <0x04>; + dmas = <0xd4 0x0b 0xd4 0x0c>; + pinctrl-names = "default"; + pinctrl-0 = <0x14f>; + status = "disabled"; + }; + + pwm@febd0000 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebd0000 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x150>; + clocks = <0x02 0x54 0x02 0x53>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febd0010 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebd0010 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x151>; + clocks = <0x02 0x54 0x02 0x53>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febd0020 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebd0020 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x152>; + clocks = <0x02 0x54 0x02 0x53>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febd0030 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebd0030 0x00 0x10>; + interrupts = <0x00 0x15a 0x04 0x00 0x15b 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x153>; + clocks = <0x02 0x54 0x02 0x53>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febe0000 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebe0000 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x154>; + clocks = <0x02 0x57 0x02 0x56>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febe0010 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebe0010 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x155>; + clocks = <0x02 0x57 0x02 0x56>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febe0020 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebe0020 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x156>; + clocks = <0x02 0x57 0x02 0x56>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febe0030 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebe0030 0x00 0x10>; + interrupts = <0x00 0x15c 0x04 0x00 0x15d 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x157>; + clocks = <0x02 0x57 0x02 0x56>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febf0000 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebf0000 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x158>; + clocks = <0x02 0x5a 0x02 0x59>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febf0010 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebf0010 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x159>; + clocks = <0x02 0x5a 0x02 0x59>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febf0020 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebf0020 0x00 0x10>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x15a>; + clocks = <0x02 0x5a 0x02 0x59>; + clock-names = "pwm\0pclk"; + status = "disabled"; + }; + + pwm@febf0030 { + compatible = "rockchip,rk3588-pwm\0rockchip,rk3328-pwm"; + reg = <0x00 0xfebf0030 0x00 0x10>; + interrupts = <0x00 0x15e 0x04 0x00 0x15f 0x04>; + #pwm-cells = <0x03>; + pinctrl-names = "active"; + pinctrl-0 = <0x15b>; + clocks = <0x02 0x5a 0x02 0x59>; + clock-names = "pwm\0pclk"; + status = "okay"; + phandle = <0x1ca>; + }; + + tsadc@fec00000 { + compatible = "rockchip,rk3588-tsadc"; + reg = <0x00 0xfec00000 0x00 0x400>; + interrupts = <0x00 0x18d 0x04>; + clocks = <0x02 0xaa 0x02 0xa9>; + clock-names = "tsadc\0apb_pclk"; + assigned-clocks = <0x02 0xaa>; + assigned-clock-rates = <0x1e8480>; + resets = <0x02 0xc1 0x02 0xc0>; + reset-names = "tsadc\0tsadc-apb"; + #thermal-sensor-cells = <0x01>; + rockchip,hw-tshut-temp = <0x1d4c0>; + rockchip,hw-tshut-mode = <0x00>; + rockchip,hw-tshut-polarity = <0x00>; + pinctrl-names = "gpio\0otpout"; + pinctrl-0 = <0x15c>; + pinctrl-1 = <0x15d>; + status = "okay"; + phandle = <0x4a>; + }; + + saradc@fec10000 { + compatible = "rockchip,rk3588-saradc"; + reg = <0x00 0xfec10000 0x00 0x10000>; + interrupts = <0x00 0x18e 0x04>; + #io-channel-cells = <0x01>; + clocks = <0x02 0x9d 0x02 0x9c>; + clock-names = "saradc\0apb_pclk"; + resets = <0x02 0xbe>; + reset-names = "saradc-apb"; + status = "okay"; + vref-supply = <0x15e>; + phandle = <0x1b3>; + }; + + mailbox@fec60000 { + compatible = "rockchip,rk3588-mailbox\0rockchip,rk3368-mailbox"; + reg = <0x00 0xfec60000 0x00 0x200>; + interrupts = <0x00 0x3d 0x04 0x00 0x3e 0x04 0x00 0x3f 0x04 0x00 0x40 0x04>; + clocks = <0x02 0x4c>; + clock-names = "pclk_mailbox"; + #mbox-cells = <0x01>; + status = "disabled"; + }; + + mailbox@fec70000 { + compatible = "rockchip,rk3588-mailbox\0rockchip,rk3368-mailbox"; + reg = <0x00 0xfec70000 0x00 0x200>; + interrupts = <0x00 0x45 0x04 0x00 0x46 0x04 0x00 0x47 0x04 0x00 0x48 0x04>; + clocks = <0x02 0x4d>; + clock-names = "pclk_mailbox"; + #mbox-cells = <0x01>; + status = "disabled"; + }; + + i2c@fec80000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfec80000 0x00 0x1000>; + clocks = <0x02 0x92 0x02 0x8a>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x143 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x15f>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + clock-frequency = <0x61a80>; + + gpio@21 { + compatible = "nxp,pca9555"; + reg = <0x21>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-group-num = <0xc8>; + status = "disabled"; + phandle = <0x1b8>; + }; + + hym8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0x00>; + clock-frequency = <0x8000>; + clock-output-names = "hym8563"; + pinctrl-names = "default"; + pinctrl-0 = <0x160>; + interrupt-parent = <0x13b>; + interrupts = <0x08 0x08>; + wakeup-source; + status = "disabled"; + phandle = <0x1c0>; + }; + + fusb302@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <0x13b>; + interrupts = <0x1b 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0x161>; + vbus-supply = <0x162>; + status = "okay"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint@0 { + remote-endpoint = <0x163>; + phandle = <0x54>; + }; + }; + }; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "dual"; + try-power-role = "sink"; + op-sink-microwatt = <0xf4240>; + sink-pdos = <0x4019064>; + source-pdos = <0x401912c>; + + altmodes { + #address-cells = <0x01>; + #size-cells = <0x00>; + + altmode@0 { + reg = <0x00>; + svid = <0xff01>; + vdo = <0xffffffff>; + }; + }; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + + endpoint { + remote-endpoint = <0x164>; + phandle = <0x16f>; + }; + }; + + port@1 { + reg = <0x01>; + + endpoint { + remote-endpoint = <0x165>; + phandle = <0x170>; + }; + }; + }; + }; + }; + }; + + i2c@fec90000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfec90000 0x00 0x1000>; + clocks = <0x02 0x93 0x02 0x8b>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x144 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x166>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + i2c@feca0000 { + compatible = "rockchip,rk3588-i2c\0rockchip,rk3399-i2c"; + reg = <0x00 0xfeca0000 0x00 0x1000>; + clocks = <0x02 0x94 0x02 0x8c>; + clock-names = "i2c\0pclk"; + interrupts = <0x00 0x145 0x04>; + pinctrl-names = "default"; + pinctrl-0 = <0x167>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@fecb0000 { + compatible = "rockchip,rk3066-spi"; + reg = <0x00 0xfecb0000 0x00 0x1000>; + interrupts = <0x00 0x14a 0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + clocks = <0x02 0xa7 0x02 0xa2>; + clock-names = "spiclk\0apb_pclk"; + dmas = <0xd4 0x0d 0xd4 0x0e>; + dma-names = "tx\0rx"; + pinctrl-names = "default"; + pinctrl-0 = <0x168 0x169 0x16a>; + num-cs = <0x02>; + status = "disabled"; + }; + + otp@fecc0000 { + compatible = "rockchip,rk3588-otp"; + reg = <0x00 0xfecc0000 0x00 0x400>; + #address-cells = <0x01>; + #size-cells = <0x01>; + clocks = <0x02 0x96 0x02 0x95 0x02 0x97 0x02 0x99>; + clock-names = "otpc\0apb\0arb\0phy"; + resets = <0x02 0x12a 0x02 0x129 0x02 0x12b>; + reset-names = "otpc\0apb\0arb"; + + cpu-code@2 { + reg = <0x02 0x02>; + phandle = <0x29>; + }; + + specification-serial-number@6 { + reg = <0x06 0x01>; + bits = <0x00 0x05>; + phandle = <0x20>; + }; + + id@7 { + reg = <0x07 0x10>; + phandle = <0x27>; + }; + + cpu-version@1c { + reg = <0x1c 0x01>; + bits = <0x03 0x03>; + phandle = <0x28>; + }; + + cpub0-leakage@17 { + reg = <0x17 0x01>; + phandle = <0x23>; + }; + + cpub1-leakage@18 { + reg = <0x18 0x01>; + phandle = <0x25>; + }; + + cpul-leakage@19 { + reg = <0x19 0x01>; + phandle = <0x1f>; + }; + + log-leakage@1a { + reg = <0x1a 0x01>; + phandle = <0x3d>; + }; + + gpu-leakage@1b { + reg = <0x1b 0x01>; + phandle = <0x50>; + }; + + npu-leakage@28 { + reg = <0x28 0x01>; + phandle = <0x9c>; + }; + + codec-leakage@29 { + reg = <0x29 0x01>; + }; + }; + + mailbox@fece0000 { + compatible = "rockchip,rk3588-mailbox\0rockchip,rk3368-mailbox"; + reg = <0x00 0xfece0000 0x00 0x200>; + interrupts = <0x00 0x4d 0x04 0x00 0x4e 0x04 0x00 0x4f 0x04 0x00 0x50 0x04>; + clocks = <0x02 0x4e>; + clock-names = "pclk_mailbox"; + #mbox-cells = <0x01>; + status = "disabled"; + }; + + dma-controller@fed10000 { + compatible = "arm,pl330\0arm,primecell"; + reg = <0x00 0xfed10000 0x00 0x4000>; + interrupts = <0x00 0x5a 0x04 0x00 0x5b 0x04>; + clocks = <0x02 0x7a>; + clock-names = "apb_pclk"; + #dma-cells = <0x01>; + arm,pl330-periph-burst; + phandle = <0xd4>; + }; + + phy@fed60000 { + compatible = "rockchip,rk3588-hdptx-phy"; + reg = <0x00 0xfed60000 0x00 0x2000>; + clocks = <0x02 0x2b5 0x02 0x267>; + clock-names = "ref\0apb"; + resets = <0x02 0x485 0x02 0xc003b 0x02 0xc003c 0x02 0xc003d>; + reset-names = "apb\0init\0cmn\0lane"; + rockchip,grf = <0x16b>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0xe3>; + }; + + hdmiphy@fed60000 { + compatible = "rockchip,rk3588-hdptx-phy-hdmi"; + reg = <0x00 0xfed60000 0x00 0x2000>; + clocks = <0x02 0x2b5 0x02 0x267>; + clock-names = "ref\0apb"; + resets = <0x02 0x48e 0x02 0x485 0x02 0xc003b 0x02 0xc003c 0x02 0xc003d 0x02 0x48c 0x02 0x48d>; + reset-names = "phy\0apb\0init\0cmn\0lane\0ropll\0lcpll"; + rockchip,grf = <0x16b>; + #phy-cells = <0x00>; + status = "okay"; + phandle = <0xdf>; + + clk-port { + #clock-cells = <0x00>; + status = "okay"; + phandle = <0x2e>; + }; + }; + + phy@fed80000 { + compatible = "rockchip,rk3588-usbdp-phy"; + reg = <0x00 0xfed80000 0x00 0x10000>; + rockchip,u2phy-grf = <0x16c>; + rockchip,usb-grf = <0x5f>; + rockchip,usbdpphy-grf = <0x16d>; + rockchip,vo-grf = <0xd7>; + clocks = <0x02 0x2b6 0x02 0x27f 0x02 0x269 0x16e>; + clock-names = "refclk\0immortal\0pclk\0utmi"; + resets = <0x02 0x28 0x02 0x29 0x02 0x2a 0x02 0x2b 0x02 0x482>; + reset-names = "init\0cmn\0lane\0pcs_apb\0pma_apb"; + status = "okay"; + orientation-switch; + svid = <0xff01>; + sbu1-dc-gpios = <0xe0 0x06 0x00>; + sbu2-dc-gpios = <0xe0 0x07 0x00>; + + dp-port { + #phy-cells = <0x00>; + status = "okay"; + phandle = <0xd8>; + }; + + u3-port { + #phy-cells = <0x00>; + status = "okay"; + phandle = <0x53>; + }; + + port { + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x16f>; + phandle = <0x164>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x170>; + phandle = <0x165>; + }; + }; + }; + + phy@feda0000 { + compatible = "rockchip,rk3588-mipi-dcphy"; + reg = <0x00 0xfeda0000 0x00 0x10000>; + rockchip,grf = <0x171>; + clocks = <0x02 0x108 0x02 0x2b6>; + clock-names = "pclk\0ref"; + resets = <0x02 0xc0043 0x02 0x3e 0x02 0x3f 0x02 0xc0044>; + reset-names = "m_phy\0apb\0grf\0s_phy"; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x2a>; + }; + + phy@fedb0000 { + compatible = "rockchip,rk3588-mipi-dcphy"; + reg = <0x00 0xfedb0000 0x00 0x10000>; + rockchip,grf = <0x172>; + clocks = <0x02 0x109 0x02 0x2b6>; + clock-names = "pclk\0ref"; + resets = <0x02 0xc0045 0x02 0x43 0x02 0x44 0x02 0xc0046>; + reset-names = "m_phy\0apb\0grf\0s_phy"; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x2b>; + }; + + csi2-dphy0-hw@fedc0000 { + compatible = "rockchip,rk3588-csi2-dphy-hw"; + reg = <0x00 0xfedc0000 0x00 0x8000>; + clocks = <0x02 0x10c>; + clock-names = "pclk"; + resets = <0x02 0x17 0x02 0x16>; + reset-names = "srst_csiphy0\0srst_p_csiphy0"; + rockchip,grf = <0x173>; + rockchip,sys_grf = <0xb7>; + status = "disabled"; + phandle = <0x2c>; + }; + + phy@fee00000 { + compatible = "rockchip,rk3588-naneng-combphy"; + reg = <0x00 0xfee00000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x02 0x2bd 0x02 0x185 0x02 0x166>; + clock-names = "refclk\0apbclk\0phpclk"; + assigned-clocks = <0x02 0x2bd>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x02 0x20005 0x02 0x4d6>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x61>; + rockchip,pipe-phy-grf = <0x174>; + status = "disabled"; + phandle = <0xea>; + }; + + phy@fee20000 { + compatible = "rockchip,rk3588-naneng-combphy"; + reg = <0x00 0xfee20000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x02 0x2bf 0x02 0x187 0x02 0x166>; + clock-names = "refclk\0apbclk\0phpclk"; + assigned-clocks = <0x02 0x2bf>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x02 0x20007 0x02 0x4d8>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x61>; + rockchip,pipe-phy-grf = <0x175>; + rockchip,pcie1ln-sel-bits = <0x100 0x01 0x01 0x00>; + status = "disabled"; + phandle = <0x5b>; + }; + + sram@ff001000 { + compatible = "mmio-sram"; + reg = <0x00 0xff001000 0x00 0xef000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0xff001000 0xef000>; + + rkvdec-sram@0 { + reg = <0x00 0x78000>; + phandle = <0xae>; + }; + + rkvdec-sram@78000 { + reg = <0x78000 0x77000>; + phandle = <0xb0>; + }; + }; + + pinctrl { + compatible = "rockchip,rk3588-pinctrl"; + rockchip,grf = <0x176>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + phandle = <0x177>; + + gpio@fd8a0000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfd8a0000 0x00 0x100>; + interrupts = <0x00 0x115 0x04>; + clocks = <0x02 0x284 0x02 0x285>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-ranges = <0x177 0x00 0x00 0x20>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x13b>; + }; + + gpio@fec20000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfec20000 0x00 0x100>; + interrupts = <0x00 0x116 0x04>; + clocks = <0x02 0x7d 0x02 0x7e>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-ranges = <0x177 0x00 0x20 0x20>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x189>; + }; + + gpio@fec30000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfec30000 0x00 0x100>; + interrupts = <0x00 0x117 0x04>; + clocks = <0x02 0x7f 0x02 0x80>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-ranges = <0x177 0x00 0x40 0x20>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0x1b9>; + }; + + gpio@fec40000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfec40000 0x00 0x100>; + interrupts = <0x00 0x118 0x04>; + clocks = <0x02 0x81 0x02 0x82>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-ranges = <0x177 0x00 0x60 0x20>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0xee>; + }; + + gpio@fec50000 { + compatible = "rockchip,gpio-bank"; + reg = <0x00 0xfec50000 0x00 0x100>; + interrupts = <0x00 0x119 0x04>; + clocks = <0x02 0x83 0x02 0x84>; + gpio-controller; + #gpio-cells = <0x02>; + gpio-ranges = <0x177 0x00 0x80 0x20>; + interrupt-controller; + #interrupt-cells = <0x02>; + phandle = <0xe0>; + }; + + pcfg-pull-up { + bias-pull-up; + phandle = <0x17e>; + }; + + pcfg-pull-down { + bias-pull-down; + phandle = <0x181>; + }; + + pcfg-pull-none { + bias-disable; + phandle = <0x178>; + }; + + pcfg-pull-none-drv-level-2 { + bias-disable; + drive-strength = <0x02>; + phandle = <0x180>; + }; + + pcfg-pull-up-drv-level-1 { + bias-pull-up; + drive-strength = <0x01>; + phandle = <0x17f>; + }; + + pcfg-pull-up-drv-level-2 { + bias-pull-up; + drive-strength = <0x02>; + phandle = <0x179>; + }; + + pcfg-pull-up-drv-level-6 { + bias-pull-up; + drive-strength = <0x06>; + phandle = <0x17a>; + }; + + pcfg-pull-none-smt { + bias-disable; + input-schmitt-enable; + phandle = <0x17d>; + }; + + pcfg-pull-none-drv-level-1-smt { + bias-disable; + drive-strength = <0x01>; + input-schmitt-enable; + phandle = <0x17c>; + }; + + pcfg-pull-none-drv-level-5-smt { + bias-disable; + drive-strength = <0x05>; + input-schmitt-enable; + phandle = <0x17b>; + }; + + auddsm { + + auddsm-pins { + rockchip,pins = <0x03 0x01 0x04 0x178 0x03 0x02 0x04 0x178 0x03 0x03 0x04 0x178 0x03 0x04 0x04 0x178>; + phandle = <0x129>; + }; + }; + + bt1120 { + + bt1120-pins { + rockchip,pins = <0x04 0x08 0x02 0x178 0x04 0x00 0x02 0x178 0x04 0x01 0x02 0x178 0x04 0x02 0x02 0x178 0x04 0x03 0x02 0x178 0x04 0x04 0x02 0x178 0x04 0x05 0x02 0x178 0x04 0x06 0x02 0x178 0x04 0x07 0x02 0x178 0x04 0x0a 0x02 0x178 0x04 0x0b 0x02 0x178 0x04 0x0c 0x02 0x178 0x04 0x0d 0x02 0x178 0x04 0x0e 0x02 0x178 0x04 0x0f 0x02 0x178 0x04 0x10 0x02 0x178 0x04 0x11 0x02 0x178>; + phandle = <0x5c>; + }; + }; + + can0 { + + can0m0-pins { + rockchip,pins = <0x00 0x10 0x0b 0x178 0x00 0x0f 0x0b 0x178>; + phandle = <0x12a>; + }; + }; + + can1 { + + can1m1-pins { + rockchip,pins = <0x04 0x0a 0x0c 0x178 0x04 0x0b 0x0c 0x178>; + phandle = <0x12b>; + }; + }; + + can2 { + + can2m0-pins { + rockchip,pins = <0x03 0x14 0x09 0x178 0x03 0x15 0x09 0x178>; + phandle = <0x12c>; + }; + }; + + gmac1 { + + gmac1-miim { + rockchip,pins = <0x03 0x12 0x01 0x178 0x03 0x13 0x01 0x178>; + phandle = <0xf8>; + }; + + gmac1-rx-bus2 { + rockchip,pins = <0x03 0x07 0x01 0x178 0x03 0x08 0x01 0x178 0x03 0x09 0x01 0x178>; + phandle = <0xfa>; + }; + + gmac1-tx-bus2 { + rockchip,pins = <0x03 0x0b 0x01 0x17a 0x03 0x0c 0x01 0x17a 0x03 0x0d 0x01 0x178>; + phandle = <0xf9>; + }; + + gmac1-rgmii-clk { + rockchip,pins = <0x03 0x05 0x01 0x178 0x03 0x04 0x01 0x178>; + phandle = <0xfb>; + }; + + gmac1-rgmii-bus { + rockchip,pins = <0x03 0x02 0x01 0x178 0x03 0x03 0x01 0x178 0x03 0x00 0x01 0x17a 0x03 0x01 0x01 0x17a>; + phandle = <0xfc>; + }; + }; + + hdmi { + + hdmim0-tx0-cec { + rockchip,pins = <0x04 0x11 0x05 0x178>; + phandle = <0xdb>; + }; + + hdmim0-tx0-hpd { + rockchip,pins = <0x01 0x05 0x05 0x178>; + phandle = <0xdc>; + }; + + hdmim0-tx0-scl { + rockchip,pins = <0x04 0x0f 0x05 0x17b>; + phandle = <0xdd>; + }; + + hdmim0-tx0-sda { + rockchip,pins = <0x04 0x10 0x05 0x17c>; + phandle = <0xde>; + }; + + hdmim0-tx1-hpd { + rockchip,pins = <0x01 0x06 0x05 0x178>; + phandle = <0x18d>; + }; + + hdmim1-rx-cec { + rockchip,pins = <0x03 0x19 0x05 0x178>; + phandle = <0x197>; + }; + + hdmim1-rx-hpdin { + rockchip,pins = <0x03 0x1c 0x05 0x178>; + phandle = <0x198>; + }; + + hdmim1-rx-scl { + rockchip,pins = <0x03 0x1a 0x05 0x17d>; + phandle = <0x199>; + }; + + hdmim1-rx-sda { + rockchip,pins = <0x03 0x1b 0x05 0x17d>; + phandle = <0x19a>; + }; + + hdmim1-tx1-scl { + rockchip,pins = <0x03 0x16 0x05 0x17b>; + phandle = <0x18e>; + }; + + hdmim1-tx1-sda { + rockchip,pins = <0x03 0x15 0x05 0x17c>; + phandle = <0x18f>; + }; + + hdmim2-tx1-cec { + rockchip,pins = <0x03 0x14 0x05 0x178>; + phandle = <0x18c>; + }; + }; + + i2c0 { + + i2c0m2-xfer { + rockchip,pins = <0x00 0x19 0x03 0x17d 0x00 0x1a 0x03 0x17d>; + phandle = <0x62>; + }; + }; + + i2c1 { + + i2c1m2-xfer { + rockchip,pins = <0x00 0x1c 0x09 0x17d 0x00 0x1d 0x09 0x17d>; + phandle = <0x12d>; + }; + }; + + i2c2 { + + i2c2m0-xfer { + rockchip,pins = <0x00 0x0f 0x09 0x17d 0x00 0x10 0x09 0x17d>; + phandle = <0x12e>; + }; + }; + + i2c3 { + + i2c3m0-xfer { + rockchip,pins = <0x01 0x11 0x09 0x17d 0x01 0x10 0x09 0x17d>; + phandle = <0x12f>; + }; + }; + + i2c4 { + + i2c4m0-xfer { + rockchip,pins = <0x03 0x06 0x09 0x17d 0x03 0x05 0x09 0x17d>; + phandle = <0x131>; + }; + }; + + i2c5 { + + i2c5m0-xfer { + rockchip,pins = <0x03 0x17 0x09 0x17d 0x03 0x18 0x09 0x17d>; + phandle = <0x132>; + }; + }; + + i2c6 { + + i2c6m0-xfer { + rockchip,pins = <0x00 0x18 0x09 0x17d 0x00 0x17 0x09 0x17d>; + phandle = <0x15f>; + }; + }; + + i2c7 { + + i2c7m0-xfer { + rockchip,pins = <0x01 0x18 0x09 0x17d 0x01 0x19 0x09 0x17d>; + phandle = <0x166>; + }; + }; + + i2c8 { + + i2c8m0-xfer { + rockchip,pins = <0x04 0x1a 0x09 0x17d 0x04 0x1b 0x09 0x17d>; + phandle = <0x167>; + }; + }; + + i2s0 { + + i2s0-lrck { + rockchip,pins = <0x01 0x15 0x01 0x178>; + phandle = <0x105>; + }; + + i2s0-mclk { + rockchip,pins = <0x01 0x12 0x01 0x178>; + phandle = <0x130>; + }; + + i2s0-sclk { + rockchip,pins = <0x01 0x13 0x01 0x178>; + phandle = <0x106>; + }; + + i2s0-sdi0 { + rockchip,pins = <0x01 0x1c 0x02 0x178>; + phandle = <0x107>; + }; + + i2s0-sdo0 { + rockchip,pins = <0x01 0x17 0x01 0x178>; + phandle = <0x108>; + }; + }; + + i2s1 { + + i2s1m0-lrck { + rockchip,pins = <0x04 0x02 0x03 0x178>; + phandle = <0x109>; + }; + + i2s1m0-sclk { + rockchip,pins = <0x04 0x01 0x03 0x178>; + phandle = <0x10a>; + }; + + i2s1m0-sdi0 { + rockchip,pins = <0x04 0x05 0x03 0x178>; + phandle = <0x10b>; + }; + + i2s1m0-sdi1 { + rockchip,pins = <0x04 0x06 0x03 0x178>; + phandle = <0x10c>; + }; + + i2s1m0-sdi2 { + rockchip,pins = <0x04 0x07 0x03 0x178>; + phandle = <0x10d>; + }; + + i2s1m0-sdi3 { + rockchip,pins = <0x04 0x08 0x03 0x178>; + phandle = <0x10e>; + }; + + i2s1m0-sdo0 { + rockchip,pins = <0x04 0x09 0x03 0x178>; + phandle = <0x10f>; + }; + + i2s1m0-sdo1 { + rockchip,pins = <0x04 0x0a 0x03 0x178>; + phandle = <0x110>; + }; + + i2s1m0-sdo2 { + rockchip,pins = <0x04 0x0b 0x03 0x178>; + phandle = <0x111>; + }; + + i2s1m0-sdo3 { + rockchip,pins = <0x04 0x0c 0x03 0x178>; + phandle = <0x112>; + }; + }; + + i2s2 { + + i2s2m1-lrck { + rockchip,pins = <0x03 0x0e 0x03 0x178>; + phandle = <0x113>; + }; + + i2s2m1-sclk { + rockchip,pins = <0x03 0x0d 0x03 0x178>; + phandle = <0x114>; + }; + + i2s2m1-sdi { + rockchip,pins = <0x03 0x0a 0x03 0x178>; + phandle = <0x115>; + }; + + i2s2m1-sdo { + rockchip,pins = <0x03 0x0b 0x03 0x178>; + phandle = <0x116>; + }; + }; + + i2s3 { + + i2s3-lrck { + rockchip,pins = <0x03 0x02 0x03 0x178>; + phandle = <0x117>; + }; + + i2s3-sclk { + rockchip,pins = <0x03 0x01 0x03 0x178>; + phandle = <0x118>; + }; + + i2s3-sdi { + rockchip,pins = <0x03 0x04 0x03 0x178>; + phandle = <0x119>; + }; + + i2s3-sdo { + rockchip,pins = <0x03 0x03 0x03 0x178>; + phandle = <0x11a>; + }; + }; + + pdm0 { + + pdm0m0-clk { + rockchip,pins = <0x01 0x16 0x03 0x178>; + phandle = <0x11b>; + }; + + pdm0m0-clk1 { + rockchip,pins = <0x01 0x14 0x03 0x178>; + phandle = <0x11c>; + }; + + pdm0m0-sdi0 { + rockchip,pins = <0x01 0x1d 0x03 0x178>; + phandle = <0x11d>; + }; + + pdm0m0-sdi1 { + rockchip,pins = <0x01 0x19 0x03 0x178>; + phandle = <0x11e>; + }; + + pdm0m0-sdi2 { + rockchip,pins = <0x01 0x1a 0x03 0x178>; + phandle = <0x11f>; + }; + + pdm0m0-sdi3 { + rockchip,pins = <0x01 0x1b 0x03 0x178>; + phandle = <0x120>; + }; + }; + + pdm1 { + + pdm1m0-clk { + rockchip,pins = <0x04 0x1d 0x02 0x178>; + phandle = <0x121>; + }; + + pdm1m0-clk1 { + rockchip,pins = <0x04 0x1c 0x02 0x178>; + phandle = <0x122>; + }; + + pdm1m0-sdi0 { + rockchip,pins = <0x04 0x1b 0x02 0x178>; + phandle = <0x123>; + }; + + pdm1m0-sdi1 { + rockchip,pins = <0x04 0x1a 0x02 0x178>; + phandle = <0x124>; + }; + + pdm1m0-sdi2 { + rockchip,pins = <0x04 0x19 0x02 0x178>; + phandle = <0x125>; + }; + + pdm1m0-sdi3 { + rockchip,pins = <0x04 0x18 0x02 0x178>; + phandle = <0x126>; + }; + }; + + pmic { + + pmic-pins { + rockchip,pins = <0x00 0x07 0x00 0x17e 0x00 0x02 0x01 0x178 0x00 0x03 0x01 0x178 0x00 0x11 0x01 0x178 0x00 0x12 0x01 0x178 0x00 0x13 0x01 0x178 0x00 0x1e 0x01 0x178>; + phandle = <0x13c>; + }; + }; + + pwm0 { + + pwm0m0-pins { + rockchip,pins = <0x00 0x0f 0x03 0x178>; + phandle = <0x66>; + }; + }; + + pwm1 { + + pwm1m0-pins { + rockchip,pins = <0x00 0x10 0x03 0x178>; + phandle = <0x67>; + }; + }; + + pwm2 { + + pwm2m0-pins { + rockchip,pins = <0x00 0x14 0x03 0x178>; + phandle = <0x68>; + }; + }; + + pwm3 { + + pwm3m0-pins { + rockchip,pins = <0x00 0x1c 0x03 0x178>; + phandle = <0x69>; + }; + }; + + pwm4 { + + pwm4m0-pins { + rockchip,pins = <0x00 0x15 0x0b 0x178>; + phandle = <0x150>; + }; + }; + + pwm5 { + + pwm5m0-pins { + rockchip,pins = <0x00 0x09 0x03 0x178>; + phandle = <0x151>; + }; + }; + + pwm6 { + + pwm6m0-pins { + rockchip,pins = <0x00 0x17 0x0b 0x178>; + phandle = <0x152>; + }; + }; + + pwm7 { + + pwm7m0-pins { + rockchip,pins = <0x00 0x18 0x0b 0x178>; + phandle = <0x153>; + }; + }; + + pwm8 { + + pwm8m0-pins { + rockchip,pins = <0x03 0x07 0x0b 0x178>; + phandle = <0x154>; + }; + }; + + pwm9 { + + pwm9m0-pins { + rockchip,pins = <0x03 0x08 0x0b 0x178>; + phandle = <0x155>; + }; + }; + + pwm10 { + + pwm10m0-pins { + rockchip,pins = <0x03 0x00 0x0b 0x178>; + phandle = <0x156>; + }; + }; + + pwm11 { + + pwm11m0-pins { + rockchip,pins = <0x03 0x01 0x0b 0x178>; + phandle = <0x157>; + }; + }; + + pwm12 { + + pwm12m0-pins { + rockchip,pins = <0x03 0x0d 0x0b 0x178>; + phandle = <0x158>; + }; + }; + + pwm13 { + + pwm13m0-pins { + rockchip,pins = <0x03 0x0e 0x0b 0x178>; + phandle = <0x159>; + }; + }; + + pwm14 { + + pwm14m0-pins { + rockchip,pins = <0x03 0x12 0x0b 0x178>; + phandle = <0x15a>; + }; + }; + + pwm15 { + + pwm15m2-pins { + rockchip,pins = <0x01 0x16 0x0b 0x178>; + phandle = <0x15b>; + }; + }; + + sdio { + + sdiom1-pins { + rockchip,pins = <0x03 0x05 0x02 0x178 0x03 0x04 0x02 0x17e 0x03 0x00 0x02 0x17e 0x03 0x01 0x02 0x17e 0x03 0x02 0x02 0x17e 0x03 0x03 0x02 0x17e>; + phandle = <0x103>; + }; + }; + + sdmmc { + + sdmmc-bus4 { + rockchip,pins = <0x04 0x18 0x01 0x179 0x04 0x19 0x01 0x179 0x04 0x1a 0x01 0x179 0x04 0x1b 0x01 0x179>; + phandle = <0x101>; + }; + + sdmmc-clk { + rockchip,pins = <0x04 0x1d 0x01 0x179>; + phandle = <0xfe>; + }; + + sdmmc-cmd { + rockchip,pins = <0x04 0x1c 0x01 0x179>; + phandle = <0xff>; + }; + + sdmmc-det { + rockchip,pins = <0x00 0x04 0x01 0x17e>; + phandle = <0x100>; + }; + }; + + spdif0 { + + spdif0m0-tx { + rockchip,pins = <0x01 0x0e 0x03 0x178>; + phandle = <0x127>; + }; + }; + + spdif1 { + + spdif1m0-tx { + rockchip,pins = <0x01 0x0f 0x03 0x178>; + phandle = <0x128>; + }; + }; + + spi0 { + + spi0m0-pins { + rockchip,pins = <0x00 0x16 0x08 0x17a 0x00 0x17 0x08 0x17a 0x00 0x10 0x08 0x17a>; + phandle = <0x135>; + }; + + spi0m0-cs0 { + rockchip,pins = <0x00 0x19 0x08 0x17a>; + phandle = <0x133>; + }; + + spi0m0-cs1 { + rockchip,pins = <0x00 0x0f 0x08 0x17a>; + phandle = <0x134>; + }; + }; + + spi1 { + + spi1m1-pins { + rockchip,pins = <0x03 0x11 0x08 0x17a 0x03 0x10 0x08 0x17a 0x03 0x0f 0x08 0x17a>; + phandle = <0x138>; + }; + + spi1m1-cs0 { + rockchip,pins = <0x03 0x12 0x08 0x17a>; + phandle = <0x136>; + }; + + spi1m1-cs1 { + rockchip,pins = <0x03 0x13 0x08 0x17a>; + phandle = <0x137>; + }; + }; + + spi2 { + + spi2m2-pins { + rockchip,pins = <0x00 0x05 0x01 0x17f 0x00 0x0b 0x01 0x17f 0x00 0x06 0x01 0x17f>; + phandle = <0x13a>; + }; + + spi2m2-cs0 { + rockchip,pins = <0x00 0x09 0x01 0x17f>; + phandle = <0x139>; + }; + }; + + spi3 { + + spi3m1-pins { + rockchip,pins = <0x04 0x0f 0x08 0x17a 0x04 0x0d 0x08 0x17a 0x04 0x0e 0x08 0x17a>; + phandle = <0x145>; + }; + + spi3m1-cs0 { + rockchip,pins = <0x04 0x10 0x08 0x17a>; + phandle = <0x143>; + }; + + spi3m1-cs1 { + rockchip,pins = <0x04 0x11 0x08 0x17a>; + phandle = <0x144>; + }; + }; + + spi4 { + + spi4m0-pins { + rockchip,pins = <0x01 0x12 0x08 0x17a 0x01 0x10 0x08 0x17a 0x01 0x11 0x08 0x17a>; + phandle = <0x16a>; + }; + + spi4m0-cs0 { + rockchip,pins = <0x01 0x13 0x08 0x17a>; + phandle = <0x168>; + }; + + spi4m0-cs1 { + rockchip,pins = <0x01 0x14 0x08 0x17a>; + phandle = <0x169>; + }; + }; + + tsadc { + + tsadc-shut { + rockchip,pins = <0x00 0x01 0x02 0x178>; + phandle = <0x15d>; + }; + }; + + uart0 { + + uart0m2-xfer { + rockchip,pins = <0x04 0x04 0x0a 0x17e 0x04 0x03 0x0a 0x17e>; + phandle = <0x65>; + }; + }; + + uart1 { + + uart1m1-xfer { + rockchip,pins = <0x01 0x0f 0x0a 0x17e 0x01 0x0e 0x0a 0x17e>; + phandle = <0x146>; + }; + }; + + uart2 { + + uart2m0-xfer { + rockchip,pins = <0x00 0x0e 0x0a 0x17e 0x00 0x0d 0x0a 0x17e>; + phandle = <0x1ab>; + }; + + uart2m1-xfer { + rockchip,pins = <0x04 0x19 0x0a 0x17e 0x04 0x18 0x0a 0x17e>; + phandle = <0x147>; + }; + }; + + uart3 { + + uart3m1-xfer { + rockchip,pins = <0x03 0x0e 0x0a 0x17e 0x03 0x0d 0x0a 0x17e>; + phandle = <0x148>; + }; + }; + + uart4 { + + uart4m1-xfer { + rockchip,pins = <0x03 0x18 0x0a 0x17e 0x03 0x19 0x0a 0x17e>; + phandle = <0x149>; + }; + }; + + uart5 { + + uart5m1-xfer { + rockchip,pins = <0x03 0x15 0x0a 0x17e 0x03 0x14 0x0a 0x17e>; + phandle = <0x14a>; + }; + }; + + uart6 { + + uart6m1-xfer { + rockchip,pins = <0x01 0x00 0x0a 0x17e 0x01 0x01 0x0a 0x17e>; + phandle = <0x14b>; + }; + + uart6m1-ctsn { + rockchip,pins = <0x01 0x03 0x0a 0x178>; + phandle = <0x14c>; + }; + + uart6m1-rtsn { + rockchip,pins = <0x01 0x02 0x0a 0x178>; + phandle = <0x1c1>; + }; + }; + + uart7 { + + uart7m1-xfer { + rockchip,pins = <0x03 0x11 0x0a 0x17e 0x03 0x10 0x0a 0x17e>; + phandle = <0x14d>; + }; + }; + + uart8 { + + uart8m1-xfer { + rockchip,pins = <0x03 0x03 0x0a 0x17e 0x03 0x02 0x0a 0x17e>; + phandle = <0x14e>; + }; + }; + + uart9 { + + uart9m1-xfer { + rockchip,pins = <0x04 0x0d 0x0a 0x17e 0x04 0x0c 0x0a 0x17e>; + phandle = <0x14f>; + }; + }; + + gpio-func { + + tsadc-gpio-func { + rockchip,pins = <0x00 0x01 0x00 0x178>; + phandle = <0x15c>; + }; + }; + + gmac0 { + + gmac0-miim { + rockchip,pins = <0x04 0x14 0x01 0x178 0x04 0x15 0x01 0x178>; + phandle = <0xef>; + }; + + gmac0-rx-bus2 { + rockchip,pins = <0x02 0x11 0x01 0x178 0x02 0x12 0x01 0x178 0x04 0x12 0x01 0x178>; + phandle = <0xf1>; + }; + + gmac0-tx-bus2 { + rockchip,pins = <0x02 0x0e 0x01 0x17a 0x02 0x0f 0x01 0x17a 0x02 0x10 0x01 0x178>; + phandle = <0xf0>; + }; + + gmac0-rgmii-clk { + rockchip,pins = <0x02 0x08 0x01 0x178 0x02 0x0b 0x01 0x178>; + phandle = <0xf2>; + }; + + gmac0-rgmii-bus { + rockchip,pins = <0x02 0x06 0x01 0x178 0x02 0x07 0x01 0x178 0x02 0x09 0x01 0x17a 0x02 0x0a 0x01 0x17a>; + phandle = <0xf3>; + }; + }; + + dp { + + dp1-hpd { + rockchip,pins = <0x01 0x04 0x00 0x178>; + phandle = <0x188>; + }; + }; + + leds { + + leds-gpio { + rockchip,pins = <0x01 0x0b 0x00 0x178>; + phandle = <0x1ac>; + }; + }; + + hdmirx { + + hdmirx-det { + rockchip,pins = <0x01 0x1d 0x00 0x17e>; + phandle = <0x19b>; + }; + }; + + headphone { + + hp-det { + rockchip,pins = <0x01 0x14 0x00 0x178>; + phandle = <0x1b6>; + }; + }; + + hym8563 { + + hym8563-int { + rockchip,pins = <0x00 0x08 0x00 0x17e>; + phandle = <0x160>; + }; + }; + + lcd { + + lcd-rst-gpio { + rockchip,pins = <0x02 0x0c 0x00 0x178>; + }; + }; + + touch { + + touch-gpio { + rockchip,pins = <0x00 0x1d 0x00 0x17e 0x00 0x16 0x00 0x178>; + }; + }; + + usb-typec { + + usbc0-int { + rockchip,pins = <0x00 0x1b 0x00 0x17e>; + phandle = <0x161>; + }; + }; + + wireless-bluetooth { + + uart6-gpios { + rockchip,pins = <0x01 0x02 0x00 0x178>; + phandle = <0x1c5>; + }; + + bt-reset-gpio { + rockchip,pins = <0x00 0x16 0x00 0x178>; + phandle = <0x1c2>; + }; + + bt-wake-gpio { + rockchip,pins = <0x00 0x15 0x00 0x178>; + phandle = <0x1c3>; + }; + + bt-irq-gpio { + rockchip,pins = <0x00 0x00 0x00 0x181>; + phandle = <0x1c4>; + }; + }; + + wireless-wlan { + + wifi-host-wake-irq { + rockchip,pins = <0x00 0x0a 0x00 0x181>; + }; + + wifi-poweren-gpio { + rockchip,pins = <0x00 0x14 0x00 0x17e>; + phandle = <0x1c6>; + }; + }; + }; + + csi2-dphy3 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x182>; + status = "disabled"; + }; + + csi2-dphy4 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x182>; + status = "disabled"; + }; + + csi2-dphy5 { + compatible = "rockchip,rk3568-csi2-dphy"; + rockchip,hw = <0x182>; + status = "disabled"; + }; + + rkcif-mipi-lvds4 { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x183>; + }; + + rkcif-mipi-lvds4-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x183>; + status = "disabled"; + }; + + rkcif-mipi-lvds4-sditf-vir1 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x183>; + status = "disabled"; + }; + + rkcif-mipi-lvds4-sditf-vir2 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x183>; + status = "disabled"; + }; + + rkcif-mipi-lvds4-sditf-vir3 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x183>; + status = "disabled"; + }; + + rkcif-mipi-lvds5 { + compatible = "rockchip,rkcif-mipi-lvds"; + rockchip,hw = <0x3f>; + iommus = <0x40>; + status = "disabled"; + phandle = <0x184>; + }; + + rkcif-mipi-lvds5-sditf { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x184>; + status = "disabled"; + }; + + rkcif-mipi-lvds5-sditf-vir1 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x184>; + status = "disabled"; + }; + + rkcif-mipi-lvds5-sditf-vir2 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x184>; + status = "disabled"; + }; + + rkcif-mipi-lvds5-sditf-vir3 { + compatible = "rockchip,rkcif-sditf"; + rockchip,cif = <0x184>; + status = "disabled"; + }; + + usbdrd3_1 { + compatible = "rockchip,rk3588-dwc3\0rockchip,rk3399-dwc3"; + clocks = <0x02 0x1a6 0x02 0x1a5 0x02 0x1a4>; + clock-names = "ref\0suspend\0bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + status = "okay"; + + usb@fc400000 { + compatible = "snps,dwc3"; + reg = <0x00 0xfc400000 0x00 0x400000>; + interrupts = <0x00 0xdd 0x04>; + power-domains = <0x4d 0x1f>; + resets = <0x02 0x2a7>; + reset-names = "usb3-otg"; + dr_mode = "host"; + phys = <0x185 0x186>; + phy-names = "usb2-phy\0usb3-phy"; + phy_type = "utmi_wide"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + snps,parkmode-disable-ss-quirk; + status = "okay"; + }; + }; + + syscon@fd5b8000 { + compatible = "rockchip,pcie30-phy-grf\0syscon"; + reg = <0x00 0xfd5b8000 0x00 0x10000>; + phandle = <0x1a9>; + }; + + syscon@fd5c0000 { + compatible = "rockchip,pipe-phy-grf\0syscon"; + reg = <0x00 0xfd5c0000 0x00 0x100>; + phandle = <0x1a8>; + }; + + syscon@fd5cc000 { + compatible = "rockchip,rk3588-usbdpphy-grf\0syscon"; + reg = <0x00 0xfd5cc000 0x00 0x4000>; + phandle = <0x1a5>; + }; + + syscon@fd5d4000 { + compatible = "rockchip,rk3588-usb2phy-grf\0syscon\0simple-mfd"; + reg = <0x00 0xfd5d4000 0x00 0x4000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + phandle = <0x1a4>; + + usb2-phy@4000 { + compatible = "rockchip,rk3588-usb2phy"; + reg = <0x4000 0x10>; + interrupts = <0x00 0x18a 0x04>; + resets = <0x02 0xc0048 0x02 0x489>; + reset-names = "phy\0apb"; + clocks = <0x02 0x2b5>; + clock-names = "phyclk"; + clock-output-names = "usb480m_phy1"; + #clock-cells = <0x00>; + rockchip,usbctrl-grf = <0x5f>; + status = "okay"; + phandle = <0x1a6>; + + otg-port { + #phy-cells = <0x00>; + status = "okay"; + phy-supply = <0x60>; + phandle = <0x185>; + }; + }; + }; + + syscon@fd5e4000 { + compatible = "rockchip,rk3588-hdptxphy-grf\0syscon"; + reg = <0x00 0xfd5e4000 0x00 0x100>; + phandle = <0x1a3>; + }; + + mipi4-csi2@fdd50000 { + compatible = "rockchip,rk3588-mipi-csi2"; + reg = <0x00 0xfdd50000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x97 0x04 0x00 0x98 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x02 0x1d3>; + clock-names = "pclk_csi2host"; + resets = <0x02 0x328 0x02 0x338>; + reset-names = "srst_csihost_p\0srst_csihost_vicap"; + status = "disabled"; + }; + + mipi5-csi2@fdd60000 { + compatible = "rockchip,rk3588-mipi-csi2"; + reg = <0x00 0xfdd60000 0x00 0x10000>; + reg-names = "csihost_regs"; + interrupts = <0x00 0x99 0x04 0x00 0x9a 0x04>; + interrupt-names = "csi-intr1\0csi-intr2"; + clocks = <0x02 0x1d4>; + clock-names = "pclk_csi2host"; + resets = <0x02 0x329 0x02 0x339>; + reset-names = "srst_csihost_p\0srst_csihost_vicap"; + status = "disabled"; + }; + + spdif-tx@fddb8000 { + compatible = "rockchip,rk3588-spdif\0rockchip,rk3568-spdif"; + reg = <0x00 0xfddb8000 0x00 0x1000>; + interrupts = <0x00 0xc6 0x04>; + dmas = <0xd3 0x16>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x02 0x20f 0x02 0x20a>; + assigned-clocks = <0x02 0x20b>; + assigned-clock-parents = <0x02 0x05>; + power-domains = <0x4d 0x19>; + #sound-dai-cells = <0x00>; + status = "disabled"; + phandle = <0x1be>; + }; + + i2s@fddc8000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfddc8000 0x00 0x1000>; + interrupts = <0x00 0xbc 0x04>; + clocks = <0x02 0x201 0x02 0x1fe>; + clock-names = "mclk_tx\0hclk"; + assigned-clocks = <0x02 0x1ff>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd4 0x16>; + dma-names = "tx"; + power-domains = <0x4d 0x19>; + resets = <0x02 0x391>; + reset-names = "tx-m"; + rockchip,playback-only; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-tx@fdde8000 { + compatible = "rockchip,rk3588-spdif\0rockchip,rk3568-spdif"; + reg = <0x00 0xfdde8000 0x00 0x1000>; + interrupts = <0x00 0xc5 0x04>; + dmas = <0xd3 0x08>; + dma-names = "tx"; + clock-names = "mclk\0hclk"; + clocks = <0x02 0x25c 0x02 0x258>; + assigned-clocks = <0x02 0x259>; + assigned-clock-parents = <0x02 0x05>; + power-domains = <0x4d 0x1a>; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + i2s@fddf4000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfddf4000 0x00 0x1000>; + interrupts = <0x00 0xba 0x04>; + clocks = <0x02 0x24c 0x02 0x24c 0x02 0x252>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x249>; + assigned-clock-parents = <0x02 0x07>; + dmas = <0xd4 0x04>; + dma-names = "tx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x3ef>; + reset-names = "tx-m"; + rockchip,always-on; + rockchip,hdmi-path; + rockchip,playback-only; + #sound-dai-cells = <0x00>; + status = "okay"; + phandle = <0x1bc>; + }; + + i2s@fddf8000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfddf8000 0x00 0x1000>; + interrupts = <0x00 0xbb 0x04>; + clocks = <0x02 0x23c 0x02 0x23c 0x02 0x238>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x239>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd4 0x15>; + dma-names = "rx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x3c3>; + reset-names = "rx-m"; + rockchip,capture-only; + #sound-dai-cells = <0x00>; + status = "okay"; + phandle = <0x1c8>; + }; + + i2s@fde00000 { + compatible = "rockchip,rk3588-i2s-tdm"; + reg = <0x00 0xfde00000 0x00 0x1000>; + interrupts = <0x00 0xbe 0x04>; + clocks = <0x02 0x237 0x02 0x237 0x02 0x233>; + clock-names = "mclk_tx\0mclk_rx\0hclk"; + assigned-clocks = <0x02 0x234>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0xd4 0x18>; + dma-names = "rx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x417>; + reset-names = "rx-m"; + rockchip,capture-only; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-rx@fde10000 { + compatible = "rockchip,rk3588-spdifrx\0rockchip,rk3308-spdifrx"; + reg = <0x00 0xfde10000 0x00 0x1000>; + interrupts = <0x00 0xc8 0x04>; + clocks = <0x02 0x260 0x02 0x25f>; + clock-names = "mclk\0hclk"; + assigned-clocks = <0x02 0x260>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0x64 0x16>; + dma-names = "rx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x3ff>; + reset-names = "spdifrx-m"; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + spdif-rx@fde18000 { + compatible = "rockchip,rk3588-spdifrx\0rockchip,rk3308-spdifrx"; + reg = <0x00 0xfde18000 0x00 0x1000>; + interrupts = <0x00 0xc9 0x04>; + clocks = <0x02 0x262 0x02 0x261>; + clock-names = "mclk\0hclk"; + assigned-clocks = <0x02 0x262>; + assigned-clock-parents = <0x02 0x05>; + dmas = <0x64 0x17>; + dma-names = "rx"; + power-domains = <0x4d 0x1a>; + resets = <0x02 0x401>; + reset-names = "spdifrx-m"; + #sound-dai-cells = <0x00>; + status = "disabled"; + }; + + dp@fde60000 { + compatible = "rockchip,rk3588-dp"; + reg = <0x00 0xfde60000 0x00 0x4000>; + interrupts = <0x00 0xa2 0x04>; + clocks = <0x02 0x1e7 0x02 0x2cd 0x02 0x201 0x02 0x20d 0x04>; + clock-names = "apb\0aux\0i2s\0spdif\0hclk"; + assigned-clocks = <0x02 0x2cd>; + assigned-clock-rates = <0xf42400>; + resets = <0x02 0x389>; + phys = <0x187>; + power-domains = <0x4d 0x19>; + #sound-dai-cells = <0x01>; + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <0x188>; + hpd-gpios = <0x189 0x04 0x00>; + phandle = <0x1bf>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x18a>; + status = "disabled"; + phandle = <0xbf>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x18b>; + status = "disabled"; + phandle = <0xc5>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x37>; + status = "disabled"; + phandle = <0xcd>; + }; + }; + }; + }; + + hdmi@fdea0000 { + compatible = "rockchip,rk3588-dw-hdmi"; + reg = <0x00 0xfdea0000 0x00 0x20000>; + interrupts = <0x00 0xad 0x04 0x00 0xae 0x04 0x00 0xaf 0x04 0x00 0xb0 0x04 0x00 0x169 0x04>; + clocks = <0x02 0x224 0x02 0x266 0x02 0x225 0x02 0x226 0x02 0x24c 0x02 0x274 0x02 0x275 0x02 0x276 0x02 0x277 0x05 0x2f>; + clock-names = "pclk\0hpd\0earc\0hdmitx_ref\0aud\0dclk_vp0\0dclk_vp1\0dclk_vp2\0dclk_vp3\0hclk_vo1\0link_clk"; + resets = <0x02 0x3d7 0x02 0x49d>; + reset-names = "ref\0hdp"; + power-domains = <0x4d 0x1a>; + pinctrl-names = "default"; + pinctrl-0 = <0x18c 0x18d 0x18e 0x18f>; + reg-io-width = <0x04>; + rockchip,grf = <0xb7>; + rockchip,vo1_grf = <0xba>; + phys = <0x190>; + phy-names = "hdmi"; + #sound-dai-cells = <0x00>; + status = "disabled"; + enable-gpios = <0xe0 0x0a 0x00>; + phandle = <0x1bd>; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x191>; + status = "disabled"; + phandle = <0xc1>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x38>; + status = "disabled"; + phandle = <0xc7>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x192>; + status = "disabled"; + phandle = <0xcf>; + }; + }; + }; + }; + + edp@fded0000 { + compatible = "rockchip,rk3588-edp"; + reg = <0x00 0xfded0000 0x00 0x1000>; + interrupts = <0x00 0xa4 0x04>; + clocks = <0x02 0x214 0x02 0x213 0x02 0x215 0x05>; + clock-names = "dp\0pclk\0spdif\0hclk"; + resets = <0x02 0x3e4 0x02 0x3e3>; + reset-names = "dp\0apb"; + phys = <0x193>; + phy-names = "dp"; + power-domains = <0x4d 0x1a>; + rockchip,grf = <0xba>; + status = "disabled"; + + ports { + #address-cells = <0x01>; + #size-cells = <0x00>; + + port@0 { + reg = <0x00>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + endpoint@0 { + reg = <0x00>; + remote-endpoint = <0x194>; + status = "disabled"; + phandle = <0xc0>; + }; + + endpoint@1 { + reg = <0x01>; + remote-endpoint = <0x195>; + status = "disabled"; + phandle = <0xc6>; + }; + + endpoint@2 { + reg = <0x02>; + remote-endpoint = <0x196>; + status = "disabled"; + phandle = <0xce>; + }; + }; + }; + }; + + hdmirx-controller@fdee0000 { + compatible = "rockchip,rk3588-hdmirx-ctrler\0rockchip,hdmirx-ctrler"; + reg = <0x00 0xfdee0000 0x00 0x6000>; + reg-names = "hdmirx_regs"; + power-domains = <0x4d 0x1a>; + rockchip,grf = <0xb7>; + rockchip,vo1_grf = <0xba>; + interrupts = <0x00 0xb1 0x04 0x00 0x1b4 0x04 0x00 0xb3 0x04>; + interrupt-names = "cec\0hdmi\0dma"; + clocks = <0x02 0x21a 0x02 0x21f 0x02 0x2b2 0x02 0x21b 0x02 0x21c 0x02 0x232 0x05>; + clock-names = "aclk\0audio\0cr_para\0pclk\0ref\0hclk_s_hdmirx\0hclk_vo1"; + resets = <0x02 0x3d9 0x02 0x3da 0x02 0x3db 0x02 0x3b7>; + reset-names = "rst_a\0rst_p\0rst_ref\0rst_biu"; + pinctrl-0 = <0x197 0x198 0x199 0x19a 0x19b>; + pinctrl-names = "default"; + status = "disabled"; + hpd-trigger-level = <0x01>; + hdmirx-det-gpios = <0x189 0x1d 0x01>; + }; + + pcie@fe150000 { + compatible = "rockchip,rk3588-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x00 0x0f>; + clocks = <0x02 0x14e 0x02 0x153 0x02 0x149 0x02 0x158 0x02 0x15e 0x02 0x183>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux\0pipe"; + device_type = "pci"; + interrupts = <0x00 0x107 0x04 0x00 0x106 0x04 0x00 0x105 0x04 0x00 0x104 0x04 0x00 0x103 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x19c 0x00 0x00 0x00 0x00 0x02 0x19c 0x01 0x00 0x00 0x00 0x03 0x19c 0x02 0x00 0x00 0x00 0x04 0x19c 0x03>; + linux,pci-domain = <0x00>; + num-ib-windows = <0x10>; + num-ob-windows = <0x10>; + num-viewport = <0x08>; + max-link-speed = <0x03>; + msi-map = <0x00 0x19d 0x00 0x1000>; + num-lanes = <0x04>; + phys = <0x19e>; + phy-names = "pcie-phy"; + power-domains = <0x4d 0x22>; + ranges = <0x800 0x00 0xf0000000 0x00 0xf0000000 0x00 0x100000 0x81000000 0x00 0xf0100000 0x00 0xf0100000 0x00 0x100000 0x82000000 0x00 0xf0200000 0x00 0xf0200000 0x00 0xe00000 0xc3000000 0x09 0x00 0x09 0x00 0x00 0x40000000>; + reg = <0x00 0xfe150000 0x00 0x10000 0x0a 0x40000000 0x00 0x400000>; + reg-names = "pcie-apb\0pcie-dbi"; + resets = <0x02 0x20d 0x02 0x21c>; + reset-names = "pcie\0periph"; + rockchip,pipe-grf = <0x61>; + status = "disabled"; + reset-gpios = <0xe0 0x0e 0x00>; + vpcie3v3-supply = <0x19f>; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0x104 0x01>; + phandle = <0x19c>; + }; + }; + + pcie@fe160000 { + compatible = "rockchip,rk3588-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x10 0x1f>; + clocks = <0x02 0x14f 0x02 0x154 0x02 0x14a 0x02 0x159 0x02 0x15f 0x02 0x184>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux\0pipe"; + device_type = "pci"; + interrupts = <0x00 0x102 0x04 0x00 0x101 0x04 0x00 0x100 0x04 0x00 0xff 0x04 0x00 0xfe 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x1a0 0x00 0x00 0x00 0x00 0x02 0x1a0 0x01 0x00 0x00 0x00 0x03 0x1a0 0x02 0x00 0x00 0x00 0x04 0x1a0 0x03>; + linux,pci-domain = <0x01>; + num-ib-windows = <0x10>; + num-ob-windows = <0x10>; + num-viewport = <0x08>; + max-link-speed = <0x03>; + msi-map = <0x1000 0x19d 0x1000 0x1000>; + num-lanes = <0x02>; + phys = <0x19e>; + phy-names = "pcie-phy"; + power-domains = <0x4d 0x22>; + ranges = <0x800 0x00 0xf1000000 0x00 0xf1000000 0x00 0x100000 0x81000000 0x00 0xf1100000 0x00 0xf1100000 0x00 0x100000 0x82000000 0x00 0xf1200000 0x00 0xf1200000 0x00 0xe00000 0xc3000000 0x09 0x40000000 0x09 0x40000000 0x00 0x40000000>; + reg = <0x00 0xfe160000 0x00 0x10000 0x0a 0x40400000 0x00 0x400000>; + reg-names = "pcie-apb\0pcie-dbi"; + resets = <0x02 0x20e 0x02 0x21d>; + reset-names = "pcie\0periph"; + rockchip,pipe-grf = <0x61>; + status = "disabled"; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xff 0x01>; + phandle = <0x1a0>; + }; + }; + + pcie@fe170000 { + compatible = "rockchip,rk3588-pcie\0snps,dw-pcie"; + #address-cells = <0x03>; + #size-cells = <0x02>; + bus-range = <0x20 0x2f>; + clocks = <0x02 0x150 0x02 0x155 0x02 0x14b 0x02 0x15b 0x02 0x160 0x02 0x2c4>; + clock-names = "aclk_mst\0aclk_slv\0aclk_dbi\0pclk\0aux\0pipe"; + device_type = "pci"; + interrupts = <0x00 0xf3 0x04 0x00 0xf2 0x04 0x00 0xf1 0x04 0x00 0xf0 0x04 0x00 0xef 0x04>; + interrupt-names = "sys\0pmc\0msg\0legacy\0err"; + #interrupt-cells = <0x01>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x1a1 0x00 0x00 0x00 0x00 0x02 0x1a1 0x01 0x00 0x00 0x00 0x03 0x1a1 0x02 0x00 0x00 0x00 0x04 0x1a1 0x03>; + linux,pci-domain = <0x02>; + num-ib-windows = <0x08>; + num-ob-windows = <0x08>; + num-viewport = <0x04>; + max-link-speed = <0x02>; + msi-map = <0x2000 0xe8 0x2000 0x1000>; + num-lanes = <0x01>; + phys = <0x1a2 0x02>; + phy-names = "pcie-phy"; + ranges = <0x800 0x00 0xf2000000 0x00 0xf2000000 0x00 0x100000 0x81000000 0x00 0xf2100000 0x00 0xf2100000 0x00 0x100000 0x82000000 0x00 0xf2200000 0x00 0xf2200000 0x00 0xe00000 0xc3000000 0x09 0x80000000 0x09 0x80000000 0x00 0x40000000>; + reg = <0x00 0xfe170000 0x00 0x10000 0x0a 0x40800000 0x00 0x400000>; + reg-names = "pcie-apb\0pcie-dbi"; + resets = <0x02 0x20f 0x02 0x21e>; + reset-names = "pcie\0periph"; + rockchip,pipe-grf = <0x61>; + status = "disabled"; + reset-gpios = <0x189 0x0c 0x00>; + rockchip,skip-scan-in-resume; + + legacy-interrupt-controller { + interrupt-controller; + #address-cells = <0x00>; + #interrupt-cells = <0x01>; + interrupt-parent = <0x01>; + interrupts = <0x00 0xf0 0x01>; + phandle = <0x1a1>; + }; + }; + + sata@fe220000 { + compatible = "rockchip,rk-ahci\0snps,dwc-ahci"; + reg = <0x00 0xfe220000 0x00 0x1000>; + clocks = <0x02 0x172 0x02 0x16f 0x02 0x175 0x02 0x164 0x02 0x17f>; + clock-names = "sata\0pmalive\0rxoob\0ref\0asic"; + interrupts = <0x00 0x112 0x04>; + interrupt-names = "hostc"; + phys = <0x1a2 0x01>; + phy-names = "sata-phy"; + ports-implemented = <0x01>; + status = "disabled"; + }; + + phy@fed70000 { + compatible = "rockchip,rk3588-hdptx-phy"; + reg = <0x00 0xfed70000 0x00 0x2000>; + clocks = <0x02 0x2b5 0x02 0x268>; + clock-names = "ref\0apb"; + resets = <0x02 0x486 0x02 0xc003f 0x02 0xc0040 0x02 0xc0041>; + reset-names = "apb\0init\0cmn\0lane"; + rockchip,grf = <0x1a3>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x193>; + }; + + hdmiphy@fed70000 { + compatible = "rockchip,rk3588-hdptx-phy-hdmi"; + reg = <0x00 0xfed70000 0x00 0x2000>; + clocks = <0x02 0x2b5 0x02 0x268>; + clock-names = "ref\0apb"; + resets = <0x02 0x491 0x02 0x486 0x02 0xc003f 0x02 0xc0040 0x02 0xc0041 0x02 0x48f 0x02 0x490>; + reset-names = "phy\0apb\0init\0cmn\0lane\0ropll\0lcpll"; + rockchip,grf = <0x1a3>; + #phy-cells = <0x00>; + status = "disabled"; + phandle = <0x190>; + + clk-port { + #clock-cells = <0x00>; + status = "okay"; + phandle = <0x2f>; + }; + }; + + phy@fed90000 { + compatible = "rockchip,rk3588-usbdp-phy"; + reg = <0x00 0xfed90000 0x00 0x10000>; + rockchip,u2phy-grf = <0x1a4>; + rockchip,usb-grf = <0x5f>; + rockchip,usbdpphy-grf = <0x1a5>; + rockchip,vo-grf = <0xd7>; + clocks = <0x02 0x2b6 0x02 0x280 0x02 0x26a 0x1a6>; + clock-names = "refclk\0immortal\0pclk\0utmi"; + resets = <0x02 0x2f 0x02 0x30 0x02 0x31 0x02 0x32 0x02 0x484>; + reset-names = "init\0cmn\0lane\0pcs_apb\0pma_apb"; + status = "okay"; + rockchip,dp-lane-mux = <0x00 0x01>; + + dp-port { + #phy-cells = <0x00>; + status = "okay"; + phandle = <0x187>; + }; + + u3-port { + #phy-cells = <0x00>; + status = "okay"; + phandle = <0x186>; + }; + }; + + csi2-dphy1-hw@fedc8000 { + compatible = "rockchip,rk3588-csi2-dphy-hw"; + reg = <0x00 0xfedc8000 0x00 0x8000>; + clocks = <0x02 0x10d>; + clock-names = "pclk"; + resets = <0x02 0x19 0x02 0x18>; + reset-names = "srst_csiphy1\0srst_p_csiphy1"; + rockchip,grf = <0x1a7>; + rockchip,sys_grf = <0xb7>; + status = "disabled"; + phandle = <0x182>; + }; + + phy@fee10000 { + compatible = "rockchip,rk3588-naneng-combphy"; + reg = <0x00 0xfee10000 0x00 0x100>; + #phy-cells = <0x01>; + clocks = <0x02 0x2be 0x02 0x186 0x02 0x166>; + clock-names = "refclk\0apbclk\0phpclk"; + assigned-clocks = <0x02 0x2be>; + assigned-clock-rates = <0x5f5e100>; + resets = <0x02 0x20006 0x02 0x4d7>; + reset-names = "combphy-apb\0combphy"; + rockchip,pipe-grf = <0x61>; + rockchip,pipe-phy-grf = <0x1a8>; + rockchip,pcie1ln-sel-bits = <0x100 0x00 0x00 0x00>; + status = "okay"; + phandle = <0x1a2>; + }; + + phy@fee80000 { + compatible = "rockchip,rk3588-pcie3-phy"; + reg = <0x00 0xfee80000 0x00 0x20000>; + #phy-cells = <0x00>; + clocks = <0x02 0x188>; + clock-names = "pclk"; + resets = <0x02 0x2000a>; + reset-names = "phy"; + rockchip,pipe-grf = <0x61>; + rockchip,phy-grf = <0x1a9>; + status = "disabled"; + phandle = <0x19e>; + }; + + test-power { + status = "okay"; + }; + + vcc12v-dcin { + compatible = "regulator-fixed"; + regulator-name = "vcc12v_dcin"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0xb71b00>; + regulator-max-microvolt = <0xb71b00>; + phandle = <0x1aa>; + }; + + vcc5v0-sys { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + vin-supply = <0x1aa>; + phandle = <0x63>; + }; + + vcc5v0-usbdcin { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usbdcin"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + vin-supply = <0x1aa>; + }; + + vcc5v0-usb { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usb"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + vin-supply = <0x1aa>; + phandle = <0x1b7>; + }; + + vcc-1v1-nldo-s3 { + compatible = "regulator-fixed"; + regulator-name = "vcc_1v1_nldo_s3"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <0x10c8e0>; + regulator-max-microvolt = <0x10c8e0>; + vin-supply = <0x63>; + phandle = <0x142>; + }; + + chosen { + bootargs = "storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal storagenode=/mmc@fe2e0000 androidboot.verifiedbootstate=orange rw rootwait earlycon=video,efifb,800x600,32 console=tty2 irqchip.gicv3_pseudo_nmi=0 root=PARTLABEL=rootfs rootfstype=ext4 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1 loglevel=7 nokaslr"; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0x00 0x9400000 0x00 0xe6c00000>; + }; + + cspmu@fd10c000 { + compatible = "rockchip,cspmu"; + reg = <0x00 0xfd10c000 0x00 0x1000 0x00 0xfd10d000 0x00 0x1000 0x00 0xfd10e000 0x00 0x1000 0x00 0xfd10f000 0x00 0x1000 0x00 0xfd12c000 0x00 0x1000 0x00 0xfd12d000 0x00 0x1000 0x00 0xfd12e000 0x00 0x1000 0x00 0xfd12f000 0x00 0x1000>; + }; + + debug@fd104000 { + compatible = "rockchip,debug"; + reg = <0x00 0xfd104000 0x00 0x1000 0x00 0xfd105000 0x00 0x1000 0x00 0xfd106000 0x00 0x1000 0x00 0xfd107000 0x00 0x1000 0x00 0xfd124000 0x00 0x1000 0x00 0xfd125000 0x00 0x1000 0x00 0xfd126000 0x00 0x1000 0x00 0xfd127000 0x00 0x1000>; + }; + + fiq-debugger { + compatible = "rockchip,fiq-debugger"; + rockchip,serial-id = <0x02>; + rockchip,wake-irq = <0x00>; + rockchip,irq-mode-enable = <0x01>; + rockchip,baudrate = <0x16e360>; + interrupts = <0x00 0x1a7 0x08>; + pinctrl-names = "default"; + pinctrl-0 = <0x1ab>; + status = "okay"; + }; + + reserved-memory { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x00 0x800000>; + linux,cma-default; + reg = <0x00 0x49400000 0x00 0x10000000>; + }; + + drm-logo@00000000 { + compatible = "rockchip,drm-logo"; + reg = <0x00 0x00 0x00 0x00>; + phandle = <0x30>; + }; + + drm-cubic-lut@00000000 { + compatible = "rockchip,drm-cubic-lut"; + reg = <0x00 0x00 0x00 0x00>; + }; + + ramoops@110000 { + compatible = "ramoops"; + reg = <0x00 0x110000 0x00 0xf0000>; + record-size = <0x20000>; + console-size = <0x80000>; + ftrace-size = <0x00>; + pmsg-size = <0x50000>; + }; + }; + + leds { + compatible = "gpio-leds"; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <0x1ac>; + + power { + label = ":power"; + linux,default-trigger = "ir-power-click"; + default-state = "on"; + gpios = <0x189 0x0b 0x00>; + }; + }; + + hdmi0-sound { + status = "okay"; + compatible = "rockchip,hdmi"; + rockchip,mclk-fs = <0x80>; + rockchip,card-name = "rockchip-hdmi0"; + rockchip,cpu = <0x1ad>; + rockchip,codec = <0x1ae>; + rockchip,jack-det; + }; + + dp0-sound { + status = "disabled"; + compatible = "rockchip,hdmi"; + rockchip,card-name = "rockchip-dp0"; + rockchip,mclk-fs = <0x200>; + rockchip,cpu = <0x1af>; + rockchip,codec = <0x1b0 0x01>; + rockchip,jack-det; + }; + + spdif-tx1-dc { + status = "disabled"; + compatible = "linux,spdif-dit"; + #sound-dai-cells = <0x00>; + phandle = <0x1b2>; + }; + + spdif-tx1-sound { + status = "disabled"; + compatible = "simple-audio-card"; + simple-audio-card,mclk-fs = <0x80>; + simple-audio-card,name = "rockchip,spdif-tx1"; + + simple-audio-card,cpu { + sound-dai = <0x1b1>; + }; + + simple-audio-card,codec { + sound-dai = <0x1b2>; + }; + }; + + adc-keys { + status = "okay"; + compatible = "adc-keys"; + io-channels = <0x1b3 0x01>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <0x1b7740>; + poll-interval = <0x64>; + + recovery-key { + label = "F12"; + linux,code = <0x58>; + press-threshold-microvolt = <0x4268>; + }; + }; + + es8388-sound { + status = "disabled"; + compatible = "firefly,multicodecs-card"; + rockchip,card-name = "rockchip-es8388"; + hp-det-gpio = <0x189 0x14 0x01>; + io-channels = <0x1b3 0x03>; + io-channel-names = "adc-detect"; + spk-con-gpio = <0xee 0x0a 0x00>; + hp-con-gpio = <0xe0 0x08 0x00>; + linein-type = <0x00>; + rockchip,format = "i2s"; + rockchip,mclk-fs = <0x100>; + rockchip,cpu = <0x1b4>; + rockchip,codec = <0x1b5>; + rockchip,audio-routing = "Headphone\0LOUT1\0Headphone\0ROUT1\0Speaker\0LOUT2\0Speaker\0ROUT2\0Headphone\0Headphone Power\0Headphone\0Headphone Power\0Speaker\0Speaker Power\0Speaker\0Speaker Power\0LINPUT1\0Main Mic\0LINPUT2\0Main Mic\0RINPUT1\0Headset Mic\0RINPUT2\0Headset Mic"; + pinctrl-names = "default"; + pinctrl-0 = <0x1b6>; + firefly,not-use-dapm; + }; + + vcc5v0-host { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_host"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + enable-active-high; + gpio = <0xe0 0x0e 0x00>; + vin-supply = <0x1b7>; + status = "okay"; + phandle = <0x60>; + }; + + vcc-hub-reset-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_hub_reset"; + regulator-boot-on; + regulator-always-on; + enable-active-high; + status = "disabled"; + gpio = <0x1b8 0x04 0x00>; + }; + + vbus5v0-typec-pwr-en-regulator { + compatible = "regulator-fixed"; + regulator-name = "vbus5v0_typec_pwr_en"; + enable-active-high; + status = "disabled"; + gpio = <0xe0 0x0a 0x00>; + phandle = <0x162>; + }; + + vcc-hub3-reset-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_hub3_reset"; + regulator-always-on; + enable-active-high; + status = "disabled"; + gpio = <0x1b8 0x06 0x00>; + }; + + vcc5v0-host3 { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_host3"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <0x4c4b40>; + regulator-max-microvolt = <0x4c4b40>; + enable-active-high; + gpio = <0xe0 0x0a 0x00>; + vin-supply = <0x1b7>; + status = "disabled"; + }; + + vcc-sata-pwr-en-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_sata_pwr_en"; + regulator-boot-on; + regulator-always-on; + enable-active-high; + status = "disabled"; + gpio = <0x1b8 0x0a 0x00>; + }; + + vcc-fan-pwr-en-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_fan_pwr_en"; + regulator-boot-on; + regulator-always-on; + enable-active-high; + status = "okay"; + gpio = <0x1b8 0x0b 0x00>; + }; + + vcc-sdcard-pwr-en-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_sdcard_pwr_en"; + regulator-boot-on; + regulator-always-on; + enable-active-high; + gpio = <0xee 0x11 0x00>; + status = "okay"; + }; + + vcc3v3-pcie30 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_pcie30"; + regulator-min-microvolt = <0x325aa0>; + regulator-max-microvolt = <0x325aa0>; + enable-active-high; + gpios = <0x1b9 0x15 0x00>; + startup-delay-us = <0x1388>; + vin-supply = <0x1aa>; + status = "disabled"; + phandle = <0x19f>; + }; + + pcie30-avdd1v8 { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd1v8"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <0x1b7740>; + regulator-max-microvolt = <0x1b7740>; + vin-supply = <0x1ba>; + }; + + pcie30-avdd0v75 { + compatible = "regulator-fixed"; + regulator-name = "pcie30_avdd0v75"; + regulator-boot-on; + regulator-always-on; + regulator-min-microvolt = <0xb71b0>; + regulator-max-microvolt = <0xb71b0>; + vin-supply = <0x1bb>; + }; + + hdmi1-sound { + status = "disabled"; + compatible = "rockchip,hdmi"; + rockchip,mclk-fs = <0x80>; + rockchip,card-name = "rockchip-hdmi1"; + rockchip,cpu = <0x1bc>; + rockchip,codec = <0x1bd>; + rockchip,jack-det; + }; + + dp1-sound { + status = "disabled"; + compatible = "rockchip,hdmi"; + rockchip,card-name = "rockchip,dp1"; + rockchip,mclk-fs = <0x200>; + rockchip,cpu = <0x1be>; + rockchip,codec = <0x1bf 0x01>; + rockchip,jack-det; + }; + + wireless-bluetooth { + compatible = "bluetooth-platdata"; + clocks = <0x1c0>; + clock-names = "ext_clock"; + uart_rts_gpios = <0x189 0x02 0x01>; + pinctrl-names = "default\0rts_gpio"; + pinctrl-0 = <0x1c1 0x1c2 0x1c3 0x1c4>; + pinctrl-1 = <0x1c5>; + BT,reset_gpio = <0x13b 0x16 0x00>; + BT,wake_gpio = <0x13b 0x15 0x00>; + BT,wake_host_irq = <0x13b 0x00 0x00>; + status = "disabled"; + }; + + wireless-wlan { + compatible = "wlan-platdata"; + wifi_chip_type = "ap6275p"; + pinctrl-names = "default"; + pinctrl-0 = <0x1c6>; + WIFI,poweren_gpio = <0x13b 0x14 0x00>; + status = "disabled"; + }; + + hdmiin-dc { + compatible = "rockchip,dummy-codec"; + #sound-dai-cells = <0x00>; + phandle = <0x1c9>; + }; + + hdmiin-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "rockchip,hdmiin"; + simple-audio-card,bitclock-master = <0x1c7>; + simple-audio-card,frame-master = <0x1c7>; + status = "disabled"; + + simple-audio-card,cpu { + sound-dai = <0x1c8>; + }; + + simple-audio-card,codec { + sound-dai = <0x1c9>; + phandle = <0x1c7>; + }; + }; + + pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <0x02>; + fan-supply = <0x1aa>; + pwms = <0x1ca 0x00 0xc350 0x01>; + }; +}; diff --git a/configs/vms/linux-rk3588-aarch64.toml b/configs/vms/linux-aarch64-rk3588-smp8.toml similarity index 72% rename from configs/vms/linux-rk3588-aarch64.toml rename to configs/vms/linux-aarch64-rk3588-smp8.toml index 4c59761a..bc344126 100644 --- a/configs/vms/linux-rk3588-aarch64.toml +++ b/configs/vms/linux-aarch64-rk3588-smp8.toml @@ -8,9 +8,11 @@ name = "linux" # Virtualization type. vm_type = 1 # The number of virtual CPUs. -cpu_num = 1 +cpu_num = 8 # Guest vm physical cpu sets. -cpu_set = 2 +phys_cpu_sets = [1, 2, 4, 8, 16, 32, 64, 128] +phys_cpu_ids = [0x00, 0x100, 0x200, 0x300, 0x400, 0x500, 0x600, 0x700] + # # Vm kernel configs @@ -26,9 +28,9 @@ dtb_load_addr = 0x1000_0000 # load from memory image_location = "memory" # The file path of the kernel image. -kernel_path = "linux-rk3588-aarch64.bin" +kernel_path = "/path/to/kernel" # The file path of the device tree blob (DTB). -dtb_path = "linux-rk3588.dtb" +dtb_path = "/path/to/dtb" # load from file system. # image_location = "fs". @@ -47,8 +49,8 @@ dtb_path = "linux-rk3588.dtb" # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x0, 0x10_f000, 0x37, 1], # passthrough uncahed MAP_IDENTICAL - [0x940_0000, 0x76c00000, 0x7, 1], # ram 3G MAP_IDENTICAL + [0x940_0000, 0xd550_0000, 0x7, 1], # ram 3G MAP_IDENTICAL + [0x920_0000, 0x2000, 0x7, 1] ] # @@ -59,6 +61,8 @@ memory_regions = [ # Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. emu_devices = [] + +interrupt_mode = "passthrough" # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ @@ -67,34 +71,52 @@ passthrough_devices = [ 0x11_0000, 0x11_0000, 0xf_0000, - 0x1, + 0x17, ], [ "sram", 0x10_f000, 0x10_f000, 0x1000, - 0x1, + 0x17, ], [ "gpu", 0xfb00_0000, 0xfb00_0000, - 0x200000, - 0x1, + 0x20_0000, + 0x17, ], [ "uart8250 UART", 0xfd00_0000, 0xfd00_0000, - 0x2000000, - 0x1, + 0x200_0000, + 0x17, ], [ "usb", 0xfc00_0000, 0xfc00_0000, - 0x1000000, - 0x1, + 0x100_0000, + 0x17, + ], + [ + "uncached", + 0x0, + 0x0, + 0x10_f000, + 0x17, ], + [ + "device", + 0x920_0000, + 0x920_0000, + 0x2000, + 0x17, + ], +] + +excluded_devices = [ + # ["/gic-v3"], ] \ No newline at end of file diff --git a/configs/vms/linux-aarch64-tac_e400-smp1.dts b/configs/vms/linux-aarch64-tac_e400-smp1.dts new file mode 100644 index 00000000..f59ffcab --- /dev/null +++ b/configs/vms/linux-aarch64-tac_e400-smp1.dts @@ -0,0 +1,1302 @@ +/dts-v1/; + +/memreserve/ 0x0000000080000000 0x0000000000010000; +/ { + compatible = "phytium,pe2204"; + interrupt-parent = <0x01>; + #address-cells = <0x02>; + #size-cells = <0x02>; + model = "Phytium Pi Board"; + + // memory@01 { + // device_type = "memory"; + // reg = <0x20 0x40000000 0x00 0x40000000>; + // numa-node-id = <0x00>; + // }; + + aliases { + serial0 = "/soc/uart@2800c000"; + serial1 = "/soc/uart@2800d000"; + serial2 = "/soc/uart@2800e000"; + serial3 = "/soc/uart@2800f000"; + ethernet0 = "/soc/ethernet@3200c000"; + ethernet1 = "/soc/ethernet@3200e000"; + ethernet2 = "/soc/ethernet@32010000"; + ethernet3 = "/soc/ethernet@32012000"; + serial4 = "/soc/uart@28014000"; + serial5 = "/soc/uart@2802A000"; + serial6 = "/soc/uart@28032000"; + }; + + psci { + compatible = "arm,psci-1.0"; + method = "smc"; + cpu_suspend = <0xc4000001>; + cpu_off = <0x84000002>; + cpu_on = <0xc4000003>; + sys_poweroff = <0x84000008>; + sys_reset = <0x84000009>; + }; + + firmware { + + scmi { + compatible = "arm,scmi"; + mboxes = <0x02 0x00>; + mbox-names = "tx"; + shmem = <0x03>; + #address-cells = <0x01>; + #size-cells = <0x00>; + + protocol@13 { + reg = <0x13>; + #clock-cells = <0x01>; + phandle = <0x09>; + }; + + protocol@15 { + reg = <0x15>; + #thermal-sensor-cells = <0x01>; + phandle = <0x04>; + }; + }; + + optee { + compatible = "linaro,optee-tz"; + method = "smc"; + }; + }; + + thermal-zones { + + sensor0 { + polling-delay-passive = <0x64>; + polling-delay = <0x3e8>; + thermal-sensors = <0x04 0x00>; + }; + + sensor1 { + polling-delay-passive = <0x64>; + polling-delay = <0x3e8>; + thermal-sensors = <0x04 0x01>; + }; + }; + + cpus { + #address-cells = <0x02>; + #size-cells = <0x00>; + + cpu-map { + + // cluster0 { + + // core0 { + // cpu = <0x05>; + // }; + // }; + + cluster1 { + + core0 { + cpu = <0x06>; + }; + }; + + // cluster2 { + + // core0 { + // cpu = <0x07>; + // }; + + // core1 { + // cpu = <0x08>; + // }; + // }; + }; + + // cpu@0 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x200>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x07>; + // }; + + // cpu@1 { + // device_type = "cpu"; + // compatible = "phytium,ftc310\0arm,armv8"; + // reg = <0x00 0x201>; + // enable-method = "psci"; + // clocks = <0x09 0x02>; + // capacity-dmips-mhz = <0xb22>; + // phandle = <0x08>; + // }; + + // cpu@100 { + // device_type = "cpu"; + // compatible = "phytium,ftc664\0arm,armv8"; + // reg = <0x00 0x00>; + // enable-method = "psci"; + // clocks = <0x09 0x00>; + // capacity-dmips-mhz = <0x161c>; + // phandle = <0x05>; + // }; + + cpu@101 { + device_type = "cpu"; + compatible = "phytium,ftc664\0arm,armv8"; + reg = <0x00 0x100>; + enable-method = "psci"; + clocks = <0x09 0x01>; + capacity-dmips-mhz = <0x161c>; + phandle = <0x06>; + }; + }; + + interrupt-controller@30800000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <0x03>; + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + interrupt-controller; + reg = <0x00 0x30800000 0x00 0x20000 0x00 0x30880000 0x00 0x80000 0x00 0x30840000 0x00 0x10000 0x00 0x30850000 0x00 0x10000 0x00 0x30860000 0x00 0x10000>; + interrupts = <0x01 0x09 0x08>; + phandle = <0x01>; + + gic-its@30820000 { + compatible = "arm,gic-v3-its"; + msi-controller; + reg = <0x00 0x30820000 0x00 0x20000>; + phandle = <0x0f>; + }; + }; + + pmu { + compatible = "arm,armv8-pmuv3"; + interrupts = <0x01 0x07 0x08>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupts = <0x01 0x0d 0x08 0x01 0x0e 0x08 0x01 0x0b 0x08 0x01 0x0a 0x08>; + clock-frequency = <0x2faf080>; + }; + + clocks { + #address-cells = <0x02>; + #size-cells = <0x02>; + ranges; + + clk48mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2dc6c00>; + phandle = <0x13>; + }; + + clk50mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x2faf080>; + phandle = <0x0d>; + }; + + clk100mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x5f5e100>; + phandle = <0x0c>; + }; + + clk200mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xbebc200>; + phandle = <0x11>; + }; + + clk250mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0xee6b280>; + phandle = <0x12>; + }; + + clk300mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x11e1a300>; + phandle = <0x0b>; + }; + + clk600mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x23c34600>; + phandle = <0x0e>; + }; + + clk1200mhz { + compatible = "fixed-clock"; + #clock-cells = <0x00>; + clock-frequency = <0x47868c00>; + phandle = <0x0a>; + }; + }; + + iommu@30000000 { + compatible = "arm,smmu-v3"; + reg = <0x00 0x30000000 0x00 0x800000>; + interrupts = <0x00 0xf0 0x01 0x00 0xef 0x01 0x00 0xec 0x01 0x00 0xf2 0x01>; + interrupt-names = "eventq\0priq\0cmdq-sync\0gerror"; + dma-coherent; + #iommu-cells = <0x01>; + phandle = <0x10>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <0x02>; + #size-cells = <0x02>; + dma-coherent; + ranges; + + mmc@28000000 { + compatible = "phytium,mci"; + reg = <0x00 0x28000000 0x00 0x1000>; + interrupts = <0x00 0x48 0x04>; + clocks = <0x0a>; + clock-names = "phytium_mci_clk"; + status = "disabled"; + bus-width = <0x04>; + max-frequency = <0x2faf080>; + cap-sdio-irq; + cap-sd-highspeed; + no-mmc; + }; + + mmc@28001000 { + compatible = "phytium,mci"; + reg = <0x00 0x28001000 0x00 0x1000>; + interrupts = <0x00 0x49 0x04>; + clocks = <0x0a>; + clock-names = "phytium_mci_clk"; + status = "disabled"; + bus-width = <0x04>; + max-frequency = <0x2faf080>; + cap-sdio-irq; + cap-sd-highspeed; + no-mmc; + no-sd; + non-removable; + }; + + nand@28002000 { + compatible = "phytium,nfc"; + reg = <0x00 0x28002000 0x00 0x1000>; + interrupts = <0x00 0x4a 0x04>; + status = "disabled"; + }; + + ddma@28003000 { + compatible = "phytium,ddma"; + reg = <0x00 0x28003000 0x00 0x1000>; + interrupts = <0x00 0x4b 0x04>; + #dma-cells = <0x02>; + dma-channels = <0x08>; + }; + + ddma@28004000 { + compatible = "phytium,ddma"; + reg = <0x00 0x28004000 0x00 0x1000>; + interrupts = <0x00 0x4c 0x04>; + #dma-cells = <0x02>; + dma-channels = <0x08>; + }; + + spi@28008000 { + compatible = "phytium,qspi-nor"; + reg = <0x00 0x28008000 0x00 0x1000 0x00 0x00 0x00 0xfffffff>; + reg-names = "qspi\0qspi_mm"; + clocks = <0x0b>; + status = "okay"; + #address-cells = <0x01>; + #size-cells = <0x00>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0x00>; + spi-rx-bus-width = <0x01>; + spi-max-frequency = <0x1312d00>; + status = "okay"; + }; + }; + + uart@2800c000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800c000 0x00 0x1000>; + interrupts = <0x00 0x53 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800d000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800d000 0x00 0x1000>; + interrupts = <0x00 0x54 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800e000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800e000 0x00 0x1000>; + interrupts = <0x00 0x55 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@2800f000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2800f000 0x00 0x1000>; + interrupts = <0x00 0x56 0x04>; + clocks = <0x0c 0x0c>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + lpc@28010000 { + compatible = "simple-mfd\0syscon"; + reg = <0x00 0x28010000 0x00 0x1000>; + reg-io-width = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x28010000 0x1000>; + + kcs@24 { + compatible = "phytium,kcs-bmc"; + reg = <0x24 0x01 0x30 0x01 0x3c 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@28 { + compatible = "phytium,kcs-bmc"; + reg = <0x28 0x01 0x34 0x01 0x40 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@2c { + compatible = "phytium,kcs-bmc"; + reg = <0x2c 0x01 0x38 0x01 0x44 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + kcs@8c { + compatible = "phytium,kcs-bmc"; + reg = <0x8c 0x01 0x90 0x01 0x94 0x01>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + + bt@48 { + compatible = "phytium,bt-bmc"; + reg = <0x48 0x20>; + interrupts = <0x00 0x58 0x04>; + status = "disabled"; + }; + }; + + gpio@28034000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28034000 0x00 0x1000>; + interrupts = <0x00 0x6c 0x04 0x00 0x6d 0x04 0x00 0x6e 0x04 0x00 0x6f 0x04 0x00 0x70 0x04 0x00 0x71 0x04 0x00 0x72 0x04 0x00 0x73 0x04 0x00 0x74 0x04 0x00 0x75 0x04 0x00 0x76 0x04 0x00 0x77 0x04 0x00 0x78 0x04 0x00 0x79 0x04 0x00 0x7a 0x04 0x00 0x7b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28035000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28035000 0x00 0x1000>; + interrupts = <0x00 0x7c 0x04 0x00 0x7d 0x04 0x00 0x7e 0x04 0x00 0x7f 0x04 0x00 0x80 0x04 0x00 0x81 0x04 0x00 0x82 0x04 0x00 0x83 0x04 0x00 0x84 0x04 0x00 0x85 0x04 0x00 0x86 0x04 0x00 0x87 0x04 0x00 0x88 0x04 0x00 0x89 0x04 0x00 0x8a 0x04 0x00 0x8b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x14>; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28036000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28036000 0x00 0x1000>; + interrupts = <0x00 0x8c 0x04 0x00 0x8d 0x04 0x00 0x8e 0x04 0x00 0x8f 0x04 0x00 0x90 0x04 0x00 0x91 0x04 0x00 0x92 0x04 0x00 0x93 0x04 0x00 0x94 0x04 0x00 0x95 0x04 0x00 0x96 0x04 0x00 0x97 0x04 0x00 0x98 0x04 0x00 0x99 0x04 0x00 0x9a 0x04 0x00 0x9b 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + phandle = <0x15>; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28037000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28037000 0x00 0x1000>; + interrupts = <0x00 0x9c 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28038000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28038000 0x00 0x1000>; + interrupts = <0x00 0x9d 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + gpio@28039000 { + compatible = "phytium,gpio"; + reg = <0x00 0x28039000 0x00 0x1000>; + interrupts = <0x00 0x9e 0x04>; + gpio-controller; + #gpio-cells = <0x02>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + porta { + compatible = "phytium,gpio-port"; + reg = <0x00>; + ngpios = <0x10>; + }; + }; + + spi@2803a000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803a000 0x00 0x1000>; + interrupts = <0x00 0x9f 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + global-cs = <0x01>; + + spidev@0 { + compatible = "spidev"; + reg = <0x00>; + spi-max-frequency = <0x2faf080>; + status = "disabled"; + }; + }; + + spi@2803b000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803b000 0x00 0x1000>; + interrupts = <0x00 0xa0 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@2803c000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803c000 0x00 0x1000>; + interrupts = <0x00 0xa1 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + spi@2803d000 { + compatible = "phytium,spi"; + reg = <0x00 0x2803d000 0x00 0x1000>; + interrupts = <0x00 0xa2 0x04>; + clocks = <0x0d>; + num-cs = <0x04>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "disabled"; + }; + + watchdog@28040000 { + compatible = "arm,sbsa-gwdt"; + reg = <0x00 0x28041000 0x00 0x1000 0x00 0x28040000 0x00 0x1000>; + interrupts = <0x00 0xa4 0x04>; + timeout-sec = <0x1e>; + status = "okay"; + }; + + watchdog@28042000 { + compatible = "arm,sbsa-gwdt"; + reg = <0x00 0x28043000 0x00 0x1000 0x00 0x28042000 0x00 0x1000>; + interrupts = <0x00 0xa5 0x04>; + timeout-sec = <0x1e>; + status = "okay"; + }; + + pwm@2804a000 { + compatible = "phytium,pwm"; + reg = <0x00 0x2804a000 0x00 0x1000>; + interrupts = <0x00 0xad 0x04>; + clocks = <0x0d>; + status = "okay"; + phytium,db = <0x00 0x00 0x64 0x3e8 0x3e8 0x00>; + }; + + pwm@2804b000 { + compatible = "phytium,pwm"; + reg = <0x00 0x2804b000 0x00 0x1000>; + interrupts = <0x00 0xae 0x04>; + clocks = <0x0d>; + status = "okay"; + phytium,db = <0x00 0x00 0x64 0x3e8 0x3e8 0x00>; + }; + + tacho@28054000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28054000 0x00 0x1000>; + interrupts = <0x00 0xc2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28055000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28055000 0x00 0x1000>; + interrupts = <0x00 0xc3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28056000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28056000 0x00 0x1000>; + interrupts = <0x00 0xc4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28057000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28057000 0x00 0x1000>; + interrupts = <0x00 0xc5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28058000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28058000 0x00 0x1000>; + interrupts = <0x00 0xc6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28059000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28059000 0x00 0x1000>; + interrupts = <0x00 0xc7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805a000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805a000 0x00 0x1000>; + interrupts = <0x00 0xc8 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805b000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805b000 0x00 0x1000>; + interrupts = <0x00 0xc9 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805c000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805c000 0x00 0x1000>; + interrupts = <0x00 0xca 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805d000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805d000 0x00 0x1000>; + interrupts = <0x00 0xcb 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805e000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805e000 0x00 0x1000>; + interrupts = <0x00 0xcc 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2805f000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2805f000 0x00 0x1000>; + interrupts = <0x00 0xcd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28060000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28060000 0x00 0x1000>; + interrupts = <0x00 0xce 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28061000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28061000 0x00 0x1000>; + interrupts = <0x00 0xcf 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28062000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28062000 0x00 0x1000>; + interrupts = <0x00 0xd0 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28063000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28063000 0x00 0x1000>; + interrupts = <0x00 0xd1 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28064000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28064000 0x00 0x1000>; + interrupts = <0x00 0xd2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28065000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28065000 0x00 0x1000>; + interrupts = <0x00 0xd3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28066000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28066000 0x00 0x1000>; + interrupts = <0x00 0xd4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28067000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28067000 0x00 0x1000>; + interrupts = <0x00 0xd5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28068000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28068000 0x00 0x1000>; + interrupts = <0x00 0xd6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28069000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28069000 0x00 0x1000>; + interrupts = <0x00 0xd7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806a000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806a000 0x00 0x1000>; + interrupts = <0x00 0xd8 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806b000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806b000 0x00 0x1000>; + interrupts = <0x00 0xd9 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806c000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806c000 0x00 0x1000>; + interrupts = <0x00 0xda 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806d000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806d000 0x00 0x1000>; + interrupts = <0x00 0xdb 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806e000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806e000 0x00 0x1000>; + interrupts = <0x00 0xdc 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@2806f000 { + compatible = "phytium,tacho"; + reg = <0x00 0x2806f000 0x00 0x1000>; + interrupts = <0x00 0xdd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28070000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28070000 0x00 0x1000>; + interrupts = <0x00 0xde 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28071000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28071000 0x00 0x1000>; + interrupts = <0x00 0xdf 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28072000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28072000 0x00 0x1000>; + interrupts = <0x00 0xe0 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28073000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28073000 0x00 0x1000>; + interrupts = <0x00 0xe1 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28074000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28074000 0x00 0x1000>; + interrupts = <0x00 0xe2 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28075000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28075000 0x00 0x1000>; + interrupts = <0x00 0xe3 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28076000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28076000 0x00 0x1000>; + interrupts = <0x00 0xe4 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28077000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28077000 0x00 0x1000>; + interrupts = <0x00 0xe5 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28078000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28078000 0x00 0x1000>; + interrupts = <0x00 0xe6 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + tacho@28079000 { + compatible = "phytium,tacho"; + reg = <0x00 0x28079000 0x00 0x1000>; + interrupts = <0x00 0xe7 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + usb2@31800000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31800000 0x00 0x80000 0x00 0x31990000 0x00 0x10000>; + interrupts = <0x00 0x20 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + usb2@31880000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31880000 0x00 0x80000 0x00 0x319a0000 0x00 0x10000>; + interrupts = <0x00 0x21 0x04>; + status = "disabled"; + dr_mode = "peripheral"; + }; + + usb2@31900000 { + compatible = "phytium,usb2"; + reg = <0x00 0x31900000 0x00 0x80000 0x00 0x319b0000 0x00 0x10000>; + interrupts = <0x00 0x22 0x04>; + status = "disabled"; + dr_mode = "peripheral"; + }; + + usb2@32800000 { + compatible = "phytium,usb2"; + reg = <0x00 0x32800000 0x00 0x40000 0x00 0x32880000 0x00 0x40000>; + interrupts = <0x00 0x0e 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + usb2@32840000 { + compatible = "phytium,usb2"; + reg = <0x00 0x32840000 0x00 0x40000 0x00 0x328c0000 0x00 0x40000>; + interrupts = <0x00 0x0f 0x04>; + status = "okay"; + dr_mode = "host"; + }; + + dc@32000000 { + compatible = "phytium,dc"; + reg = <0x00 0x32000000 0x00 0x8000>; + interrupts = <0x00 0x2c 0x04>; + status = "okay"; + pipe_mask = [01]; + edp_mask = [00]; + }; + + i2s_dp0@32009000 { + compatible = "phytium,i2s"; + reg = <0x00 0x32009000 0x00 0x1000 0x00 0x32008000 0x00 0x1000>; + interrupts = <0x00 0x2f 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + dai-name = "phytium-i2s-dp0"; + status = "okay"; + }; + + i2s_dp1@3200B000 { + compatible = "phytium,i2s"; + reg = <0x00 0x3200b000 0x00 0x1000 0x00 0x3200a000 0x00 0x1000>; + interrupts = <0x00 0x30 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + dai-name = "phytium-i2s-dp1"; + status = "disabled"; + }; + + pmdk_dp { + compatible = "phytium,pmdk-dp"; + status = "okay"; + num-dp = <0x01>; + dp-mask = [01]; + }; + + mailbox@32a00000 { + compatible = "phytium,mbox"; + reg = <0x00 0x32a00000 0x00 0x1000>; + interrupts = <0x00 0x16 0x04>; + #mbox-cells = <0x01>; + phandle = <0x02>; + }; + + rng@32a36000 { + compatible = "phytium,rng"; + reg = <0x00 0x32a36000 0x00 0x1000>; + status = "okay"; + }; + + sram@32a10000 { + compatible = "phytium,pe220x-sram-ns\0mmio-sram"; + reg = <0x00 0x32a10000 0x00 0x2000>; + #address-cells = <0x01>; + #size-cells = <0x01>; + ranges = <0x00 0x00 0x32a10000 0x2000>; + + scp-shmem@0 { + compatible = "arm,scmi-shmem"; + reg = <0x1000 0x400>; + }; + + scp-shmem@1 { + compatible = "arm,scmi-shmem"; + reg = <0x1400 0x400>; + phandle = <0x03>; + }; + }; + + gdma@32b34000 { + compatible = "phytium,gdma"; + dma-channels = <0x10>; + max-outstanding = <0x10>; + reg = <0x00 0x32b34000 0x00 0x1000>; + interrupts = <0x00 0xea 0x04>; + #dma-cells = <0x01>; + }; + + spinlock@32b36000 { + compatible = "phytium,hwspinlock"; + reg = <0x00 0x32b36000 0x00 0x1000>; + #hwlock-cells = <0x01>; + nr-locks = <0x20>; + status = "disabled"; + }; + + pcie@40000000 { + compatible = "pci-host-ecam-generic"; + device_type = "pci"; + #address-cells = <0x03>; + #size-cells = <0x02>; + #interrupt-cells = <0x01>; + reg = <0x00 0x40000000 0x00 0x10000000>; + msi-parent = <0x0f>; + bus-range = <0x00 0xff>; + interrupt-map-mask = <0x00 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x01 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x02 0x01 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x03 0x01 0x00 0x00 0x00 0x06 0x04 0x00 0x00 0x00 0x04 0x01 0x00 0x00 0x00 0x07 0x04>; + ranges = <0x1000000 0x00 0x00 0x00 0x50000000 0x00 0xf00000 0x2000000 0x00 0x58000000 0x00 0x58000000 0x00 0x28000000 0x3000000 0x10 0x00 0x10 0x00 0x10 0x00>; + iommu-map = <0x00 0x10 0x00 0x10000>; + status = "okay"; + }; + + edac@32b28000 { + compatible = "phytium,pe220x-edac"; + reg = <0x00 0x32b28000 0x00 0x1000 0x00 0x31400000 0x00 0x1000 0x00 0x31401000 0x00 0x1000>; + interrupts = <0x00 0x00 0x04 0x00 0x01 0x04>; + status = "disabled"; + }; + + hda@28006000 { + compatible = "phytium,hda"; + reg = <0x00 0x28006000 0x00 0x1000>; + interrupts = <0x00 0x4e 0x04>; + status = "disabled"; + }; + + i2s@28009000 { + compatible = "phytium,i2s"; + reg = <0x00 0x28009000 0x00 0x1000 0x00 0x28005000 0x00 0x1000>; + interrupts = <0x00 0x4d 0x04>; + clocks = <0x0e>; + clock-names = "i2s_clk"; + status = "okay"; + #sound-dai-cells = <0x00>; + dai-name = "phytium-i2s-lsd"; + phandle = <0x16>; + }; + + can@2800a000 { + compatible = "phytium,canfd"; + reg = <0x00 0x2800a000 0x00 0x1000>; + interrupts = <0x00 0x51 0x04>; + clocks = <0x11>; + clock-names = "can_clk"; + tx-fifo-depth = <0x40>; + rx-fifo-depth = <0x40>; + status = "okay"; + }; + + can@2800b000 { + compatible = "phytium,canfd"; + reg = <0x00 0x2800b000 0x00 0x1000>; + interrupts = <0x00 0x52 0x04>; + clocks = <0x11>; + clock-names = "can_clk"; + tx-fifo-depth = <0x40>; + rx-fifo-depth = <0x40>; + status = "okay"; + }; + + keypad@2807a000 { + compatible = "phytium,keypad"; + reg = <0x00 0x2807a000 0x00 0x1000>; + interrupts = <0x00 0xbd 0x04>; + clocks = <0x0d>; + status = "disabled"; + }; + + usb3@31a08000 { + compatible = "phytium,pe220x-xhci"; + reg = <0x00 0x31a08000 0x00 0x18000>; + interrupts = <0x00 0x10 0x04>; + status = "okay"; + }; + + usb3@31a28000 { + compatible = "phytium,pe220x-xhci"; + reg = <0x00 0x31a28000 0x00 0x18000>; + interrupts = <0x00 0x11 0x04>; + status = "okay"; + }; + + sata@31a40000 { + compatible = "generic-ahci"; + reg = <0x00 0x31a40000 0x00 0x1000>; + interrupts = <0x00 0x2a 0x04>; + status = "okay"; + }; + + sata@32014000 { + compatible = "generic-ahci"; + reg = <0x00 0x32014000 0x00 0x1000>; + interrupts = <0x00 0x2b 0x04>; + status = "okay"; + }; + + ethernet@3200c000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x3200c000 0x00 0x2000>; + interrupts = <0x00 0x37 0x04 0x00 0x38 0x04 0x00 0x39 0x04 0x00 0x3a 0x04 0x00 0x1c 0x04 0x00 0x1d 0x04 0x00 0x1e 0x04 0x00 0x1f 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + support-tsn; + status = "okay"; + phy-mode = "sgmii"; + use-mii; + }; + + ethernet@3200e000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x3200e000 0x00 0x2000>; + interrupts = <0x00 0x3b 0x04 0x00 0x3c 0x04 0x00 0x3d 0x04 0x00 0x3e 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "okay"; + phy-mode = "sgmii"; + use-mii; + }; + + ethernet@32010000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x32010000 0x00 0x2000>; + interrupts = <0x00 0x40 0x04 0x00 0x41 0x04 0x00 0x42 0x04 0x00 0x43 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "disabled"; + }; + + ethernet@32012000 { + compatible = "cdns,phytium-gem-1.0"; + reg = <0x00 0x32012000 0x00 0x2000>; + interrupts = <0x00 0x44 0x04 0x00 0x45 0x04 0x00 0x46 0x04 0x00 0x47 0x04>; + clock-names = "pclk\0hclk\0tx_clk\0tsu_clk"; + clocks = <0x12 0x13 0x13 0x12>; + magic-packet; + status = "disabled"; + }; + + vpu@32b00000 { + compatible = "phytium,vpu"; + reg = <0x00 0x32b00000 0x00 0x20000>; + interrupts = <0x00 0x0c 0x04>; + status = "okay"; + }; + + i2c@28026000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28026000 0x00 0x1000>; + interrupts = <0x00 0x65 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + i2c@28030000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28030000 0x00 0x1000>; + interrupts = <0x00 0x6a 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + + es8336@10 { + #sound-dai-cells = <0x00>; + compatible = "everest,es8336"; + reg = <0x10>; + phandle = <0x17>; + }; + }; + + uart@28014000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x28014000 0x00 0x1000>; + interrupts = <0x00 0x5c 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + i2c@28016000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28016000 0x00 0x1000>; + interrupts = <0x00 0x5d 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + i2c@28024000 { + compatible = "phytium,i2c"; + reg = <0x00 0x28024000 0x00 0x1000>; + interrupts = <0x00 0x64 0x04>; + clocks = <0x0d>; + #address-cells = <0x01>; + #size-cells = <0x00>; + status = "okay"; + }; + + uart@2802A000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x2802a000 0x00 0x1000>; + interrupts = <0x00 0x67 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + + uart@28032000 { + compatible = "arm,pl011\0arm,primecell"; + reg = <0x00 0x28032000 0x00 0x1000>; + interrupts = <0x00 0x6b 0x04>; + clocks = <0x0d 0x0d>; + clock-names = "uartclk\0apb_pclk"; + status = "okay"; + }; + }; + + chosen { + bootargs = "console=ttyAMA1,115200 earlycon=pl011,0x2800d000 rootwait fsckfix root=/dev/sda2 rw cma=256m ;"; + stdout-path = "serial1:115200n8"; + }; + + memory { + device_type = "memory"; + reg = <0x20 0x40000000 0x00 0x40000000>; + }; + + leds { + compatible = "gpio-leds"; + + sysled { + label = "sysled"; + gpios = <0x14 0x05 0x00>; + linux,default-trigger = "none"; + }; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "phytium,pe220x-i2s-audio"; + simple-audio-card,pin-switches = "mic-in"; + simple-audio-card,widgets = "Microphone\0mic-in\0Headphone\0Headphones"; + simple-audio-card,routing = "MIC2\0mic-in"; + simple-audio-card,hp-det-gpio = <0x15 0x0b 0x01>; + + simple-audio-card,cpu { + sound-dai = <0x16>; + }; + + simple-audio-card,codec { + sound-dai = <0x17>; + }; + }; +}; diff --git a/configs/vms/linux-aarch64-tac_e400-smp1.toml b/configs/vms/linux-aarch64-tac_e400-smp1.toml new file mode 100644 index 00000000..17784330 --- /dev/null +++ b/configs/vms/linux-aarch64-tac_e400-smp1.toml @@ -0,0 +1,56 @@ +# Vm base info configs +# +[base] +# Guest vm id. +id = 1 +# Guest vm name. +name = "linux" +# Virtualization type. +vm_type = 1 +# The number of virtual CPUs. +cpu_num = 1 +# The physical CPU ids. +phys_cpu_ids = [0x100] + +# +# Vm kernel configs +# +[kernel] +# The entry point of the kernel image. +entry_point = 0x20_4008_0000 +# The location of image: "memory" | "fs". +# Load from file system. +image_location = "memory" +# The load address of the kernel image. +kernel_load_addr = 0x20_4008_0000 +## The file path of the kernel image. +kernel_path = "/path/to/Image" +## The file path of the device tree blob (DTB). +dtb_load_addr = 0x20_4000_0000 +#dtb_path = "/path/to/linux-aarch64-tac_e400-smp1.dtb" +# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). +# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. +memory_regions = [ + [0x20_4000_0000, 0x4000_0000, 0x7, 1], # System RAM MAP_IDENTICAL +] + +# +# Device specifications +# +[devices] +# Emu_devices. +# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. +interrupt_mode = "passthrough" +emu_devices = [] + +# Pass-through devices. +# Name Base-Ipa Base-Pa Length Alloc-Irq. +passthrough_devices = [ + ["/"], + #["/timer"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + # ["/gic-v3"], +] \ No newline at end of file diff --git a/configs/vms/linux-qemu-aarch64-smp2.toml b/configs/vms/linux-qemu-aarch64-smp2.toml deleted file mode 100644 index 46cafd0a..00000000 --- a/configs/vms/linux-qemu-aarch64-smp2.toml +++ /dev/null @@ -1,70 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "linux-qemu" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 2 -# Guest vm physical cpu sets. -phys_cpu_sets = [1, 2] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x8008_0000 -# The location of image: "memory" | "fs". -# load from memory. -image_location = "memory" -# The file path of the kernel image. -kernel_path = "linux-6.6.62.bin" -# The load address of the kernel image. -kernel_load_addr = 0x8008_0000 -# The file path of the device tree blob (DTB). -dtb_path = "linux-qemu-smp2.dtb" -# The load address of the device tree blob (DTB). -dtb_load_addr = 0x8000_0000 - -## load from file system -# image_location = "fs" -## The file path of the kernel image. -# kernel_path = "linux-arceos-aarch64.bin" -## The file path of the device tree blob (DTB). -# dtb_path = "linux-rk3588.dtb" - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x8000_0000, 0x4000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] - -# Pass-through devices. -passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], -] \ No newline at end of file diff --git a/configs/vms/linux-qemu-aarch64-vm2.toml b/configs/vms/linux-qemu-aarch64-vm2.toml deleted file mode 100644 index 51048b6c..00000000 --- a/configs/vms/linux-qemu-aarch64-vm2.toml +++ /dev/null @@ -1,71 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 2 -# Guest vm name. -name = "linux-qemu" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [2] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x8008_0000 -# The location of image: "memory" | "fs" -# load from memory -image_location = "memory" -# The file path of the kernel image. -kernel_path = "linux-6.6.62.bin" -# The load address of the kernel image. -kernel_load_addr = 0x8008_0000 -# The file path of the device tree blob (DTB). -dtb_path = "linux-qemu.dtb" -# The load address of the device tree blob (DTB). -dtb_load_addr = 0x8000_0000 - -## load from file system -# image_location = "fs" -## The file path of the kernel image. -# kernel_path = "linux-arceos-aarch64.bin" -## The file path of the device tree blob (DTB). -# dtb_path = "linux-rk3588.dtb" - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x8000_0000, 0x4000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL -] - -# -# Device specifications -# -[devices] -# Pass-through devices -passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - # map qemu uart2 as vm uart - ["pl011@9000000", 0x900_0000, 0x904_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], -] - -# Emu_devices -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig -emu_devices = [] \ No newline at end of file diff --git a/configs/vms/linux-qemu-aarch64.toml b/configs/vms/linux-qemu-aarch64.toml deleted file mode 100644 index c2674378..00000000 --- a/configs/vms/linux-qemu-aarch64.toml +++ /dev/null @@ -1,70 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "linux-qemu" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x8008_0000 -# The location of image: "memory" | "fs". -# load from memory. -image_location = "memory" -# The file path of the kernel image. -kernel_path = "linux-6.6.62.bin" -# The load address of the kernel image. -kernel_load_addr = 0x8008_0000 -# The file path of the device tree blob (DTB). -dtb_path = "linux-qemu.dtb" -# The load address of the device tree blob (DTB). -dtb_load_addr = 0x8000_0000 - -## load from file system -# image_location = "fs" -## The file path of the kernel image. -# kernel_path = "linux-arceos-aarch64.bin" -## The file path of the device tree blob (DTB). -# dtb_path = "linux-rk3588.dtb" - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x8000_0000, 0x4000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL -] - -# -# Device specifications -# -[devices] -# Pass-through devices. -passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], -] - -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] \ No newline at end of file diff --git a/configs/vms/linux-qemu-smp2.dts b/configs/vms/linux-qemu-smp2.dts deleted file mode 100644 index 3168e40a..00000000 --- a/configs/vms/linux-qemu-smp2.dts +++ /dev/null @@ -1,364 +0,0 @@ -/dts-v1/; - -/ { - interrupt-parent = <0x8003>; - model = "linux,dummy-virt"; - #size-cells = <0x02>; - #address-cells = <0x02>; - compatible = "linux,dummy-virt"; - - psci { - migrate = <0xc4000005>; - cpu_on = <0xc4000003>; - cpu_off = <0x84000002>; - cpu_suspend = <0xc4000001>; - method = "smc"; - compatible = "arm,psci-1.0\0arm,psci-0.2\0arm,psci"; - }; - - memory@80000000 { - reg = <0x00 0x80000000 0x00 0x40000000>; - device_type = "memory"; - }; - - virtio_mmio@a000000 { - dma-coherent; - interrupts = <0x00 0x10 0x01>; - reg = <0x00 0xa000000 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000200 { - dma-coherent; - interrupts = <0x00 0x11 0x01>; - reg = <0x00 0xa000200 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000400 { - dma-coherent; - interrupts = <0x00 0x12 0x01>; - reg = <0x00 0xa000400 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000600 { - dma-coherent; - interrupts = <0x00 0x13 0x01>; - reg = <0x00 0xa000600 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000800 { - dma-coherent; - interrupts = <0x00 0x14 0x01>; - reg = <0x00 0xa000800 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000a00 { - dma-coherent; - interrupts = <0x00 0x15 0x01>; - reg = <0x00 0xa000a00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000c00 { - dma-coherent; - interrupts = <0x00 0x16 0x01>; - reg = <0x00 0xa000c00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a000e00 { - dma-coherent; - interrupts = <0x00 0x17 0x01>; - reg = <0x00 0xa000e00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001000 { - dma-coherent; - interrupts = <0x00 0x18 0x01>; - reg = <0x00 0xa001000 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001200 { - dma-coherent; - interrupts = <0x00 0x19 0x01>; - reg = <0x00 0xa001200 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001400 { - dma-coherent; - interrupts = <0x00 0x1a 0x01>; - reg = <0x00 0xa001400 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001600 { - dma-coherent; - interrupts = <0x00 0x1b 0x01>; - reg = <0x00 0xa001600 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001800 { - dma-coherent; - interrupts = <0x00 0x1c 0x01>; - reg = <0x00 0xa001800 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001a00 { - dma-coherent; - interrupts = <0x00 0x1d 0x01>; - reg = <0x00 0xa001a00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001c00 { - dma-coherent; - interrupts = <0x00 0x1e 0x01>; - reg = <0x00 0xa001c00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a001e00 { - dma-coherent; - interrupts = <0x00 0x1f 0x01>; - reg = <0x00 0xa001e00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002000 { - dma-coherent; - interrupts = <0x00 0x20 0x01>; - reg = <0x00 0xa002000 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002200 { - dma-coherent; - interrupts = <0x00 0x21 0x01>; - reg = <0x00 0xa002200 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002400 { - dma-coherent; - interrupts = <0x00 0x22 0x01>; - reg = <0x00 0xa002400 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002600 { - dma-coherent; - interrupts = <0x00 0x23 0x01>; - reg = <0x00 0xa002600 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002800 { - dma-coherent; - interrupts = <0x00 0x24 0x01>; - reg = <0x00 0xa002800 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002a00 { - dma-coherent; - interrupts = <0x00 0x25 0x01>; - reg = <0x00 0xa002a00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002c00 { - dma-coherent; - interrupts = <0x00 0x26 0x01>; - reg = <0x00 0xa002c00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a002e00 { - dma-coherent; - interrupts = <0x00 0x27 0x01>; - reg = <0x00 0xa002e00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003000 { - dma-coherent; - interrupts = <0x00 0x28 0x01>; - reg = <0x00 0xa003000 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003200 { - dma-coherent; - interrupts = <0x00 0x29 0x01>; - reg = <0x00 0xa003200 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003400 { - dma-coherent; - interrupts = <0x00 0x2a 0x01>; - reg = <0x00 0xa003400 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003600 { - dma-coherent; - interrupts = <0x00 0x2b 0x01>; - reg = <0x00 0xa003600 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003800 { - dma-coherent; - interrupts = <0x00 0x2c 0x01>; - reg = <0x00 0xa003800 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003a00 { - dma-coherent; - interrupts = <0x00 0x2d 0x01>; - reg = <0x00 0xa003a00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003c00 { - dma-coherent; - interrupts = <0x00 0x2e 0x01>; - reg = <0x00 0xa003c00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - virtio_mmio@a003e00 { - dma-coherent; - interrupts = <0x00 0x2f 0x01>; - reg = <0x00 0xa003e00 0x00 0x200>; - compatible = "virtio,mmio"; - }; - - gpio-keys { - compatible = "gpio-keys"; - - poweroff { - gpios = <0x8004 0x03 0x00>; - linux,code = <0x74>; - label = "GPIO Key Poweroff"; - }; - }; - - pl061@9030000 { - phandle = <0x8005>; - clock-names = "apb_pclk"; - clocks = <0x8000>; - interrupts = <0x00 0x07 0x04>; - gpio-controller; - #gpio-cells = <0x02>; - compatible = "arm,pl061\0arm,primecell"; - reg = <0x00 0x9030000 0x00 0x1000>; - }; - - pl031@9010000 { - clock-names = "apb_pclk"; - clocks = <0x8000>; - interrupts = <0x00 0x02 0x04>; - reg = <0x00 0x9010000 0x00 0x1000>; - compatible = "arm,pl031\0arm,primecell"; - }; - - pl011@9000000 { - clock-names = "uartclk\0apb_pclk"; - clocks = <0x8000 0x8000>; - interrupts = <0x00 0x01 0x04>; - reg = <0x00 0x9000000 0x00 0x1000>; - compatible = "arm,pl011\0arm,primecell"; - }; - - pmu { - interrupts = <0x01 0x07 0x104>; - compatible = "arm,armv8-pmuv3"; - }; - - intc@8000000 { - phandle = <0x8003>; - interrupts = <0x01 0x09 0x04>; - reg = <0x00 0x8000000 0x00 0x10000 0x00 0x8010000 0x00 0x10000 0x00 0x8030000 0x00 0x10000 0x00 0x8040000 0x00 0x10000>; - compatible = "arm,cortex-a15-gic"; - ranges; - #size-cells = <0x02>; - #address-cells = <0x02>; - interrupt-controller; - #interrupt-cells = <0x03>; - - v2m@8020000 { - phandle = <0x8004>; - reg = <0x00 0x8020000 0x00 0x1000>; - msi-controller; - compatible = "arm,gic-v2m-frame"; - }; - }; - - cpus { - #size-cells = <0x00>; - #address-cells = <0x01>; - - cpu-map { - - socket0 { - - cluster0 { - core0 { - cpu = <0x8002>; - }; - core1 { - cpu = <0x8001>; - }; - }; - }; - }; - - cpu@0 { - phandle = <0x8002>; - reg = <0x00>; - enable-method = "psci"; - compatible = "arm,cortex-a57"; - device_type = "cpu"; - }; - cpu@1 { - phandle = <0x8001>; - reg = <0x01>; - enable-method = "psci"; - compatible = "arm,cortex-a57"; - device_type = "cpu"; - }; - }; - - timer { - interrupts = <0x01 0x0d 0x104 0x01 0x0e 0x104 0x01 0x0b 0x104 0x01 0x0a 0x104>; - always-on; - compatible = "arm,armv8-timer\0arm,armv7-timer"; - }; - - apb-pclk { - phandle = <0x8000>; - clock-output-names = "clk24mhz"; - clock-frequency = <0x16e3600>; - #clock-cells = <0x00>; - compatible = "fixed-clock"; - }; - - chosen { - bootargs = "earlycon console=ttyAMA0 root=/dev/vda rw audit=0 default_hugepagesz=32M hugepagesz=32M hugepages=4"; - stdout-path = "/pl011@9000000"; - rng-seed = <0x7d690073 0x793eb999 0xf6bdac0f 0xd29fa1a 0x78c11b49 0xf975a441 0xbb12bacc 0xd938d0a9>; - kaslr-seed = <0x45202e26 0x23f63f1f>; - }; -}; diff --git a/configs/vms/linux-rk3588-aarch64-smp.toml b/configs/vms/linux-rk3588-aarch64-smp.toml deleted file mode 100644 index a62e75a8..00000000 --- a/configs/vms/linux-rk3588-aarch64-smp.toml +++ /dev/null @@ -1,161 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "linux" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 4 -# Guest vm physical cpu sets. -# phys_cpu_sets = [1, 2, 4, 8, 16, 32, 64, 128] -phys_cpu_ids = [0x00, 0x100, 0x200, 0x300] -phys_cpu_sets = [1, 2, 4, 8] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x1008_0000 -# The load address of the kernel image. -kernel_load_addr = 0x1008_0000 -# The load address of the device tree blob (DTB). -dtb_load_addr = 0x1000_0000 -# The location of image: "memory" | "fs". -# load from memory -image_location = "memory" -# The file path of the kernel image. -kernel_path = "/path/to/linux-aarch64.bin" -# The file path of the device tree blob (DTB). -dtb_path = "/path/to/dtb" - -# load from file system. -# image_location = "fs". -## The file path of the kernel image. -# kernel_path = "linux-arceos-aarch64.bin" -## The file path of the device tree blob (DTB). -# dtb_path = "linux-rk3588.dtb" - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - # [0x0, 0x10_f000, 0x7, 1], # passthrough uncahed MAP_IDENTICAL - [0x940_0000, 0xe6c00000, 0x7, 1], # ram 3G MAP_IDENTICAL - # [0x4000_0000, 0x4000_0000, 0x7, 1], # ram 1G MAP_IDENTICAL -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] - -# Pass-through devices. -# Name Base-Ipa Base-Pa Length Alloc-Irq. -passthrough_devices = [ - [ - "ramoops", - 0x11_0000, - 0x11_0000, - 0xf_0000, - 0x17, - ], - [ - "sram", - 0x10_f000, - 0x10_f000, - 0x1000, - 0x17, - ], - [ - "gpu", - 0xfb00_0000, - 0xfb00_0000, - 0x20_0000, - 0x17, - ], - [ - "uart8250 UART", - 0xfd00_0000, - 0xfd00_0000, - 0x200_0000, - 0x17, - ], - [ - "usb", - 0xfc00_0000, - 0xfc00_0000, - 0x100_0000, - 0x17, - ], - [ - "uncached", - 0x0, - 0x0, - 0x10_f000, - 0x17, - ], - # [ - # "gicr", - # 0xfe68_0000, - # 0xfe68_0000, - # 0x10_0000, - # 0x1, - # ], - # [ - # "uncached", - # 0xf300_0000, - # 0xf300_0000, - # 0x100_0000, - # 0x17, - # ], - # [ - # "uncached", - # 0xf400_0000, - # 0xf400_0000, - # 0x100_0000, - # 0x17, - # ], - # [ - # "uncached", - # 0xa_4100_0000, - # 0xa_4100_0000, - # 0x40_0000, - # 0x17, - # ], - # [ - # "uncached", - # 0xa_40c0_0000, - # 0xa_40c0_0000, - # 0x40_0000, - # 0x17, - # ], - # [ - # "uncached", - # 0x920_0000, - # 0x920_0000, - # 0x20_0000, - # 0x17, - # ], -] - - -# [0xfe600000, 0x10000], # gic-v3 gicd -# [0xfe680000, 0x10_0000], # gic-v3 gicr - - # [0xa41000000, 0x400000], - # [0xa40c00000, 0x400000], - # [0xf4000000,0x1000000], - # [0xf3000000,0x1000000], \ No newline at end of file diff --git a/configs/vms/nimbos-aarch64.toml b/configs/vms/nimbos-aarch64-qemu-smp1.toml similarity index 68% rename from configs/vms/nimbos-aarch64.toml rename to configs/vms/nimbos-aarch64-qemu-smp1.toml index 2be467af..88a789e8 100644 --- a/configs/vms/nimbos-aarch64.toml +++ b/configs/vms/nimbos-aarch64-qemu-smp1.toml @@ -10,7 +10,7 @@ vm_type = 1 # The number of virtual CPUs. cpu_num = 1 # Guest vm physical cpu sets. -phys_cpu_sets = [1] +phys_cpu_ids = [0] # # Vm kernel configs @@ -20,9 +20,10 @@ phys_cpu_sets = [1] entry_point = 0x4008_0000 # The location of image: "memory" | "fs". # Load from file system. -image_location = "fs" +image_location = "fs" # The file path of the kernel image. kernel_path = "nimbos-aarch64.bin" +# kernel_path = "/home/debin/Codes/arm_tiny/build/arm_tiny.bin" # The load address of the kernel image. kernel_load_addr = 0x4008_0000 @@ -40,25 +41,35 @@ kernel_load_addr = 0x4008_0000 # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b00111 R|W|EXECUTE + [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b00111 R|W|EXECUTE ] # # Device specifications # [devices] +interrupt_mode = "passthrough" # Emu_devices. # Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] +emu_devices = [ + # [ + # "vgicd-v2", + # 0x800_0000, + # 0x10_000, + # 25, + # 1, + # [2], + # ], # Vgicdv2 4k irq-25 EmuDeviceTGicdV2 config: vcpu_num +] # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], + ["/"], + #["/pl011@9000000"], +] + +# Devices that are not desired to be passed through to the guest +excluded_devices = [ + ["/pcie@10000000"], ] \ No newline at end of file diff --git a/configs/vms/nimbos-riscv64.toml b/configs/vms/nimbos-riscv64-qemu-smp1.toml similarity index 85% rename from configs/vms/nimbos-riscv64.toml rename to configs/vms/nimbos-riscv64-qemu-smp1.toml index 6c29657c..5b08bc1d 100644 --- a/configs/vms/nimbos-riscv64.toml +++ b/configs/vms/nimbos-riscv64-qemu-smp1.toml @@ -40,7 +40,7 @@ kernel_load_addr = 0x9020_0000 # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x9000_0000, 0x100_0000, 0xf, 0], # Low RAM 16M 0b1111 R|W|EXECUTE|U + [0x9000_0000, 0x100_0000, 0xf, 0], # Low RAM 16M 0b1111 R|W|EXECUTE|U ] # @@ -54,6 +54,6 @@ emu_devices = [] # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - ["PLIC@c000000", 0x0c00_0000, 0x0c00_0000, 0x21_0000, 0x1], - ["UART@10000000", 0x1000_0000, 0x1000_0000, 0x1000, 0x1], -] \ No newline at end of file + ["PLIC@c000000", 0x0c00_0000, 0x0c00_0000, 0x21_0000, 0x1], + ["UART@10000000", 0x1000_0000, 0x1000_0000, 0x1000, 0x1], +] diff --git a/configs/vms/nimbos-x86_64.toml b/configs/vms/nimbos-x86_64-qemu-smp1.toml similarity index 75% rename from configs/vms/nimbos-x86_64.toml rename to configs/vms/nimbos-x86_64-qemu-smp1.toml index cad59e24..3e12b78f 100644 --- a/configs/vms/nimbos-x86_64.toml +++ b/configs/vms/nimbos-x86_64-qemu-smp1.toml @@ -40,13 +40,14 @@ bios_load_addr = 0x8000 # Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). # For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. memory_regions = [ - [0x0000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b111 R|W|EXECUTE + [0x0000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b111 R|W|EXECUTE ] # # Device specifications # [devices] +interrupt_mode = "passthrough" # Emu_devices. # Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. emu_devices = [] @@ -54,25 +55,25 @@ emu_devices = [] # Pass-through devices. # Name Base-Ipa Base-Pa Length Alloc-Irq. passthrough_devices = [ - [ - "IO APIC", - 0xfec0_0000, - 0xfec0_0000, - 0x1000, - 0x1, - ], - [ - "Local APIC", - 0xfee0_0000, - 0xfee0_0000, - 0x1000, - 0x1, - ], - [ - "HPET", - 0xfed0_0000, - 0xfed0_0000, - 0x1000, - 0x1, - ], -] \ No newline at end of file + [ + "IO APIC", + 0xfec0_0000, + 0xfec0_0000, + 0x1000, + 0x1, + ], + [ + "Local APIC", + 0xfee0_0000, + 0xfee0_0000, + 0x1000, + 0x1, + ], + [ + "HPET", + 0xfed0_0000, + 0xfed0_0000, + 0x1000, + 0x1, + ], +] diff --git a/configs/vms/starry-aarch64.toml b/configs/vms/starry-aarch64.toml deleted file mode 100644 index c02514a8..00000000 --- a/configs/vms/starry-aarch64.toml +++ /dev/null @@ -1,64 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "starry" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x4008_0000 -# The location of image: "memory" | "fs". -# Load from file system. -image_location = "fs" -# The file path of the kernel image. -kernel_path = "starry-aarch64.bin" -# The load address of the kernel image. -kernel_load_addr = 0x4008_0000 -# The file path of the BIOS image. -dtb_load_addr = 0x4000_0000 -# The load address of the BIOS image. -dtb_path = "starry-aarch64.bin" - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b00111 R|W|EXECUTE -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] - -# Pass-through devices. -# Name Base-Ipa Base-Pa Length Alloc-Irq. -passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], -] \ No newline at end of file diff --git a/configs/vms/starry-riscv64.toml b/configs/vms/starry-riscv64.toml deleted file mode 100644 index 0d238ae6..00000000 --- a/configs/vms/starry-riscv64.toml +++ /dev/null @@ -1,64 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "starry" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x8020_0000 -# The location of image: "memory" | "fs". -# Load from file system. -image_location = "fs" -# The file path of the kernel image. -kernel_path = "starry_riscv64.bin" -# The load address of the kernel image. -kernel_load_addr = 0x8020_0000 -# The file path of the device tree blob (DTB) -dtb_path = "starry_riscv64.bin" -# The load address of the device tree blob (DTB). -dtb_load_addr = 0x8000_0000 - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x8000_0000, 0x100_0000, 0xf, 0], # Low RAM 16M 0b1111 R|W|EXECUTE|U -] - -# -# Device specifications -# -[devices] -# Emu_devices -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig -emu_devices = [] - -# Pass-through devices -# Name Base-Ipa Base-Pa Length Alloc-Irq -passthrough_devices = [ - [ - "PLIC@c000000", - 0x0c00_0000, - 0x0c00_0000, - 0x21_0000, - 0x1, - ], - [ - "UART@10000000", - 0x1000_0000, - 0x1000_0000, - 0x1000, - 0x1, - ], -] \ No newline at end of file diff --git a/configs/vms/starry-x86_64.toml b/configs/vms/starry-x86_64.toml deleted file mode 100644 index 89bc3488..00000000 --- a/configs/vms/starry-x86_64.toml +++ /dev/null @@ -1,64 +0,0 @@ -# Vm base info configs -# -[base] -# Guest vm id. -id = 1 -# Guest vm name. -name = "starry" -# Virtualization type. -vm_type = 1 -# The number of virtual CPUs. -cpu_num = 1 -# Guest vm physical cpu sets. -phys_cpu_sets = [1] - -# -# Vm kernel configs -# -[kernel] -# The entry point of the kernel image. -entry_point = 0x4008_0000 -# The location of image: "memory" | "fs". -# Load from file system. -image_location = "fs" -# The file path of the kernel image. -kernel_path = "starry-aarch64.bin" -# The load address of the kernel image. -kernel_load_addr = 0x4008_0000 -# The file path of the BIOS image. -dtb_load_addr = 0x4000_0000 -# The load address of the BIOS image. -dtb_path = "starry-aarch64.bin" - -## The file path of the ramdisk image. -# ramdisk_path = "" -## The load address of the ramdisk image. -# ramdisk_load_addr = 0 -## The path of the disk image. -# disk_path = "disk.img" - -# Memory regions with format (`base_paddr`, `size`, `flags`, `map_type`). -# For `map_type`, 0 means `MAP_ALLOC`, 1 means `MAP_IDENTICAL`. -memory_regions = [ - [0x4000_0000, 0x100_0000, 0x7, 0], # Low RAM 16M 0b00111 R|W|EXECUTE -] - -# -# Device specifications -# -[devices] -# Emu_devices. -# Name Base-Ipa Ipa_len Alloc-Irq Emu-Type EmuConfig. -emu_devices = [] - -# Pass-through devices. -# Name Base-Ipa Base-Pa Length Alloc-Irq. -passthrough_devices = [ - ["intc@8000000", 0x800_0000, 0x800_0000, 0x50_000, 0x1], - ["pl011@9000000", 0x900_0000, 0x900_0000, 0x1000, 0x1], - ["pl031@9010000", 0x901_0000, 0x901_0000, 0x1000, 0x1], - ["pl061@9030000", 0x903_0000, 0x903_0000, 0x1000, 0x1], - # a003000.virtio_mmio virtio_mmio@a003000 - # a003200.virtio_mmio virtio_mmio@a003200 - ["virtio_mmio", 0xa00_0000, 0xa00_0000, 0x4000, 0x1], -] \ No newline at end of file diff --git a/doc/FDT_Configuration_Guide.md b/doc/FDT_Configuration_Guide.md new file mode 100644 index 00000000..741a9f4e --- /dev/null +++ b/doc/FDT_Configuration_Guide.md @@ -0,0 +1,253 @@ +# AxVisor 设备树配置使用说明 + +本文档详细说明了在 AxVisor 中如何配置和使用设备树(FDT)来生成客户机 VM 的设备树。 + +本文档所述功能只在aarch64 架构下支持。 + +## 1. 概述 + +AxVisor 支持两种方式生成客户机 VM 的设备树: + +1. **使用预定义的设备树文件**:通过 [kernel] 部分的 `dtb_path` 指定设备树文件路径 +2. **动态生成设备树**:当 `dtb_path` 字段未使用时,根据配置文件中的参数动态生成设备树 + +无论采用哪种方式,CPU 节点和内存节点都会根据配置进行更新。 + +## 2. 配置文件结构 + +配置文件采用 TOML 格式,主要包含以下几个部分: + +```toml +[base] +# 基本配置信息 + +[kernel] +# 内核和设备树配置 + +[devices] +# 设备配置信息 +``` + +## 3. 设备树处理机制 + +### 3.1 使用预定义设备树文件 + +当 [kernel] 部分的 `dtb_path` 配置了设备树文件路径时: + +```toml +[kernel] +dtb_path = "/path/to/device-tree.dtb" +``` + +AxVisor 会优先使用提供的设备树文件,并根据以下配置更新其中的 CPU 节点和内存节点: + +- CPU 节点根据 [base] 部分的 `phys_cpu_ids` 更新 +- 内存节点根据 [kernel] 部分的 `memory_regions` 更新 + +注意:当使用预定义设备树文件时,[devices] 部分的 `passthrough_devices` 和 `excluded_devices` 配置将被忽略。 + +### 3.2 动态生成设备树 + +当 [kernel] 部分的 `dtb_path` 未添加时: + +```toml +[kernel] +# dtb_path = "" +``` + +AxVisor 会根据配置文件中的参数动态生成客户机设备树: + +1. **CPU 节点**:根据 [base] 部分的 `phys_cpu_ids` 生成 +2. **内存节点**:根据 [kernel] 部分的 `memory_regions` 生成 +3. **其他设备节点**:根据 [devices] 部分的 `passthrough_devices` 和 `excluded_devices` 生成 + +## 4. 配置参数详解 + +### 4.1 基本配置 [base] + +```toml +[base] +id = 1 # 客户机 VM ID +name = "linux-qemu" # 客户机 VM 名称 +vm_type = 1 # 虚拟化类型 +cpu_num = 1 # 虚拟 CPU 数量 +phys_cpu_ids = [0] # 客户机 VM 物理 CPU 集合 +``` + +注意:配置文件中的 `phys_cpu_sets` 字段已不再需要手动配置。AxVisor 会根据主机设备树和 `phys_cpu_ids` 自动识别并生成相应的 CPU 集合掩码。 + +### 4.2 内核配置 [kernel] + +```toml +[kernel] +entry_point = 0x8020_0000 # 内核镜像入口点 +image_location = "memory" # 镜像位置 ("memory" | "fs") +kernel_path = "tmp/Image" # 内核镜像文件路径 +kernel_load_addr = 0x8020_0000 # 内核镜像加载地址 +dtb_path = "tmp/linux.dtb" # 设备树文件路径(空字符串表示动态生成) +dtb_load_addr = 0x8000_0000 # 设备树加载地址 + +# 内存区域配置,格式为 (基地址, 大小, 标志, 映射类型) +memory_regions = [ + [0x8000_0000, 0x1000_0000, 0x7, 0], # 系统 RAM 1G MAP_IDENTICAL +] +``` + +### 4.3 设备配置 [devices] + +```toml +[devices] +# 直通设备配置(仅在动态生成设备树时生效) +passthrough_devices = [ + ["/intc"], +] + +# 排除设备配置(仅在动态生成设备树时生效) +excluded_devices = [ + ["/intc"], +] +``` + +注意:直通设备配置已简化,现在只需要提供从根节点开始的完整路径即可,如 ["/intc"]。设备的地址、大小等信息会根据设备树自动识别并直通,无需手动填写。 + +## 5. 设备直通机制 + +### 5.1 直通设备配置 + +`passthrough_devices` 定义了需要直通给客户机的设备节点: + +```toml +passthrough_devices = [ + ["/"], # 直通根节点及其所有子节点 + ["/intc"], # 直通 /intc 节点及其子节点 +] +``` + +设备节点格式为从根节点开始的全局路径(如 `/intc`),在直通时会将以下节点包含在客户机设备树中: + +1. 指定的直通节点本身 +2. 直通节点的所有后代节点 +3. 与直通设备相关的依赖节点 + +注意: +1. 此配置仅在动态生成设备树时生效,当使用预定义设备树文件时将被忽略。 +2. 直通设备配置已简化,现在只需要提供从根节点开始的完整路径即可,设备的地址、大小等信息会根据设备树自动识别并直通。 + +### 5.2 排除设备配置 + +`excluded_devices` 定义了不希望直通给客户机的设备节点: + +```toml +excluded_devices = [ + ["/timer"], # 排除 /timer 节点及其子节点 +] +``` + +在查找所有直通节点后,会将排除的节点及其后代节点从最终的客户机设备树中移除。 + +注意:此配置仅在动态生成设备树时生效,当使用预定义设备树文件时将被忽略。 + +## 6. 示例配置 + +### 6.1 使用预定义设备树文件的配置 + +```toml +[base] +id = 1 +name = "linux-qemu" +vm_type = 1 +cpu_num = 2 +phys_cpu_ids = [0, 1] +# phys_cpu_sets 不再需要手动配置,会自动根据 phys_cpu_ids 生成 + +[kernel] +entry_point = 0x8020_0000 +image_location = "memory" +kernel_path = "tmp/Image" +kernel_load_addr = 0x8020_0000 +dtb_path = "/home/user/device-tree.dtb" # 使用预定义设备树文件 +dtb_load_addr = 0x8000_0000 + +memory_regions = [ + [0x8000_0000, 0x1000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] + +[devices] +# 注意:以下配置在使用预定义设备树时将被忽略 +passthrough_devices = [ + ["/intc"], +] +excluded_devices = [ + ["/timer"], +] +``` + +### 6.2 动态生成设备树的配置 + +```toml +[base] +id = 1 +name = "linux-qemu" +vm_type = 1 +cpu_num = 2 +phys_cpu_ids = [0, 1] +# phys_cpu_sets 不再需要手动配置,会自动根据 phys_cpu_ids 生成 + +[kernel] +entry_point = 0x8020_0000 +image_location = "memory" +kernel_path = "tmp/Image" +kernel_load_addr = 0x8020_0000 +# dtb_path = "" # 不使用该字段表示动态生成设备树 +dtb_load_addr = 0x8000_0000 + +memory_regions = [ + [0x8000_0000, 0x1000_0000, 0x7, 1], # System RAM 1G MAP_IDENTICAL +] + +[devices] +# 以下配置仅在动态生成设备树时生效 +# 注意:直通设备配置已简化,现在只需要提供从根节点开始的完整路径即可 +passthrough_devices = [ + ["/"], + ["/intc"], +] + +excluded_devices = [ + ["/timer"], + ["/watchdog"], +] +``` + +## 7. 处理流程 + +1. **检查 dtb_path**: + - 如果使用 `dtb_path` 字段,则加载并使用预定义的设备树文件,此时 `passthrough_devices` 和 `excluded_devices` 配置将被忽略 + - 如果未使用 `dtb_path` 字段,则动态生成设备树,此时 `passthrough_devices` 和 `excluded_devices` 配置生效 + +2. **CPU 节点处理**: + - 根据 `phys_cpu_ids` 配置更新或生成 CPU 节点 + - 只包含配置中指定的 CPU + - 自动根据 `phys_cpu_ids` 生成 `phys_cpu_sets`,无需手动配置 + +3. **内存节点处理**: + - 根据 `memory_regions` 配置更新或生成内存节点 + - 按照指定的地址和大小创建内存区域 + +4. **设备节点处理**(仅在动态生成时): + - 根据 `passthrough_devices` 确定需要包含的设备节点 + - 包括直通节点、其后代节点以及相关依赖节点 + - 根据 `excluded_devices` 排除指定的设备节点及其后代节点 + +5. **生成最终设备树**: + - 将处理后的节点组合成完整的设备树 + - 存储在全局缓存中供后续使用 + +## 8. 特别配置 +1. **qemu 启动参数**: +``` + arceos_args = ["BUS=mmio", "BLK=y", "LOG=info", "SMP=4", "MEM=8g", + "QEMU_ARGS=\"-machine gic-version=3 -cpu cortex-a72 -append 'root=/dev/vda rw init=/init' \"", + "DISK_IMG=\"tmp/qemu/rootfs.img\"",] +``` +其中当不提供设备树时 `-append 'root=/dev/vda rw init=/init'`参数必须添加,目的是在主机设备树中添加chosen节点的bootargs属性。 \ No newline at end of file diff --git a/doc/GuestVMs.md b/doc/GuestVMs.md deleted file mode 100644 index 257dd959..00000000 --- a/doc/GuestVMs.md +++ /dev/null @@ -1,44 +0,0 @@ -# ArceOS-Hypervisor Supported GuestVMs - -## [NimbOS](https://github.com/arceos-hypervisor/nimbos) - -* Simple real time guest VM that can only be used for **single-core** testing -* It supports the x86_64, aarch64, and riscv64 architectures -* Configuration file templates at [nimbos-aarch64.toml](../configs/vms/nimbos-aarch64.toml), [nimbos-x86_64.toml](../configs/vms/nimbos-x86_64.toml), and [nimbos-riscv64.toml](../configs/vms/nimbos-riscv64.toml) -* Kernel binary images availble at [nimbos/releases](https://github.com/arceos-hypervisor/nimbos/releases/tag/v0.6) - -## [ArceOS](https://github.com/arceos-hypervisor/arceos) -* Used for **SMP** testing -* It supports the x86_64, aarch64, and riscv64 architectures -* Configuration file templates at [arceos-aarch64.toml](../configs/vms/arceos-aarch64.toml), [arceos-x86_64.toml](../configs/vms/arceos-x86_64.toml), and [arceos-riscv64.toml](../configs/vms/arceos-riscv64.toml) - -### Testcases - -* **Hypercall**: - * ArceOS HelloWorld application that can be used to test hypercall functionality is provided [here](https://github.com/arceos-hypervisor/arceos/blob/gvm_test/examples/helloworld/src/main.rs) - * Just run `make A=examples/helloworld ARCH=[x86_64|aarch64|riscv64] build` to get binary images - -* **virtio-pci-devices (PCI)**: - * Branch (pci_pio)[https://github.com/hky1999/arceos/tree/pci_pio] can be used for virtio-pci devices testing (PCI device probed through port I/O) - -## [axvm-bios](https://github.com/arceos-hypervisor/axvm-bios-x86) - -* A extremely simple bios for x86_64 guests -* It can act as a bootloader for NimbOS and ArceOS -* Binary product available at [here](https://github.com/arceos-hypervisor/axvm-bios-x86/releases/download/v0.1/axvm-bios.bin) - -# ArceOS-Hypervisor in RK3588 board -## How to run ArceOS on rk3588 -1. Prepare your kernal file `linux-rk3588-aarch64.bin` and DTB file `rk3588.dtb`. -2. Set the kernel path and DTB path in the configuration file `configs/vms/linux-rk3588-aarch64.toml`. - ```toml - image_location = "memory" - kernel_path = "/path/to/linux-rk3588-aarch64.bin" - dtb_path = "/path/to/rk3588.dtb" - ``` -3. Use Command `make A=(pwd) ARCH=aarch64 VM_CONFIGS=configs/vms/linux-rk3588-aarch64.toml kernel` to build the kernel image `boot.img`. -4. Download the [RKDevTool](https://download.t-firefly.com/product/Board/RK3588/Tool/Window/RKDevTool_Release_v3.31.zip). - >This tool has only been tested on [Pji's](https://www.pji.net.cn/) Electronic Control Unit of RK3588. Other RK3588 development boards require independent testing. -5. Set the path of `boot.img` in **boot** and connect the RK3588 board. -6. Press the `Run` button to flash the image to the RK3588 board. -![RKDevTool](./figures/RKDevTool3.3.png) \ No newline at end of file diff --git a/doc/README.md b/doc/README.md deleted file mode 100644 index 8c4c8144..00000000 --- a/doc/README.md +++ /dev/null @@ -1,145 +0,0 @@ -# Axvisor Architecture Overview - -About the overall architecture of Axvisor (the [main repo](https://github.com/arceos-hypervisor/axvisor) and [all components repos](https://github.com/arceos-hypervisor/)), -a unified modular hypervisor based on [ArceOS](https://github.com/arceos-org/arceos). - -The hypervisor mainly consists of the VMM (Virtual Machine Monitor) app named `axvisor` (the very repo you are looking at) and modules/crates responsible for implementing virtualization functions (e.g., `axvm`, `axvcpu`, `axdevice`, etc., which are in separate repos under the [arceos-hypervisor](https://github.com/arceos-hypervisor/) organization). - -## Design Goal - -This project originated from the [discussion/13](https://github.com/orgs/rcore-os/discussions/13) of [rCore-OS](https://github.com/rcore-os) community. - -In general, this project hopes to build a modular hypervisor that supports multiple architectures based on the basic OS functions provided by ArceOS unikernel through add several virtualization support modules/crates. - -We hope to make the hypervisor as modular as possible and minimize modifications to the arceos kernel code while maximizing the reuse of codes across different architectures. - -## Components - -Axvisor runs as an ArceOS app, mainly composed of the following independent components: - -(The definitions of ArceOS crates and modules can be seen in [ArceOS/doc/README.md](https://github.com/arceos-org/arceos/blob/main/doc/README.md)) - -### The App `axvisor` - -A user app of ArceOS, which is: -* completely architecture-independent, -* main entry point of the hypervisor, and -* responsible for VM management (configuration & runtime). - -**Note that we aim to consolidate all dependencies on ArceOS within the vmm-app.** Currently, the modules from ArceOS that the vmm-app depends on include: -* [axstd](https://github.com/arceos-hypervisor/arceos/tree/vmm/ulib/axstd): a standard dependency interface for ArceOS's user app. -* [axhal](https://github.com/arceos-hypervisor/arceos/tree/vmm/modules/axhal): for OS-related functions, including memory management, clock operations, and more. -* [axtask](https://github.com/arceos-org/arceos/tree/monolithic/modules/axtask): for the scheduling of vCPUs. - -### Modules - -* [axvm](https://github.com/arceos-hypervisor/axvm): responsible for **resource management** within each VM. - * partially architecture-independent. - * resources include: - * vcpu: [axvcpu](https://github.com/arceos-hypervisor/axvcpu) list. - * memory: [axaddrspace](https://github.com/arceos-hypervisor/axaddrspace) for guest memory management. - * device: [axdevice](https://github.com/arceos-hypervisor/axdevice) list. - -* [axvcpu](https://github.com/arceos-hypervisor/axvcpu): providing CPU virtualization support. - * highly architecture-dependent. - * stores exception context frame of different architecture. - * basic scheduling item. - * arch-specific vcpu implementations need to be separated into separate crates. - -* [axaddrspace](https://github.com/arceos-hypervisor/axaddrspace). - * architecture-independent. - * responsible for managing and mapping the guest VM's second-stage address space (GPA -> HPA). - -* [axdevice](https://github.com/arceos-hypervisor/axdevice): providing device emulation support. - * partially architecture-independent. - * different emulated device implementations need to be separated into separate crates. - -### Crates - -`crates` includes implementations of VCpus for different architectures, various emulated devices, and other utilities. - -## Dependency diagram - -![](figures/arceos-hv-architecture.svg) - -Since modules/crates used for virtualization functionality in the ArceOS-Hypervisor architecture need to call OS-related resource management interfaces, while we aim to consolidate all OS-related dependencies within the vmm-app. - -Various modules/crates will achieve dependency injection through Rust traits. - -### axvm - -The axvm crate defines the `AxVMHal trait`, which is a combination of generic types defined by `axaddrspace`, `axvcpu`, and `axdevice`. The `vmm-app` needs to implement the `AxVMHal` trait for `axvm` by calling system interfaces provided by ArceOS (or other OSs). - - -### axvcpu - -Typically, `axvcpu` focuses on CPU virtualization support across different architectures, including managing registers for guest VM CPU context and virtualizing hardware abstractions, which generally does not depend on OS functionalities. - -However, for the x86 architecture, VMX requires allocating physical page frames for managing VMX regions (such as VMCS regions), which depends on OS-related memory allocation APIs. -This can be handled by importing the `PagingHandler` generic type, or passing pre-allocated physical page frames as parameters in the vCPU constructor. - -### axaddrspace - -The `struct AddrSpace` in `axaddrspace` uses a generic type parameter `` constrained by the `PagingHandler trait` from [`page_table_multiarch`](https://crates.io/crates/page_table_multiarch). - -While `PagingHandler` is an associated type of `AxVMHal trait`. - -### axdevice - -`axdevice` depends on `axaddrspace` to handle the guest request's parsing process in device emulation. -For example, when handling a Virtio request, the virtio-device needs to translate the accessed GPA into HVA and to perform subsequent operations. - -Additionally, axdevice depends on certain interfaces provided by the VMM to perform operations like interrupt injection and inter-VM communication. - -## Example about how we achieve dependency injection - -Taking [`axaddrspace`](https://github.com/arceos-hypervisor/axaddrspace) for an example, its [`AddrSpace`](https://github.com/arceos-hypervisor/axaddrspace/blob/d377e5aa4eb06afa50a3a901ec3239559be1eb51/src/address_space.rs#L16C12-L16C21) represents memory regions and two-stage address mapping for guest VM, which relies on a generic type `PagingHandler` for page table related stuff. - -```Rust -/// The virtual memory address space. -pub struct AddrSpace { - va_range: VirtAddrRange, - areas: MemorySet, Backend>, - pt: PageTable, -} -``` - -`axaddrspace` is owned and managed by `axvm`'s `AxVM` structure, which replies on `AxVMHal` trait ( defined in `axvm`'s [hal.rs](https://github.com/arceos-hypervisor/axvm/blob/master/src/hal.rs) ) . - -Indeed, `PagingHandler` is a associate type of `AxVMHal` trait. - -```Rust -/// The interfaces which the underlying software (kernel or hypervisor) must implement. -pub trait AxVMHal: Sized { - type PagingHandler: page_table_multiarch::PagingHandler; - /// Converts a virtual address to the corresponding physical address. - fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr; - /// Current time in nanoseconds. - fn current_time_nanos() -> u64; - // ... -} -``` - -While `AxVMHal` is implemented by `AxVMHalImpl` in vmm-app, which rely on `PagingHandlerImpl` from `ArceOS`'s `axhal` module to implement its associate type `PagingHandler`. - -```Rust -pub struct AxVMHalImpl; - -impl AxVMHal for AxVMHalImpl { - type PagingHandler = axhal::paging::PagingHandlerImpl; - fn virt_to_phys(vaddr: VirtAddr) -> PhysAddr { - axhal::mem::virt_to_phys(vaddr) - } - fn current_time_nanos() -> u64 { - axhal::time::monotonic_time_nanos() - } - // ... -} -``` - -So, current design achieve dependency injection through Rust's generic type (`Trait`) and its associate type mechanism. - -For other virtualization-related modules/crates such as `axvcpu`, `axdevice`, etc., -we also want them to expose well-designed generics, and to converge these carefully crafted generics as subtraits or associated types within the `AxVmHal trait` of `axvm` (since `axvm` is reponsible for VM resource management). - -Ultimately, the `vmm-app` layer will call the relevant functionalities of `ArceOS` to implement them. \ No newline at end of file diff --git a/doc/SMP.md b/doc/SMP.md deleted file mode 100644 index 85fc9686..00000000 --- a/doc/SMP.md +++ /dev/null @@ -1,78 +0,0 @@ -# About SMP support in ArceOS-Hypervisor - -## How to boot Starry and ArceOS on different cores currently - -* Note that Starry and ArceOS themselves are all configured to run on a single core. -* only tested in x86_64 -* refer to [README.md](../README.md) for the preparation of `disk.img`. - -### Guest VM images and configs - -* ArceOS binary image - * repo: https://github.com/arceos-hypervisor/arceos/tree/gvm_sleep - * build: - * `make A=examples/helloworld build` - * copy image: - * `sudo cp /PATH/TO/arceos/examples/helloworld/helloworld_x86_64-qemu-q35.bin DISK/MOUNT/ON/tmp/arceos-x86-sleep.bin` - * config file for vmm available at [arceos-x86_64-sleep.toml](../configs/vms/arceos-x86_64-sleep.toml) - * Note: ArceOS use COM1 at **0x2f8** for serial output. - -* Starry binary image - * repo: https://github.com/arceos-org/starry-next/tree/tick_loop - * build: - * `./scripts/get_deps.sh` - * `make user_apps` - * `make ARCH=x86_64 build` - * copy image: - * `sudo cp /PATH/TO/starry-next/starry-next_x86_64-qemu-q35.bin DISK/MOUNT/ON/tmp/starry-x86_64.bin` - * config file for vmm available at [starry-x86_64.toml](../configs/vms/starry-x86_64.toml) - -### How to run - -* open first terminal - * `make ARCH=x86_64 ACCEL=y VM_CONFIGS=configs/vms/arceos-x86_64-sleep.toml:configs/vms/starry-x86_64.toml SMP=2 SECOND_SERIAL=y run` - * ArceOS-hypervisor itself and Starry-next will print to this terminal. - * `SECOND_SERIAL=y` will make qemu open a second serial port and listen on the socket interface from localhost constrained by the `TELNET_PORT` variable (default is 4321, currently only valid under `qemu_system_x86_64`) - ```bash - qemu-system-x86_64: -serial telnet:localhost:4321,server: info: QEMU waiting for connection on: disconnected:telnet:127.0.0.1:4321,server=on - ``` - -* open another terminal - * `telnet localhost 4321` - * ArceOS as guest VM will print to this terminal. - -## How to boot a guest OS with SMP support - -Currently, the arceos-hypervisor supports booting a guest VM configured with multiple cores (vCPUs). - -> Due to the lack of interrupt virtualization support in this project, each vCPU is currently pinned to a specific physical core. -> Once interrupt virtualization is supported, flexible many-to-many scheduling between vCPUs and physical cores will be enabled. - -### Guest VM images and configs - -Refer to [GuestVMs.md](./GuestVMs.md) for available guest VMs. - -[arceos-aarch64-smp.toml](../configs/vms/arceos-aarch64-smp.toml) and [arceos-riscv64-smp.toml](../configs/vms/arceos-riscv64-smp.toml) provide templates for configuring multiple vCPUs for a guest VM. - -Key configuration options include: -* `cpu_num`: Specifies the number of vCPUs required by the guest VM. -* `phys_cpu_ids`: Represents the physical CPU IDs from the guest VM’s perspective. Due to certain hardware platform requirements with clustered CPU designs, physical CPU IDs may be non-contiguous. This information can be retrieved from the DTB. -* `phys_cpu_sets`: Defines the affinity bitmap for each vCPU, binding it to specific physical CPUs. - * For example, in an SMP configuration with `cpu_num = 2`, if the `phys_cpu_set` for a particular vCPU is set to 0x1 (0b01), that vCPU will only run on physical core 0. If set to 0x3 (0b11), it could be scheduled on either core 0 or core 1. If set to 0x8 (0b1000), it will result in an error due to exceeding the available physical cores. - - Example configuration: - - ```toml - cpu_num = 4 - phys_cpu_ids = [0x00, 0x100, 0x200, 0x300] - phys_cpu_sets = [0x1, 0x2, 0xC, 0xC] - ``` - * In this example, the guest VM is configured with 4 vCPUs. The physical CPU IDs for the vCPUs are 0x00, 0x100, 0x200, and 0x300, respectively. The first vCPU is fixed to run on physical core 0, the second on physical core 1, while the third and fourth vCPUs can be scheduled on either physical core 2 or core 3. - -### How to run - -* example command - - ```bash - make ARCH=aarch64 VM_CONFIGS=configs/vms/arceos-aarch64-smp.toml SMP=2 run - ``` \ No newline at end of file diff --git a/doc/figures/RKDevTool3.3.png b/doc/figures/RKDevTool3.3.png deleted file mode 100644 index d390f421..00000000 Binary files a/doc/figures/RKDevTool3.3.png and /dev/null differ diff --git a/doc/figures/arceos-hv-architecture.svg b/doc/figures/arceos-hv-architecture.svg deleted file mode 100644 index bd1bf70e..00000000 --- a/doc/figures/arceos-hv-architecture.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
vmm-app
axstd
axhal
axtask
axvm
axvcpu
axaddrspace
axdevice
ArceOS modules
arm-vcpu
x86-vcpu-vmx
riscv-vcpu
arm-vgic
virtio-devices
x86-vlapic
...
OS-independent crates
OS-independent modules
\ No newline at end of file diff --git a/doc/shell.md b/doc/shell.md new file mode 100644 index 00000000..2fb7afa9 --- /dev/null +++ b/doc/shell.md @@ -0,0 +1,379 @@ +# AxVisor Shell 模块详细介绍 + +## 概述 + +AxVisor Shell 模块是 AxVisor 虚拟化管理器中的一个重要组件,为用户提供了一个功能丰富的交互式命令行界面。该模块基于 Rust 语言实现,具有完整的命令解析、历史记录、终端控制和虚拟机管理功能。 + +``` +┌─────────────────────────────────────────────┐ +│ Shell Interface Layer │ +│ ┌─────────────┐ ┌─────────────┐ │ +│ │ Interactive │ │ Command CLI │ │ +│ │ Shell │ │ Parser │ │ +│ └─────────────┘ └─────────────┘ │ +├─────────────────────────────────────────────┤ +│ VM Management Facade │ +│ ┌─────────────┐ ┌──────────────────┐ │ +│ │ Controller │ │ Query & Monitor │ │ +│ └─────────────┘ └──────────────────┘ │ +├─────────────────────────────────────────────┤ +│ Existing VMM Components │ +│ VMList │ VCpu │ IVC │ Timer │ Config │ │ +└─────────────────────────────────────────────┘ +``` + +## 模块架构 + +### 目录结构 +``` +src/shell/ +├── mod.rs # 主模块,实现交互式shell界面 +└── command/ + ├── mod.rs # 命令框架和解析器 + ├── base.rs # 基础Unix命令实现 + ├── vm.rs # 虚拟机管理命令 + └── history.rs # 命令历史记录管理 +``` + +## 核心组件 + +### 1. 交互式Shell界面 (mod.rs) + +#### 主要功能 +- **实时字符输入处理**: 支持逐字符读取和处理用户输入 +- **光标控制**: 支持左右箭头键移动光标位置 +- **行编辑功能**: 支持删除、插入字符等基本编辑操作 +- **历史记录导航**: 通过上下箭头键浏览命令历史 +- **转义序列处理**: 支持部分ANSI转义序列和特殊键处理 + +#### 关键特性 +```rust +const MAX_LINE_LEN: usize = 256; // 最大命令行长度 + +enum InputState { + Normal, // 正常输入状态 + Escape, // ESC键按下状态 + EscapeSeq, // 转义序列处理状态 +} +``` + +#### 支持的按键操作 +- **回车键 (CR/LF)**: 执行当前命令 +- **退格键 (BS/DEL)**: 删除光标前的字符 +- **ESC序列**: 处理箭头键和功能键 +- **上/下箭头**: 浏览命令历史 +- **左/右箭头**: 移动光标位置 + +### 2. 命令框架和解析器 (command/mod.rs) + +#### 命令树结构 +采用基于树状结构的命令系统,支持主命令和子命令的层次化组织: + +```rust +#[derive(Debug, Clone)] +pub struct CommandNode { + handler: Option, // 命令处理函数 + subcommands: BTreeMap, // 子命令映射 + description: &'static str, // 命令描述 + usage: Option<&'static str>, // 使用说明 + log_level: log::LevelFilter, // 日志级别 + options: Vec, // 命令选项 + flags: Vec, // 命令标志 +} +``` + +#### 命令解析功能 +- **智能分词**: 支持引号包围的参数和转义字符 +- **选项解析**: 支持短选项(-x)和长选项(--option) +- **参数验证**: 自动验证必需选项和参数格式 +- **错误处理**: 详细的错误信息和使用提示 + +#### 解析错误类型 +```rust +pub enum ParseError { + UnknownCommand(String), // 未知命令 + UnknownOption(String), // 未知选项 + MissingValue(String), // 缺少参数值 + MissingRequiredOption(String), // 缺少必需选项 + NoHandler(String), // 没有处理函数 +} +``` + +### 3. 基础Unix命令 (command/base.rs) + +实现了部分Unix风格命令,包括: + +#### 文件系统操作命令 +- **ls**: 列出目录内容,支持 `-l`(详细信息) 和 `-a`(显示隐藏文件) 选项 +- **cat**: 显示文件内容,支持多文件连接输出 +- **mkdir**: 创建目录,支持 `-p`(创建父目录) 选项 +- **rm**: 删除文件和目录,支持 `-r`(递归)、`-f`(强制)、`-d`(删除空目录) 选项 +- **cp**: 复制文件和目录,支持 `-r`(递归复制) 选项 +- **mv**: 移动/重命名文件和目录 +- **touch**: 创建空文件 + +#### 系统信息命令 +- **pwd**: 显示当前工作目录 +- **cd**: 切换目录 +- **uname**: 显示系统信息,支持 `-a`(全部信息)、`-s`(内核名)、`-m`(架构) 选项 +- **echo**: 输出文本,支持 `-n`(不换行) 选项和文件重定向 + +#### 系统控制命令 +- **exit**: 退出shell,支持指定退出码 +- **log**: 控制日志级别 (off/error/warn/info/debug/trace) **有计划实现** + +#### 文件权限显示 +实现了完整的Unix风格文件权限显示: +```rust +fn file_type_to_char(ty: FileType) -> char { + match ty { + is_dir() => 'd', + is_file() => '-', + is_symlink() => 'l', + is_char_device() => 'c', + is_block_device() => 'b', + is_socket() => 's', + is_fifo() => 'p', + _ => '?' + } +} +``` + +### 4. 虚拟机管理命令 (command/vm.rs) + +提供完整的虚拟机生命周期管理功能: + +#### 主要子命令 +- **vm create**: 从配置文件创建虚拟机 +- **vm start**: 启动虚拟机(支持单个或全部) +- **vm stop**: 停止虚拟机,支持强制停止 +- **vm restart**: 重启虚拟机 +- **vm delete**: 删除虚拟机,支持数据保留选项 +- **vm list**: 列出虚拟机,支持JSON格式输出 +- **vm show**: 显示虚拟机详细信息 +- **vm status**: 显示虚拟机状态,支持实时监控 + +#### 功能特性 +```rust +// 虚拟机状态显示 +let state = if vm.running() { + "🟢 running" +} else if vm.shutting_down() { + "🟡 stopping" +} else { + "🔴 stopped" +}; +``` + +#### 详细信息显示 +- **配置信息**: BSP/AP入口点、中断模式、直通设备、模拟设备 +- **资源统计**: 内存区域、VCPU数量、设备数量 +- **运行状态**: VCPU状态分布、CPU亲和性设置 + +#### 支持的选项和标志 +- `--all`: 显示所有虚拟机(包括已停止的) +- `--format json`: JSON格式输出 +- `--config`: 显示配置信息 +- `--stats`: 显示统计信息 +- `--force`: 强制操作 +- `--detach`: 后台运行 +- `--watch`: 实时监控 + +### 5. 命令历史管理 (command/history.rs) + +#### 核心功能 +```rust +pub struct CommandHistory { + history: Vec, // 历史命令列表 + current_index: usize, // 当前索引位置 + max_size: usize, // 最大历史记录数 +} +``` + +#### 关键特性 +- **去重处理**: 避免连续重复命令 +- **循环缓冲**: 超出最大容量时自动删除最旧记录 +- **导航功能**: 支持前进/后退浏览 +- **空命令过滤**: 自动忽略空白命令 + +#### 终端控制 +```rust +pub fn clear_line_and_redraw( + stdout: &mut dyn Write, + prompt: &str, + content: &str, + cursor_pos: usize, +) { + write!(stdout, "\r"); // 回到行首 + write!(stdout, "\x1b[2K"); // 清除整行 + write!(stdout, "{}{}", prompt, content); // 重绘内容 + // 调整光标位置 + if cursor_pos < content.len() { + write!(stdout, "\x1b[{}D", content.len() - cursor_pos); + } +} +``` + +## 内置命令 + +### 系统级内置命令 +- **help**: 显示可用命令列表 +- **help ``**: 显示特定命令的详细帮助 +- **clear**: 清屏 (发送ANSI清屏序列) +- **exit/quit**: 退出shell + +### 命令提示符 +```rust +fn print_prompt() { + print!("axvisor:{}$ ", current_directory); +} +``` + +## 扩展性 + +### 添加新命令 + +1. 在对应的模块中实现命令处理函数 +2. 定义命令节点和选项/标志 +3. 在 `build_command_tree()` 中注册命令 + +### 命令定义示例 + +```rust +tree.insert( + "mycommand".to_string(), + CommandNode::new("My custom command") + .with_handler(my_command_handler) + .with_usage("mycommand [OPTIONS] ") + .with_option( + OptionDef::new("config", "Config file path") + .with_short('c') + .with_long("config") + .required() + ) + .with_flag( + FlagDef::new("verbose", "Verbose output") + .with_short('v') + .with_long("verbose") + ), +); +``` + +# 使用说明 + +## 启用Shell功能 + +AxVisor Shell模块需要启用特定的feature才能使用: + +### 必需的Features + +编译时需要启用 `fs` feature 以及对应的文件系统类型: + +#### 基础Shell功能 + +```bash +# 启用Shell基础功能 +--features fs +``` + +#### 文件系统支持 + +根据使用的文件系统类型选择对应的feature,默认为`fatfs`: + +```bash +# FAT32文件系统支持 +./axvisor.sh run --features fs --arceos-features "fatfs" + +# EXT4文件系统支持 +./axvisor.sh run --arceos-features "fs,ext4fs" + +``` + +#### 完整示例 + +```bash +# 使用FAT32文件系统运行AxVisor Shell +./axvisor.sh run --plat aarch64-generic --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml --features fs,ept-level-4 --arceos-features fatfs --arceos-args DISK_IMG=disk-aarch64.img,BUS=mmio,BLK=y,MEM=8g + +# 使用EXT4文件系统运行AxVisor Shell +./axvisor.sh run --plat aarch64-generic --vmconfigs configs/vms/nimbos-aarch64-qemu-smp1.toml --features fs,ept-level-4 --arceos-features ext4fs --arceos-args DISK_IMG=disk-aarch64.img,BUS=mmio,BLK=y,MEM=8g +``` + +### 配置说明 + +Shell模块通过条件编译控制: +```rust +#[cfg(feature = "fs")] +mod shell; + +#[cfg(feature = "fs")] +shell::console_init(); +``` + +只有当启用 `fs` feature时,Shell模块才会被编译和启动。 + +## 快速开始 + +启动AxVisor后会自动进入Shell界面: +``` +axvisor:/$ +``` + +### 基本操作 +- `help` - 查看所有命令 +- `help ` - 查看特定命令帮助 +- `clear` - 清屏 +- `exit` - 退出 + +### 键盘快捷键 +- **上/下箭头**: 浏览命令历史 +- **左/右箭头**: 移动光标 +- **退格键**: 删除字符 + +## 常用命令 + +### 文件操作 +```bash +ls -la # 列出文件(详细信息+隐藏文件) +cat file.txt # 查看文件内容 +mkdir -p dir/subdir # 创建目录 +cp -r source dest # 复制文件/目录 +mv old new # 移动/重命名 +rm -rf path # 删除文件/目录 +touch file.txt # 创建空文件 +``` + +### 虚拟机管理 +```bash +vm list -a # 列出所有虚拟机 +vm create config.toml # 创建虚拟机 +vm start 1 # 启动VM(ID=1) +vm stop -f 1 # 强制停止VM +vm status 1 # 查看VM状态 +vm show -c 1 # 查看VM配置 +``` + +### 系统信息 +```bash +pwd # 当前目录 +uname -a # 系统信息 +``` + +## 典型工作流 + +```bash +# 1. 检查环境 +ls -la + +# 2. 创建并启动虚拟机 +vm create linux.toml +vm start 1 + +# 3. 监控状态 +vm status 1 + +# 4. 停止虚拟机 +vm stop 1 +``` + +更多详细信息请使用 `help ` 查看具体命令的使用方法。 diff --git a/doc/task.py-usage.md b/doc/task.py-usage.md new file mode 100644 index 00000000..5aab2b5f --- /dev/null +++ b/doc/task.py-usage.md @@ -0,0 +1,271 @@ +# task.py 使用说明 + +## 概述 + +`task.py` 是 Axvisor 项目的主要命令行工具,提供了项目的构建、运行和设置功能。它是一个统一的入口点,简化了开发和部署流程。 + +## 基本用法 + +```bash +# 激活虚拟环境 +source ./activate.sh + +./task.py [options] +``` + +## 可用命令 + +### 1. build - 构建项目 + +./scripts/task.py [options] +构建 Axvisor 项目。 + +```bash +./task.py build [options] +``` + +**功能**: + +- 自动设置 ArceOS 依赖(如果尚未设置) +./scripts/task.py build [options] +- 执行 make 构建 + +**示例**: + +```bash +# 使用 .hvconfig.toml 中的配置构建 +./scripts/task.py build + +# 指定平台构建 +./scripts/task.py build --plat aarch64-generic + +# 添加特性 +./scripts/task.py build --features "feature1,feature2" + +# 添加 ArceOS 特性 +./scripts/task.py build --arceos-features "page-alloc-64g,smp" + +# 添加 ArceOS Makefile 参数 +./scripts/task.py build --arceos-args "NET=y,BLK=y,MEM=8g,LOG=debug" + +# 指定 VM 配置文件 +./scripts/task.py build --vmconfigs "config1.toml,config2.toml" +``` + +### 3. run - 运行项目 + +构建并运行 Axvisor 项目。 + +```bash +./scripts/task.py run [options] +``` + +**功能**: + +- 首先执行构建步骤 +- 如果构建成功,则运行项目 +./scripts/task.py run + +**示例**: +./scripts/task.py run --plat aarch64-generic --arceos-args "MEM=4g,BUS=mmio,BLK=y,LOG=debug" --features "fs" + +```bash +# 使用 .hvconfig.toml 中的配置运行 +./task.py run + +# 使用特定配置运行,执行后会根据参数生成 .hvconfig.toml +./task.py run --plat aarch64-generic --arceos-args "MEM=4g,BUS=mmio,BLK=y,LOG=debug" --features "fs" +``` + +./scripts/task.py run --arceos-args "QEMU_ARGS=\"-smp 4 -m 2G -netdev user,id=net0\"" + +### 通用参数 + +以下参数适用于 `build` 和 `run` 命令: + +| 参数 | 类型 | 默认值 | 说明 | +|------|------|--------|------| +| `--plat` | string | aarch64-generic | 指定目标平台 | +| `--arch` | string | 自动检测 | 指定目标架构 | +| `--package` | string | 自动检测 | 指定平台包名 | +cp .hvconfig.dev.toml .hvconfig.toml && ./scripts/task.py build +cp .hvconfig.prod.toml .hvconfig.toml && ./scripts/task.py run +| `--features` | string | 无 | Hypervisor 特性(逗号分隔) | +| `--arceos-features` | string | 无 | ArceOS 特性(逗号分隔) | +| `--arceos-args` | string | 无 | ArceOS 参数(逗号分隔) | +| `--vmconfigs` | string | 无 | VM 配置文件路径(逗号分隔) | + +### 参数详解 + +#### --plat (平台) + +指定目标平台,系统会自动从 `platform/{plat}/axconfig.toml` 读取对应的架构和包配置。 + +```bash +--plat aarch64-generic +--plat x86-qemu-q35 +``` + +**架构特定的 QEMU 参数**: + +- `aarch64`: `-machine virtualization=on,gic-version=3` +- `x86_64`: `-enable-kvm -cpu host` +- `riscv64`: `-machine virt -cpu rv64` + +#### --features (Hypervisor 特性) + +指定 Hypervisor 的特性,多个特性用逗号分隔。 + +```bash +--features "fs" +``` + +#### --arceos-features (ArceOS 特性) + +指定 ArceOS 的特性,多个特性用逗号分隔。 + +```bash +--arceos-features "page-alloc-64g" +--arceos-features "smp,net,blk" +``` + +#### --arceos-args (ArceOS 参数) + +指定传递给 ArceOS 的参数,支持键值对和标志,多个参数用逗号分隔。 + +```bash +--arceos-args "NET=y,BLK=y,MEM=8g" +--arceos-args "SMP=4,LOG=debug" +``` + +#### --vmconfigs (VM 配置文件) + +指定 VM 配置文件的路径,多个文件用逗号分隔。 + +```bash +--vmconfigs "vm1.toml" +--vmconfigs "vm1.toml,vm2.toml,vm3.toml" +``` + +## 配置文件 + +`task.py` 支持通过 `.hvconfig.toml` 配置文件设置默认参数,命令行参数会覆盖配置文件中的设置。 + +### 配置文件示例 + +创建 `.hvconfig.toml` 文件: + +```toml +plat = "aarch64-generic" +arceos_args = [ "BUS=mmio", "BLK=y", "MEM=8g", "LOG=debug", "QEMU_ARGS=\"-machine gic-version=3\""] +vmconfigs = [ "tmp/arceos-aarch64.toml",] +``` + +### 配置优先级 + +1. **命令行参数** (最高优先级) +2. **配置文件** (.hvconfig.toml) + +## 高级用法 + +### 1. 自定义 QEMU 参数 + +```bash +# 添加自定义 QEMU 参数,会与架构特定参数合并 +./task.py run --arceos-args "QEMU_ARGS=\"-smp 4 -m 2G -netdev user,id=net0\"" + +# 对于 aarch64,最终的 QEMU_ARGS 会是: +# "-smp 4 -m 2G -netdev user,id=net0 -machine virtualization=on" +``` + +### 4. 批量配置 + +创建多个配置文件用于不同的开发场景: + +```bash +# 开发配置 +cp .hvconfig.toml .hvconfig.dev.toml +# 编辑 .hvconfig.dev.toml 添加调试参数 + +# 生产配置 +cp .hvconfig.toml .hvconfig.prod.toml +# 编辑 .hvconfig.prod.toml 优化性能参数 + +# 使用不同配置 +cp .hvconfig.dev.toml .hvconfig.toml && ./task.py build +cp .hvconfig.prod.toml .hvconfig.toml && ./task.py run +``` + +## 故障排除 + +### 常见问题 + +1. **构建失败** + + ```bash + # 清理并重新设置 + rm -rf .arceos + ./task.py clean + ./task.py build + ``` + +2. **平台配置找不到** + + ```text + 警告:平台配置文件 platform/xxx/axconfig.toml 不存在 + ``` + + - 检查平台名称是否正确 + - 确保对应的平台目录存在 + +3. **TOML 库缺失** + + ```text + 警告:需要安装 toml 库来读取配置文件 + ``` + + ```bash + pip install toml + ``` + +4. **权限问题** + + ```bash + # 确保 task.py 有执行权限 + chmod +x task.py + ``` + +### 调试技巧 + +1. **查看生成的构建命令** + + ```python + from scripts.config import AxvisorConfig + config = AxvisorConfig() + print(config.format_make_command("build")) + ``` + +2. **检查配置合并结果** + + ```python + from scripts.config import AxvisorConfig + config = AxvisorConfig(plat="aarch64-generic") + print(f"Platform: {config.plat}") + print(f"Architecture: {config.arch}") + print(f"Package: {config.package}") + print(f"Make vars: {config.get_make_variables()}") + ``` + +## 开发扩展 + +如果需要添加新的命令或功能: + +1. **添加新命令**: + - 在 `scripts/` 目录下创建新的 Python 模块 + - 在 `task.py` 中添加对应的子解析器 + - 实现 `main(args)` 函数 + +2. **添加新参数**: + - 修改 `scripts/config.py` 中的 `add_common_arguments` 函数 + - 更新 `AxvisorConfig` 类的字段 + - 更新相关的处理逻辑 diff --git a/platform/aarch64-generic/Cargo.toml b/platform/aarch64-generic/Cargo.toml new file mode 100644 index 00000000..f3afe069 --- /dev/null +++ b/platform/aarch64-generic/Cargo.toml @@ -0,0 +1,11 @@ +[package] +edition = "2024" +name = "axplat-aarch64-generic" +version = "0.1.0" + +[dependencies] +axplat-aarch64-dyn = {git = "https://github.com/arceos-hypervisor/axplat-aarch64-dyn", tag = "v0.2.0", features = ["irq", "smp", "hv"]} + +[build-dependencies] +serde = {version = "1.0", features = ["derive"]} +toml = "0.8" diff --git a/platform/aarch64-generic/axconfig.toml b/platform/aarch64-generic/axconfig.toml new file mode 100644 index 00000000..92ca23f8 --- /dev/null +++ b/platform/aarch64-generic/axconfig.toml @@ -0,0 +1,49 @@ +# Architecture identifier. +arch = "aarch64" # str +# Platform package. +package = "axplat-aarch64-generic" # str +# Platform identifier. +platform = "aarch64-generic" # str + +# +# Device specifications +# +[devices] +# MMIO regions with format (`base_paddr`, `size`). +mmio-regions = [] # [(uint, uint)] +# End PCI bus number. +pci-bus-end = 0 # uint +# Base physical address of the PCIe ECAM space. +pci-ecam-base = 0 # uint +# PCI device memory ranges. +pci-ranges = [] # [(uint, uint)] +# Timer interrupt num (PPI, physical timer). +timer-irq = 26 # uint +# VirtIO MMIO regions with format (`base_paddr`, `size`). +virtio-mmio-regions = [] # [(uint, uint)] + +# +# Platform configs +# +[plat] +# Platform family (deprecated). +family = "" # str +# Number of CPUs. +cpu-num = 1 # uint +# No need. +phys-memory-base = 0 # uint +# No need. +phys-memory-size = 0x0 # uint +# No need. +kernel-base-paddr = 0x0 # uint +# Base virtual address of the kernel image. +kernel-base-vaddr = "0x8000_0000_0000" # uint +# No need. +phys-virt-offset = "0" # uint +# Offset of bus address and phys address. some boards, the bus address is +# different from the physical address. +phys-bus-offset = 0 # uint +# Kernel address space base. +kernel-aspace-base = "0x0000_0000_0000" # uint +# Kernel address space size. +kernel-aspace-size = "0xffff_ffff_f000" # uint diff --git a/platform/aarch64-generic/src/lib.rs b/platform/aarch64-generic/src/lib.rs new file mode 100644 index 00000000..af4a84b1 --- /dev/null +++ b/platform/aarch64-generic/src/lib.rs @@ -0,0 +1,4 @@ +#![no_std] +#![cfg(target_arch = "aarch64")] + +extern crate axplat_aarch64_dyn; diff --git a/platform/aarch64-phytium-pi/Cargo.lock b/platform/aarch64-phytium-pi/Cargo.lock new file mode 100644 index 00000000..73e1dbc1 --- /dev/null +++ b/platform/aarch64-phytium-pi/Cargo.lock @@ -0,0 +1,3562 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aarch64-cpu" +version = "10.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a21cd0131c25c438e19cd6a774adf7e3f64f7f4d723022882facc2dee0f8bc9" +dependencies = [ + "tock-registers 0.9.0", +] + +[[package]] +name = "aarch64-cpu-ext" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52dad5cf7342926ce1c375ec680834e56dd3cdbe8b7adf8a6f99b2854cc52c17" +dependencies = [ + "aarch64-cpu", + "tock-registers 0.10.0", +] + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "anstream" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.2", +] + +[[package]] +name = "any-uart" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ce5f140efb4e707ea8f8e894d5f710500e373be1c4435d56b28d1fd1f843341" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "embedded-hal-nb", + "fdt-parser", + "x86_64", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "arm-gic-driver" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f251a1a74133f802b55eaf5e340107b0024457aa9b2ac3c72074501bfa8509a5" +dependencies = [ + "aarch64-cpu", + "bitflags 2.9.4", + "enum_dispatch", + "log", + "paste", + "rdif-intc", + "tock-registers 0.9.0", +] + +[[package]] +name = "as-any" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0f477b951e452a0b6b4a10b53ccd569042d1d01729b519e02074a9c0958a063" + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "axbsp-phytium-pi" +version = "0.1.0" +source = "git+https://github.com/drivercraft/axbsp.git#5dce480c619b6435135808c764aff818c4e891a1" +dependencies = [ + "axklib", + "axplat-aarch64-dyn", + "log", + "phytium-mci", + "rdif-block", + "rdrive", + "serde", + "spin 0.10.0", + "toml 0.8.23", +] + +[[package]] +name = "axconfig-gen" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf14099a96dbb925e39a44c4f25555f1e24516194452a84a943aa7eda62383d" +dependencies = [ + "clap", + "toml_edit", +] + +[[package]] +name = "axconfig-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86a6711b80fbd1dc4c1d8e2fb77a5de6fc8e2eb2b96bbd0420ca8af370eb74c" +dependencies = [ + "axconfig-gen", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "axcpu" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e09bc1235e3da45e942b50f47812f8397ad84cb490264bf914c65ac44e6f8b1d" +dependencies = [ + "aarch64-cpu", + "cfg-if", + "lazyinit", + "linkme", + "log", + "loongArch64", + "memory_addr", + "page_table_entry", + "page_table_multiarch", + "percpu", + "riscv", + "static_assertions", + "tock-registers 0.9.0", + "x86", + "x86_64", +] + +[[package]] +name = "axerrno" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66ccd41dd4ef364e2385901a5c2a3adea974a41eccb2529c1f24e4c8bc93d834" +dependencies = [ + "log", +] + +[[package]] +name = "axklib" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/arceos?branch=hypervisor#96049da415c9b8f54caea54fdd98f4d69ca01670" +dependencies = [ + "axerrno", + "memory_addr", + "trait-ffi", +] + +[[package]] +name = "axplat" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4de04c54b63bf2ca1ff202733d2516da49d7779649cdb2f9c4ecf22909e6810" +dependencies = [ + "axplat-macros", + "bitflags 2.9.4", + "const-str", + "crate_interface", + "handler_table", + "kspin", + "memory_addr", +] + +[[package]] +name = "axplat-aarch64-dyn" +version = "0.2.0" +source = "git+https://github.com/arceos-hypervisor/axplat-aarch64-dyn?tag=v0.2.0#bdde9eec2a91f8c64926a991cbf6a4b048446165" +dependencies = [ + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "arm-gic-driver", + "axconfig-macros", + "axcpu", + "axplat", + "fdt-parser", + "heapless", + "lazyinit", + "log", + "memory_addr", + "page_table_entry", + "paste", + "percpu", + "rdif-intc", + "rdrive", + "serde", + "somehal", + "spin 0.10.0", + "toml 0.8.23", +] + +[[package]] +name = "axplat-aarch64-phytium-pi" +version = "0.1.0" +dependencies = [ + "axbsp-phytium-pi", + "serde", + "toml 0.8.23", +] + +[[package]] +name = "axplat-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90dfaee06a112fe4f810c60af1a86bc080af2172185b491cacc307b84dff748" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "backtrace" +version = "0.3.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + +[[package]] +name = "bare-test-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e585a01076fee271c5aabcf36212acb349fb3e638561d842fffa8ca013f4fdd8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bindeps-simple" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759b427caeff86cb964340e5fee96d7b26a58853941d3a8e051f46be7b1fada3" +dependencies = [ + "anyhow", + "cargo_metadata", + "flate2", + "rand", + "reqwest 0.12.23", + "tar", +] + +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" + +[[package]] +name = "bumpalo" +version = "3.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" + +[[package]] +name = "bytemuck" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "camino" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1de8bc0aa9e9385ceb3bf0c152e3a9b9544f6c4a912c8ae504e80c1f0368603" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84982c6c0ae343635a3a4ee6dedef965513735c8b183caa7289fa6e27399ebd4" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-util-schemas" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e63d2780ac94487eb9f1fea7b0d56300abc9eb488800854ca217f102f5caccca" +dependencies = [ + "semver", + "serde", + "serde-untagged", + "serde-value", + "thiserror 1.0.69", + "toml 0.8.23", + "unicode-xid", + "url", +] + +[[package]] +name = "cargo_metadata" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f7835cfc6135093070e95eb2b53e5d9b5c403dc3a6be6040ee026270aa82502" +dependencies = [ + "camino", + "cargo-platform", + "cargo-util-schemas", + "semver", + "serde", + "serde_json", + "thiserror 2.0.16", +] + +[[package]] +name = "cc" +version = "1.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80f41ae168f955c12fb8960b057d70d0ca153fb83182b57d86380443527be7e9" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" + +[[package]] +name = "clap" +version = "4.5.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "clap_lex" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "const-default" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b396d1f76d455557e1218ec8066ae14bba60b4b36ecd55577ba979f5db7ecaa" + +[[package]] +name = "const-str" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451d0640545a0553814b4c646eb549343561618838e9b42495f466131fe3ad49" + +[[package]] +name = "convert_case" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "crate_interface" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70272a03a2cef15589bac05d3d15c023752f5f8f2da8be977d983a9d9e6250fb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "dma-api" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624f4a84cc1031cfceb56780b82570a785f6cfdcee4f34c06c4e8f1fba25c970" + +[[package]] +name = "dma-api" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2303b0bbacb23e7e1990fb31bed5cb46bc67aa4f307c03117b81bdee4d9f" +dependencies = [ + "aarch64-cpu-ext", + "cfg-if", + "spin 0.10.0", + "thiserror 2.0.16", +] + +[[package]] +name = "embedded-hal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89" + +[[package]] +name = "embedded-hal-nb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605" +dependencies = [ + "embedded-hal", + "nb", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "erased-serde" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "259d404d09818dec19332e31d94558aeb442fea04c817006456c24b5460bbd4b" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.1", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "fdt-parser" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ca123a5721e4a28ef60d6e1600cd0a33a9ab376c4b88de04c99bce757e458b" + +[[package]] +name = "filetime" +version = "0.2.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.60.2", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.7+wasi-0.2.4", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.1", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "handler_table" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702cb690200d6303c1e1992bc648f3f3bf9c1d6a27fcf50551c513d61f339c99" + +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" + +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.1", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.1", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http 1.3.1", + "hyper 1.7.0", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.32", + "native-tls", + "tokio", + "tokio-native-tls", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.7.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "hyper 1.7.0", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2 0.6.0", + "system-configuration 0.6.1", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "js-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "kasm-aarch64" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791dc7a2b079d81b8e3615521fccbd75c0c9f068b53f7d891a2e300222c7cada" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "kdef-pgtable" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7166660a78a4488f5f3269206242d3b76cd6b42d870f004898487ce16dba3f69" +dependencies = [ + "bitflags 2.9.4", + "prettyplease", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "kernel_guard" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307e6be468f3d6b6d895e191f63c11602e4e76575ecca68325d8c8dbebe2870e" +dependencies = [ + "cfg-if", + "crate_interface", +] + +[[package]] +name = "kspin" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d841fd3aeaa9a55871068f5c3ce48497a6dbcf14e20ca7784a9f68bfdb4c825" +dependencies = [ + "cfg-if", + "kernel_guard", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin 0.9.8", +] + +[[package]] +name = "lazyinit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f03abfebdaaf0fad16790237a0348baf84886d3ade460db13bae59e614a180" + +[[package]] +name = "lenient_semver" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de8de3f4f3754c280ce1c8c42ed8dd26a9c8385c2e5ad4ec5a77e774cea9c1ec" +dependencies = [ + "lenient_semver_parser", + "semver", +] + +[[package]] +name = "lenient_semver_parser" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f650c1d024ddc26b4bb79c3076b30030f2cf2b18292af698c81f7337a64d7d6" +dependencies = [ + "lenient_semver_version_builder", + "semver", +] + +[[package]] +name = "lenient_semver_version_builder" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9049f8ff49f75b946f95557148e70230499c8a642bf2d6528246afc7d0282d17" +dependencies = [ + "semver", +] + +[[package]] +name = "libc" +version = "0.2.176" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags 2.9.4", + "libc", + "redox_syscall", +] + +[[package]] +name = "linkme" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1b1703c00b2a6a70738920544aa51652532cacddfec2e162d2e29eae01e665c" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "linux-raw-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "loongArch64" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9f0d275c70310e2a9d2fc23250c5ac826a73fa828a5f256401f85c5c554283" +dependencies = [ + "bit_field", + "bitflags 2.9.4", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memory_addr" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d4054cba279515fa87761b101d857333ce06391dbe8f18a11347204a7111416" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", +] + +[[package]] +name = "native-tls" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nb" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" + +[[package]] +name = "num-align" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4b86e8ef968de2261141fc760ee57cae8fabb3a0e756b3390a4c4871b16c3d1" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "openssl" +version = "0.10.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "openssl-sys" +version = "0.9.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "ordered-float" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "page-table-generic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a302d085e35d9edfa3ec531475ed95eae8a92e7e47ce7a15bd4e9c5e74f7526" +dependencies = [ + "bitflags 2.9.4", + "log", + "num-align", + "thiserror 2.0.16", +] + +[[package]] +name = "page_table_entry" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba811ef8ca8fb33d776e128624cb4fe25c9804cab96f83b822d4322431e6dd5a" +dependencies = [ + "aarch64-cpu", + "bitflags 2.9.4", + "memory_addr", + "x86_64", +] + +[[package]] +name = "page_table_multiarch" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cb76e21ce462270afd83b331599d5b83f876c2a98c0a70382b20d73e1da6be" +dependencies = [ + "log", + "memory_addr", + "page_table_entry", + "riscv", + "x86", +] + +[[package]] +name = "parking_lot" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pci_types" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4325c6aa3cca3373503b1527e75756f9fbfe5fd76be4b4c8a143ee47430b8e0" +dependencies = [ + "bit_field", + "bitflags 2.9.4", +] + +[[package]] +name = "pcie" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225c81c0f672afbdd95e55abebe56541870e64e350eba9f7eabfb392112229ab" +dependencies = [ + "bare-test-macros", + "bit_field", + "bitflags 2.9.4", + "log", + "pci_types", + "rdif-pcie", + "thiserror 2.0.16", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "percpu" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e56c0c558952222967b592899f98765b48590e7bd7403bfd7075f73afc6ed6" +dependencies = [ + "cfg-if", + "percpu_macros", + "spin 0.9.8", + "x86", +] + +[[package]] +name = "percpu_macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9f4cc54a2e471ff72f1499461ba381ad4eae9cbd60d29c258545b995e406e0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "phytium-mci" +version = "0.1.0" +source = "git+https://github.com/YanQD/phytium-mci.git?rev=99c9ee5#99c9ee5f66490fbf41370be3b3d7a42cf4406b0c" +dependencies = [ + "bare-test-macros", + "bitflags 2.9.4", + "bytemuck", + "dma-api 0.2.2", + "lazy_static", + "log", + "nb", + "rlsf", + "spin 0.10.0", + "tock-registers 0.9.0", +] + +[[package]] +name = "pie-boot-if" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d979b0d1208dd8a57c5adb7d3c4e07bf15cbea3840123e864f6bfcb655c5e05" +dependencies = [ + "heapless", +] + +[[package]] +name = "pie-boot-loader-aarch64" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de8836eb8759cd65e70c73dc0f519345d8a734284e8e4cfc5889a6e445af9f09" +dependencies = [ + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "bitflags 2.9.4", + "fdt-parser", + "kasm-aarch64", + "kdef-pgtable", + "log", + "num-align", + "page-table-generic", + "pie-boot-if", + "prettyplease", + "quote", + "spin 0.10.0", + "syn 2.0.106", + "thiserror 2.0.16", +] + +[[package]] +name = "pie-boot-macros" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513f5ca7603771d7524bfb7e6ba8dded83d2e8ac02d46f15815e0c1144bca566" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.106", +] + +[[package]] +name = "proc-macro2" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", +] + +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "rdif-base" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8c32d8cbc18633a412130719b07d31135215d1715ac48fc3888ca835a811ba" +dependencies = [ + "as-any", + "async-trait", + "paste", + "rdif-def", + "thiserror 2.0.16", +] + +[[package]] +name = "rdif-block" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81ae1ba6c121eef2653dd2e0c88a209bb1d4d21e75e15cca71f19770ef327f81" +dependencies = [ + "cfg-if", + "dma-api 0.5.1", + "futures", + "rdif-base", + "spin_on", + "thiserror 2.0.16", +] + +[[package]] +name = "rdif-def" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c238eb44d86fabc99028adc973f896ce2202aeb6184cc8b89863f2d157d7ca06" +dependencies = [ + "thiserror 2.0.16", +] + +[[package]] +name = "rdif-intc" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170ec813e6cf4d1e5fa53fa8fed0fadc7aaab96683d4f1d44c602a6109931eb4" +dependencies = [ + "cfg-if", + "rdif-base", + "thiserror 2.0.16", +] + +[[package]] +name = "rdif-pcie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abf057b17ca5ead0ee41c485bf3c2781fd9bbf88cc678539fa361aa5db3ed8d" +dependencies = [ + "pci_types", + "rdif-base", + "thiserror 2.0.16", +] + +[[package]] +name = "rdrive" +version = "0.18.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27096bc91e156403ba3be9c7fef8d4379ea12d96d9d1725bdb197104a4fe1010" +dependencies = [ + "fdt-parser", + "log", + "paste", + "pcie", + "rdif-base", + "rdif-pcie", + "rdrive-macros", + "spin 0.10.0", + "thiserror 2.0.16", +] + +[[package]] +name = "rdrive-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab3105c9af32e901a2adc7d920b39ff8b6ee0f6f0b7dfdeaf18f306ec12606f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "redox_syscall" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +dependencies = [ + "bitflags 2.9.4", +] + +[[package]] +name = "release-dep" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d2060fec225361f815b40c6857b5722835318abdea0e20ee86b81cf1ac5c9a" +dependencies = [ + "anyhow", + "futures", + "reqwest 0.11.27", + "semver", + "serde", + "serde_json", + "tokio", + "tokio-util", +] + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-rustls", + "hyper-tls 0.6.0", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "riscv" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f1671c79a01a149fe000af2429ce9ccc8e58cdecda72672355d50e5536b363c" +dependencies = [ + "critical-section", + "embedded-hal", + "paste", + "riscv-macros", + "riscv-pac", +] + +[[package]] +name = "riscv-macros" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c4aa1ea1af6dcc83a61be12e8189f9b293c3ba5a487778a4cd89fb060fdbbc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "riscv-pac" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436" + +[[package]] +name = "rlsf" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222fb240c3286247ecdee6fa5341e7cdad0ffdf8e7e401d9937f2d58482a20bf" +dependencies = [ + "cfg-if", + "const-default", + "libc", + "svgbobdoc", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" + +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +dependencies = [ + "bitflags 2.9.4", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.1", +] + +[[package]] +name = "rustls" +version = "0.23.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pki-types" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.1", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.227" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80ece43fc6fbed4eb5392ab50c07334d3e577cbf40997ee896fe7af40bba4245" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +dependencies = [ + "ordered-float", + "serde", +] + +[[package]] +name = "serde_core" +version = "1.0.227" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a576275b607a2c86ea29e410193df32bc680303c82f31e275bbfcafe8b33be5" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.227" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e694923b8824cf0e9b382adf0f60d4e05f348f357b38833a3fa5ed7c2ede04" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "smccc" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c73e0ca8c566478040487791c9f488f86c5aec846ca1ab18484be8a1d8c55cd" +dependencies = [ + "thiserror 2.0.16", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "somehal" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9b180e1abae1127bd99ecee566c3906d8c0f854cb1c442b945afe911e6eb71" +dependencies = [ + "aarch64-cpu", + "aarch64-cpu-ext", + "any-uart", + "bindeps-simple", + "fdt-parser", + "futures", + "heapless", + "kasm-aarch64", + "kdef-pgtable", + "log", + "num-align", + "page-table-generic", + "pie-boot-if", + "pie-boot-loader-aarch64", + "pie-boot-macros", + "release-dep", + "serde", + "smccc", + "spin 0.10.0", + "toml 0.9.7", + "url", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spin" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spin_on" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076e103ed41b9864aa838287efe5f4e3a7a0362dd00671ae62a212e5e4612da2" +dependencies = [ + "pin-utils", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "svgbobdoc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2c04b93fc15d79b39c63218f15e3fdffaa4c227830686e3b7c5f41244eb3e50" +dependencies = [ + "base64 0.13.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-width", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.9.4", + "core-foundation", + "system-configuration-sys 0.6.0", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tar" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "tempfile" +version = "3.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +dependencies = [ + "fastrand", + "getrandom 0.3.3", + "once_cell", + "rustix", + "windows-sys 0.61.1", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +dependencies = [ + "thiserror-impl 2.0.16", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tock-registers" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b9e2fdb3a1e862c0661768b7ed25390811df1947a8acbfbefe09b47078d93c4" + +[[package]] +name = "tock-registers" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0293f99756f16ff352cc78c99673766a305bdb5ed7652e78df649e9967c885a" + +[[package]] +name = "tokio" +version = "1.47.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +dependencies = [ + "backtrace", + "bytes", + "io-uring", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "slab", + "socket2 0.6.0", + "tokio-macros", + "windows-sys 0.59.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f63835928ca123f1bef57abbcd23bb2ba0ac9ae1235f1e65bda0d06e7786bd" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_edit", +] + +[[package]] +name = "toml" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.0.2", + "toml_datetime 0.7.2", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.11", + "toml_write", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "toml_writer" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +dependencies = [ + "bitflags 2.9.4", + "bytes", + "futures-util", + "http 1.3.1", + "http-body 1.0.1", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "trait-ffi" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d49469ee333631b3130bec28965c47dcf0d4f3a792f8ed425dd036cf84be7" +dependencies = [ + "convert_case", + "lenient_semver", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "unicode-ident" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "volatile" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442887c63f2c839b346c192d047a7c87e73d0689c9157b00b53dcc27dd5ea793" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn 2.0.106", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + +[[package]] +name = "windows-registry" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +dependencies = [ + "windows-link 0.1.3", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.4", +] + +[[package]] +name = "windows-sys" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link 0.2.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +dependencies = [ + "windows-link 0.2.0", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "x86" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2781db97787217ad2a2845c396a5efe286f87467a5810836db6d74926e94a385" +dependencies = [ + "bit_field", + "bitflags 1.3.2", + "raw-cpuid", +] + +[[package]] +name = "x86_64" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f042214de98141e9c8706e8192b73f56494087cc55ebec28ce10f26c5c364ae" +dependencies = [ + "bit_field", + "bitflags 2.9.4", + "rustversion", + "volatile", +] + +[[package]] +name = "xattr" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" +dependencies = [ + "libc", + "rustix", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] diff --git a/platform/aarch64-phytium-pi/Cargo.toml b/platform/aarch64-phytium-pi/Cargo.toml new file mode 100644 index 00000000..071f6e31 --- /dev/null +++ b/platform/aarch64-phytium-pi/Cargo.toml @@ -0,0 +1,11 @@ +[package] +edition = "2024" +name = "axplat-aarch64-phytium-pi" +version = "0.1.0" + +[dependencies] +axbsp-phytium-pi = {git = "https://github.com/drivercraft/axbsp.git", features = ["irq", "smp", "hv"]} + +[build-dependencies] +serde = {version = "1.0", features = ["derive"]} +toml = "0.8" diff --git a/platform/aarch64-phytium-pi/axconfig.toml b/platform/aarch64-phytium-pi/axconfig.toml new file mode 100644 index 00000000..34282fc0 --- /dev/null +++ b/platform/aarch64-phytium-pi/axconfig.toml @@ -0,0 +1,49 @@ +# Architecture identifier. +arch = "aarch64" # str +# Platform package. +package = "axplat-aarch64-phytium-pi" # str +# Platform identifier. +platform = "aarch64-phytium-pi" # str + +# +# Device specifications +# +[devices] +# MMIO regions with format (`base_paddr`, `size`). +mmio-regions = [] # [(uint, uint)] +# End PCI bus number. +pci-bus-end = 0 # uint +# Base physical address of the PCIe ECAM space. +pci-ecam-base = 0 # uint +# PCI device memory ranges. +pci-ranges = [] # [(uint, uint)] +# Timer interrupt num (PPI, physical timer). +timer-irq = 26 # uint +# VirtIO MMIO regions with format (`base_paddr`, `size`). +virtio-mmio-regions = [] # [(uint, uint)] + +# +# Platform configs +# +[plat] +# Platform family (deprecated). +family = "" # str +# Number of CPUs. +cpu-num = 1 # uint +# No need. +phys-memory-base = 0 # uint +# No need. +phys-memory-size = 0x0 # uint +# No need. +kernel-base-paddr = 0x0 # uint +# Base virtual address of the kernel image. +kernel-base-vaddr = "0x8000_0000_0000" # uint +# No need. +phys-virt-offset = "0" # uint +# Offset of bus address and phys address. some boards, the bus address is +# different from the physical address. +phys-bus-offset = 0 # uint +# Kernel address space base. +kernel-aspace-base = "0x0000_0000_0000" # uint +# Kernel address space size. +kernel-aspace-size = "0xffff_ffff_f000" # uint diff --git a/platform/aarch64-phytium-pi/src/lib.rs b/platform/aarch64-phytium-pi/src/lib.rs new file mode 100644 index 00000000..4b59ee88 --- /dev/null +++ b/platform/aarch64-phytium-pi/src/lib.rs @@ -0,0 +1,4 @@ +#![no_std] +#![cfg(target_arch = "aarch64")] + +extern crate axbsp_phytium_pi; diff --git a/platform/aarch64-roc-rk3568-pc/Cargo.toml b/platform/aarch64-roc-rk3568-pc/Cargo.toml new file mode 100644 index 00000000..9a07d22f --- /dev/null +++ b/platform/aarch64-roc-rk3568-pc/Cargo.toml @@ -0,0 +1,11 @@ +[package] +edition = "2024" +name = "axplat-aarch64-roc-rk3568-pc" +version = "0.1.0" + +[dependencies] +axbsp-roc-rk3568-pc = {git = "https://github.com/drivercraft/axbsp.git", features = ["irq", "smp", "hv"]} + +[build-dependencies] +serde = {version = "1.0", features = ["derive"]} +toml = "0.8" diff --git a/platform/aarch64-roc-rk3568-pc/axconfig.toml b/platform/aarch64-roc-rk3568-pc/axconfig.toml new file mode 100644 index 00000000..8c7a9843 --- /dev/null +++ b/platform/aarch64-roc-rk3568-pc/axconfig.toml @@ -0,0 +1,49 @@ +# Architecture identifier. +arch = "aarch64" # str +# Platform package. +package = "axplat-aarch64-roc-rk3568-pc" # str +# Platform identifier. +platform = "aarch64-roc-rk3568-pc" # str + +# +# Device specifications +# +[devices] +# MMIO regions with format (`base_paddr`, `size`). +mmio-regions = [] # [(uint, uint)] +# End PCI bus number. +pci-bus-end = 0 # uint +# Base physical address of the PCIe ECAM space. +pci-ecam-base = 0 # uint +# PCI device memory ranges. +pci-ranges = [] # [(uint, uint)] +# Timer interrupt num (PPI, physical timer). +timer-irq = 26 # uint +# VirtIO MMIO regions with format (`base_paddr`, `size`). +virtio-mmio-regions = [] # [(uint, uint)] + +# +# Platform configs +# +[plat] +# Platform family (deprecated). +family = "" # str +# Number of CPUs. +cpu-num = 1 # uint +# No need. +phys-memory-base = 0 # uint +# No need. +phys-memory-size = 0x0 # uint +# No need. +kernel-base-paddr = 0x0 # uint +# Base virtual address of the kernel image. +kernel-base-vaddr = "0x8000_0000_0000" # uint +# No need. +phys-virt-offset = "0" # uint +# Offset of bus address and phys address. some boards, the bus address is +# different from the physical address. +phys-bus-offset = 0 # uint +# Kernel address space base. +kernel-aspace-base = "0x0000_0000_0000" # uint +# Kernel address space size. +kernel-aspace-size = "0xffff_ffff_f000" # uint diff --git a/platform/aarch64-roc-rk3568-pc/src/lib.rs b/platform/aarch64-roc-rk3568-pc/src/lib.rs new file mode 100644 index 00000000..77f603cc --- /dev/null +++ b/platform/aarch64-roc-rk3568-pc/src/lib.rs @@ -0,0 +1,4 @@ +#![no_std] +#![cfg(target_arch = "aarch64")] + +extern crate axbsp_roc_rk3568_pc; diff --git a/platform/x86-qemu-q35/Cargo.toml b/platform/x86-qemu-q35/Cargo.toml new file mode 100644 index 00000000..c3c1508a --- /dev/null +++ b/platform/x86-qemu-q35/Cargo.toml @@ -0,0 +1,12 @@ +[package] +edition = "2024" +name = "axplat-x86-qemu-q35" +version = "0.1.0" + +[features] +fp-simd = ["axplat-x86-pc/fp-simd"] +rtc = ["axplat-x86-pc/x86_rtc"] + +[dependencies] +axplat-x86-pc = {git = "https://github.com/arceos-hypervisor/axplat_crates.git", branch = "vmm", features=["irq", "smp"]} + diff --git a/configs/platforms/x86_64-qemu-q35.toml b/platform/x86-qemu-q35/axconfig.toml similarity index 78% rename from configs/platforms/x86_64-qemu-q35.toml rename to platform/x86-qemu-q35/axconfig.toml index b47b9d1e..4ed16f84 100644 --- a/configs/platforms/x86_64-qemu-q35.toml +++ b/platform/x86-qemu-q35/axconfig.toml @@ -1,15 +1,16 @@ # Architecture identifier. arch = "x86_64" # str # Platform identifier. -platform = "x86_64-qemu-q35" # str +platform = "x86-qemu-q35" # str +# Platform Package. +package = "axplat-x86-qemu-q35" # str # # Platform configs # [plat] -# Platform family. -family = "x86-pc" # str - +# Number of CPUs. +cpu-num = 1 # uint # Base address of the whole physical memory. phys-memory-base = 0 # uint # Size of the whole physical memory. (128M) @@ -28,24 +29,26 @@ phys-bus-offset = 0 # uint kernel-aspace-base = "0xffff_8000_0000_0000" # uint # Kernel address space size. kernel-aspace-size = "0x0000_7fff_ffff_f000" # uint +# Stack size on bootstrapping. (256K) +boot-stack-size = 0x40000 # uint # # Device specifications # [devices] # MMIO regions with format (`base_paddr`, `size`). -mmio-regions = [ +mmio-ranges = [ [0xb000_0000, 0x1000_0000], # PCI config space [0xfe00_0000, 0xc0_0000], # PCI devices - [0x7000000000, 0x4000], # PCI devices [0xfec0_0000, 0x1000], # IO APIC [0xfed0_0000, 0x1000], # HPET [0xfee0_0000, 0x1000], # Local APIC - [0x380000000000, 0x4000] # PCI devices + [0x70_0000_0000, 0x4000], # PCI devices + [0x3800_0000_0000, 0x4000] # PCI devices ] # [(uint, uint)] # VirtIO MMIO regions with format (`base_paddr`, `size`). -virtio-mmio-regions = [] # [(uint, uint)] +virtio-mmio-ranges = [] # [(uint, uint)] # Base physical address of the PCIe ECAM space (should read from ACPI 'MCFG' table). pci-ecam-base = 0xb000_0000 # uint # End PCI bus number. @@ -55,3 +58,5 @@ pci-ranges = [] # [(uint, uint)] # Timer interrupt frequencyin Hz. (4.0GHz) timer-frequency = 4_000_000_000 # uint +# Timer interrupt num. +timer-irq = 0xf0 # uint diff --git a/platform/x86-qemu-q35/src/lib.rs b/platform/x86-qemu-q35/src/lib.rs new file mode 100644 index 00000000..8a34a10b --- /dev/null +++ b/platform/x86-qemu-q35/src/lib.rs @@ -0,0 +1,4 @@ +#![no_std] +#![cfg(target_arch = "x86_64")] + +extern crate axplat_x86_pc; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7c587ea0..ff27a9aa 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] profile = "minimal" -channel = "nightly-2024-12-25" +channel = "nightly-2025-05-20" components = ["rust-src", "llvm-tools", "rustfmt", "clippy"] targets = ["x86_64-unknown-none", "riscv64gc-unknown-none-elf", "aarch64-unknown-none", "aarch64-unknown-none-softfloat"] diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 00000000..246db6f0 --- /dev/null +++ b/scripts/__init__.py @@ -0,0 +1 @@ +# scripts package diff --git a/scripts/auto_interrupt.sh b/scripts/auto_interrupt.sh new file mode 100755 index 00000000..2b09847b --- /dev/null +++ b/scripts/auto_interrupt.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + echo "Usage: $0 [arguments...]" + echo "Example: $0 ostool run uboot" + exit 1 +fi + +COMMAND=("$@") +echo "Executing command: ${COMMAND[*]}" + +"${COMMAND[@]}" 2>&1 | while IFS= read -r line; do + echo "$line" + + if [[ "$line" == *"[OK] Default guest initialized"* ]]; then + echo "Completion signal detected, exiting..." + + sleep 2 + + echo "Safely finding and killing QEMU processes..." + + # Get current script and parent process PIDs to avoid killing them + SCRIPT_PID=$$ + PARENT_PID=$PPID + + echo "Current script PID: $SCRIPT_PID" + echo "Parent process PID: $PARENT_PID" + + # Find QEMU processes, but exclude script-related processes + pgrep -f "qemu" 2>/dev/null | while read pid; do + # Check if it's a script-related process + if [ "$pid" != "$SCRIPT_PID" ] && [ "$pid" != "$PARENT_PID" ]; then + # Further check process command line + CMD=$(ps -p "$pid" -o cmd --no-headers 2>/dev/null) + if [[ "$CMD" == *"qemu-system"* ]]; then + echo "kill -9 $pid (QEMU system process)" + kill -9 "$pid" 2>/dev/null || true + else + echo "Skipping process $pid (not a QEMU system process): $CMD" + fi + else + echo "Skipping script-related process: $pid" + fi + done + + exit 0 + fi +done + +echo "Done" \ No newline at end of file diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100755 index 00000000..76e9bce7 --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,212 @@ +#!/bin/bash +# -*- coding: utf-8 -*- + +# Axvisor Bootstrap Script +# This script creates a Python virtual environment and installs task.py dependencies + +set -e # Exit on error + +# Colored output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +# Output helpers +info() { echo -e "${BLUE}ℹ${NC} $1"; } +success() { echo -e "${GREEN}✓${NC} $1"; } +warning() { echo -e "${YELLOW}⚠${NC} $1"; } +error() { echo -e "${RED}✗${NC} $1"; } + +# Get project root directory +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +cd "$PROJECT_ROOT" + +# If already inside a virtual environment, just update deps +if [[ -n "$VIRTUAL_ENV" ]]; then + info "Detected active virtual environment: $VIRTUAL_ENV" + + # Ensure requirements.txt exists + if [[ ! -f "scripts/requirements.txt" ]]; then + error "scripts/requirements.txt not found" + exit 1 + fi + + # Install / update dependencies + info "Updating Python dependencies..." + pip install -q -r scripts/requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple + success "Dependencies updated" + exit 0 +fi + +# Virtual environment and marker file +VENV_DIR="venv" +MARKER_FILE="$VENV_DIR/.bootstrapped" +REQUIREMENTS_FILE="scripts/requirements.txt" + +# Compute dependency hash +compute_dep_hash() { + local pyver + pyver=$(python3 --version 2>/dev/null || echo "unknown") + if [[ -f "$REQUIREMENTS_FILE" ]]; then + { + echo "$pyver" + grep -v '^#' "$REQUIREMENTS_FILE" | grep -v '^$' | sort + } | sha256sum | awk '{print $1}' + else + echo "$pyver-no-requirements" | sha256sum | awk '{print $1}' + fi +} + +# Decide if bootstrap is needed +check_bootstrap_needed() { + # Need bootstrap if venv directory missing + if [[ ! -d "$VENV_DIR" ]]; then + return 0 # need bootstrap + fi + + # Need bootstrap if marker file missing + if [[ ! -f "$MARKER_FILE" ]]; then + return 0 # need bootstrap + fi + + # Check dependency hash + local existing_hash current_hash + existing_hash=$(awk -F":" '/^hash:/ {print $2}' "$MARKER_FILE" 2>/dev/null | tr -d '[:space:]') || existing_hash="" + current_hash=$(compute_dep_hash) + + if [[ "$existing_hash" != "$current_hash" ]]; then + info "Dependency changes detected, re-bootstrap required" + return 0 # need bootstrap + fi + + # Ensure python executable exists in venv + if [[ ! -x "$VENV_DIR/bin/python3" ]]; then + warning "Python in virtual env not available, re-bootstrap required" + return 0 # need bootstrap + fi + + return 1 # bootstrap not needed +} +# Fast path: already bootstrapped +if ! check_bootstrap_needed; then + success "Bootstrap already done and dependencies unchanged, skipping" + exit 0 +fi + +info "Starting Python virtual environment setup..." + +# Check system dependencies +check_system_deps() { + info "Checking system dependencies..." + + # Check python3 exists + if ! command -v python3 >/dev/null 2>&1; then + error "python3 not found. Please install Python 3" + exit 1 + fi + + # Report Python version + local pyver + pyver=$(python3 --version 2>&1 | awk '{print $2}' | cut -d. -f1,2) + info "Detected Python version: $pyver" + + # Check venv module + if ! python3 -c "import venv" 2>/dev/null; then + error "python3-venv module not found" + echo "Install python3-venv via your package manager:" + echo " Ubuntu/Debian: sudo apt install python3-venv" + echo " CentOS/RHEL: sudo yum install python3-venv" + echo " Fedora: sudo dnf install python3-venv" + exit 1 + fi + + # Check requirements.txt exists + if [[ ! -f "$REQUIREMENTS_FILE" ]]; then + error "$REQUIREMENTS_FILE not found" + exit 1 + fi + + success "System dependency check passed" +} + +# Create virtual environment +setup_venv() { + info "Preparing virtual environment..." + + # Remove broken venv + if [[ -d "$VENV_DIR" ]] && [[ ! -x "$VENV_DIR/bin/python3" ]]; then + warning "Corrupted virtual environment detected, removing..." + rm -rf "$VENV_DIR" + fi + + # Create venv if missing + if [[ ! -d "$VENV_DIR" ]]; then + info "Creating new virtual environment..." + python3 -m venv "$VENV_DIR" + success "Virtual environment created" + else + info "Using existing virtual environment" + fi +} + +# Install dependencies +install_deps() { + info "Installing Python dependencies..." + + # 激活虚拟环境 + source "$VENV_DIR/bin/activate" + + # Upgrade pip (quiet) + python -m pip install -q --upgrade pip -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple + + # Install requirements + pip install -q -r "$REQUIREMENTS_FILE" -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple + + success "Dependencies installed" +} + +# Verify installation +verify_installation() { + info "Verifying installation..." + + # 测试 task.py + if source "$VENV_DIR/bin/activate" && python3 ./scripts/task.py --help >/dev/null 2>&1; then + success "task.py runs correctly" + else + error "task.py execution failed" + exit 1 + fi +} + +# Write completion marker +write_marker() { + local dep_hash + dep_hash=$(compute_dep_hash) + + cat > "$MARKER_FILE" < int: + """Build the project""" + print("Running build task...") + + # Get config file path + config_file_path = getattr(args, "config", ".hvconfig.toml") + # Check if config file exists + config_exists = os.path.exists(config_file_path) + + # Setup arceos dependency first + print("Setting up arceos dependency...") + if not setup_arceos(): + print("Failed to setup arceos, cannot build") + return 1 + + # Create config object + config: AxvisorConfig = create_config_from_args(args) + # Build make command + cmd = config.format_make_command("") + + print(f"Executing: {cmd}") + + try: + # Run make command + result = subprocess.run( + cmd, shell=True, check=True, env=config.get_subprocess_env() + ) + print("Build succeeded!") + + # If config file missing and CLI args meaningful, create the config file + if not config_exists: + print( + f"Detected missing {config_file_path}, creating config file from arguments..." + ) + if save_config_to_file(config, config_file_path): + print( + f"Config file created. Next time just run './task.py build -c {config_file_path}'" + ) + else: + print( + "Failed to create config file; you'll need to pass arguments again next run" + ) + + return 0 + except subprocess.CalledProcessError as e: + print(f"Build failed, exit code: {e.returncode}") + return e.returncode + except Exception as e: + print(f"Error during build: {e}") + return 1 diff --git a/scripts/clean.py b/scripts/clean.py new file mode 100644 index 00000000..d8ef62fb --- /dev/null +++ b/scripts/clean.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import subprocess +from .config import format_make_command_base +from .setup import setup_arceos + + +def main(args) -> int: + """Clean build artifacts""" + print("Running clean task...") + + # Setup arceos dependency first + print("Setting up arceos dependency...") + if not setup_arceos(): + print("Failed to setup arceos, cannot clean") + return 1 + + cmd = format_make_command_base() + + cmd.append("clean") + + # Build make command string + cmd = " ".join(cmd) + + print(f"Executing: {cmd}") + + try: + # Run make command + subprocess.run(cmd, shell=True, check=True) + print("Clean succeeded!") + return 0 + except subprocess.CalledProcessError as e: + print(f"Clean failed, exit code: {e.returncode}") + return e.returncode + except Exception as e: + print(f"Error during clean: {e}") + return 1 diff --git a/scripts/clippy.py b/scripts/clippy.py new file mode 100644 index 00000000..c7db4e37 --- /dev/null +++ b/scripts/clippy.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os +import subprocess +import sys +from typing import Optional, List +from .config import AxvisorConfig, create_config_from_args, format_make_command_base +from .setup import setup_arceos + +try: + # Use third-party `toml` package for parsing (keep behaviour simple) + import toml as _toml_impl # type: ignore +except Exception: + _toml_impl = None + + +def main(args) -> int: + """Run clippy lint checks""" + print("Running clippy task...") + + # First setup arceos dependency + print("Setting up arceos dependency...") + if not setup_arceos(): + print("Failed to setup arceos, cannot continue clippy") + return 1 + # Read root Cargo.toml and parse [features] + cargo_toml_path = os.path.join(os.getcwd(), "Cargo.toml") + if not os.path.exists(cargo_toml_path): + print(f"Not found {cargo_toml_path}, abort") + return 1 + # Parse Cargo.toml using third-party toml package + parsed = None + if _toml_impl is None: + print("Need python 'toml' package (pip install toml) to parse Cargo.toml") + return 1 + try: + with open(cargo_toml_path, "r", encoding="utf-8") as f: + parsed = _toml_impl.load(f) + except Exception as e: + print(f"Failed to parse Cargo.toml: {e}") + return 1 + + features_dict = parsed.get("features", {}) if isinstance(parsed, dict) else {} + all_features: List[str] = list(features_dict.keys()) + + # Collect features starting with plat- + plat_features = [f for f in all_features if f.startswith("plat-")] + # Non-plat features + non_plat_features = [f for f in all_features if not f.startswith("plat-")] + + if not plat_features: + print( + "No 'plat-' features found in Cargo.toml [features]; running single clippy pass with all features" + ) + features_arg = ",".join(all_features) if all_features else "" + cmd_parts = ["cargo", "clippy"] + if features_arg: + cmd_parts.extend(["--features", f'"{features_arg}"']) + cmd = " ".join(cmd_parts) + print(f"Executing: {cmd}") + try: + subprocess.run(cmd, shell=True, check=True) + print("Clippy finished successfully") + return 0 + except subprocess.CalledProcessError as e: + print(f"Clippy failed with exit code: {e.returncode}") + return e.returncode + except Exception as e: + print(f"Error while running clippy: {e}") + return 1 + + # Simple arch -> target triple map (extend as needed) + arch_target_map = { + "aarch64": "aarch64-unknown-none-softfloat", + "x86": "x86_64-unknown-none", + "x86_64": "x86_64-unknown-none", + "riscv64": "riscv64gc-unknown-none-elf", + "riscv": "riscv64gc-unknown-none-elf", + } + + any_failure = False + for plat in plat_features: + # Extract arch token from plat name (plat--...) + parts = plat.split("-") + arch_token = parts[1] if len(parts) > 1 else None + target = arch_target_map.get(arch_token) if arch_token else None + + # Build features: current plat + all non-plat ones (avoid enabling multiple plat features) + features_to_use = [plat] + non_plat_features + features_arg = ",".join(features_to_use) if features_to_use else "" + + cmd_parts = ["cargo", "clippy"] + if target: + cmd_parts.extend(["--target", target]) + if features_arg: + cmd_parts.extend(["--features", f'"{features_arg}"']) + + cmd_parts.extend( + [ + "--", + "-D", + "warnings", + ] + ) + + cmd = " ".join(cmd_parts) + print(f"Executing: {cmd}") + + try: + subprocess.run(cmd, shell=True, check=True) + print(f"{plat}: clippy finished successfully") + except subprocess.CalledProcessError as e: + print(f"{plat}: clippy failed, exit code: {e.returncode}") + any_failure = True + except Exception as e: + print(f"{plat}: error while running clippy: {e}") + any_failure = True + + return 1 if any_failure else 0 diff --git a/scripts/config.py b/scripts/config.py new file mode 100644 index 00000000..89d7ff4d --- /dev/null +++ b/scripts/config.py @@ -0,0 +1,453 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os +import argparse +from typing import Dict, List, Optional, Tuple, Any +from dataclasses import dataclass + + +@dataclass +class AxvisorConfig: + """Axvisor 配置类,存储所有合并后的配置参数""" + + # 基本配置 + plat: str = "aarch64-generic" + arch: Optional[str] = None + package: Optional[str] = None + features: List[str] = None + arceos_features: List[str] = None + arceos_args: List[str] = None + vmconfigs: List[str] = None + + def __post_init__(self): + """初始化后处理,确保列表字段不为 None""" + if self.features is None: + self.features = [] + if self.arceos_features is None: + self.arceos_features = [] + if self.arceos_args is None: + self.arceos_args = [] + if self.vmconfigs is None: + self.vmconfigs = [] + + def _process_disk_img_paths(self): + """处理 arceos_args 中的 DISK_IMG 参数,将相对路径转换为绝对路径""" + if not self.arceos_args: + return + + # 获取项目根目录(当前工作目录) + project_root = os.getcwd() + + # 处理每个参数 + processed_args = [] + for arg in self.arceos_args: + if arg.startswith("DISK_IMG="): + # 提取路径部分 + key, value = arg.split("=", 1) + # 去除可能的引号 + disk_path = value.strip().strip('"').strip("'") + + # 如果是相对路径,转换为绝对路径 + if not os.path.isabs(disk_path): + # 相对于项目根目录计算绝对路径 + abs_path = os.path.abspath(os.path.join(project_root, disk_path)) + # 保持原有的引号格式 + if value.strip().startswith('"') and value.strip().endswith('"'): + processed_args.append(f'{key}="{abs_path}"') + elif value.strip().startswith("'") and value.strip().endswith("'"): + processed_args.append(f"{key}='{abs_path}'") + else: + processed_args.append(f'{key}="{abs_path}"') + else: + # 已经是绝对路径,保持不变 + processed_args.append(arg) + else: + # 不是 DISK_IMG 参数,保持不变 + processed_args.append(arg) + + # 更新 arceos_args + self.arceos_args = processed_args + + def _load_platform_config(self): + """从平台文件夹中的 axconfig.toml 文件读取配置参数""" + try: + # 构建平台配置文件路径 + platform_dir = os.path.join("platform", self.plat) + config_file = os.path.join(platform_dir, "axconfig.toml") + + if not os.path.exists(config_file): + print(f"警告:平台配置文件 {config_file} 不存在") + return + + # 读取配置文件 + try: + import toml + + with open(config_file, "r", encoding="utf-8") as f: + config_data = toml.load(f) + + # 读取 arch 参数 + if self.arch is None: + arch = config_data.get("arch") + if arch: + print(f"从 {config_file} 读取到 arch: {arch}") + self.arch = arch + else: + print(f"警告:在 {config_file} 中未找到 arch 字段") + + # 读取 package 参数 + if self.package is None: + package = config_data.get("package") + if package: + print(f"从 {config_file} 读取到 package: {package}") + self.package = package + else: + print(f"警告:在 {config_file} 中未找到 package 字段") + + except ImportError: + print("警告:需要安装 toml 库来读取平台配置文件") + except Exception as e: + print(f"警告:读取平台配置文件 {config_file} 失败: {e}") + + except Exception as e: + print(f"警告:加载平台配置信息时发生错误: {e}") + + def _load_arch_from_platform(self) -> Optional[str]: + """从平台文件夹中的 axconfig.toml 文件读取 arch 参数(保持向后兼容)""" + try: + # 构建平台配置文件路径 + platform_dir = os.path.join("platform", self.plat) + config_file = os.path.join(platform_dir, "axconfig.toml") + + if not os.path.exists(config_file): + print(f"警告:平台配置文件 {config_file} 不存在") + return None + + # 读取配置文件 + try: + import toml + + with open(config_file, "r", encoding="utf-8") as f: + config_data = toml.load(f) + arch = config_data.get("arch") + if arch: + print(f"从 {config_file} 读取到 arch: {arch}") + return arch + else: + print(f"警告:在 {config_file} 中未找到 arch 字段") + return None + except ImportError: + print("警告:需要安装 toml 库来读取平台配置文件") + return None + except Exception as e: + print(f"警告:读取平台配置文件 {config_file} 失败: {e}") + return None + + except Exception as e: + print(f"警告:加载平台架构信息时发生错误: {e}") + return None + + def get_arch_specific_qemu_args(self) -> str: + """根据架构生成特定的 QEMU 参数""" + arch_qemu_args = "" + + # 根据架构添加特定的 QEMU 参数 + if self.arch == "aarch64": + arch_qemu_args = "-machine virtualization=on" + elif self.arch == "x86_64": + # x86_64 架构使用 Intel VT-x 虚拟化支持 + arch_qemu_args = "-accel kvm" + elif self.arch == "riscv64": + # RISC-V 架构的虚拟化参数 + arch_qemu_args = "-machine virt -cpu rv64" + + return arch_qemu_args + + def get_arch_specific_variables( + self, existing_make_vars: Optional[Dict[str, str]] = None + ) -> Dict[str, str]: + """根据架构生成特定的 make 变量,考虑已存在的变量""" + arch_vars = {} + + # 获取架构特定的 QEMU 参数 + arch_qemu_args = self.get_arch_specific_qemu_args() + + if arch_qemu_args: + # 检查是否已经存在 QEMU_ARGS + existing_qemu_args = "" + if existing_make_vars and "QEMU_ARGS" in existing_make_vars: + existing_qemu_args = existing_make_vars["QEMU_ARGS"].strip('"') + + # 合并参数:如果已存在参数,则追加;否则直接使用架构参数 + if existing_qemu_args: + combined_args = f"{existing_qemu_args} {arch_qemu_args}" + else: + combined_args = arch_qemu_args + + arch_vars["QEMU_ARGS"] = f'"{combined_args}"' + + return arch_vars + + def get_make_variables(self) -> Dict[str, str]: + """根据配置生成 make 变量""" + make_vars = {} + + if self.arch == "aarch64": + make_vars["LD_SCRIPT"] = "link.x" + + # 使用从平台配置文件读取的 package,如果没有则回退到旧的方式 + if self.package: + make_vars["MYPLAT"] = self.package + else: + make_vars["MYPLAT"] = f"axplat-{self.plat}" + + # 构建 APP_FEATURES + app_features = [f"plat-{self.plat}"] + if self.features: + app_features.extend(self.features) + make_vars["APP_FEATURES"] = ",".join(app_features) + + # ArceOS 特性 + arceos_features = ["page-alloc-64g"] + if self.arceos_features: + arceos_features.extend(self.arceos_features) + make_vars["FEATURES"] = ",".join(arceos_features) + + # ArceOS 参数 + if self.arceos_args: + for arg in self.arceos_args: + if "=" in arg: + key, value = arg.split("=", 1) + make_vars[key.strip()] = value.strip() + else: + make_vars[arg.strip()] = "y" + + # 添加架构特定的变量(传递现有的 make_vars 以便合并 QEMU_ARGS) + arch_vars = self.get_arch_specific_variables(make_vars) + make_vars.update(arch_vars) + + return make_vars + + def get_env_variables(self) -> Dict[str, str]: + """根据配置生成环境变量""" + env_vars = {} + + # 处理 vmconfigs 作为环境变量 + if self.vmconfigs: + env_vars["AXVISOR_VM_CONFIGS"] = ":".join(self.vmconfigs) + + return env_vars + + def format_make_command(self, target: str = "") -> str: + """格式化 make 命令,包含环境变量""" + make_vars = self.get_make_variables() + env_vars = self.get_env_variables() + + cmd_parts = format_make_command_base() + + # 添加环境变量 + for key, value in env_vars.items(): + cmd_parts.append(f"{key}={value}") + + # 添加 make 变量 + for key, value in make_vars.items(): + cmd_parts.append(f"{key}={value}") + + if target: + cmd_parts.append(target) + + return " ".join(cmd_parts) + + def get_subprocess_env(self) -> Dict[str, str]: + """获取用于 subprocess 的环境变量字典""" + env = os.environ.copy() + env.update(self.get_env_variables()) + return env + + +def load_config_file(config_path: str = ".hvconfig.toml") -> Dict[str, Any]: + """从配置文件加载配置""" + if os.path.exists(config_path): + try: + import toml + + with open(config_path, "r", encoding="utf-8") as f: + return toml.load(f) + except ImportError: + print("警告:需要安装 toml 库来读取 .hvconfig.toml 文件") + return {} + except Exception as e: + print(f"警告:读取配置文件 {config_path} 失败: {e}") + return {} + return {} + + +def array_to_comma_separated(value: Any) -> str: + """将数组转换为逗号分隔的字符串""" + if isinstance(value, list): + # 过滤掉空字符串 + filtered_values = [str(v) for v in value if v] + return ",".join(filtered_values) if filtered_values else "" + return str(value) if value else "" + + +def string_or_array_to_list(value: Any) -> List[str]: + """将字符串或数组转换为字符串列表""" + if value is None: + return [] + elif isinstance(value, list): + # 过滤掉空字符串 + return [str(v) for v in value if v] + elif isinstance(value, str): + # 按逗号分割字符串,过滤掉空字符串 + return [item.strip() for item in value.split(",") if item.strip()] + else: + return [str(value)] if value else [] + + +def add_common_arguments(parser: argparse.ArgumentParser) -> None: + """为解析器添加通用参数""" + parser.add_argument( + "-c", + "--config", + type=str, + default=".hvconfig.toml", + help="Config file path (default: .hvconfig.toml)", + ) + parser.add_argument( + "--plat", + type=str, + help="Platform (default: aarch64-generic)", + ) + parser.add_argument( + "--arch", + type=str, + help="Architecture (auto-detected from platform config if not specified)", + ) + parser.add_argument( + "--package", + type=str, + help="Platform package name (auto-detected from platform config if not specified)", + ) + parser.add_argument( + "--features", type=str, help="Hypervisor features (comma-separated)" + ) + parser.add_argument( + "--arceos-features", type=str, help="ArceOS features (comma-separated)" + ) + parser.add_argument( + "--arceos-args", type=str, help="ArceOS arguments (comma-separated)" + ) + parser.add_argument( + "--vmconfigs", type=str, help="VM configuration file path (comma-separated)" + ) + + +def save_config_to_file( + config: AxvisorConfig, config_path: str = ".hvconfig.toml" +) -> bool: + """将配置保存到文件""" + try: + import toml + + # 准备配置数据 + config_data = {} + + config_data["plat"] = config.plat + + if config.features: + config_data["features"] = config.features + + if config.arceos_features: + config_data["arceos_features"] = config.arceos_features + + if config.arceos_args: + config_data["arceos_args"] = config.arceos_args + + if config.vmconfigs: + config_data["vmconfigs"] = config.vmconfigs + + # 写入文件 + with open(config_path, "w", encoding="utf-8") as f: + toml.dump(config_data, f) + + print(f"配置已保存到 {config_path}") + return True + + except ImportError: + print("警告:需要安装 toml 库来保存配置文件") + return False + except Exception as e: + print(f"警告:保存配置文件 {config_path} 失败: {e}") + return False + + +def create_config_from_args(args: argparse.Namespace) -> AxvisorConfig: + """从命令行参数和配置文件创建配置对象""" + # 从命令行参数获取配置文件路径,如果没有指定则使用默认值 + config_file_path = getattr(args, "config", ".hvconfig.toml") + + # 加载配置文件 + config_file = load_config_file(config_file_path) + + # 创建配置对象 + config = AxvisorConfig() + + # 合并配置文件参数(配置文件优先级较低) + if "plat" in config_file: + config.plat = config_file["plat"] + + if "features" in config_file: + config.features = string_or_array_to_list(config_file["features"]) + + if "arceos_features" in config_file: + config.arceos_features = string_or_array_to_list(config_file["arceos_features"]) + + if "arceos_args" in config_file: + config.arceos_args = string_or_array_to_list(config_file["arceos_args"]) + + if "vmconfigs" in config_file: + config.vmconfigs = string_or_array_to_list(config_file["vmconfigs"]) + + # 合并命令行参数(命令行参数优先级较高) + if args.plat: + config.plat = args.plat + + config._load_platform_config() + + if args.features: + config.features = string_or_array_to_list(args.features) + + if hasattr(args, "arceos_features") and args.arceos_features: + config.arceos_features = string_or_array_to_list(args.arceos_features) + + if hasattr(args, "arceos_args") and args.arceos_args: + config.arceos_args = string_or_array_to_list(args.arceos_args) + + if args.vmconfigs: + config.vmconfigs = string_or_array_to_list(args.vmconfigs) + + # 处理 DISK_IMG 路径转换 + config._process_disk_img_paths() + + return config + + +# 保持向后兼容的函数 +def merge_config(args: argparse.Namespace) -> AxvisorConfig: + """合并命令行参数和配置文件,返回配置对象""" + return create_config_from_args(args) + + +def get_make_variables( + args: argparse.Namespace, +) -> Tuple[Dict[str, str], Dict[str, str]]: + """保持向后兼容的函数""" + config = create_config_from_args(args) + return config.get_make_variables(), config.get_env_variables() + + +def format_make_command_base() -> List[str]: + cmd_parts = [] + cmd_parts.extend(["make", "-C", ".arceos", f"A={os.getcwd()}"]) + return cmd_parts diff --git a/scripts/conn_2_serial.sh b/scripts/conn_2_serial.sh new file mode 100755 index 00000000..3953cf1f --- /dev/null +++ b/scripts/conn_2_serial.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Print usage information +if [[ "$1" == "--help" || "$1" == "-h" ]]; then + echo "Usage: $0 [FIRST_PORT] [SECOND_PORT]" + echo "Default ports are 4321 and 4322 if not specified." + exit 0 +fi + +# Determine the first and second ports to use +FIRST_PORT=${1:-4321} +SECOND_PORT=${2:-4322} + +# Create tmux session if it doesn't exist +if ! tmux has-session -t "mysession"; then + tmux new-session -d -s mysession + tmux split-window -h +else + # Send C-c to both panes to clear any previous commands + tmux send-keys -t mysession:0.0 C-c + tmux send-keys -t mysession:0.1 C-c +fi + +# Send telnet commands to both panes +tmux send-keys -t mysession:0.0 "telnet localhost ${FIRST_PORT}" C-m +tmux send-keys -t mysession:0.1 "sleep 2; telnet localhost ${SECOND_PORT}" C-m + +# Attach to the tmux session if not already attached +session=$(tmux list-sessions 2>/dev/null | grep 'mysession') +if [[ -n "$session" && "$session" == *"attached"* ]]; then + echo "Session 'mysession' is already attached." + exit 0 +fi + +tmux attach-session -t mysession diff --git a/scripts/dev_env.py b/scripts/dev_env.py new file mode 100755 index 00000000..5064220d --- /dev/null +++ b/scripts/dev_env.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python3 +import os +import subprocess + + +def main(): + subprocess.run("cargo install cargo-lpatch", shell=True, check=True) + + # 克隆其他仓库到 crates 目录 + repos = [ + "axvm", + "axvcpu", + "axaddrspace", + "arm_vcpu", + "axdevice", + "arm_vgic", + "axhvc", + ] + + for one in repos: + subprocess.run(f"cargo lpatch -n {one}", shell=True, check=True) + + # 创建 .vscode 目录并生成 settings.json + os.makedirs(".vscode", exist_ok=True) + with open(".vscode/settings.json", "w") as settings_json: + settings_json.write( + """ +{ + "rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat", + "rust-analyzer.check.allTargets": false, + "rust-analyzer.cargo.features": ["fs"], +} + """ + ) + + print("patch success") + + +if __name__ == "__main__": + main() diff --git a/scripts/disk_img.py b/scripts/disk_img.py new file mode 100644 index 00000000..be263cfd --- /dev/null +++ b/scripts/disk_img.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os +import subprocess +import sys +from typing import Optional +from .config import AxvisorConfig, create_config_from_args, format_make_command_base +from .setup import setup_arceos + + +def main(args) -> int: + """Create disk image""" + print("Running disk_img task...") + + # Setup arceos dependency first + print("Setting up arceos dependency...") + if not setup_arceos(): + print("Failed to setup arceos, cannot create disk image") + return 1 + + cmd = format_make_command_base() + + if args.image: + # Handle image path: convert relative path to absolute + image_path = args.image + if not os.path.isabs(image_path): + # Compute absolute path relative to project root + project_root = os.getcwd() + image_path = os.path.abspath(os.path.join(project_root, image_path)) + # Add image path to command if specified + cmd.append(f"DISK_IMG={image_path}") + + cmd.append("disk_img") + + # Build make command + cmd = " ".join(cmd) + + print(f"Executing: {cmd}") + + try: + # Run make command + subprocess.run(cmd, shell=True, check=True) + print("Disk image created successfully!") + return 0 + except subprocess.CalledProcessError as e: + print(f"Disk image creation failed, exit code: {e.returncode}") + return e.returncode + except Exception as e: + print(f"Error during disk image creation: {e}") + return 1 diff --git a/scripts/make/bsta1000b-fada.mk b/scripts/make/bsta1000b-fada.mk deleted file mode 100644 index 46d4dbb3..00000000 --- a/scripts/make/bsta1000b-fada.mk +++ /dev/null @@ -1,15 +0,0 @@ -A1000B_GITHUB_URL = https://github.com/arceos-hypervisor/platform_tools/releases/download/latest/a1000b.zip -A1000B_MKIMG_FILE = ./tools/a1000b/mkimage -check-download: -ifeq ("$(wildcard $(A1000b_MKIMG_FILE))","") - @echo "file not found, downloading from $(A1000B_GITHUB_URL)..."; - wget $(A1000B_GITHUB_URL); - unzip -o a1000b.zip -d tools; - rm a1000b.zip; -endif - - -fada: check-download build - gzip -9 -cvf $(OUT_BIN) > arceos-fada.bin.gz - $(A1000B_MKIMG_FILE) -f ./tools/a1000b/bsta1000b-fada-arceos.its arceos-fada.itb - @echo 'Built the FIT-uImage arceos-fada.itb' diff --git a/scripts/make/build.mk b/scripts/make/build.mk deleted file mode 100644 index 4f92ef27..00000000 --- a/scripts/make/build.mk +++ /dev/null @@ -1,55 +0,0 @@ -# Main building script - -include scripts/make/cargo.mk - -ifeq ($(APP_TYPE), c) - include scripts/make/build_c.mk -else - rust_package := $(shell cat $(APP)/Cargo.toml | sed -n 's/^name = "\([a-z0-9A-Z_\-]*\)"/\1/p') - rust_target_dir := $(CURDIR)/target/$(TARGET)/$(MODE) - rust_elf := $(rust_target_dir)/$(rust_package) -endif - -ifneq ($(filter $(MAKECMDGOALS),doc doc_check_missing),) # run `cargo doc` - $(if $(V), $(info RUSTDOCFLAGS: "$(RUSTDOCFLAGS)")) - export RUSTFLAGS - export RUSTDOCFLAGS -else ifneq ($(filter $(MAKECMDGOALS),unittest unittest_no_fail_fast),) - # run `make unittest` - $(if $(V), $(info RUSTFLAGS: "$(RUSTFLAGS)")) - export RUSTFLAGS -else ifeq ($(filter $(MAKECMDGOALS),defconfig oldconfig clippy),) - ifneq ($(V),) - $(info APP: "$(APP)") - $(info APP_TYPE: "$(APP_TYPE)") - $(info FEATURES: "$(FEATURES)") - $(info arceos features: "$(AX_FEAT)") - $(info lib features: "$(LIB_FEAT)") - $(info app features: "$(APP_FEAT)") - endif - ifeq ($(APP_TYPE), c) - $(if $(V), $(info CFLAGS: "$(CFLAGS)") $(info LDFLAGS: "$(LDFLAGS)")) - else ifeq ($(APP_TYPE), rust) - RUSTFLAGS += $(RUSTFLAGS_LINK_ARGS) - endif - $(if $(V), $(info RUSTFLAGS: "$(RUSTFLAGS)")) - export RUSTFLAGS -endif - -_cargo_build: oldconfig - @printf " $(GREEN_C)Building$(END_C) App: $(APP_NAME), Arch: $(ARCH), Platform: $(PLAT_NAME), App type: $(APP_TYPE)\n" -ifeq ($(APP_TYPE), rust) - $(call cargo_build,--manifest-path $(APP)/Cargo.toml,$(AX_FEAT) $(LIB_FEAT) $(APP_FEAT)) - @cp $(rust_elf) $(OUT_ELF) -else ifeq ($(APP_TYPE), c) - $(call cargo_build,-p axlibc,$(AX_FEAT) $(LIB_FEAT)) -endif - -$(OUT_DIR): - $(call run_cmd,mkdir,-p $@) - -$(OUT_BIN): _cargo_build $(OUT_ELF) - $(call run_cmd,$(OBJCOPY),$(OUT_ELF) --strip-all -O binary $@) - $(call run_cmd,$(OBJDUMP),$(OUT_ELF) --demangle -d > $(OUT_ASM)) - -.PHONY: _cargo_build diff --git a/scripts/make/build_c.mk b/scripts/make/build_c.mk deleted file mode 100644 index 4f805b6f..00000000 --- a/scripts/make/build_c.mk +++ /dev/null @@ -1,75 +0,0 @@ -rust_lib_name := axlibc -rust_lib := target/$(TARGET)/$(MODE)/lib$(rust_lib_name).a - -ulib_dir := ulib/axlibc -src_dir := $(ulib_dir)/c -obj_dir := $(ulib_dir)/build_$(ARCH) -inc_dir := $(ulib_dir)/include -c_lib := $(obj_dir)/libc.a -libgcc := - -last_cflags := $(obj_dir)/.cflags - -ulib_src := $(wildcard $(src_dir)/*.c) -ulib_hdr := $(wildcard $(inc_dir)/*.h) -ulib_obj := $(patsubst $(src_dir)/%.c,$(obj_dir)/%.o,$(ulib_src)) - -CFLAGS += $(addprefix -DAX_CONFIG_,$(shell echo $(lib_feat) | tr 'a-z' 'A-Z' | tr '-' '_')) -CFLAGS += -DAX_LOG_$(shell echo $(LOG) | tr 'a-z' 'A-Z') - -CFLAGS += -nostdinc -fno-builtin -ffreestanding -Wall -CFLAGS += -I$(CURDIR)/$(inc_dir) -LDFLAGS += -nostdlib -static -no-pie --gc-sections -T$(LD_SCRIPT) - -ifeq ($(MODE), release) - CFLAGS += -O3 -endif - -ifeq ($(ARCH), riscv64) - CFLAGS += -march=rv64gc -mabi=lp64d -mcmodel=medany -endif - -ifeq ($(findstring fp_simd,$(FEATURES)),) - ifeq ($(ARCH), x86_64) - CFLAGS += -mno-sse - else ifeq ($(ARCH), aarch64) - CFLAGS += -mgeneral-regs-only - endif -else - ifneq ($(filter $(ARCH),riscv64 aarch64),) - # for compiler-rt fallbacks like `__divtf3`, `__multf3`, ... - libgcc := $(shell $(CC) -print-libgcc-file-name) - endif -endif - -_check_need_rebuild: $(obj_dir) - @if [ "$(CFLAGS)" != "`cat $(last_cflags) 2>&1`" ]; then \ - echo "CFLAGS changed, rebuild"; \ - echo "$(CFLAGS)" > $(last_cflags); \ - fi - -$(obj_dir): - $(call run_cmd,mkdir,-p $@) - -$(obj_dir)/%.o: $(src_dir)/%.c $(last_cflags) - $(call run_cmd,$(CC),$(CFLAGS) -c -o $@ $<) - -$(c_lib): $(obj_dir) _check_need_rebuild $(ulib_obj) - $(call run_cmd,$(AR),rcs $@ $(ulib_obj)) - -app-objs := main.o - --include $(APP)/axbuild.mk # override `app-objs` - -app-objs := $(addprefix $(APP)/,$(app-objs)) - -$(APP)/%.o: $(APP)/%.c $(ulib_hdr) - $(call run_cmd,$(CC),$(CFLAGS) $(APP_CFLAGS) -c -o $@ $<) - -$(OUT_ELF): $(libgcc) $(app-objs) $(c_lib) $(rust_lib) - @printf " $(CYAN_C)Linking$(END_C) $(OUT_ELF)\n" - $(call run_cmd,$(LD),$(LDFLAGS) $^ -o $@) - -$(APP)/axbuild.mk: ; - -.PHONY: _check_need_rebuild diff --git a/scripts/make/cargo.mk b/scripts/make/cargo.mk deleted file mode 100644 index 3c36881f..00000000 --- a/scripts/make/cargo.mk +++ /dev/null @@ -1,54 +0,0 @@ -# Cargo features and build args - -ifeq ($(V),1) - verbose := -v -else ifeq ($(V),2) - verbose := -vv -else - verbose := -endif - -build_args-release := --release - -build_args := \ - --target $(TARGET) \ - --target-dir $(CURDIR)/target \ - $(build_args-$(MODE)) \ - $(verbose) - -RUSTFLAGS:= -A unsafe_op_in_unsafe_fn -A static_mut_refs -RUSTFLAGS_LINK_ARGS := -C link-arg=-T$(LD_SCRIPT) -C link-arg=-no-pie -C link-arg=-znostart-stop-gc -RUSTDOCFLAGS := --enable-index-page -Zunstable-options -D rustdoc::broken_intra_doc_links - -ifeq ($(MAKECMDGOALS), doc_check_missing) - RUSTDOCFLAGS += -D missing-docs -endif - -define cargo_build - $(call run_cmd,cargo build,$(build_args) $(1) --features "$(strip $(2))") -endef - -clippy_args := -A clippy::new_without_default \ - -A unsafe_op_in_unsafe_fn \ - -A static_mut_refs # Check `VM_VCPU_TASK_WAIT_QUEUE` in `src/vmm/vcpus.rs` - # We need to find a better data structure to replace the `static mut`. - -define cargo_clippy - $(call run_cmd,cargo clippy,--all-features --workspace --exclude axlog $(1) $(verbose) -- $(clippy_args)) - $(call run_cmd,cargo clippy,-p axlog -p percpu -p percpu_macros $(1) $(verbose) -- $(clippy_args)) -endef - -all_packages := \ - # $(shell ls $(CURDIR)/crates) \ - # $(shell ls $(CURDIR)/modules) \ - # axfeat arceos_api axstd axlibc - -define cargo_doc - $(call run_cmd,cargo doc,--no-deps --all-features --workspace --exclude "arceos-*" $(verbose)) - @# run twice to fix broken hyperlinks - $(foreach p,$(all_packages), \ - $(call run_cmd,cargo rustdoc,--all-features -p $(p) $(verbose)) - ) - @# for some crates, re-generate without `--all-features` - $(call run_cmd,cargo doc,--no-deps -p percpu $(verbose)) -endef diff --git a/scripts/make/config.mk b/scripts/make/config.mk deleted file mode 100644 index 96c3884a..00000000 --- a/scripts/make/config.mk +++ /dev/null @@ -1,31 +0,0 @@ -# Config generation - -config_args := \ - configs/defconfig.toml $(PLAT_CONFIG) $(EXTRA_CONFIG) \ - -w 'smp=$(SMP)' \ - -w 'arch="$(ARCH)"' \ - -w 'platform="$(PLAT_NAME)"' \ - -o "$(OUT_CONFIG)" - -define defconfig - $(call run_cmd,axconfig-gen,$(config_args)) -endef - -ifeq ($(wildcard $(OUT_CONFIG)),) - define oldconfig - $(call defconfig) - endef -else - define oldconfig - $(if $(filter "$(PLAT_NAME)",$(shell axconfig-gen "$(OUT_CONFIG)" -r platform)),\ - $(call run_cmd,axconfig-gen,$(config_args) -c "$(OUT_CONFIG)"),\ - $(error "ARCH" or "PLATFORM" has been changed, please run "make defconfig ARCH=$(ARCH)" again)) - endef -endif - -_axconfig-gen: -ifeq ($(shell axconfig-gen --version 2>/dev/null),) - $(call run_cmd,RUSTFLAGS="" cargo,install axconfig-gen) -endif - -.PHONY: _axconfig-gen diff --git a/scripts/make/features.mk b/scripts/make/features.mk deleted file mode 100644 index baaafe61..00000000 --- a/scripts/make/features.mk +++ /dev/null @@ -1,64 +0,0 @@ -# Features resolving. -# -# Inputs: -# - `FEATURES`: a list of features to be enabled split by spaces or commas. -# The features can be selected from the crate `axfeat` or the user library -# (crate `axstd` or `axlibc`). -# - `APP_FEATURES`: a list of features to be enabled for the Rust app. -# -# Outputs: -# - `AX_FEAT`: features to be enabled for ArceOS modules (crate `axfeat`). -# - `LIB_FEAT`: features to be enabled for the user library (crate `axstd`, `axlibc`). -# - `APP_FEAT`: features to be enabled for the Rust app. - -ifeq ($(APP_TYPE),c) - ax_feat_prefix := axfeat/ - lib_feat_prefix := axlibc/ - lib_features := fp_simd irq alloc multitask fs net fd pipe select epoll -else - # TODO: it's better to use `axfeat/` as `ax_feat_prefix`, but all apps need to have `axfeat` as a dependency - ax_feat_prefix := axstd/ - lib_feat_prefix := axstd/ - lib_features := -endif - -override FEATURES := $(shell echo $(FEATURES) | tr ',' ' ') - -ifeq ($(APP_TYPE), c) - ifneq ($(wildcard $(APP)/features.txt),) # check features.txt exists - override FEATURES += $(shell cat $(APP)/features.txt) - endif - ifneq ($(filter fs net pipe select epoll,$(FEATURES)),) - override FEATURES += fd - endif -endif - -override FEATURES := $(strip $(FEATURES)) - -ax_feat := -lib_feat := - -ifneq ($(filter $(LOG),off error warn info debug trace),) - ax_feat += log-level-$(LOG) -else - $(error "LOG" must be one of "off", "error", "warn", "info", "debug", "trace") -endif - -ifeq ($(BUS),pci) - ax_feat += bus-pci -endif - -ifeq ($(GICV3),y) - ax_feat += gicv3 -endif - -ifeq ($(shell test $(SMP) -gt 1; echo $$?),0) - lib_feat += smp -endif - -ax_feat += $(filter-out $(lib_features),$(FEATURES)) -lib_feat += $(filter $(lib_features),$(FEATURES)) - -AX_FEAT := $(strip $(addprefix $(ax_feat_prefix),$(ax_feat))) -LIB_FEAT := $(strip $(addprefix $(lib_feat_prefix),$(lib_feat))) -APP_FEAT := $(strip $(shell echo $(APP_FEATURES) | tr ',' ' ')) diff --git a/scripts/make/platform.mk b/scripts/make/platform.mk deleted file mode 100644 index bb667e8d..00000000 --- a/scripts/make/platform.mk +++ /dev/null @@ -1,39 +0,0 @@ -# Architecture and platform resolving - -PLAT_CONFIG_DIR := configs/platforms - -ifeq ($(PLATFORM),) - # `PLATFORM` is not specified, use the default platform for each architecture - ifeq ($(ARCH), x86_64) - PLAT_NAME := x86_64-qemu-q35 - else ifeq ($(ARCH), aarch64) - PLAT_NAME := aarch64-qemu-virt-hv - else ifeq ($(ARCH), riscv64) - PLAT_NAME := riscv64-qemu-virt - else - $(error "ARCH" must be one of "x86_64", "riscv64", or "aarch64") - endif - PLAT_CONFIG := $(PLAT_CONFIG_DIR)/$(PLAT_NAME).toml -else - # `PLATFORM` is specified, override the `ARCH` variables - builtin_platforms := $(patsubst $(PLAT_CONFIG_DIR)/%.toml,%,$(wildcard $(PLAT_CONFIG_DIR)/*)) - ifneq ($(filter $(PLATFORM),$(builtin_platforms)),) - # builtin platform - _arch := $(word 1,$(subst -, ,$(PLATFORM))) - PLAT_NAME := $(PLATFORM) - PLAT_CONFIG := $(PLAT_CONFIG_DIR)/$(PLAT_NAME).toml - else ifneq ($(wildcard $(PLATFORM)),) - # custom platform, read the "arch" and "plat-name" fields from the toml file - _arch := $(patsubst "%",%,$(shell axconfig-gen $(PLATFORM) -r arch)) - PLAT_NAME := $(patsubst "%",%,$(shell axconfig-gen $(PLATFORM) -r platform)) - PLAT_CONFIG := $(PLATFORM) - else - $(error "PLATFORM" must be one of "$(builtin_platforms)" or a valid path to a toml file) - endif - ifeq ($(origin ARCH),command line) - ifneq ($(ARCH),$(_arch)) - $(error "ARCH=$(ARCH)" is not compatible with "PLATFORM=$(PLATFORM)") - endif - endif - ARCH := $(_arch) -endif diff --git a/scripts/make/qemu.mk b/scripts/make/qemu.mk deleted file mode 100644 index 8f73b1d3..00000000 --- a/scripts/make/qemu.mk +++ /dev/null @@ -1,101 +0,0 @@ -# QEMU arguments - -QEMU := qemu-system-$(ARCH) - -TELNET_PORT ?= 4321 -SECOND_SERIAL ?= n - -ifeq ($(BUS), mmio) - vdev-suffix := device -else ifeq ($(BUS), pci) - vdev-suffix := pci -else - $(error "BUS" must be one of "mmio" or "pci") -endif - -qemu_args-x86_64 := \ - -machine q35 \ - -kernel $(OUT_ELF) - -qemu_args-riscv64 := \ - -machine virt \ - -bios default \ - -kernel $(OUT_BIN) - -qemu_args-aarch64 := \ - -cpu cortex-a72 \ - -kernel $(OUT_BIN) - -qemu_args-y := -m $(MEM) -smp $(SMP) $(qemu_args-$(ARCH)) - -qemu_args-$(BLK) += \ - -device virtio-blk-$(vdev-suffix),drive=disk0 \ - -drive id=disk0,if=none,format=raw,file=$(DISK_IMG) - -qemu_args-$(NET) += \ - -device virtio-net-$(vdev-suffix),netdev=net0 - -ifeq ($(NET_DEV), user) - qemu_args-$(NET) += -netdev user,id=net0,hostfwd=tcp::5555-:5555,hostfwd=udp::5555-:5555 -else ifeq ($(NET_DEV), tap) - qemu_args-$(NET) += -netdev tap,id=net0,script=scripts/net/qemu-ifup.sh,downscript=no,vhost=$(VHOST),vhostforce=$(VHOST) - QEMU := sudo $(QEMU) -else ifeq ($(NET_DEV), bridge) - qemu_args-$(NET) += -netdev bridge,id=net0,br=virbr0 - QEMU := sudo $(QEMU) -else - $(error "NET_DEV" must be one of "user", "tap", or "bridge") -endif - -ifneq ($(VFIO_PCI),) - qemu_args-y += --device vfio-pci,host=$(VFIO_PCI) - QEMU := sudo $(QEMU) -endif - -ifeq ($(NET_DUMP), y) - qemu_args-$(NET) += -object filter-dump,id=dump0,netdev=net0,file=netdump.pcap -endif - -qemu_args-$(GRAPHIC) += \ - -device virtio-gpu-$(vdev-suffix) -vga none \ - -serial mon:stdio - -ifeq ($(GRAPHIC), n) - qemu_args-y += -nographic -endif - -ifeq ($(ARCH), aarch64) - ifeq ($(GICV3),y) - qemu_args-y += -machine virt,virtualization=on,gic-version=3 - else - qemu_args-y += -machine virt,virtualization=on,gic-version=2 - endif -endif - -ifeq ($(QEMU_LOG), y) - qemu_args-y += -D qemu.log -d in_asm,int,mmu,pcall,cpu_reset,guest_errors -endif - -qemu_args-$(SECOND_SERIAL) += -serial mon:stdio \ - -serial telnet:localhost:$(TELNET_PORT),server - -qemu_args-debug := $(qemu_args-y) -s -S - -# Do not use KVM for debugging -ifeq ($(shell uname), Darwin) - qemu_args-$(ACCEL) += -cpu host -accel hvf -else ifeq ($(wildcard /dev/kvm),) - qemu_args-$(ACCEL) += -accel tcg -else - qemu_args-$(ACCEL) += -cpu host -accel kvm -endif - -define run_qemu - @printf " $(CYAN_C)Running$(END_C) on qemu...\n" - $(call run_cmd,$(QEMU),$(qemu_args-y)) -endef - -define run_qemu_debug - @printf " $(CYAN_C)Debugging$(END_C) on qemu...\n" - $(call run_cmd,$(QEMU),$(qemu_args-debug)) -endef diff --git a/scripts/make/raspi4.mk b/scripts/make/raspi4.mk deleted file mode 100644 index dbc2fb56..00000000 --- a/scripts/make/raspi4.mk +++ /dev/null @@ -1,95 +0,0 @@ -include tools/raspi4/common/docker.mk -include tools/raspi4/common/format.mk -include tools/raspi4/common/operating_system.mk - -##-------------------------------------------------------------------------------------------------- -## Optional, user-provided configuration values -##-------------------------------------------------------------------------------------------------- - -# Default to the RPi4. -BSP ?= rpi4 - -# Default to a serial device name that is common in Linux. -DEV_SERIAL ?= /dev/ttyUSB0 - -##-------------------------------------------------------------------------------------------------- -## BSP-specific configuration values -##-------------------------------------------------------------------------------------------------- -QEMU_MISSING_STRING = "This board is not yet supported for QEMU." - -ifeq ($(BSP),rpi4) - TARGET = aarch64-unknown-none-softfloat - KERNEL_BIN := $(OUT_BIN) - OBJDUMP_BINARY = aarch64-none-elf-objdump - NM_BINARY = aarch64-none-elf-nm - READELF_BINARY = aarch64-none-elf-readelf - # OPENOCD_ARG = -f /openocd/tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /openocd/rpi4.cfg - OPENOCD_ARG = -f /openocd/tcl/interface/jlink.cfg -f /openocd/rpi4.cfg - JTAG_BOOT_IMAGE := $(OUT_BIN) - RUSTC_MISC_ARGS = -C target-cpu=cortex-a72 -endif - -EXEC_MINIPUSH = ruby tools/raspi4/common/serial/minipush.rb - -##------------------------------------------------------------------------------ -## Dockerization -##------------------------------------------------------------------------------ -DOCKER_CMD = docker run -t --rm -v $(shell pwd):/work/tutorial -w /work/tutorial -DOCKER_CMD_INTERACT = $(DOCKER_CMD) -i -DOCKER_ARG_DIR_COMMON = -v $(shell pwd)/tools/raspi4/common:/work/common -DOCKER_ARG_DIR_JTAG = -v $(shell pwd)/tools/raspi4/X1_JTAG_boot:/work/X1_JTAG_boot -DOCKER_ARG_DEV = --privileged -v /dev:/dev -DOCKER_ARG_NET = --network host - -# DOCKER_IMAGE defined in include file (see top of this file). -DOCKER_GDB = $(DOCKER_CMD_INTERACT) $(DOCKER_ARG_NET) $(DOCKER_IMAGE) - -# Dockerize commands, which require USB device passthrough, only on Linux. -ifeq ($(shell uname -s),Linux) - DOCKER_CMD_DEV = $(DOCKER_CMD_INTERACT) $(DOCKER_ARG_DEV) - DOCKER_CHAINBOOT = $(DOCKER_CMD_DEV) $(DOCKER_ARG_DIR_COMMON) $(DOCKER_IMAGE) - DOCKER_JTAGBOOT = $(DOCKER_CMD_DEV) $(DOCKER_ARG_DIR_COMMON) $(DOCKER_ARG_DIR_JTAG) $(DOCKER_IMAGE) - DOCKER_OPENOCD = $(DOCKER_CMD_DEV) $(DOCKER_ARG_NET) $(DOCKER_IMAGE) -else - DOCKER_OPENOCD = echo "Not yet supported on non-Linux systems."; \# -endif - -##-------------------------------------------------------------------------------------------------- -## Targets -##-------------------------------------------------------------------------------------------------- -.PHONY: all chainboot - -all: $(KERNEL_BIN) - -##------------------------------------------------------------------------------ -## Push the kernel to the real HW target -##------------------------------------------------------------------------------ -chainboot: $(KERNEL_BIN) - @$(DOCKER_CHAINBOOT) $(EXEC_MINIPUSH) $(DEV_SERIAL) $(KERNEL_BIN) - - -##-------------------------------------------------------------------------------------------------- -## Debugging targets -##-------------------------------------------------------------------------------------------------- -.PHONY: jtagboot openocd gdb gdb-opt0 - -##------------------------------------------------------------------------------ -## Push the JTAG boot image to the real HW target -##------------------------------------------------------------------------------ -jtagboot: $(KERNEL_BIN) - @$(DOCKER_JTAGBOOT) $(EXEC_MINIPUSH) $(DEV_SERIAL) $(JTAG_BOOT_IMAGE) - -##------------------------------------------------------------------------------ -## Start OpenOCD session -##------------------------------------------------------------------------------ -openocd: - $(call color_header, "Launching OpenOCD") - @$(DOCKER_OPENOCD) openocd $(OPENOCD_ARG) - -##------------------------------------------------------------------------------ -## Start GDB session -##------------------------------------------------------------------------------ -gdb: RUSTC_MISC_ARGS += -C debuginfo=2 -gdb: $(KERNEL_ELF) - $(call color_header, "Launching GDB") - @$(DOCKER_GDB) gdb-multiarch -q $(KERNEL_ELF) diff --git a/scripts/make/rk3588.mk b/scripts/make/rk3588.mk deleted file mode 100644 index 49c0a444..00000000 --- a/scripts/make/rk3588.mk +++ /dev/null @@ -1,13 +0,0 @@ -RK3588_GITHUB_URL = https://github.com/arceos-hypervisor/platform_tools/releases/download/latest/rk3588.zip -RK3588_MKIMG_FILE = ./tools/rk3588/mkimg -check-download: -ifeq ("$(wildcard $(RK3588_MKIMG_FILE))","") - @echo "file not found, downloading from $(RK3588_GITHUB_URL)..."; - wget $(RK3588_GITHUB_URL); - unzip -o rk3588.zip -d tools; - rm rk3588.zip; -endif - -kernel: check-download build - $(RK3588_MKIMG_FILE) --dtb rk3588-firefly-itx-3588j.dtb --img $(OUT_BIN) - @echo 'Built the FIT-uImage boot.img' diff --git a/scripts/make/test.mk b/scripts/make/test.mk deleted file mode 100644 index a29d670b..00000000 --- a/scripts/make/test.mk +++ /dev/null @@ -1,16 +0,0 @@ -# Test scripts - -define unit_test - $(call run_cmd,cargo test,-p percpu $(1) -- --nocapture) - $(call run_cmd,cargo test,-p axfs $(1) --features "myfs" -- --nocapture) - $(call run_cmd,cargo test,--workspace --exclude "arceos-*" $(1) -- --nocapture) -endef - -test_app := -ifneq ($(filter command line,$(origin A) $(origin APP)),) - test_app := $(APP) -endif - -define app_test - $(CURDIR)/scripts/test/app_test.sh $(test_app) -endef diff --git a/scripts/make/utils.mk b/scripts/make/utils.mk deleted file mode 100644 index 978017aa..00000000 --- a/scripts/make/utils.mk +++ /dev/null @@ -1,52 +0,0 @@ -# Utility definitions and functions - -GREEN_C := \033[92;1m -CYAN_C := \033[96;1m -YELLOW_C := \033[93;1m -GRAY_C := \033[90m -WHITE_C := \033[37m -END_C := \033[0m - -ifeq ($(AX_ARCH), x86_64) - ARCH_STR = amd64 -else ifeq ($(AX_ARCH), aarch64) - ARCH_STR = arm64 -else - ARCH_STR = $(AX_ARCH) -endif - -TAR_NAME := ubuntu-base-22.04-base-$(ARCH_STR).tar.gz - -define run_cmd - @printf '$(WHITE_C)$(1)$(END_C) $(GRAY_C)$(2)$(END_C)\n' - @$(1) $(2) -endef - -define make_disk_image_fat32 - @printf " $(GREEN_C)Creating$(END_C) FAT32 disk image \"$(1)\" ...\n" - @dd if=/dev/zero of=$(1) bs=1M count=64 - @mkfs.fat -F 32 $(1) -endef - -define make_disk_image - $(if $(filter $(1),fat32), $(call make_disk_image_fat32,$(2))) -endef - -define make_guest_ubuntu_ext4 - @printf " $(GREEN_C)Creating$(END_C) Ubuntu guest image \"$(1)\" ...\n" - @dd if=/dev/zero of=$(1) bs=1M count=128 - @mkfs.ext4 $(1) - @mkdir -p tmp/ubuntu_rootfs - - @if [ ! -f "tmp/$(TAR_NAME)" ]; then \ - printf " $(YELLOW_C)Downloading$(END_C) Ubuntu base image for $(AX_ARCH) ...\n"; \ - wget -O "tmp/$(TAR_NAME)" "http://cdimage.ubuntu.com/ubuntu-base/releases/22.04/release/$(TAR_NAME)"; \ - fi - - @printf " $(GREEN_C)Mounting$(END_C) Ubuntu base image ...\n" - @sudo mount -t ext4 $(1) tmp/ubuntu_rootfs - @printf " $(GREEN_C)Extracting$(END_C) Ubuntu base image ...\n" - @sudo tar -xzf "tmp/$(TAR_NAME)" -C tmp/ubuntu_rootfs/ - @printf " $(GREEN_C)Unmounting$(END_C) Ubuntu base image ...\n" - @sudo umount tmp/ubuntu_rootfs -endef \ No newline at end of file diff --git a/scripts/nimbos.sh b/scripts/nimbos.sh new file mode 100755 index 00000000..580af435 --- /dev/null +++ b/scripts/nimbos.sh @@ -0,0 +1,356 @@ +#!/bin/bash +# -*- coding: utf-8 -*- + +# NimbOS 镜像制作脚本 +# 参照 .github/workflows/actions/setup-nimbos-guest-image/action.yml 实现 + +set -e + +# 获取脚本所在目录 +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# 推算项目根目录(假设脚本在 scripts/ 目录下) +WORKDIR="$(cd "$SCRIPT_DIR/.." && pwd)" + +# 颜色定义 +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +# 输出函数 +info() { echo -e "${BLUE}ℹ️${NC} $*"; } +success() { echo -e "${GREEN}✅${NC} $*"; } +warning() { echo -e "${YELLOW}⚠️${NC} $*"; } +error() { echo -e "${RED}❌${NC} $*"; } +step() { echo -e "${CYAN}🚀${NC} $*"; } + +# 错误处理 +handle_error() { + error "脚本失败: $1" + exit 1 +} + +trap 'handle_error "脚本执行中断"' ERR + +# 默认配置 + +DEFAULT_ARCH="aarch64" +DEFAULT_VERSION="latest" +DISK_PATH="" +ZIP_PATH="" +UNZIP_PATH="" +BIOS_PATH="" +DEFAULT_REPO="arceos-hypervisor/nimbos" +DEFAULT_BIOS_VERSION="latest" +DEFAULT_BIOS_REPO="arceos-hypervisor/axvm-bios-x86" + + +# 解析命令行参数 +parse_args() { + ARCH="$DEFAULT_ARCH" + VERSION="$DEFAULT_VERSION" + REPO="$DEFAULT_REPO" + BIOS_VERSION="$DEFAULT_BIOS_VERSION" + BIOS_REPO="$DEFAULT_BIOS_REPO" + + while [[ $# -gt 0 ]]; do + case $1 in + --arch) + ARCH="$2" + shift 2 + ;; + --version) + VERSION="$2" + shift 2 + ;; + --repo) + REPO="$2" + shift 2 + ;; + --bios-version) + BIOS_VERSION="$2" + shift 2 + ;; + --bios-repo) + BIOS_REPO="$2" + shift 2 + ;; + --help|-h) + show_help + exit 0 + ;; + *) + error "未知参数: $1" + show_help + exit 1 + ;; + esac + done + + # 验证必需参数 + if [[ -z "$ARCH" ]]; then + error "--arch 参数是必需的" + show_help + exit 1 + fi + + DISK_PATH="${WORKDIR}/tmp/nimbos-${ARCH}.img" + ZIP_PATH="${WORKDIR}/tmp/${ARCH}_usertests.zip" + UNZIP_PATH="${WORKDIR}/tmp/nimbos-${ARCH}" + BIOS_PATH="${WORKDIR}/tmp/axvm-bios.bin" +} + +# 显示帮助信息 +show_help() { + echo -e "${CYAN}🔧 NimbOS 镜像制作工具${NC}" + echo + echo -e "${YELLOW}📋 用法:${NC} $0 --arch <架构> [选项...]" + echo + echo -e "${YELLOW}⚙️ 必需参数:${NC}" + echo " --arch <架构> - 目标架构 (例如: x86_64, aarch64)" + echo + echo -e "${YELLOW}🔧 可选参数:${NC}" + echo " --version <版本> - NimbOS 版本 (默认: $DEFAULT_VERSION)" + echo " --disk-path <路径> - 磁盘镜像输出路径 (默认: $DEFAULT_DISK_PATH)" + echo " --repo <仓库> - NimbOS GitHub 仓库 (默认: $DEFAULT_REPO)" + echo " --bios-version <版本> - BIOS 版本 (仅 x86_64, 默认: $DEFAULT_BIOS_VERSION)" + echo " --bios-repo <仓库> - BIOS GitHub 仓库 (仅 x86_64, 默认: $DEFAULT_BIOS_REPO)" + echo " --help, -h - 显示此帮助信息" + echo + echo -e "${YELLOW}📚 示例:${NC}" + echo " $0 --arch x86_64" + echo " $0 --arch x86_64 --version v1.0.0 --disk-path custom.img" + echo " $0 --arch aarch64 --repo myorg/nimbos" +} + +# 检查依赖 +check_dependencies() { + local missing_deps=() + + if ! command -v curl >/dev/null 2>&1; then + missing_deps+=("curl") + fi + + if ! command -v jq >/dev/null 2>&1; then + missing_deps+=("jq") + fi + + if ! command -v unzip >/dev/null 2>&1; then + missing_deps+=("unzip") + fi + + if [[ ${#missing_deps[@]} -gt 0 ]]; then + error "缺少必要依赖: ${missing_deps[*]}" + info "请安装缺少的依赖后重试" + exit 1 + fi +} + +# 创建临时目录 +setup_temp_dir() { + step "创建临时目录..." + mkdir -p "$WORKDIR/tmp" + success "临时目录创建完成" +} + +# 下载 NimbOS +download_nimbos() { + step "下载 NimbOS ($ARCH, 版本: $VERSION)..." + + # 构建 GitHub API URL + if [[ "$VERSION" == "latest" ]]; then + RELEASE_URL="https://api.github.com/repos/$REPO/releases/latest" + else + RELEASE_URL="https://api.github.com/repos/$REPO/releases/tags/$VERSION" + fi + + # 获取 asset 下载 URL + ASSET_NAME="${ARCH}_usertests.zip" + # 先尝试获取 asset 的信息(包括 browser_download_url, size, label, name) + ASSET_JSON=$(curl -s "$RELEASE_URL" | jq -r ".assets[] | select(.name == \"$ASSET_NAME\") | {url:.browser_download_url, size:.size, name:.name, sha256:(.label // null)}") + + if [[ -z "$ASSET_JSON" || "$ASSET_JSON" == "null" ]]; then + error "在版本 $VERSION 中未找到资源 $ASSET_NAME" + exit 1 + fi + + ASSET_URL=$(echo "$ASSET_JSON" | jq -r '.url') + ASSET_SIZE=$(echo "$ASSET_JSON" | jq -r '.size') + ASSET_LABEL=$(echo "$ASSET_JSON" | jq -r '.sha256') + + # 判断是否需要下载:文件不存在,或 size/sha256 与远端不一致 + need_download=0 + if [[ ! -f "$ZIP_PATH" ]]; then + need_download=1 + info "$ASSET_NAME 不存在,准备下载" + else + # 如果 release 的 label 中包含 sha256(我们尝试使用 label 字段存放 checksum),则优先比对 sha256 + if [[ "$ASSET_LABEL" != "null" && "$ASSET_LABEL" != "" ]]; then + # 期望 label 中为 sha256:abcdef... 或 直接 sha256 + expected_sha="$ASSET_LABEL" + # 如果 label 以 "sha256:" 开头,去掉前缀 + expected_sha=${expected_sha#sha256:} + actual_sha=$(sha256sum "$ZIP_PATH" | awk '{print $1}' 2>/dev/null || true) + if [[ "$actual_sha" != "$expected_sha" ]]; then + info "$ASSET_NAME 本地 sha256 与发布不一致,准备重新下载" + need_download=1 + else + success "$ASSET_NAME 本地 sha256 校验通过,跳过下载" + fi + else + # 回退为按文件大小比对(不可靠但可用) + actual_size=$(stat -c%s "$ZIP_PATH" 2>/dev/null || true) + if [[ "$actual_size" != "$ASSET_SIZE" ]]; then + info "$ASSET_NAME 本地大小 ($actual_size) 与发布大小 ($ASSET_SIZE) 不一致,准备重新下载" + need_download=1 + else + success "$ASSET_NAME 本地大小匹配,跳过下载" + fi + fi + fi + + if [[ $need_download -eq 1 ]]; then + info "下载 $ASSET_NAME..." + curl -L -o "$ZIP_PATH" "$ASSET_URL" + success "NimbOS 下载完成" + fi +} + +# 解压 NimbOS +extract_nimbos() { + step "解压 NimbOS..." + + rm -rf "$UNZIP_PATH" + mkdir -p "$UNZIP_PATH" + unzip "$ZIP_PATH" -d "$UNZIP_PATH" + + success "NimbOS 解压完成" +} + +# 下载 BIOS (仅 x86_64) +download_bios() { + # 只在 x86_64 架构下载 BIOS + if [[ "$ARCH" != "x86_64" ]]; then + info "非 x86_64 架构,跳过 BIOS 下载" + return 0 + fi + + step "下载 BIOS (版本: $BIOS_VERSION)..." + + if [[ "$BIOS_VERSION" == "latest" ]]; then + BIOS_RELEASE_URL="https://api.github.com/repos/$BIOS_REPO/releases/latest" + else + BIOS_RELEASE_URL="https://api.github.com/repos/$BIOS_REPO/releases/tags/$BIOS_VERSION" + fi + + # 尝试从 release 里读取 asset 的信息(可能包含 size 或 label 用于 checksum) + BIOS_ASSET_JSON=$(curl -s "$BIOS_RELEASE_URL" | jq -r ".assets[] | select(.name == \"axvm-bios.bin\") | {url:.browser_download_url, size:.size, sha256:(.label // null)}") + + if [[ -z "$BIOS_ASSET_JSON" || "$BIOS_ASSET_JSON" == "null" ]]; then + error "未找到 BIOS 资源" + exit 1 + fi + + BIOS_ASSET_URL=$(echo "$BIOS_ASSET_JSON" | jq -r '.url') + BIOS_ASSET_SIZE=$(echo "$BIOS_ASSET_JSON" | jq -r '.size') + BIOS_ASSET_LABEL=$(echo "$BIOS_ASSET_JSON" | jq -r '.sha256') + + need_download=0 + if [[ ! -f "$BIOS_PATH" ]]; then + need_download=1 + info "BIOS 文件不存在,准备下载" + else + if [[ "$BIOS_ASSET_LABEL" != "null" && "$BIOS_ASSET_LABEL" != "" ]]; then + expected_sha=${BIOS_ASSET_LABEL#sha256:} + actual_sha=$(sha256sum "$BIOS_PATH" | awk '{print $1}' 2>/dev/null || true) + if [[ "$actual_sha" != "$expected_sha" ]]; then + info "BIOS 本地 sha256 与发布不一致,准备重新下载" + need_download=1 + else + success "BIOS 本地 sha256 校验通过,跳过下载" + fi + else + actual_size=$(stat -c%s "$BIOS_PATH" 2>/dev/null || true) + if [[ "$actual_size" != "$BIOS_ASSET_SIZE" ]]; then + info "BIOS 本地大小 ($actual_size) 与发布大小 ($BIOS_ASSET_SIZE) 不一致,准备重新下载" + need_download=1 + else + success "BIOS 本地大小匹配,跳过下载" + fi + fi + fi + + if [[ $need_download -eq 1 ]]; then + info "下载 axvm-bios.bin..." + curl -L -o "$BIOS_PATH" "$BIOS_ASSET_URL" + success "BIOS 下载完成" + fi +} + +# 创建磁盘镜像 +create_disk_image() { + step "创建磁盘镜像: $DISK_PATH" + + if [[ ! -f "$WORKDIR/axvisor.sh" ]]; then + error "axvisor.sh 脚本不存在,请确保脚本在正确位置" + exit 1 + fi + + "$WORKDIR/axvisor.sh" disk_img --image "$WORKDIR/tmp/nimbos-${ARCH}.img" + + success "磁盘镜像创建完成" +} + +# 挂载镜像并复制文件 +mount_and_copy() { + step "挂载镜像并复制文件..." + + sudo rm -rf "$WORKDIR/tmp/img" + sudo mkdir -p "$WORKDIR/tmp/img" + sudo chown -R root:root "$WORKDIR/tmp/img" + sudo mount "$WORKDIR/tmp/nimbos-${ARCH}.img" "$WORKDIR/tmp/img" + sudo cp "${UNZIP_PATH}/nimbos.bin" "$WORKDIR/tmp/img/nimbos-${ARCH}.bin" + sudo chown -R root:root "$WORKDIR/tmp/img" + sudo umount "$WORKDIR/tmp/img" + + success "文件复制完成" +} + +# 清理临时文件 +cleanup() { + step "清理临时文件..." + rm -rf "$WORKDIR/tmp/img" + success "清理完成" +} + +# 主函数 +main() { + parse_args "$@" + + info "开始制作 NimbOS 镜像" + info "架构: $ARCH" + info "版本: $VERSION" + info "输出路径: $DISK_PATH" + info "工作目录: $WORKDIR" + + setup_temp_dir + download_nimbos + extract_nimbos + download_bios + create_disk_image + mount_and_copy + cleanup + + success "NimbOS 镜像制作完成: $DISK_PATH" +} + +# 脚本入口点 +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + # 处理中断信号 + trap 'echo -e "\n${YELLOW}用户中断操作${NC}"; exit 130' INT + + # 执行主函数 + main "$@" +fi diff --git a/scripts/requirements.txt b/scripts/requirements.txt new file mode 100644 index 00000000..861a3962 --- /dev/null +++ b/scripts/requirements.txt @@ -0,0 +1,2 @@ +# Axvisor task.py dependencies +toml>=0.10.0 diff --git a/scripts/run.py b/scripts/run.py new file mode 100644 index 00000000..c3675e0c --- /dev/null +++ b/scripts/run.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os +import subprocess +import sys +from typing import Optional +from .config import AxvisorConfig, create_config_from_args +from .setup import setup_arceos +from . import build + + +def main(args) -> int: + """Run the project""" + print("Running run task...") + + # Create config object + config: AxvisorConfig = create_config_from_args(args) + # Build first + print("Building project before run...") + build_result = build.main(args) + if build_result != 0: + print("Build failed; aborting run") + return build_result + # Build make command + cmd = config.format_make_command("run") + + print(f"Executing: {cmd}") + + try: + # Run make run command + result = subprocess.run( + cmd, shell=True, check=True, env=config.get_subprocess_env() + ) + print("Run completed!") + return 0 + except subprocess.CalledProcessError as e: + print(f"Run failed, exit code: {e.returncode}") + return e.returncode + except Exception as e: + print(f"Error during run: {e}") + return 1 diff --git a/scripts/setup.py b/scripts/setup.py new file mode 100644 index 00000000..38fd5dbb --- /dev/null +++ b/scripts/setup.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os +import subprocess + + +def setup_arceos(): + """Setup arceos dependency""" + arceos_dir = ".arceos" + + if not os.path.exists(arceos_dir): + print("Cloning arceos repository...") + try: + # Clone arceos repository + result = subprocess.run( + [ + "git", + "clone", + "https://github.com/arceos-hypervisor/arceos", + "-b", + "hypervisor", + arceos_dir, + ], + check=True, + capture_output=True, + text=True, + ) + print("arceos repository cloned") + return True + except subprocess.CalledProcessError as e: + print(f"Failed to clone arceos repository: {e}") + print(f"Stderr: {e.stderr}") + return False + except Exception as e: + print(f"Error while setting up arceos: {e}") + return False + else: + print(".arceos directory already exists") + return True + + +def main(args=None): + """Entry point when used as standalone command""" + print("Running setup-arceos task...") + return 0 if setup_arceos() else 1 diff --git a/scripts/task.py b/scripts/task.py new file mode 100755 index 00000000..a8a0b499 --- /dev/null +++ b/scripts/task.py @@ -0,0 +1,173 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Axvisor 命令行工具 +统一的项目管理入口点 +""" + +import argparse +import sys +import os +import importlib +import time +from pathlib import Path + +# 添加当前脚本所在目录的上级目录到 Python 路径 +SCRIPT_DIR = Path(__file__).parent.absolute() +PROJECT_ROOT = SCRIPT_DIR.parent +if str(PROJECT_ROOT) not in sys.path: + sys.path.insert(0, str(PROJECT_ROOT)) + +from scripts.config import add_common_arguments + + +def create_parser(): + """创建命令行参数解析器""" + parser = argparse.ArgumentParser( + description="Axvisor 命令行工具", + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog=""" +示例: + %(prog)s build --plat aarch64-qemu-virt-hv + %(prog)s run --vmconfigs configs/vms/linux-qemu-aarch64.toml + %(prog)s clippy --arch aarch64 + %(prog)s disk_img --image custom-disk.img + """, + ) + + # 添加全局选项 + parser.add_argument("--verbose", "-v", action="store_true", help="启用详细输出") + + parser.add_argument( + "--quiet", "-q", action="store_true", help="静默输出(仅显示错误)" + ) + + subparsers = parser.add_subparsers( + dest="command", help="可用命令", metavar="COMMAND" + ) + + # setup 命令 + setup_parser = subparsers.add_parser("setup", help="设置 arceos 依赖") + + # build 命令 + build_parser = subparsers.add_parser("build", help="构建项目") + add_common_arguments(build_parser) + + # run 命令 + run_parser = subparsers.add_parser("run", help="运行项目") + add_common_arguments(run_parser) + + # clippy 命令 + clippy_parser = subparsers.add_parser("clippy", help="运行 clippy 代码检查") + clippy_parser.add_argument( + "--arch", + type=str, + default="aarch64", + help="目标架构 (默认: aarch64)", + ) + + # clean 命令 + clean_parser = subparsers.add_parser("clean", help="清理构建产物") + + # disk_img 命令 + disk_parser = subparsers.add_parser("disk_img", help="创建磁盘镜像") + disk_parser.add_argument( + "--image", + type=str, + default="disk.img", + help="磁盘镜像路径和文件名 (默认: disk.img)", + ) + + return parser + + +def setup_logging(args): + """设置日志级别""" + if args.quiet: + import logging + + logging.basicConfig(level=logging.ERROR) + elif args.verbose: + import logging + + logging.basicConfig(level=logging.DEBUG, format="%(levelname)s: %(message)s") + + +def run_command(cmd_name, args): + """运行指定的命令模块""" + command_map = { + "setup": "scripts.setup", + "build": "scripts.build", + "run": "scripts.run", + "clippy": "scripts.clippy", + "clean": "scripts.clean", + "disk_img": "scripts.disk_img", + } + + module_name = command_map.get(cmd_name) + if not module_name: + print(f"错误: 未知命令 '{cmd_name}'", file=sys.stderr) + return 1 + + try: + start_time = time.time() + if args.verbose: + print(f"执行命令: {cmd_name}") + + mod = importlib.import_module(module_name) + result = mod.main(args) + + if args.verbose: + elapsed = time.time() - start_time + print(f"命令 '{cmd_name}' 完成,耗时 {elapsed:.2f}s") + + return result if result is not None else 0 + + except ImportError as e: + print(f"错误: 无法加载命令模块 '{module_name}': {e}", file=sys.stderr) + return 1 + except Exception as e: + print(f"错误: 命令 '{cmd_name}' 执行失败: {e}", file=sys.stderr) + if args.verbose: + import traceback + + traceback.print_exc() + return 1 + + +def main(): + """主入口函数""" + parser = create_parser() + + # 如果没有参数,显示帮助 + if len(sys.argv) == 1: + parser.print_help() + return 0 + + args = parser.parse_args() + + # 设置日志 + setup_logging(args) + + # 验证工作目录 + if not (PROJECT_ROOT / "Cargo.toml").exists(): + print("错误: 当前目录不是有效的 Axvisor 项目目录", file=sys.stderr) + return 1 + + # 执行命令 + if args.command: + return run_command(args.command, args) + else: + parser.print_help() + return 0 + + +if __name__ == "__main__": + try: + sys.exit(main()) + except KeyboardInterrupt: + print("\n用户中断操作", file=sys.stderr) + sys.exit(130) + except Exception as e: + print(f"意外错误: {e}", file=sys.stderr) + sys.exit(1) diff --git a/src/hal.rs b/src/hal.rs deleted file mode 100644 index 3a73f51c..00000000 --- a/src/hal.rs +++ /dev/null @@ -1,128 +0,0 @@ -use std::os::arceos; - -use memory_addr::{PAGE_SIZE_4K, align_up_4k}; -use page_table_multiarch::PagingHandler; - -use arceos::modules::{axalloc, axhal}; -use axaddrspace::{HostPhysAddr, HostVirtAddr}; -use axvcpu::AxVCpuHal; -use axvm::{AxVMHal, AxVMPerCpu}; - -use crate::vmm; - -/// Implementation for `AxVMHal` trait. -pub struct AxVMHalImpl; - -impl AxVMHal for AxVMHalImpl { - type PagingHandler = axhal::paging::PagingHandlerImpl; - - fn alloc_memory_region_at(base: HostPhysAddr, size: usize) -> bool { - axalloc::global_allocator() - .alloc_pages_at( - base.as_usize(), - align_up_4k(size) / PAGE_SIZE_4K, - PAGE_SIZE_4K, - ) - .map_err(|err| { - error!( - "Failed to allocate memory region [{:?}~{:?}]: {:?}", - base, - base + size, - err - ); - }) - .is_ok() - } - - fn dealloc_memory_region_at(base: HostPhysAddr, size: usize) { - axalloc::global_allocator().dealloc_pages(base.as_usize(), size / PAGE_SIZE_4K) - } - - fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { - axhal::mem::virt_to_phys(vaddr) - } - - fn current_time_nanos() -> u64 { - axhal::time::monotonic_time_nanos() - } -} - -pub struct AxVCpuHalImpl; - -impl AxVCpuHal for AxVCpuHalImpl { - fn alloc_frame() -> Option { - ::PagingHandler::alloc_frame() - } - - fn dealloc_frame(paddr: HostPhysAddr) { - ::PagingHandler::dealloc_frame(paddr) - } - - #[inline] - fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr { - ::PagingHandler::phys_to_virt(paddr) - } - - fn virt_to_phys(vaddr: axaddrspace::HostVirtAddr) -> axaddrspace::HostPhysAddr { - std::os::arceos::modules::axhal::mem::virt_to_phys(vaddr) - } - - #[cfg(target_arch = "aarch64")] - fn irq_fetch() -> usize { - axhal::irq::fetch_irq() - } - - #[cfg(target_arch = "aarch64")] - fn irq_hanlder() { - let irq_num = axhal::irq::fetch_irq(); - debug!("IRQ handler {irq_num}"); - axhal::irq::handler_irq(irq_num); - } -} - -#[percpu::def_percpu] -static mut AXVM_PER_CPU: AxVMPerCpu = AxVMPerCpu::::new_uninit(); - -/// Init hardware virtualization support in each core. -pub(crate) fn enable_virtualization() { - use core::sync::atomic::AtomicUsize; - use core::sync::atomic::Ordering; - - use std::thread; - - use arceos::api::config; - use arceos::api::task::{AxCpuMask, ax_set_current_affinity}; - use arceos::modules::axhal::cpu::this_cpu_id; - - static CORES: AtomicUsize = AtomicUsize::new(0); - - for cpu_id in 0..config::SMP { - thread::spawn(move || { - // Initialize cpu affinity here. - assert!( - ax_set_current_affinity(AxCpuMask::one_shot(cpu_id)).is_ok(), - "Initialize CPU affinity failed!" - ); - - vmm::init_timer_percpu(); - - let percpu = unsafe { AXVM_PER_CPU.current_ref_mut_raw() }; - percpu - .init(this_cpu_id()) - .expect("Failed to initialize percpu state"); - percpu - .hardware_enable() - .expect("Failed to enable virtualization"); - - info!("Hardware virtualization support enabled on core {}", cpu_id); - - let _ = CORES.fetch_add(1, Ordering::Release); - }); - } - - // Wait for all cores to enable virtualization. - while CORES.load(Ordering::Acquire) != config::SMP { - // Use `yield_now` instead of `core::hint::spin_loop` to avoid deadlock. - thread::yield_now(); - } -} diff --git a/src/hal/arch/aarch64/api.rs b/src/hal/arch/aarch64/api.rs new file mode 100644 index 00000000..5071517d --- /dev/null +++ b/src/hal/arch/aarch64/api.rs @@ -0,0 +1,75 @@ +#[axvisor_api::api_mod_impl(axvisor_api::arch)] +mod arch_api_impl { + use core::panic; + + use axvisor_api::memory::virt_to_phys; + + extern fn hardware_inject_virtual_interrupt(irq: axvisor_api::vmm::InterruptVector) { + crate::hal::arch::inject_interrupt(irq as _); + } + + extern fn read_vgicd_typer() -> u32 { + let mut gic = rdrive::get_one::() + .expect("Failed to get GIC driver") + .lock() + .unwrap(); + if let Some(gic) = gic.typed_mut::() { + return gic.typer_raw(); + } + + if let Some(gic) = gic.typed_mut::() { + // Use the GICv3 driver to read the typer register + return gic.typer_raw(); + } + panic!("No GIC driver found"); + } + + extern fn read_vgicd_iidr() -> u32 { + // use axstd::os::arceos::modules::axhal::irq::MyVgic; + // MyVgic::get_gicd().lock().get_iidr() + let mut gic = rdrive::get_one::() + .expect("Failed to get GIC driver") + .lock() + .unwrap(); + if let Some(gic) = gic.typed_mut::() { + return gic.iidr_raw(); + } + + if let Some(gic) = gic.typed_mut::() { + // Use the GICv3 driver to read the typer register + return gic.iidr_raw(); + } + + panic!("No GIC driver found"); + } + + extern fn get_host_gicd_base() -> memory_addr::PhysAddr { + let mut gic = rdrive::get_one::() + .expect("Failed to get GIC driver") + .lock() + .unwrap(); + if let Some(gic) = gic.typed_mut::() { + let ptr: *mut u8 = gic.gicd_addr().as_ptr(); + return virt_to_phys((ptr as usize).into()); + } + + if let Some(gic) = gic.typed_mut::() { + let ptr: *mut u8 = gic.gicd_addr().as_ptr(); + // Use the GICv3 driver to read the typer register + return virt_to_phys((ptr as usize).into()); + } + panic!("No GIC driver found"); + } + + extern fn get_host_gicr_base() -> memory_addr::PhysAddr { + let mut gic = rdrive::get_one::() + .expect("Failed to get GIC driver") + .lock() + .unwrap(); + if let Some(gic) = gic.typed_mut::() { + let ptr: *mut u8 = gic.gicr_addr().as_ptr(); + return virt_to_phys((ptr as usize).into()); + } + panic!("No GICv3 driver found"); + } +} diff --git a/src/hal/arch/aarch64/cache.rs b/src/hal/arch/aarch64/cache.rs new file mode 100644 index 00000000..76ea085b --- /dev/null +++ b/src/hal/arch/aarch64/cache.rs @@ -0,0 +1,17 @@ +use memory_addr::VirtAddr; + +use crate::hal::CacheOp; + +impl From for aarch64_cpu_ext::cache::CacheOp { + fn from(op: CacheOp) -> Self { + match op { + CacheOp::Clean => aarch64_cpu_ext::cache::CacheOp::Clean, + CacheOp::Invalidate => aarch64_cpu_ext::cache::CacheOp::Invalidate, + CacheOp::CleanAndInvalidate => aarch64_cpu_ext::cache::CacheOp::CleanAndInvalidate, + } + } +} + +pub fn dcache_range(op: CacheOp, addr: VirtAddr, size: usize) { + aarch64_cpu_ext::cache::dcache_range(op.into(), addr.as_usize(), size); +} diff --git a/src/hal/arch/aarch64/mod.rs b/src/hal/arch/aarch64/mod.rs new file mode 100644 index 00000000..56529470 --- /dev/null +++ b/src/hal/arch/aarch64/mod.rs @@ -0,0 +1,154 @@ +use aarch64_cpu_ext::registers::*; + +mod api; +pub mod cache; + +pub fn inject_interrupt(irq: usize) { + debug!("Injecting virtual interrupt: {}", irq); + + let mut gic = rdrive::get_one::() + .expect("Failed to get GIC driver") + .lock() + .unwrap(); + if let Some(gic) = gic.typed_mut::() { + use arm_gic_driver::{ + IntId, + v2::{VirtualInterruptConfig, VirtualInterruptState}, + }; + + let gich = gic.hypervisor_interface().expect("Failed to get GICH"); + gich.enable(); + gich.set_virtual_interrupt( + 0, + VirtualInterruptConfig::software( + unsafe { IntId::raw(irq as _) }, + None, + 0, + VirtualInterruptState::Pending, + false, + true, + ), + ); + return; + } + + if let Some(_gic) = gic.typed_mut::() { + inject_interrupt_gic_v3(irq as _); + return; + } + + panic!("no gic driver found") +} + +pub fn inject_interrupt_gic_v3(vector: usize) { + use arm_gic_driver::v3::*; + + debug!("Injecting virtual interrupt: vector={}", vector); + let elsr = ICH_ELRSR_EL2.read(ICH_ELRSR_EL2::STATUS); + let lr_num = ICH_VTR_EL2.read(ICH_VTR_EL2::LISTREGS) as usize + 1; + + let mut free_lr = -1_isize; + + // First, check if this interrupt is already pending/active + for i in 0..lr_num { + // find a free list register + if (1 << i) & elsr > 0 { + if free_lr == -1 { + free_lr = i as isize; + } + continue; + } + let lr_val = ich_lr_el2_get(i); + + if lr_val.read(ICH_LR_EL2::VINTID) == vector as u64 + && lr_val.matches_any(&[ICH_LR_EL2::STATE::Pending, ICH_LR_EL2::STATE::Active]) + { + debug!( + "Virtual interrupt {} already pending/active in LR{}, skipping", + vector, i + ); + // If the interrupt is already pending or active, we can skip injecting it again. + // This is important to avoid duplicate injections. + continue; + } + } + + debug!("use free lr {} to inject irq {}", free_lr, vector); + + if free_lr == -1 { + warn!( + "No free list register to inject IRQ {}, checking ICH_HCR_EL2", + vector + ); + + // Try to find and reuse an inactive LR + for i in 0..lr_num { + let lr_val = ich_lr_el2_get(i); + if lr_val.matches_any(&[ICH_LR_EL2::STATE::Invalid]) { + debug!("Reusing inactive LR{} for IRQ {}", i, vector); + free_lr = i as isize; + + break; + } + } + + if free_lr == -1 { + panic!("No free list register to inject IRQ {}", vector); + } + } + + ich_lr_el2_write( + free_lr as _, + ICH_LR_EL2::VINTID.val(vector as u64) + ICH_LR_EL2::STATE::Pending + ICH_LR_EL2::GROUP::SET, + ); + + // Ensure the virtual interrupt interface is enabled + let en = ICH_HCR_EL2.is_set(ICH_HCR_EL2::EN); + if !en { + // Check EN bit + warn!("Virtual interrupt interface not enabled, enabling now"); + ICH_HCR_EL2.modify(ICH_HCR_EL2::EN::SET); + } + + debug!( + "Virtual interrupt {} injected successfully in LR{}", + vector, free_lr + ); +} + +pub fn hardware_check() { + let pa_bits = match ID_AA64MMFR0_EL1.read_as_enum(ID_AA64MMFR0_EL1::PARange) { + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_32) => 32, + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_36) => 36, + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_40) => 40, + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_42) => 42, + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_44) => 44, + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_48) => 48, + Some(ID_AA64MMFR0_EL1::PARange::Value::Bits_52) => 52, + _ => 32, + }; + + let level = match pa_bits { + 44.. => 4, + _ => 3, + }; + + #[cfg(feature = "ept-level-4")] + { + if level < 4 { + panic!( + "4-level EPT feature is enabled, but the hardware only supports {}-level page tables. Please disable the 4-level EPT feature or use hardware that supports 4-level page tables.", + level + ); + } + } + #[cfg(not(feature = "ept-level-4"))] + { + if level > 3 { + panic!( + "The hardware supports {}-level page tables, but the 4-level EPT feature is not enabled. Please enable the 4-level EPT feature to utilize the hardware's full capabilities.", + level + ); + } + } +} diff --git a/src/hal/arch/x86_64/cache.rs b/src/hal/arch/x86_64/cache.rs new file mode 100644 index 00000000..1a905a9d --- /dev/null +++ b/src/hal/arch/x86_64/cache.rs @@ -0,0 +1,5 @@ +use memory_addr::VirtAddr; + +use crate::hal::CacheOp; + +pub fn dcache_range(_op: CacheOp, _addr: VirtAddr, _size: usize) {} diff --git a/src/hal/arch/x86_64/mod.rs b/src/hal/arch/x86_64/mod.rs new file mode 100644 index 00000000..ab92f90b --- /dev/null +++ b/src/hal/arch/x86_64/mod.rs @@ -0,0 +1,4 @@ +pub mod cache; + +pub fn hardware_check() {} +pub fn inject_interrupt(_vector: u8) {} diff --git a/src/hal/mod.rs b/src/hal/mod.rs new file mode 100644 index 00000000..324ea71a --- /dev/null +++ b/src/hal/mod.rs @@ -0,0 +1,282 @@ +use std::os::arceos::{ + self, + modules::{ + axhal::percpu::this_cpu_id, + axtask::{self, TaskExtRef}, + }, +}; + +use axerrno::{AxResult, ax_err_type}; +use memory_addr::PAGE_SIZE_4K; +use page_table_multiarch::PagingHandler; + +use arceos::modules::axhal; +use axaddrspace::{AxMmHal, HostPhysAddr, HostVirtAddr}; +use axvcpu::AxVCpuHal; +use axvm::{AxVMHal, AxVMPerCpu}; + +#[cfg_attr(target_arch = "aarch64", path = "arch/aarch64/mod.rs")] +#[cfg_attr(target_arch = "x86_64", path = "arch/x86_64/mod.rs")] +pub mod arch; + +use crate::{hal::arch::hardware_check, vmm}; + +#[allow(unused)] +#[repr(C)] +#[derive(Debug, Clone, Copy)] +pub enum CacheOp { + /// Write back to memory + Clean, + /// Invalidate cache + Invalidate, + /// Clean and invalidate + CleanAndInvalidate, +} + +/// Implementation for `AxVMHal` trait. +pub struct AxVMHalImpl; + +impl AxVMHal for AxVMHalImpl { + type PagingHandler = axhal::paging::PagingHandlerImpl; + + fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { + axhal::mem::virt_to_phys(vaddr) + } + + fn current_time_nanos() -> u64 { + axhal::time::monotonic_time_nanos() + } + + fn current_vm_id() -> usize { + axtask::current().task_ext().vm.id() + } + + fn current_vcpu_id() -> usize { + axtask::current().task_ext().vcpu.id() + } + + fn current_pcpu_id() -> usize { + axhal::percpu::this_cpu_id() + } + + fn vcpu_resides_on(vm_id: usize, vcpu_id: usize) -> AxResult { + vmm::with_vcpu_task(vm_id, vcpu_id, |task| task.cpu_id() as usize) + .ok_or_else(|| ax_err_type!(NotFound)) + } + + fn inject_irq_to_vcpu(vm_id: usize, vcpu_id: usize, irq: usize) -> axerrno::AxResult { + vmm::with_vm_and_vcpu_on_pcpu(vm_id, vcpu_id, move |_, vcpu| { + vcpu.inject_interrupt(irq).unwrap(); + }) + } +} + +pub struct AxMmHalImpl; + +impl AxMmHal for AxMmHalImpl { + fn alloc_frame() -> Option { + ::PagingHandler::alloc_frame() + } + + fn dealloc_frame(paddr: HostPhysAddr) { + ::PagingHandler::dealloc_frame(paddr) + } + + #[inline] + fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr { + ::PagingHandler::phys_to_virt(paddr) + } + + fn virt_to_phys(vaddr: axaddrspace::HostVirtAddr) -> axaddrspace::HostPhysAddr { + std::os::arceos::modules::axhal::mem::virt_to_phys(vaddr) + } +} + +pub struct AxVCpuHalImpl; + +impl AxVCpuHal for AxVCpuHalImpl { + type MmHal = AxMmHalImpl; + + fn irq_hanlder() { + axhal::irq::irq_handler(0); + } +} + +#[percpu::def_percpu] +static mut AXVM_PER_CPU: AxVMPerCpu = AxVMPerCpu::::new_uninit(); + +/// Init hardware virtualization support in each core. +pub(crate) fn enable_virtualization() { + use core::sync::atomic::AtomicUsize; + use core::sync::atomic::Ordering; + + use std::thread; + + use arceos::api::config; + use arceos::api::task::{AxCpuMask, ax_set_current_affinity}; + + static CORES: AtomicUsize = AtomicUsize::new(0); + + info!("Enabling hardware virtualization support on all cores..."); + + hardware_check(); + + for cpu_id in 0..config::plat::CPU_NUM { + thread::spawn(move || { + info!( + "Core {} is initializing hardware virtualization support...", + cpu_id + ); + // Initialize cpu affinity here. + assert!( + ax_set_current_affinity(AxCpuMask::one_shot(cpu_id)).is_ok(), + "Initialize CPU affinity failed!" + ); + + info!( + "Enabling hardware virtualization support on core {}", + cpu_id + ); + + vmm::init_timer_percpu(); + + let percpu = unsafe { AXVM_PER_CPU.current_ref_mut_raw() }; + percpu + .init(this_cpu_id()) + .expect("Failed to initialize percpu state"); + percpu + .hardware_enable() + .expect("Failed to enable virtualization"); + + info!("Hardware virtualization support enabled on core {}", cpu_id); + + let _ = CORES.fetch_add(1, Ordering::Release); + }); + } + + info!("Waiting for all cores to enable hardware virtualization..."); + + // Wait for all cores to enable virtualization. + while CORES.load(Ordering::Acquire) != config::plat::CPU_NUM { + // Use `yield_now` instead of `core::hint::spin_loop` to avoid deadlock. + thread::yield_now(); + } + + info!("All cores have enabled hardware virtualization support."); +} + +#[axvisor_api::api_mod_impl(axvisor_api::memory)] +mod memory_api_impl { + use core::{alloc::Layout, ptr::NonNull}; + + use super::*; + + extern fn alloc_frame() -> Option { + ::alloc_frame() + } + + extern fn alloc_contiguous_frames( + num_frames: usize, + frame_align_pow2: usize, + ) -> Option { + arceos::modules::axalloc::global_allocator() + .alloc( + Layout::from_size_align( + num_frames * PAGE_SIZE_4K, + PAGE_SIZE_4K << frame_align_pow2, + ) + .unwrap(), + ) + // .alloc_pages(num_frames, PAGE_SIZE_4K << frame_align_pow2) + // .map(|vaddr| ::virt_to_phys(vaddr.into())) + .map(|vaddr| HostPhysAddr::from(vaddr.as_ptr() as usize)) + .ok() + } + + extern fn dealloc_frame(paddr: HostPhysAddr) { + ::dealloc_frame(paddr) + } + + extern fn dealloc_contiguous_frames(paddr: HostPhysAddr, num_frames: usize) { + // arceos::modules::axalloc::global_allocator().dealloc_pages(paddr.as_usize(), num_frames); + arceos::modules::axalloc::global_allocator().dealloc( + unsafe { NonNull::new_unchecked(paddr.as_usize() as _) }, + Layout::from_size_align(num_frames * PAGE_SIZE_4K, PAGE_SIZE_4K).unwrap(), + ); + } + + extern fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr { + ::phys_to_virt(paddr) + } + + extern fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr { + ::virt_to_phys(vaddr) + } +} + +#[axvisor_api::api_mod_impl(axvisor_api::time)] +mod time_api_impl { + use super::*; + use axvisor_api::time::{CancelToken, Nanos, Ticks, TimeValue}; + + extern fn current_ticks() -> Ticks { + axhal::time::current_ticks() + } + + extern fn ticks_to_nanos(ticks: Ticks) -> Nanos { + axhal::time::ticks_to_nanos(ticks) + } + + extern fn nanos_to_ticks(nanos: Nanos) -> Ticks { + axhal::time::nanos_to_ticks(nanos) + } + + extern fn register_timer( + deadline: TimeValue, + handler: alloc::boxed::Box, + ) -> CancelToken { + vmm::timer::register_timer(deadline.as_nanos() as u64, handler) + } + + extern fn cancel_timer(token: CancelToken) { + vmm::timer::cancel_timer(token) + } +} + +#[axvisor_api::api_mod_impl(axvisor_api::vmm)] +mod vmm_api_impl { + use super::*; + use axvisor_api::vmm::{InterruptVector, VCpuId, VMId}; + + extern fn current_vm_id() -> usize { + ::current_vm_id() + } + + extern fn current_vcpu_id() -> usize { + ::current_vcpu_id() + } + + extern fn vcpu_num(vm_id: VMId) -> Option { + vmm::with_vm(vm_id, |vm| vm.vcpu_num()) + } + + extern fn active_vcpus(_vm_id: VMId) -> Option { + todo!("active_vcpus") + } + + extern fn inject_interrupt(vm_id: VMId, vcpu_id: VCpuId, vector: InterruptVector) { + ::inject_irq_to_vcpu(vm_id, vcpu_id, vector as usize).unwrap(); + } + + extern fn notify_vcpu_timer_expired(_vm_id: VMId, _vcpu_id: VCpuId) { + todo!("notify_vcpu_timer_expired") + // vmm::timer::notify_timer_expired(vm_id, vcpu_id); + } +} + +#[axvisor_api::api_mod_impl(axvisor_api::host)] +mod host_api_impl { + extern fn get_host_cpu_num() -> usize { + std::os::arceos::modules::axconfig::plat::CPU_NUM + } +} diff --git a/src/logo.rs b/src/logo.rs index a549ef66..4001dac3 100644 --- a/src/logo.rs +++ b/src/logo.rs @@ -1,7 +1,7 @@ use std::os::arceos::api::time::ax_wall_time; use std::println; -const LOGO: [&'static str; 2] = [ +const LOGO: [&str; 2] = [ r#" d8888 888 888 d8b d88888 888 888 Y8P diff --git a/src/main.rs b/src/main.rs index b34d20c3..351ace51 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,15 +3,27 @@ #[macro_use] extern crate log; + #[macro_use] extern crate alloc; extern crate axstd as std; +#[cfg(feature = "plat-aarch64-generic")] +extern crate axplat_aarch64_generic; +#[cfg(feature = "plat-aarch64-phytium-pi")] +extern crate axplat_aarch64_phytium_pi; +#[cfg(feature = "plat-aarch64-roc-rk3568-pc")] +extern crate axplat_aarch64_roc_rk3568_pc; +#[cfg(feature = "plat-x86-qemu-q35")] +extern crate axplat_x86_qemu_q35; + +#[cfg(feature = "fs")] +mod shell; + mod hal; mod logo; mod task; -mod utils; mod vmm; #[unsafe(no_mangle)] @@ -25,5 +37,8 @@ fn main() { vmm::init(); vmm::start(); - info!("VMM shutdown"); + info!("[OK] Default guest initialized"); + + #[cfg(feature = "fs")] + shell::console_init(); } diff --git a/src/shell/command/base.rs b/src/shell/command/base.rs new file mode 100644 index 00000000..754f3d69 --- /dev/null +++ b/src/shell/command/base.rs @@ -0,0 +1,749 @@ +use std::collections::BTreeMap; +use std::fs::{self, File, FileType}; +use std::io::{self, Read, Write}; +use std::string::{String, ToString}; +use std::vec::Vec; +use std::{print, println}; + +use crate::shell::command::{CommandNode, FlagDef, ParsedCommand}; + +macro_rules! print_err { + ($cmd: literal, $msg: expr) => { + println!("{}: {}", $cmd, $msg); + }; + ($cmd: literal, $arg: expr, $err: expr) => { + println!("{}: {}: {}", $cmd, $arg, $err); + }; +} + +// Helper function: split whitespace +fn split_whitespace(s: &str) -> (&str, &str) { + let s = s.trim(); + if let Some(pos) = s.find(char::is_whitespace) { + let (first, rest) = s.split_at(pos); + (first, rest.trim()) + } else { + (s, "") + } +} + +fn do_ls(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let show_long = cmd.flags.get("long").unwrap_or(&false); + let show_all = cmd.flags.get("all").unwrap_or(&false); + + let _current_dir = std::env::current_dir().unwrap(); + + fn show_entry_info(path: &str, entry: &str, show_long: bool) -> io::Result<()> { + if show_long { + let metadata = fs::metadata(path)?; + let size = metadata.len(); + let file_type = metadata.file_type(); + let file_type_char = file_type_to_char(file_type); + let rwx = file_perm_to_rwx(metadata.permissions().mode()); + let rwx = unsafe { core::str::from_utf8_unchecked(&rwx) }; + println!("{}{} {:>8} {}", file_type_char, rwx, size, entry); + } else { + println!("{}", entry); + } + Ok(()) + } + + fn list_one(name: &str, print_name: bool, show_long: bool, show_all: bool) -> io::Result<()> { + let is_dir = fs::metadata(name)?.is_dir(); + if !is_dir { + return show_entry_info(name, name, show_long); + } + + if print_name { + println!("{}:", name); + } + + let mut entries = fs::read_dir(name)? + .filter_map(|e| e.ok()) + .map(|e| e.file_name()) + .filter(|name| show_all || !name.starts_with('.')) + .collect::>(); + entries.sort(); + + for entry in entries { + let path = format!("{name}/{entry}"); + if let Err(e) = show_entry_info(&path, &entry, show_long) { + print_err!("ls", path, e); + } + } + Ok(()) + } + + let targets = if args.is_empty() { + vec![".".to_string()] + } else { + args.clone() + }; + + for (i, name) in targets.iter().enumerate() { + if i > 0 { + println!(); + } + if let Err(e) = list_one(name, targets.len() > 1, *show_long, *show_all) { + print_err!("ls", name, e); + } + } +} + +fn do_cat(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + + if args.is_empty() { + print_err!("cat", "no file specified"); + return; + } + + fn cat_one(fname: &str) -> io::Result<()> { + let mut buf = [0; 1024]; + let mut file = File::open(fname)?; + loop { + let n = file.read(&mut buf)?; + if n > 0 { + io::stdout().write_all(&buf[..n])?; + } else { + return Ok(()); + } + } + } + + for fname in args { + if let Err(e) = cat_one(fname) { + print_err!("cat", fname, e); + } + } +} + +fn do_echo(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let no_newline = cmd.flags.get("no-newline").unwrap_or(&false); + + let args_str = args.join(" "); + + fn echo_file(fname: &str, text_list: &[&str]) -> io::Result<()> { + let mut file = File::create(fname)?; + for text in text_list { + file.write_all(text.as_bytes())?; + } + Ok(()) + } + + if let Some(pos) = args_str.rfind('>') { + let text_before = args_str[..pos].trim(); + let (fname, text_after) = split_whitespace(&args_str[pos + 1..]); + if fname.is_empty() { + print_err!("echo", "no file specified"); + return; + }; + + let text_list = [ + text_before, + if !text_after.is_empty() { " " } else { "" }, + text_after, + if !no_newline { "\n" } else { "" }, + ]; + if let Err(e) = echo_file(fname, &text_list) { + print_err!("echo", fname, e); + } + } else if *no_newline { + print!("{}", args_str); + } else { + println!("{}", args_str); + } +} + +fn do_mkdir(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let create_parents = cmd.flags.get("parents").unwrap_or(&false); + + if args.is_empty() { + print_err!("mkdir", "missing operand"); + return; + } + + fn mkdir_one(path: &str, create_parents: bool) -> io::Result<()> { + if create_parents { + fs::create_dir_all(path) + } else { + fs::create_dir(path) + } + } + + for path in args { + if let Err(e) = mkdir_one(path, *create_parents) { + print_err!("mkdir", format_args!("cannot create directory '{path}'"), e); + } + } +} + +fn do_rm(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let rm_dir = cmd.flags.get("dir").unwrap_or(&false); + let recursive = cmd.flags.get("recursive").unwrap_or(&false); + let force = cmd.flags.get("force").unwrap_or(&false); + + if args.is_empty() { + print_err!("rm", "missing operand"); + return; + } + + fn rm_one(path: &str, rm_dir: bool, recursive: bool, force: bool) -> io::Result<()> { + let metadata = fs::metadata(path); + + if force && metadata.is_err() { + return Ok(()); // Ignore non-existent files when in force mode + } + + let metadata = metadata?; + + if metadata.is_dir() { + if recursive { + remove_dir_recursive(path, force) + } else if rm_dir { + fs::remove_dir(path) + } else { + Err(io::Error::Unsupported) + } + } else { + fs::remove_file(path) + } + } + + for path in args { + if let Err(e) = rm_one(path, *rm_dir, *recursive, *force) + && !force + { + print_err!("rm", format_args!("cannot remove '{path}'"), e); + } + } +} + +// Implementation of recursively deleting directories (manual recursion) +fn remove_dir_recursive(path: &str, _force: bool) -> io::Result<()> { + // Read directory contents + let entries = fs::read_dir(path)?; + + // Remove all child items + for entry_result in entries { + let entry = entry_result?; + let entry_path = format!("{}/{}", path, entry.file_name()); + let metadata = entry.file_type(); + + if metadata.is_dir() { + // Recursively delete subdirectory + remove_dir_recursive(&entry_path, _force)?; + } else { + // Delete file + fs::remove_file(&entry_path)?; + } + } + + // Delete empty directory + fs::remove_dir(path) +} + +fn do_cd(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + + let target = if args.is_empty() { + "/" + } else if args.len() == 1 { + &args[0] + } else { + print_err!("cd", "too many arguments"); + return; + }; + + if let Err(e) = std::env::set_current_dir(target) { + print_err!("cd", target, e); + } +} + +fn do_pwd(cmd: &ParsedCommand) { + let _logical = cmd.flags.get("logical").unwrap_or(&false); + + let pwd = std::env::current_dir().unwrap(); + println!("{}", pwd); +} + +fn do_uname(cmd: &ParsedCommand) { + let show_all = cmd.flags.get("all").unwrap_or(&false); + let show_kernel = cmd.flags.get("kernel-name").unwrap_or(&false); + let show_arch = cmd.flags.get("machine").unwrap_or(&false); + + let arch = option_env!("AX_ARCH").unwrap_or(""); + let platform = option_env!("AX_PLATFORM").unwrap_or(""); + let smp = match option_env!("AX_SMP") { + None | Some("1") => "", + _ => " SMP", + }; + let version = option_env!("CARGO_PKG_VERSION").unwrap_or("0.1.0"); + + if *show_all { + println!( + "ArceOS {ver}{smp} {arch} {plat}", + ver = version, + smp = smp, + arch = arch, + plat = platform, + ); + } else if *show_kernel { + println!("ArceOS"); + } else if *show_arch { + println!("{}", arch); + } else { + println!( + "ArceOS {ver}{smp} {arch} {plat}", + ver = version, + smp = smp, + arch = arch, + plat = platform, + ); + } +} + +fn do_exit(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let exit_code = if args.is_empty() { + 0 + } else { + args[0].parse::().unwrap_or(0) + }; + + println!("Bye~"); + std::process::exit(exit_code); +} + +fn do_log(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + + if args.is_empty() { + println!("Current log level: {:?}", log::max_level()); + return; + } + + match args[0].as_str() { + "on" | "enable" => log::set_max_level(log::LevelFilter::Info), + "off" | "disable" => log::set_max_level(log::LevelFilter::Off), + "error" => log::set_max_level(log::LevelFilter::Error), + "warn" => log::set_max_level(log::LevelFilter::Warn), + "info" => log::set_max_level(log::LevelFilter::Info), + "debug" => log::set_max_level(log::LevelFilter::Debug), + "trace" => log::set_max_level(log::LevelFilter::Trace), + level => { + println!("Unknown log level: {}", level); + println!("Available levels: off, error, warn, info, debug, trace"); + return; + } + } + println!("Log level set to: {:?}", log::max_level()); +} + +fn do_mv(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + + if args.len() < 2 { + print_err!("mv", "missing operand"); + return; + } + + // If only two arguments, handle single file/dir move + if args.len() == 2 { + let source = &args[0]; + let dest = &args[1]; + + // Check if destination exists and is a directory + if let Ok(dest_meta) = fs::metadata(dest) + && dest_meta.is_dir() + { + // Move source into destination directory + let mut file_dir = fs::read_dir(dest).unwrap(); + let source_name = match file_dir.next() { + Some(name) => { + let dir_name = name.expect("Failed to read directory"); + let file = dir_name.file_name(); + format!("{dest}/{file}") + } + None => { + print_err!("mv", format_args!("invalid source path '{source}'")); + return; + } + }; + let dest_path = format!("{dest}/{source_name}"); + if let Err(e) = move_file_or_dir(source, &dest_path) { + print_err!( + "mv", + format_args!("cannot move '{source}' to '{dest_path}'"), + e + ); + } + return; + } + + // Direct rename/move + if let Err(e) = move_file_or_dir(source, dest) { + print_err!("mv", format_args!("cannot move '{source}' to '{dest}'"), e); + } + } else { + // Multiple sources - destination must be a directory + let dest = &args[args.len() - 1]; + let sources = &args[..args.len() - 1]; + + // Check if destination is a directory + match fs::metadata(dest) { + Ok(meta) if meta.is_dir() => { + // Move each source into destination directory + for source in sources { + let mut file_dir = fs::read_dir(source).unwrap(); + let source_name = match file_dir.next() { + Some(name) => { + let dir_name = name.expect("Failed to read directory"); + let file = dir_name.file_name(); + format!("{dest}/{file}") + } + None => { + print_err!("mv", format_args!("invalid source path '{source}'")); + return; + } + }; + let dest_path = format!("{dest}/{source_name}"); + if let Err(e) = move_file_or_dir(source, &dest_path) { + print_err!( + "mv", + format_args!("cannot move '{source}' to '{dest_path}'"), + e + ); + } + } + } + Ok(_) => { + print_err!("mv", format_args!("target '{dest}' is not a directory")); + } + Err(e) => { + print_err!("mv", format_args!("cannot access '{dest}'"), e); + } + } + } +} + +// Helper function to move file or directory (handles cross-filesystem moves) +fn move_file_or_dir(source: &str, dest: &str) -> io::Result<()> { + // Try simple rename first (works within same filesystem) + match fs::rename(source, dest) { + Ok(()) => Ok(()), + Err(_) => { + // If rename fails, try copy + delete (for cross-filesystem moves) + let src_meta = fs::metadata(source)?; + + if src_meta.is_dir() { + // For directories, use recursive copy then remove + copy_dir_recursive(source, dest)?; + remove_dir_recursive(source, false)?; + } else { + // For files, copy then remove + copy_file(source, dest)?; + fs::remove_file(source)?; + } + Ok(()) + } + } +} + +fn do_touch(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + + if args.is_empty() { + print_err!("touch", "missing operand"); + return; + } + + for filename in args { + if let Err(e) = File::create(filename) { + print_err!("touch", filename, e); + } + } +} + +fn do_cp(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let recursive = cmd.flags.get("recursive").unwrap_or(&false); + + if args.len() < 2 { + print_err!("cp", "missing operand"); + return; + } + + let source = &args[0]; + let dest = &args[1]; + + // Check if source file/directory exists + let src_metadata = match fs::metadata(source) { + Ok(metadata) => metadata, + Err(e) => { + print_err!("cp", format_args!("cannot access '{source}'"), e); + return; + } + }; + + let result = if src_metadata.is_dir() { + if *recursive { + copy_dir_recursive(source, dest) + } else { + Err(io::Error::Unsupported) + } + } else { + copy_file(source, dest) + }; + + if let Err(e) = result { + print_err!("cp", format_args!("cannot copy '{source}' to '{dest}'"), e); + } +} + +// Manually implement file copy +fn copy_file(src: &str, dst: &str) -> io::Result<()> { + let mut src_file = File::open(src)?; + let mut dst_file = File::create(dst)?; + + let mut buffer = [0; 4096]; + loop { + let bytes_read = src_file.read(&mut buffer)?; + if bytes_read == 0 { + break; + } + dst_file.write_all(&buffer[..bytes_read])?; + } + Ok(()) +} + +// Recursively copy directory +fn copy_dir_recursive(src: &str, dst: &str) -> io::Result<()> { + // Create target directory + fs::create_dir(dst)?; + + // Read source directory contents + let entries = fs::read_dir(src)?; + + for entry_result in entries { + let entry = entry_result?; + let file_name = entry.file_name(); + let src_path = format!("{src}/{file_name}"); + let dst_path = format!("{dst}/{file_name}"); + + let metadata = entry.file_type(); + if metadata.is_dir() { + copy_dir_recursive(&src_path, &dst_path)?; + } else { + copy_file(&src_path, &dst_path)?; + } + } + Ok(()) +} + +fn file_type_to_char(ty: FileType) -> char { + if ty.is_char_device() { + 'c' + } else if ty.is_block_device() { + 'b' + } else if ty.is_socket() { + 's' + } else if ty.is_fifo() { + 'p' + } else if ty.is_symlink() { + 'l' + } else if ty.is_dir() { + 'd' + } else if ty.is_file() { + '-' + } else { + '?' + } +} + +#[rustfmt::skip] +const fn file_perm_to_rwx(mode: u32) -> [u8; 9] { + let mut perm = [b'-'; 9]; + macro_rules! set { + ($bit:literal, $rwx:literal) => { + if mode & (1 << $bit) != 0 { + perm[8 - $bit] = $rwx + } + }; + } + + set!(2, b'r'); set!(1, b'w'); set!(0, b'x'); + set!(5, b'r'); set!(4, b'w'); set!(3, b'x'); + set!(8, b'r'); set!(7, b'w'); set!(6, b'x'); + perm +} + +pub fn build_base_cmd(tree: &mut BTreeMap) { + // ls Command + tree.insert( + "ls".to_string(), + CommandNode::new("List directory contents") + .with_handler(do_ls) + .with_usage("ls [OPTIONS] [DIRECTORY...]") + .with_flag( + FlagDef::new("long", "Use long listing format") + .with_short('l') + .with_long("long"), + ) + .with_flag( + FlagDef::new("all", "Show hidden files") + .with_short('a') + .with_long("all"), + ), + ); + + // cat Command + tree.insert( + "cat".to_string(), + CommandNode::new("Display file contents") + .with_handler(do_cat) + .with_usage("cat [FILE2...]"), + ); + + // echo Command + tree.insert( + "echo".to_string(), + CommandNode::new("Display text") + .with_handler(do_echo) + .with_usage("echo [OPTIONS] [TEXT...]") + .with_flag( + FlagDef::new("no-newline", "Do not output trailing newline") + .with_short('n') + .with_long("no-newline"), + ), + ); + + // mkdir Command + tree.insert( + "mkdir".to_string(), + CommandNode::new("Create directories") + .with_handler(do_mkdir) + .with_usage("mkdir [OPTIONS] [DIRECTORY2...]") + .with_flag( + FlagDef::new("parents", "Create parent directories as needed") + .with_short('p') + .with_long("parents"), + ), + ); + + // rm Command + tree.insert( + "rm".to_string(), + CommandNode::new("Remove files and directories") + .with_handler(do_rm) + .with_usage("rm [OPTIONS] [FILE2...]") + .with_flag( + FlagDef::new("dir", "Remove empty directories") + .with_short('d') + .with_long("dir"), + ) + .with_flag( + FlagDef::new("recursive", "Remove directories recursively") + .with_short('r') + .with_long("recursive"), + ) + .with_flag( + FlagDef::new("force", "Force removal, ignore nonexistent files") + .with_short('f') + .with_long("force"), + ), + ); + + // cd Command + tree.insert( + "cd".to_string(), + CommandNode::new("Change directory") + .with_handler(do_cd) + .with_usage("cd [DIRECTORY]"), + ); + + // pwd Command + tree.insert( + "pwd".to_string(), + CommandNode::new("Print working directory") + .with_handler(do_pwd) + .with_usage("pwd [OPTIONS]") + .with_flag( + FlagDef::new("logical", "Use logical path") + .with_short('L') + .with_long("logical"), + ), + ); + + // uname Command + tree.insert( + "uname".to_string(), + CommandNode::new("System information") + .with_handler(do_uname) + .with_usage("uname [OPTIONS]") + .with_flag( + FlagDef::new("all", "Show all information") + .with_short('a') + .with_long("all"), + ) + .with_flag( + FlagDef::new("kernel-name", "Show kernel name") + .with_short('s') + .with_long("kernel-name"), + ) + .with_flag( + FlagDef::new("machine", "Show machine architecture") + .with_short('m') + .with_long("machine"), + ), + ); + + // exit Command + tree.insert( + "exit".to_string(), + CommandNode::new("Exit the shell") + .with_handler(do_exit) + .with_usage("exit [EXIT_CODE]"), + ); + + // log Command + tree.insert( + "log".to_string(), + CommandNode::new("Change log level") + .with_handler(do_log) + .with_usage("log [LEVEL]"), + ); + + // touch Command + tree.insert( + "touch".to_string(), + CommandNode::new("Create empty files") + .with_handler(do_touch) + .with_usage("touch [FILE2...]"), + ); + + // cp Command + tree.insert( + "cp".to_string(), + CommandNode::new("Copy files") + .with_handler(do_cp) + .with_usage("cp [OPTIONS] ") + .with_flag( + FlagDef::new("recursive", "Copy directories recursively") + .with_short('r') + .with_long("recursive"), + ), + ); + + // mv Command + tree.insert( + "mv".to_string(), + CommandNode::new("Move/rename files") + .with_handler(do_mv) + .with_usage("mv | mv [SOURCE2...] "), + ); +} diff --git a/src/shell/command/history.rs b/src/shell/command/history.rs new file mode 100644 index 00000000..9c13fc83 --- /dev/null +++ b/src/shell/command/history.rs @@ -0,0 +1,68 @@ +use std::io::prelude::*; +use std::{string::String, vec::Vec}; + +pub struct CommandHistory { + history: Vec, + current_index: usize, + max_size: usize, +} + +impl CommandHistory { + pub fn new(max_size: usize) -> Self { + Self { + history: Vec::new(), + current_index: 0, + max_size, + } + } + + pub fn add_command(&mut self, cmd: String) { + if !cmd.trim().is_empty() && self.history.last() != Some(&cmd) { + if self.history.len() >= self.max_size { + self.history.remove(0); + } + self.history.push(cmd); + } + self.current_index = self.history.len(); + } + + #[allow(dead_code)] + pub fn previous(&mut self) -> Option<&String> { + if self.current_index > 0 { + self.current_index -= 1; + self.history.get(self.current_index) + } else { + None + } + } + + #[allow(dead_code)] + pub fn next(&mut self) -> Option<&String> { + if self.current_index < self.history.len() { + self.current_index += 1; + if self.current_index < self.history.len() { + self.history.get(self.current_index) + } else { + None + } + } else { + None + } + } +} + +#[allow(unused_must_use)] +pub fn clear_line_and_redraw( + stdout: &mut dyn Write, + prompt: &str, + content: &str, + cursor_pos: usize, +) { + write!(stdout, "\r"); + write!(stdout, "\x1b[2K"); + write!(stdout, "{prompt}{content}"); + if cursor_pos < content.len() { + write!(stdout, "\x1b[{}D", content.len() - cursor_pos); + } + stdout.flush(); +} diff --git a/src/shell/command/mod.rs b/src/shell/command/mod.rs new file mode 100644 index 00000000..434dc5a2 --- /dev/null +++ b/src/shell/command/mod.rs @@ -0,0 +1,562 @@ +mod base; +mod history; +mod vm; + +pub use base::*; +pub use history::*; +pub use vm::*; + +use std::io::prelude::*; +use std::string::String; +use std::vec::Vec; +use std::{collections::BTreeMap, string::ToString}; +use std::{print, println}; + +lazy_static::lazy_static! { + pub static ref COMMAND_TREE: BTreeMap = build_command_tree(); +} + +#[derive(Debug, Clone)] +pub struct CommandNode { + handler: Option, + subcommands: BTreeMap, + description: &'static str, + usage: Option<&'static str>, + #[allow(dead_code)] + log_level: log::LevelFilter, + options: Vec, + flags: Vec, +} + +#[derive(Debug, Clone)] +pub struct OptionDef { + name: &'static str, + short: Option, + long: Option<&'static str>, + description: &'static str, + required: bool, +} + +#[derive(Debug, Clone)] +pub struct FlagDef { + name: &'static str, + short: Option, + long: Option<&'static str>, + description: &'static str, +} + +#[derive(Debug, Clone)] +pub struct ParsedCommand { + pub command_path: Vec, + pub options: BTreeMap, + pub flags: BTreeMap, + pub positional_args: Vec, +} + +#[derive(Debug)] +pub enum ParseError { + UnknownCommand(String), + UnknownOption(String), + MissingValue(String), + MissingRequiredOption(String), + NoHandler(String), +} + +impl CommandNode { + pub fn new(description: &'static str) -> Self { + Self { + handler: None, + subcommands: BTreeMap::new(), + description, + usage: None, + log_level: log::LevelFilter::Off, + options: Vec::new(), + flags: Vec::new(), + } + } + + pub fn with_handler(mut self, handler: fn(&ParsedCommand)) -> Self { + self.handler = Some(handler); + self + } + + pub fn with_usage(mut self, usage: &'static str) -> Self { + self.usage = Some(usage); + self + } + + #[allow(dead_code)] + pub fn with_log_level(mut self, level: log::LevelFilter) -> Self { + self.log_level = level; + self + } + + pub fn with_option(mut self, option: OptionDef) -> Self { + self.options.push(option); + self + } + + pub fn with_flag(mut self, flag: FlagDef) -> Self { + self.flags.push(flag); + self + } + + pub fn add_subcommand>(mut self, name: S, node: CommandNode) -> Self { + self.subcommands.insert(name.into(), node); + self + } +} + +impl OptionDef { + pub fn new(name: &'static str, description: &'static str) -> Self { + Self { + name, + short: None, + long: None, + description, + required: false, + } + } + + pub fn with_short(mut self, short: char) -> Self { + self.short = Some(short); + self + } + + pub fn with_long(mut self, long: &'static str) -> Self { + self.long = Some(long); + self + } + + #[allow(dead_code)] + pub fn required(mut self) -> Self { + self.required = true; + self + } +} + +impl FlagDef { + pub fn new(name: &'static str, description: &'static str) -> Self { + Self { + name, + short: None, + long: None, + description, + } + } + + pub fn with_short(mut self, short: char) -> Self { + self.short = Some(short); + self + } + + pub fn with_long(mut self, long: &'static str) -> Self { + self.long = Some(long); + self + } +} + +// Command Parser +pub struct CommandParser; + +impl CommandParser { + pub fn parse(input: &str) -> Result { + let tokens = Self::tokenize(input); + if tokens.is_empty() { + return Err(ParseError::UnknownCommand("empty command".to_string())); + } + + // Find the command path + let (command_path, command_node, remaining_tokens) = Self::find_command(&tokens)?; + + // Parse the arguments + let (options, flags, positional_args) = Self::parse_args(remaining_tokens, command_node)?; + + // Validate required options + Self::validate_required_options(command_node, &options)?; + + Ok(ParsedCommand { + command_path, + options, + flags, + positional_args, + }) + } + + fn tokenize(input: &str) -> Vec { + let mut tokens = Vec::new(); + let mut current_token = String::new(); + let mut in_quotes = false; + let mut escape_next = false; + + for ch in input.chars() { + if escape_next { + current_token.push(ch); + escape_next = false; + } else if ch == '\\' { + escape_next = true; + } else if ch == '"' { + in_quotes = !in_quotes; + } else if ch.is_whitespace() && !in_quotes { + if !current_token.is_empty() { + tokens.push(current_token.clone()); + current_token.clear(); + } + } else { + current_token.push(ch); + } + } + + if !current_token.is_empty() { + tokens.push(current_token); + } + + tokens + } + + fn find_command( + tokens: &[String], + ) -> Result<(Vec, &CommandNode, &[String]), ParseError> { + let mut current_node = COMMAND_TREE + .get(&tokens[0]) + .ok_or_else(|| ParseError::UnknownCommand(tokens[0].clone()))?; + + let mut command_path = vec![tokens[0].clone()]; + let mut token_index = 1; + + // Traverse to find the deepest command node + while token_index < tokens.len() { + if let Some(subcommand) = current_node.subcommands.get(&tokens[token_index]) { + current_node = subcommand; + command_path.push(tokens[token_index].clone()); + token_index += 1; + } else { + break; + } + } + + Ok((command_path, current_node, &tokens[token_index..])) + } + + #[allow(clippy::type_complexity)] + fn parse_args( + tokens: &[String], + command_node: &CommandNode, + ) -> Result< + ( + BTreeMap, + BTreeMap, + Vec, + ), + ParseError, + > { + let mut options = BTreeMap::new(); + let mut flags = BTreeMap::new(); + let mut positional_args = Vec::new(); + let mut i = 0; + + while i < tokens.len() { + let token = &tokens[i]; + + if let Some(name) = token.strip_prefix("--") { + // Long options/flags + if let Some(eq_pos) = name.find('=') { + // --option=value format + let (opt_name, value) = name.split_at(eq_pos); + let value = &value[1..]; // Skip '=' + if Self::is_option(opt_name, command_node) { + options.insert(opt_name.to_string(), value.to_string()); + } else { + return Err(ParseError::UnknownOption(format!("--{opt_name}"))); + } + } else if Self::is_flag(name, command_node) { + flags.insert(name.to_string(), true); + } else if Self::is_option(name, command_node) { + // --option value format + if i + 1 >= tokens.len() { + return Err(ParseError::MissingValue(format!("--{name}"))); + } + options.insert(name.to_string(), tokens[i + 1].clone()); + i += 1; // Skip value + } else { + return Err(ParseError::UnknownOption(format!("--{name}"))); + } + } else if token.starts_with('-') && token.len() > 1 { + // Short options/flags + let chars: Vec = token[1..].chars().collect(); + for (j, &ch) in chars.iter().enumerate() { + if Self::is_short_flag(ch, command_node) { + flags.insert( + Self::get_flag_name_by_short(ch, command_node) + .unwrap() + .to_string(), + true, + ); + } else if Self::is_short_option(ch, command_node) { + let opt_name = Self::get_option_name_by_short(ch, command_node).unwrap(); + if j == chars.len() - 1 && i + 1 < tokens.len() { + // Last character and there is a next token as value + options.insert(opt_name.to_string(), tokens[i + 1].clone()); + i += 1; // Skip value + } else { + return Err(ParseError::MissingValue(format!("-{ch}"))); + } + } else { + return Err(ParseError::UnknownOption(format!("-{ch}"))); + } + } + } else { + // Positional arguments + positional_args.push(token.clone()); + } + i += 1; + } + + Ok((options, flags, positional_args)) + } + + fn is_option(name: &str, node: &CommandNode) -> bool { + node.options + .iter() + .any(|opt| (opt.long == Some(name)) || opt.name == name) + } + + fn is_flag(name: &str, node: &CommandNode) -> bool { + node.flags + .iter() + .any(|flag| (flag.long == Some(name)) || flag.name == name) + } + + fn is_short_option(ch: char, node: &CommandNode) -> bool { + node.options.iter().any(|opt| opt.short == Some(ch)) + } + + fn is_short_flag(ch: char, node: &CommandNode) -> bool { + node.flags.iter().any(|flag| flag.short == Some(ch)) + } + + fn get_option_name_by_short(ch: char, node: &CommandNode) -> Option<&str> { + node.options + .iter() + .find(|opt| opt.short == Some(ch)) + .map(|opt| opt.name) + } + + fn get_flag_name_by_short(ch: char, node: &CommandNode) -> Option<&str> { + node.flags + .iter() + .find(|flag| flag.short == Some(ch)) + .map(|flag| flag.name) + } + + fn validate_required_options( + node: &CommandNode, + options: &BTreeMap, + ) -> Result<(), ParseError> { + for option in &node.options { + if option.required && !options.contains_key(option.name) { + return Err(ParseError::MissingRequiredOption(option.name.to_string())); + } + } + Ok(()) + } +} + +// Command execution function +pub fn execute_command(input: &str) -> Result<(), ParseError> { + let parsed = CommandParser::parse(input)?; + + // Find the corresponding command node + let mut current_node = COMMAND_TREE.get(&parsed.command_path[0]).unwrap(); + for cmd in &parsed.command_path[1..] { + current_node = current_node.subcommands.get(cmd).unwrap(); + } + + // Execute the command + if let Some(handler) = current_node.handler { + handler(&parsed); + Ok(()) + } else { + Err(ParseError::NoHandler(parsed.command_path.join(" "))) + } +} + +// Build command tree +fn build_command_tree() -> BTreeMap { + let mut tree = BTreeMap::new(); + + build_base_cmd(&mut tree); + build_vm_cmd(&mut tree); + + tree +} + +// Helper function: Display command help +pub fn show_help(command_path: &[String]) -> Result<(), ParseError> { + let mut current_node = COMMAND_TREE + .get(&command_path[0]) + .ok_or_else(|| ParseError::UnknownCommand(command_path[0].clone()))?; + + for cmd in &command_path[1..] { + current_node = current_node + .subcommands + .get(cmd) + .ok_or_else(|| ParseError::UnknownCommand(cmd.clone()))?; + } + + println!("Command: {}", command_path.join(" ")); + println!("Description: {}", current_node.description); + + if let Some(usage) = current_node.usage { + println!("Usage: {}", usage); + } + + if !current_node.options.is_empty() { + println!("\nOptions:"); + for option in ¤t_node.options { + let mut opt_str = String::new(); + if let Some(short) = option.short { + opt_str.push_str(&format!("-{short}")); + } + if let Some(long) = option.long { + if !opt_str.is_empty() { + opt_str.push_str(", "); + } + opt_str.push_str(&format!("--{long}")); + } + if opt_str.is_empty() { + opt_str = option.name.to_string(); + } + + let required_str = if option.required { " (required)" } else { "" }; + println!(" {:<20} {}{}", opt_str, option.description, required_str); + } + } + + if !current_node.flags.is_empty() { + println!("\nFlags:"); + for flag in ¤t_node.flags { + let mut flag_str = String::new(); + if let Some(short) = flag.short { + flag_str.push_str(&format!("-{short}")); + } + if let Some(long) = flag.long { + if !flag_str.is_empty() { + flag_str.push_str(", "); + } + flag_str.push_str(&format!("--{long}")); + } + if flag_str.is_empty() { + flag_str = flag.name.to_string(); + } + + println!(" {:<20} {}", flag_str, flag.description); + } + } + + if !current_node.subcommands.is_empty() { + println!("\nSubcommands:"); + for (name, node) in ¤t_node.subcommands { + println!(" {:<20} {}", name, node.description); + } + } + + Ok(()) +} + +pub fn print_prompt() { + print!("axvisor:{}$ ", std::env::current_dir().unwrap()); + std::io::stdout().flush().unwrap(); +} + +pub fn run_cmd_bytes(cmd_bytes: &[u8]) { + match str::from_utf8(cmd_bytes) { + Ok(cmd_str) => { + let trimmed = cmd_str.trim(); + if trimmed.is_empty() { + return; + } + + match execute_command(trimmed) { + Ok(_) => { + // Command executed successfully + } + Err(ParseError::UnknownCommand(cmd)) => { + println!("Error: Unknown command '{}'", cmd); + println!("Type 'help' to see available commands"); + } + Err(ParseError::UnknownOption(opt)) => { + println!("Error: Unknown option '{}'", opt); + } + Err(ParseError::MissingValue(opt)) => { + println!("Error: Option '{}' is missing a value", opt); + } + Err(ParseError::MissingRequiredOption(opt)) => { + println!("Error: Missing required option '{}'", opt); + } + Err(ParseError::NoHandler(cmd)) => { + println!("Error: Command '{}' has no handler function", cmd); + } + } + } + Err(_) => { + println!("Error: Input contains invalid UTF-8 characters"); + } + } +} + +// Built-in command handler +pub fn handle_builtin_commands(input: &str) -> bool { + match input.trim() { + "help" => { + show_available_commands(); + true + } + "exit" | "quit" => { + println!("Goodbye!"); + std::process::exit(0); + } + "clear" => { + print!("\x1b[2J\x1b[H"); // ANSI clear screen sequence + std::io::stdout().flush().unwrap(); + true + } + _ if input.starts_with("help ") => { + let cmd_parts: Vec = input[5..] + .split_whitespace() + .map(|s| s.to_string()) + .collect(); + if let Err(e) = show_help(&cmd_parts) { + println!("Error: {:?}", e); + } + true + } + _ => false, + } +} + +pub fn show_available_commands() { + println!("ArceOS Shell - Available Commands:"); + println!(); + + // Display all top-level commands + for (name, node) in COMMAND_TREE.iter() { + println!(" {:<15} {}", name, node.description); + + // Display subcommands + if !node.subcommands.is_empty() { + for (sub_name, sub_node) in &node.subcommands { + println!(" {:<13} {}", sub_name, sub_node.description); + } + } + } + + println!(); + println!("Built-in Commands:"); + println!(" help Show help information"); + println!(" help Show help for a specific command"); + println!(" clear Clear the screen"); + println!(" exit/quit Exit the shell"); + println!(); + println!("Tip: Use 'help ' to see detailed usage of a command"); +} diff --git a/src/shell/command/vm.rs b/src/shell/command/vm.rs new file mode 100644 index 00000000..3f6ba782 --- /dev/null +++ b/src/shell/command/vm.rs @@ -0,0 +1,821 @@ +use std::{ + collections::btree_map::BTreeMap, + fs::read_to_string, + println, + string::{String, ToString}, + vec::Vec, +}; + +use crate::{ + shell::command::{CommandNode, FlagDef, OptionDef, ParsedCommand}, + vmm::{ + add_running_vm_count, config::init_guest_vm, get_running_vm_count, vcpus, vm_list, with_vm, + }, +}; + +fn vm_help(_cmd: &ParsedCommand) { + println!("VM - virtual machine management"); + println!("Most commonly used vm commands:"); + println!(" create Create a new virtual machine"); + println!(" start Start a virtual machine"); + println!(" stop Stop a virtual machine"); + println!(" restart Restart a virtual machine"); + println!(" delete Delete a virtual machine"); + println!(" list Show virtual machine lists"); + println!(" show Show virtual machine details"); + println!(" status Show virtual machine status"); + println!(); + println!("Use 'vm --help' for more information on a specific command."); +} + +fn vm_create(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + + println!("Positional args: {:?}", args); + + if args.is_empty() { + println!("Error: No VM configuration file specified"); + println!("Usage: vm create [CONFIG_FILE]"); + return; + } + + let initial_vm_count = vm_list::get_vm_list().len(); + + let mut processed_count = 0; + for config_path in args.iter() { + println!("Creating VM from config: {}", config_path); + + match read_to_string(config_path) { + Ok(raw_cfg) => match init_guest_vm(&raw_cfg) { + Ok(_) => { + println!("✓ Successfully created VM from config: {}", config_path); + processed_count += 1; + } + Err(_) => { + println!( + "✗ Failed to create VM from {}: Configuration error or panic occurred", + config_path + ); + } + }, + Err(e) => { + println!("✗ Failed to read config file {}: {:?}", config_path, e); + } + } + } + + // Check the actual number of VMs created + let final_vm_count = vm_list::get_vm_list().len(); + let created_count = final_vm_count - initial_vm_count; + + if created_count > 0 { + println!("Successfully created {} VM(s)", created_count); + } else if processed_count > 0 { + println!( + "Processed {} config file(s) but no VMs were actually created", + processed_count + ); + } +} + +fn vm_start(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let detach = cmd.flags.get("detach").unwrap_or(&false); + + if args.is_empty() { + // start all VMs + info!("VMM starting, booting all VMs..."); + let mut started_count = 0; + + for vm in vm_list::get_vm_list() { + // Set up primary virtual CPU before starting + vcpus::setup_vm_primary_vcpu(vm.clone()); + + match vm.boot() { + Ok(_) => { + vcpus::notify_primary_vcpu(vm.id()); + add_running_vm_count(1); + println!("✓ VM[{}] started successfully", vm.id()); + started_count += 1; + } + Err(err) => { + println!("✗ VM[{}] failed to start: {:?}", vm.id(), err); + } + } + } + println!("Started {} VM(s)", started_count); + } else { + // Start specified VMs + for vm_name in args { + // Try to parse as VM ID or lookup VM name + if let Ok(vm_id) = vm_name.parse::() { + start_vm_by_id(vm_id); + } else { + println!("Error: VM name lookup not implemented. Use VM ID instead."); + println!("Available VMs:"); + vm_list_simple(); + } + } + } + + if *detach { + println!("VMs started in background mode"); + } +} + +fn start_vm_by_id(vm_id: usize) { + // Set up primary virtual CPU before starting + match with_vm(vm_id, |vm| { + vcpus::setup_vm_primary_vcpu(vm.clone()); + vm.boot() + }) { + Some(Ok(_)) => { + vcpus::notify_primary_vcpu(vm_id); + add_running_vm_count(1); + println!("✓ VM[{}] started successfully", vm_id); + } + Some(Err(err)) => { + println!("✗ VM[{}] failed to start: {:?}", vm_id, err); + } + None => { + println!("✗ VM[{}] not found", vm_id); + } + } +} + +fn vm_stop(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let force = cmd.flags.get("force").unwrap_or(&false); + + if args.is_empty() { + println!("Error: No VM specified"); + println!("Usage: vm stop [OPTIONS] "); + return; + } + + for vm_name in args { + if let Ok(vm_id) = vm_name.parse::() { + stop_vm_by_id(vm_id, *force); + } else { + println!("Error: Invalid VM ID: {}", vm_name); + } + } +} + +fn stop_vm_by_id(vm_id: usize, force: bool) { + match with_vm(vm_id, |vm| { + if force { + println!("Force stopping VM[{}]...", vm_id); + // Force shutdown, directly call shutdown + vm.shutdown() + } else { + println!("Stopping VM[{}]...", vm_id); + vm.shutdown() + } + }) { + Some(Ok(_)) => { + println!("✓ VM[{}] stopped successfully", vm_id); + } + Some(Err(err)) => { + println!("✗ Failed to stop VM[{}]: {:?}", vm_id, err); + } + None => { + println!("✗ VM[{}] not found", vm_id); + } + } +} + +fn vm_restart(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let force = cmd.flags.get("force").unwrap_or(&false); + + if args.is_empty() { + println!("Error: No VM specified"); + println!("Usage: vm restart [OPTIONS] "); + return; + } + + for vm_name in args { + if let Ok(vm_id) = vm_name.parse::() { + restart_vm_by_id(vm_id, *force); + } else { + println!("Error: Invalid VM ID: {}", vm_name); + } + } +} + +fn restart_vm_by_id(vm_id: usize, force: bool) { + println!("Restarting VM[{}]...", vm_id); + + // First stop the virtual machine + stop_vm_by_id(vm_id, force); + + // Wait for a period to ensure complete shutdown + // In actual implementation, more complex state checking may be needed + + // Restart the virtual machine + start_vm_by_id(vm_id); +} + +fn vm_delete(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let force = cmd.flags.get("force").unwrap_or(&false); + let keep_data = cmd.flags.get("keep-data").unwrap_or(&false); + + if args.is_empty() { + println!("Error: No VM specified"); + println!("Usage: vm delete [OPTIONS] "); + return; + } + + let vm_name = &args[0]; + + if let Ok(vm_id) = vm_name.parse::() { + if !force { + println!( + "Are you sure you want to delete VM[{}]? (This operation cannot be undone)", + vm_id + ); + println!("Use --force to skip confirmation"); + return; + } + + delete_vm_by_id(vm_id, *keep_data); + } else { + println!("Error: Invalid VM ID: {}", vm_name); + } +} + +fn delete_vm_by_id(vm_id: usize, keep_data: bool) { + // First ensure VM is stopped + with_vm(vm_id, |vm| vm.shutdown()).unwrap_or(Ok(())).ok(); + + // Remove VM from global list + match crate::vmm::vm_list::remove_vm(vm_id) { + Some(_) => { + if keep_data { + println!("✓ VM[{}] deleted (data preserved)", vm_id); + } else { + println!("✓ VM[{}] deleted completely", vm_id); + // Here all VM-related data files should be cleaned up + } + } + None => { + println!("✗ VM[{}] not found", vm_id); + } + } +} + +fn vm_list_simple() { + let vms = vm_list::get_vm_list(); + println!("ID NAME STATE VCPU MEMORY"); + println!("---- ----------- ------- ---- ------"); + for vm in vms { + let state = if vm.running() { + "running" + } else if vm.shutting_down() { + "stopping" + } else { + "stopped" + }; + + // Calculate total memory size + let total_memory: usize = vm.memory_regions().iter().map(|region| region.size()).sum(); + + println!( + "{:<4} {:<11} {:<7} {:<4} {}MB", + vm.id(), + vm.with_config(|cfg| cfg.name()), + state, + vm.vcpu_num(), + total_memory / (1024 * 1024) // Convert to MB + ); + } +} + +fn vm_list(cmd: &ParsedCommand) { + let show_all = cmd.flags.get("all").unwrap_or(&false); + let binding = "table".to_string(); + let format = cmd.options.get("format").unwrap_or(&binding); + + let vms = vm_list::get_vm_list(); + + if format == "json" { + println!("{{"); + println!(" \"vms\": ["); + for (i, vm) in vms.iter().enumerate() { + let state = if vm.running() { + "running" + } else if vm.shutting_down() { + "stopping" + } else { + "stopped" + }; + + let total_memory: usize = vm.memory_regions().iter().map(|region| region.size()).sum(); + + println!(" {{"); + println!(" \"id\": {},", vm.id()); + println!(" \"name\": \"{}\",", vm.with_config(|cfg| cfg.name())); + println!(" \"state\": \"{}\",", state); + println!(" \"vcpu\": {},", vm.vcpu_num()); + println!(" \"memory\": \"{}MB\",", total_memory / (1024 * 1024)); + println!( + " \"interrupt_mode\": \"{:?}\"", + vm.with_config(|cfg| cfg.interrupt_mode()) + ); + + if i < vms.len() - 1 { + println!(" }},"); + } else { + println!(" }}"); + } + } + println!(" ]"); + println!("}}"); + } else { + println!("Virtual Machines:"); + if vms.is_empty() { + println!("No virtual machines found."); + return; + } + + // Count running VMs before filtering + let running_count = vms.iter().filter(|vm| vm.running()).count(); + let total_count = vms.len(); + + // Filter displayed VMs + let display_vms: Vec<_> = if *show_all { + vms + } else { + vms.into_iter().filter(|vm| vm.running()).collect() + }; + + if display_vms.is_empty() && !*show_all { + println!("No running virtual machines found."); + println!("Use --all to show all VMs including stopped ones."); + return; + } + + println!("ID NAME STATE VCPU MEMORY"); + println!("---- ----------- ------- ---- ------"); + for vm in display_vms { + let state = if vm.running() { + "🟢 running" + } else if vm.shutting_down() { + "🟡 stopping" + } else { + "🔴 stopped" + }; + + let total_memory: usize = vm.memory_regions().iter().map(|region| region.size()).sum(); + + println!( + "{:<4} {:<11} {:<9} {:<4} {:<8}", + vm.id(), + vm.with_config(|cfg| cfg.name()), + state, + vm.vcpu_num(), + format!("{}MB", total_memory / (1024 * 1024)) + ); + } + + if !show_all && running_count < total_count { + println!( + "\nShowing {} running VMs. Use --all to show all {} VMs.", + running_count, total_count + ); + } + } +} + +fn vm_show(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let show_config = cmd.flags.get("config").unwrap_or(&false); + let show_stats = cmd.flags.get("stats").unwrap_or(&false); + + if args.is_empty() { + println!("Error: No VM specified"); + println!("Usage: vm show [OPTIONS] "); + return; + } + + let vm_name = &args[0]; + if let Ok(vm_id) = vm_name.parse::() { + show_vm_details(vm_id, *show_config, *show_stats); + } else { + println!("Error: Invalid VM ID: {}", vm_name); + } +} + +/// Show detailed information about a specific VM. +fn show_vm_details(vm_id: usize, show_config: bool, show_stats: bool) { + match with_vm(vm_id, |vm| { + let state = if vm.running() { + "🟢 running" + } else if vm.shutting_down() { + "🟡 stopping" + } else { + "🔴 stopped" + }; + + println!("VM Details: {}", vm_id); + println!(" ID: {}", vm.id()); + println!(" Name: {}", vm.with_config(|cfg| cfg.name())); + println!(" State: {}", state); + println!(" VCPUs: {}", vm.vcpu_num()); + + // show VCPU information + println!(" VCPU List:"); + for (i, vcpu) in vm.vcpu_list().iter().enumerate() { + if let Some(phys_cpu_set) = vcpu.phys_cpu_set() { + println!(" VCPU[{}]: CPU affinity mask = {:#x}", i, phys_cpu_set); + } else { + println!(" VCPU[{}]: No CPU affinity set", i); + } + } + + if show_config { + println!(); + println!("Configuration:"); + vm.with_config(|cfg| { + println!(" BSP Entry: {:#x}", cfg.bsp_entry().as_usize()); + println!(" AP Entry: {:#x}", cfg.ap_entry().as_usize()); + println!(" Interrupt Mode: {:?}", cfg.interrupt_mode()); + + // show passthrough devices + if !cfg.pass_through_devices().is_empty() { + println!(" Passthrough Devices:"); + for device in cfg.pass_through_devices() { + println!( + " {}: GPA[{:#x}~{:#x}] -> HPA[{:#x}~{:#x}]", + device.name, + device.base_gpa, + device.base_gpa + device.length, + device.base_hpa, + device.base_hpa + device.length + ); + } + } + + // show emulated devices + if !cfg.emu_devices().is_empty() { + println!(" Emulated Devices:"); + for device in cfg.emu_devices() { + println!(" {:?}", device); + } + } + }); + } + + if show_stats { + println!(); + println!("Statistics:"); + println!(" EPT Root: {:#x}", vm.ept_root().as_usize()); + println!( + " Device Count: {}", + vm.get_devices().iter_mmio_dev().count() + ); + + let mut vcpu_states = BTreeMap::new(); + for vcpu in vm.vcpu_list() { + let state_key = match vcpu.state() { + axvcpu::VCpuState::Free => "Free", + axvcpu::VCpuState::Running => "Running", + axvcpu::VCpuState::Blocked => "Blocked", + axvcpu::VCpuState::Invalid => "Invalid", + axvcpu::VCpuState::Created => "Created", + axvcpu::VCpuState::Ready => "Ready", + }; + *vcpu_states.entry(state_key).or_insert(0) += 1; + } + + println!(" VCPU States:"); + for (state, count) in vcpu_states { + println!(" {}: {}", state, count); + } + } + }) { + Some(_) => {} + None => { + println!("✗ VM[{}] not found", vm_id); + } + } +} + +fn vm_status(cmd: &ParsedCommand) { + let args = &cmd.positional_args; + let watch = cmd.flags.get("watch").unwrap_or(&false); + + if args.is_empty() { + // show all VM status + show_all_vm_status(*watch); + return; + } + + let vm_name = &args[0]; + if let Ok(vm_id) = vm_name.parse::() { + show_vm_status(vm_id, *watch); + } else { + println!("Error: Invalid VM ID: {}", vm_name); + } +} + +/// Show status of a specific VM. +fn show_vm_status(vm_id: usize, watch: bool) { + if watch { + println!("Watching VM[{}] status (press Ctrl+C to stop):", vm_id); + // TODO: add real-time status information + } + + match with_vm(vm_id, |vm| { + let state = if vm.running() { + "🟢 running" + } else if vm.shutting_down() { + "🟡 stopping" + } else { + "🔴 stopped" + }; + + println!("Virtual machine status for VM[{}]:", vm_id); + println!(" ID: {}", vm.id()); + println!(" Name: {}", vm.with_config(|cfg| cfg.name())); + println!(" State: {}", state); + println!(" VCPUs: {}", vm.vcpu_num()); + + // Calculate total memory + let total_memory: usize = vm.memory_regions().iter().map(|region| region.size()).sum(); + + println!(" Total Memory: {}MB", total_memory / (1024 * 1024)); + + // Show memory region details + println!(" Memory Regions:"); + for (i, region) in vm.memory_regions().iter().enumerate() { + println!( + " Region[{}]: GPA[{:#x}~{:#x}] Size={}KB", + i, + region.gpa, + region.gpa + region.size(), + region.size() / 1024 + ); + } + + println!(" VCPU Details:"); + for vcpu in vm.vcpu_list() { + let vcpu_state = match vcpu.state() { + axvcpu::VCpuState::Free => "Free", + axvcpu::VCpuState::Running => "Running", + axvcpu::VCpuState::Blocked => "Blocked", + axvcpu::VCpuState::Invalid => "Invalid", + axvcpu::VCpuState::Created => "Created", + axvcpu::VCpuState::Ready => "Ready", + }; + + if let Some(phys_cpu_set) = vcpu.phys_cpu_set() { + println!( + " VCPU[{}]: {} (CPU affinity: {:#x})", + vcpu.id(), + vcpu_state, + phys_cpu_set + ); + } else { + println!(" VCPU[{}]: {} (No CPU affinity)", vcpu.id(), vcpu_state); + } + } + + // show device information + let mmio_dev_count = vm.get_devices().iter_mmio_dev().count(); + println!(" Devices: {} MMIO devices", mmio_dev_count); + + // TODO: add more real-time status information + // println!(" Network: connected/disconnected"); + // println!(" Uptime: {} seconds", uptime); + }) { + Some(_) => {} + None => { + println!("✗ VM[{}] not found", vm_id); + } + } +} + +/// Show status of all VMs in a summary format. +fn show_all_vm_status(watch: bool) { + if watch { + println!("Watching all VMs status (press Ctrl+C to stop):"); + } + + let vms = vm_list::get_vm_list(); + if vms.is_empty() { + println!("No virtual machines found."); + return; + } + + println!("System Status:"); + println!(" Total VMs: {}", vms.len()); + println!(" Running VMs: {}", get_running_vm_count()); + + let mut running_count = 0; + let mut stopping_count = 0; + let mut stopped_count = 0; + let mut total_vcpus = 0; + let mut total_memory = 0; + + for vm in &vms { + if vm.running() { + running_count += 1; + } else if vm.shutting_down() { + stopping_count += 1; + } else { + stopped_count += 1; + } + + total_vcpus += vm.vcpu_num(); + total_memory += vm + .memory_regions() + .iter() + .map(|region| region.size()) + .sum::(); + } + + println!(" Total VCPUs: {}", total_vcpus); + println!(" Total Memory: {}MB", total_memory / (1024 * 1024)); + println!(); + + println!("VM Status Overview:"); + println!(" 🟢 Running: {}", running_count); + println!(" 🟡 Stopping: {}", stopping_count); + println!(" 🔴 Stopped: {}", stopped_count); + println!(); + + println!("Individual VM Status:"); + for vm in vms { + let state_icon = if vm.running() { + "🟢" + } else if vm.shutting_down() { + "🟡" + } else { + "🔴" + }; + + let vm_memory: usize = vm.memory_regions().iter().map(|region| region.size()).sum(); + + println!( + " {} VM[{}] {} ({} VCPUs, {}MB)", + state_icon, + vm.id(), + vm.with_config(|cfg| cfg.name()), + vm.vcpu_num(), + vm_memory / (1024 * 1024), + ); + + if vm.running() { + let mut vcpu_summary = BTreeMap::new(); + for vcpu in vm.vcpu_list() { + let state = match vcpu.state() { + axvcpu::VCpuState::Free => "Free", + axvcpu::VCpuState::Running => "Running", + axvcpu::VCpuState::Blocked => "Blocked", + axvcpu::VCpuState::Invalid => "Invalid", + axvcpu::VCpuState::Created => "Created", + axvcpu::VCpuState::Ready => "Ready", + }; + *vcpu_summary.entry(state).or_insert(0) += 1; + } + + let summary_str: Vec = vcpu_summary + .into_iter() + .map(|(state, count)| format!("{state}:{count}")) + .collect(); + + if !summary_str.is_empty() { + println!(" VCPUs: {}", summary_str.join(", ")); + } + } + } +} + +/// Build the VM command tree and register it. +pub fn build_vm_cmd(tree: &mut BTreeMap) { + let create_cmd = CommandNode::new("Create a new virtual machine") + .with_handler(vm_create) + .with_usage("vm create [OPTIONS] ...") + .with_option( + OptionDef::new("name", "Virtual machine name") + .with_short('n') + .with_long("name"), + ) + .with_option( + OptionDef::new("cpu", "Number of CPU cores") + .with_short('c') + .with_long("cpu"), + ) + .with_option( + OptionDef::new("memory", "Amount of memory") + .with_short('m') + .with_long("memory"), + ) + .with_flag( + FlagDef::new("force", "Force creation without confirmation") + .with_short('f') + .with_long("force"), + ); + + let start_cmd = CommandNode::new("Start a virtual machine") + .with_handler(vm_start) + .with_usage("vm start [OPTIONS] [VM_ID...]") + .with_flag( + FlagDef::new("detach", "Start in background") + .with_short('d') + .with_long("detach"), + ) + .with_flag( + FlagDef::new("console", "Attach to console") + .with_short('c') + .with_long("console"), + ); + + let stop_cmd = CommandNode::new("Stop a virtual machine") + .with_handler(vm_stop) + .with_usage("vm stop [OPTIONS] ...") + .with_flag( + FlagDef::new("force", "Force stop") + .with_short('f') + .with_long("force"), + ) + .with_flag( + FlagDef::new("graceful", "Graceful shutdown") + .with_short('g') + .with_long("graceful"), + ); + + let restart_cmd = CommandNode::new("Restart a virtual machine") + .with_handler(vm_restart) + .with_usage("vm restart [OPTIONS] ...") + .with_flag( + FlagDef::new("force", "Force restart") + .with_short('f') + .with_long("force"), + ); + + let delete_cmd = CommandNode::new("Delete a virtual machine") + .with_handler(vm_delete) + .with_usage("vm delete [OPTIONS] ") + .with_flag( + FlagDef::new("force", "Skip confirmation") + .with_short('f') + .with_long("force"), + ) + .with_flag(FlagDef::new("keep-data", "Keep VM data").with_long("keep-data")); + + let list_cmd = CommandNode::new("Show virtual machine lists") + .with_handler(vm_list) + .with_usage("vm list [OPTIONS]") + .with_flag( + FlagDef::new("all", "Show all VMs including stopped ones") + .with_short('a') + .with_long("all"), + ) + .with_option(OptionDef::new("format", "Output format (table, json)").with_long("format")); + + let show_cmd = CommandNode::new("Show virtual machine details") + .with_handler(vm_show) + .with_usage("vm show [OPTIONS] ") + .with_flag( + FlagDef::new("config", "Show configuration") + .with_short('c') + .with_long("config"), + ) + .with_flag( + FlagDef::new("stats", "Show statistics") + .with_short('s') + .with_long("stats"), + ); + + let status_cmd = CommandNode::new("Show virtual machine status") + .with_handler(vm_status) + .with_usage("vm status [OPTIONS] [VM_ID]") + .with_flag( + FlagDef::new("watch", "Watch status changes") + .with_short('w') + .with_long("watch"), + ); + + // main VM command + let vm_node = CommandNode::new("Virtual machine management") + .with_handler(vm_help) + .with_usage("vm [options] [args...]") + .add_subcommand( + "help", + CommandNode::new("Show VM help").with_handler(vm_help), + ) + .add_subcommand("create", create_cmd) + .add_subcommand("start", start_cmd) + .add_subcommand("stop", stop_cmd) + .add_subcommand("restart", restart_cmd) + .add_subcommand("delete", delete_cmd) + .add_subcommand("list", list_cmd) + .add_subcommand("show", show_cmd) + .add_subcommand("status", status_cmd); + + tree.insert("vm".to_string(), vm_node); +} diff --git a/src/shell/mod.rs b/src/shell/mod.rs new file mode 100644 index 00000000..5af82752 --- /dev/null +++ b/src/shell/mod.rs @@ -0,0 +1,209 @@ +mod command; + +use std::io::prelude::*; +use std::println; +use std::string::ToString; + +use crate::shell::command::{ + CommandHistory, clear_line_and_redraw, handle_builtin_commands, print_prompt, run_cmd_bytes, +}; + +const LF: u8 = b'\n'; +const CR: u8 = b'\r'; +const DL: u8 = b'\x7f'; +const BS: u8 = b'\x08'; +const ESC: u8 = 0x1b; // ESC key + +const MAX_LINE_LEN: usize = 256; + +// Initialize the console shell. +pub fn console_init() { + let mut stdin = std::io::stdin(); + let mut stdout = std::io::stdout(); + let mut history = CommandHistory::new(100); + + let mut buf = [0; MAX_LINE_LEN]; + let mut cursor = 0; // cursor position in buffer + let mut line_len = 0; // actual length of current line + + enum InputState { + Normal, + Escape, + EscapeSeq, + } + + let mut input_state = InputState::Normal; + + println!("Welcome to AxVisor Shell!"); + println!("Type 'help' to see available commands"); + println!("Use UP/DOWN arrows to navigate command history"); + println!(); + + print_prompt(); + + loop { + let mut temp_buf = [0u8; 1]; + + let ch = match stdin.read(&mut temp_buf) { + Ok(1) => temp_buf[0], + _ => { + continue; + } + }; + + match input_state { + InputState::Normal => { + match ch { + CR | LF => { + println!(); + if line_len > 0 { + let cmd_str = std::str::from_utf8(&buf[..line_len]).unwrap_or(""); + + // Add to history + history.add_command(cmd_str.to_string()); + + // Execute command + if !handle_builtin_commands(cmd_str) { + run_cmd_bytes(&buf[..line_len]); + } + + // reset buffer + buf[..line_len].fill(0); + cursor = 0; + line_len = 0; + } + print_prompt(); + } + BS | DL => { + // backspace: delete character before cursor / DEL key: delete character at cursor + if cursor > 0 { + // move characters after cursor forward + for i in cursor..line_len { + buf[i - 1] = buf[i]; + } + cursor -= 1; + line_len -= 1; + if line_len < buf.len() { + buf[line_len] = 0; + } + + let current_content = + std::str::from_utf8(&buf[..line_len]).unwrap_or(""); + let prompt = format!("axvisor:{}$ ", &std::env::current_dir().unwrap()); + clear_line_and_redraw(&mut stdout, &prompt, current_content, cursor); + } + } + ESC => { + input_state = InputState::Escape; + } + 0..=31 => { + // ignore other control characters + } + c => { + // insert character + if line_len < MAX_LINE_LEN - 1 { + // move characters after cursor backward to make space for new character + for i in (cursor..line_len).rev() { + buf[i + 1] = buf[i]; + } + buf[cursor] = c; + cursor += 1; + line_len += 1; + + let current_content = + std::str::from_utf8(&buf[..line_len]).unwrap_or(""); + let prompt = format!("axvisor:{}$ ", &std::env::current_dir().unwrap()); + clear_line_and_redraw(&mut stdout, &prompt, current_content, cursor); + } + } + } + } + InputState::Escape => match ch { + b'[' => { + input_state = InputState::EscapeSeq; + } + _ => { + input_state = InputState::Normal; + } + }, + InputState::EscapeSeq => { + match ch { + b'A' => { + // UP arrow - previous command + if let Some(prev_cmd) = history.previous() { + // clear current buffer + buf[..line_len].fill(0); + + let cmd_bytes = prev_cmd.as_bytes(); + let copy_len = cmd_bytes.len().min(MAX_LINE_LEN - 1); + buf[..copy_len].copy_from_slice(&cmd_bytes[..copy_len]); + cursor = copy_len; + line_len = copy_len; + + let prompt = format!("axvisor:{}$ ", &std::env::current_dir().unwrap()); + clear_line_and_redraw(&mut stdout, &prompt, prev_cmd, cursor); + } + input_state = InputState::Normal; + } + b'B' => { + // DOWN arrow - next command + match history.next() { + Some(next_cmd) => { + // clear current buffer + buf[..line_len].fill(0); + + let cmd_bytes = next_cmd.as_bytes(); + let copy_len = cmd_bytes.len().min(MAX_LINE_LEN - 1); + buf[..copy_len].copy_from_slice(&cmd_bytes[..copy_len]); + cursor = copy_len; + line_len = copy_len; + + let prompt = + format!("axvisor:{}$ ", &std::env::current_dir().unwrap()); + clear_line_and_redraw(&mut stdout, &prompt, next_cmd, cursor); + } + None => { + // clear current line + buf[..line_len].fill(0); + cursor = 0; + line_len = 0; + let prompt = + format!("axvisor:{}$ ", &std::env::current_dir().unwrap()); + clear_line_and_redraw(&mut stdout, &prompt, "", cursor); + } + } + input_state = InputState::Normal; + } + b'C' => { + // RIGHT arrow - move cursor right + if cursor < line_len { + cursor += 1; + stdout.write_all(b"\x1b[C").ok(); + stdout.flush().ok(); + } + input_state = InputState::Normal; + } + b'D' => { + // LEFT arrow - move cursor left + if cursor > 0 { + cursor -= 1; + stdout.write_all(b"\x1b[D").ok(); + stdout.flush().ok(); + } + input_state = InputState::Normal; + } + b'3' => { + // check if this is Delete key sequence (ESC[3~) + // need to read next character to confirm + input_state = InputState::Normal; + // can add additional state to handle complete Delete sequence + } + _ => { + // ignore other escape sequences + input_state = InputState::Normal; + } + } + } + } + } +} diff --git a/src/utils/arch/aarch64/cache.S b/src/utils/arch/aarch64/cache.S deleted file mode 100644 index 3a220995..00000000 --- a/src/utils/arch/aarch64/cache.S +++ /dev/null @@ -1,27 +0,0 @@ -// void cache_invalidate_d(u64 start, u64 length); -.global cache_invalidate_d -cache_invalidate_d: - add x2, x0, x1 /* calculate the end address */ - bic x0, x0, #(64 - 1) /* align the start with a cache line */ -1: - dc ivac, x0 /* invalidate cache to PoC by VA */ - add x0, x0, #64 - cmp x0, x2 - blt 1b - mov x0, xzr - dsb sy - ret - -// void cache_clean_invalidate_d(u64 start, u64 length); -.global cache_clean_invalidate_d -cache_clean_invalidate_d: - add x2, x0, x1 /* calculate the end address */ - bic x0, x0, #(64 - 1) /* align the start with a cache line */ -1: - dc civac, x0 /* invalidate cache to PoC by VA */ - add x0, x0, #64 - cmp x0, x2 - blt 1b - mov x0, xzr - dsb sy - ret diff --git a/src/utils/arch/aarch64/cache.rs b/src/utils/arch/aarch64/cache.rs deleted file mode 100644 index 594776ad..00000000 --- a/src/utils/arch/aarch64/cache.rs +++ /dev/null @@ -1,10 +0,0 @@ -use core::arch::global_asm; - -global_asm!(include_str!("cache.S")); - -unsafe extern "C" { - /// Invalidate the data cache. - pub unsafe fn cache_invalidate_d(start: usize, len: usize); - /// Clean and invalidate the data cache. - pub unsafe fn cache_clean_invalidate_d(start: usize, len: usize); -} diff --git a/src/utils/arch/aarch64/mod.rs b/src/utils/arch/aarch64/mod.rs deleted file mode 100644 index 1666a580..00000000 --- a/src/utils/arch/aarch64/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -/// Cache-related operations -pub mod cache; diff --git a/src/utils/arch/mod.rs b/src/utils/arch/mod.rs deleted file mode 100644 index b8bc0af3..00000000 --- a/src/utils/arch/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -//! Architecture-specific types and operations. - -cfg_if::cfg_if! { - if #[cfg(target_arch = "x86_64")] { - mod x86_64; - pub use self::x86_64::*; - } else if #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] { - mod riscv; - pub use self::riscv::*; - } else if #[cfg(target_arch = "aarch64")]{ - mod aarch64; - pub use self::aarch64::*; - } -} diff --git a/src/utils/arch/riscv/mod.rs b/src/utils/arch/riscv/mod.rs deleted file mode 100644 index 1498b1bd..00000000 --- a/src/utils/arch/riscv/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -/// Cache-related operations -pub mod cache { - /// Invalidate the data cache. - pub unsafe fn cache_invalidate_d(start: usize, len: usize) { - // Dummy implementation - } - /// Clean and invalidate the data cache. - pub unsafe fn cache_clean_invalidate_d(start: usize, len: usize) { - // Dummy implementation - } -} diff --git a/src/utils/arch/x86_64/mod.rs b/src/utils/arch/x86_64/mod.rs deleted file mode 100644 index 1498b1bd..00000000 --- a/src/utils/arch/x86_64/mod.rs +++ /dev/null @@ -1,11 +0,0 @@ -/// Cache-related operations -pub mod cache { - /// Invalidate the data cache. - pub unsafe fn cache_invalidate_d(start: usize, len: usize) { - // Dummy implementation - } - /// Clean and invalidate the data cache. - pub unsafe fn cache_clean_invalidate_d(start: usize, len: usize) { - // Dummy implementation - } -} diff --git a/src/utils/mod.rs b/src/utils/mod.rs deleted file mode 100644 index 9c6770b0..00000000 --- a/src/utils/mod.rs +++ /dev/null @@ -1,13 +0,0 @@ -mod arch; - -pub mod cache { - #[allow(unused)] - /// Invalidate the data cache. - pub unsafe fn cache_invalidate_d(start: usize, len: usize) { - unsafe { super::arch::cache::cache_invalidate_d(start, len) }; - } - /// Clean and invalidate the data cache. - pub unsafe fn cache_clean_invalidate_d(start: usize, len: usize) { - unsafe { super::arch::cache::cache_clean_invalidate_d(start, len) }; - } -} diff --git a/src/vmm/config.rs b/src/vmm/config.rs index 32d2e181..10a0d93b 100644 --- a/src/vmm/config.rs +++ b/src/vmm/config.rs @@ -1,43 +1,189 @@ -use axvm::config::{AxVMConfig, AxVMCrateConfig}; +use axaddrspace::GuestPhysAddr; +use axerrno::AxResult; +use axvm::{ + VMMemoryRegion, + config::{AxVMConfig, AxVMCrateConfig, VmMemMappingType}, +}; +use core::alloc::Layout; +use memory_addr::MemoryAddr; -use crate::vmm::{VM, images::load_vm_images, vm_list::push_vm}; +use crate::vmm::{VM, images::ImageLoader, vm_list::push_vm}; -#[allow(clippy::module_inception)] +#[cfg(target_arch = "aarch64")] +use crate::vmm::fdt::*; + +use alloc::sync::Arc; + +#[allow(clippy::module_inception, dead_code)] pub mod config { + use alloc::string::String; use alloc::vec::Vec; /// Default static VM configs. Used when no VM config is provided. - #[allow(dead_code)] pub fn default_static_vm_configs() -> Vec<&'static str> { - vec![ - #[cfg(target_arch = "x86_64")] - core::include_str!("../../configs/vms/nimbos-x86_64.toml"), - #[cfg(target_arch = "aarch64")] - core::include_str!("../../configs/vms/nimbos-aarch64.toml"), - #[cfg(target_arch = "riscv64")] - core::include_str!("../../configs/vms/nimbos-riscv64.toml"), - ] + vec![] + } + + /// Read VM configs from filesystem + #[cfg(feature = "fs")] + pub fn filesystem_vm_configs() -> Vec { + use axstd::fs; + + // Try to read config files from a predefined directory + let config_dir = "configs/vms"; + let mut configs = Vec::new(); + + if let Ok(entries) = fs::read_dir(config_dir) { + for entry in entries.flatten() { + let path = entry.path(); + // Check if the file has a .toml extension + let path_str = path.as_str(); + if path_str.ends_with(".toml") + && let Ok(content) = fs::read_to_string(path_str) + { + configs.push(content); + } + } + } + + configs + } + + /// Fallback function for when "fs" feature is not enabled + #[cfg(not(feature = "fs"))] + pub fn filesystem_vm_configs() -> Vec { + Vec::new() } include!(concat!(env!("OUT_DIR"), "/vm_configs.rs")); } +pub fn get_vm_dtb_arc(_vm_cfg: &AxVMConfig) -> Option> { + #[cfg(target_arch = "aarch64")] + { + let cache_lock = dtb_cache().lock(); + if let Some(dtb) = cache_lock.get(&_vm_cfg.id()) { + return Some(Arc::from(dtb.as_slice())); + } + } + None +} + pub fn init_guest_vms() { - let gvm_raw_configs = config::static_vm_configs(); + // Initialize the DTB cache in the fdt module + #[cfg(target_arch = "aarch64")] + { + init_dtb_cache(); + } + + // First try to get configs from filesystem if fs feature is enabled + let mut gvm_raw_configs = config::filesystem_vm_configs(); + + // If no filesystem configs found, fallback to static configs + if gvm_raw_configs.is_empty() { + let static_configs = config::static_vm_configs(); + // Convert static configs to String type + gvm_raw_configs.extend(static_configs.into_iter().map(|s| s.into())); + } for raw_cfg_str in gvm_raw_configs { - let vm_create_config = - AxVMCrateConfig::from_toml(raw_cfg_str).expect("Failed to resolve VM config"); - let vm_config = AxVMConfig::from(vm_create_config.clone()); + if let Err(e) = init_guest_vm(&raw_cfg_str) { + error!("Failed to initialize guest VM: {:?}", e); + } + } +} + +pub fn init_guest_vm(raw_cfg: &str) -> AxResult { + let vm_create_config = + AxVMCrateConfig::from_toml(raw_cfg).expect("Failed to resolve VM config"); - info!("Creating VM[{}] {:?}", vm_config.id(), vm_config.name()); + if let Some(linux) = super::images::get_image_header(&vm_create_config) { + debug!( + "VM[{}] Linux header: {:#x?}", + vm_create_config.base.id, linux + ); + } + + #[cfg(target_arch = "aarch64")] + let mut vm_config = AxVMConfig::from(vm_create_config.clone()); + + #[cfg(not(target_arch = "aarch64"))] + let vm_config = AxVMConfig::from(vm_create_config.clone()); + + // Handle FDT-related operations for aarch64 + #[cfg(target_arch = "aarch64")] + handle_fdt_operations(&mut vm_config, &vm_create_config); + + // info!("after parse_vm_interrupt, crate VM[{}] with config: {:#?}", vm_config.id(), vm_config); + info!("Creating VM[{}] {:?}", vm_config.id(), vm_config.name()); + + // Create VM. + let vm = VM::new(vm_config).expect("Failed to create VM"); + push_vm(vm.clone()); + + vm_alloc_memorys(&vm_create_config, &vm); + + let main_mem = vm + .memory_regions() + .first() + .cloned() + .expect("VM must have at least one memory region"); + + config_guest_address(&vm, &main_mem); + + // Load corresponding images for VM. + info!("VM[{}] created success, loading images...", vm.id()); + + let mut loader = ImageLoader::new(main_mem, vm_create_config, vm.clone()); + loader.load().expect("Failed to load VM images"); + + if let Err(e) = vm.init() { + panic!("VM[{}] setup failed: {:?}", vm.id(), e); + } + + Ok(()) +} + +fn config_guest_address(vm: &VM, main_memory: &VMMemoryRegion) { + const MB: usize = 1024 * 1024; + vm.with_config(|config| { + if main_memory.is_identical() { + debug!( + "Adjusting kernel load address from {:#x} to {:#x}", + config.image_config.kernel_load_gpa, main_memory.gpa + ); + let mut kernel_addr = main_memory.gpa; + if config.image_config.bios_load_gpa.is_some() { + kernel_addr += MB * 2; // leave 2MB for BIOS + } + let dtb_addr = (main_memory.gpa + (main_memory.size().min(512 * MB) / 2).max(64 * MB)) + .align_up(2 * MB); + + config.image_config.kernel_load_gpa = kernel_addr; + config.cpu_config.bsp_entry = kernel_addr; + config.cpu_config.ap_entry = kernel_addr; + config.image_config.dtb_load_gpa = Some(dtb_addr); + } + }); +} - // Create VM. - let vm = VM::new(vm_config).expect("Failed to create VM"); - push_vm(vm.clone()); +fn vm_alloc_memorys(vm_create_config: &AxVMCrateConfig, vm: &VM) { + const MB: usize = 1024 * 1024; + const ALIGN: usize = 2 * MB; - // Load corresponding images for VM. - info!("VM[{}] created success, loading images...", vm.id()); - load_vm_images(vm_create_config, vm.clone()).expect("Failed to load VM images"); + for memory in &vm_create_config.kernel.memory_regions { + match memory.map_type { + VmMemMappingType::MapAlloc => { + vm.alloc_memory_region( + Layout::from_size_align(memory.size, ALIGN).unwrap(), + Some(GuestPhysAddr::from(memory.gpa)), + ) + .expect("Failed to allocate memory region for VM"); + } + VmMemMappingType::MapIdentical => { + vm.alloc_memory_region(Layout::from_size_align(memory.size, ALIGN).unwrap(), None) + .expect("Failed to allocate memory region for VM"); + } + } } } diff --git a/src/vmm/fdt/create.rs b/src/vmm/fdt/create.rs new file mode 100644 index 00000000..b2f9432d --- /dev/null +++ b/src/vmm/fdt/create.rs @@ -0,0 +1,399 @@ +use alloc::{ + string::{String, ToString}, + vec::Vec, +}; +use core::ptr::NonNull; + +use axaddrspace::GuestPhysAddr; +use axvm::{VMMemoryRegion, config::AxVMCrateConfig}; +use fdt_parser::{Fdt, Node}; +use vm_fdt::{FdtWriter, FdtWriterNode}; + +use crate::vmm::{VMRef, images::load_vm_image_from_memory}; + +// use crate::vmm::fdt::print::{print_fdt, print_guest_fdt}; +/// Generate guest FDT and return DTB data +/// +/// # Parameters +/// * `fdt` - Source FDT data +/// * `passthrough_device_names` - Passthrough device name list +/// * `crate_config` - VM creation configuration +/// +/// # Return Value +/// Returns the generated DTB data +pub fn crate_guest_fdt( + fdt: &Fdt, + passthrough_device_names: &[String], + crate_config: &AxVMCrateConfig, +) -> Vec { + let mut fdt_writer = FdtWriter::new().unwrap(); + // Track the level of the previously processed node for level change handling + let mut previous_node_level = 0; + // Maintain a stack of FDT nodes to correctly start and end nodes + let mut node_stack: Vec = Vec::new(); + let phys_cpu_ids = crate_config + .base + .phys_cpu_ids + .clone() + .expect("ERROR: phys_cpu_ids is None"); + + let all_nodes: Vec = fdt.all_nodes().collect(); + + for (index, node) in all_nodes.iter().enumerate() { + let node_path = super::build_node_path(&all_nodes, index); + let node_action = determine_node_action(node, &node_path, passthrough_device_names); + + match node_action { + NodeAction::RootNode => { + node_stack.push(fdt_writer.begin_node("").unwrap()); + } + NodeAction::CpuNode => { + let need = need_cpu_node(&phys_cpu_ids, node, &node_path); + if need { + handle_node_level_change( + &mut fdt_writer, + &mut node_stack, + node.level, + previous_node_level, + ); + node_stack.push(fdt_writer.begin_node(node.name()).unwrap()); + } else { + continue; + } + } + NodeAction::Skip => { + continue; + } + _ => { + trace!( + "Found exact passthrough device node: {}, path: {}", + node.name(), + node_path + ); + handle_node_level_change( + &mut fdt_writer, + &mut node_stack, + node.level, + previous_node_level, + ); + node_stack.push(fdt_writer.begin_node(node.name()).unwrap()); + } + } + + previous_node_level = node.level; + + // Copy all properties of the node + for prop in node.propertys() { + fdt_writer.property(prop.name, prop.raw_value()).unwrap(); + } + } + + // End all unclosed nodes + while let Some(node) = node_stack.pop() { + previous_node_level -= 1; + fdt_writer.end_node(node).unwrap(); + } + assert_eq!(previous_node_level, 0); + + fdt_writer.finish().unwrap() +} + +/// Node processing action enumeration +enum NodeAction { + /// Skip node, not included in guest FDT + Skip, + /// Root node + RootNode, + /// CPU node + CpuNode, + /// Include node as passthrough device node + IncludeAsPassthroughDevice, + /// Include node as child node of passthrough device + IncludeAsChildNode, + /// Include node as ancestor node of passthrough device + IncludeAsAncestorNode, +} + +/// Determine node processing action +fn determine_node_action( + node: &Node, + node_path: &str, + passthrough_device_names: &[String], +) -> NodeAction { + if node.name() == "/" { + // Special handling for root node + NodeAction::RootNode + } else if node.name().starts_with("memory") { + // Skip memory nodes, will add them later + NodeAction::Skip + } else if node_path.starts_with("/cpus") { + NodeAction::CpuNode + } else if passthrough_device_names.contains(&node_path.to_string()) { + // Fully matched passthrough device node + NodeAction::IncludeAsPassthroughDevice + } + // Check if the node is a descendant of a passthrough device (by path inclusion and level validation) + else if is_descendant_of_passthrough_device(node_path, node.level, passthrough_device_names) { + NodeAction::IncludeAsChildNode + } + // Check if the node is an ancestor of a passthrough device (by path inclusion and level validation) + else if is_ancestor_of_passthrough_device(node_path, passthrough_device_names) { + NodeAction::IncludeAsAncestorNode + } else { + NodeAction::Skip + } +} + +/// Determine if node is a descendant of passthrough device +/// When node path contains a path from passthrough_device_names and is longer than it, it is its descendant node +/// Also use node_level as validation condition +fn is_descendant_of_passthrough_device( + node_path: &str, + node_level: usize, + passthrough_device_names: &[String], +) -> bool { + for passthrough_path in passthrough_device_names { + // Check if the current node is a descendant of a passthrough device + if node_path.starts_with(passthrough_path) && node_path.len() > passthrough_path.len() { + // Ensure it is a true descendant path (separated by /) + if passthrough_path == "/" || node_path.chars().nth(passthrough_path.len()) == Some('/') + { + // Use level relationship for validation: the level of a descendant node should be higher than its parent + // Note: The level of the root node is 1, its direct child node level is 2, and so on + let expected_parent_level = passthrough_path.matches('/').count(); + let current_node_level = node_level; + + // If passthrough_path is the root node "/", then its child node level should be 2 + // Otherwise, the child node level should be higher than the parent node level + if (passthrough_path == "/" && current_node_level >= 2) + || (passthrough_path != "/" && current_node_level > expected_parent_level) + { + return true; + } + } + } + } + false +} + +/// Handle node level changes to ensure correct FDT structure +fn handle_node_level_change( + fdt_writer: &mut FdtWriter, + node_stack: &mut Vec, + current_level: usize, + previous_level: usize, +) { + if current_level <= previous_level { + for _ in current_level..=previous_level { + if let Some(end_node) = node_stack.pop() { + fdt_writer.end_node(end_node).unwrap(); + } + } + } +} + +/// Determine if node is an ancestor of passthrough device +fn is_ancestor_of_passthrough_device(node_path: &str, passthrough_device_names: &[String]) -> bool { + for passthrough_path in passthrough_device_names { + // Check if the current node is an ancestor of a passthrough device + if passthrough_path.starts_with(node_path) && passthrough_path.len() > node_path.len() { + // Ensure it is a true ancestor path (separated by /) + let next_char = passthrough_path.chars().nth(node_path.len()).unwrap_or(' '); + if next_char == '/' || node_path == "/" { + return true; + } + } + } + false +} + +/// Determine if CPU node is needed +fn need_cpu_node(phys_cpu_ids: &[usize], node: &Node, node_path: &str) -> bool { + let mut should_include_node = false; + + if !node_path.starts_with("/cpus/cpu@") { + should_include_node = true; + } else if let Some(mut cpu_reg) = node.reg() + && let Some(reg_entry) = cpu_reg.next() + { + let cpu_address = reg_entry.address as usize; + debug!( + "Checking CPU node {} with address 0x{:x}", + node.name(), + cpu_address + ); + // Check if this CPU address is in the configured phys_cpu_ids + if phys_cpu_ids.contains(&cpu_address) { + should_include_node = true; + debug!( + "CPU node {} with address 0x{:x} is in phys_cpu_ids, including in guest FDT", + node.name(), + cpu_address + ); + } else { + debug!( + "CPU node {} with address 0x{:x} is NOT in phys_cpu_ids, skipping", + node.name(), + cpu_address + ); + } + } + should_include_node +} + +/// Add memory node +fn add_memory_node(new_memory: &[VMMemoryRegion], new_fdt: &mut FdtWriter) { + let mut new_value: Vec = Vec::new(); + for mem in new_memory { + let gpa = mem.gpa.as_usize() as u64; + let size = mem.size() as u64; + new_value.push((gpa >> 32) as u32); + new_value.push((gpa & 0xFFFFFFFF) as u32); + new_value.push((size >> 32) as u32); + new_value.push((size & 0xFFFFFFFF) as u32); + } + info!("Adding memory node with value: 0x{:x?}", new_value); + new_fdt + .property_array_u32("reg", new_value.as_ref()) + .unwrap(); + new_fdt.property_string("device_type", "memory").unwrap(); +} + +pub fn update_fdt(dest_addr: GuestPhysAddr, fdt_src: NonNull, dtb_size: usize, vm: VMRef) { + let mut new_fdt = FdtWriter::new().unwrap(); + let mut previous_node_level = 0; + let mut node_stack: Vec = Vec::new(); + + let fdt_bytes = unsafe { core::slice::from_raw_parts(fdt_src.as_ptr(), dtb_size) }; + let fdt = Fdt::from_bytes(fdt_bytes) + .map_err(|e| format!("Failed to parse FDT: {e:#?}")) + .expect("Failed to parse FDT"); + + for node in fdt.all_nodes() { + if node.name() == "/" { + node_stack.push(new_fdt.begin_node("").unwrap()); + } else if node.name().starts_with("memory") { + // Skip memory nodes, will add them later + continue; + } else { + handle_node_level_change( + &mut new_fdt, + &mut node_stack, + node.level, + previous_node_level, + ); + // Start new node + node_stack.push(new_fdt.begin_node(node.name()).unwrap()); + } + + previous_node_level = node.level; + + for prop in node.propertys() { + new_fdt.property(prop.name, prop.raw_value()).unwrap(); + } + } + + // End all unclosed nodes, and add memory nodes at appropriate positions + while let Some(node) = node_stack.pop() { + previous_node_level -= 1; + new_fdt.end_node(node).unwrap(); + + // add memory node + if previous_node_level == 1 { + let memory_regions = vm.memory_regions(); + debug!("Adding memory node with regions: {:?}", memory_regions); + let memory_node = new_fdt.begin_node("memory").unwrap(); + add_memory_node(&memory_regions, &mut new_fdt); + new_fdt.end_node(memory_node).unwrap(); + } + } + + assert_eq!(previous_node_level, 0); + + info!("Updating FDT memory successfully"); + + let new_fdt_bytes = new_fdt.finish().unwrap(); + + // print_guest_fdt(new_fdt_bytes.as_slice()); + + // Load the updated FDT into VM + load_vm_image_from_memory(&new_fdt_bytes, dest_addr, vm.clone()) + .expect("Failed to load VM images"); +} + +pub fn update_cpu_node(fdt: &Fdt, host_fdt: &Fdt, crate_config: &AxVMCrateConfig) -> Vec { + let mut new_fdt = FdtWriter::new().unwrap(); + let mut previous_node_level = 0; + let mut node_stack: Vec = Vec::new(); + let phys_cpu_ids = crate_config + .base + .phys_cpu_ids + .clone() + .expect("ERROR: phys_cpu_ids is None"); + + // Collect all nodes from both FDTs + let fdt_all_nodes: Vec = fdt.all_nodes().collect(); + let host_fdt_all_nodes: Vec = host_fdt.all_nodes().collect(); + + for (index, node) in fdt_all_nodes.iter().enumerate() { + let node_path = super::build_node_path(&fdt_all_nodes, index); + + if node.name() == "/" { + node_stack.push(new_fdt.begin_node("").unwrap()); + } else if node_path.starts_with("/cpus") { + // Skip CPU nodes from fdt, we'll process them from host_fdt later + continue; + } else { + // For all other nodes, include them from fdt as-is without filtering + handle_node_level_change( + &mut new_fdt, + &mut node_stack, + node.level, + previous_node_level, + ); + node_stack.push(new_fdt.begin_node(node.name()).unwrap()); + } + + previous_node_level = node.level; + + // Copy all properties of the node (for non-CPU nodes) + for prop in node.propertys() { + new_fdt.property(prop.name, prop.raw_value()).unwrap(); + } + } + + // Process all CPU nodes from host_fdt + for (index, node) in host_fdt_all_nodes.iter().enumerate() { + let node_path = super::build_node_path(&host_fdt_all_nodes, index); + + if node_path.starts_with("/cpus") { + // For CPU nodes, apply filtering based on host_fdt nodes + let need = need_cpu_node(&phys_cpu_ids, node, &node_path); + if need { + handle_node_level_change( + &mut new_fdt, + &mut node_stack, + node.level, + previous_node_level, + ); + node_stack.push(new_fdt.begin_node(node.name()).unwrap()); + + // Copy properties from host CPU node + for prop in node.propertys() { + new_fdt.property(prop.name, prop.raw_value()).unwrap(); + } + + previous_node_level = node.level; + } + } + } + + // End all unclosed nodes + while let Some(node) = node_stack.pop() { + previous_node_level -= 1; + new_fdt.end_node(node).unwrap(); + } + assert_eq!(previous_node_level, 0); + + new_fdt.finish().unwrap() +} diff --git a/src/vmm/fdt/device.rs b/src/vmm/fdt/device.rs new file mode 100644 index 00000000..cf9eaafd --- /dev/null +++ b/src/vmm/fdt/device.rs @@ -0,0 +1,511 @@ +//! Device passthrough and dependency analysis for FDT processing. + +use alloc::{ + collections::{BTreeMap, BTreeSet}, + string::{String, ToString}, + vec::Vec, +}; +use axvm::config::AxVMConfig; +use fdt_parser::{Fdt, Node}; + +/// Return the collection of all passthrough devices in the configuration file and newly added devices found +pub fn find_all_passthrough_devices(vm_cfg: &mut AxVMConfig, fdt: &Fdt) -> Vec { + let initial_device_count = vm_cfg.pass_through_devices().len(); + + // Pre-build node cache, store all nodes by path to improve lookup performance + let node_cache: BTreeMap> = build_optimized_node_cache(fdt); + + // Get the list of configured device names + let initial_device_names: Vec = vm_cfg + .pass_through_devices() + .iter() + .map(|dev| dev.name.clone()) + .collect(); + + // Phase 1: Discover descendant nodes of all passthrough devices in the configuration file + // Build a set of configured devices, using BTreeSet to improve lookup efficiency + let mut configured_device_names: BTreeSet = + initial_device_names.iter().cloned().collect(); + + // Used to store newly discovered related device names + let mut additional_device_names = Vec::new(); + + // Phase 1: Process initial devices and their descendant nodes + // Note: Directly use device paths instead of device names + for device_name in &initial_device_names { + // Get all descendant node paths for this device + let descendant_paths = get_descendant_nodes_by_path(&node_cache, device_name); + trace!( + "Found {} descendant paths for {}", + descendant_paths.len(), + device_name + ); + + for descendant_path in descendant_paths { + if !configured_device_names.contains(&descendant_path) { + trace!("Found descendant device: {}", descendant_path); + configured_device_names.insert(descendant_path.clone()); + + additional_device_names.push(descendant_path.clone()); + } else { + trace!("Device already exists: {}", descendant_path); + } + } + } + + info!( + "Phase 1 completed: Found {} new descendant device names", + additional_device_names.len() + ); + + // Phase 2: Discover dependency nodes for all existing devices (including descendant devices) + let mut dependency_device_names = Vec::new(); + // Use a work queue of device names, including initial devices and descendant device names + let mut devices_to_process: Vec = configured_device_names.iter().cloned().collect(); + let mut processed_devices: BTreeSet = BTreeSet::new(); + + // Build phandle mapping table + let phandle_map = build_phandle_map(fdt); + + // Use work queue to recursively find all dependent devices + while let Some(device_node_path) = devices_to_process.pop() { + // Avoid processing the same device repeatedly + if processed_devices.contains(&device_node_path) { + continue; + } + processed_devices.insert(device_node_path.clone()); + + trace!("Analyzing dependencies for device: {}", device_node_path); + + // Find direct dependencies of the current device + let dependencies = find_device_dependencies(&device_node_path, &phandle_map, &node_cache); + trace!( + "Found {} dependencies: {:?}", + dependencies.len(), + dependencies + ); + for dep_node_name in dependencies { + // Check if dependency is already in configuration + if !configured_device_names.contains(&dep_node_name) { + trace!("Found new dependency device: {}", dep_node_name); + dependency_device_names.push(dep_node_name.clone()); + + // Add dependency device name to work queue to further find its dependencies + devices_to_process.push(dep_node_name.clone()); + configured_device_names.insert(dep_node_name.clone()); + } + } + } + + info!( + "Phase 2 completed: Found {} new dependency device names", + dependency_device_names.len() + ); + + // Phase 3: Find all excluded devices and remove them from the list + // Convert Vec> to Vec + let excluded_device_path: Vec = vm_cfg + .excluded_devices() + .iter() + .flatten() + .cloned() + .collect(); + let mut all_excludes_devices = excluded_device_path.clone(); + let mut process_excludeds: BTreeSet = excluded_device_path.iter().cloned().collect(); + + for device_path in &excluded_device_path { + // Get all descendant node paths for this device + let descendant_paths = get_descendant_nodes_by_path(&node_cache, device_path); + info!( + "Found {} descendant paths for {}", + descendant_paths.len(), + device_path + ); + + for descendant_path in descendant_paths { + if !process_excludeds.contains(&descendant_path) { + trace!("Found descendant device: {}", descendant_path); + process_excludeds.insert(descendant_path.clone()); + + all_excludes_devices.push(descendant_path.clone()); + } else { + trace!("Device already exists: {}", descendant_path); + } + } + } + info!("Found excluded devices: {:?}", all_excludes_devices); + + // Merge all device name lists + let mut all_device_names = initial_device_names.clone(); + all_device_names.extend(additional_device_names); + all_device_names.extend(dependency_device_names); + + // Remove excluded devices from the final list + if !all_excludes_devices.is_empty() { + info!( + "Removing {} excluded devices from the list", + all_excludes_devices.len() + ); + let excluded_set: BTreeSet = all_excludes_devices.into_iter().collect(); + + // Filter out excluded devices + all_device_names.retain(|device_name| { + let should_keep = !excluded_set.contains(device_name); + if !should_keep { + info!("Excluding device: {}", device_name); + } + should_keep + }); + } + + // Phase 4: remove root node from the list + all_device_names.retain(|device_name| device_name != "/"); + + let final_device_count = all_device_names.len(); + info!( + "Passthrough devices analysis completed. Total devices: {} (added: {})", + final_device_count, + final_device_count - initial_device_count + ); + + // Print final device list + for (i, device_name) in all_device_names.iter().enumerate() { + trace!("Final passthrough device[{}]: {}", i, device_name); + } + + all_device_names +} + +/// Build the full path of a node based on node level relationships +/// Build the path by traversing all nodes and constructing paths based on level relationships to avoid path conflicts for nodes with the same name +pub fn build_node_path(all_nodes: &[Node], target_index: usize) -> String { + let mut path_stack: Vec = Vec::new(); + + for node in all_nodes.iter().take(target_index + 1) { + let level = node.level; + + if level == 1 { + path_stack.clear(); + if node.name() != "/" { + path_stack.push(node.name().to_string()); + } + } else { + while path_stack.len() >= level - 1 { + path_stack.pop(); + } + path_stack.push(node.name().to_string()); + } + } + + // Build the full path of the current node + if path_stack.is_empty() || (path_stack.len() == 1 && path_stack[0] == "/") { + "/".to_string() + } else { + "/".to_string() + &path_stack.join("/") + } +} + +/// Build a simplified node cache table, traverse all nodes once and group by full path +/// Use level relationships to directly build paths, avoiding path conflicts for nodes with the same name +pub fn build_optimized_node_cache<'a>(fdt: &'a Fdt) -> BTreeMap>> { + let mut node_cache: BTreeMap>> = BTreeMap::new(); + + let all_nodes: Vec = fdt.all_nodes().collect(); + + for (index, node) in all_nodes.iter().enumerate() { + let node_path = build_node_path(&all_nodes, index); + if let Some(existing_nodes) = node_cache.get(&node_path) + && !existing_nodes.is_empty() + { + error!( + "Duplicate node path found: {} for node '{}' at level {}, existing node: '{}'", + node_path, + node.name(), + node.level, + existing_nodes[0].name() + ); + } + + trace!( + "Adding node to cache: {} (level: {}, index: {})", + node_path, node.level, index + ); + node_cache.entry(node_path).or_default().push(node.clone()); + } + + debug!( + "Built simplified node cache with {} unique device paths", + node_cache.len() + ); + node_cache +} + +/// Build a mapping table from phandle to node information, optimized version using fdt-parser convenience methods +/// Use full path instead of node name +/// Use level relationships to directly build paths, avoiding path conflicts for nodes with the same name +fn build_phandle_map(fdt: &Fdt) -> BTreeMap)> { + let mut phandle_map = BTreeMap::new(); + + let all_nodes: Vec = fdt.all_nodes().collect(); + + for (index, node) in all_nodes.iter().enumerate() { + let node_path = build_node_path(&all_nodes, index); + + // Collect node properties + let mut phandle = None; + let mut cells_map = BTreeMap::new(); + for prop in node.propertys() { + match prop.name { + "phandle" | "linux,phandle" => { + phandle = Some(prop.u32()); + } + "#address-cells" + | "#size-cells" + | "#clock-cells" + | "#reset-cells" + | "#gpio-cells" + | "#interrupt-cells" + | "#power-domain-cells" + | "#thermal-sensor-cells" + | "#phy-cells" + | "#dma-cells" + | "#sound-dai-cells" + | "#mbox-cells" + | "#pwm-cells" + | "#iommu-cells" => { + cells_map.insert(prop.name.to_string(), prop.u32()); + } + _ => {} + } + } + + // If phandle is found, store it together with the node's full path + if let Some(ph) = phandle { + phandle_map.insert(ph, (node_path, cells_map)); + } + } + phandle_map +} + +/// Parse properties containing phandle references intelligently based on #*-cells properties +/// Supports multiple formats: +/// - Single phandle: +/// - phandle+specifier: +/// - Multiple phandle references: +fn parse_phandle_property_with_cells( + prop_data: &[u8], + prop_name: &str, + phandle_map: &BTreeMap)>, +) -> Vec<(u32, Vec)> { + let mut results = Vec::new(); + + debug!( + "Parsing property '{}' with cells info, data length: {} bytes", + prop_name, + prop_data.len() + ); + + if prop_data.is_empty() || prop_data.len() % 4 != 0 { + warn!( + "Property '{}' data length ({} bytes) is invalid", + prop_name, + prop_data.len() + ); + return results; + } + + let u32_values: Vec = prop_data + .chunks(4) + .map(|chunk| u32::from_be_bytes([chunk[0], chunk[1], chunk[2], chunk[3]])) + .collect(); + + let mut i = 0; + while i < u32_values.len() { + let potential_phandle = u32_values[i]; + + // Check if it's a valid phandle + if let Some((device_name, cells_info)) = phandle_map.get(&potential_phandle) { + // Determine the number of cells required based on property name + let cells_count = get_cells_count_for_property(prop_name, cells_info); + trace!( + "Property '{}' requires {} cells for device '{}'", + prop_name, cells_count, device_name + ); + + // Check if there's enough data + if i + cells_count < u32_values.len() { + let specifiers: Vec = u32_values[i + 1..=i + cells_count].to_vec(); + debug!( + "Parsed phandle reference: phandle={:#x}, specifiers={:?}", + potential_phandle, specifiers + ); + results.push((potential_phandle, specifiers)); + i += cells_count + 1; // Skip phandle and all specifiers + } else { + warn!( + "Property:{} not enough data for phandle {:#x}, expected {} cells but only {} values remaining", + prop_name, + potential_phandle, + cells_count, + u32_values.len() - i - 1 + ); + break; + } + } else { + // If not a valid phandle, skip this value + i += 1; + } + } + + results +} + +/// Determine the required number of cells based on property name and target node's cells information +fn get_cells_count_for_property(prop_name: &str, cells_info: &BTreeMap) -> usize { + let cells_property = match prop_name { + "clocks" | "assigned-clocks" => "#clock-cells", + "resets" => "#reset-cells", + "power-domains" => "#power-domain-cells", + "phys" => "#phy-cells", + "interrupts" | "interrupts-extended" => "#interrupt-cells", + "gpios" => "#gpio-cells", + _ if prop_name.ends_with("-gpios") || prop_name.ends_with("-gpio") => "#gpio-cells", + "dmas" => "#dma-cells", + "thermal-sensors" => "#thermal-sensor-cells", + "sound-dai" => "#sound-dai-cells", + "mboxes" => "#mbox-cells", + "pwms" => "#pwm-cells", + _ => { + debug!("Unknown property '{}', defaulting to 0 cell", prop_name); + return 0; + } + }; + + cells_info.get(cells_property).copied().unwrap_or(0) as usize +} + +/// Generic phandle property parsing function +/// Parse phandle references according to cells information with correct block size +/// Support single phandle and multiple phandle+specifier formats +/// Return full path instead of node name +fn parse_phandle_property( + prop_data: &[u8], + prop_name: &str, + phandle_map: &BTreeMap)>, +) -> Vec { + let mut dependencies = Vec::new(); + + let phandle_refs = parse_phandle_property_with_cells(prop_data, prop_name, phandle_map); + + for (phandle, specifiers) in phandle_refs { + if let Some((device_path, _cells_info)) = phandle_map.get(&phandle) { + let spec_info = if !specifiers.is_empty() { + format!(" (specifiers: {specifiers:?})") + } else { + String::new() + }; + debug!( + "Found {} dependency: phandle={:#x}, device={}{}", + prop_name, phandle, device_path, spec_info + ); + dependencies.push(device_path.clone()); + } + } + + dependencies +} + +/// Device property classifier - used to identify properties that require special handling +struct DevicePropertyClassifier; + +impl DevicePropertyClassifier { + /// Phandle properties that require special handling - includes all properties that need dependency resolution + const PHANDLE_PROPERTIES: &'static [&'static str] = &[ + "clocks", + "power-domains", + "phys", + "resets", + "dmas", + "thermal-sensors", + "mboxes", + "assigned-clocks", + "interrupt-parent", + "phy-handle", + "msi-parent", + "memory-region", + "syscon", + "regmap", + "iommus", + "interconnects", + "nvmem-cells", + "sound-dai", + "pinctrl-0", + "pinctrl-1", + "pinctrl-2", + "pinctrl-3", + "pinctrl-4", + ]; + + /// Determine if it's a phandle property that requires handling + fn is_phandle_property(prop_name: &str) -> bool { + Self::PHANDLE_PROPERTIES.contains(&prop_name) + || prop_name.ends_with("-supply") + || prop_name == "gpios" + || prop_name.ends_with("-gpios") + || prop_name.ends_with("-gpio") + || (prop_name.contains("cells") && !prop_name.starts_with("#") && prop_name.len() >= 4) + } +} + +/// Find device dependencies +fn find_device_dependencies( + device_node_path: &str, + phandle_map: &BTreeMap)>, + node_cache: &BTreeMap>, // Add node_cache parameter +) -> Vec { + let mut dependencies = Vec::new(); + + // Directly find nodes from node_cache, avoiding traversing all nodes + if let Some(nodes) = node_cache.get(device_node_path) { + // Traverse all properties of nodes to find dependencies + for node in nodes { + for prop in node.propertys() { + // Determine if it's a phandle property that needs to be processed + if DevicePropertyClassifier::is_phandle_property(prop.name) { + let mut prop_deps = + parse_phandle_property(prop.raw_value(), prop.name, phandle_map); + dependencies.append(&mut prop_deps); + } + } + } + } + + dependencies +} + +/// Get all descendant nodes based on parent node path (including child nodes, grandchild nodes, etc.) +/// Find all descendant nodes by looking up nodes with parent node path as prefix in node_cache +fn get_descendant_nodes_by_path<'a>( + node_cache: &'a BTreeMap>>, + parent_path: &str, +) -> Vec { + let mut descendant_paths = Vec::new(); + + // Special handling if parent path is root path + let search_prefix = if parent_path == "/" { + "/".to_string() + } else { + parent_path.to_string() + "/" + }; + + // Traverse node_cache, find all nodes with parent path as prefix + for path in node_cache.keys() { + // Check if path has parent path as prefix (and is not the parent path itself) + if path.starts_with(&search_prefix) && path.len() > search_prefix.len() { + // This is a descendant node path, add to results + descendant_paths.push(path.clone()); + } + } + + descendant_paths +} diff --git a/src/vmm/fdt/mod.rs b/src/vmm/fdt/mod.rs new file mode 100644 index 00000000..b76da293 --- /dev/null +++ b/src/vmm/fdt/mod.rs @@ -0,0 +1,122 @@ +//! FDT (Flattened Device Tree) processing module for AxVisor. +//! +//! This module provides functionality for parsing and processing device tree blobs, +//! including CPU configuration, passthrough device detection, and FDT generation. + +mod create; +mod device; +mod parser; +mod print; + +use alloc::collections::BTreeMap; +use alloc::vec::Vec; +use axvm::config::{AxVMConfig, AxVMCrateConfig}; +use fdt_parser::Fdt; +use lazyinit::LazyInit; +use spin::Mutex; + +pub use parser::*; +// pub use print::print_fdt; +pub use create::*; +pub use device::build_node_path; + +use crate::vmm::config::{config, get_vm_dtb_arc}; + +// DTB cache for generated device trees +static GENERATED_DTB_CACHE: LazyInit>>> = LazyInit::new(); + +/// Initialize the DTB cache +pub fn init_dtb_cache() { + GENERATED_DTB_CACHE.init_once(Mutex::new(BTreeMap::new())); +} + +/// Get reference to the DTB cache +pub fn dtb_cache() -> &'static Mutex>> { + GENERATED_DTB_CACHE.get().unwrap() +} + +/// Generate guest FDT cache the result +/// # Return Value +/// Returns the generated DTB data and stores it in the global cache +pub fn crate_guest_fdt_with_cache(dtb_data: Vec, crate_config: &AxVMCrateConfig) { + // Store data in global cache + let mut cache_lock = dtb_cache().lock(); + cache_lock.insert(crate_config.base.id, dtb_data); +} + +/// Handle all FDT-related operations for aarch64 architecture +pub fn handle_fdt_operations(vm_config: &mut AxVMConfig, vm_create_config: &AxVMCrateConfig) { + let host_fdt_bytes = get_host_fdt(); + let host_fdt = Fdt::from_bytes(host_fdt_bytes) + .map_err(|e| format!("Failed to parse FDT: {e:#?}")) + .expect("Failed to parse FDT"); + set_phys_cpu_sets(vm_config, &host_fdt, vm_create_config); + + if let Some(provided_dtb) = get_developer_provided_dtb(vm_config, vm_create_config) { + info!("VM[{}] found DTB , parsing...", vm_config.id()); + update_provided_fdt(&provided_dtb, host_fdt_bytes, vm_create_config); + } else { + info!( + "VM[{}] DTB not found, generating based on the configuration file.", + vm_config.id() + ); + setup_guest_fdt_from_vmm(host_fdt_bytes, vm_config, vm_create_config); + } + + // Overlay VM config with the given DTB. + if let Some(dtb_arc) = get_vm_dtb_arc(vm_config) { + let dtb = dtb_arc.as_ref(); + parse_passthrough_devices_address(vm_config, dtb); + parse_vm_interrupt(vm_config, dtb); + } else { + error!( + "VM[{}] DTB not found in memory, skipping...", + vm_config.id() + ); + } +} + +pub fn get_developer_provided_dtb( + vm_cfg: &AxVMConfig, + crate_config: &AxVMCrateConfig, +) -> Option> { + match crate_config.kernel.image_location.as_deref() { + Some("memory") => { + let vm_imags = config::get_memory_images() + .iter() + .find(|&v| v.id == vm_cfg.id())?; + + if let Some(dtb) = vm_imags.dtb { + info!("DTB file in memory, size: 0x{:x}", dtb.len()); + return Some(dtb.to_vec()); + } + } + #[cfg(feature = "fs")] + Some("fs") => { + use axerrno::ax_err_type; + use std::io::{BufReader, Read}; + if let Some(dtb_path) = &crate_config.kernel.dtb_path { + let (dtb_file, dtb_size) = + crate::vmm::images::fs::open_image_file(dtb_path).unwrap(); + info!("DTB file in fs, size: 0x{:x}", dtb_size); + + let mut file = BufReader::new(dtb_file); + let mut dtb_buffer = vec![0; dtb_size]; + + file.read_exact(&mut dtb_buffer) + .map_err(|err| { + ax_err_type!( + Io, + format!("Failed in reading from file {}, err {:?}", dtb_path, err) + ) + }) + .unwrap(); + return Some(dtb_buffer); + } + } + _ => unimplemented!( + "Check your \"image_location\" in config.toml, \"memory\" and \"fs\" are supported,\n." + ), + } + None +} diff --git a/src/vmm/fdt/parser.rs b/src/vmm/fdt/parser.rs new file mode 100644 index 00000000..859b8102 --- /dev/null +++ b/src/vmm/fdt/parser.rs @@ -0,0 +1,380 @@ +//! FDT parsing and processing functionality. + +use alloc::{string::ToString, vec::Vec}; +use axvm::config::{AxVMConfig, AxVMCrateConfig, PassThroughDeviceConfig}; +use fdt_parser::{Fdt, FdtHeader, PciRange, PciSpace}; + +use crate::vmm::fdt::crate_guest_fdt_with_cache; +use crate::vmm::fdt::create::update_cpu_node; + +pub fn get_host_fdt() -> &'static [u8] { + const FDT_VALID_MAGIC: u32 = 0xd00d_feed; + let bootarg: usize = std::os::arceos::modules::axhal::get_bootarg(); + let header = unsafe { + core::slice::from_raw_parts(bootarg as *const u8, core::mem::size_of::()) + }; + let fdt_header = FdtHeader::from_bytes(header) + .map_err(|e| format!("Failed to parse FDT header: {e:#?}")) + .unwrap(); + + if fdt_header.magic.get() != FDT_VALID_MAGIC { + error!( + "FDT magic is invalid, expected {:#x}, got {:#x}", + FDT_VALID_MAGIC, + fdt_header.magic.get() + ); + } + + unsafe { core::slice::from_raw_parts(bootarg as *const u8, fdt_header.total_size()) } +} + +pub fn setup_guest_fdt_from_vmm( + fdt_bytes: &[u8], + vm_cfg: &mut AxVMConfig, + crate_config: &AxVMCrateConfig, +) { + let fdt = Fdt::from_bytes(fdt_bytes) + .map_err(|e| format!("Failed to parse FDT: {e:#?}")) + .expect("Failed to parse FDT"); + + // Call the modified function and get the returned device name list + let passthrough_device_names = super::device::find_all_passthrough_devices(vm_cfg, &fdt); + + let dtb_data = super::create::crate_guest_fdt(&fdt, &passthrough_device_names, crate_config); + crate_guest_fdt_with_cache(dtb_data, crate_config); +} + +pub fn set_phys_cpu_sets(vm_cfg: &mut AxVMConfig, fdt: &Fdt, crate_config: &AxVMCrateConfig) { + // Find and parse CPU information from host DTB + let host_cpus: Vec<_> = fdt.find_nodes("/cpus/cpu").collect(); + info!("Found {} host CPU nodes", &host_cpus.len()); + + let phys_cpu_ids = crate_config + .base + .phys_cpu_ids + .as_ref() + .expect("ERROR: phys_cpu_ids not found in config.toml"); + + // Collect all CPU node information into Vec to avoid using iterators multiple times + let cpu_nodes_info: Vec<_> = host_cpus + .iter() + .filter_map(|cpu_node| { + if let Some(mut cpu_reg) = cpu_node.reg() { + if let Some(r) = cpu_reg.next() { + info!( + "CPU node: {}, phys_cpu_id: 0x{:x}", + cpu_node.name(), + r.address + ); + Some((cpu_node.name().to_string(), r.address as usize)) + } else { + None + } + } else { + None + } + }) + .collect(); + // Create mapping from phys_cpu_id to physical CPU index + // Collect all unique CPU addresses, maintaining the order of appearance in the device tree + let mut unique_cpu_addresses = Vec::new(); + for (_, cpu_address) in &cpu_nodes_info { + if !unique_cpu_addresses.contains(cpu_address) { + unique_cpu_addresses.push(*cpu_address); + } else { + panic!("Duplicate CPU address found"); + } + } + + // Assign index to each CPU address in the device tree and print detailed information + for (index, &cpu_address) in unique_cpu_addresses.iter().enumerate() { + // Find all CPU nodes using this address + for (cpu_name, node_address) in &cpu_nodes_info { + if *node_address == cpu_address { + debug!( + " CPU node: {}, address: 0x{:x}, assigned index: {}", + cpu_name, cpu_address, index + ); + break; // Print each address only once + } + } + } + + // Calculate phys_cpu_sets based on phys_cpu_ids in vcpu_mappings + let mut new_phys_cpu_sets = Vec::new(); + for phys_cpu_id in phys_cpu_ids { + // Find the index corresponding to phys_cpu_id in unique_cpu_addresses + if let Some(cpu_index) = unique_cpu_addresses + .iter() + .position(|&addr| addr == *phys_cpu_id) + { + let cpu_mask = 1usize << cpu_index; // Convert index to mask bit + new_phys_cpu_sets.push(cpu_mask); + debug!( + "vCPU {} with phys_cpu_id 0x{:x} mapped to CPU index {} (mask: 0x{:x})", + vm_cfg.id(), + phys_cpu_id, + cpu_index, + cpu_mask + ); + } else { + error!( + "vCPU {} with phys_cpu_id 0x{:x} not found in device tree!", + vm_cfg.id(), + phys_cpu_id + ); + } + } + + // Update phys_cpu_sets in VM configuration (if VM configuration supports setting) + info!("Calculated phys_cpu_sets: {:?}", new_phys_cpu_sets); + + vm_cfg + .phys_cpu_ls_mut() + .set_guest_cpu_sets(new_phys_cpu_sets); + + debug!( + "vcpu_mappings: {:?}", + vm_cfg.phys_cpu_ls_mut().get_vcpu_affinities_pcpu_ids() + ); +} + +/// Add address mapping configuration for a device +fn add_device_address_config( + vm_cfg: &mut AxVMConfig, + node_name: &str, + base_address: usize, + size: usize, + index: usize, + prefix: Option<&str>, +) { + // Only process devices with address information + if size == 0 { + return; + } + + // Create a device configuration for each address segment + let device_name = if index == 0 { + match prefix { + Some(p) => format!("{node_name}-{p}"), + None => node_name.to_string(), + } + } else { + match prefix { + Some(p) => format!("{node_name}-{p}-region{index}"), + None => format!("{node_name}-region{index}"), + } + }; + + // Add new device configuration + let pt_dev = axvm::config::PassThroughDeviceConfig { + name: device_name, + base_gpa: base_address, + base_hpa: base_address, + length: size, + irq_id: 0, + }; + vm_cfg.add_pass_through_device(pt_dev); +} + +/// Add ranges property configuration for PCIe devices +fn add_pci_ranges_config(vm_cfg: &mut AxVMConfig, node_name: &str, range: &PciRange, index: usize) { + let base_address = range.cpu_address as usize; + let size = range.size as usize; + + // Only process devices with address information + if size == 0 { + return; + } + + // Create a device configuration for each address segment + let prefix = match range.space { + PciSpace::Configuration => "config", + PciSpace::IO => "io", + PciSpace::Memory32 => "mem32", + PciSpace::Memory64 => "mem64", + }; + + let device_name = if index == 0 { + format!("{node_name}-{prefix}") + } else { + format!("{node_name}-{prefix}-region{index}") + }; + + // Add new device configuration + let pt_dev = axvm::config::PassThroughDeviceConfig { + name: device_name, + base_gpa: base_address, + base_hpa: base_address, + length: size, + irq_id: 0, + }; + vm_cfg.add_pass_through_device(pt_dev); + + trace!( + "Added PCIe passthrough device {}: base=0x{:x}, size=0x{:x}, space={:?}", + node_name, base_address, size, range.space + ); +} + +pub fn parse_passthrough_devices_address(vm_cfg: &mut AxVMConfig, dtb: &[u8]) { + let fdt = Fdt::from_bytes(dtb) + .expect("Failed to parse DTB image, perhaps the DTB is invalid or corrupted"); + + // Clear existing passthrough device configurations + vm_cfg.clear_pass_through_devices(); + + // Traverse all device tree nodes + for node in fdt.all_nodes() { + // Skip root node + if node.name() == "/" || node.name().starts_with("memory") { + continue; + } + + let node_name = node.name().to_string(); + + // Check if it's a PCIe device node + if node_name.starts_with("pcie@") || node_name.contains("pci") { + // Process PCIe device's ranges property + if let Some(pci) = node.clone().into_pci() + && let Ok(ranges) = pci.ranges() + { + for (index, range) in ranges.enumerate() { + add_pci_ranges_config(vm_cfg, &node_name, &range, index); + } + } + + // Process PCIe device's reg property (ECAM space) + if let Some(reg_iter) = node.reg() { + for (index, reg) in reg_iter.enumerate() { + let base_address = reg.address as usize; + let size = reg.size.unwrap_or(0); + + add_device_address_config( + vm_cfg, + &node_name, + base_address, + size, + index, + Some("ecam"), + ); + } + } + } else { + // Get device's reg property (process regular devices) + if let Some(reg_iter) = node.reg() { + // Process all address segments of the device + for (index, reg) in reg_iter.enumerate() { + // Get device's address and size information + let base_address = reg.address as usize; + let size = reg.size.unwrap_or(0); + + add_device_address_config(vm_cfg, &node_name, base_address, size, index, None); + } + } + } + } + trace!( + "All passthrough devices: {:#x?}", + vm_cfg.pass_through_devices() + ); + debug!( + "Finished parsing passthrough devices, total: {}", + vm_cfg.pass_through_devices().len() + ); +} + +pub fn parse_vm_interrupt(vm_cfg: &mut AxVMConfig, dtb: &[u8]) { + const GIC_PHANDLE: usize = 1; + let fdt = Fdt::from_bytes(dtb) + .expect("Failed to parse DTB image, perhaps the DTB is invalid or corrupted"); + + for node in fdt.all_nodes() { + let name = node.name(); + + if name.starts_with("memory") { + continue; + } + // Skip the interrupt controller, as we will use vGIC + // TODO: filter with compatible property and parse its phandle from DT; maybe needs a second pass? + else if name.starts_with("interrupt-controller") + || name.starts_with("intc") + || name.starts_with("its") + { + info!("skipping node {} to use vGIC", name); + continue; + } + + // Collect all GIC_SPI interrupts and add them to vGIC + if let Some(interrupts) = node.interrupts() { + // TODO: skip non-GIC interrupt + if let Some(parent) = node.interrupt_parent() { + trace!("node: {}, intr parent: {}", name, parent.node.name()); + if let Some(phandle) = parent.node.phandle() { + if phandle.as_usize() != GIC_PHANDLE { + debug!( + "node: {}, intr parent: {}, phandle: 0x{:x} is not GIC!", + name, + parent.node.name(), + phandle.as_usize() + ); + } + } else { + warn!( + "node: {}, intr parent: {} no phandle!", + name, + parent.node.name(), + ); + } + } else { + warn!("node: {} no interrupt parent!", name); + } + + for interrupt in interrupts { + // + for (k, v) in interrupt.enumerate() { + match k { + 0 => { + if v == 0 { + trace!("node: {}, GIC_SPI", name); + } else { + debug!( + "node: {}, intr type: {}, not GIC_SPI, not supported!", + name, v + ); + break; + } + } + 1 => { + trace!("node: {}, interrupt id: 0x{:x}", name, v); + vm_cfg.add_pass_through_spi(v); + } + 2 => { + trace!("node: {}, interrupt mode: 0x{:x}", name, v); + } + _ => { + warn!("unknown interrupt property {}:0x{:x}", k, v) + } + } + } + } + } + } + + vm_cfg.add_pass_through_device(PassThroughDeviceConfig { + name: "Fake Node".to_string(), + base_gpa: 0x0, + base_hpa: 0x0, + length: 0x20_0000, + irq_id: 0, + }); +} + +pub fn update_provided_fdt(provided_dtb: &[u8], host_dtb: &[u8], crate_config: &AxVMCrateConfig) { + let provided_fdt = Fdt::from_bytes(provided_dtb) + .expect("Failed to parse DTB image, perhaps the DTB is invalid or corrupted"); + let host_fdt = Fdt::from_bytes(host_dtb) + .expect("Failed to parse DTB image, perhaps the DTB is invalid or corrupted"); + let provided_dtb_data = update_cpu_node(&provided_fdt, &host_fdt, crate_config); + crate_guest_fdt_with_cache(provided_dtb_data, crate_config); +} diff --git a/src/vmm/fdt/print.rs b/src/vmm/fdt/print.rs new file mode 100644 index 00000000..e9f10d68 --- /dev/null +++ b/src/vmm/fdt/print.rs @@ -0,0 +1,135 @@ +//! FDT parsing and processing functionality. + +use fdt_parser::{Fdt, FdtHeader}; + +#[allow(dead_code)] +pub fn print_fdt(fdt_addr: usize) { + const FDT_VALID_MAGIC: u32 = 0xd00d_feed; + let header = unsafe { + core::slice::from_raw_parts(fdt_addr as *const u8, core::mem::size_of::()) + }; + let fdt_header = FdtHeader::from_bytes(header) + .map_err(|e| format!("Failed to parse FDT header: {e:#?}")) + .unwrap(); + + if fdt_header.magic.get() != FDT_VALID_MAGIC { + error!( + "FDT magic is invalid, expected {:#x}, got {:#x}", + FDT_VALID_MAGIC, + fdt_header.magic.get() + ); + return; + } + + let fdt_bytes = + unsafe { core::slice::from_raw_parts(fdt_addr as *const u8, fdt_header.total_size()) }; + + let fdt = Fdt::from_bytes(fdt_bytes) + .map_err(|e| format!("Failed to parse FDT: {e:#?}")) + .expect("Failed to parse FDT"); + + // Statistics of node count and level distribution + let mut node_count = 0; + let mut level_counts = alloc::collections::BTreeMap::new(); + let mut max_level = 0; + + info!("=== FDT Node Information Statistics ==="); + + // Traverse all nodes once for statistics (following optimization strategy) + for node in fdt.all_nodes() { + node_count += 1; + + // Count nodes by level + *level_counts.entry(node.level).or_insert(0) += 1; + + // Record maximum level + if node.level > max_level { + max_level = node.level; + } + + // Count property numbers + let node_properties_count = node.propertys().count(); + + trace!( + "Node[{}]: {} (Level: {}, Properties: {})", + node_count, + node.name(), + node.level, + node_properties_count + ); + + for prop in node.propertys() { + trace!( + "Properties: {}, Raw_value: {:x?}", + prop.name, + prop.raw_value() + ); + } + } + + info!("=== FDT Statistics Results ==="); + info!("Total node count: {}", node_count); + info!("FDT total size: {} bytes", fdt_header.total_size()); + info!("Maximum level depth: {}", max_level); + + info!("Node distribution by level:"); + for (level, count) in level_counts { + let percentage = (count as f32 / node_count as f32) * 100.0; + info!(" Level {}: {} nodes ({:.1}%)", level, count, percentage); + } +} + +#[allow(dead_code)] +pub fn print_guest_fdt(fdt_bytes: &[u8]) { + let fdt = Fdt::from_bytes(fdt_bytes) + .map_err(|e| format!("Failed to parse FDT: {e:#?}")) + .expect("Failed to parse FDT"); + // Statistics of node count and level distribution + let mut node_count = 0; + let mut level_counts = alloc::collections::BTreeMap::new(); + let mut max_level = 0; + + info!("=== FDT Node Information Statistics ==="); + + // Traverse all nodes once for statistics (following optimization strategy) + for node in fdt.all_nodes() { + node_count += 1; + + // Count nodes by level + *level_counts.entry(node.level).or_insert(0) += 1; + + // Record maximum level + if node.level > max_level { + max_level = node.level; + } + + // Count property numbers + let node_properties_count = node.propertys().count(); + + info!( + "Node[{}]: {} (Level: {}, Properties: {})", + node_count, + node.name(), + node.level, + node_properties_count + ); + + for prop in node.propertys() { + info!( + "Properties: {}, Raw_value: {:x?}", + prop.name, + prop.raw_value() + ); + } + } + + info!("=== FDT Statistics Results ==="); + info!("Total node count: {}", node_count); + info!("Maximum level depth: {}", max_level); + + info!("Node distribution by level:"); + for (level, count) in level_counts { + let percentage = (count as f32 / node_count as f32) * 100.0; + info!(" Level {}: {} nodes ({:.1}%)", level, count, percentage); + } +} diff --git a/src/vmm/hvc.rs b/src/vmm/hvc.rs new file mode 100644 index 00000000..cf4d1f93 --- /dev/null +++ b/src/vmm/hvc.rs @@ -0,0 +1,148 @@ +use axaddrspace::{GuestPhysAddr, MappingFlags}; +use axerrno::{AxResult, ax_err, ax_err_type}; +use axhvc::{HyperCallCode, HyperCallResult}; + +use crate::vmm::ivc::{self, IVCChannel}; +use crate::vmm::{VCpuRef, VMRef}; + +pub struct HyperCall { + _vcpu: VCpuRef, + vm: VMRef, + code: HyperCallCode, + args: [u64; 6], +} + +impl HyperCall { + pub fn new(vcpu: VCpuRef, vm: VMRef, code: u64, args: [u64; 6]) -> AxResult { + let code = HyperCallCode::try_from(code as u32).map_err(|e| { + warn!("Invalid hypercall code: {} e {:?}", code, e); + ax_err_type!(InvalidInput) + })?; + + Ok(Self { + _vcpu: vcpu, + vm, + code, + args, + }) + } + + pub fn execute(&self) -> HyperCallResult { + match self.code { + HyperCallCode::HIVCPublishChannel => { + let key = self.args[0] as usize; + let shm_base_gpa_ptr = GuestPhysAddr::from_usize(self.args[1] as usize); + let shm_size_ptr = GuestPhysAddr::from_usize(self.args[2] as usize); + + info!( + "VM[{}] HyperCall {:?} key {:#x}", + self.vm.id(), + self.code, + key + ); + // User will pass the size of the shared memory region, + // we will allocate the shared memory region based on this size. + let shm_region_size = self.vm.read_from_guest_of::(shm_size_ptr)?; + let (shm_base_gpa, shm_region_size) = self.vm.alloc_ivc_channel(shm_region_size)?; + + let ivc_channel = + IVCChannel::alloc(self.vm.id(), key, shm_region_size, shm_base_gpa)?; + + let actual_size = ivc_channel.size(); + + self.vm.map_region( + shm_base_gpa, + ivc_channel.base_hpa(), + actual_size, + MappingFlags::READ | MappingFlags::WRITE, + )?; + + self.vm + .write_to_guest_of(shm_base_gpa_ptr, &shm_base_gpa.as_usize())?; + self.vm.write_to_guest_of(shm_size_ptr, &actual_size)?; + + ivc::insert_channel(self.vm.id(), ivc_channel)?; + + Ok(0) + } + HyperCallCode::HIVCUnPublishChannel => { + let key = self.args[0] as usize; + + info!( + "VM[{}] HyperCall {:?} with key {:#x}", + self.vm.id(), + self.code, + key + ); + let (base_gpa, size) = ivc::unpublish_channel(self.vm.id(), key)?.unwrap(); + self.vm.unmap_region(base_gpa, size)?; + + Ok(0) + } + HyperCallCode::HIVCSubscribChannel => { + let publisher_vm_id = self.args[0] as usize; + let key = self.args[1] as usize; + let shm_base_gpa_ptr = GuestPhysAddr::from_usize(self.args[2] as usize); + let shm_size_ptr = GuestPhysAddr::from_usize(self.args[3] as usize); + + info!( + "VM[{}] HyperCall {:?} to VM[{}]", + self.vm.id(), + self.code, + publisher_vm_id + ); + + let shm_size = ivc::get_channel_size(publisher_vm_id, key)?; + let (shm_base_gpa, _) = self.vm.alloc_ivc_channel(shm_size)?; + + let (base_hpa, actual_size) = ivc::subscribe_to_channel_of_publisher( + publisher_vm_id, + key, + self.vm.id(), + shm_base_gpa, + )?; + + // TODO: seperate the mapping flags of metadata and data. + self.vm.map_region( + shm_base_gpa, + base_hpa, + actual_size, + MappingFlags::READ | MappingFlags::WRITE, + )?; + + self.vm + .write_to_guest_of(shm_base_gpa_ptr, &shm_base_gpa.as_usize())?; + self.vm.write_to_guest_of(shm_size_ptr, &actual_size)?; + + info!( + "VM[{}] HyperCall HIVC_REGISTER_SUBSCRIBER success, base GPA: {:#x}, size: {}", + self.vm.id(), + shm_base_gpa, + actual_size + ); + + Ok(0) + } + HyperCallCode::HIVCUnSubscribChannel => { + let publisher_vm_id = self.args[0] as usize; + let key = self.args[1] as usize; + + info!( + "VM[{}] HyperCall {:?} from VM[{}]", + self.vm.id(), + self.code, + publisher_vm_id + ); + let (base_gpa, size) = + ivc::unsubscribe_from_channel_of_publisher(publisher_vm_id, key, self.vm.id())?; + self.vm.unmap_region(base_gpa, size)?; + + Ok(0) + } + _ => { + warn!("Unsupported hypercall code: {:?}", self.code); + ax_err!(Unsupported) + } + } + } +} diff --git a/src/vmm/images.rs b/src/vmm/images.rs deleted file mode 100644 index e29fceee..00000000 --- a/src/vmm/images.rs +++ /dev/null @@ -1,247 +0,0 @@ -use alloc::vec::Vec; - -use axaddrspace::GuestPhysAddr; -use axerrno::AxResult; - -use axvm::config::AxVMCrateConfig; -use memory_addr::PhysAddr; - -use crate::vmm::VMRef; -use crate::vmm::config::config; - -/// Loads the VM image files. -pub fn load_vm_images(config: AxVMCrateConfig, vm: VMRef) -> AxResult { - let load_ranges = match config.kernel.image_location.as_deref() { - Some("memory") => load_vm_images_from_memory(config, vm.clone()), - #[cfg(feature = "fs")] - Some("fs") => fs::load_vm_images_from_filesystem(config, vm.clone()), - _ => unimplemented!( - "Check your \"image_location\" in config.toml, \"memory\" and \"fs\" are supported,\n NOTE: \"fs\" feature should be enabled if you want to load images from filesystem. (APP_FEATURES=fs)" - ), - }?; - flush_vm_images(&load_ranges); - Ok(()) -} - -fn flush_vm_images(ls: &[LoadRange]) { - for l in ls { - unsafe { - crate::utils::cache::cache_clean_invalidate_d(l.start.as_usize(), l.size); - } - } -} - -struct LoadRange { - start: PhysAddr, - size: usize, -} - -/// Load VM images from memory -/// into the guest VM's memory space based on the VM configuration. -fn load_vm_images_from_memory(config: AxVMCrateConfig, vm: VMRef) -> AxResult> { - info!("Loading VM[{}] images from memory", config.base.id); - let mut load_ranges = Vec::new(); - - let vm_imags = config::get_memory_images() - .iter() - .find(|&v| v.id == config.base.id) - .expect("VM images is missed, Perhaps add `VM_CONFIGS=PATH/CONFIGS/FILE` command."); - - load_ranges.append( - &mut load_vm_image_from_memory(vm_imags.kernel, config.kernel.kernel_load_addr, vm.clone()) - .expect("Failed to load VM images"), - ); - - // Load DTB image - if let Some(buffer) = vm_imags.dtb { - load_ranges.append( - &mut load_vm_image_from_memory( - buffer, - config.kernel.dtb_load_addr.unwrap(), - vm.clone(), - ) - .expect("Failed to load DTB images"), - ); - } - - // Load BIOS image - if let Some(buffer) = vm_imags.bios { - load_ranges.append( - &mut load_vm_image_from_memory( - buffer, - config.kernel.bios_load_addr.unwrap(), - vm.clone(), - ) - .expect("Failed to load BIOS images"), - ); - } - - Ok(load_ranges) -} - -fn load_vm_image_from_memory( - image_buffer: &[u8], - load_addr: usize, - vm: VMRef, -) -> AxResult> { - let mut buffer_pos = 0; - let image_load_gpa = GuestPhysAddr::from(load_addr); - let mut load_ranges = alloc::vec![]; - - let image_size = image_buffer.len(); - - debug!( - "loading VM image from memory {:?} {}", - image_load_gpa, - image_buffer.len() - ); - - let image_load_regions = vm.get_image_load_region(image_load_gpa, image_size)?; - - for region in image_load_regions { - let region_len = region.len(); - let bytes_to_write = region_len.min(image_size - buffer_pos); - - // copy data from memory - unsafe { - core::ptr::copy_nonoverlapping( - image_buffer[buffer_pos..].as_ptr(), - region.as_mut_ptr().cast(), - bytes_to_write, - ); - } - load_ranges.push(LoadRange { - start: (region.as_ptr() as usize).into(), - size: bytes_to_write, - }); - // Update the position of the buffer. - buffer_pos += bytes_to_write; - - // If the buffer is fully written, exit the loop. - if buffer_pos >= image_size { - debug!("copy size: {}", bytes_to_write); - break; - } - } - - Ok(load_ranges) -} - -#[cfg(feature = "fs")] -mod fs { - use alloc::string::String; - - use std::fs::File; - - use axerrno::{AxResult, ax_err, ax_err_type}; - - use super::*; - - /// Loads the VM image files from the filesystem - /// into the guest VM's memory space based on the VM configuration. - pub(crate) fn load_vm_images_from_filesystem( - config: AxVMCrateConfig, - vm: VMRef, - ) -> AxResult> { - info!("Loading VM images from filesystem"); - let mut load_ranges = Vec::new(); - // Load kernel image. - load_ranges.append(&mut load_vm_image( - config.kernel.kernel_path, - GuestPhysAddr::from(config.kernel.kernel_load_addr), - vm.clone(), - )?); - // Load BIOS image if needed. - if let Some(bios_path) = config.kernel.bios_path { - if let Some(bios_load_addr) = config.kernel.bios_load_addr { - load_ranges.append(&mut load_vm_image( - bios_path, - GuestPhysAddr::from(bios_load_addr), - vm.clone(), - )?); - } else { - return ax_err!(NotFound, "BIOS load addr is missed"); - } - }; - // Load Ramdisk image if needed. - if let Some(ramdisk_path) = config.kernel.ramdisk_path { - if let Some(ramdisk_load_addr) = config.kernel.ramdisk_load_addr { - load_ranges.append(&mut load_vm_image( - ramdisk_path, - GuestPhysAddr::from(ramdisk_load_addr), - vm.clone(), - )?); - } else { - return ax_err!(NotFound, "Ramdisk load addr is missed"); - } - }; - // Load DTB image if needed. - // Todo: generate DTB file for guest VM. - if let Some(dtb_path) = config.kernel.dtb_path { - if let Some(dtb_load_addr) = config.kernel.dtb_load_addr { - load_ranges.append(&mut load_vm_image( - dtb_path, - GuestPhysAddr::from(dtb_load_addr), - vm.clone(), - )?); - } else { - return ax_err!(NotFound, "DTB load addr is missed"); - } - }; - Ok(load_ranges) - } - - fn load_vm_image( - image_path: String, - image_load_gpa: GuestPhysAddr, - vm: VMRef, - ) -> AxResult> { - use std::io::{BufReader, Read}; - let (image_file, image_size) = open_image_file(image_path.as_str())?; - - let image_load_regions = vm.get_image_load_region(image_load_gpa, image_size)?; - let mut load_ranges = Vec::with_capacity(image_load_regions.len()); - - let mut file = BufReader::new(image_file); - - for buffer in image_load_regions { - load_ranges.push(LoadRange { - start: (buffer.as_ptr() as usize).into(), - size: buffer.len(), - }); - file.read_exact(buffer).map_err(|err| { - ax_err_type!( - Io, - format!("Failed in reading from file {}, err {:?}", image_path, err) - ) - })? - } - - Ok(load_ranges) - } - - fn open_image_file(file_name: &str) -> AxResult<(File, usize)> { - let file = File::open(file_name).map_err(|err| { - ax_err_type!( - NotFound, - format!( - "Failed to open {}, err {:?}, please check your disk.img", - file_name, err - ) - ) - })?; - let file_size = file - .metadata() - .map_err(|err| { - ax_err_type!( - Io, - format!( - "Failed to get metadate of file {}, err {:?}", - file_name, err - ) - ) - })? - .size() as usize; - Ok((file, file_size)) - } -} diff --git a/src/vmm/images/linux.rs b/src/vmm/images/linux.rs new file mode 100644 index 00000000..db15ba4a --- /dev/null +++ b/src/vmm/images/linux.rs @@ -0,0 +1,148 @@ +/// Architecture variants detected from the image header. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ImageArch { + Riscv { + is_be: bool, + }, + Arm64 { + is_be: bool, + page_size: PageSize, + phys_placement_48bit: bool, + }, +} + +#[allow(unused)] +#[derive(Debug, Clone)] +pub struct Header { + pub text_offset: u64, + pub image_size: u64, + pub arch: ImageArch, +} + +#[allow(unused)] +impl Header { + pub fn parse(image: &[u8]) -> Option { + if let Some(hdr) = ARM64Header::parse(image) { + return Some(Self { + text_offset: hdr.text_offset, + image_size: hdr.image_size, + arch: ImageArch::Arm64 { + is_be: hdr.kernel_is_be(), + page_size: hdr.page_size(), + phys_placement_48bit: hdr.phys_placement_48bit(), + }, + }); + } + + if let Some(hdr) = RiscvHeader::parse(image) { + return Some(Self { + text_offset: hdr.text_offset, + image_size: hdr.image_size, + arch: ImageArch::Riscv { + is_be: hdr.kernel_is_be(), + }, + }); + } + + None + } + + pub fn hdr_size() -> usize { + size_of::() + } +} + +#[allow(unused)] +#[repr(C)] +struct ARM64Header { + code0: u32, + code1: u32, + text_offset: u64, + image_size: u64, + flags: u64, + res2: u64, + res3: u64, + res4: u64, + magic: u32, + res5: u32, +} + +impl ARM64Header { + const MAGIC: u32 = 0x644d5241; // 'ARMd' in little-endian + + fn parse(buffer: &[u8]) -> Option { + if buffer.len() < core::mem::size_of::() { + return None; + } + let hdr: Self = unsafe { core::ptr::read_unaligned(buffer.as_ptr() as *const _) }; + if hdr.magic != Self::MAGIC { + return None; + } + Some(hdr) + } + + /// Return whether the kernel image is big-endian according to flags bit 0. + fn kernel_is_be(&self) -> bool { + (self.flags & 0x1) != 0 + } + + /// Return page size encoded in flags bits 1-2. + fn page_size(&self) -> PageSize { + match (self.flags >> 1) & 0x3 { + 0 => PageSize::Unspecified, + 1 => PageSize::Size4K, + 2 => PageSize::Size16K, + 3 => PageSize::Size64K, + _ => PageSize::Unspecified, + } + } + + /// Return physical placement mode (bit 3): false=default, true=48-bit constrained. + fn phys_placement_48bit(&self) -> bool { + ((self.flags >> 3) & 0x1) != 0 + } +} + +/// Page size encoded in the image header flags (bits 1-2). +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum PageSize { + Unspecified, + Size4K, + Size16K, + Size64K, +} + +#[allow(unused)] +struct RiscvHeader { + code0: u32, + code1: u32, + text_offset: u64, + image_size: u64, + flags: u64, + version: u32, + res1: u32, + res2: u64, + magic: u64, + magic2: u32, + res4: u32, +} + +impl RiscvHeader { + const MAGIC: u64 = 0x5643534952; // 'RISCV\0\0\0' in little-endian + const MAGIC2: u32 = 0x56534905; // secondary magic + + fn parse(buffer: &[u8]) -> Option { + if buffer.len() < core::mem::size_of::() { + return None; + } + let hdr: Self = unsafe { core::ptr::read_unaligned(buffer.as_ptr() as *const _) }; + if hdr.magic != Self::MAGIC || hdr.magic2 != Self::MAGIC2 { + return None; + } + Some(hdr) + } + + fn kernel_is_be(&self) -> bool { + (self.flags & 0x1) != 0 + } +} diff --git a/src/vmm/images/mod.rs b/src/vmm/images/mod.rs new file mode 100644 index 00000000..cfe0fca7 --- /dev/null +++ b/src/vmm/images/mod.rs @@ -0,0 +1,330 @@ +use axaddrspace::GuestPhysAddr; +use axerrno::AxResult; + +use axvm::VMMemoryRegion; +use axvm::config::AxVMCrateConfig; +use byte_unit::Byte; + +use crate::hal::CacheOp; +use crate::vmm::VMRef; +use crate::vmm::config::{config, get_vm_dtb_arc}; + +#[cfg(target_arch = "aarch64")] +use crate::vmm::fdt::update_fdt; + +#[cfg(target_arch = "aarch64")] +use core::ptr::NonNull; + +mod linux; + +pub fn get_image_header(config: &AxVMCrateConfig) -> Option { + match config.kernel.image_location.as_deref() { + Some("memory") => with_memory_image(config, linux::Header::parse), + #[cfg(feature = "fs")] + Some("fs") => { + let read_size = linux::Header::hdr_size(); + let data = fs::kernal_read(config, read_size).ok()?; + linux::Header::parse(&data) + } + _ => unimplemented!( + "Check your \"image_location\" in config.toml, \"memory\" and \"fs\" are supported,\n NOTE: \"fs\" feature should be enabled if you want to load images from filesystem. (APP_FEATURES=fs)" + ), + } +} + +fn with_memory_image(config: &AxVMCrateConfig, func: F) -> R +where + F: FnOnce(&[u8]) -> R, +{ + let vm_imags = config::get_memory_images() + .iter() + .find(|&v| v.id == config.base.id) + .expect("VM images is missed, Perhaps add `VM_CONFIGS=PATH/CONFIGS/FILE` command."); + + func(vm_imags.kernel) +} + +pub struct ImageLoader { + main_memory: VMMemoryRegion, + vm: VMRef, + config: AxVMCrateConfig, + kernel_load_gpa: GuestPhysAddr, + bios_load_gpa: Option, + dtb_load_gpa: Option, + ramdisk_load_gpa: Option, +} + +impl ImageLoader { + pub fn new(main_memory: VMMemoryRegion, config: AxVMCrateConfig, vm: VMRef) -> Self { + Self { + main_memory, + vm, + config, + kernel_load_gpa: GuestPhysAddr::default(), + bios_load_gpa: None, + dtb_load_gpa: None, + ramdisk_load_gpa: None, + } + } + + pub fn load(&mut self) -> AxResult { + info!( + "Loading VM[{}] images into memory region: gpa={:#x}, hva={:#x}, size={:#}", + self.vm.id(), + self.main_memory.gpa, + self.main_memory.hva, + Byte::from(self.main_memory.size()) + ); + + self.vm.with_config(|config| { + self.kernel_load_gpa = config.image_config.kernel_load_gpa; + self.dtb_load_gpa = config.image_config.dtb_load_gpa; + self.bios_load_gpa = config.image_config.bios_load_gpa; + self.ramdisk_load_gpa = config.image_config.ramdisk_load_gpa; + }); + + match self.config.kernel.image_location.as_deref() { + Some("memory") => self.load_vm_images_from_memory(), + #[cfg(feature = "fs")] + Some("fs") => fs::load_vm_images_from_filesystem(self), + _ => unimplemented!( + "Check your \"image_location\" in config.toml, \"memory\" and \"fs\" are supported,\n NOTE: \"fs\" feature should be enabled if you want to load images from filesystem. (APP_FEATURES=fs)" + ), + } + } + + /// Load VM images from memory + /// into the guest VM's memory space based on the VM configuration. + fn load_vm_images_from_memory(&self) -> AxResult { + info!("Loading VM[{}] images from memory", self.config.base.id); + + let vm_imags = config::get_memory_images() + .iter() + .find(|&v| v.id == self.config.base.id) + .expect("VM images is missed, Perhaps add `VM_CONFIGS=PATH/CONFIGS/FILE` command."); + + load_vm_image_from_memory(vm_imags.kernel, self.kernel_load_gpa, self.vm.clone()) + .expect("Failed to load VM images"); + // Load DTB image + let vm_config = axvm::config::AxVMConfig::from(self.config.clone()); + if let Some(dtb_arc) = get_vm_dtb_arc(&vm_config) + && let Some(dtb_load_gpa) = self.dtb_load_gpa + { + let dtb_slice: &[u8] = &dtb_arc; + debug!( + "DTB buffer addr: {:x}, size: {:#}", + dtb_load_gpa, + Byte::from(dtb_slice.len()) + ); + + #[cfg(target_arch = "aarch64")] + update_fdt( + dtb_load_gpa, + NonNull::new(dtb_slice.as_ptr() as *mut u8).unwrap(), + dtb_slice.len(), + self.vm.clone(), + ); + } + + // Load BIOS image + if let Some(buffer) = vm_imags.bios { + load_vm_image_from_memory(buffer, self.bios_load_gpa.unwrap(), self.vm.clone()) + .expect("Failed to load BIOS images"); + } + + // Load Ramdisk image + if let Some(buffer) = vm_imags.ramdisk { + load_vm_image_from_memory(buffer, self.ramdisk_load_gpa.unwrap(), self.vm.clone()) + .expect("Failed to load Ramdisk images"); + }; + + Ok(()) + } +} + +pub fn load_vm_image_from_memory( + image_buffer: &[u8], + load_addr: GuestPhysAddr, + vm: VMRef, +) -> AxResult { + let mut buffer_pos = 0; + + let image_size = image_buffer.len(); + + debug!( + "loading VM image from memory {:?} {}", + load_addr, + image_buffer.len() + ); + + let image_load_regions = vm.get_image_load_region(load_addr, image_size)?; + + for region in image_load_regions { + let region_len = region.len(); + let bytes_to_write = region_len.min(image_size - buffer_pos); + + // copy data from memory + unsafe { + core::ptr::copy_nonoverlapping( + image_buffer[buffer_pos..].as_ptr(), + region.as_mut_ptr().cast(), + bytes_to_write, + ); + } + + crate::hal::arch::cache::dcache_range( + CacheOp::Clean, + (region.as_ptr() as usize).into(), + region_len, + ); + + // Update the position of the buffer. + buffer_pos += bytes_to_write; + + // If the buffer is fully written, exit the loop. + if buffer_pos >= image_size { + debug!("copy size: {}", bytes_to_write); + break; + } + } + + Ok(()) +} + +#[cfg(feature = "fs")] +pub mod fs { + use super::*; + use crate::hal::CacheOp; + use axerrno::{AxResult, ax_err, ax_err_type}; + use std::{fs::File, vec::Vec}; + + pub fn kernal_read(config: &AxVMCrateConfig, read_size: usize) -> AxResult> { + use std::fs::File; + use std::io::Read; + let file_name = &config.kernel.kernel_path; + + let mut file = File::open(file_name).map_err(|err| { + ax_err_type!( + NotFound, + format!( + "Failed to open {}, err {:?}, please check your disk.img", + file_name, err + ) + ) + })?; + + let mut buffer = vec![0u8; read_size]; + + file.read_exact(&mut buffer).map_err(|err| { + ax_err_type!( + NotFound, + format!( + "Failed to read {}, err {:?}, please check your disk.img", + file_name, err + ) + ) + })?; + + Ok(buffer) + } + + /// Loads the VM image files from the filesystem + /// into the guest VM's memory space based on the VM configuration. + pub(crate) fn load_vm_images_from_filesystem(loader: &ImageLoader) -> AxResult { + info!("Loading VM images from filesystem"); + // Load kernel image. + load_vm_image( + &loader.config.kernel.kernel_path, + loader.kernel_load_gpa, + loader.vm.clone(), + )?; + // Load BIOS image if needed. + if let Some(bios_path) = &loader.config.kernel.bios_path { + if let Some(bios_load_addr) = loader.bios_load_gpa { + load_vm_image(bios_path, bios_load_addr, loader.vm.clone())?; + } else { + return ax_err!(NotFound, "BIOS load addr is missed"); + } + }; + // Load Ramdisk image if needed. + if let Some(ramdisk_path) = &loader.config.kernel.ramdisk_path { + if let Some(ramdisk_load_addr) = loader.ramdisk_load_gpa { + load_vm_image(ramdisk_path, ramdisk_load_addr, loader.vm.clone())?; + } else { + return ax_err!(NotFound, "Ramdisk load addr is missed"); + } + }; + // Load DTB image if needed. + let vm_config = axvm::config::AxVMConfig::from(loader.config.clone()); + if let Some(dtb_arc) = get_vm_dtb_arc(&vm_config) + && let Some(dtb_load_gpa) = loader.dtb_load_gpa + { + let dtb_slice: &[u8] = &dtb_arc; + debug!( + "DTB buffer addr: {:x}, size: {:#}", + dtb_load_gpa, + Byte::from(dtb_slice.len()) + ); + + #[cfg(target_arch = "aarch64")] + update_fdt( + dtb_load_gpa, + NonNull::new(dtb_slice.as_ptr() as *mut u8).unwrap(), + dtb_slice.len(), + loader.vm.clone(), + ); + } + + Ok(()) + } + + fn load_vm_image(image_path: &str, image_load_gpa: GuestPhysAddr, vm: VMRef) -> AxResult { + use std::io::{BufReader, Read}; + let (image_file, image_size) = open_image_file(image_path)?; + + let image_load_regions = vm.get_image_load_region(image_load_gpa, image_size)?; + let mut file = BufReader::new(image_file); + + for buffer in image_load_regions { + file.read_exact(buffer).map_err(|err| { + ax_err_type!( + Io, + format!("Failed in reading from file {}, err {:?}", image_path, err) + ) + })?; + + crate::hal::arch::cache::dcache_range( + CacheOp::Clean, + (buffer.as_ptr() as usize).into(), + buffer.len(), + ); + } + + Ok(()) + } + + pub fn open_image_file(file_name: &str) -> AxResult<(File, usize)> { + let file = File::open(file_name).map_err(|err| { + ax_err_type!( + NotFound, + format!( + "Failed to open {}, err {:?}, please check your disk.img", + file_name, err + ) + ) + })?; + let file_size = file + .metadata() + .map_err(|err| { + ax_err_type!( + Io, + format!( + "Failed to get metadate of file {}, err {:?}", + file_name, err + ) + ) + })? + .size() as usize; + Ok((file, file_size)) + } +} diff --git a/src/vmm/ivc.rs b/src/vmm/ivc.rs new file mode 100644 index 00000000..542db9ca --- /dev/null +++ b/src/vmm/ivc.rs @@ -0,0 +1,285 @@ +//! Inter-VM communication (IVC) module. +use alloc::collections::BTreeMap; +use alloc::vec::Vec; + +use std::os::arceos::modules::axhal::paging::PagingHandlerImpl; +use std::sync::Mutex; + +use axaddrspace::{GuestPhysAddr, HostPhysAddr}; +use axerrno::AxResult; +use page_table_multiarch::PagingHandler; + +/// A global btree map to store IVC channels, +/// indexed by (publisher_vm_id, channel_key). +static IVC_CHANNELS: Mutex>> = + Mutex::new(BTreeMap::new()); + +pub fn insert_channel( + publisher_vm_id: usize, + channel: IVCChannel, +) -> AxResult<()> { + let mut channels = IVC_CHANNELS.lock(); + if channels + .insert((publisher_vm_id, channel.key), channel) + .is_some() + { + Err(axerrno::ax_err_type!( + AlreadyExists, + "IVC channel already exists" + )) + } else { + Ok(()) + } +} + +/// Try to remove a channel according to the publisher VM ID and key. +/// If the channel still has subscribers, it will just mark it as unpublished +/// (by setting its base GPA to None). +/// If the channel is successfully unpublished, it will return the base GPA and size of the channel. +/// If the channel does not exist, it will return an error. +pub fn unpublish_channel( + publisher_vm_id: usize, + key: usize, +) -> AxResult> { + let mut channels = IVC_CHANNELS.lock(); + if let Some(mut channel) = channels.remove(&(publisher_vm_id, key)) { + let base_gpa = channel.base_gpa_in_publisher().ok_or_else(|| { + axerrno::ax_err_type!( + NotFound, + format!( + "IVC channel for publisher VM {} with key {} has no base GPA, it may have been marked as unpublished", + publisher_vm_id, key + ) + ) + })?; + let size = channel.size(); + if !channel.subscribers().is_empty() { + channel.base_gpa = None; // Mark the channel as removed. + // If there are still subscribers, just return None. + channels.insert((publisher_vm_id, key), channel); + } + Ok(Some((base_gpa, size))) + } else { + Err(axerrno::ax_err_type!( + NotFound, + format!( + "IVC channel for publisher VM {} with key {} not found", + publisher_vm_id, key + ) + )) + } +} + +pub fn get_channel_size(publisher_vm_id: usize, key: usize) -> AxResult { + let channels = IVC_CHANNELS.lock(); + if let Some(channel) = channels.get(&(publisher_vm_id, key)) { + Ok(channel.size()) + } else { + Err(axerrno::ax_err_type!( + NotFound, + format!( + "IVC channel for publisher VM {} with key {} not found", + publisher_vm_id, key + ) + )) + } +} + +/// Subcribe to a channel of a publisher VM with the given key, +/// return the shared region base address and size. +pub fn subscribe_to_channel_of_publisher( + publisher_vm_id: usize, + key: usize, + subscriber_vm_id: usize, + subscriber_gpa: GuestPhysAddr, +) -> AxResult<(HostPhysAddr, usize)> { + let mut channels = IVC_CHANNELS.lock(); + if let Some(channel) = channels.get_mut(&(publisher_vm_id, key)) { + // Add the subscriber VM ID to the channel. + channel.add_subscriber(subscriber_vm_id, subscriber_gpa); + Ok((channel.base_hpa(), channel.size())) + } else { + Err(axerrno::ax_err_type!( + NotFound, + format!( + "IVC channel for publisher VM [{}] key {:#x} not found", + publisher_vm_id, key + ) + )) + } +} + +/// Unsubscribe from a channel of a publisher VM with the given key, +/// if the channel has been unpublished (i.e., the base GPA is None) and has no subscribers, +/// it will remove the channel from the global map. +pub fn unsubscribe_from_channel_of_publisher( + publisher_vm_id: usize, + key: usize, + subscriber_vm_id: usize, +) -> AxResult<(GuestPhysAddr, usize)> { + let mut channels = IVC_CHANNELS.lock(); + let (base_gpa, size) = if let Some(channel) = channels.get_mut(&(publisher_vm_id, key)) { + // Remove the subscriber VM ID from the channel. + if let Some(subscriber_gpa) = channel.remove_subscriber(subscriber_vm_id) { + Ok((subscriber_gpa, channel.size())) + } else { + Err(axerrno::ax_err_type!( + NotFound, + format!( + "VM[{}] tries to unsubscribe non-existed channel publisher VM[{}] Key {:#x}", + subscriber_vm_id, publisher_vm_id, key + ) + )) + } + } else { + Err(axerrno::ax_err_type!( + NotFound, + format!("IVC channel for publisher VM {} not found", publisher_vm_id) + )) + }?; + + // If the channel has no subscribers and has been unpublished (base GPA is None), + // remove it from the global map. + if channels + .get(&(publisher_vm_id, key)) + .is_some_and(|c| c.subscribers().is_empty() && c.base_gpa.is_none()) + { + channels.remove(&(publisher_vm_id, key)); + } + + Ok((base_gpa, size)) +} + +pub struct IVCChannel { + publisher_vm_id: usize, + key: usize, + /// A list of subscriber VM IDs that are subscribed to this channel. + /// The key is the subscriber VM ID, and the value is the base address of the shared region in + /// guest physical address of the subscriber VM. + subscriber_vms: BTreeMap, + shared_region_base: HostPhysAddr, + shared_region_size: usize, + /// The base address of the shared memory region in guest physical address of the publisher VM. + /// `None` if the channel has been unpublished (but still has subscribers). + base_gpa: Option, + _phatom: core::marker::PhantomData, +} + +#[repr(C)] +pub struct IVCChannelHeader { + pub publisher_id: u64, + pub key: u64, +} + +impl IVCChannel { + #[allow(unused)] + pub fn header(&self) -> &IVCChannelHeader { + unsafe { + // Map the shared region base to the header structure. + &*H::phys_to_virt(self.shared_region_base).as_mut_ptr_of::() + } + } + + pub fn header_mut(&mut self) -> &mut IVCChannelHeader { + unsafe { + // Map the shared region base to the mutable header structure. + &mut *H::phys_to_virt(self.shared_region_base).as_mut_ptr_of::() + } + } + + #[allow(unused)] + pub fn data_region(&self) -> *const u8 { + unsafe { + // Return a pointer to the data region, which starts after the header. + H::phys_to_virt(self.shared_region_base) + .as_mut_ptr() + .add(core::mem::size_of::()) + } + } +} + +impl core::fmt::Debug for IVCChannel { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!( + f, + "IVCChannel(publisher[{}], subscribers {:?}, base: {:?}, size: {:#x}, gpa: {:?})", + self.publisher_vm_id, + self.subscriber_vms, + self.shared_region_base, + self.shared_region_size, + self.base_gpa + ) + } +} + +impl Drop for IVCChannel { + fn drop(&mut self) { + // Free the shared region frame when the channel is dropped. + debug!( + "Dropping IVCChannel for VM[{}], shared region base: {:?}", + self.publisher_vm_id, self.shared_region_base + ); + H::dealloc_frame(self.shared_region_base); + } +} + +impl IVCChannel { + pub fn alloc( + publisher_vm_id: usize, + key: usize, + shared_region_size: usize, + base_gpa: GuestPhysAddr, + ) -> AxResult { + // TODO: support larger shared region sizes with alloc_frames API. + let shared_region_size = shared_region_size.min(4096); + let shared_region_base = H::alloc_frame().ok_or_else(|| { + axerrno::ax_err_type!(NoMemory, "Failed to allocate shared region frame") + })?; + + let mut channel = IVCChannel { + publisher_vm_id, + key, + subscriber_vms: BTreeMap::new(), + shared_region_base, + shared_region_size, + base_gpa: Some(base_gpa), + _phatom: core::marker::PhantomData, + }; + + channel.header_mut().publisher_id = publisher_vm_id as u64; + channel.header_mut().key = key as u64; + + debug!("Allocated IVCChannel: {:?}", channel); + + Ok(channel) + } + + pub fn base_hpa(&self) -> HostPhysAddr { + self.shared_region_base + } + + pub fn base_gpa_in_publisher(&self) -> Option { + self.base_gpa + } + + pub fn size(&self) -> usize { + self.shared_region_size + } + + pub fn add_subscriber(&mut self, subscriber_vm_id: usize, subscriber_gpa: GuestPhysAddr) { + self.subscriber_vms + .entry(subscriber_vm_id) + .or_insert(subscriber_gpa); + } + + pub fn remove_subscriber(&mut self, subscriber_vm_id: usize) -> Option { + self.subscriber_vms.remove(&subscriber_vm_id) + } + + pub fn subscribers(&self) -> Vec<(usize, GuestPhysAddr)> { + self.subscriber_vms + .iter() + .map(|(vm_id, gpa)| (*vm_id, *gpa)) + .collect() + } +} diff --git a/src/vmm/mod.rs b/src/vmm/mod.rs index 0e9ab075..50597e50 100644 --- a/src/vmm/mod.rs +++ b/src/vmm/mod.rs @@ -1,13 +1,22 @@ -mod config; -mod images; -#[allow(unused)] //TODO: remove this with "irq" feature. -mod timer; -mod vcpus; -mod vm_list; +mod hvc; +mod ivc; -use std::os::arceos::api::task::{self, AxWaitQueueHandle}; +pub mod config; +pub mod images; +pub mod timer; +pub mod vcpus; +pub mod vm_list; + +#[cfg(target_arch = "aarch64")] +pub mod fdt; use core::sync::atomic::{AtomicUsize, Ordering}; +use std::os::arceos::{ + api::task::{self, AxWaitQueueHandle}, + modules::axtask::{self, TaskExtRef}, +}; + +use axerrno::{AxResult, ax_err_type}; use crate::hal::{AxVCpuHalImpl, AxVMHalImpl}; pub use timer::init_percpu as init_timer_percpu; @@ -28,6 +37,7 @@ static RUNNING_VM_COUNT: AtomicUsize = AtomicUsize::new(0); /// /// This function creates the VM structures and sets up the primary VCpu for each VM. pub fn init() { + info!("Initializing VMM..."); // Initialize guest VM according to config file. config::init_guest_vms(); @@ -63,3 +73,66 @@ pub fn start() { None, ); } + +#[allow(unused_imports)] +pub use vcpus::with_vcpu_task; + +/// Run a closure with the specified VM. +pub fn with_vm(vm_id: usize, f: impl FnOnce(VMRef) -> T) -> Option { + let vm = vm_list::get_vm_by_id(vm_id)?; + Some(f(vm)) +} + +/// Run a closure with the specified VM and vCPU. +pub fn with_vm_and_vcpu( + vm_id: usize, + vcpu_id: usize, + f: impl FnOnce(VMRef, VCpuRef) -> T, +) -> Option { + let vm = vm_list::get_vm_by_id(vm_id)?; + let vcpu = vm.vcpu(vcpu_id)?; + + Some(f(vm, vcpu)) +} + +/// Run a closure with the specified VM and vCPU, with the guarantee that the closure will be +/// executed on the physical CPU where the vCPU is running, waiting, or queueing. +/// +/// TODO: It seems necessary to disable scheduling when running the closure. +pub fn with_vm_and_vcpu_on_pcpu( + vm_id: usize, + vcpu_id: usize, + f: impl FnOnce(VMRef, VCpuRef) + 'static, +) -> AxResult { + // Disables preemption and IRQs to prevent the current task from being preempted or re-scheduled. + let guard = kernel_guard::NoPreemptIrqSave::new(); + + let current_vm = axtask::current().task_ext().vm.id(); + let current_vcpu = axtask::current().task_ext().vcpu.id(); + + // The target vCPU is the current task, execute the closure directly. + if current_vm == vm_id && current_vcpu == vcpu_id { + with_vm_and_vcpu(vm_id, vcpu_id, f).unwrap(); // unwrap is safe here + return Ok(()); + } + + // The target vCPU is not the current task, send an IPI to the target physical CPU. + drop(guard); + + let _pcpu_id = vcpus::with_vcpu_task(vm_id, vcpu_id, |task| task.cpu_id()) + .ok_or_else(|| ax_err_type!(NotFound))?; + + unimplemented!(); + // use std::os::arceos::modules::axipi; + // Ok(axipi::send_ipi_event_to_one(pcpu_id as usize, move || { + // with_vm_and_vcpu_on_pcpu(vm_id, vcpu_id, f); + // })) +} + +pub fn get_running_vm_count() -> usize { + RUNNING_VM_COUNT.load(Ordering::Acquire) +} + +pub fn add_running_vm_count(count: usize) { + RUNNING_VM_COUNT.fetch_add(count, Ordering::Release); +} diff --git a/src/vmm/timer.rs b/src/vmm/timer.rs index 4708d2ee..01862d5e 100644 --- a/src/vmm/timer.rs +++ b/src/vmm/timer.rs @@ -1,7 +1,7 @@ use core::sync::atomic::AtomicUsize; use core::sync::atomic::Ordering; -use std::os::arceos::modules::{axconfig, axhal}; +use std::os::arceos::modules::axhal; use alloc::boxed::Box; use kspin::SpinNoIrq; @@ -9,7 +9,7 @@ use lazyinit::LazyInit; use timer_list::{TimeValue, TimerEvent, TimerList}; static TOKEN: AtomicUsize = AtomicUsize::new(0); -const PERIODIC_INTERVAL_NANOS: u64 = axhal::time::NANOS_PER_SEC / axconfig::TICKS_PER_SEC as u64; +// const PERIODIC_INTERVAL_NANOS: u64 = axhal::time::NANOS_PER_SEC / axconfig::TICKS_PER_SEC as u64; /// Represents a timer event in the virtual machine monitor (VMM). /// @@ -28,7 +28,7 @@ impl VmmTimerEvent { F: FnOnce(TimeValue) + Send + 'static, { Self { - token: token, + token, timer_callback: Box::new(f), } } @@ -55,11 +55,17 @@ pub fn register_timer(deadline: u64, handler: F) -> usize where F: FnOnce(TimeValue) + Send + 'static, { + trace!("Registering timer..."); + trace!( + "deadline is {:#?} = {:#?}", + deadline, + TimeValue::from_nanos(deadline) + ); let timer_list = unsafe { TIMER_LIST.current_ref_mut_raw() }; let mut timers = timer_list.lock(); let token = TOKEN.fetch_add(1, Ordering::Release); let event = VmmTimerEvent::new(token, handler); - timers.set(TimeValue::from_nanos(deadline as u64), event); + timers.set(TimeValue::from_nanos(deadline), event); token } @@ -75,12 +81,14 @@ pub fn cancel_timer(token: usize) { /// Check and process any pending timer events pub fn check_events() { + // info!("Checking timer events..."); + // info!("now is {:#?}", axhal::time::wall_time()); let timer_list = unsafe { TIMER_LIST.current_ref_mut_raw() }; loop { let now = axhal::time::wall_time(); let event = timer_list.lock().expire_one(now); if let Some((_deadline, event)) = event { - trace!("pick one {:#?} to handler!!!", _deadline); + trace!("pick one {:#?} to handle!!!", _deadline); event.callback(now); } else { break; @@ -88,13 +96,14 @@ pub fn check_events() { } } -/// Schedule the next timer event based on the periodic interval -pub fn scheduler_next_event() { - let now_ns = axhal::time::monotonic_time_nanos(); - let deadline = now_ns + PERIODIC_INTERVAL_NANOS; - trace!("PHY deadline {} !!!", deadline); - axhal::time::set_oneshot_timer(deadline); -} +// /// Schedule the next timer event based on the periodic interval +// pub fn scheduler_next_event() { +// trace!("Scheduling next event..."); +// let now_ns = axhal::time::monotonic_time_nanos(); +// let deadline = now_ns + PERIODIC_INTERVAL_NANOS; +// debug!("PHY deadline {} !!!", deadline); +// axhal::time::set_oneshot_timer(deadline); +// } /// Initialize the hypervisor timer system pub fn init_percpu() { diff --git a/src/vmm/vcpus.rs b/src/vmm/vcpus.rs index 1a084c01..ae2d5b42 100644 --- a/src/vmm/vcpus.rs +++ b/src/vmm/vcpus.rs @@ -1,17 +1,25 @@ use alloc::{collections::BTreeMap, vec::Vec}; +use cpumask::CpuMask; -use core::sync::atomic::{AtomicUsize, Ordering}; +use core::{ + cell::UnsafeCell, + sync::atomic::{AtomicUsize, Ordering}, + time::Duration, +}; use std::os::arceos::{ api::task::{AxCpuMask, ax_wait_queue_wake}, - modules::axtask, + modules::{ + axhal::{self, time::busy_wait}, + axtask, + }, }; use axaddrspace::GuestPhysAddr; use axtask::{AxTaskRef, TaskExtRef, TaskInner, WaitQueue}; use axvcpu::{AxVCpuExitReason, VCpuState}; -use crate::task::TaskExt; use crate::vmm::{VCpuRef, VMRef}; +use crate::{hal::arch::inject_interrupt, task::TaskExt}; const KERNEL_STACK_SIZE: usize = 0x40000; // 256 KiB @@ -20,7 +28,47 @@ const KERNEL_STACK_SIZE: usize = 0x40000; // 256 KiB /// /// TODO: find a better data structure to replace the `static mut`, something like a conditional /// variable. -static mut VM_VCPU_TASK_WAIT_QUEUE: BTreeMap = BTreeMap::new(); +static VM_VCPU_TASK_WAIT_QUEUE: Queue = Queue::new(); + +/// A thread-safe queue that manages wait queues for VCpus across multiple VMs. +/// +/// This structure wraps a BTreeMap that maps VM IDs to their corresponding VMVCpus structures. +/// It provides thread-safe access to the mapping through interior mutability using UnsafeCell. +/// Each VM is identified by its unique ID, and the queue manages the VCpu tasks and wait +/// operations for all VMs in the system. +struct Queue(UnsafeCell>); + +unsafe impl Sync for Queue {} +unsafe impl Send for Queue {} + +impl Queue { + /// Creates a new empty Queue. + /// + /// # Returns + /// + /// A new Queue instance with an empty BTreeMap. + const fn new() -> Self { + Self(UnsafeCell::new(BTreeMap::new())) + } + + /// Retrieves a reference to the VMVCpus for the specified VM ID. + fn get(&self, vm_id: &usize) -> Option<&VMVCpus> { + unsafe { (*self.0.get()).get(vm_id) } + } + + /// Retrieves a mutable reference to the VMVCpus for the specified VM ID. + #[allow(clippy::mut_from_ref)] + fn get_mut(&self, vm_id: &usize) -> Option<&mut VMVCpus> { + unsafe { (*self.0.get()).get_mut(vm_id) } + } + + /// Inserts a new VMVCpus entry for the specified VM ID. + fn insert(&self, vm_id: usize, vcpus: VMVCpus) { + unsafe { + (*self.0.get()).insert(vm_id, vcpus); + } + } +} /// A structure representing the VCpus of a specific VM, including a wait queue /// and a list of tasks associated with the VCpus. @@ -115,9 +163,7 @@ impl VMVCpus { /// * `vm_id` - The ID of the VM whose VCpu wait queue is used to block the current thread. /// fn wait(vm_id: usize) { - unsafe { VM_VCPU_TASK_WAIT_QUEUE.get(&vm_id) } - .unwrap() - .wait() + VM_VCPU_TASK_WAIT_QUEUE.get(&vm_id).unwrap().wait() } /// Blocks the current thread until the provided condition is met, using the wait queue @@ -132,7 +178,8 @@ fn wait_for(vm_id: usize, condition: F) where F: Fn() -> bool, { - unsafe { VM_VCPU_TASK_WAIT_QUEUE.get(&vm_id) } + VM_VCPU_TASK_WAIT_QUEUE + .get(&vm_id) .unwrap() .wait_until(condition) } @@ -146,14 +193,16 @@ where /// pub(crate) fn notify_primary_vcpu(vm_id: usize) { // Generally, the primary VCpu is the first and **only** VCpu in the list. - unsafe { VM_VCPU_TASK_WAIT_QUEUE.get_mut(&vm_id) } + VM_VCPU_TASK_WAIT_QUEUE + .get_mut(&vm_id) .unwrap() .notify_one() } /// Marks the VCpu of the specified VM as running. fn mark_vcpu_running(vm_id: usize) { - unsafe { VM_VCPU_TASK_WAIT_QUEUE.get(&vm_id) } + VM_VCPU_TASK_WAIT_QUEUE + .get(&vm_id) .unwrap() .mark_vcpu_running(); } @@ -161,7 +210,8 @@ fn mark_vcpu_running(vm_id: usize) { /// Marks the VCpu of the specified VM as exiting for VM shutdown. Returns true if this was the last /// VCpu to exit. fn mark_vcpu_exiting(vm_id: usize) -> bool { - unsafe { VM_VCPU_TASK_WAIT_QUEUE.get(&vm_id) } + VM_VCPU_TASK_WAIT_QUEUE + .get(&vm_id) .unwrap() .mark_vcpu_exiting() } @@ -202,7 +252,8 @@ fn vcpu_on(vm: VMRef, vcpu_id: usize, entry_point: GuestPhysAddr, arg: usize) { let vcpu_task = alloc_vcpu_task(vm.clone(), vcpu); - unsafe { VM_VCPU_TASK_WAIT_QUEUE.get_mut(&vm.id()) } + VM_VCPU_TASK_WAIT_QUEUE + .get_mut(&vm.id()) .unwrap() .add_vcpu_task(vcpu_task); } @@ -225,9 +276,26 @@ pub fn setup_vm_primary_vcpu(vm: VMRef) { let primary_vcpu = vm.vcpu_list()[primary_vcpu_id].clone(); let primary_vcpu_task = alloc_vcpu_task(vm.clone(), primary_vcpu); vm_vcpus.add_vcpu_task(primary_vcpu_task); - unsafe { - VM_VCPU_TASK_WAIT_QUEUE.insert(vm_id, vm_vcpus); - } + + VM_VCPU_TASK_WAIT_QUEUE.insert(vm_id, vm_vcpus); +} + +/// Finds the [`AxTaskRef`] associated with the specified vCPU of the specified VM. +// pub fn find_vcpu_task(vm_id: usize, vcpu_id: usize) -> Option { +// with_vcpu_task(vm_id, vcpu_id, |task| task.clone()) +// } +/// Executes the provided closure with the [`AxTaskRef`] associated with the specified vCPU of the specified VM. +pub fn with_vcpu_task T>( + vm_id: usize, + vcpu_id: usize, + f: F, +) -> Option { + VM_VCPU_TASK_WAIT_QUEUE + .get(&vm_id) + .unwrap() + .vcpu_task_list + .get(vcpu_id) + .map(f) } /// Allocates arceos task for vcpu, set the task's entry function to [`vcpu_run()`], @@ -280,6 +348,11 @@ fn vcpu_run() { let vm_id = vm.id(); let vcpu_id = vcpu.id(); + // boot delay + let boot_delay_sec = (vm_id - 1) * 5; + info!("VM[{}] boot delay: {}s", vm_id, boot_delay_sec); + busy_wait(Duration::from_secs(boot_delay_sec as _)); + info!("VM[{}] VCpu[{}] waiting for running", vm.id(), vcpu.id()); wait_for(vm_id, || vm.running()); @@ -288,10 +361,26 @@ fn vcpu_run() { loop { match vm.run_vcpu(vcpu_id) { - // match vcpu.run() { Ok(exit_reason) => match exit_reason { AxVCpuExitReason::Hypercall { nr, args } => { debug!("Hypercall [{}] args {:x?}", nr, args); + use crate::vmm::hvc::HyperCall; + + match HyperCall::new(vcpu.clone(), vm.clone(), nr, args) { + Ok(hypercall) => { + let ret_val = match hypercall.execute() { + Ok(ret_val) => ret_val as isize, + Err(err) => { + warn!("Hypercall [{:#x}] failed: {:?}", nr, err); + -1 + } + }; + vcpu.set_return_value(ret_val as usize); + } + Err(err) => { + warn!("Hypercall [{:#x}] failed: {:?}", nr, err); + } + } } AxVCpuExitReason::FailEntry { hardware_entry_failure_reason, @@ -303,6 +392,10 @@ fn vcpu_run() { } AxVCpuExitReason::ExternalInterrupt { vector } => { debug!("VM[{}] run VCpu[{}] get irq {}", vm_id, vcpu_id, vector); + + // TODO: maybe move this irq dispatcher to lower layer to accelerate the interrupt handling + axhal::irq::irq_handler(vector as usize); + super::timer::check_events(); } AxVCpuExitReason::Halt => { debug!("VM[{}] run VCpu[{}] Halt", vm_id, vcpu_id); @@ -327,7 +420,7 @@ fn vcpu_run() { ); // Get the mapping relationship between all vCPUs and physical CPUs from the configuration - let vcpu_mappings = vm.config().get_vcpu_affinities_pcpu_ids(); + let vcpu_mappings = vm.get_vcpu_affinities_pcpu_ids(); // Find the vCPU ID corresponding to the physical ID let target_vcpu_id = vcpu_mappings @@ -339,10 +432,9 @@ fn vcpu_run() { None } }) - .expect(&format!( - "Physical CPU ID {} not found in VM configuration", - target_cpu - )); + .unwrap_or_else(|| { + panic!("Physical CPU ID {target_cpu} not found in VM configuration",) + }); vcpu_on(vm.clone(), target_vcpu_id, entry_point, arg as _); vcpu.set_gpr(0, 0); @@ -351,13 +443,41 @@ fn vcpu_run() { warn!("VM[{}] run VCpu[{}] SystemDown", vm_id, vcpu_id); vm.shutdown().expect("VM shutdown failed"); } - _ => { - warn!("Unhandled VM-Exit"); + AxVCpuExitReason::SendIPI { + target_cpu, + target_cpu_aux, + send_to_all, + send_to_self, + vector, + } => { + debug!( + "VM[{vm_id}] run VCpu[{vcpu_id}] SendIPI, target_cpu={target_cpu:#x}, target_cpu_aux={target_cpu_aux:#x}, vector={vector}", + ); + if send_to_all { + unimplemented!("Send IPI to all CPUs is not implemented yet"); + } + + if target_cpu == vcpu_id as u64 || send_to_self { + inject_interrupt(vector as _); + } else { + vm.inject_interrupt_to_vcpu( + CpuMask::one_shot(target_cpu as _), + vector as _, + ) + .unwrap(); + } + } + e => { + warn!( + "VM[{}] run VCpu[{}] unhandled vmexit: {:?}", + vm_id, vcpu_id, e + ); } }, Err(err) => { - warn!("VM[{}] run VCpu[{}] get error {:?}", vm_id, vcpu_id, err); - wait(vm_id) + error!("VM[{}] run VCpu[{}] get error {:?}", vm_id, vcpu_id, err); + // wait(vm_id) + vm.shutdown().expect("VM shutdown failed"); } } diff --git a/tool/dev_env.py b/tool/dev_env.py deleted file mode 100755 index 84c3c3d5..00000000 --- a/tool/dev_env.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python3 -import os -import subprocess -import argparse - - -def main(): - # 创建 ArgumentParser 对象 - parser = argparse.ArgumentParser(description="Development environment setup script") - - parser.add_argument( - "--repo", - type=str, - default="git@github.com:arceos-hypervisor", - help="Specify the repo to use", - ) - - # 解析命令行参数 - args = parser.parse_args() - - repo = args.repo - - # 使用 branch 参数 - print(f"Using: {repo} ") - - # 创建 crates 目录 - os.makedirs("crates", exist_ok=True) - - # 克隆其他仓库到 crates 目录 - repos = [ - "arceos", - "axvm", - "axvcpu", - "axaddrspace", - "arm_vcpu", - "axdevice", - "arm_vgic", - "arm_gicv2", - "axdevice_crates", - ] - - for one in repos: - p = f"{repo}/{one}.git" - print(f"clone {p}") - subprocess.run( - ["git", "clone", p, f"crates/{one}"], - check=True, - ) - - print("clone success") - - cargo_toml = "" - - with open("Cargo.toml", "r") as file: - cargo_toml = file.read() - - os.rename("Cargo.toml", "Cargo.toml.bk") - - cargo_toml += """ - -[patch."https://github.com/arceos-hypervisor/arceos.git".axstd] -path = "crates/arceos/ulib/axstd" -[patch."https://github.com/arceos-hypervisor/arceos.git".axhal] -path = "crates/arceos/modules/axhal" -[patch."https://github.com/arceos-hypervisor/axvm.git".axvm] -path = "crates/axvm" -[patch."https://github.com/arceos-hypervisor/axvcpu.git".axvcpu] -path = "crates/axvcpu" -[patch."https://github.com/arceos-hypervisor/axaddrspace.git".axaddrspace] -path = "crates/axaddrspace" -[patch."https://github.com/arceos-hypervisor/arm_vcpu.git".arm_vcpu] -path = "crates/arm_vcpu" -[patch."https://github.com/arceos-hypervisor/axdevice.git".axdevice] -path = "crates/axdevice" -[patch."https://github.com/arceos-hypervisor/arm_vgic.git".arm_vgic] -path = "crates/arm_vgic" -[patch."https://github.com/arceos-hypervisor/axdevice_crates.git".axdevice_base] -path = "crates/axdevice_crates/axdevice_base" -[patch."https://github.com/arceos-hypervisor/arm_gicv2.git".arm_gicv2] -path = "crates/arm_gicv2" -""" - - with open("Cargo.toml", "w") as file: - file.write(cargo_toml) - - # 创建 .vscode 目录并生成 settings.json - os.makedirs(".vscode", exist_ok=True) - with open(".vscode/settings.json", "w") as settings_json: - settings_json.write( - """ -{ - "rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat", - "rust-analyzer.check.allTargets": false, - "rust-analyzer.cargo.features": ["fs"], - "rust-analyzer.cargo.extraEnv": { - "AX_CONFIG_PATH": "${workspaceFolder}/.axconfig.toml" - } -} - """ - ) - - print("patch success") - - -if __name__ == "__main__": - main()